@bitmovin/player-web-x 10.1.1 → 10.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/playerx-bitmovin-v8-core.js +2 -2
- package/bundles/playerx-bitmovin-v8.js +2 -2
- package/bundles/playerx-core.js +2 -2
- package/bundles/playerx-dash.js +2 -2
- package/bundles/playerx-hls.js +2 -2
- package/bundles/playerx-tv.js +2 -2
- package/package.json +3 -3
- package/packages/playerx-adaptation.package.js +2 -2
- package/packages/playerx-analytics.package.js +20 -0
- package/packages/playerx-bitmovin-source-api.package.js +1 -1
- package/packages/playerx-bitmovin-ui.package.js +1 -1
- package/packages/playerx-bitmovin-v8-core.package.js +1 -1
- package/packages/playerx-bitmovin-v8-static-api.package.js +1 -1
- package/packages/playerx-bitmovin-video-element-utils.package.js +1 -1
- package/packages/playerx-capabilities.package.js +1 -1
- package/packages/playerx-container-mp4.package.js +1 -1
- package/packages/playerx-container-ts.package.js +1 -1
- package/packages/playerx-core.package.js +2 -2
- package/packages/playerx-dash-parsing.package.js +1 -1
- package/packages/playerx-dash-translation.package.js +1 -1
- package/packages/playerx-dash.package.js +2 -2
- package/packages/playerx-data.package.js +2 -2
- package/packages/playerx-event-bus.package.js +1 -1
- package/packages/playerx-hls-parsing.package.js +1 -1
- package/packages/playerx-hls-translation.package.js +2 -2
- package/packages/playerx-hls.package.js +2 -2
- package/packages/playerx-network.package.js +2 -2
- package/packages/playerx-playback-api.package.js +1 -1
- package/packages/playerx-playback.package.js +1 -1
- package/packages/playerx-player-api.package.js +1 -1
- package/packages/playerx-presentation.package.js +2 -2
- package/packages/playerx-segment-processing.package.js +2 -2
- package/packages/playerx-source.package.js +2 -2
- package/packages/playerx-sources-api.package.js +1 -1
- package/packages/playerx-subtitle-base.package.d.ts +1 -0
- package/packages/playerx-subtitle-base.package.js +10 -0
- package/packages/playerx-subtitle-format-detection.package.d.ts +1 -0
- package/packages/playerx-subtitle-format-detection.package.js +10 -0
- package/packages/playerx-trick-play.package.js +2 -2
- package/packages/playerx-ts-transmuxer.package.js +1 -1
- package/packages/playerx-tv.package.js +1 -1
- package/packages/playerx-view-mode.package.js +1 -1
- package/packages/playerx-web-vtt.package.js +10 -0
- package/playerx-framework-utils.js +1 -1
- package/types/bundles/BitmovinV8.bundle.d.ts +1 -1
- package/types/bundles/BitmovinV8Core.bundle.d.ts +1 -1
- package/types/bundles/Core.bundle.d.ts +1 -1
- package/types/bundles/Dash.bundle.d.ts +1 -1
- package/types/bundles/Hls.bundle.d.ts +1 -1
- package/types/bundles/Tv.bundle.d.ts +1 -1
- package/types/packages/adaptation/Adaptation.package.d.ts +1 -1
- package/types/packages/capabilities/Capabilities.package.d.ts +1 -1
- package/types/packages/container/container-mp4/ContainerMp4.package.d.ts +1 -1
- package/types/packages/container/container-ts/ContainerTs.package.d.ts +1 -1
- package/types/packages/container/ts-transmuxer/TsTransmuxer.package.d.ts +1 -1
- package/types/packages/core/Constants.d.ts +5 -0
- package/types/packages/core/Core.package.d.ts +1 -1
- package/types/packages/core/Types.d.ts +4 -2
- package/types/packages/core/state/selection-group/SelectionGroupTypeGuards.d.ts +1 -0
- package/types/packages/core/state/track/TrackAtom.d.ts +7 -1
- package/types/packages/core/state/track/TrackTypeGuards.d.ts +1 -0
- package/types/packages/core/utils/StateUtils.d.ts +5 -2
- package/types/packages/core/utils/TypedArrayHelper.d.ts +2 -0
- package/types/packages/data/Data.package.d.ts +1 -1
- package/types/packages/event-bus/EventBus.package.d.ts +1 -1
- package/types/packages/manifest/dash/parsing/DashParsing.package.d.ts +1 -1
- package/types/packages/manifest/dash/root/Dash.package.d.ts +1 -1
- package/types/packages/manifest/dash/translation/DashTranslation.package.d.ts +1 -1
- package/types/packages/manifest/hls/parsing/HlsParsing.package.d.ts +1 -1
- package/types/packages/manifest/hls/root/Hls.package.d.ts +1 -1
- package/types/packages/manifest/hls/translation/HlsTranslation.package.d.ts +1 -1
- package/types/packages/network/Network.package.d.ts +1 -1
- package/types/packages/player-api/PlayerApi.package.d.ts +1 -1
- package/types/packages/presentation/Presentation.package.d.ts +1 -1
- package/types/packages/segment-processing/SegmentProcessing.package.d.ts +1 -1
- package/types/packages/source/Source.package.d.ts +1 -1
- package/types/packages/sources-api/SourcesApi.package.d.ts +1 -1
- package/types/packages/subtitles/subtitle-base/SubtitleBase.package.d.ts +4 -0
- package/types/packages/subtitles/subtitle-base/SubtitleCueAtom.d.ts +19 -0
- package/types/packages/subtitles/subtitle-base/SubtitleCueMapAtom.d.ts +6 -0
- package/types/packages/subtitles/subtitle-base/Types.d.ts +21 -0
- package/types/packages/subtitles/subtitle-format-detection/SubtitleFormatDetection.package.d.ts +3 -0
- package/types/packages/subtitles/subtitle-format-detection/Types.d.ts +20 -0
- package/types/packages/trick-play/TrickPlay.package.d.ts +1 -1
- package/types/packages/tv/Tv.package.d.ts +1 -1
- package/types/packages/v8-compat/BitmovinUi.package.d.ts +1 -1
- package/types/packages/v8-compat/BitmovinV8Core.package.d.ts +1 -1
- package/types/packages/v8-compat/BitmovinV8StaticApi.package.d.ts +1 -1
- package/types/packages/v8-compat/source-api/BitmovinSourceApi.package.d.ts +1 -1
- package/types/packages/v8-compat/video-element/BitmovinVideoElementUtils.package.d.ts +1 -1
- package/types/packages/view-mode/ViewMode.package.d.ts +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*******************************************************************************
|
|
2
|
+
* This source code is the proprietary property of Bitmovin, Inc. Unauthorized
|
|
3
|
+
* copying, distribution, or use of this code, or any portion thereof, is
|
|
4
|
+
* strictly prohibited. © 2024 Bitmovin, Inc. All rights reserved. This
|
|
5
|
+
* source code is subject to the terms and conditions of the accompanying
|
|
6
|
+
* license agreement.
|
|
7
|
+
*
|
|
8
|
+
* Bitmovin Player X Version 10.1.2
|
|
9
|
+
*******************************************************************************/
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.analytics=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.playerx=e.bitmovin.playerx||{},e.bitmovin.playerx.analytics=t())}(self,(()=>(()=>{var e={6567:e=>{!function(t,n){e.exports=n()}(self,(function(){return function(){var e={9173:function(e){
|
|
11
|
+
/*******************************************************************************
|
|
12
|
+
* This source code is the proprietary property of Bitmovin, Inc. Unauthorized
|
|
13
|
+
* copying, distribution, or use of this code, or any portion thereof, is
|
|
14
|
+
* strictly prohibited. © 2024 Bitmovin, Inc. All rights reserved. This
|
|
15
|
+
* source code is subject to the terms and conditions of the accompanying
|
|
16
|
+
* license agreement.
|
|
17
|
+
*
|
|
18
|
+
* Bitmovin Player X Version 10.1.1
|
|
19
|
+
*******************************************************************************/
|
|
20
|
+
self,e.exports=(()=>{"use strict";var e={281:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createEffectFactory=void 0;const n=e=>e;t.createEffectFactory=n},85:(e,t)=>{function n(e,t,n){const i=t;return i._name=e,{onAdd:i,dependencies:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.createPackage=void 0,t.createPackage=n},270:(e,t)=>{function n(e,t){const n=t;return n._name=e,n}function i(e){return(...t)=>{const[i,r]=e(...t);return n(i,r)}}function r(e){var t;return null!==(t=e._name)&&void 0!==t?t:e.name}Object.defineProperty(t,"__esModule",{value:!0}),t.getTaskName=t.createTaskClosure=t.createTask=void 0,t.createTask=n,t.createTaskClosure=i,t.getTaskName=r}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}var i={};return(()=>{var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.createTaskClosure=e.createTask=e.createPackage=e.createEffectFactory=void 0;var t=n(281);Object.defineProperty(e,"createEffectFactory",{enumerable:!0,get:function(){return t.createEffectFactory}});var r=n(85);Object.defineProperty(e,"createPackage",{enumerable:!0,get:function(){return r.createPackage}});var a=n(270);Object.defineProperty(e,"createTask",{enumerable:!0,get:function(){return a.createTask}}),Object.defineProperty(e,"createTaskClosure",{enumerable:!0,get:function(){return a.createTaskClosure}})})(),i})()},2595:function(e,t){var n;n={VERSION:"2.4.0",Result:{SUCCEEDED:1,NOTRANSITION:2,CANCELLED:3,PENDING:4},Error:{INVALID_TRANSITION:100,PENDING_TRANSITION:200,INVALID_CALLBACK:300},WILDCARD:"*",ASYNC:"async",create:function(e,t){var i="string"==typeof e.initial?{state:e.initial}:e.initial,r=e.terminal||e.final,a=t||e.target||{},o=e.events||[],s=e.callbacks||{},c={},l={},u=function(e){var t=Array.isArray(e.from)?e.from:e.from?[e.from]:[n.WILDCARD];c[e.name]=c[e.name]||{};for(var i=0;i<t.length;i++)l[t[i]]=l[t[i]]||[],l[t[i]].push(e.name),c[e.name][t[i]]=e.to||t[i];e.to&&(l[e.to]=l[e.to]||[])};i&&(i.event=i.event||"startup",u({name:i.event,from:"none",to:i.state}));for(var d=0;d<o.length;d++)u(o[d]);for(var E in c)c.hasOwnProperty(E)&&(a[E]=n.buildEvent(E,c[E]));for(var E in s)s.hasOwnProperty(E)&&(a[E]=s[E]);return a.current="none",a.is=function(e){return Array.isArray(e)?e.indexOf(this.current)>=0:this.current===e},a.can=function(e){return!this.transition&&void 0!==c[e]&&(c[e].hasOwnProperty(this.current)||c[e].hasOwnProperty(n.WILDCARD))},a.cannot=function(e){return!this.can(e)},a.transitions=function(){return(l[this.current]||[]).concat(l[n.WILDCARD]||[])},a.isFinished=function(){return this.is(r)},a.error=e.error||function(e,t,n,i,r,a,o){throw o||a},a.states=function(){return Object.keys(l).sort()},i&&!i.defer&&a[i.event](),a},doCallback:function(e,t,i,r,a,o){if(t)try{return t.apply(e,[i,r,a].concat(o))}catch(t){return e.error(i,r,a,o,n.Error.INVALID_CALLBACK,"an exception occurred in a caller-provided callback function",t)}},beforeAnyEvent:function(e,t,i,r,a){return n.doCallback(e,e.onbeforeevent,t,i,r,a)},afterAnyEvent:function(e,t,i,r,a){return n.doCallback(e,e.onafterevent||e.onevent,t,i,r,a)},leaveAnyState:function(e,t,i,r,a){return n.doCallback(e,e.onleavestate,t,i,r,a)},enterAnyState:function(e,t,i,r,a){return n.doCallback(e,e.onenterstate||e.onstate,t,i,r,a)},changeState:function(e,t,i,r,a){return n.doCallback(e,e.onchangestate,t,i,r,a)},beforeThisEvent:function(e,t,i,r,a){return n.doCallback(e,e["onbefore"+t],t,i,r,a)},afterThisEvent:function(e,t,i,r,a){return n.doCallback(e,e["onafter"+t]||e["on"+t],t,i,r,a)},leaveThisState:function(e,t,i,r,a){return n.doCallback(e,e["onleave"+i],t,i,r,a)},enterThisState:function(e,t,i,r,a){return n.doCallback(e,e["onenter"+r]||e["on"+r],t,i,r,a)},beforeEvent:function(e,t,i,r,a){if(!1===n.beforeThisEvent(e,t,i,r,a)||!1===n.beforeAnyEvent(e,t,i,r,a))return!1},afterEvent:function(e,t,i,r,a){n.afterThisEvent(e,t,i,r,a),n.afterAnyEvent(e,t,i,r,a)},leaveState:function(e,t,i,r,a){var o=n.leaveThisState(e,t,i,r,a),s=n.leaveAnyState(e,t,i,r,a);return!1!==o&&!1!==s&&(n.ASYNC===o||n.ASYNC===s?n.ASYNC:void 0)},enterState:function(e,t,i,r,a){n.enterThisState(e,t,i,r,a),n.enterAnyState(e,t,i,r,a)},buildEvent:function(e,t){return function(){var i=this.current,r=t[i]||(t[n.WILDCARD]!=n.WILDCARD?t[n.WILDCARD]:i)||i,a=Array.prototype.slice.call(arguments);if(this.transition)return this.error(e,i,r,a,n.Error.PENDING_TRANSITION,"event "+e+" inappropriate because previous transition did not complete");if(this.cannot(e))return this.error(e,i,r,a,n.Error.INVALID_TRANSITION,"event "+e+" inappropriate in current state "+this.current);if(!1===n.beforeEvent(this,e,i,r,a))return n.Result.CANCELLED;if(i===r)return n.afterEvent(this,e,i,r,a),n.Result.NOTRANSITION;var o=this;this.transition=function(){return o.transition=null,o.current=r,n.enterState(o,e,i,r,a),n.changeState(o,e,i,r,a),n.afterEvent(o,e,i,r,a),n.Result.SUCCEEDED},this.transition.cancel=function(){o.transition=null,n.afterEvent(o,e,i,r,a)};var s=n.leaveState(this,e,i,r,a);return!1===s?(this.transition=null,n.Result.CANCELLED):n.ASYNC===s?n.Result.PENDING:this.transition?this.transition():void 0}}},e.exports&&(t=e.exports=n),t.StateMachine=n},6856:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="v2.37.0"},9102:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Adapter=void 0;var i=n(1916),r=function(){function e(){}return e.prototype.getCurrentImpressionId=function(){if(this.guardAgainstNotInitializedAnalytics())return this.analytics.getCurrentImpressionId()},e.prototype.getUserId=function(){if(this.guardAgainstNotInitializedAnalytics())return this.analytics.getUserId()},e.prototype.setCustomData=function(e){this.guardAgainstNotInitializedAnalytics()&&this.internalAdapter.setCustomData(e)},e.prototype.setCustomDataOnce=function(e){this.guardAgainstNotInitializedAnalytics()&&this.analytics.setCustomDataOnce(e)},e.prototype.sourceChange=function(e){this.guardAgainstNotInitializedAnalytics()&&this.analytics.sourceChange(e)},e.prototype.hasPlayerAlreadyBeenAugmented=function(e){return e.__bitmovinAnalyticsHasBeenSetup},e.prototype.markPlayerInstanceAsAugmented=function(e){e.__bitmovinAnalyticsHasBeenSetup=!0},e.prototype.guardAgainstNotInitializedAnalytics=function(){return!!this.analytics||(i.logger.log("Bitmovin Analytics: Adapter hasn't been initialized yet"),!1)},e}();t.Adapter=r},3703:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSAdapter=void 0;var a=n(4350),o=n(1916),s=n(9102),c=n(9876),l=n(2857),u=function(e){function t(t,n,i){var r=e.call(this)||this;if(r.hasPlayerAlreadyBeenAugmented(n))return o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),r;var s=new l.SourceUrlProvider;return r.markPlayerInstanceAsAugmented(n),r.internalAdapter=new c.AmazonIVSInternalAdapter(n,s,i),r.analytics=a.Analytics.create(t,r.internalAdapter),r.wrapPlayerLoad(n,s),r}return r(t,e),t.prototype.wrapPlayerLoad=function(e,t){var n=e.load;e.load=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];return t.m3u8Url=i[0],n.apply(e,i)}},t}(s.Adapter);t.AmazonIVSAdapter=u},9876:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSInternalAdapter=void 0;var o=n(5611),s=n(8470),c=n(556),l=n(8525),u=n(7224),d=n(3413),E=n(5063),p=n(8510),h=n(2647),v=n(5440),f=n(2751),A=n(9653),m=n(9027),y=function(e){function t(t,n,i){var r=e.call(this,i)||this;r.player=t,r.sourceUrlProvider=n,r.supportsDeferredLicenseLoading=!1,r.getPlayerVersion=function(){return r.player.getVersion()},r.getPlayerName=function(){return c.Player.AMAZON_IVS},r.getPlayerTech=function(){return"html5"},r.getAutoPlay=function(){return r.player.isAutoplay()},r.getDrmPerformanceInfo=function(){};var a=new v.AmazonIVSPlayerContext(t),l=new s.HeartbeatService(59700,a),u=new o.AmazonIVSStateMachine(r.stateMachineCallbacks,l,r.opts);return l.setListener(u),r.stateMachine=u,r.listener=f.AmazonIVSPlayerEventListener.create(r,a,r.qualityChangeService),r.playerStatisticsProvider=new p.default(t.getHTMLVideoElement()),r.windowEventListener=new m.WindowEventListener(r.windowEventTracker,r,a),r}return r(t,e),t.prototype.initialize=function(e){var t=this;return this.listener.startMonitoring(this.player),this.windowEventListener.startMonitoring(),A.default.RELEASE.subscribe((function(){t.release()})),[]},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.player.getPosition()},enumerable:!1,configurable:!0}),t.prototype.resetSourceRelatedState=function(){this.drmPerformanceInfo=void 0,this.playerStatisticsProvider.reset()},t.prototype.getCurrentPlaybackInfo=function(){var e=this.player.getHTMLVideoElement();return a(a(a({droppedFrames:this.playerStatisticsProvider.getDroppedFrames(),isLive:this.player.getDuration()===1/0,isMuted:this.player.isMuted(),playerTech:this.getPlayerTech(),videoWindowWidth:e.clientWidth,videoWindowHeight:e.clientHeight,videoPlaybackHeight:e.videoHeight,videoPlaybackWidth:e.videoWidth,videoBitrate:this.player.getQuality().bitrate,videoDuration:(0,d.normalizeVideoDuration)(this.player.getDuration()),size:E.isVideoInFullscreen()?l.PlayerSize.Fullscreen:l.PlayerSize.Window},this.getVideoAndAudioCodecs()),this.getCommonPlaybackInfo()),{streamFormat:u.StreamTypes.hls,m3u8Url:this.sourceUrlProvider.m3u8Url})},t.prototype.sourceChange=function(e){throw new Error("Method not implemented.")},t.prototype.getVideoAndAudioCodecs=function(){var e=this.player.getQuality().codecs.split(",");return 2==e.length?{videoCodec:e[0],audioCodec:e[1]}:{}},t}(h.InternalAdapter);t.AmazonIVSInternalAdapter=y},3037:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorService=void 0;var i=n(2361),r=function(){function e(e,t){this.dispatcher=e,this.playerContext=t}return e.prototype.onError=function(e){var t={currentTime:this.playerContext.position,code:e.code,message:e.message,data:{exceptionMessage:e.message,exceptionStacktrace:[e.source]}};this.dispatcher.eventCallback(i.Event.ERROR,t)},e}();t.ErrorService=r},3003:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PauseEventDispatcher=void 0;var i,r=n(2361);!function(e){e[e.IDLE=0]="IDLE",e[e.PAUSE_SCHEDULED=1]="PAUSE_SCHEDULED",e[e.PAUSE_CANCELLED=2]="PAUSE_CANCELLED"}(i||(i={}));var a=function(){function e(e,t){this.dispatcher=e,this.playerContext=t,this.EVENT_DELAY_MS=10,this.state=i.IDLE}return e.prototype.cancelPause=function(){this.state==i.PAUSE_SCHEDULED&&(this.state=i.PAUSE_CANCELLED)},e.prototype.schedulePauseEvent=function(){var e=this;if(this.state!=i.PAUSE_SCHEDULED){this.state=i.PAUSE_SCHEDULED;var t={currentTime:this.playerContext.position};setTimeout((function(){e.triggerPause(t),e.state=i.IDLE}),this.EVENT_DELAY_MS,this)}},e.prototype.triggerPause=function(e){this.state!=i.PAUSE_CANCELLED&&this.dispatcher.eventCallback(r.Event.PAUSE,e)},e}();t.PauseEventDispatcher=a},9810:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackService=void 0;var i=n(2361),r=n(3003),a=function(){function e(e,t,n,i){this.dispatcher=e,this.playerContext=t,this.pauseDispatcher=n,this.qualityChangeService=i,this.ignorePause=!1}return e.prototype.onStartupPlaying=function(){var e=this;this.ignorePause=!0,setTimeout((function(){e.ignorePause=!1}),100)},e.prototype.onPause=function(){this.ignorePause||this.pauseDispatcher.schedulePauseEvent()},e.prototype.onPlaying=function(){this.pauseDispatcher.cancelPause(),this.playing()},e.prototype.onRebuffering=function(){this.pauseDispatcher.cancelPause(),this.startBuffering()},e.prototype.onQualityChange=function(e){this.qualityChange(e)},e.prototype.onSeek=function(){this.seek()},e.prototype.onSeeked=function(){this.seeked()},e.prototype.startBuffering=function(){var e=this.playerContext.position;this.dispatcher.eventCallback(i.Event.START_BUFFERING,{currentTime:e})},e.prototype.playing=function(){var e=this.playerContext.position;this.dispatcher.eventCallback(i.Event.PLAYING,{currentTime:e})},e.prototype.qualityChange=function(e){if(this.qualityChangeService.shouldAllowVideoQualityChange(e.bitrate)){this.qualityChangeService.setVideoBitrate(e.bitrate);var t=this.playerContext.position;this.dispatcher.eventCallback(i.Event.VIDEO_CHANGE,{currentTime:t})}else this.qualityChangeService.setVideoBitrate(e.bitrate)},e.prototype.seek=function(){if(!this.playerContext.isLive){this.pauseDispatcher.cancelPause();var e=this.playerContext.position;this.dispatcher.eventCallback(i.Event.SEEK,{currentTime:e})}},e.prototype.seeked=function(){if(!this.playerContext.isLive){this.pauseDispatcher.cancelPause();var e=this.playerContext.position;this.dispatcher.eventCallback(i.Event.SEEKED,{currentTime:e})}},e.create=function(t,n,i){return new e(t,n,new r.PauseEventDispatcher(t,n),i)},e}();t.PlaybackService=a},4025:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStartupService=void 0;var i,r=n(2361);!function(e){e[e.SETUP=0]="SETUP",e[e.IDLE=1]="IDLE",e[e.STARTUP=2]="STARTUP",e[e.STARTUP_FINISHED=3]="STARTUP_FINISHED"}(i||(i={}));var a=function(){function e(e,t,n){this.dispatcher=e,this.playerContext=t,this.qualityChangeService=n,this.state=i.SETUP}return Object.defineProperty(e.prototype,"finishedStartup",{get:function(){return this.state==i.STARTUP_FINISHED},enumerable:!1,configurable:!0}),e.prototype.onInitialized=function(){this.finishSetup()},e.prototype.onPlay=function(){this.startStartup()},e.prototype.onPlaying=function(){this.finishStartup()},e.prototype.finishSetup=function(){this.state=i.IDLE;var e=this.playerContext.position;this.dispatcher.eventCallback(r.Event.READY,{currentTime:e})},e.prototype.startStartup=function(){if(this.state==i.IDLE){this.state=i.STARTUP;var e=this.playerContext.position;this.dispatcher.eventCallback(r.Event.PLAY,{currentTime:e})}},e.prototype.finishStartup=function(){if(this.state==i.STARTUP){this.state=i.STARTUP_FINISHED;var e=this.playerContext.position;this.dispatcher.eventCallback(r.Event.PLAYING,{currentTime:e}),this.qualityChangeService.resetValues(),this.qualityChangeService.setStartupHasFinished()}},e}();t.VideoStartupService=a},5440:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSPlayerContext=void 0;var n=function(){function e(e){this.player=e}return Object.defineProperty(e.prototype,"position",{get:function(){return this.player.getPosition()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLive",{get:function(){return this.player.getDuration()===1/0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentQuality",{get:function(){return this.player.getQuality()},enumerable:!1,configurable:!0}),e}();t.AmazonIVSPlayerContext=n},2235:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSPlayerEventHandler=void 0;var i=n(1916),r=n(3037),a=n(9810),o=n(4025),s=function(){function e(e,t,n){this.videoStartupService=e,this.playbackService=t,this.errorService=n}return e.prototype.onRebuffering=function(){i.logger.log("onRebuffering"),this.playbackService.onRebuffering()},e.prototype.onDurationChanged=function(e){i.logger.log("onDurationChanged: "+e)},e.prototype.onError=function(e){i.logger.log("onError: "+e),this.errorService.onError(e)},e.prototype.onInitialized=function(){i.logger.log("onInitialized"),this.videoStartupService.finishedStartup||this.videoStartupService.onInitialized()},e.prototype.onQualityChanged=function(e){i.logger.log("onQualityChanged: "+JSON.stringify(e)),this.playbackService.onQualityChange(e)},e.prototype.onTimeUpdate=function(e){i.logger.log("onTimeUpdate: "+e)},e.prototype.onPlay=function(e){this.videoStartupService.finishedStartup?i.logger.log("onPlay:",e):this.videoStartupService.onPlay()},e.prototype.onPause=function(e){this.videoStartupService.finishedStartup&&(i.logger.log("onPause:",e),this.playbackService.onPause())},e.prototype.onPlaying=function(e){i.logger.log("onPlaying:",e),this.videoStartupService.finishedStartup?this.playbackService.onPlaying():(this.videoStartupService.onPlaying(),this.playbackService.onStartupPlaying())},e.prototype.onSeek=function(){this.videoStartupService.finishedStartup&&this.playbackService.onSeek()},e.prototype.onSeeked=function(){this.videoStartupService.finishedStartup&&this.playbackService.onSeeked()},e.create=function(t,n,i){return new e(new o.VideoStartupService(t,n,i),a.PlaybackService.create(t,n,i),new r.ErrorService(t,n))},e}();t.AmazonIVSPlayerEventHandler=s},2751:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSPlayerEventListener=t.IVS_PLAYER_EVENT=void 0;var i=n(2235);t.IVS_PLAYER_EVENT={DURATION_CHANGED:"PlayerDurationChanged",ERROR:"PlayerError",INITIALIZED:"PlayerInitialized",QUALITY_CHANGED:"PlayerQualityChanged",REBUFFERING:"PlayerRebuffering",SEEK_COMPLETED:"PlayerSeekCompleted",TIME_UPDATE:"PlayerTimeUpdate",PLAYBACK_RATE_CHANGED:"PlayerPlaybackRateChanged",PLAYBACK_BLOCKED:"PlayerPlaybackBlocked"};var r=function(){function e(e){this.eventHandler=e}return e.prototype.startMonitoring=function(e){this.startMonitoringIVSPlayer(e),this.startMonitoringHTMLVideoElement(e.getHTMLVideoElement())},e.prototype.startMonitoringHTMLVideoElement=function(e){e.addEventListener("play",this.eventHandler.onPlay.bind(this.eventHandler)),e.addEventListener("playing",this.eventHandler.onPlaying.bind(this.eventHandler)),e.addEventListener("pause",this.eventHandler.onPause.bind(this.eventHandler)),e.addEventListener("seeking",this.eventHandler.onSeek.bind(this.eventHandler)),e.addEventListener("seeked",this.eventHandler.onSeeked.bind(this.eventHandler))},e.prototype.startMonitoringIVSPlayer=function(e){e.addEventListener(t.IVS_PLAYER_EVENT.REBUFFERING,this.eventHandler.onRebuffering.bind(this.eventHandler)),e.addEventListener(t.IVS_PLAYER_EVENT.DURATION_CHANGED,this.eventHandler.onDurationChanged.bind(this.eventHandler)),e.addEventListener(t.IVS_PLAYER_EVENT.ERROR,this.eventHandler.onError.bind(this.eventHandler)),e.addEventListener(t.IVS_PLAYER_EVENT.INITIALIZED,this.eventHandler.onInitialized.bind(this.eventHandler)),e.addEventListener(t.IVS_PLAYER_EVENT.QUALITY_CHANGED,this.eventHandler.onQualityChanged.bind(this.eventHandler)),e.addEventListener(t.IVS_PLAYER_EVENT.TIME_UPDATE,this.eventHandler.onTimeUpdate.bind(this.eventHandler))},e.create=function(t,n,r){return new e(i.AmazonIVSPlayerEventHandler.create(t,n,r))},e}();t.AmazonIVSPlayerEventListener=r},2857:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceUrlProvider=void 0;var n=function(){};t.SourceUrlProvider=n},9653:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i="RELEASE",r=function(){function e(){var e;this.observer=((e={})[i]=[],e)}return e.prototype.subscribe=function(e,t){this.observer[e].push(t)},e.prototype.trigger=function(e){this.observer[e].forEach((function(e){e()}))},e}(),a=new r,o={RELEASE:(n=i,{subscribe:function(e){a.subscribe(n,e)},trigger:function(){a.trigger(n)}})};t.default=o},9027:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowEventListener=void 0;var i,r=n(2361),a=n(9653);!function(e){e[e.IDLE=0]="IDLE",e[e.UNLOADED=1]="UNLOADED"}(i||(i={}));var o=function(){function e(e,t,n){var o=this;this.windowEventTracker=e,this.dispatcher=t,this.playerContext=n,this.state=i.IDLE,this.onPageUnload=function(){o.state==i.IDLE&&(o.dispatcher.eventCallback(r.Event.UNLOAD,{currentTime:o.playerContext.position}),o.state=i.UNLOADED,a.default.RELEASE.trigger())}}return e.prototype.startMonitoring=function(){this.windowEventTracker.addEventListener("beforeunload",this.onPageUnload),this.windowEventTracker.addEventListener("unload",this.onPageUnload)},e}();t.WindowEventListener=o},887:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AdModule=void 0;var i=n(5517),r=function(){function e(e,t){var n=this;this.player=e,this.windowEventTracker=t,this.adCallbacks=new i.AdCallbacks,this.isLinearAdActive=function(){return n.player.ads&&n.player.ads.isLinearAdActive()||!1},this.getContainer=function(){return n.player.getContainer()},this.getAdModuleInfo=function(){return n.player.ads?n.player.ads.getModuleInfo():{name:void 0,version:void 0}},this.currentTime=function(){return n.player.getCurrentTime()},this.register()}return e.prototype.register=function(){var e=this;this.player.on(this.player.exports.PlayerEvent.Play,(function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPlay(t.issuer)})),this.player.on(this.player.exports.PlayerEvent.Paused,(function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPause(t.issuer)})),this.player.on(this.player.exports.PlayerEvent.AdStarted,(function(t){e.adCallbacks.onAdStarted(t)})),this.player.on(this.player.exports.PlayerEvent.AdFinished,(function(t){e.adCallbacks.onAdFinished(t)})),this.player.on(this.player.exports.PlayerEvent.AdBreakStarted,(function(t){e.adCallbacks.onAdBreakStarted(t)})),this.player.on(this.player.exports.PlayerEvent.AdBreakFinished,(function(t){e.adCallbacks.onAdBreakFinished(t)})),this.player.on(this.player.exports.PlayerEvent.AdClicked,(function(t){e.adCallbacks.onAdClicked(t)})),this.player.on(this.player.exports.PlayerEvent.AdQuartile,(function(t){e.adCallbacks.onAdQuartile(t)})),this.player.on(this.player.exports.PlayerEvent.AdSkipped,(function(t){e.adCallbacks.onAdSkipped(t)})),this.player.on(this.player.exports.PlayerEvent.AdError,(function(t){e.adCallbacks.onAdError(t)})),this.player.on(this.player.exports.PlayerEvent.AdManifestLoaded,(function(t){e.adCallbacks.onAdManifestLoaded(t)}));var t=function(){e.adCallbacks.onBeforeUnload()};this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},e}();t.Bitmovin8AdModule=r},4679:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8Adapter=void 0;var a=n(4350),o=n(1916),s=n(9102),c=n(6596),l=n(2417),u=function(e){function t(t,n){var i=e.call(this)||this;if(i.ssai={adBreakStart:function(e){i.internalAdapter.adBreakStart(e)},adStart:function(e){i.internalAdapter.adStart(e),i.analytics.setConfigParameters()},adBreakEnd:function(){i.internalAdapter.adBreakEnd(),i.analytics.setConfigParameters()}},i.hasPlayerAlreadyBeenAugmented(t))return o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),i;i.markPlayerInstanceAsAugmented(t);var r=t.getConfig(),s=r.analytics;void 0===s&&(s={}),s.playerKey=s.playerKey||r.key;var u=new l.SsaiService(t);return i.internalAdapter=c.Bitmovin8InternalAdapter.create(t,u,n),i.analytics=a.Analytics.create(s,i.internalAdapter,u),t.analytics=i,i.wrapPlayerLoad(t,i.analytics),i}return r(t,e),t.prototype.wrapPlayerLoad=function(e,t){var n=e.load;e.load=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];if(i.length>0){var a=i[0].analytics;t.sourceChange(a)}return n.apply(e,i)}},t}(s.Adapter);t.Bitmovin8Adapter=u},6596:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8InternalAdapter=void 0;var o,s=n(2938),c=n(9664),l=n(6235),u=n(4916),d=n(6743),E=n(5878),p=n(3458),h=n(2361),v=n(556),f=n(8525),A=n(7614),m=n(9557),y=n(7881),T=n(3413),S=n(5248),I=n(1916),g=n(4649),_=n(2647),C=n(887),N=n(7543),P=n(8676),b=n(665);!function(e){e.Inline="inline",e.Fullscreen="fullscreen",e.PictureInPicture="pictureinpicture"}(o||(o={}));var R=function(e){function t(t,n,i,r,a,o,c,l){var u=e.call(this,l)||this;return u.player=t,u.speedMeter=n,u.segmentTracker=i,u.videoCompletionTracker=r,u.httpRequestTrackingAdapter=a,u.ssaiService=c,u.onBeforeUnLoadEvent=!1,u.getPlayerVersion=function(){return u.player.version},u.getPlayerName=function(){return v.Player.BITMOVIN},u.getPlayerTech=function(){return u.player.getPlayerType()},u.getDrmPerformanceInfo=function(){return u.drmPerformanceInfo},u.stateMachine=new s.Bitmovin8AnalyticsStateMachine(u.stateMachineCallbacks,u.opts),u.sourceInfoFallbackService=o,c.eventHandler=u.stateMachine,u}return r(t,e),Object.defineProperty(t.prototype,"downloadSpeedInfo",{get:function(){return this.speedMeter.getInfo()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"segments",{get:function(){return this.segmentTracker.getSegments()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"adModule",{get:function(){return this._adModule},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsDeferredLicenseLoading",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){try{if(null!==this.player&&null!==this.player.getCurrentTime&&!this.isAdPlaying)return this.player.getCurrentTime()}catch(e){I.logger.warn("Analytics Collector attempted to access player, but player is not available anymore")}return this.lastTrackedCurrentTime?this.lastTrackedCurrentTime:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAdPlaying",{get:function(){return null!=(this.player.ads&&this.player.ads.getActiveAd())},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){this.registerPlayerEventListeners(),this.registerUnloadEventListeners(),this._adModule=new C.Bitmovin8AdModule(this.player,this.windowEventTracker);var t=new y.HttpRequestTracking([this.httpRequestTrackingAdapter]);return[new m.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new A.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],t)]},t.prototype.clearValues=function(){this.speedMeter.reset()},t.prototype.clearSegments=function(){this.segmentTracker.reset()},t.prototype.resetSourceRelatedState=function(){this.ssaiService.resetSourceRelatedState(),e.prototype.resetSourceRelatedState.call(this)},t.prototype.getAutoPlay=function(){return this.player.getConfig().playback&&this.player.getConfig().playback.autoplay||!1},t.prototype.getCurrentPlaybackInfo=function(){var t,n=a(a({},e.prototype.getCommonPlaybackInfo.call(this)),{size:this.player.getViewMode()===o.Fullscreen?f.PlayerSize.Fullscreen:f.PlayerSize.Window,playerTech:this.getPlayerTech(),isLive:this.player.isLive(),videoDuration:(0,T.normalizeVideoDuration)(this.videoDuration),streamFormat:this.player.getStreamType(),videoWindowWidth:this.player.getContainer().offsetWidth,videoWindowHeight:this.player.getContainer().offsetHeight,isMuted:this.player.isMuted(),isCasting:this.player.isCasting(),audioLanguage:null!=this.player.getAudio()?null===(t=this.player.getAudio())||void 0===t?void 0:t.lang:void 0,subtitleEnabled:!1,droppedFrames:null!=this.player.getSource()?this.player.getDroppedVideoFrames():0});return this.applySubtitleProperties(n),this.applyPlaybackQualityProperties(n),this.applyCastingProperties(n),this.applySourceProperties(n),null!=n.streamFormat&&"unknown"!==n.streamFormat||this.sourceInfoFallbackService.applyStreamFormat(n),n},t.prototype.sourceChange=function(e){this.stateMachine.callManualSourceChangeEvent(e,this.currentTime)},t.prototype.onError=function(){this.clearSegments()},t.prototype.adBreakStart=function(e){this.ssaiService.adBreakStart(e)},t.prototype.adStart=function(e){this.ssaiService.adStart(e)},t.prototype.adBreakEnd=function(){this.ssaiService.adBreakEnd()},t.prototype.registerPlayerEventListeners=function(){var e=this;this.player.on(this.player.exports.PlayerEvent.SourceUnloaded,(function(t){e.segmentTracker.reset(),e.eventCallback(h.Event.SOURCE_UNLOADED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.SourceLoaded,(function(t){e.videoCompletionTracker.reset(),e.videoDuration=e.player.getDuration(),e.videoCompletionTracker.setVideoDuration(e.player.getDuration()),e.sourceInfoFallbackService.setStreamFormat(e.player.getStreamType()),e.eventCallback(h.Event.SOURCE_LOADED,{})})),this.player.on(this.player.exports.PlayerEvent.CastStarted,(function(t){e.eventCallback(h.Event.START_CAST,t)})),this.player.on(this.player.exports.PlayerEvent.CastStopped,(function(){e.eventCallback(h.Event.END_CAST,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Play,(function(t){"ui-seek"!==t.issuer&&e.eventCallback(h.Event.PLAY,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Playing,(function(t){"advertising-api"!==t.issuer&&e.eventCallback(h.Event.PLAYING,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Paused,(function(t){"ui-seek"!==t.issuer&&e.eventCallback(h.Event.PAUSE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.TimeChanged,(function(t){e.isAdPlaying||(e.lastTrackedCurrentTime=e.player.getCurrentTime()),e.eventCallback(h.Event.TIMECHANGED,{currentTime:e.lastTrackedCurrentTime})})),this.player.on(this.player.exports.PlayerEvent.Seek,(function(t){e.allowSeeking(t)&&e.eventCallback(h.Event.SEEK,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Seeked,(function(){e.eventCallback(h.Event.SEEKED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.StallStarted,(function(){e.eventCallback(h.Event.START_BUFFERING,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.StallEnded,(function(){e.eventCallback(h.Event.END_BUFFERING,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AudioPlaybackQualityChanged,(function(t){var n=t,i=n.sourceQuality,r=n.targetQuality;null!=r&&(null!=i?(e.qualityChangeService.shouldAllowAudioQualityChange(r.bitrate)&&e.eventCallback(h.Event.AUDIO_CHANGE,{bitrate:r.bitrate,currentTime:e.currentTime,codec:r.codec}),e.qualityChangeService.setAudioBitrate(r.bitrate)):e.qualityChangeService.setAudioBitrate(r.bitrate))})),this.player.on(this.player.exports.PlayerEvent.VideoPlaybackQualityChanged,(function(t){var n=t,i=n.sourceQuality,r=n.targetQuality;null!=r&&(null!=i?(e.qualityChangeService.shouldAllowVideoQualityChange(r.bitrate)&&e.eventCallback(h.Event.VIDEO_CHANGE,{width:r.width,height:r.height,bitrate:r.bitrate,currentTime:e.currentTime,codec:r.codec}),e.qualityChangeService.setVideoBitrate(r.bitrate)):e.qualityChangeService.setVideoBitrate(r.bitrate))})),this.player.on(this.player.exports.PlayerEvent.ViewModeChanged,(function(t){"fullscreen"===t.to?e.eventCallback(h.Event.START_FULLSCREEN,{currentTime:e.currentTime}):"fullscreen"===t.from&&e.eventCallback(h.Event.END_FULLSCREEN,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdStarted,(function(t){e.eventCallback(h.Event.START_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdFinished,(function(t){e.eventCallback(h.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdSkipped,(function(t){e.eventCallback(h.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.AdError,(function(t){e.eventCallback(h.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Muted,(function(){e.eventCallback(h.Event.MUTE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Unmuted,(function(){e.eventCallback(h.Event.UN_MUTE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.Error,(function(t){e.eventCallback(h.Event.ERROR,{code:t.code,message:t.name,legacyData:t.data,currentTime:e.currentTime,data:{additionalData:JSON.stringify(t.data)}}),t.code!==p.ErrorCode.BITMOVIN_PLAYER_LICENSING_ERROR.code&&t.code!==p.ErrorCode.SETUP_MISSING_LICENSE_WHITELIST.code||e._onLicenseCallFailed.dispatch({})})),this.player.on(this.player.exports.PlayerEvent.PlaybackFinished,(function(){e.eventCallback(h.Event.END,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.DownloadFinished,(function(t){0===t.downloadType.indexOf("drm/license/")&&(e.drmPerformanceInfo={drmType:t.downloadType.replace("drm/license/",""),drmLoadTime:1e3*t.downloadTime})})),this.player.on(this.player.exports.PlayerEvent.AudioChanged,(function(t){e.eventCallback(h.Event.AUDIOTRACK_CHANGED,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.SubtitleEnabled,(function(t){e.eventCallback(h.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.SubtitleDisabled,(function(t){e.eventCallback(h.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})})),this.player.on(this.player.exports.PlayerEvent.LicenseValidated,(function(t){t.data.analytics&&void 0!==t.data.analytics.key?e._onLicenseKeyReceived.dispatch({licenseKey:t.data.analytics.key}):e._onLicenseCallFailed.dispatch({})}))},t.prototype.registerUnloadEventListeners=function(){var e=this,t=function(){if(!e.onBeforeUnLoadEvent){e.onBeforeUnLoadEvent=!0;var t=e.lastTrackedCurrentTime;e.eventCallback(h.Event.UNLOAD,{currentTime:t})}e.release()};t=t.bind(!0),this.player.on(this.player.exports.PlayerEvent.Destroy,t),this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},t.prototype.applySourceProperties=function(e){var t=this.player.getSource();if(null!=t){e.videoTitle=t.title,e.mpdUrl=t.dash,e.m3u8Url=t.hls;var n=(0,S.getSourceInfoFromBitmovinSourceConfig)(t.progressive,this.player);e.progUrl=n.progUrl,"progressive"===this.player.getStreamType()&&(e.videoBitrate=n.progBitrate)}},t.prototype.applySubtitleProperties=function(e){var t;this.player.subtitles&&(t=this.player.subtitles.list().find((function(e){return!0===e.enabled}))),e.subtitleEnabled=null!=t,e.subtitleLanguage=null!=t?t.lang:null},t.prototype.applyPlaybackQualityProperties=function(e){var t=this.player.getPlaybackVideoData();null!=t&&(e.videoBitrate=t.bitrate,e.videoPlaybackHeight=t.height,e.videoPlaybackWidth=t.width,e.videoCodec=t.codec);var n=this.player.getPlaybackAudioData();null!=n&&(e.audioBitrate=n.bitrate,e.audioCodec=n.codec)},t.prototype.applyCastingProperties=function(e){var t=this.player.isCasting()||this.player.isAirplayActive()||!1;if(e.isCasting=t,t)if(this.player.isAirplayActive())e.castTech=E.CastTech.AirPlay;else{var n=this.player.getConfig().remotecontrol;if(null!=n)switch(n.type){case"googlecast":e.castTech=E.CastTech.GoogleCast;break;case"websocket":e.castTech=E.CastTech.WebSocket}}},t.prototype.allowSeeking=function(e){var t=e;return Math.abs(t.position-t.seekTarget)>g.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD},t.create=function(e,n,i){var r=new b.SpeedMeterAdapter(e,new c.DownloadSpeedMeter).getDownloadSpeedMeter(),a=new P.SegmentTrackerAdapter(e,new l.SegmentTracker).getSegmentTracker(),o=new N.HttpRequestTrackingAdapter(e);return new t(e,r,a,new d.default,o,new u.SourceInfoFallbackService,n,i)},t}(_.InternalAdapter);t.Bitmovin8InternalAdapter=R},2417:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SsaiService=void 0;var r,a=n(3588),o=n(5529);!function(e){e[e.AD_BREAK_STARTED=0]="AD_BREAK_STARTED",e[e.ACTIVE=1]="ACTIVE",e[e.IDLE=2]="IDLE"}(r||(r={}));var s=function(){function e(e){this.state=r.IDLE,this.adIndex=0,this.isFirstSampleOfAd=!1,this.player=e}return e.prototype.adBreakStart=function(e){this.state==r.IDLE&&(this.state=r.AD_BREAK_STARTED,this.currentAdMetadata=i({},e))},e.prototype.adStart=function(e){var t,n;if(this.state!=r.IDLE){var i=(new Date).getTime();null===(t=this.eventHandler)||void 0===t||t.onSsaiInteraction(i,{currentTime:this.player.getCurrentTime()}),this.state=r.ACTIVE,this.isFirstSampleOfAd=!0;var a=null!=(null==e?void 0:e.customData)?(0,o.extractCustomDataFieldsOnly)(e.customData):void 0;this.currentAdMetadata={adPosition:null===(n=this.currentAdMetadata)||void 0===n?void 0:n.adPosition,adId:null==e?void 0:e.adId,adSystem:null==e?void 0:e.adSystem,customData:a}}},e.prototype.adBreakEnd=function(){var e;if(this.state!=r.IDLE){if(this.state==r.ACTIVE){var t=(new Date).getTime();null===(e=this.eventHandler)||void 0===e||e.onSsaiInteraction(t,{currentTime:this.player.getCurrentTime()})}this.reset()}},e.prototype.reset=function(){this.state=r.IDLE,this.isFirstSampleOfAd=!1,delete this.currentAdMetadata},e.prototype.resetSourceRelatedState=function(){this.reset(),this.adIndex=0},e.prototype.manipulate=function(e){var t,n,i,s;if(this.state==r.ACTIVE){e.ad=a.AD_TYPE.SSAI,e.adId=null===(t=this.currentAdMetadata)||void 0===t?void 0:t.adId,e.adSystem=null===(n=this.currentAdMetadata)||void 0===n?void 0:n.adSystem,e.adPosition=null===(i=this.currentAdMetadata)||void 0===i?void 0:i.adPosition,this.isFirstSampleOfAd&&(e.adIndex=this.adIndex,this.isFirstSampleOfAd=!1,this.adIndex++);var c=null===(s=this.currentAdMetadata)||void 0===s?void 0:s.customData;null!=c&&o.customDataValuesKeys.forEach((function(t){c[t]&&(e[t]=c[t])}))}},e}();t.SsaiService=s},7543:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestTrackingAdapter=void 0;var i=n(675),r=n(7912),a=n(5063),o=function(){function e(e){var t=this;this.eventDispatcher=new i.EventDispatcher,this.playerExports=e.exports,e.on(this.playerExports.PlayerEvent.DownloadFinished,(function(e){return t.onDownloadFinished(e)}))}return e.prototype.subscribe=function(e){return this.eventDispatcher.subscribe(e)},e.prototype.unsubscribe=function(e){this.eventDispatcher.unsubscribe(e)},e.prototype.onDownloadFinished=function(e){var t,n,i;this.eventDispatcher.dispatch({httpRequest:{downloadTime:null!==(t=(0,a.calculateTimeWithUndefined)(null==e?void 0:e.downloadTime))&&void 0!==t?t:0,httpStatus:null!==(n=null==e?void 0:e.httpStatus)&&void 0!==n?n:0,success:null!==(i=null==e?void 0:e.success)&&void 0!==i&&i,timestamp:(0,a.getCurrentTimestamp)(),url:null==e?void 0:e.url,size:null==e?void 0:e.size,timeToFirstByte:(0,a.calculateTimeWithUndefined)(null==e?void 0:e.timeToFirstByte),type:this.mapHttpRequestType(null==e?void 0:e.downloadType)}})},e.prototype.mapHttpRequestType=function(e){switch(e){case this.playerExports.HttpRequestType.MANIFEST_DASH:return r.HttpRequestType.MANIFEST_DASH;case this.playerExports.HttpRequestType.MANIFEST_HLS_MASTER:return r.HttpRequestType.MANIFEST_HLS_MASTER;case this.playerExports.HttpRequestType.MANIFEST_HLS_VARIANT:return r.HttpRequestType.MANIFEST_HLS_VARIANT;case this.playerExports.HttpRequestType.MANIFEST_SMOOTH:return r.HttpRequestType.MANIFEST_SMOOTH;case this.playerExports.HttpRequestType.MANIFEST_ADS:return r.HttpRequestType.MANIFEST_ADS;case this.playerExports.HttpRequestType.MEDIA_AUDIO:return r.HttpRequestType.MEDIA_AUDIO;case this.playerExports.HttpRequestType.MEDIA_VIDEO:return r.HttpRequestType.MEDIA_VIDEO;case this.playerExports.HttpRequestType.MEDIA_SUBTITLES:return r.HttpRequestType.MEDIA_SUBTITLES;case this.playerExports.HttpRequestType.MEDIA_THUMBNAILS:return r.HttpRequestType.MEDIA_THUMBNAILS;case this.playerExports.HttpRequestType.DRM_LICENSE_WIDEVINE:return r.HttpRequestType.DRM_LICENSE_WIDEVINE;case this.playerExports.HttpRequestType.DRM_LICENSE_PLAYREADY:return r.HttpRequestType.DRM_LICENSE_PLAYREADY;case this.playerExports.HttpRequestType.DRM_LICENSE_FAIRPLAY:return r.HttpRequestType.DRM_LICENSE_FAIRPLAY;case this.playerExports.HttpRequestType.DRM_LICENSE_PRIMETIME:return r.HttpRequestType.DRM_LICENSE_PRIMETIME;case this.playerExports.HttpRequestType.DRM_LICENSE_CLEARKEY:return r.HttpRequestType.DRM_LICENSE_CLEARKEY;case this.playerExports.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY:return r.HttpRequestType.DRM_CERTIFICATE_FAIRPLAY;case this.playerExports.HttpRequestType.KEY_HLS_AES:return r.HttpRequestType.KEY_HLS_AES;case this.playerExports.HttpRequestType.TIME_SYNC:return r.HttpRequestType.TIME_SYNC;default:return r.HttpRequestType.UNKNOWN}},e}();t.HttpRequestTrackingAdapter=o},8676:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTrackerAdapter=void 0;var i=n(5063),r=function(){function e(e,t){var n=this;this.handleSegmentPlaybackEvent=function(e){n.segmentTracker.removeSegment(e.url)},this.segmentTracker=t,e.on(e.exports.PlayerEvent.DownloadFinished,(function(e){return n.handleOnDownloadFinishEvent(e)})),e.on(e.exports.PlayerEvent.SegmentPlayback,(function(e){return n.handleSegmentPlaybackEvent(e)}))}return e.prototype.getSegmentTracker=function(){return this.segmentTracker},e.prototype.handleOnDownloadFinishEvent=function(e){if(0===e.downloadType.indexOf("media/video")){var t=e.url,n={name:i.getURLResourceName(t),url:t,timestamp:e.timestamp};this.segmentTracker.addSegment(n)}},e}();t.SegmentTrackerAdapter=r},665:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpeedMeterAdapter=void 0;var n=function(){function e(e,t){var n=this;this.meter=t,e.on(e.exports.PlayerEvent.DownloadFinished,(function(e){return n.handleOnDownloadFinishEvent(e)}))}return e.prototype.getDownloadSpeedMeter=function(){return this.meter},e.prototype.handleOnDownloadFinishEvent=function(e){e.success&&0===e.downloadType.indexOf("media/video")&&this.meter.addMeasurement({duration:e.downloadTime,size:e.size,timeToFirstByte:e.timeToFirstByte,timestamp:new Date,httpStatus:e.httpStatus})},e}();t.SpeedMeterAdapter=n},2767:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BitmovinPwxAdapter=void 0;var a=n(4350),o=n(9102),s=n(28),c=function(e){function t(t,n){var i=e.call(this)||this;return i.internalAdapter=new s.BitmovinPwxInternalAdapter(t),i.analytics=a.Analytics.create(n,i.internalAdapter),i}return r(t,e),t.prototype.dispose=function(){this.internalAdapter.release()},t}(o.Adapter);t.BitmovinPwxAdapter=c},2506:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitmovinPwxAnalyticsPackage=void 0;var i=n(9173),r=n(2767),a=n(7299);t.BitmovinPwxAnalyticsPackage=(0,i.createPackage)("analytics-package",(function(e,t){var n,i,o=t.registry.get(a.CoreExportNames.CoreEffects),s=o.EventListenerEffectFactory,c=o.StateEffectFactory,l=t.using(s,c),u=l.registry.get(a.BundleExportNames.Logger),d=l.registry.get(a.SourceExportNames.SourceState),E=l.registry.get(a.BundleExportNames.PlayerConfig),p=null!==(n=E.analytics)&&void 0!==n?n:{};p.playerKey=null!==(i=p.playerKey)&&void 0!==i?i:E.key,u.log("Applying analytics config ".concat(JSON.stringify(p)));var h=new r.BitmovinPwxAdapter(l,p);u.log('Analytics package initializing for "'.concat(d.url,'"...'));var v=function(){l.abortSignal.removeEventListener("abort",v),u.log('Analytics package disposing for "'.concat(d.url,'"')),h.dispose()};l.abortSignal.addEventListener("abort",v)}),[a.BundleExportNames.Logger,a.BundleExportNames.PlayerConfig,a.CoreExportNames.Constants,a.CoreExportNames.CoreEffects,a.CoreExportNames.CoreStateAtoms,a.SourceExportNames.SourceState,a.SourcesApiExportNames.SourceEventBus,a.PlaybackApiEventsPackageExportNames.PlaybackEvent])},5406:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BitmovinPwxAnalyticsStateMachine=t.State=void 0;var a,o=n(2595),s=n(7596),c=n(8253),l=n(2361),u=n(1652),d=n(1916);!function(e){e.SETUP="SETUP",e.STARTUP="STARTUP",e.READY="READY",e.PLAYING="PLAYING",e.PAUSE="PAUSE",e.END="END",e.ERROR="ERROR",e.SOURCE_LOADED="SOURCE_LOADED",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART"}(a||(t.State=a={}));var E=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.enabledDebugging=!1,i.debuggingStates=[],i}return r(t,e),t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter((function(t){return e.indexOf(t)<0}))},t.prototype.getAllStates=function(){return Object.keys(a).map((function(e){return a[e]}))},t.prototype.callEvent=function(e,t,n){var i=this.stateMachine[e];if(i)try{i.call(this.stateMachine,n,t)}catch(n){d.logger.error("Exception occured in State Machine callback "+e,i,t,n)}else d.logger.log("Ignored Event: "+e)},t.prototype.createStateMachine=function(e){var t=this;return o.StateMachine.create({initial:a.SETUP,error:c.customStateMachineErrorCallback,events:[{name:l.Event.SOURCE_LOADED,from:[a.SETUP,a.ERROR],to:a.READY},(0,c.on)(l.Event.READY).stayIn(a.READY),(0,c.on)(l.Event.PAUSE).stayIn(a.READY),(0,c.on)(l.Event.TIMECHANGED).stayIn(a.READY),{name:l.Event.PLAY,from:a.READY,to:a.STARTUP},{name:l.Event.PLAYING,from:a.READY,to:a.PLAYING},(0,c.on)(l.Event.PLAY).stayIn(a.STARTUP),(0,c.on)(l.Event.PLAYING).stayIn(a.STARTUP),{name:l.Event.TIMECHANGED,from:a.STARTUP,to:a.PLAYING},(0,c.on)(l.Event.READY).stayIn(a.STARTUP),{name:l.Event.PAUSE,from:a.STARTUP,to:a.READY},(0,c.on)(l.Event.PLAYING).stayIn(a.PLAYING),(0,c.on)(l.Event.TIMECHANGED).stayIn(a.PLAYING),{name:l.Event.PAUSE,from:a.PLAYING,to:a.PAUSE},(0,c.on)(l.Event.TIMECHANGED).stayIn(a.PAUSE),(0,c.on)(l.Event.PAUSE).stayIn(a.PAUSE),{name:l.Event.PLAY,from:a.PAUSE,to:a.PLAYING},{name:l.Event.PLAYING,from:a.PAUSE,to:a.PLAYING},{name:l.Event.END,from:a.PLAYING,to:a.END},{name:l.Event.END,from:a.PAUSE,to:a.END},{name:l.Event.PLAYING,from:a.END,to:a.STARTUP},(0,c.on)(l.Event.TIMECHANGED).stayIn(a.END),(0,c.on)(l.Event.END).stayIn(a.END),{name:l.Event.PLAY,from:a.END,to:a.STARTUP},{name:l.Event.ERROR,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTART},{name:l.Event.ERROR,from:this.getAllStatesBut([a.STARTUP]),to:a.ERROR},{name:l.Event.UNLOAD,from:this.getAllStatesBut([a.STARTUP]),to:a.END},{name:l.Event.UNLOAD,from:[a.STARTUP],to:a.EXIT_BEFORE_VIDEOSTART}],callbacks:{onenterstate:function(n,i,r,a,o){"none"===i&&e.starttime?t.onEnterStateTimestamp=e.starttime:t.onEnterStateTimestamp=a||(new Date).getTime(),d.logger.log("[ENTER ".concat(a,"] ").concat((0,d.padRight)(r,20)," EVENT: ").concat((0,d.padRight)(n,20)," from: ").concat((0,d.padRight)(i,14)))},onleavestate:function(e,n,i,r,o){if(r){d.logger.log("[LEAVE ".concat(r,"] ").concat((0,d.padRight)(n,20)," EVENT: ").concat((0,d.padRight)(e,20)," to: ").concat((0,d.padRight)(i,20))),t.addStatesToLog(e,n,i,r,o);var s=r-t.onEnterStateTimestamp,c=String(n).toLowerCase(),u=n===a.STARTUP&&i===a.PLAYING;t.maybeSetOrClearVideoStartTimeouts(n,i),u&&t.stateMachineCallbacks.startup(s,a.STARTUP.toLowerCase()),e===l.Event.UNLOAD?t.stateMachineCallbacks.unload(s,c):n===a.SETUP?t.stateMachineCallbacks.setup(1,a.SETUP.toLowerCase()):e===l.Event.PAUSE&&n===a.STARTUP&&i===a.READY?t.clearVideoStartTimeout():n===a.ERROR||u||t.handleRestOfTheCallbacks(c,s,o,n)}},ontimechanged:function(e,n,i,r,a){if("PLAYING"===t.stateMachine.current){var o=r-t.onEnterStateTimestamp;o>59700&&t.onHeartbeat(r,o,String(n).toLowerCase(),a)}},onplayerError:function(e,n,i,r,a){t.stateMachineCallbacks.error(a)}}})},t.prototype.handleRestOfTheCallbacks=function(e,t,n,i){var r=this.stateMachineCallbacks[e];if("function"==typeof r)try{r(t,e,n)}catch(t){d.logger.error("Exception occurred in State Machine callback "+e,n,t)}else(0,c.logMissingCallbackWarning)(i,[a.READY])},t.prototype.maybeSetOrClearVideoStartTimeouts=function(e,t){e===a.READY&&t===a.STARTUP?this.setVideoStartTimeout():e===a.STARTUP&&t===a.PLAYING&&this.clearVideoStartTimeout()},t.prototype.sourceChange=function(e,t,n){throw new Error("Method not implemented.")},t.prototype.onHeartbeat=function(e,t,n,i){this.stateMachineCallbacks.setVideoTimeEndFromEvent(i);var r=(0,c.createHeartbeatPayload)(t,n);this.stateMachineCallbacks.heartbeat(t,n,r),this.onEnterStateTimestamp=e,this.stateMachineCallbacks.setVideoTimeStartFromEvent(i)},t.prototype.addStatesToLog=function(e,t,n,i,r){this.enabledDebugging&&this.debuggingStates.push(new u.EventDebugging(e,t,n,i,r))},t.prototype.getStates=function(){return this.debuggingStates},t.prototype.setEnabledDebugging=function(e){this.enabledDebugging=e},t}(s.AnalyticsStateMachine);t.BitmovinPwxAnalyticsStateMachine=E},28:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BitmovinPwxInternalAdapter=void 0;var a=n(2361),o=n(556),s=n(7614),c=n(9557),l=n(3413),u=n(2647),d=n(5406),E=n(7299),p=function(e){function t(t,n){var i=e.call(this,n)||this;return i.context=t,i.onBeforeUnLoadEvent=!1,i.stateMachine=new d.BitmovinPwxAnalyticsStateMachine(i.stateMachineCallbacks,i.opts),i}return r(t,e),t.prototype.getSource=function(){return this.context.registry.get(E.SourceExportNames.SourceState)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.getSource().playback.playhead.position},enumerable:!1,configurable:!0}),t.prototype.getAutoPlay=function(){return this.getSource().config.playback.autoplay},t.prototype.getCurrentPlaybackInfo=function(){var e,t,n,i,r,a,o,s=null===(e=this.getSource().sourceConfig.resources.filter((function(e){return e.url.includes(".m3u8")}))[0])||void 0===e?void 0:e.url,c=null===(t=this.getSource().sourceConfig.resources.filter((function(e){return e.url.includes(".mpd")}))[0])||void 0===t?void 0:t.url,u=null===(n=this.getSource().video.element)||void 0===n?void 0:n.getBoundingClientRect(),d=Math.round(null!==(i=null==u?void 0:u.width)&&void 0!==i?i:1),E=Math.round(null!==(r=null==u?void 0:u.height)&&void 0!==r?r:1),p="unknown";return s?p="hls":c&&(p="dash"),{droppedFrames:0,isMuted:null===(a=this.getSource().video.element)||void 0===a?void 0:a.muted,isLive:"live"===this.getSource().stream.type,videoWindowHeight:E,videoWindowWidth:d,videoDuration:(0,l.normalizeVideoDuration)(null===(o=this.getSource().video.element)||void 0===o?void 0:o.duration),videoPlaybackHeight:E,videoPlaybackWidth:d,m3u8Url:s,mpdUrl:c,streamFormat:p,videoCodec:void 0,audioCodec:void 0,videoBitrate:0,audioBitrate:0}},t.prototype.getDrmPerformanceInfo=function(){},t.prototype.getPlayerName=function(){return o.Player.BITMOVIN_PWX},t.prototype.getPlayerTech=function(){return"webx:html5"},t.prototype.getPlayerVersion=function(){return this.context.registry.get(E.CoreExportNames.Constants).Version},t.prototype.initialize=function(e){return this.registerEventListeners(),this.registerUnloadEventListeners(),[new c.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new s.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],void 0)]},t.prototype.registerUnloadEventListeners=function(){var e=this,t=function(){if(!e.onBeforeUnLoadEvent){e.onBeforeUnLoadEvent=!0;var t=e.context.registry.get(E.SourceExportNames.SourceState).playback.playhead.position;e.eventCallback(a.Event.UNLOAD,{currentTime:t})}e.release()};t=t.bind(!0),this.context.abortSignal.addEventListener("abort",t),this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},t.prototype.registerEventListeners=function(){var e=this,t=this.context.registry.get(E.SourcesApiExportNames.SourceEventBus),n=this.context.registry.get(E.SourceExportNames.SourceState).playback,i=this.context.registry.get(E.PlaybackApiEventsPackageExportNames.PlaybackEvent);t.on(i.Ready,(function(){e.eventCallback(a.Event.SOURCE_LOADED,{currentTime:n.playhead.position})})),t.on(i.Play,(function(){e.eventCallback(a.Event.PLAY,{currentTime:n.playhead.position})})),t.on(i.Playing,(function(){e.eventCallback(a.Event.PLAYING,{currentTime:n.playhead.position})})),t.on(i.Paused,(function(){e.eventCallback(a.Event.PAUSE,{currentTime:n.playhead.position})})),t.on(i.TimeChanged,(function(){e.eventCallback(a.Event.TIMECHANGED,{currentTime:n.playhead.position})})),t.on(i.VideoAttached,(function(){e.eventCallback(a.Event.SOURCE_LOADED,{currentTime:n.playhead.position})})),t.on(i.Ended,(function(){e.eventCallback(a.Event.END,{currentTime:n.playhead.position})}));var r=function(){var t=e.context.abortSignal.reason;"SourceRemovedError"===t.name||"FrameworkDisposedError"===t.name?e.eventCallback(a.Event.SOURCE_UNLOADED,{currentTime:n.playhead.position}):e.eventCallback(a.Event.ERROR,{currentTime:n.playhead.position,code:1007,message:t.message,data:t}),e.context.abortSignal.removeEventListener("abort",r)};this.context.abortSignal.addEventListener("abort",r)},t.prototype.sourceChange=function(e){throw new Error("Method not implemented.")},t}(u.InternalAdapter);t.BitmovinPwxInternalAdapter=p},7299:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourcesApiExportNames=t.SourceExportNames=t.PlaybackApiEventsPackageExportNames=t.CoreExportNames=t.BundleExportNames=void 0,t.BundleExportNames={Logger:"logger",PlayerConfig:"player-config"},t.CoreExportNames={Utils:"utils",Constants:"constants",CoreEffects:"core-effects",CoreStateAtoms:"core-state-atoms"},t.PlaybackApiEventsPackageExportNames={PlaybackEvent:"playback-event"},t.SourceExportNames={CreateSourceStateAtom:"create-source-state-atom",CreateSourceReference:"create-source-reference",SourceReferences:"source-references",SourceState:"source-state-atom"},t.SourcesApiExportNames={SourceApiManager:"source-api-manager",VideoElementUtils:"video-element-utils",SourceEventBus:"source-event-bus"}},5127:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CAFv3Adapter=void 0;var a=n(4350),o=n(1916),s=n(9102),c=n(3236),l=function(e){function t(t,n,i){var r=e.call(this)||this;return r.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),r):(r.markPlayerInstanceAsAugmented(n),r.internalAdapter=new c.CAFv3InternalAdapter(n,i),r.analytics=a.Analytics.create(t,r.internalAdapter),r)}return r(t,e),t}(s.Adapter);t.CAFv3Adapter=l},3236:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CAFv3InternalAdapter=void 0;var a=n(3674),o=n(2361),s=n(556),c=n(7614),l=n(9557),u=n(3413),d=function(e){function t(t,n){var i=e.call(this,n)||this;return i.context=t,i.getPlayerName=function(){return s.Player.CHROMECAST_SHAKA},i.getPlayerTech=function(){return"html5"},i.getAutoPlay=function(){return!(!i.currentItem||!i.currentItem.autoplay)&&i.currentItem.autoplay},i.getDrmPerformanceInfo=function(){return i.drmPerformanceInfo},i.stateMachine=new a.HTML5AnalyticsStateMachine(i.stateMachineCallbacks,i.opts),i.playerManager=t.getPlayerManager(),i.isSeeking=!1,i}return r(t,e),t.prototype.initialize=function(e){return this.register(),[new l.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new c.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],void 0)]},t.prototype.getPlayerVersion=function(){return window.cast&&window.cast.framework?window.cast.framework.VERSION:"unknown"},t.prototype.sourceChange=function(e){this.stateMachine.callManualSourceChangeEvent(e,this.playerManager.getCurrentTimeSec())},t.prototype.getCurrentPlaybackInfo=function(){var e=this.playerManager.getStats();return{isLive:this.getIsLive(),playerTech:this.getPlayerTech(),videoDuration:(0,u.normalizeVideoDuration)(this.mediaInformation?this.mediaInformation.duration:0),videoPlaybackHeight:e.height,videoPlaybackWidth:e.width,audioCodec:this.activeAudioTrack?this.activeAudioTrack.trackContentType:void 0,audioLanguage:this.activeAudioTrack?this.activeAudioTrack.language:void 0,subtitleLanguage:this.activeTextTracks?this.activeTextTracks.map((function(e){return e.language})).join(","):void 0,droppedFrames:0}},t.prototype.register=function(){var e=this;this.playerManager.addEventListener("PLAYER_LOADING",(function(t){e.eventCallback(o.Event.SETUP,{})})),this.playerManager.addEventListener("PLAYER_LOAD_COMPLETE",(function(t){var n=e.playerManager.getAudioTracksManager();e.activeAudioTrack=n.getActiveTrack();var i=e.playerManager.getTextTracksManager();e.activeTextTracks=i.getActiveTracks();var r=e.playerManager.getQueueManager();e.currentItem=r.getCurrentItem(),e.mediaInformation=t.media,e.eventCallback(o.Event.READY,{})})),this.playerManager.addEventListener("PLAY",(function(t){e.eventCallback(o.Event.PLAY,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("PAUSE",(function(t){e.onPaused(e.playerManager.getCurrentTimeSec())})),this.playerManager.addEventListener("ERROR",(function(t){var n=null!=t.error?t.error:void 0;e.eventCallback(o.Event.ERROR,{currentTime:e.playerManager.getCurrentTimeSec(),code:t.detailedErrorCode,message:t.reason,legacyData:n,data:{additionalData:JSON.stringify(n)}})})),this.playerManager.addEventListener("SEEKING",(function(t){e.isSeeking=!0,e.onPaused(t.currentMediaTime),e.eventCallback(o.Event.SEEK,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("SEEKED",(function(t){e.isSeeking=!1,e.eventCallback(o.Event.SEEKED,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("STALLED",(function(e){})),this.playerManager.addEventListener("BUFFERING",(function(t){!e.isSeeking&&t.isBuffering&&e.eventCallback(o.Event.START_BUFFERING,{currentTime:e.currentTime})})),this.playerManager.addEventListener("TIME_UPDATE",(function(t){e.isSeeking||e.eventCallback(o.Event.TIMECHANGED,{currentTime:t.currentMediaTime})})),this.playerManager.addEventListener("REQUEST_LOAD",(function(t){e.currentItem&&e.eventCallback(o.Event.PLAYLIST_TRANSITION,{currentTime:e.playerManager.getCurrentTimeSec()})}))},t.prototype.onPaused=function(e){this.eventCallback(o.Event.PAUSE,{currentTime:e})},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.playerManager.getCurrentTimeSec()},enumerable:!1,configurable:!0}),t.prototype.getIsLive=function(){return!(!this.mediaInformation||"LIVE"!==this.mediaInformation.streamType)||!!this.playerManager.getLiveSeekableRange()||void 0},t}(n(2647).InternalAdapter);t.CAFv3InternalAdapter=d},9999:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DashjsAdapter=void 0;var a=n(4350),o=n(1916),s=n(9102),c=n(236),l=function(e){function t(t,n,i){var r=e.call(this)||this;return r.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),r):(r.markPlayerInstanceAsAugmented(n),r.internalAdapter=new c.DashjsInternalAdapter(n,i),r.analytics=a.Analytics.create(t,r.internalAdapter),r)}return r(t,e),t}(s.Adapter);t.DashjsAdapter=l},236:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getMediaPlayerCodecInfo=t.DashjsInternalAdapter=void 0;var o=n(2361),s=n(2168),c=n(556),l=n(7614),u=n(9557),d=n(1916),E=n(1820),p=function(e){function n(t,n){var i=e.call(this,void 0,n)||this;return i.getPlayerName=function(){return c.Player.DASHJS},i.getPlayerVersion=function(){return i.mediaPlayer.getVersion()},i.mediaPlayer=t,i}return r(n,e),n.prototype.initialize=function(t){var n=this;e.prototype.initialize.call(this,t);var i=null;try{i=this.mediaPlayer.getVideoElement()}catch(e){}return i?(this.setMediaElement(i),this.registerMediaElementEventsForDashJS()):this.mediaPlayer.on("manifestLoaded",(function(){try{i=n.mediaPlayer.getVideoElement(),n.setMediaElement(i),n.registerMediaElementEventsForDashJS()}catch(e){d.logger.errorMessageToUser("Something went wrong while getting underlying HTMLVideoElement. Not possible to attach adapter and initialize Bitmovin Analytics. Error: ",e),n.release()}}),this),[new u.ErrorDetailTracking(t.errorDetailTrackingSettingsProvider,new l.ErrorDetailBackend(t.errorDetailTrackingSettingsProvider.collectorConfig),[t.errorDetailSubscribable],void 0)]},n.prototype.registerMediaElementEventsForDashJS=function(){var e=this,t=this.mediaElement;t&&this.listenToMediaElementEvent("playing",(function(){var n=t.currentTime;e.needsFirstPlayIntent=!1,e.eventCallback(o.Event.TIMECHANGED,{currentTime:n})}))},n.prototype.getCurrentPlaybackInfo=function(){var n=e.prototype.getCurrentPlaybackInfo.call(this),i=a({},n),r=(0,t.getMediaPlayerCodecInfo)(this.mediaPlayer);return this.sourceInfoFallbackService.applyAndStoreCodecInfo(i,r),i},n.prototype.getMIMEType=function(){return s.MIMETypes.DASH},n.prototype.getStreamURL=function(){if(this.mediaPlayer){var e=void 0;try{e=this.mediaPlayer.getSource()}catch(e){d.logger.warn("no source available",e)}return null!=e?e.toString():void 0}},n.prototype.getCurrentQualityLevelInfo=function(){if(!this.mediaPlayer)return null;try{var e=this.mediaPlayer.getBitrateInfoListFor("video")[this.mediaPlayer.getQualityFor("video")];return null==e?null:{width:e.width,height:e.height,bitrate:e.bitrate}}catch(e){d.logger.warn("Quality information not available")}return null},n}(n(7124).HTML5InternalAdapter);t.DashjsInternalAdapter=p,t.getMediaPlayerCodecInfo=function(e){var t,n,i,r,a=new RegExp(/codecs="(.*)"/);try{var o=null===(t=e.getCurrentTrackFor("video"))||void 0===t?void 0:t.codec;(0,E.isValidString)(o)&&!(0,E.isBlank)(o)&&(i=null==(s=a.exec(o))?void 0:s[1])}catch(e){i=void 0}try{var s,c=null===(n=e.getCurrentTrackFor("audio"))||void 0===n?void 0:n.codec;(0,E.isValidString)(c)&&!(0,E.isBlank)(c)&&(r=null==(s=a.exec(c))?void 0:s[1])}catch(e){r=void 0}return{videoCodec:i,audioCodec:r}}},9566:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HlsAdapter=void 0;var a=n(4350),o=n(1916),s=n(9102),c=n(1601),l=function(e){function t(t,n,i){var r=e.call(this)||this;return r.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),r):(r.markPlayerInstanceAsAugmented(n),r.internalAdapter=new c.HlsInternalAdapter(n,i),r.analytics=a.Analytics.create(t,r.internalAdapter),r)}return r(t,e),t}(s.Adapter);t.HlsAdapter=l},1601:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getHlsCurrentLevel=t.getHlsCodecInfo=t.HlsInternalAdapter=t.HLS_PLAYER_EVENT=void 0;var o=n(9664),s=n(2361),c=n(2168),l=n(556),u=n(7614),d=n(9557),E=n(5063),p=n(7124),h=n(4778);t.HLS_PLAYER_EVENT={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_DETACHING:"hlsMediaDetaching",MANIFEST_LOADING:"hlsManifestLoading",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",DESTROYING:"hlsDestroying",ERROR:"hlsError"};var v=function(e){function n(n,i){var r=e.call(this,void 0,i)||this;return r.getPlayerName=function(){return l.Player.HLSJS},r.getPlayerVersion=function(){return r.hls.constructor.version},r.isLive=function(){var e=(0,t.getHlsCurrentLevel)(r.hls);return null!=(null==e?void 0:e.details)&&e.details.live},r.onDestroying=function(){r.eventCallback(s.Event.SOURCE_UNLOADED,{}),r.release()},r.resetMedia(),r.hls=n,r.speedMeter=new h.HlsSpeedMeterAdapter(n,new o.DownloadSpeedMeter).getDownloadSpeedMeter(),r}return r(n,e),Object.defineProperty(n.prototype,"downloadSpeedInfo",{get:function(){return this.speedMeter.getInfo()},enumerable:!1,configurable:!0}),n.prototype.initialize=function(t){return e.prototype.initialize.call(this,t),this.registerHlsEvents(),[new d.ErrorDetailTracking(t.errorDetailTrackingSettingsProvider,new u.ErrorDetailBackend(t.errorDetailTrackingSettingsProvider.collectorConfig),[t.errorDetailSubscribable],void 0)]},n.prototype.clearValues=function(){this.speedMeter.reset()},n.prototype.getCurrentQualityLevelInfo=function(){var e=(0,t.getHlsCurrentLevel)(this.hls);return e?{bitrate:e.bitrate,width:e.width,height:e.height}:null},n.prototype.getMIMEType=function(){return c.MIMETypes.HLS},n.prototype.getStreamURL=function(){return this.hls.url},n.prototype.registerHlsEvents=function(){this.hls.on(t.HLS_PLAYER_EVENT.MEDIA_ATTACHING,this.onMediaAttaching.bind(this)),this.hls.on(t.HLS_PLAYER_EVENT.MEDIA_DETACHING,this.onMediaDetaching.bind(this)),this.hls.on(t.HLS_PLAYER_EVENT.MANIFEST_LOADING,this.onManifestLoading.bind(this)),this.hls.on(t.HLS_PLAYER_EVENT.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched.bind(this)),this.hls.on(t.HLS_PLAYER_EVENT.SUBTITLE_TRACK_SWITCH,this.onSubtitleLanguageSwitched.bind(this)),this.hls.on(t.HLS_PLAYER_EVENT.DESTROYING,this.onDestroying.bind(this)),this.hls.on(t.HLS_PLAYER_EVENT.ERROR,this.onHlsError.bind(this)),this.hls.media&&(this.onMediaAttaching(),this.onManifestLoading())},n.prototype.onMediaAttaching=function(){this.mediaElement||(this.mediaElement=this.hls.media,this.registerMediaElement(),this.onMaybeReady())},n.prototype.onMediaDetaching=function(){this.unregisterMediaElement()},n.prototype.onManifestLoading=function(){this.onMaybeReady()},n.prototype.getCurrentPlaybackInfo=function(){var n=this.getSelectedSubtitleLanguage(),i=a(a({},e.prototype.getCurrentPlaybackInfo.call(this)),{audioLanguage:this.getSelectedAudioLanguage(),subtitleEnabled:null!=n?n.enabled:void 0,subtitleLanguage:null!=n?n.language:void 0}),r=(0,t.getHlsCodecInfo)(this.hls);return this.sourceInfoFallbackService.applyAndStoreCodecInfo(i,r),i},n.prototype.onHlsError=function(e,t){if(!t||t.fatal){var n=this.mediaElement,i=void 0;null!=n&&(i=n.currentTime);var r=null!=t?"".concat(t.type,": ").concat(t.details):void 0;this.eventCallback(s.Event.ERROR,{currentTime:i,code:this.getErrorCodeFromHlsErrorType(t.type),message:r,data:{}})}},n.prototype.onAudioTrackSwitched=function(e,t){var n,i=this.mediaElement;null!=i&&(n=i.currentTime),this.eventCallback(s.Event.AUDIOTRACK_CHANGED,{currentTime:n})},n.prototype.onSubtitleLanguageSwitched=function(e,t){var n,i=this.mediaElement;null!=i&&(n=i.currentTime),this.eventCallback(s.Event.SUBTITLE_CHANGE,{currentTime:n})},n.prototype.getErrorCodeFromHlsErrorType=function(e){switch(e){case"networkError":return 2;case"mediaError":return 3;case"keySystemError":return 4;case"muxError":return 5;default:return 1}},n.prototype.getSelectedAudioLanguage=function(){if(!(null==this.hls.audioTrack||this.hls.audioTrack<0))return this.hls.audioTracks[this.hls.audioTrack].lang},n.prototype.getSelectedSubtitleLanguage=function(){if(null!=this.hls.subtitleDisplay){var e=this.hls.subtitleTrack>=0&&!0===this.hls.subtitleDisplay;return{enabled:e,language:e?this.hls.subtitleTracks[this.hls.subtitleTrack].lang:void 0}}var t=this.hls.subtitleTrackController;if(null!=t&&null!=t.media)return this.getSelectedSubtitleFromMediaElement(t.media)},n}(p.HTML5InternalAdapter);t.HlsInternalAdapter=v,t.getHlsCodecInfo=function(e){var n=(0,t.getHlsCurrentLevel)(e);if(n)return{videoCodec:n.videoCodec,audioCodec:n.audioCodec}},t.getHlsCurrentLevel=function(e){if(null!=e.levels&&0!==e.levels.length&&(0,E.isNumber)(e.currentLevel)&&!(e.currentLevel<0))return e.levels[e.currentLevel]}},4778:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HlsSpeedMeterAdapter=void 0;var n=function(){function e(e,t){var n=this;this.meter=t,e.on(e.constructor.Events.FRAG_LOADED,(function(e,t){return n.handleFragmentLoadedEvent(t)}))}return e.prototype.getDownloadSpeedMeter=function(){return this.meter},e.prototype.handleFragmentLoadedEvent=function(e){if("main"===e.frag.type){var t=null!=e.networkDetails?e.networkDetails.status:void 0;if(null!=t){var n=e.frag.stats,i=(n.loading.end-n.loading.start)/1e3,r=(n.loading.first-n.loading.start)/1e3,a={duration:i,size:n.total,timeToFirstByte:r,timestamp:new Date,httpStatus:t};this.meter.addMeasurement(a)}}},e}();t.HlsSpeedMeterAdapter=n},7124:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HTML5InternalAdapter=void 0;var o=n(3674),s=n(6743),c=n(2361),l=n(2168),u=n(556),d=n(8525),E=n(7224),p=n(3413),h=n(1916),v=n(5063),f=n(2647),A=n(8510),m=function(e){function t(t,n){var i=e.call(this,n)||this;return i.mediaElement=t,i.onBeforeUnLoadEvent=!1,i.previousMutedValue=!1,i.getPlayerName=function(){return u.Player.HTML5},i.getPlayerTech=function(){return"html5"},i.getAutoPlay=function(){return!!i.mediaElement&&i.mediaElement.autoplay},i.getDrmPerformanceInfo=function(){return i.drmPerformanceInfo},i.isLive=function(){return!!i.mediaElement&&i.mediaElement.duration===1/0},i.initializeStateMachine(),i.mediaElEventHandlers=[],i.bufferingTimeout=void 0,i.isBuffering=!1,i.lastIsLiveStatus=!1,i.isPaused=!1,i.isSeeking=!1,i.previousMediaTimeInSeconds=0,i.previousClientTime=0,i.needsReadyEvent=!0,i.needsFirstPlayIntent=!0,i.mediaElementSet=!1,i.videoCompletionTracker=new s.default,i.playerStatisticsProvider=new A.default(t),i}return r(t,e),Object.defineProperty(t.prototype,"segments",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.resetSourceRelatedState=function(){e.prototype.resetSourceRelatedState.call(this),this.playerStatisticsProvider.reset()},t.prototype.initialize=function(e){return this.mediaElement&&this.setMediaElement(),this.registerWindowEvents(),[]},t.prototype.getStreamSources=function(e){if(!e)return{};switch(this.getStreamType()){case"hls":return{m3u8Url:e};case"dash":return{mpdUrl:e};default:return{progUrl:e}}},t.prototype.getCurrentPlaybackInfo=function(){var e=a(a(a({},this.getCommonPlaybackInfo()),this.getStreamSources(this.getStreamURL())),{isLive:this.isLive(),size:(0,v.isVideoInFullscreen)()?d.PlayerSize.Fullscreen:d.PlayerSize.Window,playerTech:this.getPlayerTech(),droppedFrames:this.playerStatisticsProvider.getDroppedFrames()});this.mediaElement&&(e=a(a({},e),{videoDuration:(0,p.normalizeVideoDuration)(this.mediaElement.duration),isMuted:this.mediaElement.muted,videoWindowHeight:this.mediaElement.height,videoWindowWidth:this.mediaElement.width}));var t=this.getCurrentQualityLevelInfo();t&&(e=a(a({},e),{videoPlaybackHeight:t.height,videoPlaybackWidth:t.width,videoBitrate:t.bitrate}));var n=this.getStreamType();return null!=n&&this.sourceInfoFallbackService.setStreamFormat(n),this.sourceInfoFallbackService.applyStreamFormat(e),e},Object.defineProperty(t.prototype,"currentTime",{get:function(){if(!this.mediaElement)throw new Error("No media attached");return this.mediaElement.currentTime},enumerable:!1,configurable:!0}),t.prototype.setMediaElement=function(e){if(void 0===e&&(e=null),e&&this.mediaElement&&(this.unregisterMediaElement(),this.mediaElementSet=!1),e&&(this.mediaElement=e),!this.mediaElement)throw new Error("No media element owned");if(this.mediaElementSet)throw new Error("Media element already set (only call this once)");this.mediaElementSet=!0,this.registerMediaElement(),this.onMaybeReady()},t.prototype.getMIMEType=function(){var e=this.getStreamURL();if(e&&void 0!==e)return(0,l.getMIMETypeFromFileExtension)(e)},t.prototype.getStreamType=function(){var e=this.getMIMEType();if(e)return(0,E.getStreamTypeFromMIMEType)(e)},t.prototype.getStreamURL=function(){var e=this.mediaElement;if(e)return e.src},t.prototype.resetMedia=function(){this.mediaElement=void 0,this.mediaElEventHandlers=[],window.clearTimeout(this.bufferingTimeout)},t.prototype.registerMediaElement=function(){var e=this,t=this.mediaElement;t&&(this.wrapMediaElementLoad(t),this.listenToMediaElementEvent("loadstart",(function(){y("loadstart ".concat(t.currentTime)),e.eventCallback(c.Event.READY,{})})),this.listenToMediaElementEvent("loadedmetadata",(function(){if(y("loadedmetadata ".concat(t.currentTime)),1===t.readyState){e.checkQualityLevelAttributes(!0);var n=e.getStreamType();null!=n&&e.sourceInfoFallbackService.setStreamFormat(n),null!=e.mediaElement&&(e.videoCompletionTracker.reset(),e.videoCompletionTracker.setVideoDuration(e.mediaElement.duration),e.previousMutedValue=e.mediaElement.muted)}})),this.listenToMediaElementEvent("play",(function(){var n=t.currentTime;e.needsFirstPlayIntent=!1,e.eventCallback(c.Event.PLAY,{currentTime:n})})),this.listenToMediaElementEvent("pause",(function(){e.onPaused()})),this.listenToMediaElementEvent("playing",(function(){clearTimeout(e.bufferingTimeout),e.isPaused=!1})),this.listenToMediaElementEvent("error",(function(){var n,i,r=t.currentTime,a=t.error;e.eventCallback(c.Event.ERROR,{currentTime:r,code:null!==(n=null==a?void 0:a.code)&&void 0!==n?n:void 0,message:null!==(i=null==a?void 0:a.message)&&void 0!==i?i:void 0,data:{}})})),this.listenToMediaElementEvent("volumechange",(function(){var n=t.muted,i=t.currentTime,r=t.volume,a=e.isAudioMuted(n,r);e.previousMutedValue!==a&&(a?e.eventCallback(c.Event.MUTE,{currentTime:i}):e.eventCallback(c.Event.UN_MUTE,{currentTime:i}),e.previousMutedValue=a)})),this.listenToMediaElementEvent("seeking",(function(){y("seeking ".concat(t.currentTime));var n=t.currentTime;e.eventCallback(c.Event.SEEK,{currentTime:n})})),this.listenToMediaElementEvent("seeked",(function(){y("seeked ".concat(t.currentTime));var n=t.currentTime;clearTimeout(e.bufferingTimeout),e.eventCallback(c.Event.SEEKED,{currentTime:n})})),this.listenToMediaElementEvent("timeupdate",(function(){var n=t.currentTime;e.isBuffering=!1,e.isSeeking=!1,e.needsFirstPlayIntent||(e.isPaused||e.eventCallback(c.Event.TIMECHANGED,{currentTime:n}),e.checkQualityLevelAttributes(),e.checkSeeking(),e.checkPlayheadProgress(),e.previousMediaTimeInSeconds=n)})),this.listenToMediaElementEvent("stalled",(function(){})),this.listenToMediaElementEvent("waiting",(function(){y("waiting ".concat(t.currentTime)),e.checkSeeking(),e.onBuffering()})))},t.prototype.listenToMediaElementEvent=function(e,t){if(!this.mediaElement)throw new Error("No media attached");var n=t.bind(this);this.mediaElEventHandlers.push({event:e,handler:n}),this.mediaElement.addEventListener(e,n,!1)},t.prototype.onMaybeReady=function(){this.needsReadyEvent&&this.mediaElement&&(this.needsReadyEvent=!1,this.getCurrentPlaybackInfo(),this.videoCompletionTracker.reset(),this.videoCompletionTracker.setVideoDuration(this.mediaElement.duration),this.eventCallback(c.Event.READY,{currentTime:this.currentTime}))},t.prototype.unregisterMediaElement=function(){if(!this.mediaElement)throw new Error("No media attached");var e=this.mediaElement;this.mediaElEventHandlers.forEach((function(t){e.removeEventListener(t.event,t.handler)})),this.resetMedia()},t.prototype.onBuffering=function(){if(!this.mediaElement)throw new Error("No media attached");var e=this.mediaElement.currentTime;this.isBuffering||this.isPaused&&!this.isSeeking||(this.isSeeking?this.eventCallback(c.Event.SEEK,{currentTime:e}):this.eventCallback(c.Event.START_BUFFERING,{currentTime:e}),this.isBuffering=!0)},t.prototype.onPaused=function(e){if(!this.isPaused){if(!this.mediaElement)throw new Error("No media attached");e||(e=this.mediaElement.currentTime),this.eventCallback(c.Event.PAUSE,{currentTime:e}),this.isPaused=!0}},t.prototype.registerWindowEvents=function(){this.windowEventTracker.addEventListener("beforeunload",this.onPageClose.bind(this)),this.windowEventTracker.addEventListener("unload",this.onPageClose.bind(this))},t.prototype.onPageClose=function(){if(!this.onBeforeUnLoadEvent){this.onBeforeUnLoadEvent=!0;var e=this.mediaElement,t=void 0;null!=e&&(t=e.currentTime),this.eventCallback(c.Event.UNLOAD,{currentTime:t})}this.release()},t.prototype.checkPlayheadProgress=function(){var e=this;if(!this.mediaElement)throw new Error("No media attached");var n=this.mediaElement;n.paused&&this.onPaused(),clearTimeout(this.bufferingTimeout),this.bufferingTimeout=window.setTimeout((function(){n.paused||n.ended&&!e.isBuffering||n.currentTime-e.previousMediaTimeInSeconds<t.BUFFERING_TIMECHANGED_TIMEOUT&&e.onBuffering()}),t.BUFFERING_TIMECHANGED_TIMEOUT)},t.prototype.checkQualityLevelAttributes=function(e){if(void 0===e&&(e=!1),!this.mediaElement)throw new Error("No media attached");var t=this.mediaElement,n=this.isLive();n!==this.lastIsLiveStatus&&(this.lastIsLiveStatus=n);var i=this.getCurrentQualityLevelInfo();if(i){var r=i.bitrate,a=i.width,o=i.height;if(null!=r)if(this.qualityChangeService.shouldAllowVideoQualityChange(r)){this.qualityChangeService.setVideoBitrate(r);var s={width:a,height:o,bitrate:r,currentTime:t.currentTime};e||this.eventCallback(c.Event.VIDEO_CHANGE,s)}else this.qualityChangeService.setVideoBitrate(r)}},t.prototype.sourceChange=function(e){var t;this.stateMachine.callManualSourceChangeEvent(e,null===(t=this.mediaElement)||void 0===t?void 0:t.currentTime)},t.prototype.getSelectedSubtitleFromMediaElement=function(e){if(null!=e.textTracks){for(var t=0,n=e.textTracks;t<n.length;t++){var i=n[t];if(null!=i.mode&&"showing"===i.mode){var r=null!=i.language&&i.language.length>0;return{enabled:r,language:r?i.language:void 0}}}return{enabled:!1}}},t.prototype.initializeStateMachine=function(){this.stateMachine=new o.HTML5AnalyticsStateMachine(this.stateMachineCallbacks,this.opts),this.stateMachine.callEvent(c.Event.SETUP,{},0)},t.prototype.wrapMediaElementLoad=function(e){var t=this,n=e.load;e.load=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];t.sourceChange({}),n.apply(e,i)}},t.prototype.checkSeeking=function(){if(!this.mediaElement)throw new Error("No media attached");var e=this.mediaElement.currentTime,t=Math.abs(e-this.previousMediaTimeInSeconds);if(t<1)this.previousClientTime=Date.now();else{var n=(Date.now()-this.previousClientTime)/1e3;t>n*(this.mediaElement.playbackRate+.5)&&(this.isSeeking=!0,this.onPaused(this.previousMediaTimeInSeconds+n)),this.previousClientTime=Date.now()}},t.BUFFERING_TIMECHANGED_TIMEOUT=1e3,t}(f.InternalAdapter);t.HTML5InternalAdapter=m;var y=function(e){var t=(new Date).toISOString().substring(11),n="".concat(t,"[HTML5InternalAdapter]"),i="".concat(n,": ").concat(e);h.logger.log(i)}},701:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLVideoElementAdapter=void 0;var a=n(4350),o=n(1916),s=n(9102),c=n(7238),l=function(e){function t(t,n,i,r){var s=e.call(this)||this;return s.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),s):(s.markPlayerInstanceAsAugmented(n),s.internalAdapter=new c.HTMLVideoElementInternalAdapter(n,i,r),s.analytics=a.Analytics.create(t,s.internalAdapter),s)}return r(t,e),Object.defineProperty(t.prototype,"sessionMetadata",{get:function(){var e=this.internalAdapter;return{setAudioLanguage:function(t){e.sessionData.audioLanguage=t},setSubtitleEnabled:function(t){e.sessionData.subtitleEnabled=t},setSubtitleLanguage:function(t){e.sessionData.subtitleLanguage=t}}},enumerable:!1,configurable:!0}),t.prototype.sourceChange=function(t,n){if(this.guardAgainstNotInitializedAnalytics()){e.prototype.sourceChange.call(this,t);var i=this.internalAdapter;i.sessionData.streamFormat=null==n?void 0:n.streamFormat,i.sessionData.audioCodec=null==n?void 0:n.audioCodec,i.sessionData.videoCodec=null==n?void 0:n.videoCodec,i.sessionData.audioLanguage=null==n?void 0:n.audioLanguage}},t}(s.Adapter);t.HTMLVideoElementAdapter=l},7238:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLVideoElementInternalAdapter=void 0;var a=n(556),o=function(e){function t(t,n,i){var r=e.call(this,t,n)||this;return r.sessionData={},r.getPlayerName=function(){return a.Player.HTML5},r.getPlayerVersion=function(){return""},r.sessionData.streamFormat=null==i?void 0:i.streamFormat,r.sessionData.audioCodec=null==i?void 0:i.audioCodec,r.sessionData.videoCodec=null==i?void 0:i.videoCodec,r.sessionData.audioLanguage=null==i?void 0:i.audioLanguage,r}return r(t,e),t.prototype.getStreamURL=function(){return this.mediaElement?this.mediaElement.currentSrc:void 0},t.prototype.getCurrentQualityLevelInfo=function(){return{bitrate:void 0,width:this.mediaElement?this.mediaElement.videoWidth:void 0,height:this.mediaElement?this.mediaElement.videoHeight:void 0}},t.prototype.getCurrentPlaybackInfo=function(){var t,n,i,r,a,o,s=e.prototype.getCurrentPlaybackInfo.call(this);s.streamFormat=null!==(t=this.sessionData.streamFormat)&&void 0!==t?t:s.streamFormat,s.audioCodec=null!==(n=this.sessionData.audioCodec)&&void 0!==n?n:s.audioCodec,s.videoCodec=null!==(i=this.sessionData.videoCodec)&&void 0!==i?i:s.videoCodec,s.subtitleEnabled=null!==(r=this.sessionData.subtitleEnabled)&&void 0!==r?r:s.subtitleEnabled;var c=null!==(a=this.sessionData.subtitleLanguage)&&void 0!==a?a:s.subtitleLanguage;return s.subtitleLanguage=!0===s.subtitleEnabled?c:void 0,s.audioLanguage=null!==(o=this.sessionData.audioLanguage)&&void 0!==o?o:s.audioLanguage,s},t.prototype.resetSourceRelatedState=function(){e.prototype.resetSourceRelatedState.call(this),this.sessionData={}},t}(n(7124).HTML5InternalAdapter);t.HTMLVideoElementInternalAdapter=o},8510:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.videoElement=e,this.previousTotalDroppedFrames=0}return e.prototype.getDroppedFrames=function(){if(null==this.videoElement)return 0;if(void 0===this.videoElement.getVideoPlaybackQuality)return 0;var e=this.videoElement.getVideoPlaybackQuality().droppedVideoFrames,t=e-this.previousTotalDroppedFrames;return this.previousTotalDroppedFrames=e,t},e.prototype.reset=function(){this.previousTotalDroppedFrames=0},e}();t.default=n},2647:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.InternalAdapter=void 0;var r=n(675),a=n(9796),o=n(4916),s=n(2361),c=n(4820),l=n(1916),u=n(5063),d=n(2376),E=function(){function e(e){var t=this;this.stateMachineCallbacks=i({},c.defaultStateMachineCallbacks),this.qualityChangeService=new a.default,this._onLicenseKeyReceived=new r.EventDispatcher,this._onLicenseCallFailed=new r.EventDispatcher,this.sourceInfoFallbackService=new o.SourceInfoFallbackService,this.drmPerformanceInfo=void 0,this._windowEventTracker=new d.WindowEventTracker,this.eventCallback=function(e,n){n=n||{},t.stateMachine?t.stateMachine.callEvent(e,n,(0,u.getCurrentTimestamp)()):l.logger.log("Bitmovin Analytics: StateMachine isn't ready yet")},e||(e={starttime:void 0}),e.starttime||(e.starttime=(0,u.getCurrentTimestamp)()),this.opts=e}return Object.defineProperty(e.prototype,"windowEventTracker",{get:function(){return this._windowEventTracker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLicenseKeyReceived",{get:function(){return this._onLicenseKeyReceived},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLicenseCallFailed",{get:function(){return this._onLicenseCallFailed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"downloadSpeedInfo",{get:function(){return{segmentsDownloadCount:0,segmentsDownloadSize:0,segmentsDownloadTime:0,avgDownloadSpeed:0,minDownloadSpeed:0,maxDownloadSpeed:0,avgTimeToFirstByte:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"segments",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.release=function(){this.stateMachine.resetIntervals(),this.stateMachineCallbacks.release(),this.resetSourceRelatedState(),this._windowEventTracker.release()},e.prototype.getCommonPlaybackInfo=function(){var e=1;return window.devicePixelRatio>0&&(e=window.devicePixelRatio),{screenHeight:window.screen.height*e,screenWidth:window.screen.width*e}},e.prototype.clearValues=function(){},e.prototype.clearSegments=function(){},e.prototype.resetSourceRelatedState=function(){this.sourceInfoFallbackService.reset(),this.drmPerformanceInfo=void 0},e.prototype.setCustomData=function(e){var t=this.stateMachine.currentState;!this.stateMachine.currentState||"PAUSE"!==this.stateMachine.currentState&&"PLAYING"!==this.stateMachine.currentState?this.stateMachineCallbacks.customdatachange(void 0,void 0,{values:e}):(this.eventCallback(s.Event.CUSTOM_DATA_CHANGE,{currentTime:this.currentTime}),this.eventCallback(s.Event[t],{values:e,currentTime:this.currentTime}))},e.prototype.isAudioMuted=function(e,t){return e||t<.01},e}();t.InternalAdapter=E},5517:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdCallbacks=void 0;var n=function(){this.onAdStarted=function(e){},this.onAdFinished=function(e){},this.onAdBreakStarted=function(e){},this.onAdBreakFinished=function(e){},this.onAdClicked=function(e){},this.onAdError=function(e){},this.onAdManifestLoaded=function(e){},this.onAdQuartile=function(e){},this.onAdSkipped=function(e){},this.onPlay=function(e){},this.onPause=function(e){},this.onBeforeUnload=function(){}};t.AdCallbacks=n},2063:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ShakaAdapter=void 0;var a=n(4350),o=n(2361),s=n(1916),c=n(9102),l=n(2092),u=function(e){function t(t,n,i){var r=e.call(this)||this;return r.hasPlayerAlreadyBeenAugmented(n)?(s.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),r):(r.markPlayerInstanceAsAugmented(n),r.internalAdapter=new l.ShakaInternalAdapter(n,i),r.analytics=a.Analytics.create(t,r.internalAdapter),r.wrapPlayerLoad(n),r)}return r(t,e),t.prototype.wrapPlayerLoad=function(e){var t=this,n=e.load;e.load=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];return new Promise((function(r,a){n.apply(e,i).then((function(e){return r(e)})).catch((function(e){var n,i={currentTime:0,code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:void 0,message:JSON.stringify({category:null==e?void 0:e.category,severity:null==e?void 0:e.severity}),data:{additionalData:JSON.stringify(null==e?void 0:e.data)}};t.internalAdapter.eventCallback(o.Event.ERROR,i),a(e)}))}))}},t}(c.Adapter);t.ShakaAdapter=u},2092:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.getShakaStreamFormat=t.getShakaCodecInfo=t.ShakaInternalAdapter=void 0;var o=n(2361),s=n(556),c=n(7224),l=n(7614),u=n(9557),d=n(1916),E=function(e){function n(t,n){var i=e.call(this,t.getMediaElement(),n)||this;return i.player=t,i.getPlayerName=function(){return s.Player.SHAKA},i.getPlayerVersion=function(){return i.player.constructor.version},i.isLive=function(){return!!i.player&&i.player.isLive()},i.onUnloading=function(){i.eventCallback(o.Event.SOURCE_UNLOADED,{}),i.release()},i}return r(n,e),n.prototype.initialize=function(t){var n,i=this;e.prototype.initialize.call(this,t);try{n=this.player.getMediaElement()}catch(e){}if(null==n){var r=function(e){if("media-source"===e.state)try{i.player.removeEventListener("onstatechange",r),n=i.player.getMediaElement(),i.setMediaElement(n)}catch(e){d.logger.errorMessageToUser("Something went wrong while getting underlying HTMLVideoElement. Not possible to attach adapter and initialize Bitmovin Analytics. Error: ",e),i.release()}};this.player.addEventListener("onstatechange",r),this.player.addEventListener("unloading",this.onUnloading.bind(this))}else this.setMediaElement(n);return[new u.ErrorDetailTracking(t.errorDetailTrackingSettingsProvider,new l.ErrorDetailBackend(t.errorDetailTrackingSettingsProvider.collectorConfig),[t.errorDetailSubscribable],void 0)]},n.prototype.getCurrentPlaybackInfo=function(){var n=a({},e.prototype.getCurrentPlaybackInfo.call(this)),i=(0,t.getShakaCodecInfo)(this.player);return this.sourceInfoFallbackService.applyAndStoreCodecInfo(n,i),n},n.prototype.getStreamType=function(){return(0,t.getShakaStreamFormat)(this.player)},n.prototype.getStreamURL=function(){return this.player?this.player.getAssetUri():null},n.prototype.getCurrentQualityLevelInfo=function(){var e=this.player.getVariantTracks().filter((function(e){return e.active})).filter((function(e){return e.videoCodec||void 0!==e.videoId}))[0];return e?{bitrate:e.videoBandwidth||e.bandwidth,width:e.width,height:e.height}:null},n}(n(7124).HTML5InternalAdapter);t.ShakaInternalAdapter=E,t.getShakaCodecInfo=function(e){var t=e.getVariantTracks().find((function(e){return e.active}));return{videoCodec:null==t?void 0:t.videoCodec,audioCodec:null==t?void 0:t.audioCodec}},t.getShakaStreamFormat=function(e){var t;if(e){var n=null===(t=e.getManifestType())||void 0===t?void 0:t.toLowerCase();return n===c.StreamTypes.dash?c.StreamTypes.dash:n===c.StreamTypes.hls?c.StreamTypes.hls:null==n&&3===e.getLoadMode()&&null!=e.getAssetUri()?c.StreamTypes.prog:void 0}}},4179:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.VideojsAdapter=void 0;var a=n(4350),o=n(1916),s=n(9102),c=n(4040),l=function(e){function t(t,n,i){var r=e.call(this)||this;return r.hasPlayerAlreadyBeenAugmented(n)?(o.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance"),r):(r.markPlayerInstanceAsAugmented(n),r.internalAdapter=new c.VideojsInternalAdapter(n,i),r.analytics=a.Analytics.create(t,r.internalAdapter),r)}return r(t,e),t}(s.Adapter);t.VideojsAdapter=l},4040:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.VideojsInternalAdapter=void 0;var o=n(5182),s=n(6743),c=n(5626),l=n(2361),u=n(2168),d=n(556),E=n(8525),p=n(7224),h=n(7614),v=n(9557),f=n(3413),A=n(716),m=n(1820),y=function(e){function t(t,n){var i=e.call(this,n)||this;return i._subtitleInfo={enabled:!1},i.onBeforeUnLoadEvent=!1,i.previousTime=0,i.getPlayerVersion=function(){var e,t,n,r=null===(t=(e=i.player).version)||void 0===t?void 0:t.call(e)["video.js"];if((0,m.isValidString)(r)&&!(0,m.isBlank)(r))return r;var a=null===(n=window.videojs)||void 0===n?void 0:n.VERSION;return(0,m.isValidString)(a)&&!(0,m.isBlank)(a)?a:"unknown"},i.getPlayerName=function(){return d.Player.VIDEOJS},i.getPlayerTech=function(){return"html5"},i.getAutoPlay=function(){return!0===i.player.autoplay()},i.getDrmPerformanceInfo=function(){return i.drmPerformanceInfo},i.player=t,i.stateMachine=new o.VideojsAnalyticsStateMachine(i.stateMachineCallbacks,i.opts),i.videoCompletionTracker=new s.default,i}return r(t,e),t.prototype.resetSourceRelatedState=function(){e.prototype.resetSourceRelatedState.call(this),this.videoCompletionTracker.reset(),this.videoCompletionTracker.setVideoDuration(this.player.duration()),this.previousTime=0},t.prototype.initialize=function(e){return this.register(),[new v.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new h.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],void 0)]},t.prototype.getStreamType=function(e){var t,n,i=(0,u.getMIMETypeFromFileExtension)(e);return i||(i=null===(n=(t=this.player).currentType)||void 0===n?void 0:n.call(t))?(0,p.getStreamTypeFromMIMEType)(i):void 0},t.prototype.getStreamSources=function(e){switch(this.getStreamType(e)){case"hls":return{m3u8Url:e};case"dash":return{mpdUrl:e};default:return{progUrl:e}}},t.prototype.getCurrentPlaybackInfo=function(){var e,t,n;this.selectedAudioLanguage=this.getSelectedAudioTrackLanguage(this.player);var i=this.getCodecInfo(this.player.tech({IWillNotUseThisInPlugins:!0})),r=a(a(a({},this.getCommonPlaybackInfo()),this.getStreamSources(this.player.currentSrc())),{streamFormat:this.getStreamType(this.player.currentSrc()),isLive:this.player.duration()===1/0,size:this.player.isFullscreen()?E.PlayerSize.Fullscreen:E.PlayerSize.Window,playerTech:this.getPlayerTech(),isMuted:this.player.muted(),videoDuration:(0,f.normalizeVideoDuration)(this.player.duration()),videoWindowHeight:this.player.height(),videoWindowWidth:this.player.width(),videoPlaybackHeight:this.player.videoHeight(),videoPlaybackWidth:this.player.videoWidth(),audioLanguage:this.selectedAudioLanguage,subtitleEnabled:this._subtitleInfo.enabled,subtitleLanguage:this._subtitleInfo.language,videoCodec:null==i?void 0:i.videoCodec,audioCodec:null==i?void 0:i.audioCodec,droppedFrames:0}),o=this.getCurrentQualityLevelInfo();return o&&(r.videoPlaybackWidth=null!==(e=o.width)&&void 0!==e?e:r.videoPlaybackWidth,r.videoPlaybackHeight=null!==(t=o.height)&&void 0!==t?t:r.videoPlaybackHeight,r.videoBitrate=null!==(n=o.bitrate)&&void 0!==n?n:r.videoBitrate),r},t.prototype.getCurrentQualityLevelInfo=function(){return this.currentVideoJsQualityLevel()},t.prototype.register=function(){var e=this,t=this;this.player.on("loadstart",(function(){t.eventCallback(l.Event.MANUAL_SOURCE_CHANGE,{config:{}})})),this.player.on("loadedmetadata",(function(){t.videoCompletionTracker.reset(),t.videoCompletionTracker.setVideoDuration(this.duration()),t.previousTime=0,t.eventCallback(l.Event.SOURCE_LOADED,{})})),this.player.ready((function(){t._subtitleInfo=t.getSubtitleInfo(this),t.eventCallback(l.Event.READY,{})})),this.player.on("play",(function(){t.eventCallback(l.Event.PLAY,{currentTime:this.currentTime()})})),this.player.on("pause",(function(){this.seeking()||t.eventCallback(l.Event.PAUSE,{currentTime:this.currentTime()})})),this.player.on("error",(function(){var e=this.error();t.eventCallback(l.Event.ERROR,{currentTime:this.currentTime(),code:e.code,message:e.message,data:{}})})),this.player.on("volumechange",(function(){var e=this.muted(),n=this.volume(),i=t.isAudioMuted(e,n);this.previousMutedValue!==i&&(i?t.eventCallback(l.Event.MUTE,{currentTime:this.currentTime()}):t.eventCallback(l.Event.UN_MUTE,{currentTime:this.currentTime()}),this.previousMutedValue=i)})),this.player.on("seeking",(function(){t.eventCallback(l.Event.SEEK,{currentTime:null!=t.previousTime?t.previousTime:this.currentTime()})})),this.player.on("seeked",(function(){t.eventCallback(l.Event.SEEKED,{currentTime:this.currentTime()})})),this.player.on("texttrackchange",(function(){var e=t.getSubtitleInfo(this),n=null==t._subtitleInfo||(0,A.isDifferentSubtitleInfo)(t._subtitleInfo,e);t._subtitleInfo=e,n&&t.eventCallback(l.Event.SUBTITLE_CHANGE,{currentTime:this.currentTime()})})),this.player.audioTracks().on("change",(function(){var e=t.getSelectedAudioTrackLanguage(t.player);null!=e&&e!==t.selectedAudioLanguage&&t.eventCallback(l.Event.AUDIOTRACK_CHANGED,{currentTime:t.player.currentTime()})})),this.player.on("stalled",(function(){t.eventCallback(l.Event.START_BUFFERING,{currentTime:this.currentTime()})})),this.player.on("waiting",(function(){t.eventCallback(l.Event.START_BUFFERING,{currentTime:this.currentTime()})})),this.player.on("timeupdate",(function(){this.seeking()||(t.previousTime=this.currentTime()),t.eventCallback(l.Event.TIMECHANGED,{currentTime:this.currentTime()});var e=t.currentVideoJsQualityLevel();if((null==e?void 0:e.height)&&(null==e?void 0:e.width)&&(null==e?void 0:e.bitrate)){if(t.qualityChangeService.shouldAllowVideoQualityChange(e.bitrate)){var n={bitrate:e.bitrate,height:e.height,width:e.width,currentTime:this.currentTime()};t.eventCallback(l.Event.VIDEO_CHANGE,n)}t.qualityChangeService.setVideoBitrate(e.bitrate)}}));var n=function(){if(!e.onBeforeUnLoadEvent){e.onBeforeUnLoadEvent=!0;var t=void 0;null!=e.player&&(t=e.player.currentTime()),e.eventCallback(l.Event.UNLOAD,{currentTime:t})}e.release()};n=n.bind(this),this.player.on("dispose",n),this.windowEventTracker.addEventListener("beforeunload",n),this.windowEventTracker.addEventListener("unload",n)},t.prototype.sourceChange=function(e){this.stateMachine.callManualSourceChangeEvent(e,this.currentTime)},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.player.currentTime()},enumerable:!1,configurable:!0}),t.prototype.getSelectedAudioTrackLanguage=function(e){for(var t=0,n=e.audioTracks();t<n.length;t++){var i=n[t];if(i.enabled)return i.language}},t.prototype.getSubtitleInfo=function(e){for(var t,n=!1,i=0,r=e.textTracks()||[];i<r.length;i++){var a=r[i];if("showing"===a.mode){n=!0,t=a.language;break}}return{enabled:n,language:t}},t.prototype.currentVideoJsQualityLevel=function(){var e=this.player.tech({IWillNotUseThisInPlugins:!0});if(null==e)return null;if(null==e.vhs&&null==e.hls)return null;var t=this.getMediaAttributes(e);return t&&t.bitrate?{bitrate:t.bitrate,width:t.width,height:t.height}:null},t.prototype.getMediaAttributes=function(e){var t;if(e&&(e.vhs?t=e.vhs:e.hls&&(t=e.hls),t&&t.playlists&&"function"==typeof t.playlists.media)){var n=t.playlists.media();if(n){var i=n.attributes;if(i&&0!==Object.keys(i).length)return{bitrate:i.BANDWIDTH,width:(i.RESOLUTION||{}).width,height:(i.RESOLUTION||{}).height,codecs:i.CODECS}}}},t.prototype.getCodecInfo=function(e){var t=this.getMediaAttributes(e);if(t&&t.codecs){var n=t.codecs.split(",");if(n)return{videoCodec:n.find((function(e){return c.isVideoCodec(e)})),audioCodec:n.find((function(e){return c.isAudioCodec(e)}))}}},t}(n(2647).InternalAdapter);t.VideojsInternalAdapter=y},7596:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsStateMachine=void 0;var r=n(3458),a=n(2361),o=n(3565),s=n(4649),c=n(5063),l=[3e3,5e3,1e4,3e4,59700],u=function(){function e(e,t){this.stateMachineCallbacks=e,this.onEnterStateTimestamp=0,this.videoStartupTimeoutMs=s.ANALYTICS_VIDEOSTART_TIMEOUT,this.rebufferTimeoutMs=s.ANALYTICS_REBUFFER_TIMEOUT,this.currentRebufferingIntervalIndex=0,this.stateMachine=this.createStateMachine(t)}return e.prototype.callManualSourceChangeEvent=function(e,t){this.callEvent(a.Event.MANUAL_SOURCE_CHANGE,{config:e,currentTime:t},Date.now())},Object.defineProperty(e.prototype,"currentState",{get:function(){return this.stateMachine.current},enumerable:!1,configurable:!0}),e.prototype.resetIntervals=function(){this.clearVideoStartTimeout(),this.clearRebufferingTimeoutHandle(!0),this.clearRebufferingHeartbeatHandle()},e.prototype.startRebufferingHeartbeatInterval=function(e){var t=this;void 0===e&&(e=!0),this.resetRebufferingHelpers(e),this.startRebufferingTimeoutHandle(),this.rebufferingHeartbeatIntervalHandle=window.setInterval((function(){if("rebuffering"===t.stateMachine.current.toLowerCase()){var e=(new Date).getTime(),n=e-t.onEnterStateTimestamp;t.stateMachineCallbacks.heartbeat(n,t.stateMachine.current.toLowerCase(),{buffered:n}),t.onEnterStateTimestamp=e,t.currentRebufferingIntervalIndex=Math.min(t.currentRebufferingIntervalIndex+1,l.length-1),t.startRebufferingHeartbeatInterval(!1)}else t.resetRebufferingHelpers()}),l[this.currentRebufferingIntervalIndex])},e.prototype.resetRebufferingHelpers=function(e){void 0===e&&(e=!0),e&&(this.currentRebufferingIntervalIndex=0),this.clearRebufferingHeartbeatHandle(),this.clearRebufferingTimeoutHandle(e)},e.prototype.clearRebufferingHeartbeatHandle=function(){null!=this.rebufferingHeartbeatIntervalHandle&&(window.clearInterval(this.rebufferingHeartbeatIntervalHandle),this.rebufferingHeartbeatIntervalHandle=void 0)},e.prototype.startRebufferingTimeoutHandle=function(){var e=this;this.currentRebufferingIntervalIndex>0||(this.rebufferingTimeoutHandle=window.setTimeout((function(){e.callEvent(a.Event.ERROR,i(i({},r.ErrorCode.BUFFERING_TIMEOUT_REACHED),{data:{additionalData:"StateMachine timed out after ".concat(e.rebufferTimeoutMs," ms of consecutive buffering.")}}),c.getCurrentTimestamp()),e.stateMachineCallbacks.release()}),this.rebufferTimeoutMs))},e.prototype.clearRebufferingTimeoutHandle=function(e){e&&null!=this.rebufferingTimeoutHandle&&(window.clearTimeout(this.rebufferingTimeoutHandle),this.rebufferingTimeoutHandle=void 0)},e.prototype.getVideoStartupFailedEventData=function(e,t,n){return{currentTime:e,reason:this.getReasonForVideoStartFailure(t)}},e.prototype.getReasonForVideoStartFailure=function(e){switch(e){case a.Event.ERROR:return o.VideoStartFailedReason.PLAYER_ERROR;case a.Event.UNLOAD:return o.VideoStartFailedReason.PAGE_CLOSED;case a.Event.VIDEOSTART_TIMEOUT:return o.VideoStartFailedReason.TIMEOUT;default:return o.VideoStartFailedReason.UNKNOWN}},e.prototype.setVideoStartTimeout=function(){var e=this;null!=this.videoStartTimeout&&this.clearVideoStartTimeout(),this.videoStartTimeout=window.setTimeout((function(){e.callEvent(a.Event.VIDEOSTART_TIMEOUT,{},c.getCurrentTimestamp()),e.stateMachineCallbacks.release()}),this.videoStartupTimeoutMs)},e.prototype.clearVideoStartTimeout=function(){window.clearTimeout(this.videoStartTimeout),this.videoStartTimeout=void 0},e}();t.AnalyticsStateMachine=u},2938:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AnalyticsStateMachine=void 0;var a,o=n(2595),s=n(2361),c=n(1652),l=n(1916),u=n(5063),d=n(7596),E=n(8253);!function(e){e.SETUP="SETUP",e.STARTUP="STARTUP",e.READY="READY",e.PLAYING="PLAYING",e.REBUFFERING="REBUFFERING",e.PAUSE="PAUSE",e.QUALITYCHANGE="QUALITYCHANGE",e.PLAY_SEEKING="PLAY_SEEKING",e.END_PLAY_SEEKING="END_PLAY_SEEKING",e.QUALITYCHANGE_PAUSE="QUALITYCHANGE_PAUSE",e.QUALITYCHANGE_REBUFFERING="QUALITYCHANGE_REBUFFERING",e.END="END",e.ERROR="ERROR",e.AD_STARTUP="AD_STARTUP",e.AD_READY="AD_READY",e.AD_PAUSE="AD_PAUSE",e.AD_PLAYING="AD_PLAYING",e.MUTING_READY="MUTING_READY",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_PAUSE="MUTING_PAUSE",e.CASTING="CASTING",e.SOURCE_CHANGING="SOURCE_CHANGING",e.INITIAL_SOURCE_CHANGE="INITIAL_SOURCE_CHANGE",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE"}(a||(a={}));var p=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.debuggingStates=[],i.enabledDebugging=!1,i.seekTimestamp=0,i.seekedTimestamp=0,i.seekStarted=!1,i.seekEnded=!1,i}return r(t,e),t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter((function(t){return e.indexOf(t)<0}))},t.prototype.getAllStates=function(){return Object.keys(a).map((function(e){return a[e]}))},t.prototype.createStateMachine=function(e){var t=this;return o.create({initial:a.SETUP,error:E.customStateMachineErrorCallback,events:[{name:s.Event.SOURCE_LOADED,from:[a.SETUP,a.ERROR,a.SOURCE_CHANGING,a.INITIAL_SOURCE_CHANGE],to:a.READY},{name:s.Event.PLAY,from:a.READY,to:a.STARTUP},{name:s.Event.PLAYING,from:a.READY,to:a.PLAYING},(0,E.on)(s.Event.READY).stayIn(a.READY),(0,E.on)(s.Event.VIDEO_CHANGE).stayIn(a.READY),(0,E.on)(s.Event.AUDIO_CHANGE).stayIn(a.READY),{name:s.Event.ERROR,from:[a.STARTUP,a.AD_STARTUP],to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.UNLOAD,from:[a.STARTUP,a.AD_STARTUP],to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.VIDEOSTART_TIMEOUT,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTART},(0,E.on)(s.Event.PLAY).stayIn(a.STARTUP),(0,E.on)(s.Event.PLAYING).stayIn(a.STARTUP),{name:s.Event.TIMECHANGED,from:a.STARTUP,to:a.PLAYING},(0,E.on)(s.Event.START_BUFFERING).stayIn(a.STARTUP),(0,E.on)(s.Event.END_BUFFERING).stayIn(a.STARTUP),(0,E.on)(s.Event.VIDEO_CHANGE).stayIn(a.STARTUP),(0,E.on)(s.Event.AUDIO_CHANGE).stayIn(a.STARTUP),(0,E.on)(s.Event.READY).stayIn(a.STARTUP),{name:s.Event.PAUSE,from:a.STARTUP,to:a.READY},(0,E.on)(s.Event.PLAYING).stayIn(a.PLAYING),(0,E.on)(s.Event.TIMECHANGED).stayIn(a.PLAYING),(0,E.on)(s.Event.END_BUFFERING).stayIn(a.PLAYING),{name:s.Event.START_BUFFERING,from:a.PLAYING,to:a.REBUFFERING},{name:s.Event.END_BUFFERING,from:a.REBUFFERING,to:a.PLAYING},(0,E.on)(s.Event.TIMECHANGED).stayIn(a.REBUFFERING),{name:s.Event.PAUSE,from:a.PLAYING,to:a.PAUSE},{name:s.Event.PAUSE,from:a.REBUFFERING,to:a.PAUSE},{name:s.Event.PLAY,from:a.PAUSE,to:a.PLAYING},{name:s.Event.VIDEO_CHANGE,from:a.PLAYING,to:a.QUALITYCHANGE},{name:s.Event.AUDIO_CHANGE,from:a.PLAYING,to:a.QUALITYCHANGE},(0,E.on)(s.Event.VIDEO_CHANGE).stayIn(a.QUALITYCHANGE),(0,E.on)(s.Event.AUDIO_CHANGE).stayIn(a.QUALITYCHANGE),{name:"FINISH_QUALITYCHANGE",from:a.QUALITYCHANGE,to:a.PLAYING},{name:s.Event.VIDEO_CHANGE,from:a.PAUSE,to:a.QUALITYCHANGE_PAUSE},{name:s.Event.AUDIO_CHANGE,from:a.PAUSE,to:a.QUALITYCHANGE_PAUSE},(0,E.on)(s.Event.VIDEO_CHANGE).stayIn(a.QUALITYCHANGE_PAUSE),(0,E.on)(s.Event.AUDIO_CHANGE).stayIn(a.QUALITYCHANGE_PAUSE),{name:"FINISH_QUALITYCHANGE_PAUSE",from:a.QUALITYCHANGE_PAUSE,to:a.PAUSE},{name:s.Event.SEEK,from:a.PLAYING,to:a.PLAY_SEEKING},{name:s.Event.PLAY,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.PLAYING,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SEEKED,from:a.PLAY_SEEKING,to:a.END_PLAY_SEEKING},{name:s.Event.SEEK,from:a.END_PLAY_SEEKING,to:a.PLAY_SEEKING},{name:s.Event.PLAYING,from:a.END_PLAY_SEEKING,to:a.PLAYING},{name:s.Event.TIMECHANGED,from:a.END_PLAY_SEEKING,to:a.PLAYING},(0,E.on)(s.Event.SEEK).stayIn(a.PLAY_SEEKING),(0,E.on)(s.Event.AUDIO_CHANGE).stayIn(a.PLAY_SEEKING),(0,E.on)(s.Event.VIDEO_CHANGE).stayIn(a.PLAY_SEEKING),(0,E.on)(s.Event.START_BUFFERING).stayIn(a.PLAY_SEEKING),(0,E.on)(s.Event.END_BUFFERING).stayIn(a.PLAY_SEEKING),(0,E.on)(s.Event.START_BUFFERING).stayIn(a.END_PLAY_SEEKING),(0,E.on)(s.Event.END_BUFFERING).stayIn(a.END_PLAY_SEEKING),(0,E.on)(s.Event.SEEKED).stayIn(a.END_PLAY_SEEKING),(0,E.on)(s.Event.PLAY).stayIn(a.END_PLAY_SEEKING),(0,E.on)(s.Event.SEEK).stayIn(a.PAUSE),(0,E.on)(s.Event.SEEKED).stayIn(a.PAUSE),(0,E.on)(s.Event.SEEKED).stayIn(a.PLAYING),{name:s.Event.END,from:a.PLAY_SEEKING,to:a.END},{name:s.Event.END,from:a.PLAYING,to:a.END},{name:s.Event.END,from:a.PAUSE,to:a.END},(0,E.on)(s.Event.SEEK).stayIn(a.END),(0,E.on)(s.Event.SEEKED).stayIn(a.END),(0,E.on)(s.Event.TIMECHANGED).stayIn(a.END),(0,E.on)(s.Event.END_BUFFERING).stayIn(a.END),(0,E.on)(s.Event.START_BUFFERING).stayIn(a.END),(0,E.on)(s.Event.END).stayIn(a.END),{name:s.Event.PLAY,from:a.END,to:a.STARTUP},{name:s.Event.ERROR,from:this.getAllStatesBut([a.STARTUP]),to:a.ERROR},{name:s.Event.UNLOAD,from:this.getAllStatesBut([a.STARTUP,a.AD_STARTUP]),to:a.END},{name:s.Event.CUSTOM_DATA_CHANGE,from:[a.PLAYING,a.PAUSE],to:a.CUSTOMDATACHANGE},{name:s.Event.PLAYING,from:a.CUSTOMDATACHANGE,to:a.PLAYING},{name:s.Event.PAUSE,from:a.CUSTOMDATACHANGE,to:a.PAUSE},{name:s.Event.SUBTITLE_CHANGE,from:a.PLAYING,to:a.SUBTITLE_CHANGING},(0,E.on)(s.Event.SUBTITLE_CHANGE).stayIn(a.PAUSE),(0,E.on)(s.Event.SUBTITLE_CHANGE).stayIn(a.REBUFFERING),(0,E.on)(s.Event.SUBTITLE_CHANGE).stayIn(a.END_PLAY_SEEKING),(0,E.on)(s.Event.SUBTITLE_CHANGE).stayIn(a.SUBTITLE_CHANGING),{name:s.Event.TIMECHANGED,from:a.SUBTITLE_CHANGING,to:a.PLAYING},{name:s.Event.AUDIOTRACK_CHANGED,from:a.PLAYING,to:a.AUDIOTRACK_CHANGING},(0,E.on)(s.Event.AUDIOTRACK_CHANGED).stayIn(a.PAUSE),(0,E.on)(s.Event.AUDIOTRACK_CHANGED).stayIn(a.REBUFFERING),(0,E.on)(s.Event.AUDIOTRACK_CHANGED).stayIn(a.END_PLAY_SEEKING),(0,E.on)(s.Event.AUDIOTRACK_CHANGED).stayIn(a.AUDIOTRACK_CHANGING),{name:s.Event.TIMECHANGED,from:a.AUDIOTRACK_CHANGING,to:a.PLAYING},{name:s.Event.START_AD,from:a.STARTUP,to:a.AD_STARTUP},{name:s.Event.END_AD,from:a.AD_STARTUP,to:a.STARTUP},(0,E.on)(s.Event.PLAY).stayIn(a.AD_STARTUP),(0,E.on)(s.Event.PAUSE).stayIn(a.AD_STARTUP),{name:s.Event.START_AD,from:a.READY,to:a.AD_READY},{name:s.Event.END_AD,from:a.AD_READY,to:a.STARTUP},(0,E.on)(s.Event.PLAY).stayIn(a.AD_READY),(0,E.on)(s.Event.PAUSE).stayIn(a.AD_READY),{name:s.Event.START_AD,from:a.PAUSE,to:a.AD_PAUSE},{name:s.Event.END_AD,from:a.AD_PAUSE,to:a.PAUSE},(0,E.on)(s.Event.PLAY).stayIn(a.AD_PAUSE),(0,E.on)(s.Event.PAUSE).stayIn(a.AD_PAUSE),{name:s.Event.START_AD,from:a.PLAYING,to:a.AD_PLAYING},{name:s.Event.END_AD,from:a.AD_PLAYING,to:a.PLAYING},(0,E.on)(s.Event.PLAY).stayIn(a.AD_PLAYING),(0,E.on)(s.Event.PAUSE).stayIn(a.AD_PLAYING),{name:s.Event.END,from:a.AD_PLAYING,to:a.END},(0,E.on)(s.Event.TIMECHANGED).stayIn(a.AD_STARTUP),(0,E.on)(s.Event.TIMECHANGED).stayIn(a.AD_READY),(0,E.on)(s.Event.TIMECHANGED).stayIn(a.AD_PAUSE),(0,E.on)(s.Event.TIMECHANGED).stayIn(a.AD_PLAYING),(0,E.on)(s.Event.END_AD).stayIn(a.PLAYING),(0,E.on)(s.Event.END_AD).stayIn(a.PAUSE),(0,E.on)(s.Event.END_AD).stayIn(a.READY),(0,E.on)(s.Event.END_AD).stayIn(a.STARTUP),{name:s.Event.MUTE,from:a.READY,to:a.MUTING_READY},{name:s.Event.UN_MUTE,from:a.READY,to:a.MUTING_READY},{name:"FINISH_MUTING",from:a.MUTING_READY,to:a.READY},{name:s.Event.MUTE,from:a.PLAYING,to:a.MUTING_PLAY},{name:s.Event.UN_MUTE,from:a.PLAYING,to:a.MUTING_PLAY},{name:"FINISH_MUTING",from:a.MUTING_PLAY,to:a.PLAYING},{name:s.Event.MUTE,from:a.PAUSE,to:a.MUTING_PAUSE},{name:s.Event.UN_MUTE,from:a.PAUSE,to:a.MUTING_PAUSE},{name:"FINISH_MUTING",from:a.MUTING_PAUSE,to:a.PAUSE},{name:s.Event.START_CAST,from:[a.READY,a.PAUSE,a.PLAYING],to:a.CASTING},(0,E.on)(s.Event.PAUSE).stayIn(a.CASTING),(0,E.on)(s.Event.PLAY).stayIn(a.CASTING),(0,E.on)(s.Event.PLAYING).stayIn(a.CASTING),(0,E.on)(s.Event.TIMECHANGED).stayIn(a.CASTING),(0,E.on)(s.Event.MUTE).stayIn(a.CASTING),(0,E.on)(s.Event.UN_MUTE).stayIn(a.CASTING),(0,E.on)(s.Event.SEEK).stayIn(a.CASTING),(0,E.on)(s.Event.SEEKED).stayIn(a.CASTING),{name:s.Event.END_CAST,from:a.CASTING,to:a.READY},(0,E.on)(s.Event.SEEK).stayIn(a.READY),(0,E.on)(s.Event.SEEKED).stayIn(a.READY),(0,E.on)(s.Event.SEEKED).stayIn(a.STARTUP),{name:s.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStatesBut([a.SETUP]),to:a.SOURCE_CHANGING},{name:s.Event.MANUAL_SOURCE_CHANGE,from:a.SETUP,to:a.INITIAL_SOURCE_CHANGE},{name:s.Event.SOURCE_UNLOADED,from:this.getAllStates(),to:a.SOURCE_CHANGING},{name:s.Event.VIDEO_CHANGE,from:a.REBUFFERING,to:a.QUALITYCHANGE_REBUFFERING},{name:s.Event.AUDIO_CHANGE,from:a.REBUFFERING,to:a.QUALITYCHANGE_REBUFFERING},(0,E.on)(s.Event.VIDEO_CHANGE).stayIn(a.QUALITYCHANGE_REBUFFERING),(0,E.on)(s.Event.AUDIO_CHANGE).stayIn(a.QUALITYCHANGE_REBUFFERING),{name:"FINISH_QUALITYCHANGE_REBUFFERING",from:a.QUALITYCHANGE_REBUFFERING,to:a.REBUFFERING}],callbacks:{onbeforeevent:function(e,t,n,i,r){if(t===a.REBUFFERING&&n===a.QUALITYCHANGE_REBUFFERING)return!1},onafterevent:function(e,n,i,r,o){e===s.Event.MANUAL_SOURCE_CHANGE&&n===a.SETUP?t.stateMachineCallbacks.initialSourceChange(o):e===s.Event.MANUAL_SOURCE_CHANGE&&t.stateMachineCallbacks.manualSourceChange(o),i===a.QUALITYCHANGE_PAUSE&&t.stateMachine.FINISH_QUALITYCHANGE_PAUSE(r),i===a.QUALITYCHANGE&&t.stateMachine.FINISH_QUALITYCHANGE(r),i===a.QUALITYCHANGE_REBUFFERING&&t.stateMachine.FINISH_QUALITYCHANGE_REBUFFERING(r),i!==a.MUTING_READY&&i!==a.MUTING_PLAY&&i!==a.MUTING_PAUSE||t.stateMachine.FINISH_MUTING(r)},onenterstate:function(n,i,r,o,c){"none"===i&&e.starttime?t.onEnterStateTimestamp=e.starttime:t.onEnterStateTimestamp=o||(new Date).getTime(),l.logger.log("[ENTER ".concat(o,"] ").concat((0,l.padRight)(r,20)," EVENT: ").concat((0,l.padRight)(n,20)," from: ").concat((0,l.padRight)(i,14))),!c||r===a.END_PLAY_SEEKING||i===a.PLAY_SEEKING||i===a.AD_STARTUP||i===a.AD_READY||i===a.AD_PLAYING||i===a.AD_PAUSE||n===s.Event.SEEK&&i===a.END_PLAY_SEEKING||t.stateMachineCallbacks.setVideoTimeStartFromEvent(c),n===s.Event.START_CAST&&r===a.CASTING&&t.stateMachineCallbacks.startCasting(o,c),r===a.REBUFFERING&&t.startRebufferingHeartbeatInterval()},onleavestate:function(e,n,i,r,o){if(n===a.REBUFFERING&&t.resetRebufferingHelpers(),r){l.logger.log("[LEAVE ".concat(r,"] ").concat((0,l.padRight)(n,20)," EVENT: ").concat((0,l.padRight)(e,20)," to: ").concat((0,l.padRight)(i,20))),t.addStatesToLog(e,n,i,r,o);var c=r-t.onEnterStateTimestamp;o&&i!==a.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(o),o&&e!==s.Event.END_AD&&(t.lastTrackedVideoEndObject=o),n!==a.READY&&n!==a.AD_STARTUP||i!==a.STARTUP?n!==a.STARTUP||i!==a.PLAYING&&i!==a.AD_STARTUP||t.clearVideoStartTimeout():t.setVideoStartTimeout();var d=String(n).toLowerCase();if(i===a.EXIT_BEFORE_VIDEOSTART){t.clearVideoStartTimeout();var p=t.getVideoStartupFailedEventData(r,e,o),h=e!==s.Event.ERROR;t.stateMachineCallbacks.videoStartFailed(p,h)}else if(n===a.END_PLAY_SEEKING){var v=t.seekedTimestamp-t.seekTimestamp;t.seekStarted&&t.seekEnded&&e!==s.Event.SEEK&&(t.seekStarted=t.seekEnded=!1,t.stateMachineCallbacks.end_play_seeking(v,d))}else if(e===s.Event.UNLOAD)t.stateMachineCallbacks.unload(c,d);else if(n===a.AD_PAUSE||n===a.AD_READY||n===a.AD_PLAYING||n===a.AD_STARTUP)t.stateMachineCallbacks.setVideoTimeStartFromEvent(t.lastTrackedVideoEndObject),t.stateMachineCallbacks.setVideoTimeEndFromEvent(t.lastTrackedVideoEndObject),t.stateMachineCallbacks.ad(c,"ad");else if(e===s.Event.START_AD&&n===a.STARTUP)(0,u.noOp)();else if(e===s.Event.SOURCE_LOADED&&n===a.INITIAL_SOURCE_CHANGE)(0,u.noOp)();else if(n===a.SETUP)t.stateMachineCallbacks.setup(1,a.SETUP.toLowerCase());else if(e===s.Event.PAUSE&&n===a.STARTUP&&i===a.READY)t.clearVideoStartTimeout();else if(n!==a.ERROR){var f=t.stateMachineCallbacks[d];if("function"==typeof f)try{f(c,d,o)}catch(e){l.logger.error("Exception occurred in State Machine callback "+d,o,e)}else(0,E.logMissingCallbackWarning)(n,[a.READY,a.SOURCE_CHANGING])}o&&i!==a.END_PLAY_SEEKING&&n!==a.PLAY_SEEKING&&i!==a.PLAY_SEEKING&&n!==a.AD_STARTUP&&n!==a.AD_READY&&n!==a.AD_PLAYING&&n!==a.AD_PAUSE&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(o),e===s.Event.VIDEO_CHANGE?t.stateMachineCallbacks.videoChange(o):e===s.Event.AUDIO_CHANGE?t.stateMachineCallbacks.audioChange(o):e===s.Event.MUTE?t.stateMachineCallbacks.mute():e===s.Event.UN_MUTE&&t.stateMachineCallbacks.unMute()}},onseek:function(e,n,i,r){t.seekStarted||(t.seekTimestamp=r,t.seekStarted=!0)},onseeked:function(e,n,i,r){t.seekedTimestamp=r,t.seekEnded=!0},ontimechanged:function(e,n,i,r,a){t.maybeSendHeartbeat(r,a)},onplayerError:function(e,n,i,r,a){t.stateMachineCallbacks.error(a)}}})},t.prototype.onSsaiInteraction=function(e,t){if(this.currentState==a.PLAYING){var n=e-this.onEnterStateTimestamp;this.sendCurrentStateSample(e,n,t)}},t.prototype.maybeSendHeartbeat=function(e,t){if("PLAYING"===this.stateMachine.current){var n=e-this.onEnterStateTimestamp;n>59700&&this.sendCurrentStateSample(e,n,t)}},t.prototype.sendCurrentStateSample=function(e,t,n){this.stateMachineCallbacks.setVideoTimeEndFromEvent(n);var i=this.stateMachine.current.toLowerCase(),r=(0,E.createHeartbeatPayload)(t,i);this.stateMachineCallbacks.heartbeat(t,i,r),this.onEnterStateTimestamp=e,this.stateMachineCallbacks.setVideoTimeStartFromEvent(n)},t.prototype.callEvent=function(e,t,n){var i=this.stateMachine[e];if(i)try{i.call(this.stateMachine,n,t)}catch(n){l.logger.error("Exception occured in State Machine callback "+e,i,t,n)}else l.logger.log("Ignored Event: "+e)},t.prototype.addStatesToLog=function(e,t,n,i,r){this.enabledDebugging&&this.debuggingStates.push(new c.EventDebugging(e,t,n,i,r))},t.prototype.getStates=function(){return this.debuggingStates},t.prototype.setEnabledDebugging=function(e){this.enabledDebugging=e},t}(d.AnalyticsStateMachine);t.Bitmovin8AnalyticsStateMachine=p},3674:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.HTML5AnalyticsStateMachine=void 0;var o,s=n(2595),c=n(2361),l=n(1916),u=n(5063),d=n(7596),E=n(8253);!function(e){e.INITIALIZED="INITIALIZED",e.SETUP="SETUP",e.STARTUP="STARTUP",e.READY="READY",e.PLAYING="PLAYING",e.REBUFFERING="REBUFFERING",e.PAUSE="PAUSE",e.QUALITYCHANGE="QUALITYCHANGE",e.PAUSED_SEEKING="PAUSED_SEEKING",e.QUALITYCHANGE_PAUSE="QUALITYCHANGE_PAUSE",e.QUALITYCHANGE_REBUFFERING="QUALITYCHANGE_REBUFFERING",e.END="END",e.ERROR="ERROR",e.AD="AD",e.SOURCE_CHANGING="SOURCE_CHANGING",e.MUTING_READY="MUTING_READY",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_PAUSE="MUTING_PAUSE",e.CASTING="CASTING",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE"}(o||(o={}));var p=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.createStateMachine(n),i}return r(t,e),t.prototype.getAllStates=function(){return a(a([],Object.keys(o).map((function(e){return o[e]})),!0),["FINISH_QUALITYCHANGE_PAUSE","FINISH_QUALITYCHANGE","FINISH_QUALITYCHANGE_REBUFFERING"],!1)},t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter((function(t){return e.indexOf(t)<0}))},t.prototype.createStateMachine=function(e){var t,n=this;return s.create({initial:o.INITIALIZED,error:E.customStateMachineErrorCallback,events:[{name:c.Event.SETUP,from:o.INITIALIZED,to:o.SETUP},(0,E.on)(c.Event.SETUP).stayIn(o.SETUP),(0,E.on)(c.Event.TIMECHANGED).stayIn(o.SETUP),{name:c.Event.READY,from:[o.SETUP,o.ERROR,o.END,o.SOURCE_CHANGING],to:o.READY},(0,E.on)(c.Event.READY).stayIn(o.READY),{name:c.Event.READY,from:o.STARTUP,to:o.STARTUP},{name:c.Event.PLAY,from:o.READY,to:o.STARTUP},{name:c.Event.ERROR,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:c.Event.UNLOAD,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:c.Event.VIDEOSTART_TIMEOUT,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},(0,E.on)(c.Event.START_BUFFERING).stayIn(o.STARTUP),(0,E.on)(c.Event.END_BUFFERING).stayIn(o.STARTUP),(0,E.on)(c.Event.VIDEO_CHANGE).stayIn(o.STARTUP),(0,E.on)(c.Event.AUDIO_CHANGE).stayIn(o.STARTUP),{name:c.Event.TIMECHANGED,from:o.READY,to:o.STARTUP},{name:c.Event.TIMECHANGED,from:o.STARTUP,to:o.PLAYING},(0,E.on)(c.Event.TIMECHANGED).stayIn(o.PLAYING),(0,E.on)(c.Event.SEEKED).stayIn(o.PAUSE),(0,E.on)(c.Event.END_BUFFERING).stayIn(o.PLAYING),{name:c.Event.START_BUFFERING,from:o.PLAYING,to:o.REBUFFERING},(0,E.on)(c.Event.START_BUFFERING).stayIn(o.REBUFFERING),{name:c.Event.PLAY,from:o.REBUFFERING,to:o.PLAYING},{name:c.Event.TIMECHANGED,from:o.REBUFFERING,to:o.PLAYING},(0,E.on)(c.Event.SEEK).stayIn(o.STARTUP),(0,E.on)(c.Event.PLAY).stayIn(o.PAUSED_SEEKING),{name:c.Event.PAUSE,from:o.PLAYING,to:o.PAUSE},{name:c.Event.PAUSE,from:o.REBUFFERING,to:o.PAUSE},{name:c.Event.PLAY,from:o.PAUSE,to:o.PLAYING},{name:c.Event.TIMECHANGED,from:o.PAUSE,to:o.PLAYING},{name:c.Event.VIDEO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},{name:c.Event.AUDIO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},(0,E.on)(c.Event.VIDEO_CHANGE).stayIn(o.QUALITYCHANGE),(0,E.on)(c.Event.AUDIO_CHANGE).stayIn(o.QUALITYCHANGE),{name:"FINISH_QUALITYCHANGE",from:o.QUALITYCHANGE,to:o.PLAYING},{name:c.Event.VIDEO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:c.Event.AUDIO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},(0,E.on)(c.Event.VIDEO_CHANGE).stayIn(o.QUALITYCHANGE_PAUSE),(0,E.on)(c.Event.AUDIO_CHANGE).stayIn(o.QUALITYCHANGE_PAUSE),{name:"FINISH_QUALITYCHANGE_PAUSE",from:o.QUALITYCHANGE_PAUSE,to:o.PAUSE},{name:c.Event.SEEK,from:o.PAUSE,to:o.PAUSED_SEEKING},(0,E.on)(c.Event.SEEK).stayIn(o.PAUSED_SEEKING),(0,E.on)(c.Event.AUDIO_CHANGE).stayIn(o.PAUSED_SEEKING),(0,E.on)(c.Event.VIDEO_CHANGE).stayIn(o.PAUSED_SEEKING),(0,E.on)(c.Event.START_BUFFERING).stayIn(o.PAUSED_SEEKING),(0,E.on)(c.Event.END_BUFFERING).stayIn(o.PAUSED_SEEKING),{name:c.Event.SEEKED,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:c.Event.TIMECHANGED,from:o.PAUSED_SEEKING,to:o.PLAYING},{name:c.Event.PAUSE,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:c.Event.END,from:o.PAUSED_SEEKING,to:o.END},{name:c.Event.END,from:o.PLAYING,to:o.END},{name:c.Event.END,from:o.PAUSE,to:o.END},(0,E.on)(c.Event.PAUSE).stayIn(o.END),(0,E.on)(c.Event.SEEK).stayIn(o.END),(0,E.on)(c.Event.SEEKED).stayIn(o.END),(0,E.on)(c.Event.TIMECHANGED).stayIn(o.END),(0,E.on)(c.Event.END_BUFFERING).stayIn(o.END),(0,E.on)(c.Event.START_BUFFERING).stayIn(o.END),(0,E.on)(c.Event.END).stayIn(o.END),(0,E.on)(c.Event.SEEKED).stayIn(o.PLAYING),(0,E.on)(c.Event.SEEK).stayIn(o.PLAYING),{name:c.Event.PLAY,from:o.END,to:o.PLAYING},{name:c.Event.ERROR,from:this.getAllStatesBut([o.STARTUP]),to:o.ERROR},{name:c.Event.PAUSE,from:o.ERROR,to:o.ERROR},{name:c.Event.UNLOAD,from:this.getAllStatesBut([o.STARTUP]),to:o.END},{name:c.Event.SUBTITLE_CHANGE,from:o.PLAYING,to:o.SUBTITLE_CHANGING},(0,E.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.PAUSE),(0,E.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.READY),(0,E.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.STARTUP),(0,E.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.REBUFFERING),(0,E.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.SUBTITLE_CHANGING),{name:c.Event.TIMECHANGED,from:o.SUBTITLE_CHANGING,to:o.PLAYING},{name:c.Event.AUDIOTRACK_CHANGED,from:o.PLAYING,to:o.AUDIOTRACK_CHANGING},(0,E.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(o.PAUSE),(0,E.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(o.READY),(0,E.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(o.STARTUP),(0,E.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(o.REBUFFERING),(0,E.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(o.AUDIOTRACK_CHANGING),{name:c.Event.TIMECHANGED,from:o.AUDIOTRACK_CHANGING,to:o.PLAYING},{name:c.Event.START_AD,from:o.PLAYING,to:o.AD},{name:c.Event.END_AD,from:o.AD,to:o.PLAYING},{name:c.Event.MUTE,from:o.READY,to:o.MUTING_READY},{name:c.Event.UN_MUTE,from:o.READY,to:o.MUTING_READY},{name:"FINISH_MUTING",from:o.MUTING_READY,to:o.READY},{name:c.Event.MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:c.Event.UN_MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:"FINISH_MUTING",from:o.MUTING_PLAY,to:o.PLAYING},{name:c.Event.MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:c.Event.UN_MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:"FINISH_MUTING",from:o.MUTING_PAUSE,to:o.PAUSE},{name:c.Event.START_CAST,from:[o.READY,o.PAUSE],to:o.CASTING},(0,E.on)(c.Event.PAUSE).stayIn(o.CASTING),(0,E.on)(c.Event.PLAY).stayIn(o.CASTING),(0,E.on)(c.Event.TIMECHANGED).stayIn(o.CASTING),(0,E.on)(c.Event.MUTE).stayIn(o.CASTING),(0,E.on)(c.Event.SEEK).stayIn(o.CASTING),(0,E.on)(c.Event.SEEKED).stayIn(o.CASTING),{name:c.Event.END_CAST,from:o.CASTING,to:o.READY},(0,E.on)(c.Event.SEEK).stayIn(o.READY),(0,E.on)(c.Event.SEEKED).stayIn(o.READY),(0,E.on)(c.Event.SEEKED).stayIn(o.STARTUP),{name:c.Event.SOURCE_LOADED,from:this.getAllStates(),to:o.SETUP},{name:c.Event.SOURCE_UNLOADED,from:this.getAllStates(),to:o.SOURCE_CHANGING},{name:c.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStates(),to:o.SOURCE_CHANGING},(0,E.on)(c.Event.TIMECHANGED).stayIn(o.SOURCE_CHANGING),(0,E.on)(c.Event.PAUSE).stayIn(o.SOURCE_CHANGING),{name:c.Event.VIDEO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:c.Event.AUDIO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},(0,E.on)(c.Event.VIDEO_CHANGE).stayIn(o.QUALITYCHANGE_REBUFFERING),(0,E.on)(c.Event.AUDIO_CHANGE).stayIn(o.QUALITYCHANGE_REBUFFERING),{name:"FINISH_QUALITYCHANGE_REBUFFERING",from:o.QUALITYCHANGE_REBUFFERING,to:o.REBUFFERING},{name:c.Event.CUSTOM_DATA_CHANGE,from:[o.PLAYING,o.PAUSE],to:o.CUSTOMDATACHANGE},{name:c.Event.PLAYING,from:o.CUSTOMDATACHANGE,to:o.PLAYING},{name:c.Event.PAUSE,from:o.CUSTOMDATACHANGE,to:o.PAUSE},{name:c.Event.PLAYLIST_TRANSITION,from:this.getAllStates(),to:o.READY}],callbacks:(t={},t["onenter".concat(o.SOURCE_CHANGING)]=function(e,t,i,r,a){e===c.Event.MANUAL_SOURCE_CHANGE&&n.stateMachineCallbacks.manualSourceChange(a)},t["onenter".concat(o.STARTUP)]=function(e,t,i,r,a){n.setVideoStartTimeout()},t.onenterstate=function(t,i,r,a,s){"none"===i&&e.starttime?n.onEnterStateTimestamp=e.starttime:n.onEnterStateTimestamp=a||u.getCurrentTimestamp(),l.logger.log("[ENTER ".concat(a,"] ").concat((0,l.padRight)(r,20)," EVENT: ").concat((0,l.padRight)(t,20)," from: ").concat((0,l.padRight)(i,14))),s&&r!==o.PAUSED_SEEKING&&n.stateMachineCallbacks.setVideoTimeStartFromEvent(s),t===c.Event.START_CAST&&r===o.CASTING&&n.stateMachineCallbacks.startCasting(a,s),r===o.REBUFFERING&&n.startRebufferingHeartbeatInterval()},t.onafterevent=function(e,t,i,r,a){e===c.Event.PLAYLIST_TRANSITION&&n.stateMachineCallbacks.playlistTransition(a),i===o.QUALITYCHANGE_PAUSE&&n.stateMachine.FINISH_QUALITYCHANGE_PAUSE(r),i===o.QUALITYCHANGE&&n.stateMachine.FINISH_QUALITYCHANGE(r),i===o.QUALITYCHANGE_REBUFFERING&&n.stateMachine.FINISH_QUALITYCHANGE_REBUFFERING(r),i!==o.MUTING_READY&&i!==o.MUTING_PLAY&&i!==o.MUTING_PAUSE||n.stateMachine.FINISH_MUTING(r)},t["onleave".concat(o.STARTUP)]=function(e,t,i,r,a){n.clearVideoStartTimeout()},t.onleavestate=function(e,t,i,r,a){if(t===o.REBUFFERING&&n.resetRebufferingHelpers(),r&&(t!==o.ERROR||e!==c.Event.MANUAL_SOURCE_CHANGE&&e!==c.Event.SOURCE_UNLOADED)){l.logger.log("[LEAVE ".concat(r,"] ").concat((0,l.padRight)(t,20)," EVENT: ").concat((0,l.padRight)(e,20)," to: ").concat((0,l.padRight)(i,20)));var s=r-n.onEnterStateTimestamp;a&&i!==o.PAUSED_SEEKING&&n.stateMachineCallbacks.setVideoTimeEndFromEvent(a);var u=String(t).toLowerCase();if(i===o.EXIT_BEFORE_VIDEOSTART){n.clearVideoStartTimeout();var d=n.getVideoStartupFailedEventData(r,e,a),p=e!==c.Event.ERROR;n.stateMachineCallbacks.videoStartFailed(d,p)}else if(t===o.PAUSED_SEEKING)n.stateMachineCallbacks[u](s,u,a);else if(e===c.Event.UNLOAD)n.stateMachineCallbacks.unload(s,u);else if(t===o.PAUSE&&i!==o.PAUSED_SEEKING)n.stateMachineCallbacks.setVideoTimeStartFromEvent(e),n.stateMachineCallbacks.pause(s,u);else{var h=n.stateMachineCallbacks[u];"function"==typeof h?h(s,u,a):(0,E.logMissingCallbackWarning)(t,[o.READY,o.SOURCE_CHANGING])}a&&i!==o.PAUSED_SEEKING&&n.stateMachineCallbacks.setVideoTimeStartFromEvent(a),e===c.Event.VIDEO_CHANGE?n.stateMachineCallbacks.videoChange(a):e===c.Event.AUDIO_CHANGE?n.stateMachineCallbacks.audioChange(a):e===c.Event.MUTE?n.stateMachineCallbacks.mute():e===c.Event.UN_MUTE&&n.stateMachineCallbacks.unMute()}},t.ontimechanged=function(e,t,i,r,a){var o=r-n.onEnterStateTimestamp;o>59700&&n.onHeartbeat(r,o,String(t).toLowerCase(),a)},t.onplayerError=function(e,t,i,r,a){n.stateMachineCallbacks.error(a)},t)})},t.prototype.onHeartbeat=function(e,t,n,i){if(this.currentState==o.PLAYING){this.stateMachineCallbacks.setVideoTimeEndFromEvent(i);var r=(0,E.createHeartbeatPayload)(t,n);this.stateMachineCallbacks.heartbeat(t,n,r),this.onEnterStateTimestamp=e,this.stateMachineCallbacks.setVideoTimeStartFromEvent(i)}},t.prototype.callEvent=function(e,t,n){var i=this.stateMachine[e];i?i.call(this.stateMachine,n,t):l.logger.log("Ignored Event: "+e)},t}(d.AnalyticsStateMachine);t.HTML5AnalyticsStateMachine=p},5182:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.VideojsAnalyticsStateMachine=void 0;var o,s=n(2595),c=n(2361),l=n(1916),u=n(7596),d=n(8253);!function(e){e.AD="AD",e.SETUP="SETUP",e.STARTUP="STARTUP",e.READY="READY",e.PLAYING="PLAYING",e.REBUFFERING="REBUFFERING",e.PAUSE="PAUSE",e.QUALITYCHANGE="QUALITYCHANGE",e.PAUSED_SEEKING="PAUSED_SEEKING",e.PLAY_SEEKING="PLAY_SEEKING",e.END_PLAY_SEEKING="END_PLAY_SEEKING",e.QUALITYCHANGE_PAUSE="QUALITYCHANGE_PAUSE",e.QUALITYCHANGE_REBUFFERING="QUALITYCHANGE_REBUFFERING",e.SOURCE_CHANGING="SOURCE_CHANGING",e.END="END",e.ERROR="ERROR",e.MUTING_READY="MUTING_READY",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_PAUSE="MUTING_PAUSE",e.CASTING="CASTING",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.AUDIOTRACK_CHANGED_PLAYING="AUDIOTRACK_CHANGED_PLAYING",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.SUBTITLE_CHANGED_PLAYING="SUBTITLE_CHANGED_PLAYING",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE"}(o||(o={}));var E=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.seekTimestamp=0,i.seekedTimestamp=0,i}return r(t,e),t.prototype.getAllStates=function(){return a(a([],Object.keys(o).map((function(e){return o[e]})),!0),["FINISH_PLAY_SEEKING","PLAY_SEEK","FINISH_QUALITYCHANGE_PAUSE","FINISH_QUALITYCHANGE","FINISH_QUALITYCHANGE_REBUFFERING"],!1)},t.prototype.getAllStatesBut=function(e){return this.getAllStates().filter((function(t){return t!==e}))},t.prototype.createStateMachine=function(e){var t=this;return s.create({initial:o.SETUP,error:d.customStateMachineErrorCallback,events:[{name:c.Event.SOURCE_LOADED,from:[o.SETUP,o.ERROR,o.SOURCE_CHANGING],to:o.READY},(0,d.on)(c.Event.TIMECHANGED).stayIn(o.SETUP),(0,d.on)(c.Event.SOURCE_LOADED).stayIn(o.READY),{name:c.Event.READY,from:[o.SETUP,o.ERROR],to:o.READY},{name:c.Event.PLAY,from:o.READY,to:o.STARTUP},{name:c.Event.ERROR,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:c.Event.UNLOAD,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},{name:c.Event.VIDEOSTART_TIMEOUT,from:o.STARTUP,to:o.EXIT_BEFORE_VIDEOSTART},(0,d.on)(c.Event.START_BUFFERING).stayIn(o.STARTUP),(0,d.on)(c.Event.END_BUFFERING).stayIn(o.STARTUP),(0,d.on)(c.Event.VIDEO_CHANGE).stayIn(o.STARTUP),(0,d.on)(c.Event.AUDIO_CHANGE).stayIn(o.STARTUP),{name:c.Event.TIMECHANGED,from:o.STARTUP,to:o.PLAYING},(0,d.on)(c.Event.TIMECHANGED).stayIn(o.PLAYING),(0,d.on)(c.Event.END_BUFFERING).stayIn(o.PLAYING),{name:c.Event.START_BUFFERING,from:o.PLAYING,to:o.REBUFFERING},(0,d.on)(c.Event.START_BUFFERING).stayIn(o.REBUFFERING),{name:c.Event.TIMECHANGED,from:o.REBUFFERING,to:o.PLAYING},(0,d.on)(c.Event.SEEK).stayIn(o.STARTUP),{name:c.Event.SEEK,from:o.PLAYING,to:o.PLAY_SEEKING},(0,d.on)(c.Event.TIMECHANGED).stayIn(o.PLAY_SEEKING),(0,d.on)(c.Event.TIMECHANGED).stayIn(o.PAUSED_SEEKING),{name:c.Event.PAUSE,from:o.PLAYING,to:o.PAUSE},{name:c.Event.PAUSE,from:o.REBUFFERING,to:o.PAUSE},(0,d.on)(c.Event.TIMECHANGED).stayIn(o.PAUSE),{name:c.Event.PLAY,from:o.PAUSE,to:o.PLAYING},{name:c.Event.VIDEO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},{name:c.Event.AUDIO_CHANGE,from:o.PLAYING,to:o.QUALITYCHANGE},(0,d.on)(c.Event.VIDEO_CHANGE).stayIn(o.QUALITYCHANGE),(0,d.on)(c.Event.AUDIO_CHANGE).stayIn(o.QUALITYCHANGE),{name:"FINISH_QUALITYCHANGE",from:o.QUALITYCHANGE,to:o.PLAYING},{name:c.Event.VIDEO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},{name:c.Event.AUDIO_CHANGE,from:o.PAUSE,to:o.QUALITYCHANGE_PAUSE},(0,d.on)(c.Event.VIDEO_CHANGE).stayIn(o.QUALITYCHANGE_PAUSE),(0,d.on)(c.Event.AUDIO_CHANGE).stayIn(o.QUALITYCHANGE_PAUSE),{name:"FINISH_QUALITYCHANGE_PAUSE",from:o.QUALITYCHANGE_PAUSE,to:o.PAUSE},{name:c.Event.SEEK,from:o.PAUSE,to:o.PAUSED_SEEKING},(0,d.on)(c.Event.SEEK).stayIn(o.PAUSED_SEEKING),(0,d.on)(c.Event.AUDIO_CHANGE).stayIn(o.PAUSED_SEEKING),(0,d.on)(c.Event.VIDEO_CHANGE).stayIn(o.PAUSED_SEEKING),(0,d.on)(c.Event.START_BUFFERING).stayIn(o.PAUSED_SEEKING),(0,d.on)(c.Event.END_BUFFERING).stayIn(o.PAUSED_SEEKING),{name:c.Event.SEEKED,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:c.Event.PLAY,from:o.PAUSED_SEEKING,to:o.PLAYING},{name:c.Event.PAUSE,from:o.PAUSED_SEEKING,to:o.PAUSE},{name:"PLAY_SEEK",from:o.PAUSE,to:o.PLAY_SEEKING},{name:"PLAY_SEEK",from:o.PAUSED_SEEKING,to:o.PLAY_SEEKING},(0,d.on)("PLAY_SEEK").stayIn(o.PLAY_SEEKING),(0,d.on)(c.Event.SEEK).stayIn(o.PLAY_SEEKING),(0,d.on)(c.Event.AUDIO_CHANGE).stayIn(o.PLAY_SEEKING),(0,d.on)(c.Event.VIDEO_CHANGE).stayIn(o.PLAY_SEEKING),(0,d.on)(c.Event.START_BUFFERING).stayIn(o.PLAY_SEEKING),(0,d.on)(c.Event.END_BUFFERING).stayIn(o.PLAY_SEEKING),(0,d.on)(c.Event.SEEKED).stayIn(o.PLAY_SEEKING),{name:c.Event.SEEKED,from:o.PLAY_SEEKING,to:o.END_PLAY_SEEKING},(0,d.on)(c.Event.START_BUFFERING).stayIn(o.END_PLAY_SEEKING),(0,d.on)(c.Event.END_BUFFERING).stayIn(o.END_PLAY_SEEKING),(0,d.on)(c.Event.SEEKED).stayIn(o.END_PLAY_SEEKING),{name:c.Event.TIMECHANGED,from:o.END_PLAY_SEEKING,to:o.PLAYING},{name:c.Event.END,from:o.PLAY_SEEKING,to:o.END},{name:c.Event.END,from:o.PAUSED_SEEKING,to:o.END},{name:c.Event.END,from:o.PLAYING,to:o.END},{name:c.Event.END,from:o.PAUSE,to:o.END},(0,d.on)(c.Event.SEEK).stayIn(o.END),(0,d.on)(c.Event.SEEKED).stayIn(o.END),(0,d.on)(c.Event.TIMECHANGED).stayIn(o.END),(0,d.on)(c.Event.END_BUFFERING).stayIn(o.END),(0,d.on)(c.Event.START_BUFFERING).stayIn(o.END),(0,d.on)(c.Event.END).stayIn(o.END),(0,d.on)(c.Event.SEEKED).stayIn(o.PLAYING),{name:c.Event.PLAY,from:o.END,to:o.PLAYING},{name:c.Event.ERROR,from:this.getAllStatesBut(o.STARTUP),to:o.ERROR},{name:c.Event.PAUSE,from:o.ERROR,to:o.ERROR},{name:c.Event.SEEK,from:o.END_PLAY_SEEKING,to:o.PLAY_SEEKING},{name:"FINISH_PLAY_SEEKING",from:o.END_PLAY_SEEKING,to:o.PLAYING},{name:c.Event.UNLOAD,from:this.getAllStatesBut(o.STARTUP),to:o.END},{name:c.Event.START_AD,from:o.PLAYING,to:o.AD},{name:c.Event.END_AD,from:o.AD,to:o.PLAYING},(0,d.on)(c.Event.MUTE).stayIn(o.SETUP),{name:c.Event.MUTE,from:o.READY,to:o.MUTING_READY},{name:c.Event.UN_MUTE,from:o.READY,to:o.MUTING_READY},{name:"FINISH_MUTING",from:o.MUTING_READY,to:o.READY},{name:c.Event.MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:c.Event.UN_MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:"FINISH_MUTING",from:o.MUTING_PLAY,to:o.PLAYING},{name:c.Event.MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:c.Event.UN_MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:"FINISH_MUTING",from:o.MUTING_PAUSE,to:o.PAUSE},{name:c.Event.START_CAST,from:[o.READY,o.PAUSE],to:o.CASTING},(0,d.on)(c.Event.PAUSE).stayIn(o.CASTING),(0,d.on)(c.Event.PLAY).stayIn(o.CASTING),(0,d.on)(c.Event.TIMECHANGED).stayIn(o.CASTING),(0,d.on)(c.Event.MUTE).stayIn(o.CASTING),(0,d.on)(c.Event.SEEK).stayIn(o.CASTING),(0,d.on)(c.Event.SEEKED).stayIn(o.CASTING),{name:c.Event.END_CAST,from:o.CASTING,to:o.READY},(0,d.on)(c.Event.SEEK).stayIn(o.READY),(0,d.on)(c.Event.SEEKED).stayIn(o.READY),{name:c.Event.SEEKED,from:o.STARTUP,to:o.STARTUP},{name:c.Event.AUDIOTRACK_CHANGED,from:o.PLAYING,to:o.AUDIOTRACK_CHANGED_PLAYING},{name:"FINISH_AUDIOTRACK_CHANGING",from:o.AUDIOTRACK_CHANGED_PLAYING,to:o.PLAYING},(0,d.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(o.PAUSE),(0,d.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(o.READY),(0,d.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(o.REBUFFERING),(0,d.on)(c.Event.AUDIOTRACK_CHANGED).stayIn(o.END_PLAY_SEEKING),{name:c.Event.AUDIOTRACK_CHANGED,from:o.AUDIOTRACK_CHANGING,to:o.AUDIOTRACK_CHANGING},{name:c.Event.SUBTITLE_CHANGE,from:o.PLAYING,to:o.SUBTITLE_CHANGED_PLAYING},{name:"FINISH_SUBTITLE_CHANGING",from:o.SUBTITLE_CHANGED_PLAYING,to:o.PLAYING},(0,d.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.PAUSE),(0,d.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.READY),(0,d.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.REBUFFERING),(0,d.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.END_PLAY_SEEKING),(0,d.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.SOURCE_CHANGING),(0,d.on)(c.Event.SUBTITLE_CHANGE).stayIn(o.SUBTITLE_CHANGING),{name:c.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStatesBut(o.READY),to:o.SOURCE_CHANGING},(0,d.on)(c.Event.MANUAL_SOURCE_CHANGE).stayIn(o.READY),(0,d.on)(c.Event.MANUAL_SOURCE_CHANGE).stayIn(o.SETUP),(0,d.on)(c.Event.TIMECHANGED).stayIn(o.SOURCE_CHANGING),{name:c.Event.PLAY,from:o.SOURCE_CHANGING,to:o.STARTUP},(0,d.on)(c.Event.SOURCE_LOADED).stayIn(o.STARTUP),{name:c.Event.VIDEO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},{name:c.Event.AUDIO_CHANGE,from:o.REBUFFERING,to:o.QUALITYCHANGE_REBUFFERING},(0,d.on)(c.Event.VIDEO_CHANGE).stayIn(o.QUALITYCHANGE_REBUFFERING),(0,d.on)(c.Event.AUDIO_CHANGE).stayIn(o.QUALITYCHANGE_REBUFFERING),{name:"FINISH_QUALITYCHANGE_REBUFFERING",from:o.QUALITYCHANGE_REBUFFERING,to:o.REBUFFERING},{name:c.Event.CUSTOM_DATA_CHANGE,from:[o.PLAYING,o.PAUSE],to:o.CUSTOMDATACHANGE},{name:c.Event.PLAYING,from:o.CUSTOMDATACHANGE,to:o.PLAYING},{name:c.Event.PAUSE,from:o.CUSTOMDATACHANGE,to:o.PAUSE}],callbacks:{onafterevent:function(e,n,i,r){i===o.QUALITYCHANGE&&t.stateMachine.FINISH_QUALITYCHANGE(r),i!==o.MUTING_READY&&i!==o.MUTING_PLAY&&i!==o.MUTING_PAUSE||t.stateMachine.FINISH_MUTING(r),i===o.AUDIOTRACK_CHANGED_PLAYING&&t.stateMachine.FINISH_AUDIOTRACK_CHANGING(r),i===o.SUBTITLE_CHANGED_PLAYING&&t.stateMachine.FINISH_SUBTITLE_CHANGING(r)},onenterstate:function(n,i,r,a,s){"none"===i&&e.starttime?t.onEnterStateTimestamp=e.starttime:t.onEnterStateTimestamp=a||(new Date).getTime(),l.logger.log("[ENTER] "+(0,l.padRight)(r,20)+"EVENT: "+(0,l.padRight)(n,20)+" from "+(0,l.padRight)(i,14)),s&&r!==o.PAUSED_SEEKING&&r!==o.PLAY_SEEKING&&r!==o.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(s),n===c.Event.SEEK&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(s),n===c.Event.SEEKED&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(s),"PLAY_SEEK"===n&&r===o.PLAY_SEEKING&&r!==o.PLAY_SEEKING&&r!==o.END_PLAY_SEEKING&&(t.seekTimestamp=t.onEnterStateTimestamp),n===c.Event.START_CAST&&r===o.CASTING&&t.stateMachineCallbacks.startCasting(a,s),r===o.REBUFFERING&&t.startRebufferingHeartbeatInterval()},onleavestate:function(e,n,i,r,a){if(n===o.REBUFFERING&&t.resetRebufferingHelpers(),r){l.logger.log("[LEAVE] ".concat((0,l.padRight)(n,20)," EVENT: ").concat((0,l.padRight)(e,20)," to ").concat((0,l.padRight)(i,20)));var s=r-t.onEnterStateTimestamp;if(a&&i!==o.PAUSED_SEEKING&&i!==o.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),"PLAY_SEEK"===e&&n===o.PAUSE)return!0;n===o.READY&&i===o.STARTUP?t.setVideoStartTimeout():n!==o.STARTUP||i!==o.PLAYING&&i!==o.EXIT_BEFORE_VIDEOSTART||t.clearVideoStartTimeout();var u=String(n).toLowerCase();if(i===o.EXIT_BEFORE_VIDEOSTART){t.clearVideoStartTimeout();var E=t.getVideoStartupFailedEventData(r,e,a),p=e!==c.Event.ERROR;t.stateMachineCallbacks.videoStartFailed(E,p)}else if(n===o.PAUSED_SEEKING){var h=r-t.seekTimestamp;t.stateMachineCallbacks.paused_seeking(h,u)}else if(n===o.END_PLAY_SEEKING)h=t.seekedTimestamp-t.seekTimestamp,t.stateMachineCallbacks.end_play_seeking(h,u);else if(e===c.Event.UNLOAD)t.stateMachineCallbacks.unload(s,u);else if(n===o.PAUSE&&i!==o.PAUSED_SEEKING)t.stateMachineCallbacks.setVideoTimeStartFromEvent(e),t.stateMachineCallbacks.pause(s,u);else{var v=t.stateMachineCallbacks[u];"function"==typeof v?v(s,u,a):(0,d.logMissingCallbackWarning)(n,[o.READY,o.SOURCE_CHANGING,o.MUTING_PAUSE,o.MUTING_PLAY,o.AUDIOTRACK_CHANGED_PLAYING,o.SUBTITLE_CHANGED_PLAYING])}a&&i!==o.PAUSED_SEEKING&&i!==o.PLAY_SEEKING&&i!==o.END_PLAY_SEEKING&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(a),e===c.Event.VIDEO_CHANGE?t.stateMachineCallbacks.videoChange(a):e===c.Event.AUDIO_CHANGE?t.stateMachineCallbacks.audioChange(a):e===c.Event.MUTE?t.stateMachineCallbacks.mute():e===c.Event.UN_MUTE?t.stateMachineCallbacks.unMute():e===c.Event.MANUAL_SOURCE_CHANGE&&t.stateMachineCallbacks.manualSourceChange(a)}},onseek:function(e,n,i,r){t.seekTimestamp=r},onseeked:function(e,n,i,r){t.seekedTimestamp=r},ontimechanged:function(e,n,i,r,a){var o=r-t.onEnterStateTimestamp;o>59700&&(t.stateMachineCallbacks.setVideoTimeEndFromEvent(a),t.stateMachineCallbacks.heartbeat(o,String(n).toLowerCase(),{played:o}),t.onEnterStateTimestamp=r,t.stateMachineCallbacks.setVideoTimeStartFromEvent(a))},onplayerError:function(e,n,i,r,a){t.stateMachineCallbacks.error(a)}}})},t.prototype.callEvent=function(e,t,n){var i=this.stateMachine[e];i?i.call(this.stateMachine,n,t):l.logger.log("Ignored Event: "+e)},t}(u.AnalyticsStateMachine);t.VideojsAnalyticsStateMachine=E},5611:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AmazonIVSStateMachine=void 0;var a,o=n(2595),s=n(2361),c=n(1916),l=n(5063),u=n(7596),d=n(8253);!function(e){e.SETUP="SETUP",e.READY="READY",e.STARTUP="STARTUP",e.PLAYING="PLAYING",e.PAUSE="PAUSE",e.REBUFFERING="REBUFFERING",e.EXIT_BEFORE_VIDEOSTART="EXIT_BEFORE_VIDEOSTART",e.ERROR="ERROR",e.UNLOADED="UNLOADED",e.QUALITY_CHANGE="QUALITY_CHANGE",e.SEEKING="SEEKING"}(a||(a={}));var E=function(e){function t(t,n,i){var r=e.call(this,t,i)||this;return r.heartbeatService=n,r.getStateHandler=function(){var e;return(e={})[a.SETUP]={onenterstate:function(){},onleavestate:function(e){r.stateMachineCallbacks.setup(e,a.SETUP.toLowerCase())}},e[a.READY]={onenterstate:function(){},onleavestate:function(){}},e[a.STARTUP]={onenterstate:function(){r.setVideoStartTimeout()},onleavestate:function(e,t){r.clearVideoStartTimeout(),t==a.PLAYING&&r.stateMachineCallbacks.startup(e,a.STARTUP.toLowerCase())}},e[a.PLAYING]={onenterstate:function(){r.heartbeatService.startHeartbeat()},onleavestate:function(e){r.heartbeatService.stopHeartbeat(),r.stateMachineCallbacks.playing(e,a.PLAYING.toLowerCase())}},e[a.PAUSE]={onenterstate:function(){},onleavestate:function(e){r.stateMachineCallbacks.pause(e,a.PAUSE.toLowerCase())}},e[a.REBUFFERING]={onenterstate:function(){r.startRebufferingHeartbeatInterval()},onleavestate:function(e){r.resetRebufferingHelpers(),r.stateMachineCallbacks.rebuffering(e,a.REBUFFERING.toLowerCase())}},e[a.EXIT_BEFORE_VIDEOSTART]={onenterstate:function(e,t){var n={reason:r.getReasonForVideoStartFailure(e)},i=e===s.Event.ERROR,a=!i;r.stateMachineCallbacks.videoStartFailed(n,a),i&&r.stateMachineCallbacks.error(t)},onleavestate:function(){}},e[a.ERROR]={onenterstate:function(e,t){r.stateMachineCallbacks.error(t)},onleavestate:function(){}},e[a.UNLOADED]={onenterstate:function(){r.stateMachineCallbacks.unload(0,a.UNLOADED)},onleavestate:function(){}},e[a.QUALITY_CHANGE]={onenterstate:function(e,t){r.stateMachine.FINISH_QUALITYCHANGE(r.onEnterStateTimestamp,t)},onleavestate:function(){r.stateMachineCallbacks.qualitychange(0,a.QUALITY_CHANGE.toLowerCase())}},e[a.SEEKING]={onenterstate:function(){},onleavestate:function(e){r.stateMachineCallbacks.end_play_seeking(e,a.SEEKING.toLowerCase())}},e},r}return r(t,e),t.prototype.createStateMachine=function(e){var t=this;return this.onEnterStateTimestamp=e.starttime,o.StateMachine.create({initial:a.SETUP,error:d.customStateMachineErrorCallback,events:[{name:s.Event.READY,from:a.SETUP,to:a.READY},{name:s.Event.PLAY,from:a.READY,to:a.STARTUP},{name:s.Event.PLAYING,from:a.STARTUP,to:a.PLAYING},{name:s.Event.PAUSE,from:a.PLAYING,to:a.PAUSE},{name:s.Event.PLAYING,from:a.PAUSE,to:a.PLAYING},{name:s.Event.PLAY,from:a.PAUSE,to:a.PLAYING},{name:s.Event.UNLOAD,from:a.PLAYING,to:a.UNLOADED},{name:s.Event.PLAYING,from:a.ERROR,to:a.PLAYING},{name:s.Event.VIDEO_CHANGE,from:a.PLAYING,to:a.QUALITY_CHANGE},{name:"FINISH_QUALITYCHANGE",from:a.QUALITY_CHANGE,to:a.PLAYING},{name:s.Event.SEEK,from:a.PLAYING,to:a.SEEKING},{name:s.Event.SEEKED,from:a.SEEKING,to:a.PLAYING},{name:s.Event.PAUSE,from:a.SEEKING,to:a.PAUSE},{name:s.Event.START_BUFFERING,from:a.PLAYING,to:a.REBUFFERING},{name:s.Event.PLAYING,from:a.REBUFFERING,to:a.PLAYING},{name:s.Event.VIDEOSTART_TIMEOUT,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.ERROR,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.UNLOAD,from:a.STARTUP,to:a.EXIT_BEFORE_VIDEOSTART},{name:s.Event.ERROR,from:p([a.STARTUP,a.EXIT_BEFORE_VIDEOSTART]),to:a.ERROR},(0,d.on)(s.Event.PAUSE).stayIn(a.PAUSE),(0,d.on)(s.Event.PAUSE).stayIn(a.STARTUP),(0,d.on)(s.Event.PAUSE).stayIn(a.REBUFFERING),(0,d.on)(s.Event.PLAY).stayIn(a.PLAYING),(0,d.on)(s.Event.PLAYING).stayIn(a.PLAYING),(0,d.on)(s.Event.START_BUFFERING).stayIn(a.PAUSE),(0,d.on)(s.Event.START_BUFFERING).stayIn(a.REBUFFERING),(0,d.on)(s.Event.VIDEOSTART_TIMEOUT).stayIn(a.PLAYING),(0,d.on)(s.Event.VIDEOSTART_TIMEOUT).stayIn(a.PAUSE),(0,d.on)(s.Event.VIDEOSTART_TIMEOUT).stayIn(a.SEEKING),(0,d.on)(s.Event.UNLOAD).stayIn(a.READY),(0,d.on)(s.Event.UNLOAD).stayIn(a.SEEKING),(0,d.on)(s.Event.VIDEO_CHANGE).stayIn(a.QUALITY_CHANGE),(0,d.on)(s.Event.VIDEO_CHANGE).stayIn(a.STARTUP),(0,d.on)(s.Event.VIDEO_CHANGE).stayIn(a.REBUFFERING),(0,d.on)(s.Event.VIDEO_CHANGE).stayIn(a.PAUSE),(0,d.on)(s.Event.VIDEO_CHANGE).stayIn(a.ERROR),(0,d.on)(s.Event.VIDEO_CHANGE).stayIn(a.EXIT_BEFORE_VIDEOSTART),(0,d.on)(s.Event.VIDEO_CHANGE).stayIn(a.READY),(0,d.on)(s.Event.VIDEO_CHANGE).stayIn(a.SEEKING),(0,d.on)(s.Event.SEEK).stayIn(a.SEEKING),(0,d.on)(s.Event.SEEK).stayIn(a.PAUSE),(0,d.on)(s.Event.SEEK).stayIn(a.QUALITY_CHANGE),(0,d.on)(s.Event.SEEK).stayIn(a.REBUFFERING),(0,d.on)(s.Event.SEEK).stayIn(a.ERROR),(0,d.on)(s.Event.SEEK).stayIn(a.STARTUP),(0,d.on)(s.Event.SEEK).stayIn(a.READY),(0,d.on)(s.Event.SEEK).stayIn(a.EXIT_BEFORE_VIDEOSTART),(0,d.on)(s.Event.SEEKED).stayIn(a.PAUSE),(0,d.on)(s.Event.SEEKED).stayIn(a.QUALITY_CHANGE),(0,d.on)(s.Event.SEEKED).stayIn(a.REBUFFERING),(0,d.on)(s.Event.SEEKED).stayIn(a.ERROR),(0,d.on)(s.Event.SEEKED).stayIn(a.STARTUP),(0,d.on)(s.Event.SEEKED).stayIn(a.READY),(0,d.on)(s.Event.SEEKED).stayIn(a.EXIT_BEFORE_VIDEOSTART)],callbacks:{onenterstate:function(e,n,i,r,a){"none"!=n&&void 0!==i&&void 0!==e&&(a&&t.stateMachineCallbacks.setVideoTimeStartFromEvent(a),c.logger.log("[ENTER ".concat(r,"] EVENT: ").concat(e," \nfrom: ").concat(n,"\t to: ").concat(i)),t.onEnterStateTimestamp=r||l.getCurrentTimestamp(),t.getStateHandler()[i].onenterstate(e,a))},onleavestate:function(e,n,i,r,a){if(r&&"none"!=n&&void 0!==n&&void 0!==i){a&&t.stateMachineCallbacks.setVideoTimeEndFromEvent(a);var o=r-t.onEnterStateTimestamp;t.getStateHandler()[n].onleavestate(o,i)}}}})},t.prototype.callEvent=function(e,t,n){var i=this.stateMachine[e];i?i.call(this.stateMachine,n,t):c.logger.log("Ignored Event: "+e)},t.prototype.onHeartbeat=function(e){this.stateMachineCallbacks.setVideoTimeEndFromEvent(e);var t=l.getCurrentTimestamp(),n=t-this.onEnterStateTimestamp;this.stateMachineCallbacks.heartbeat(n,"playing",{played:n}),this.onEnterStateTimestamp=t,this.stateMachineCallbacks.setVideoTimeStartFromEvent(e)},t}(u.AnalyticsStateMachine);t.AmazonIVSStateMachine=E;var p=function(e){return h().filter((function(t){return e.indexOf(t)<0}))},h=function(){return Object.keys(a).map((function(e){return a[e]}))}},8470:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartbeatService=void 0;var n=function(){function e(e,t){this.heartbeatIntervalMs=e,this.playerContext=t}return e.prototype.setListener=function(e){this.listener=e},e.prototype.startHeartbeat=function(){var e=this;void 0!==this.heartbeatInterval&&this.clearHeartbeat(),this.heartbeatInterval=window.setInterval((function(){var t,n={currentTime:e.playerContext.position};null===(t=e.listener)||void 0===t||t.onHeartbeat(n)}),this.heartbeatIntervalMs)},e.prototype.stopHeartbeat=function(){this.clearHeartbeat()},e.prototype.clearHeartbeat=function(){window.clearTimeout(this.heartbeatInterval),this.heartbeatInterval=void 0},e}();t.HeartbeatService=n},8253:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logMissingCallbackWarning=t.createHeartbeatPayload=t.customStateMachineErrorCallback=void 0,t.on=function(e){return{stayIn:function(t){return{name:e,from:t,to:t}}}};var i=n(1916);t.customStateMachineErrorCallback=function(e,t,n,r,a,o,s){var c="StateMachine error callback: ".concat(o);c+=", eventName: ".concat(e,", from: ").concat(t,", to: ").concat(n),null!=r&&(c+=", args: ".concat(JSON.stringify(r))),c+=", errorCode: ".concat(a),i.logger.warn(c)},t.createHeartbeatPayload=function(e,t){var n={};switch(t){case"playing":n={played:e};break;case"buffering":n={buffered:e};break;case"paused":n={paused:e}}return n},t.logMissingCallbackWarning=function(e,t){void 0===t&&(t=[]),null!=e&&null==t.find((function(t){return e===t}))&&i.logger.warn("Could not find callback function for "+e)}},8917:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdAnalytics=void 0;var r,a=n(6856),o=n(5791),s=n(7232),c=n(4439),l=n(1916),u=n(5063),d=n(3612);!function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(r||(r={}));var E=function(){function e(e,t){var n=this;this.onBeforeUnLoadEvent=!1,this.adManifestLoadedEvents=[],this.isPlaying=!1,this.adPodPosition=0,this.analytics=e,this.adapter=t,this.adapter.adCallbacks.onAdStarted=function(e){return n.onAdStarted(e)},this.adapter.adCallbacks.onAdFinished=function(e){return n.onAdFinished(e)},this.adapter.adCallbacks.onAdBreakStarted=function(e){return n.onAdBreakStarted(e)},this.adapter.adCallbacks.onAdBreakFinished=function(e){return n.onAdBreakFinished(e)},this.adapter.adCallbacks.onAdClicked=function(e){return n.onAdClicked(e)},this.adapter.adCallbacks.onAdError=function(e){return n.onAdError(e)},this.adapter.adCallbacks.onAdManifestLoaded=function(e){return n.onAdManifestLoaded(e)},this.adapter.adCallbacks.onPlay=function(){return n.onPlay()},this.adapter.adCallbacks.onPause=function(){return n.onPause()},this.adapter.adCallbacks.onBeforeUnload=function(){return n.onBeforeUnload()},this.adapter.adCallbacks.onAdSkipped=function(e){return n.onAdSkipped(e)},this.adapter.adCallbacks.onAdQuartile=function(e){return n.onAdQuartile(e)},this.viewportTracker=new d.ViewportTracker(this.adapter.getContainer(),(function(){return n.onIntersectionChanged()}),.5)}return e.prototype.release=function(){this.clearCurrentTimeInterval(),this.viewportTracker.dispose()},e.prototype.onIntersectionChanged=function(){this.activeAdSample&&(this.isContainerInViewport()?this.enterViewportTimestamp=u.getCurrentTimestamp():this.enterViewportTimestamp&&(this.activeAdSample.timeInViewport=(this.activeAdSample.timeInViewport||0)+u.getCurrentTimestamp()-this.enterViewportTimestamp))},e.prototype.isContainerInViewport=function(){return!this.viewportTracker||this.viewportTracker.isInViewport()},e.prototype.onPlay=function(){if(this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdSample){var e=u.getCurrentTimestamp();this.beginPlayingTimestamp=e,this.enterViewportTimestamp=e,this.isPlaying=!0}},e.prototype.onPause=function(){this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdSample&&(this.updatePlayingTime(this.activeAdSample),this.isPlaying=!1)},e.prototype.onAdManifestLoaded=function(e){var t=e.adConfig;t&&t.tag&&"vmap"===t.tag.type?this.sendAnalyticsRequest(new s.AdBreakSample(e.adConfig,e)):e.adBreak&&this.adManifestLoadedEvents.push(e)},e.prototype.onAdBreakStarted=function(e){this.adPodPosition=0,this.activeAdBreakSample=new s.AdBreakSample(e.adBreak,this.getAdManifestLoadedEvent(e.adBreak)),this.adStartupTimestamp=u.getCurrentTimestamp()},e.prototype.onAdBreakFinished=function(e){this.resetActiveAd(),this.activeAdBreakSample=void 0},e.prototype.onAdStarted=function(e){e.ad.isLinear&&(this.resetActiveAd(),this.activeAdSample=new c.AdSample(e.ad),this.currentTime=void 0,this.activeAdSample.adStartupTime=this.adStartupTimestamp?u.getCurrentTimestamp()-this.adStartupTimestamp:void 0,this.startAd(this.activeAdSample))},e.prototype.onAdFinished=function(e){if(this.activeAdBreakSample&&this.activeAdSample){var t=i({},this.activeAdSample);t.completed=1,this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,t,t.adDuration)}},e.prototype.onAdSkipped=function(e){if(this.activeAdBreakSample&&this.activeAdSample){var t=i({},this.activeAdSample);t.skipped=1,t.skipPosition=this.currentTime,t.skipPercentage=u.calculatePercentage(this.activeAdSample.skipPosition,this.activeAdSample.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,t,t.skipPosition)}},e.prototype.onAdError=function(e){var t,n,i=this,r=e.data||{adBreak:void 0,adConfig:void 0,code:void 0,message:void 0},a=r.adConfig,o=r.adBreak,c=r.code,l=r.message,d=new s.AdBreakSample(o||a,o?this.getAdManifestLoadedEvent(o):void 0);d.errorCode=c||e.code,d.errorData=JSON.stringify(e.data),d.errorMessage=l||e.name,this.activeAdSample&&o&&o.ads&&o.ads.includes((function(e){return e.id===i.activeAdSample.adId}))&&(n=(t=this.activeAdSample).errorPosition=this.currentTime,t.errorPercentage=u.calculatePercentage(t.errorPosition,t.adDuration)),this.completeAd(d,t,n)},e.prototype.onAdClicked=function(e){this.activeAdSample&&(this.activeAdSample.adClickthroughUrl=e.clickThroughUrl,this.activeAdSample.clicked=1,this.activeAdSample.clickPosition=this.currentTime,this.activeAdSample.clickPercentage=u.calculatePercentage(this.activeAdSample.clickPosition,this.activeAdSample.adDuration))},e.prototype.onAdQuartile=function(e){this.activeAdSample&&(e.quartile===r.FIRST_QUARTILE?this.activeAdSample.quartile1=1:e.quartile===r.MIDPOINT?this.activeAdSample.midpoint=1:e.quartile===r.THIRD_QUARTILE&&(this.activeAdSample.quartile3=1))},e.prototype.onBeforeUnload=function(){if(!this.onBeforeUnLoadEvent&&(this.onBeforeUnLoadEvent=!0,this.activeAdSample&&this.activeAdBreakSample)){var e=i({},this.activeAdSample);e.closed=1,e.closePosition=this.currentTime,e.closePercentage=u.calculatePercentage(e.closePosition,e.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakSample,e,e.closePosition)}},e.prototype.createNewAdAnalyticsSample=function(e){var t=this.adapter.getAdModuleInfo();return i(i({},new o.AdAnalyticsSample(e)),{analyticsVersion:a.VERSION,adModule:t.name,adModuleVersion:t.version,playerStartupTime:this.analytics.playerStartupTime,pageLoadTime:this.analytics.pageLoadTime,autoplay:this.analytics.autoplay,pageLoadType:u.getPageLoadType()})},e.prototype.getAdManifestLoadedEvent=function(e){if(e)return this.adManifestLoadedEvents.find((function(t){return t.adBreak&&t.adBreak.id===e.id}))},e.prototype.sendAnalyticsRequest=function(e,t){var n=i(i(i({},this.createNewAdAnalyticsSample(this.analytics.sample)),e),t||new c.AdSample);n.time=u.getCurrentTimestamp(),n.adImpressionId=u.generateUUID(),n.percentageInViewport=u.calculatePercentage(n.timeInViewport,n.timePlayed),this.analytics.backend.sendAdRequest(n)},e.prototype.updatePlayingTime=function(e){var t=u.getCurrentTimestamp();this.beginPlayingTimestamp&&this.isPlaying&&(void 0!==e.timePlayed&&(e.timePlayed+=t-this.beginPlayingTimestamp),this.isContainerInViewport()&&this.enterViewportTimestamp&&void 0!==e.timeInViewport&&(e.timeInViewport+=t-this.enterViewportTimestamp))},e.prototype.startAd=function(t){var n=this;t.started=1,t.timePlayed=0,t.timeInViewport=0,t.adPodPosition=this.adPodPosition;var i=u.getCurrentTimestamp();this.beginPlayingTimestamp=i,this.enterViewportTimestamp=this.isContainerInViewport()?i:void 0,this.isPlaying=!0,this.currentTime=0,this.adPodPosition++,this.currentTimeInterval=window.setInterval((function(){try{t&&void 0!==t.adDuration&&t.adDuration>0&&n.adapter.isLinearAdActive()&&(n.currentTime=u.calculateTime(Math.max(n.adapter.currentTime(),0)))}catch(e){l.logger.log("AdStarted monitoring interval failed and got cleared",e),n.resetActiveAd()}}),e.TIMEOUT_CURRENT_TIME_INTERVAL)},e.prototype.completeAd=function(e,t,n){void 0===t&&(t=new c.AdSample),t.exitPosition=n,t.playPercentage=u.calculatePercentage(t.exitPosition,t.adDuration),this.adStartupTimestamp=u.getCurrentTimestamp(),this.updatePlayingTime(t),this.isPlaying=!1,this.sendAnalyticsRequest(e,t)},e.prototype.resetActiveAd=function(){this.clearCurrentTimeInterval(),this.activeAdSample=void 0},e.prototype.clearCurrentTimeInterval=function(){window.clearInterval(this.currentTimeInterval),delete this.currentTime},e.MODULE_NAME="ads",e.TIMEOUT_CURRENT_TIME_INTERVAL=100,e}();t.AdAnalytics=E},4350:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.createDeviceInformationFromConfig=t.Analytics=void 0,t.mergeCollectorConfig=T,t.mergeAnalyticsConfigs=S;var r=n(6856),a=n(3588),o=n(3458),s=n(8525),c=n(6845),l=n(5529),u=n(404),d=n(1916),E=n(5063),p=n(1820),h=n(8917),v=n(3054),f=n(675),A=n(2226),m=n(847),y=function(){function e(e,t,n,r,a,o,s){var c=this;this.adapter=t,this.backendFactory=n,this.sessionHandler=r,this.featureManager=a,this.onErrorDetailEventDispatcher=o,this.ssaiService=s,this.pageLoadTime=0,this.playerStartupTime=0,this.videoStartupTime=0,this.autoplay=void 0,this.droppedSampleFrames=0,this.startupTime=0,this.authenticationCallback={authenticationCompleted:function(e,t){c.featureManager.configureFeatures(e,t)}},this.guardAgainstMissingVideoTitle=function(e,t){e&&t&&e.title&&!t.title&&d.logger.error("The new analytics configuration does not contain the field title")},this.guardAgainstMissingIsLive=function(e,t){null!=e&&null!=t&&e.isLive&&null==t.isLive&&d.logger.error("The new analytics configuration does not contain the field `isLive`. It will default to `false` which might be unintended? Once stream playback information is available the type will be populated.")},this.sourceChange=function(e){d.logger.log("Processing Source Change for Analytics",e),c.guardAgainstMissingVideoTitle(c.config,e),c.guardAgainstMissingIsLive(c.config,e);var t=S(c.config,e);c.adapter.sourceChange(t)},this.setCustomDataOnce=function(e){var t=i({},c.config);c.setState("customdatachange"),c.changeCustomData(e),c.sendAnalyticsRequestAndClearValues(),c.config=i({},t),c.setConfigParameters()},this.setCustomData=function(e){c.adapter.setCustomData(e)},this.getCurrentImpressionId=function(){return c.sample.impressionId},this.getUserId=function(){return c.sessionHandler.userId},this.changeCustomData=function(e){c.config=i(i({},c.config),(0,l.extractCustomDataFieldsOnly)(e)),c.setConfigParameters()},this.sessionHandler=new m.SessionPersistenceHandler(e),this.adapter=t,this.backendFactory=n;var u=this;this.config=this.buildDefaultAnalyticsConfigValues(e),this.errorDetailTrackingSettingsProvider={get domain(){return u.getDomain(u.config)},get licenseKey(){var e;return null!==(e=u.config.key)&&void 0!==e?e:""},get impressionId(){var e;return null!==(e=u.getCurrentImpressionId())&&void 0!==e?e:""},get collectorConfig(){return u.config.config}};var E=this.adapter.onLicenseKeyReceived.subscribe((function(e){c.config.key||(c.config.key=e.licenseKey),E()}));this.sample=this.setupSample(),this.init(),this.setupStateMachineCallbacks();var p=this.adapter.initialize(this);this.featureManager.registerFeatures(p),this.adapter.adModule&&(this.adAnalytics=new h.AdAnalytics(this,this.adapter.adModule)),this.checkForErrorsInConfig(e)}return Object.defineProperty(e.prototype,"version",{get:function(){return r.VERSION},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorDetailSubscribable",{get:function(){return this.onErrorDetailEventDispatcher},enumerable:!1,configurable:!0}),e.prototype.getPlayerInformationFromAdapter=function(){var e=this.config.player||this.adapter.getPlayerName();return{player:e,version:e+"-"+this.adapter.getPlayerVersion(),playerTech:this.adapter.getPlayerTech()}},e.prototype.init=function(){var e;!0===this.adapter.supportsDeferredLicenseLoading||(0,p.isValidString)(this.config.key)&&!(0,p.isBlank)(this.config.key)?(d.logger.initialize(this.config.debug),this.featureManager.resetFeatures(),this.backend=this.createBackend(this.config),this.videoStartupTime=0,this.setConfigParameters(),this.generateNewImpressionId(),this.setUserId(),this.adapter.videoCompletionTracker&&this.adapter.videoCompletionTracker.reset(),this.adapter.qualityChangeService.resetValues(),null===(e=this.ssaiService)||void 0===e||e.resetSourceRelatedState()):d.logger.errorMessageToUser("Invalid analytics license key provided")},e.prototype.release=function(){var e;this.backend=new A.NoOpBackend,null===(e=this.adAnalytics)||void 0===e||e.release(),this.adapter.qualityChangeService.stopResetInterval()},e.prototype.setConfigParameters=function(){var e,n;this.sample.key=this.config.key,this.sample.playerKey=this.config.playerKey,this.config.player&&(this.sample.player=this.config.player),this.sample.domain=null!==(e=this.getDomainFromConfig(this.config))&&void 0!==e?e:E.sanitizePath(window.location.hostname),this.sample.deviceInformation=(0,t.createDeviceInformationFromConfig)(this.config),this.sample.cdnProvider=this.config.cdnProvider,this.sample.videoId=this.config.videoId,this.sample.videoTitle=this.config.title,this.sample.customUserId=null!==(n=this.config.userId)&&void 0!==n?n:this.config.customUserId,E.transferCustomDataFields(this.config,this.sample),this.sample.experimentName=this.config.experimentName},e.prototype.generateNewImpressionId=function(){this.sample.impressionId=E.generateUUID()},e.prototype.setUserId=function(){this.sample.userId=this.sessionHandler.userId},e.prototype.setupStateMachineCallbacks=function(){var e=this;this.adapter.stateMachineCallbacks.setup=function(t,n){if(d.logger.log("Setup bitmovin analytics "+e.sample.analyticsVersion+" with impressionId: "+e.sample.impressionId),e.setDuration(t),e.setState(n),e.playerStartupTime=e.sample.playerStartupTime=t,window.performance&&window.performance.timing){var i=E.getCurrentTimestamp()-window.performance.timing.navigationStart;e.pageLoadTime=e.sample.pageLoadTime=i}e.startupTime=t,e.sendAnalyticsRequestAndClearValues(),e.sample.pageLoadTime=0},this.adapter.stateMachineCallbacks.startup=function(t,n){e.sample.supportedVideoCodecs=u.CodecHelper.supportedVideoFormats,e.setState(n);var i=Math.max(t,1),r=(e.startupTime||0)+i;e.sample.startupTime=r,e.startupTime=r,e.setDuration(i),e.videoStartupTime=i,e.sample.videoStartupTime=i,e.autoplay=e.sample.autoplay=e.adapter.getAutoPlay(),e.adapter.qualityChangeService.setStartupHasFinished();var a=e.adapter.getDrmPerformanceInfo();null!=a&&(e.sample.drmType=a.drmType,e.sample.drmLoadTime=a.drmLoadTime),e.sendAnalyticsRequestAndClearValues(),e.sample.autoplay=void 0},this.adapter.stateMachineCallbacks.playing=function(t,n){e.setDuration(t),e.setState(n),e.sample.played=t,e.setCompletionValues(),e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.unload=function(t,n){var i=e.sample.videoTimeStart;"playing"===n&&(e.setDuration(t),e.setState(n),e.sample.played=t,e.setCompletionValues(),e.sendUnloadRequest(),E.isNumber(e.sample.videoTimeEnd)&&(i=e.sample.videoTimeEnd)),e.videoStartupTime>0&&(e.setVideoTimeStart(i),e.setVideoTimeEnd(i),e.clearValues(),e.setState("closed"),e.sendUnloadRequest())},this.adapter.stateMachineCallbacks.heartbeat=function(t,n,r){e.setState(n),e.setDuration(t),e.sample=i(i({},e.sample),r),"playing"===n&&e.setCompletionValues(),e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.qualitychange=function(t,n){e.sendQualityChange(n,t)},this.adapter.stateMachineCallbacks.qualitychange_pause=function(t,n){e.sendQualityChange(n,t)},this.adapter.stateMachineCallbacks.qualitychange_rebuffering=function(t,n){e.sendQualityChange(n,t)},this.adapter.stateMachineCallbacks.videoChange=function(t){e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setPlaybackVideoPropertiesFromEvent(t)},this.adapter.stateMachineCallbacks.audioChange=function(t){e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setPlaybackAudioPropertiesFromEvent(t)},this.adapter.stateMachineCallbacks.audiotrack_changing=function(){e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.pause=function(t,n){e.setDuration(t),e.setState(n),e.sample.paused=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.paused_seeking=function(t,n){e.setDuration(t),e.setState(n),e.sample.seeked=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.end_play_seeking=function(t,n){e.setState(n),e.setDuration(t),e.sample.seeked=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.rebuffering=function(t,n){e.setDuration(t),e.setState(n),e.sample.buffered=t,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.videoStartFailed=function(t,n){void 0===n&&(n=!0),e.setState("startup"),e.sample.videoStartFailed=!0,e.sample.videoStartFailedReason=t.reason.reason,null!=t.reason.errorCode&&(e.sample.errorCode=t.reason.errorCode.code,e.sample.errorMessage=t.reason.errorCode.message,n&&e.onErrorDetailEventDispatcher.dispatch(i({},t.reason.errorCode))),n&&e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.error=function(t){e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setState("error"),e.sample.errorCode=t.code,e.sample.errorMessage=t.message,e.sample.errorData=JSON.stringify(t.legacyData);var n=e.adapter.segments.map((function(e){return e.name}));e.sample.errorSegments=n,e.adapter.onError&&e.adapter.onError(),e.onErrorDetailEventDispatcher.dispatch({code:t.code,message:t.message,errorData:t.data}),e.sendAnalyticsRequestAndClearValues(),delete e.sample.errorCode,delete e.sample.errorMessage,delete e.sample.errorData},this.adapter.stateMachineCallbacks.ad=function(t,n){e.setDuration(t),e.setState(n),e.sample.ad=a.AD_TYPE.CSAI,e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.mute=function(){e.sample.isMuted=!0},this.adapter.stateMachineCallbacks.unMute=function(){e.sample.isMuted=!1},this.adapter.stateMachineCallbacks.subtitle_changing=function(){e.sendAnalyticsRequestAndClearValues()},this.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent=function(t){E.isNumber(t.currentTime)&&e.setVideoTimeEnd(E.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent=function(t){E.isNumber(t.currentTime)&&e.setVideoTimeStart(E.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.manualSourceChange=function(t){e.adapter.resetSourceRelatedState(),e.sample=e.setupSample(),e.startupTime=0,e.config=Object.keys(t.config).length>0?t.config:e.config,e.init()},this.adapter.stateMachineCallbacks.playlistTransition=function(t){e.sample=e.setupSample(),e.startupTime=0,e.init()},this.adapter.stateMachineCallbacks.initialSourceChange=function(t){e.config=t.config,e.setConfigParameters()},this.adapter.stateMachineCallbacks.end=function(){e.sample=e.setupSample(),e.startupTime=0,e.init()},this.adapter.stateMachineCallbacks.release=function(){e.release()},this.adapter.stateMachineCallbacks.customdatachange=function(t,n,i){i&&i.values&&e.changeCustomData(i.values)}},e.prototype.setDuration=function(e){this.sample.duration=e},e.prototype.setState=function(e){this.sample.state=e},e.prototype.setPlaybackVideoPropertiesFromEvent=function(e){E.isNumber(e.width)&&(this.sample.videoPlaybackWidth=e.width),E.isNumber(e.height)&&(this.sample.videoPlaybackHeight=e.height),E.isNumber(e.bitrate)&&(this.sample.videoBitrate=e.bitrate),(0,p.isValidString)(e.codec)&&(this.sample.videoCodec=e.codec)},e.prototype.setPlaybackAudioPropertiesFromEvent=function(e){E.isNumber(e.bitrate)&&(this.sample.audioBitrate=e.bitrate),(0,p.isValidString)(e.codec)&&(this.sample.audioCodec=e.codec)},e.prototype.setPlaybackInfoFromAdapter=function(){var e=this.adapter.getCurrentPlaybackInfo();e&&(this.sample.isLive=this.getIsLiveFromConfigOrPlaybackInfo(this.config,e.isLive),(0,p.isValidString)(e.size)&&(this.sample.size=e.size),(0,p.isValidString)(e.playerTech)&&(this.sample.playerTech=e.playerTech),E.isNumber(e.videoDuration)&&(this.sample.videoDuration=E.calculateTime(e.videoDuration||0)),(0,p.isValidString)(e.streamFormat)&&(this.sample.streamFormat=e.streamFormat),(0,p.isValidString)(e.mpdUrl)&&(this.sample.mpdUrl=e.mpdUrl),(0,p.isValidString)(e.m3u8Url)&&(this.sample.m3u8Url=e.m3u8Url),(0,p.isValidString)(e.progUrl)&&(this.sample.progUrl=e.progUrl),E.isNumber(e.videoWindowWidth)&&(this.sample.videoWindowWidth=e.videoWindowWidth),E.isNumber(e.videoWindowHeight)&&(this.sample.videoWindowHeight=e.videoWindowHeight),E.isNumber(e.screenHeight)&&(this.sample.screenHeight=e.screenHeight),E.isNumber(e.screenWidth)&&(this.sample.screenWidth=e.screenWidth),E.isNumber(e.videoPlaybackHeight)&&(this.sample.videoPlaybackHeight=e.videoPlaybackHeight),E.isNumber(e.videoPlaybackWidth)&&(this.sample.videoPlaybackWidth=e.videoPlaybackWidth),E.isNumber(e.videoBitrate)&&(this.sample.videoBitrate=e.videoBitrate),E.isNumber(e.audioBitrate)&&(this.sample.audioBitrate=e.audioBitrate),E.isBoolean(e.isMuted)&&(this.sample.isMuted=e.isMuted),E.isBoolean(e.isCasting)&&(this.sample.isCasting=e.isCasting),(0,p.isValidString)(e.castTech)&&(this.sample.castTech=e.castTech),(0,p.isValidString)(e.videoTitle)&&!this.config.title&&(this.sample.videoTitle=e.videoTitle),(0,p.isValidString)(e.audioCodec)&&(this.sample.audioCodec=e.audioCodec),(0,p.isValidString)(e.videoCodec)&&(this.sample.videoCodec=e.videoCodec),(0,p.isValidString)(e.audioLanguage)&&(this.sample.audioLanguage=e.audioLanguage),E.isBoolean(e.subtitleEnabled)&&(this.sample.subtitleEnabled=e.subtitleEnabled),(0,p.isValidString)(e.subtitleLanguage)?this.sample.subtitleLanguage=e.subtitleLanguage:this.sample.subtitleLanguage=void 0,E.isNumber(e.droppedFrames)&&(this.sample.droppedFrames=Math.max(e.droppedFrames-this.droppedSampleFrames,0),this.droppedSampleFrames=e.droppedFrames))},e.prototype.setupSample=function(){return this.droppedSampleFrames=0,i({platform:"web",playerStartupTime:0,pageLoadType:E.getPageLoadType(),path:E.sanitizePath(window.location.pathname),language:navigator.language||navigator.userLanguage,userAgent:navigator.userAgent,screenWidth:screen.width,screenHeight:screen.height,isLive:!1,videoDuration:0,size:s.PlayerSize.Window,time:0,videoWindowWidth:0,videoWindowHeight:0,droppedFrames:0,played:0,buffered:0,paused:0,ad:0,seeked:0,videoPlaybackWidth:0,videoPlaybackHeight:0,videoBitrate:0,audioBitrate:0,videoTimeStart:0,videoTimeEnd:0,videoStartupTime:0,duration:0,startupTime:0,analyticsVersion:r.VERSION,pageLoadTime:0,completedTotal:0},this.getPlayerInformationFromAdapter())},e.prototype.sendAnalyticsRequest=function(){var e;this.setPlaybackInfoFromAdapter(),this.sample.time=E.getCurrentTimestamp(),this.sample.downloadSpeedInfo=this.adapter.downloadSpeedInfo,null===(e=this.ssaiService)||void 0===e||e.manipulate(this.sample);var t=i({},this.sample);this.backend.sendRequest(t)},e.prototype.sendAnalyticsRequestAndClearValues=function(){this.sendAnalyticsRequest(),this.clearValues()},e.prototype.sendUnloadRequest=function(){this.backend.sendUnloadRequest(this.sample)},e.prototype.sendAnalyticsRequestSynchronous=function(){this.backend.sendRequestSynchronous(this.sample)},e.prototype.clearValues=function(){this.sample.ad=0,this.sample.paused=0,this.sample.played=0,this.sample.seeked=0,this.sample.buffered=0,this.sample.playerStartupTime=0,this.sample.videoStartupTime=0,this.sample.startupTime=0,this.sample.castTech=void 0,this.sample.duration=0,this.sample.droppedFrames=0,this.sample.drmLoadTime=void 0,this.sample.videoStartFailed=void 0,this.sample.videoStartFailedReason=void 0,this.sample.completed=void 0,this.sample.adId=void 0,this.sample.adSystem=void 0,this.sample.adPosition=void 0,this.sample.adIndex=void 0,this.adapter.clearValues()},e.prototype.getIsLiveFromConfigOrPlaybackInfo=function(e,t){return null==t?e.isLive||!1:!!E.isBoolean(t)&&t},e.prototype.buildDefaultAnalyticsConfigValues=function(e){return E.isBoolean(e.isLive)||(e.isLive=!1),e},e.prototype.checkForErrorsInConfig=function(e){null!=e.customUserId&&null!=e.userId&&d.logger.warn("Configuration Warning: \nCustomUserId and UserId are set in the config \nValue of UserId will be used in sample \nPlease only use one configuartion field to set your userId")},e.prototype.getDomainFromConfig=function(e){var t=e.config;return null!=t&&null!=t.origin?t.origin:void 0},e.prototype.createBackend=function(e){var t=this.getDomain(e);return this.backendFactory.createBackend(e,{key:e.key,domain:t,version:r.VERSION},this.adapter,this.authenticationCallback)},e.prototype.getDomain=function(e){return this.getDomainFromConfig(e)||E.sanitizePath(window.location.hostname)},e.prototype.setCompletionValues=function(){if(this.adapter.videoCompletionTracker){var e=this.adapter.videoCompletionTracker.addWatched({start:this.sample.videoTimeStart,end:this.sample.videoTimeEnd}),t=this.adapter.videoCompletionTracker.getCompletionPercentage();Number.isNaN(e)||Number.isNaN(t)||(this.sample.completed=e,this.sample.completedTotal=t)}},e.prototype.setVideoTimeStart=function(e){this.sample.videoTimeStart=e},e.prototype.setVideoTimeEnd=function(e){this.sample.videoTimeEnd=e},e.prototype.sendQualityChange=function(e,t){this.adapter.qualityChangeService.startResetInterval(),this.adapter.qualityChangeService.increaseCounter(),this.adapter.qualityChangeService.isQualityChangeEventEnabled()?(this.setDuration(t),this.setState(e),this.sendAnalyticsRequestAndClearValues()):(this.setDuration(t),this.adapter.stateMachineCallbacks.error(i(i({},o.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED),{legacyData:void 0,currentTime:void 0,data:{}})))},e.create=function(t,n,i){return new e(t,n,new v.BackendFactory,new m.SessionPersistenceHandler(t),new c.FeatureManager,new f.EventDispatcher,i)},e.version=r.VERSION,e}();function T(e,t){var n=null!=e?i({},e):{};return null!=t&&(n=i(i(i({},n),{enabled:!0}),t)),n}function S(e,t){var n=T(null==e?void 0:e.config,null==t?void 0:t.config);return i(i(i({},null!=e?e:{}),null!=t?t:{}),{config:n})}t.Analytics=y,t.createDeviceInformationFromConfig=function(e){var t={};if((0,p.isValidString)(e.deviceType)&&!(0,p.isBlank)(e.deviceType)&&(t.model=e.deviceType),(0,p.isValidString)(e.deviceClass)&&!(0,p.isBlank)(e.deviceClass)&&(t.deviceClass=e.deviceClass),0!==Object.keys(t).length)return t}},3054:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFactory=void 0;var i=n(5253),r=n(4649),a=n(7540),o=n(3489),s=n(399),c=n(2226),l=n(7390),u=function(){function e(){}return e.prototype.createBackend=function(e,t,n,i){if(!this.isEnabled(e))return new c.NoOpBackend;var r=this.createInnerBackend(e,t,n,i);return this.decorateWithDebuggingBackend(e,r)},e.prototype.decorateWithDebuggingBackend=function(e,t){return e.debug?new a.DebuggingBackend(e,t):t},e.prototype.decorateWithBackendFromConfigIfAvailable=function(e,t){return void 0!==e&&void 0!==e.config&&void 0!==e.config.wrapBackend?e.config.wrapBackend(t):t},e.prototype.isEnabled=function(e){return void 0===e.config||!1!==e.config.enabled},e.prototype.createInnerBackend=function(e,t,n,a){var c=e.config&&e.config.backendUrl||r.ANALYTICS_BACKEND_BASE_URL,u=new o.LicenseCheckingBackend(t,i.LicenseCall,c,n,a);u=this.decorateWithBackendFromConfigIfAvailable(e,u);var d=new l.SequenceNumberBackend(u);return new s.LongPlaytimeFilteringBackend(d)},e}();t.BackendFactory=u},7540:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggingBackend=void 0;var i=n(1916),r=function(){function e(e,t){this.underlying=t,e.debug&&e.debug.fields&&(this.debugFields=e.debug.fields)}return e.prototype.sendRequest=function(e){this.printFields(e),this.underlying.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.printFields(e),this.underlying.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.printFields(e),this.underlying.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.underlying.sendAdRequest(e)},e.prototype.printFields=function(e){if(this.debugFields&&this.debugFields.length){var t={};this.debugFields.forEach((function(n){return t[n]=e[n]})),i.logger.table([t])}},e}();t.DebuggingBackend=r},9664:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadSpeedMeter=void 0;var i=n(5766),r=n(3786),a=function(){function e(){this.measures=[]}return e.prototype.reset=function(){this.measures=[]},e.prototype.addMeasurement=function(e){if(!(e.httpStatus>=400)){var t=new r.Measure(e),n=i.Converter.bitsToBytes(3e8);t.speed>=n||this.measures.push(t)}},e.prototype.getInfo=function(){return{segmentsDownloadCount:this.measures.length,segmentsDownloadSize:this.measures.map((function(e){return e.size})).reduce(this.add,0),segmentsDownloadTime:Math.ceil(1e3*this.totalTime()),avgDownloadSpeed:this.avgSpeed(),minDownloadSpeed:this.minSpeed(),maxDownloadSpeed:this.maxSpeed(),avgTimeToFirstByte:this.avgTimeToFirstByte()}},e.prototype.add=function(e,t){return e+t},e.prototype.avgSpeed=function(){if(0===this.measures.length)return 0;var e=this.speeds().reduce((function(e,t){return e+t}),0),t=this.measures.length;return this.bytePerSecondToBitPerSecond(e/t)},e.prototype.bytePerSecondToBitPerSecond=function(e){return i.Converter.bytesToBits(e)},e.prototype.minSpeed=function(){return 0===this.measures.length?0:this.bytePerSecondToBitPerSecond(Math.min.apply(Math,this.speeds()))},e.prototype.speeds=function(){return this.measures.map((function(e){return e.speed}))},e.prototype.maxSpeed=function(){return 0===this.measures.length?0:this.bytePerSecondToBitPerSecond(Math.max.apply(Math,this.speeds()))},e.prototype.totalTime=function(){return 0===this.measures.length?0:this.measures.reduce((function(e,t){return e+t.duration}),0)},e.prototype.avgTimeToFirstByte=function(){if(0===this.measures.length)return 0;var e=this.measures.reduce((function(e,t){return e+1e3*t.timeToFirstByte}),0)/this.measures.length;return Math.ceil(e)},e}();t.DownloadSpeedMeter=a},675:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDispatcher=void 0;var n=function(){function e(){this.callbacks=[]}return e.prototype.subscribe=function(e){var t=this;return this.callbacks.push(e),function(){return t.unsubscribe(e)}},e.prototype.dispatch=function(e){this.callbacks.slice(0).forEach((function(t){t(e)}))},e.prototype.unsubscribe=function(e){var t=this.callbacks.indexOf(e);t>-1&&this.callbacks.splice(t,1)},Object.defineProperty(e.prototype,"subscriberCount",{get:function(){return this.callbacks.length},enumerable:!1,configurable:!0}),e}();t.EventDispatcher=n},3489:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCheckingBackend=void 0;var r=n(4501),a=n(1916),o=n(4649),s=n(2226),c=n(1125),l=n(2364),u=function(){function e(e,t,n,r,a){var l=this;this.licenseCall=t,this.backendBaseUrl=n,this.adapter=r,this.authenticationCallback=a,this.licenseKeyReceived=function(e){clearTimeout(l.licenseLazyLoadingTimeoutHandle),l.unsubscribeFromAdapter(),l.info.key=e.licenseKey,l.promise=l.wrapLicenseCheckPromiseWithCallback(l.performLicenseCheck(),l.authenticationCallback)},this.licenseCallFailed=function(){clearTimeout(l.licenseLazyLoadingTimeoutHandle),l.unsubscribeFromAdapter(),l.backend=new s.NoOpBackend,l.authenticationCallback.authenticationCompleted(!1,void 0)},this.licenseLazyLoadingTimeout=function(){l.unsubscribeFromAdapter(),l.backend=new s.NoOpBackend,l.authenticationCallback.authenticationCompleted(!1,void 0)},this.info=i({},e),this.backend=new c.QueueBackend,this.licenseCall=t,void 0!==e.key&&""!==e.key?this.promise=this.wrapLicenseCheckPromiseWithCallback(this.performLicenseCheck(),this.authenticationCallback):!0===r.supportsDeferredLicenseLoading?(r.onLicenseKeyReceived.subscribe(this.licenseKeyReceived),r.onLicenseCallFailed.subscribe(this.licenseCallFailed),this.licenseLazyLoadingTimeoutHandle=window.setTimeout(this.licenseLazyLoadingTimeout,o.ANALYTICS_LICENSECALL_TIMEOUT)):(a.authenticationCompleted(!1,void 0),this.backend=new s.NoOpBackend)}return e.prototype.performLicenseCheck=function(){var e=this,t=this.info,n=t.key,i=t.domain,o=t.version;if(!n||""===n){var c={status:r.LicensingResult.Denied,message:"No license key provided"};return this.backend=new s.NoOpBackend,Promise.resolve(c)}return this.licenseCall(n,i,o,this.backendBaseUrl).then((function(t){if(t.status!==r.LicensingResult.Granted)throw new Error(t.message);var i=new l.RemoteBackend(!0,e.backendBaseUrl,n);return e.backend.flushTo(i),e.backend=i,t})).catch((function(t){return"Ignoring Impression due to DNT Header being set"===t.message?a.logger.error("License Check for Bitmovin Analytics failed because of",t):a.logger.errorMessageToUser("License Check for Bitmovin Analytics failed because of",t),e.backend=new s.NoOpBackend,{status:r.LicensingResult.Denied,message:t.message}}))},e.prototype.sendRequest=function(e){this.backend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.backend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.backend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.backend.sendAdRequest(e)},e.prototype.unsubscribeFromAdapter=function(){this.adapter.onLicenseKeyReceived.unsubscribe(this.licenseKeyReceived),this.adapter.onLicenseCallFailed.unsubscribe(this.licenseCallFailed)},e.prototype.wrapLicenseCheckPromiseWithCallback=function(e,t){return e.then((function(e){return t.authenticationCompleted(e.status===r.LicensingResult.Granted,e.features),e}))},e}();t.LicenseCheckingBackend=u},399:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LongPlaytimeFilteringBackend=void 0;var n=function(){function e(e){this.backend=e}return e.prototype.sendRequest=function(e){this.isPlayedAboveThreshold(e)||this.backend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.isPlayedAboveThreshold(e)||this.backend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.isPlayedAboveThreshold(e)||this.backend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.backend.sendAdRequest(e)},e.prototype.isPlayedAboveThreshold=function(e){return(null==e.played?0:e.played)>=9e4},e}();t.LongPlaytimeFilteringBackend=n},3786:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Measure=void 0;var n=function(){function e(e){this.download=e}return Object.defineProperty(e.prototype,"speed",{get:function(){return this.download.size/this.download.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this.download.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.download.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timeToFirstByte",{get:function(){return this.download.timeToFirstByte},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timestamp",{get:function(){return this.download.timestamp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpStatus",{get:function(){return this.download.httpStatus},enumerable:!1,configurable:!0}),e}();t.Measure=n},2226:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpBackend=void 0;var n=function(){function e(){}return e.prototype.sendRequest=function(e){},e.prototype.sendUnloadRequest=function(e){},e.prototype.sendRequestSynchronous=function(e){},e.prototype.sendAdRequest=function(e){},e}();t.NoOpBackend=n},9796:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(4649),r=n(4649),a=function(){function e(e){void 0===e&&(e=i.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD),this.qualityChangeThreshold=e,this.qualityChangeCount=0,this.previousVideoBitrate=0,this.previousAudioBitrate=0,this.startupHasFinished=!1}return e.prototype.resetValues=function(){this.qualityChangeCount=0,this.previousAudioBitrate=0,this.previousVideoBitrate=0,this.startupHasFinished=!1,this.stopResetInterval()},e.prototype.isQualityChangeEventEnabled=function(){return this.qualityChangeCount<=this.qualityChangeThreshold},e.prototype.increaseCounter=function(){this.qualityChangeCount++},e.prototype.shouldAllowVideoQualityChange=function(e){return this.startupHasFinished&&null!=e&&!isNaN(e)&&0!==this.previousVideoBitrate&&this.previousVideoBitrate!==e&&this.isQualityChangeEventEnabled()},e.prototype.setVideoBitrate=function(e){this.startupHasFinished&&(this.previousVideoBitrate=e)},e.prototype.setStartupHasFinished=function(){this.startupHasFinished=!0},e.prototype.shouldAllowAudioQualityChange=function(e){return this.startupHasFinished&&null!=e&&!isNaN(e)&&0!==this.previousAudioBitrate&&this.previousAudioBitrate!==e&&this.isQualityChangeEventEnabled()},e.prototype.setAudioBitrate=function(e){this.startupHasFinished&&(this.previousAudioBitrate=e)},e.prototype.startResetInterval=function(){var e=this;void 0===this.resetIntervalId&&(this.resetIntervalId=window.setInterval((function(){e.resetCounter()}),r.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL))},e.prototype.stopResetInterval=function(){void 0!==this.resetIntervalId&&(window.clearInterval(this.resetIntervalId),delete this.resetIntervalId)},e.prototype.resetCounter=function(){this.qualityChangeCount=0},e}();t.default=a},1125:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueueBackend=void 0;var n=function(){function e(){this.queue=[],this.unloadQueue=[],this.syncQueue=[],this.adQueue=[]}return e.prototype.sendRequest=function(e){this.queue.push(e)},e.prototype.sendUnloadRequest=function(e){this.unloadQueue.push(e)},e.prototype.sendRequestSynchronous=function(e){this.syncQueue.push(e)},e.prototype.sendAdRequest=function(e){this.adQueue.push(e)},e.prototype.flushTo=function(e){this.queue.forEach((function(t){e.sendRequest(t)})),this.unloadQueue.forEach((function(t){e.sendUnloadRequest(t)})),this.syncQueue.forEach((function(t){e.sendRequestSynchronous(t)})),this.adQueue.forEach((function(t){e.sendAdRequest(t)}))},e}();t.QueueBackend=n},2364:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteBackend=void 0;var i=n(5426),r=n(5063),a=function(){function e(e,t,n){this.licenseKey=n,this.hasAdModule=e,this.analyticsCall=new i.AnalyticsCall(t)}return e.prototype.sendRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendRequest(e,r.noOp)},e.prototype.sendUnloadRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){e.key=this.licenseKey,this.analyticsCall.sendRequestSynchronous(e,r.noOp)},e.prototype.sendAdRequest=function(e){e.key=this.licenseKey,this.hasAdModule&&this.analyticsCall.sendAdRequest(e)},e}();t.RemoteBackend=a},6235:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTracker=void 0;var n=function(){function e(){this.segments=[]}return e.prototype.reset=function(){this.segments=[]},e.prototype.addSegment=function(e){this.segments.push(e)},e.prototype.removeSegment=function(e){this.segments=this.segments.filter((function(t){return t.url!==e}))},e.prototype.getSegments=function(){return this.segments},e}();t.SegmentTracker=n},7390:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceNumberBackend=void 0;var n=function(){function e(e){this.sequenceNumber=0,this.underlying=e}return e.prototype.sendRequest=function(e){this.updateSampleBeforeSending(e),this.underlying.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.updateSampleBeforeSending(e),this.underlying.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.updateSampleBeforeSending(e),this.underlying.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.underlying.sendAdRequest(e)},e.prototype.updateSampleBeforeSending=function(e){e.sequenceNumber=this.sequenceNumber++},e}();t.SequenceNumberBackend=n},847:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCookieMaxAgeValue=t.validateCookieDomainValue=t.SessionPersistenceHandler=t.COOKIE_DEFAULT_MAX_AGE=t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID=void 0;var i=n(5063),r=n(5063),a=n(4934),o=n(1820);t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID="bitmovin_analytics_uuid",t.COOKIE_DEFAULT_MAX_AGE=31536e3;var s=function(e){var n=e.config;if(!1===(null==n?void 0:n.cookiesEnabled))return(0,a.deleteCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID),void(this.userId=i.generateUUID());var r=(0,a.getCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID);this.userId=(0,o.isBlank)(r)?i.generateUUID():r;var s=(0,t.validateCookieDomainValue)(null==n?void 0:n.cookiesDomain),c=(0,t.validateCookieMaxAgeValue)(null==n?void 0:n.cookiesMaxAge),l=Date.now(),u=new Date(l+1e3*c).toUTCString();(0,a.setCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID,this.userId,{domain:s,expires:u,maxAge:c})};t.SessionPersistenceHandler=s,t.validateCookieDomainValue=function(e){if(null!=e&&(0,o.isValidString)(e)&&!(0,o.isBlank)(e))return encodeURIComponent(e)},t.validateCookieMaxAgeValue=function(e){return null==e?t.COOKIE_DEFAULT_MAX_AGE:(0,r.isNumber)(e)?e:t.COOKIE_DEFAULT_MAX_AGE}},4916:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceInfoFallbackService=void 0;var i=n(1820),r=function(){function e(){}return e.prototype.reset=function(){this.streamFormat=void 0,this.audioCodec=void 0,this.videoCodec=void 0},e.prototype.setStreamFormat=function(e){this.streamFormat=e},e.prototype.applyStreamFormat=function(e){(0,i.isBlank)(this.streamFormat)||(e.streamFormat=this.streamFormat)},e.prototype.applyAndStoreCodecInfo=function(e,t){null!=(null==t?void 0:t.audioCodec)&&(this.audioCodec=t.audioCodec),null!=(null==t?void 0:t.videoCodec)&&(this.videoCodec=t.videoCodec),(0,i.isBlank)(this.audioCodec)||(e.audioCodec=this.audioCodec),(0,i.isBlank)(this.videoCodec)||(e.videoCodec=this.videoCodec)},e}();t.SourceInfoFallbackService=r},6743:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.None=0]="None",e[e.Overlapping=1]="Overlapping",e[e.FirstContainedInSecond=2]="FirstContainedInSecond",e[e.SecondContainedInFirst=3]="SecondContainedInFirst"}(n||(n={}));var i=function(){function e(){this.watched=[],this.videoDuration=null}return e.prototype.reset=function(){this.watched=[]},e.prototype.setVideoDuration=function(e){this.videoDuration=1e3*e},e.prototype.addWatched=function(e){if(null==this.videoDuration)throw new Error("no video duration set for completion tracker");this.watched.push(e);var t=this.mergeWatched(this.watched);return(this.getDuration(e)-t)/this.videoDuration},e.prototype.getCompletionPercentage=function(){if(null==this.videoDuration)throw new Error("no video duration set for completion tracker");for(var e=0,t=0,n=this.watched;t<n.length;t++){var i=n[t];e+=this.getDuration(i)}return e/this.videoDuration},e.prototype.mergeWatched=function(e){for(var t=0;t<e.length;t++)for(var i=e[t],r=t+1;r<e.length;r++){var a=e[r],o=0,s=this.getOverlappingType(i,a);if(s===n.Overlapping?(this.mergeAndReplace(i,t,a,r),o=this.getOverlappingTimespan(i,a)):s===n.FirstContainedInSecond?(this.watched.splice(t,1),o=this.getDuration(i)):s===n.SecondContainedInFirst&&(this.watched.splice(r,1),o=this.getDuration(a)),s!==n.None)return o+this.mergeWatched(this.watched)}return 0},e.prototype.getOverlappingType=function(e,t){return this.isMomentInTimespan(e.end,t)&&e.start<t.start||this.isMomentInTimespan(e.start,t)&&e.end>t.end?n.Overlapping:this.isMomentInTimespan(e.start,t)&&this.isMomentInTimespan(e.end,t)?n.FirstContainedInSecond:this.isMomentInTimespan(t.start,e)&&this.isMomentInTimespan(t.end,e)?n.SecondContainedInFirst:n.None},e.prototype.isMomentInTimespan=function(e,t){return e>=t.start&&e<t.end},e.prototype.mergeAndReplace=function(e,t,n,i){var r=e.end>n.end?e.end:n.end,a={start:e.start<n.start?e.start:n.start,end:r};this.watched.splice(t,1,a),this.watched.splice(i,1)},e.prototype.getOverlappingTimespan=function(e,t){return(e.end<t.end?e.end:t.end)-(e.start>=t.start?e.start:t.start)},e.prototype.getDuration=function(e){return Math.abs(e.end-e.start)},e}();t.default=i},3588:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AD_TYPE=void 0,function(e){e[e.NO_AD=0]="NO_AD",e[e.CSAI=1]="CSAI",e[e.SSAI=2]="SSAI"}(n||(t.AD_TYPE=n={}))},4355:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CdnProvider=void 0,function(e){e.CLOUDFLARE="cloudflare",e.AKAMAI="akamai",e.FASTLY="fastly",e.MAXCDN="maxcdn",e.CLOUDFRONT="cloudfront",e.CHINACACHE="chinacache",e.BITGRAVITY="bitgravity"}(n||(t.CdnProvider=n={}))},5878:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.CastTech=void 0,function(e){e.AirPlay="AirPlay",e.WebSocket="WebSocket",e.GoogleCast="GoogleCast"}(n||(t.CastTech=n={}))},5626:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVideoCodec=function(e){return!!e&&-1!==n.findIndex((function(t){return e.startsWith(t)}))},t.isAudioCodec=function(e){return!!e&&-1!==i.findIndex((function(t){return e.startsWith(t)}))};var n=["avc1","avc3","hvc1","av01","av1","hev1","vp9"],i=["mp4a","ec-3","ac-3","opus","audio/mp4"]},3458:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0;var n=function(){function e(e,t){this.code=e,this.message=t}return e.BITMOVIN_PLAYER_LICENSING_ERROR=new e(1103,""),e.SETUP_MISSING_LICENSE_WHITELIST=new e(1105,""),e.QUALITY_CHANGE_THRESHOLD_EXCEEDED=new e(1e4,"ANALYTICS_QUALITY_CHANGE_THRESHOLD_EXCEEDED"),e.BUFFERING_TIMEOUT_REACHED=new e(10001,"ANALYTICS_BUFFERING_TIMEOUT_REACHED"),e.VIDEO_STARTUP_TIMEOUT_REACHED=new e(10002,"ANALYTICS_VIDEOSTART_TIMEOUT_REACHED"),e}();t.ErrorCode=n},2361:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0,function(e){e.SETUP="setup",e.READY="ready",e.SOURCE_LOADED="sourceLoaded",e.PLAY="play",e.PLAYING="playing",e.PAUSE="pause",e.TIMECHANGED="timechanged",e.SEEK="seek",e.SEEKED="seeked",e.START_CAST="startCasting",e.END_CAST="endCasting",e.START_BUFFERING="startBuffering",e.END_BUFFERING="endBuffering",e.AUDIOTRACK_CHANGED="audioTrackChanged",e.AUDIO_CHANGE="audioChange",e.VIDEO_CHANGE="videoChange",e.START_FULLSCREEN="startFullscreen",e.END_FULLSCREEN="endFullscreen",e.START_AD="adStart",e.SUBTITLE_CHANGE="subtitleChange",e.END_AD="adEnd",e.MUTE="mute",e.UN_MUTE="unMute",e.ERROR="playerError",e.SCREEN_RESIZE="resize",e.UNLOAD="unload",e.END="end",e.SOURCE_UNLOADED="sourceUnloaded",e.MANUAL_SOURCE_CHANGE="manualSourceChangeInitiated",e.VIDEOSTART_TIMEOUT="VIDEOSTART_TIMEOUT",e.CUSTOM_DATA_CHANGE="customDataChange",e.PLAYLIST_TRANSITION="playlistTransition"}(n||(t.Event=n={}))},2168:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MIMETypes=void 0,t.getMIMETypeFromFileExtension=function(e){return e=e.split(/[?#]/)[0].toLowerCase(),(0,i.endsWith)(e,".m3u8")?o:(0,i.endsWith)(e,".mp4")||(0,i.endsWith)(e,".m4v")||(0,i.endsWith)(e,".m4a")?r:(0,i.endsWith)(e,".webm")?a:(0,i.endsWith)(e,".mpd")?s:void 0};var i=n(1820),r="video/mp4",a="video/webm",o="application/x-mpegURL",s="application/dash+xml";t.MIMETypes={MP4:r,WEBM:a,HLS:o,DASH:s}},9946:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PAGE_LOAD_TYPE=void 0,function(e){e[e.FOREGROUND=1]="FOREGROUND",e[e.BACKGROUND=2]="BACKGROUND"}(n||(t.PAGE_LOAD_TYPE=n={}))},556:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Player=void 0,function(e){e.BITMOVIN="bitmovin",e.BITMOVIN_PWX="bitmovin-pwx",e.JW="jw",e.RADIANT="radiant",e.VIDEOJS="videojs",e.HLSJS="hlsjs",e.SHAKA="shaka",e.DASHJS="dashjs",e.HTML5="html5",e.CHROMECAST_SHAKA="chromecast-shaka",e.AMAZON_IVS="amazonivs"}(n||(t.Player=n={}))},8525:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerSize=void 0,function(e){e.Window="WINDOW",e.Fullscreen="FULLSCREEN"}(n||(t.PlayerSize=n={}))},7224:function(e,t,n){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTypes=void 0,t.getStreamTypeFromMIMEType=function(e){return u[e]};var r,a=n(2168),o=a.MIMETypes.MP4,s=a.MIMETypes.WEBM,c=a.MIMETypes.HLS,l=a.MIMETypes.DASH,u=((i={})[o]="progressive",i[s]="progressive",i[c]="hls",i[l]="dash",i);!function(e){e.prog="progressive",e.hls="hls",e.dash="dash"}(r||(t.StreamTypes=r={}))},3565:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStartFailedReason=void 0;var i=n(3458),r=function(){function e(e,t){this.reason=e,this.errorCode=t}return e.PAGE_CLOSED=new e("PAGE_CLOSED",null),e.PLAYER_ERROR=new e("PLAYER_ERROR",null),e.TIMEOUT=new e("TIMEOUT",i.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED),e.UNKNOWN=new e("UNKNOWN",null),e}();t.VideoStartFailedReason=r},348:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Feature=void 0;var n=function(){function e(){this._config=void 0,this._isEnabled=!0}return Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},enumerable:!1,configurable:!0}),e.prototype.disable=function(){this._isEnabled=!1,this.disabled()},e.prototype.configure=function(e,t){return null!=t&&(this._config=this.extractConfig(t)),this.configured(e,this._config),this._config},e}();t.Feature=n},6845:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureManager=void 0;var i=n(1916),r=function(){function e(){this.features=[]}return e.prototype.registerFeatures=function(e){this.features=e},e.prototype.unregisterFeatures=function(){this.features.forEach((function(e){return e.disable()})),this.features=[]},e.prototype.resetFeatures=function(){this.features.forEach((function(e){return e.reset()}))},e.prototype.configureFeatures=function(e,t){this.features=this.features.filter((function(n){var r=n.configure(e,t);return!(!e||!0!==(null==r?void 0:r.enabled))||(i.logger.log("Disabling feature ".concat(n.constructor.name," as it isn't enabled according to license callback.")),n.disable(),!1)})),this.features.forEach((function(e){return e.enabled()}))},e}();t.FeatureManager=r},7614:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailBackend=void 0;var a=n(92),o=n(4649),s=n(5063),c=function(){function e(e){var t;this._queue=[],this._enabled=!1,this.backendUrl=(0,s.joinUrls)(null!==(t=null==e?void 0:e.backendUrl)&&void 0!==t?t:o.ANALYTICS_BACKEND_BASE_URL,"/analytics/error")}return Object.defineProperty(e.prototype,"queue",{get:function(){return this._queue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!1,configurable:!0}),e.copyErrorDetailTruncateStringsAndUrls=function(e,t,n){var r,a,o=this;return i(i({},e),{message:null===(r=e.message)||void 0===r?void 0:r.substr(0,t),data:this.copyErrorDataTruncateStrings(e.data,t),httpRequests:null===(a=e.httpRequests)||void 0===a?void 0:a.map((function(e){return o.copyHttpRequestTruncateUrls(e,n)}))})},e.copyHttpRequestTruncateUrls=function(e,t){var n,r;return i(i({},e),{url:null===(n=e.url)||void 0===n?void 0:n.substr(0,t),lastRedirectLocation:null===(r=e.lastRedirectLocation)||void 0===r?void 0:r.substr(0,t)})},e.copyErrorDataTruncateStrings=function(e,t){var n,r;return i(i({},e),{exceptionMessage:null===(n=e.exceptionMessage)||void 0===n?void 0:n.substr(0,t),additionalData:null===(r=e.additionalData)||void 0===r?void 0:r.substr(0,t)})},e.copyErrorDetailTruncateHttpRequests=function(e,t){var n;return i(i({},e),{httpRequests:null===(n=e.httpRequests)||void 0===n?void 0:n.slice(-t)})},e.prototype.limitHttpRequestsOfQueuedErrorDetails=function(t){var n=this;this._queue.forEach((function(i,r){n._queue[r]=e.copyErrorDetailTruncateHttpRequests(i,t)}))},e.prototype.send=function(t){var n=e.copyErrorDetailTruncateStringsAndUrls(t,e.MAX_STRING_LENGTH,e.MAX_URL_LENGTH);this.enabled?(0,a.post)(this.backendUrl,n,(function(){})):this._queue.push(n)},e.prototype.flush=function(){for(var e=r([],this._queue,!0),t=e.shift();null!=t;)this.removeFromQueue(t),this.send(t),t=e.shift()},e.prototype.clear=function(){this._queue.splice(0,this._queue.length)},e.prototype.removeFromQueue=function(e){var t=this._queue.findIndex((function(t){return t===e}));t>=0&&this._queue.splice(t,1)},e.MAX_URL_LENGTH=450,e.MAX_STRING_LENGTH=400,e}();t.ErrorDetailBackend=c},9557:function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailTracking=void 0;var o=n(6856),s=n(1916),c=n(5063),l=function(e){function t(t,n,i,r){var l=e.call(this)||this;return l.settingsProvider=t,l.backend=n,l.subscribables=i,l.httpRequestTracking=r,l.errorIndex=0,l.onErrorHandler=function(e){var t,n;try{if(!l.isEnabled)return;var i=null===(t=l.httpRequestTracking)||void 0===t?void 0:t.httpRequests,r=null==i?void 0:a([],i,!0),u=l.errorIndex;l.errorIndex++;var d={platform:"web",licenseKey:l.settingsProvider.licenseKey,domain:l.settingsProvider.domain,impressionId:l.settingsProvider.impressionId,analyticsVersion:o.VERSION,errorId:u,timestamp:(0,c.getCurrentTimestamp)(),code:e.code,message:e.message,data:null!==(n=e.errorData)&&void 0!==n?n:{additionalData:void 0,exceptionMessage:void 0,exceptionStacktrace:void 0},httpRequests:r};s.logger.log("ErrorDetailTracking.onError: ".concat(JSON.stringify(d))),l.backend.send(d)}catch(e){s.logger.error("ErrorDetailTracking.onError: Error in handler",e)}},i.forEach((function(e){return e.subscribe(l.onErrorHandler)})),l}return r(t,e),t.prototype.reset=function(){var e;null===(e=this.httpRequestTracking)||void 0===e||e.reset(),this.errorIndex=0},t.prototype.enabled=function(){this.backend.enabled=!0,this.backend.flush()},t.prototype.disabled=function(){var e,t=this;this.errorIndex=0,null===(e=this.httpRequestTracking)||void 0===e||e.disable(),this.backend.clear(),this.subscribables.forEach((function(e){return e.unsubscribe(t.onErrorHandler)}))},t.prototype.configured=function(e,t){var n,i,r=Math.max(null!==(n=null==t?void 0:t.numberOfHttpRequests)&&void 0!==n?n:0,0);null===(i=this.httpRequestTracking)||void 0===i||i.configure(r),this.backend.limitHttpRequestsOfQueuedErrorDetails(r)},t.prototype.extractConfig=function(e){return e.errorDetails},t}(n(348).Feature);t.ErrorDetailTracking=l},7881:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestTracking=void 0;var i=n(1916),r=n(3129),a=function(){function e(t){var n=this;this.subscribables=t,this._maxRequests=e.DEFAULT_MAX_REQUESTS,this._httpRequestQueue=new r.Queue,this.onDownloadFinishedHandler=function(e){try{n.addRequest(e.httpRequest)}catch(e){i.logger.error("HttpRequestTracking.onDownloadFinished: Error in handler",e)}},t.forEach((function(e){return e.subscribe(n.onDownloadFinishedHandler)}))}return Object.defineProperty(e.prototype,"maxRequests",{get:function(){return this._maxRequests},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"httpRequests",{get:function(){return this._httpRequestQueue.items},enumerable:!1,configurable:!0}),e.prototype.configure=function(e){this._maxRequests=e,this._httpRequestQueue.limit(e)},e.prototype.disable=function(){var e=this;this.subscribables.forEach((function(t){return t.unsubscribe(e.onDownloadFinishedHandler)})),this._httpRequestQueue.clear()},e.prototype.reset=function(){this._httpRequestQueue.clear()},e.prototype.addRequest=function(e){this._httpRequestQueue.offer(e),this._httpRequestQueue.limit(this._maxRequests)},e.DEFAULT_MAX_REQUESTS=10,e}();t.HttpRequestTracking=a},7912:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestType=void 0,function(e){e.DRM_LICENSE_WIDEVINE="DRM_LICENSE_WIDEVINE",e.DRM_OTHER="DRM_OTHER",e.MEDIA_THUMBNAILS="MEDIA_THUMBNAILS",e.MEDIA_VIDEO="MEDIA_VIDEO",e.MEDIA_AUDIO="MEDIA_AUDIO",e.MEDIA_PROGRESSIVE="MEDIA_PROGRESSIVE",e.MEDIA_SUBTITLES="MEDIA_SUBTITLES",e.MANIFEST_DASH="MANIFEST_DASH",e.MANIFEST_HLS="MANIFEST_HLS",e.MANIFEST_HLS_MASTER="MANIFEST_HLS_MASTER",e.MANIFEST_HLS_VARIANT="DRM_LICENSMANIFEST_HLS_VARIANTE_WIDEVINE",e.MANIFEST_SMOOTH="MANIFEST_SMOOTH",e.MANIFEST="MANIFEST",e.KEY_HLS_AES="KEY_HLS_AES",e.UNKNOWN="UNKNOWN",e.TIME_SYNC="TIME_SYNC",e.DRM_CERTIFICATE_FAIRPLAY="DRM_CERTIFICATE_FAIRPLAY",e.DRM_LICENSE_CLEARKEY="DRM_LICENSE_CLEARKEY",e.DRM_LICENSE_PRIMETIME="DRM_LICENSE_PRIMETIME",e.DRM_LICENSE_FAIRPLAY="DRM_LICENSE_FAIRPLAY",e.DRM_LICENSE_PLAYREADY="DRM_LICENSE_PLAYREADY",e.MANIFEST_ADS="MANIFEST_ADS"}(n||(t.HttpRequestType=n={}))},2675:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModule=void 0;var i=n(4679);t.PlayerModule={name:"analytics",module:{Analytics:i.Bitmovin8Adapter},hooks:{setup:function(e,t){var n=t.getConfig(),i=!n,r=!1===(null==n?void 0:n.analytics);if(i||r)return Promise.resolve();var a=new(0,e.Analytics)(t);return Promise.resolve(a)}}}},5791:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdAnalyticsSample=void 0;var i=n(5063),r=function(e){this.platform="web",e&&(this.videoImpressionId=e.impressionId,this.userAgent=e.userAgent,this.language=e.language,this.cdnProvider=e.cdnProvider,i.transferCustomDataFields(e,this),this.customUserId=e.customUserId,this.domain=e.domain,this.experimentName=e.experimentName,this.key=e.key,this.path=e.path,this.player=e.player,this.playerKey=e.playerKey,this.playerTech=e.playerTech,this.screenHeight=e.screenHeight,this.screenWidth=e.screenWidth,this.version=e.version,this.size=e.size,this.userId=e.userId,this.videoId=e.videoId,this.videoTitle=e.videoTitle,this.videoWindowHeight=e.videoWindowHeight,this.videoWindowWidth=e.videoWindowWidth,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec)};t.AdAnalyticsSample=r},7232:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdBreakSample=void 0;var i=n(5063),r=function(e,t){this.adFallbackIndex=0,t&&(this.manifestDownloadTime=i.calculateTime(t.downloadTiming.downloadTime)),e&&(this.adReplaceContentDuration=i.calculateTimeWithUndefined(e.replaceContentDuration),this.adFallbackIndex=(e.currentFallbackIndex||-1)+1);var n=e;n&&("pre"===n.position||"post"===n.position?this.adPosition=n.position:(this.adPosition="mid",this.adOffset=n.position),this.adPreloadOffset=i.calculateTimeWithUndefined(n.preloadOffset));var r=e;if(r){this.adIsPersistent=r.persistent;var a=r.tag;if(this.adFallbackIndex>0&&r.fallbackTags&&r.fallbackTags.length>=this.adFallbackIndex&&(a=r.fallbackTags[this.adFallbackIndex-1]),a&&(this.adTagType=a.type,this.adTagUrl=a.url),this.adTagUrl){var o=i.getHostnameAndPathFromUrl(this.adTagUrl);this.adTagServer=o.hostname,this.adTagPath=o.path}}var s=e;s&&(this.adScheduleTime=i.calculateTimeWithUndefined(s.scheduleTime),this.adIdPlayer=s.id)};t.AdBreakSample=r},4439:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdSample=void 0;var i=n(5063),r=function(){function e(t){if(this.clicked=0,this.closed=0,this.completed=0,this.midpoint=0,this.quartile1=0,this.quartile3=0,this.skipped=0,this.started=0,t){this.adClickthroughUrl=t.clickThroughUrl,this.adId=t.id,this.mediaUrl=t.mediaFileUrl;var n=i.getHostnameAndPathFromUrl(this.mediaUrl||"");this.mediaPath=n.path,this.mediaServer=n.hostname,this.isLinear=t.isLinear,this.adPlaybackHeight=t.height,this.adPlaybackWidth=t.width,t.data&&(this.videoBitrate=void 0===t.data.bitrate?void 0:1e3*t.data.bitrate,this.streamFormat=t.data.mimeType);var r=t.data;r&&(r.adSystem&&(this.adSystem=r.adSystem.name),r.advertiser&&(this.advertiserName=r.advertiser.name),this.apiFramework=r.apiFramework,r.creative&&(this.creativeAdId=r.creative.adId,this.creativeId=r.creative.id,r.creative.universalAdId&&(this.universalAdIdRegistry=r.creative.universalAdId.idRegistry,this.universalAdIdValue=r.creative.universalAdId.value)),this.adDescription=r.adDescription,this.minSuggestedDuration=i.calculateTimeWithUndefined(r.minSuggestedDuration),r.survey&&(this.surveyUrl=r.survey.uri),this.adTitle=r.adTitle,this.wrapperAdsCount=r.wrapperAdIds?r.wrapperAdIds.length:0)}var a=t;a&&(this.adSkippableAfter=e.parseSkipAfter(a.skippableAfter),this.adSkippable=a.skippable||(void 0===this.adSkippableAfter?void 0:this.adSkippableAfter>=0),this.adDuration=i.calculateTime(a.duration))}return e.parseSkipAfter=function(e){if(void 0!==e)return-1===e?e:i.calculateTime(e)},e}();t.AdSample=r},5529:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractCustomDataFieldsOnly=t.customDataFieldCount=t.customDataValuesKeys=void 0,t.customDataValuesKeys=["customData1","customData2","customData3","customData4","customData5","customData6","customData7","customData8","customData9","customData10","customData11","customData12","customData13","customData14","customData15","customData16","customData17","customData18","customData19","customData20","customData21","customData22","customData23","customData24","customData25","customData26","customData27","customData28","customData29","customData30","experimentName"],t.customDataFieldCount=t.customDataValuesKeys.filter((function(e){return e.match("customData\\d+")})).length,t.extractCustomDataFieldsOnly=function(e){var n={};return t.customDataValuesKeys.forEach((function(t){e[t]&&(n[t]=e[t])})),n}},4501:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LicensingResult=void 0,function(e){e.Granted="granted",e.Denied="denied",e.Skip="skip"}(n||(t.LicensingResult=n={}))},3413:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVideoDuration=function(e){return null==e||Number.isNaN(e)||e===1/0?0:e}},4820:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStateMachineCallbacks=void 0,t.defaultStateMachineCallbacks={setup:function(){},startup:function(){},playing:function(){},heartbeat:function(){},qualitychange:function(){},qualitychange_pause:function(){},qualitychange_rebuffering:function(){},videoChange:function(){},audioChange:function(){},audiotrack_changing:function(){},pause:function(){},paused_seeking:function(){},end_play_seeking:function(){},rebuffering:function(){},error:function(){},end:function(){},unload:function(){},ad:function(){},mute:function(){},unMute:function(){},subtitle_changing:function(){},setVideoTimeEndFromEvent:function(){},setVideoTimeStartFromEvent:function(){},videoStartFailed:function(){},startCasting:function(){},casting:function(){},manualSourceChange:function(){},initialSourceChange:function(){},muting_ready:function(){},customdatachange:function(){},release:function(){},playlistTransition:function(){}}},716:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDifferentSubtitleInfo=void 0,t.isDifferentSubtitleInfo=function(e,t){return!(null==e&&null==t||null!=e&&null!=t&&e.enabled===t.enabled&&e.language===t.language)}},5426:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsCall=void 0;var i=n(92),r=n(5063),a=function(){function e(e){this.analyticsServerUrl=(0,r.joinUrls)(e,"analytics"),this.adAnalyticsServerUrl=(0,r.joinUrls)(e,"analytics/a")}return e.prototype.sendRequest=function(e,t){(0,i.post)(this.analyticsServerUrl,e,t)},e.prototype.sendUnloadRequest=function(e){var t=this;this.trySendBeacon((function(e){return t.sendRequestSynchronous(e,r.noOp)}),this.getAnalyticsServerUrl(),e)},e.prototype.trySendBeacon=function(e,t,n){void 0===navigator.sendBeacon?e(n):navigator.sendBeacon(t,JSON.stringify(n))||e(n)},e.prototype.sendRequestSynchronous=function(e,t){(0,i.post)(this.analyticsServerUrl,e,t,!1)},e.prototype.sendAdRequest=function(e){var t=this;this.trySendBeacon((function(e){return(0,i.post)(t.getAdAnalyticsServerUrl(),e,r.noOp)}),this.getAdAnalyticsServerUrl(),e)},e.prototype.getAnalyticsServerUrl=function(){return this.analyticsServerUrl},e.prototype.getAdAnalyticsServerUrl=function(){return this.adAnalyticsServerUrl},e}();t.AnalyticsCall=a},5248:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceInfoFromBitmovinSourceConfig=void 0,t.getSourceInfoFromBitmovinSourceConfig=function(e,t){if(!e)return{progBitrate:void 0,progUrl:void 0};if("string"==typeof e)return{progBitrate:0,progUrl:e};if(Array.isArray(e)&&e.length>0){var n=t.getPlaybackVideoData(),i=0;return null==n||isNaN(+n.id)||(i=+n.id),{progBitrate:e[i].bitrate||0,progUrl:e[i].url}}return"object"!=typeof e||Array.isArray(e)?{progBitrate:void 0,progUrl:void 0}:{progBitrate:e.bitrate||0,progUrl:e.url}}},404:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodecHelper=void 0;var n={avc:['video/mp4; codecs="avc1.42000a"'],vp9:['video/mp4; codecs="vp09.00.50.08"'],av1:['video/mp4; codecs="av01.0.08M.08"'],hevc:['video/mp4; codecs="hev1.1.6.L93.B0"']},i=function(){function e(){}return Object.defineProperty(e,"supportedVideoFormats",{get:function(){var e=this;if("MediaSource"in window)return Object.getOwnPropertyNames(n).filter((function(t){return n[t].some((function(t){return e.isCodecSupported(t)}))}))},enumerable:!1,configurable:!0}),e.isCodecSupported=function(e){return"MediaSource"in window&&MediaSource.isTypeSupported(e)},e}();t.CodecHelper=i},5766:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;var i=n(5063),r=function(){function e(){}return e.bytesToBits=function(e){return 8*e},e.bitsToBytes=function(e){return Math.round(e/8)},e.bytesToKiloBytes=function(e){return i.calculateTime(1e3*e)},e.kiloBytesToMegaBytes=function(e){return 1e3*e},e}();t.Converter=r},1652:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDebugging=void 0;var n=function(e,t,n,i,r){this.event=e,this.from=t,this.to=n,this.timestamp=i,this.eventObject=r};t.EventDebugging=n},92:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.post=function(e,t,n,r){void 0===r&&(r=!0);var a,o=!1;window.XDomainRequest&&(o=!0),a=o?new window.XDomainRequest:new XMLHttpRequest;var s=function(){if(a.readyState==XMLHttpRequest.DONE){if(a.responseText<=0)return;var e=JSON.parse(a.responseText);n(e)}};o?a.onload=s:a.onreadystatechange=s;try{a.open("POST",e,r),o||a.setRequestHeader("Content-Type","text/plain"),a.send(JSON.stringify(t))}catch(e){i.logger.error("Failed to send POST request.",e)}};var i=n(1916)},5253:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCall=function(e,t,n,a){var o=(0,r.joinUrls)(a,"/licensing"),s={analyticsVersion:n,domain:t,key:e};return new Promise((function(e){(0,i.post)(o,s,(function(t){e(t)}))}))};var i=n(92),r=n(5063)},1916:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.padRight=void 0;var i=function(){function e(){}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.initialize=function(e){this.analyticsDebugConfig=e},e.prototype.log=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.enabled&&console.log(e,t)},e.prototype.table=function(e,t){this.enabled&&console.table(e,t)},e.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.enabled&&console.warn(e,t)},e.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this.enabled&&console.error(e,t)},e.prototype.errorMessageToUser=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];console.error.apply(console,n([e],t,!1))},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.analyticsDebugConfig||!1},enumerable:!1,configurable:!0}),e}();t.padRight=function(e,t){return(e+new Array(t).join(" ")).slice(0,t)},t.logger=i.getInstance()},3129:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Queue=void 0;var n=function(){function e(){this._items=[]}return Object.defineProperty(e.prototype,"items",{get:function(){return this._items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),e.prototype.offer=function(e){this._items.push(e)},e.prototype.poll=function(){return this._items.shift()},e.prototype.clear=function(){this._items.splice(0)},e.prototype.limit=function(e){for(;this._items.length>e;)this.poll()},e}();t.Queue=n},4649:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD=t.ANALYTICS_REBUFFER_TIMEOUT=t.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL=t.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD=t.ANALYTICS_VIDEOSTART_TIMEOUT=t.ANALYTICS_LICENSECALL_TIMEOUT=t.ANALYTICS_BACKEND_BASE_URL=t.MESSAGE_NAMESPACE=void 0,t.MESSAGE_NAMESPACE="urn:x-cast:com.bitmovin.analytics.cast",t.ANALYTICS_BACKEND_BASE_URL="https://analytics-ingress-global.bitmovin.com",t.ANALYTICS_LICENSECALL_TIMEOUT=6e4,t.ANALYTICS_VIDEOSTART_TIMEOUT=6e4,t.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD=50,t.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL=36e5,t.ANALYTICS_REBUFFER_TIMEOUT=12e4,t.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD=3},5063:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinUrls=t.getURLResourceName=t.calculatePercentage=t.getHostnameAndPathFromUrl=t.getHiddenProp=t.isVideoInFullscreen=t.getDocumentPropWithPrefix=t.transferCustomDataFields=t.getCustomDataString=t.noOp=t.generateUUID=t.getCurrentTimestamp=t.calculateTime=t.calculateTimeWithUndefined=t.sanitizePath=t.isNumber=t.isBoolean=void 0,t.getPageLoadType=function(){var e=(0,t.getHiddenProp)();return null!=e&&!0===document[e]?i.PAGE_LOAD_TYPE.BACKGROUND:i.PAGE_LOAD_TYPE.FOREGROUND};var i=n(9946),r=n(5529),a=n(1820);t.isBoolean=function(e){return null!=e&&"boolean"==typeof e},t.isNumber=function(e){return null!=e&&"number"==typeof e},t.sanitizePath=function(e){return e.replace(/\/$/g,"")},t.calculateTimeWithUndefined=function(e){return void 0===e?e:(e*=1e3,Math.round(e))},t.calculateTime=function(e){return e*=1e3,Math.round(e)},t.getCurrentTimestamp=function(){return Date.now()},t.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},t.noOp=function(){},t.getCustomDataString=function(e){return"object"==typeof e?JSON.stringify(e):"function"==typeof e?(0,t.getCustomDataString)(e()):void 0===e?e:"string"!=typeof e?String(e):e},t.transferCustomDataFields=function(e,n){for(var i=1;i<=r.customDataFieldCount;i++){var a="customData".concat(i);n[a]=(0,t.getCustomDataString)(e[a])}},t.getDocumentPropWithPrefix=function(e){if(e in document)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0,i=["webkit","moz","ms","o"];n<i.length;n++){var r=i[n];if(r+t in document)return r+t}},t.isVideoInFullscreen=function(){var e=(0,t.getDocumentPropWithPrefix)("fullscreenElement");return void 0!==e&&document[e]&&"VIDEO"===document[e].nodeName},t.getHiddenProp=function(){return(0,t.getDocumentPropWithPrefix)("hidden")},t.getHostnameAndPathFromUrl=function(e){var t=document.createElement("a");return t.href=e,{hostname:t.hostname,path:t.pathname}},t.calculatePercentage=function(e,t){if(void 0!==t&&0!==t)return Math.round((e||0)/t*100)},t.getURLResourceName=function(e){return 0===e.length?"":e.split("/").pop()||""},t.joinUrls=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return((0,a.endsWith)(e,"/")&&void 0!==t?e.substr(0,e.length-1):e)+"/"+((0,a.startsWith)(t,"/")?t.substr(1):t)}))}},3612:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewportTracker=void 0;var i=n(1916),r=n(5063),a=function(){function e(e,t,n){void 0===n&&(n=1);var a=this;this.inViewport=void 0,this.threshold=n,this.onIntersectionChanged=t,this.element=e;try{var o={root:null,rootMargin:"0px",threshold:n};this.observer=new IntersectionObserver((function(e,t){return a.handleIntersect(e,t)}),o),this.observer.observe(e)}catch(e){i.logger.log("Couldn't create instance of IntersectionObserver. timeInViewport will always be reported as 100%.")}this.hidden=r.getHiddenProp(),this.hidden&&(this.visibilityChange=this.hidden.replace("hidden","")+"visibilitychange",document.addEventListener(this.visibilityChange,this.handleVisibilityChange=this.handleVisibilityChange.bind(this),!1))}return e.prototype.isHidden=function(){return this.hidden&&document[this.hidden]},e.prototype.isInViewport=function(){return!this.isHidden()&&(null==this.inViewport||this.inViewport)},e.prototype.dispose=function(){this.observer&&(this.observer.unobserve(this.element),this.observer.disconnect()),this.visibilityChange&&document.removeEventListener(this.visibilityChange,this.handleVisibilityChange,!1)},e.prototype.handleVisibilityChange=function(){this.onIntersectionChanged()},e.prototype.handleIntersect=function(e,t){var n=this;e.forEach((function(e){e.target===n.element&&(n.inViewport=!(e.intersectionRatio<n.threshold))})),this.onIntersectionChanged()},e}();t.ViewportTracker=a},2376:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowEventTracker=void 0;var n=function(){function e(){this.trackedObjects=[]}return e.prototype.addEventListener=function(e,t){this.trackedObjects.push({eventName:e,func:t}),window.addEventListener(e,t)},e.prototype.release=function(){for(;0!==this.trackedObjects.length;){var e=this.trackedObjects.pop();void 0!==e&&window.removeEventListener(e.eventName,e.func)}},e}();t.WindowEventTracker=n},4934:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCookie=t.getCookie=t.setCookie=void 0,t.setCookie=function(e,t,n){var i=e+"="+t+"; path=/";(null==n?void 0:n.domain)&&(i+="; domain=".concat(n.domain)),(null==n?void 0:n.expires)&&(i+="; expires=".concat(n.expires)),(null==n?void 0:n.maxAge)&&(i+="; max-age=".concat(n.maxAge)),document.cookie=i},t.getCookie=function(e){for(var t=e+"=",n=0,i=document.cookie.split(";");n<i.length;n++){for(var r=i[n],a=r;" "===a.charAt(0);)a=a.substring(1);if(0===a.indexOf(t))return a.substring(t.length,r.length)}return""},t.deleteCookie=function(e){document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}},1820:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=t.endsWith=t.isBlank=t.isEmpty=t.isValidString=void 0,t.isValidString=function(e){return null!=e&&"string"==typeof e},t.isEmpty=function(e){return null==e||0===e.length},t.isBlank=function(e){return(0,t.isEmpty)(e)||(0,t.isEmpty)(null==e?void 0:e.trim())},t.endsWith=function(e,n){return!(!(0,t.isValidString)(e)||!(0,t.isValidString)(n))&&(null!=String.prototype.endsWith?e.endsWith(n):e.substring(e.length-n.length)===n)},t.startsWith=function(e,n){return!(!(0,t.isValidString)(e)||!(0,t.isValidString)(n))&&(null!=String.prototype.startsWith?e.startsWith(n):e.substring(0,n.length)===n)}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,n),a.exports}var i={};return function(){"use strict";var e=i;Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerModule=e.BitmovinPwxAnalyticsPackage=e.adapters=e.VideojsAdapter=e.ShakaAdapter=e.HlsAdapter=e.HTMLVideoElementAdapter=e.DashjsAdapter=e.CAFv3Adapter=e.Bitmovin8Adapter=e.AmazonIVSAdapter=e.CdnProviders=e.Players=e.version=void 0;var t=n(6856);Object.defineProperty(e,"version",{enumerable:!0,get:function(){return t.VERSION}});var r=n(3703);Object.defineProperty(e,"AmazonIVSAdapter",{enumerable:!0,get:function(){return r.AmazonIVSAdapter}});var a=n(4679);Object.defineProperty(e,"Bitmovin8Adapter",{enumerable:!0,get:function(){return a.Bitmovin8Adapter}});var o=n(2506);Object.defineProperty(e,"BitmovinPwxAnalyticsPackage",{enumerable:!0,get:function(){return o.BitmovinPwxAnalyticsPackage}});var s=n(5127);Object.defineProperty(e,"CAFv3Adapter",{enumerable:!0,get:function(){return s.CAFv3Adapter}});var c=n(9999);Object.defineProperty(e,"DashjsAdapter",{enumerable:!0,get:function(){return c.DashjsAdapter}});var l=n(9566);Object.defineProperty(e,"HlsAdapter",{enumerable:!0,get:function(){return l.HlsAdapter}});var u=n(701);Object.defineProperty(e,"HTMLVideoElementAdapter",{enumerable:!0,get:function(){return u.HTMLVideoElementAdapter}});var d=n(2063);Object.defineProperty(e,"ShakaAdapter",{enumerable:!0,get:function(){return d.ShakaAdapter}});var E=n(4179);Object.defineProperty(e,"VideojsAdapter",{enumerable:!0,get:function(){return E.VideojsAdapter}});var p=n(4355);Object.defineProperty(e,"CdnProviders",{enumerable:!0,get:function(){return p.CdnProvider}});var h=n(556);Object.defineProperty(e,"Players",{enumerable:!0,get:function(){return h.Player}});var v=n(2675);Object.defineProperty(e,"PlayerModule",{enumerable:!0,get:function(){return v.PlayerModule}}),e.adapters={AmazonIVSAdapter:r.AmazonIVSAdapter,Bitmovin8Adapter:a.Bitmovin8Adapter,CAFv3Adapter:s.CAFv3Adapter,DashjsAdapter:c.DashjsAdapter,HTMLVideoElementAdapter:u.HTMLVideoElementAdapter,HlsAdapter:l.HlsAdapter,ShakaAdapter:d.ShakaAdapter,VideojsAdapter:E.VideojsAdapter},e.default={PlayerModule:v.PlayerModule}}(),i}()}))},1701:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsPackage=void 0;const i=n(6567);t.AnalyticsPackage=i.BitmovinPwxAnalyticsPackage,t.default=t.AnalyticsPackage}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}return n(1701)})()));
|