bitmovin-analytics 2.53.1 → 2.53.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/bitmovin-analytics-bitmovin-player-web-x.js +2 -2
- package/bitmovin-analytics-bitmovin-player-web-x.js.map +1 -1
- package/bitmovin-analytics-bitmovin-player.js +2 -2
- package/bitmovin-analytics-bitmovin-player.js.map +1 -1
- package/bitmovin-analytics.js +2 -2
- package/bitmovin-analytics.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* This source code and its use and distribution, is subject to the terms
|
|
6
6
|
* and conditions of the applicable license agreement.
|
|
7
7
|
*
|
|
8
|
-
* Bitmovin Analytics Collector Version 2.53.
|
|
8
|
+
* Bitmovin Analytics Collector Version 2.53.2
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bitmovin=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.analytics=t())}(self,(function(){return function(){var e={2595:function(e,t){var i;i={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 n="string"==typeof e.initial?{state:e.initial}:e.initial,a=e.terminal||e.final,r=t||e.target||{},o=e.events||[],s=e.callbacks||{},u={},l={},c=function(e){var t=Array.isArray(e.from)?e.from:e.from?[e.from]:[i.WILDCARD];u[e.name]=u[e.name]||{};for(var n=0;n<t.length;n++)l[t[n]]=l[t[n]]||[],l[t[n]].push(e.name),u[e.name][t[n]]=e.to||t[n];e.to&&(l[e.to]=l[e.to]||[])};n&&(n.event=n.event||"startup",c({name:n.event,from:"none",to:n.state}));for(var d=0;d<o.length;d++)c(o[d]);for(var p in u)u.hasOwnProperty(p)&&(r[p]=i.buildEvent(p,u[p]));for(var p in s)s.hasOwnProperty(p)&&(r[p]=s[p]);return r.current="none",r.is=function(e){return Array.isArray(e)?e.indexOf(this.current)>=0:this.current===e},r.can=function(e){return!this.transition&&void 0!==u[e]&&(u[e].hasOwnProperty(this.current)||u[e].hasOwnProperty(i.WILDCARD))},r.cannot=function(e){return!this.can(e)},r.transitions=function(){return(l[this.current]||[]).concat(l[i.WILDCARD]||[])},r.isFinished=function(){return this.is(a)},r.error=e.error||function(e,t,i,n,a,r,o){throw o||r},r.states=function(){return Object.keys(l).sort()},n&&!n.defer&&r[n.event](),r},doCallback:function(e,t,n,a,r,o){if(t)try{return t.apply(e,[n,a,r].concat(o))}catch(t){return e.error(n,a,r,o,i.Error.INVALID_CALLBACK,"an exception occurred in a caller-provided callback function",t)}},beforeAnyEvent:function(e,t,n,a,r){return i.doCallback(e,e.onbeforeevent,t,n,a,r)},afterAnyEvent:function(e,t,n,a,r){return i.doCallback(e,e.onafterevent||e.onevent,t,n,a,r)},leaveAnyState:function(e,t,n,a,r){return i.doCallback(e,e.onleavestate,t,n,a,r)},enterAnyState:function(e,t,n,a,r){return i.doCallback(e,e.onenterstate||e.onstate,t,n,a,r)},changeState:function(e,t,n,a,r){return i.doCallback(e,e.onchangestate,t,n,a,r)},beforeThisEvent:function(e,t,n,a,r){return i.doCallback(e,e["onbefore"+t],t,n,a,r)},afterThisEvent:function(e,t,n,a,r){return i.doCallback(e,e["onafter"+t]||e["on"+t],t,n,a,r)},leaveThisState:function(e,t,n,a,r){return i.doCallback(e,e["onleave"+n],t,n,a,r)},enterThisState:function(e,t,n,a,r){return i.doCallback(e,e["onenter"+a]||e["on"+a],t,n,a,r)},beforeEvent:function(e,t,n,a,r){if(!1===i.beforeThisEvent(e,t,n,a,r)||!1===i.beforeAnyEvent(e,t,n,a,r))return!1},afterEvent:function(e,t,n,a,r){i.afterThisEvent(e,t,n,a,r),i.afterAnyEvent(e,t,n,a,r)},leaveState:function(e,t,n,a,r){var o=i.leaveThisState(e,t,n,a,r),s=i.leaveAnyState(e,t,n,a,r);return!1!==o&&!1!==s&&(i.ASYNC===o||i.ASYNC===s?i.ASYNC:void 0)},enterState:function(e,t,n,a,r){i.enterThisState(e,t,n,a,r),i.enterAnyState(e,t,n,a,r)},buildEvent:function(e,t){return function(){var n=this.current,a=t[n]||(t[i.WILDCARD]!=i.WILDCARD?t[i.WILDCARD]:n)||n,r=Array.prototype.slice.call(arguments);if(this.transition)return this.error(e,n,a,r,i.Error.PENDING_TRANSITION,"event "+e+" inappropriate because previous transition did not complete");if(this.cannot(e))return this.error(e,n,a,r,i.Error.INVALID_TRANSITION,"event "+e+" inappropriate in current state "+this.current);if(!1===i.beforeEvent(this,e,n,a,r))return i.Result.CANCELLED;if(n===a)return i.afterEvent(this,e,n,a,r),i.Result.NOTRANSITION;var o=this;this.transition=function(){return o.transition=null,o.current=a,i.enterState(o,e,n,a,r),i.changeState(o,e,n,a,r),i.afterEvent(o,e,n,a,r),i.Result.SUCCEEDED},this.transition.cancel=function(){o.transition=null,i.afterEvent(o,e,n,a,r)};var s=i.leaveState(this,e,n,a,r);return!1===s?(this.transition=null,i.Result.CANCELLED):i.ASYNC===s?i.Result.PENDING:this.transition?this.transition():void 0}}},e.exports&&(t=e.exports=i),t.StateMachine=i},887:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AdModule=void 0;var n=i(5063),a=i(5517),r=i(2953),o=i(3182),s=function(){function e(e,t){var i=this;this.player=e,this.windowEventTracker=t,this.adCallbacks=new a.AdCallbacks,this.isLinearAdActive=function(){var e;return null!==(e=i.player.isLinearAdActive())&&void 0!==e&&e},this.getContainer=function(){return i.player.getContainer()},this.getAdModuleInfo=function(){var e;return null!==(e=i.player.getAdModuleInfo())&&void 0!==e?e:{name:void 0,version:void 0}},this.currentTime=function(){var e;return null!==(e=i.player.getCurrentTime())&&void 0!==e?e:0},this.register()}return e.prototype.getAutoPlay=function(){var e;return null!==(e=this.player.autoplay)&&void 0!==e&&e},e.prototype.register=function(){var e=this;this.player.on(o.BITMOVIN8_PLAYER_EVENT.Play,(function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPlay()})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.Paused,(function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPause()})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdStarted,(function(t){e.adCallbacks.onAdStarted((0,r.mapBitmovinAd)(t.ad))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdFinished,(function(t){e.adCallbacks.onAdFinished((0,r.mapBitmovinAd)(t.ad))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdBreakStarted,(function(t){e.adCallbacks.onAdBreakStarted((0,r.mapBitmovinAdBreak)(t.adBreak))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdBreakFinished,(function(t){e.adCallbacks.onAdBreakFinished((0,r.mapBitmovinAdBreak)(t.adBreak))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdClicked,(function(t){e.adCallbacks.onAdClicked({clickThroughUrl:t.clickThroughUrl})})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdQuartile,(function(t){e.adCallbacks.onAdQuartile({quartile:t.quartile})})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdSkipped,(function(t){e.adCallbacks.onAdSkipped((0,r.mapBitmovinAd)(t.ad))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdError,(function(t){var i;e.adCallbacks.onAdError((0,r.mapBitmovinAdError)(t,null===(i=e.player.getActiveAd())||void 0===i?void 0:i.id))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdManifestLoaded,(function(t){var i,a,o=t.adConfig,s="vmap"===(null===(i=null==o?void 0:o.tag)||void 0===i?void 0:i.type),u=(0,n.isNotNullish)(t.adConfig)?(0,r.mapBitmovinAdBreak)(t.adConfig):void 0,l=null===(a=t.downloadTiming)||void 0===a?void 0:a.downloadTime;e.adCallbacks.onAdManifestLoaded({adBreakInfo:u,manifestDownloadTime:l,isVmap:s})}));var t=function(){e.adCallbacks.onBeforeUnload()};this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},e}();t.Bitmovin8AdModule=s},4679:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8Adapter=void 0;var n=i(4350),a=i(6398),r=i(8331),o=i(9627),s=i(1916),u=i(2108),l=i(4926),c=i(4067),d=i(6596),p=i(6923),h=function(){function e(e,t){var i,l=this;if(this.ssai={adBreakStart:function(e){if((0,u.isDefined)(l.internalAdapter)){var t=(0,c.sanitizeBitmovin8AdapterSsaiAdBreakMetadataAdPosition)(e);if((0,a.hasValidSsaiAdBreakMetadataStructure)(t)){var i=(0,a.simplySanitizeSsaiAdBreakMetadata)(t);l.internalAdapter.ssaiService.adBreakStart(i)}}},adStart:function(e){if((0,u.isDefined)(l.analytics)&&(0,u.isDefined)(l.internalAdapter)&&(0,a.hasValidSsaiAdMetadataStructure)(e)){var t=(0,a.simplySanitizeSsaiAdMetadata)(e);l.internalAdapter.ssaiService.adStart(t),l.analytics.setConfigParameters(),l.analytics.setAutoDetectedDeviceInformation()}},adQuartileFinished:function(e,t){if((0,u.isDefined)(l.analytics)&&(0,u.isDefined)(l.internalAdapter)&&(0,a.hasValidSsaiAdQuartileStructure)(e)){var i=(0,a.sanitizeSsaiAdQuartileMetadata)(t);l.internalAdapter.ssaiService.adQuartileFinished(e,i)}},adBreakEnd:function(){(0,u.isDefined)(l.analytics)&&(0,u.isDefined)(l.internalAdapter)&&(l.internalAdapter.ssaiService.adBreakEnd(),l.analytics.setConfigParameters(),l.analytics.setAutoDetectedDeviceInformation())}},(0,u.hasPlayerAlreadyBeenAugmented)(e))s.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance");else{(0,u.markPlayerInstanceAsAugmented)(e);var h=e.getConfig(),m=(0,r.sanitizeAnalyticsConfig)(h.analytics);if((0,o.areCollectorRequirementsValid)(m)){(0,r.guardAgainstDuplicatedUserId)(m),m.playerKey=null!==(i=m.playerKey)&&void 0!==i?i:h.key;var f=d.Bitmovin8InternalAdapter.create(new p.Bitmovin8PlayerProxy(e),t);this.internalAdapter=f,this.analytics=n.Analytics.create(m,this.internalAdapter),e.analytics=this,this.wrapPlayerLoad(e,this.analytics,f)}}}return e.prototype.wrapPlayerLoad=function(e,t,i){var n=e.load;e.load=function(){for(var a=[],r=0;r<arguments.length;r++)a[r]=arguments[r];if(a.length>0){var o=a[0].analytics;t.sourceChange(o)}return i.trackLoadstartWithAutoplay(),n.apply(e,a)}},Object.defineProperty(e.prototype,"version",{get:function(){return l.VERSION},enumerable:!1,configurable:!0}),e.prototype.getCurrentImpressionId=function(){if((0,u.isDefined)(this.analytics))return this.analytics.getCurrentImpressionId()},e.prototype.getUserId=function(){if((0,u.isDefined)(this.analytics))return this.analytics.getUserId()},e.prototype.setCustomData=function(e){(0,u.isDefined)(this.internalAdapter)&&this.internalAdapter.setCustomData(e)},e.prototype.setCustomDataOnce=function(e){(0,u.isDefined)(this.analytics)&&this.analytics.setCustomDataOnce(e)},e.prototype.sourceChange=function(e){(0,u.isDefined)(this.analytics)&&this.analytics.sourceChange(e)},e.version=l.VERSION,e}();t.Bitmovin8Adapter=h},6596:function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(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 i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8InternalAdapter=void 0;var o,s=i(2403),u=i(9664),l=i(2663),c=i(6235),d=i(4916),p=i(6743),h=i(5878),m=i(3458),f=i(2361),v=i(556),A=i(8525),E=i(7614),g=i(9557),y=i(7881),S=i(3413),T=i(5248),I=i(4649),D=i(5063),b=i(2647),_=i(887),N=i(3182),C=i(7543),P=i(8676),R=i(665);!function(e){e.Fullscreen="fullscreen",e.Inline="inline",e.PictureInPicture="pictureinpicture"}(o||(o={}));var M=function(e){function t(t,i,n,a,r,o,u){var c=e.call(this,u)||this;c.onBeforeUnLoadEvent=!1,c.getPlayerVersion=function(){var e;return null!==(e=c.player.version)&&void 0!==e?e:"unknown"},c.getPlayerName=function(){return v.Player.BITMOVIN},c.getPlayerTech=function(){var e;return null!==(e=c.player.getPlayerType())&&void 0!==e?e:"unknown"},c.getDrmPerformanceInfo=function(){return c.drmPerformanceInfo},c.httpRequestTrackingAdapter=r,c._videoCompletionTracker=a,c.segmentTracker=n,c.speedMeter=i,c.player=t;var d=new l.HeartbeatService((function(){var e,t;return null!==(t=null!==(e=c.player.getCurrentTime())&&void 0!==e?e:c.lastTrackedCurrentTime)&&void 0!==t?t:0})),p=new s.Bitmovin8AnalyticsStateMachine(c.stateMachineCallbacks,d,c.opts);return d.setListener(p),c.sourceInfoFallbackService=o,c.stateMachine=p,c}return a(t,e),Object.defineProperty(t.prototype,"currentTime",{get:function(){return(0,D.isNotNullish)(this.player.getCurrentTime())&&!this.isAdPlaying?this.player.getCurrentTime():this.lastTrackedCurrentTime?this.lastTrackedCurrentTime:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAdPlaying",{get:function(){return(0,D.isNotNullish)(this.player.getActiveAd())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsDeferredLicenseLoading",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"adModule",{get:function(){return this._adModule},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoCompletionTracker",{get:function(){return this._videoCompletionTracker},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){var t=this;this.registerPlayerEventListeners(),this._adModule=new _.Bitmovin8AdModule(this.player,this.windowEventTracker),this.registerUnloadEventListeners(),this.ssaiService.activate({getPlayerCurrentTime:function(){return t.currentTime},reportEngagementInteraction:function(t){e.sendSsaiEngagementAdSample(t)},reportPlaybackInteraction:function(e,i){t.stateMachine.sendPlayingSample(e,i,!0)}});var i=new y.HttpRequestTracking([this.httpRequestTrackingAdapter]);return[new g.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new E.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],i)]},t.prototype.resetSourceRelatedState=function(){this.ssaiService.resetSourceRelatedState(),e.prototype.resetSourceRelatedState.call(this)},t.prototype.getAutoPlay=function(){var e;return null!==(e=this.player.autoplay)&&void 0!==e&&e},t.prototype.getCurrentPlaybackInfo=function(){var t,i,n=this.player.getContainer(),a=r(r({},e.prototype.getCommonPlaybackInfo.call(this)),{size:this.player.getViewMode()===o.Fullscreen?A.PlayerSize.Fullscreen:A.PlayerSize.Window,playerTech:this.getPlayerTech(),isLive:this.player.isLive(),videoDuration:(0,S.normalizeVideoDuration)(this.videoDuration),streamFormat:this.player.getStreamType(),videoWindowWidth:null==n?void 0:n.offsetWidth,videoWindowHeight:null==n?void 0:n.offsetHeight,isMuted:this.player.isMuted(),isCasting:this.player.isCasting(),audioLanguage:null===(t=this.player.getAudio())||void 0===t?void 0:t.lang,subtitleEnabled:!1,droppedFrames:(0,D.isNotNullish)(this.player.getSource())&&null!==(i=this.player.getDroppedVideoFrames())&&void 0!==i?i:0});return this.applySubtitleProperties(a),this.applyPlaybackQualityProperties(a),this.applyCastingProperties(a),this.applySourceProperties(a),((0,D.isNullish)(a.streamFormat)||"unknown"===a.streamFormat)&&this.sourceInfoFallbackService.applyStreamFormat(a),a},t.prototype.getSegmentInfo=function(){return this.segmentTracker.getSegments()},t.prototype.getDownloadSpeedInfo=function(){return this.speedMeter.getInfo()},t.prototype.resetDownloadSpeedInfoMeasures=function(){this.speedMeter.reset()},t.prototype.onError=function(){this.segmentTracker.reset()},t.prototype.trackLoadstartWithAutoplay=function(){this.getAutoPlay()&&this.eventCallback(f.Event.LOADSTART_AUTOPLAY,{currentTime:this.currentTime})},t.prototype.registerPlayerEventListeners=function(){var e=this;this.player.on(N.BITMOVIN8_PLAYER_EVENT.SourceUnloaded,(function(t){e.segmentTracker.reset(),e.eventCallback(f.Event.SOURCE_UNLOADED,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.SourceLoaded,(function(t){var i;e._videoCompletionTracker.reset(),e.videoDuration=e.player.getDuration(),e._videoCompletionTracker.setVideoDuration(null!==(i=e.player.getDuration())&&void 0!==i?i:0),e.sourceInfoFallbackService.setStreamFormat(e.player.getStreamType()),e.eventCallback(f.Event.SOURCE_LOADED,{})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.CastStarted,(function(t){e.eventCallback(f.Event.START_CAST,t)})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.CastStopped,(function(){e.eventCallback(f.Event.END_CAST,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Play,(function(t){"ui-seek"!==t.issuer&&e.eventCallback(f.Event.PLAY,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Playing,(function(t){"advertising-api"!==t.issuer&&e.eventCallback(f.Event.PLAYING,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Paused,(function(t){"ui-seek"!==t.issuer&&e.eventCallback(f.Event.PAUSE,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.TimeChanged,(function(t){e.isAdPlaying||(e.lastTrackedCurrentTime=e.player.getCurrentTime()),e.eventCallback(f.Event.TIMECHANGED,{currentTime:e.lastTrackedCurrentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Seek,(function(t){e.allowSeeking(t)&&e.eventCallback(f.Event.SEEK,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Seeked,(function(){e.eventCallback(f.Event.SEEKED,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.StallStarted,(function(){e.eventCallback(f.Event.START_BUFFERING,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.StallEnded,(function(){e.eventCallback(f.Event.END_BUFFERING,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AudioPlaybackQualityChanged,(function(t){var i=t,n=i.sourceQuality,a=i.targetQuality;if(!(0,D.isNullish)(a)){var r={type:"audio",bitrate:a.bitrate,currentTime:e.currentTime,codec:a.codec};(0,D.isNotNullish)(n)&&e.qualityChangeService.shouldAllowAudioQualityChange(a.bitrate)&&e.eventCallback(f.Event.AUDIO_CHANGE,r),e.qualityChangeService.setAudioBitrate(a.bitrate),e.stateMachineCallbacks.updateSampleQualityInfo(r)}})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.VideoPlaybackQualityChanged,(function(t){var i=t,n=i.sourceQuality,a=i.targetQuality;if(!(0,D.isNullish)(a)){var r={type:"video",width:a.width,height:a.height,bitrate:a.bitrate,currentTime:e.currentTime,codec:a.codec};(0,D.isNotNullish)(n)&&e.qualityChangeService.shouldAllowVideoQualityChange(a.bitrate)&&e.eventCallback(f.Event.VIDEO_CHANGE,r),e.qualityChangeService.setVideoBitrate(a.bitrate),e.stateMachineCallbacks.updateSampleQualityInfo(r)}})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.ViewModeChanged,(function(t){"fullscreen"===t.to?e.eventCallback(f.Event.START_FULLSCREEN,{currentTime:e.currentTime}):"fullscreen"===t.from&&e.eventCallback(f.Event.END_FULLSCREEN,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AdStarted,(function(t){e.eventCallback(f.Event.START_AD,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AdFinished,(function(t){e.eventCallback(f.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AdSkipped,(function(t){e.eventCallback(f.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AdError,(function(t){e.eventCallback(f.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Muted,(function(){e.eventCallback(f.Event.MUTE,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Unmuted,(function(){e.eventCallback(f.Event.UN_MUTE,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Error,(function(t){e.eventCallback(f.Event.ERROR,{code:t.code,message:t.name,legacyData:t.data,currentTime:e.currentTime,originalError:t,data:{additionalData:(0,D.tryJSONStringify)(t.data)}}),t.code!==m.ErrorCode.BITMOVIN_PLAYER_LICENSING_ERROR.code&&t.code!==m.ErrorCode.SETUP_MISSING_LICENSE_WHITELIST.code||e.onLicenseCallFailed.dispatch({}),e.ssaiService.sendAdEngagementErrorSample({code:t.code,message:t.name,severity:"CRITICAL"},t)})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.PlaybackFinished,(function(){e.eventCallback(f.Event.END,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.DownloadFinished,(function(t){0===t.downloadType.indexOf("drm/license/")&&(e.drmPerformanceInfo={drmType:t.downloadType.replace("drm/license/",""),drmLoadTime:1e3*t.downloadTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AudioChanged,(function(t){e.eventCallback(f.Event.AUDIOTRACK_CHANGED,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.SubtitleEnabled,(function(t){e.eventCallback(f.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.SubtitleDisabled,(function(t){e.eventCallback(f.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.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(f.Event.UNLOAD,{currentTime:t})}e.release()};this.player.on(N.BITMOVIN8_PLAYER_EVENT.Destroy,t),this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},t.prototype.applySourceProperties=function(e){var t=this.player.getSource();if(!(0,D.isNullish)(t)){e.videoTitle=t.title,e.mpdUrl=t.dash,e.m3u8Url=t.hls;var i=(0,T.getSourceInfoFromBitmovinSourceConfig)(t.progressive,this.player);e.progUrl=i.progUrl,"progressive"===this.player.getStreamType()&&(e.videoBitrate=i.progBitrate)}},t.prototype.applySubtitleProperties=function(e){var t,i=null===(t=this.player.getSubtitleList())||void 0===t?void 0:t.find((function(e){return!0===e.enabled}));e.subtitleEnabled=(0,D.isNotNullish)(i),e.subtitleLanguage=(0,D.isNotNullish)(i)?i.lang:void 0},t.prototype.applyPlaybackQualityProperties=function(e){var t=this.player.getPlaybackVideoData();(0,D.isNotNullish)(t)&&(e.videoBitrate=t.bitrate,e.videoPlaybackHeight=t.height,e.videoPlaybackWidth=t.width,e.videoCodec=t.codec);var i=this.player.getPlaybackAudioData();(0,D.isNotNullish)(i)&&(e.audioBitrate=i.bitrate,e.audioCodec=i.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=h.CastTech.AirPlay;else{var i=this.player.remoteControlConfig;if(!(0,D.isNullish)(i))switch(i.type){case"googlecast":e.castTech=h.CastTech.GoogleCast;break;case"websocket":e.castTech=h.CastTech.WebSocket}}},t.prototype.allowSeeking=function(e){var t=e;return Math.abs(t.position-t.seekTarget)>I.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD},t.create=function(e,i){var n=new R.SpeedMeterAdapter(e,new u.DownloadSpeedMeter).getDownloadSpeedMeter(),a=new P.SegmentTrackerAdapter(e,new c.SegmentTracker).getSegmentTracker(),r=new C.HttpRequestTrackingAdapter(e);return new t(e,n,a,new p.default,r,new d.SourceInfoFallbackService,i)},t}(b.InternalAdapter);t.Bitmovin8InternalAdapter=M},6923:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8PlayerProxy=void 0;var n=i(2974),a=function(){function e(e){var t=this;this.rawPlayer=e,this.on=function(e,i){(0,n.safeAccess)((function(){return t.rawPlayer.on(e,i)}))},this.getCurrentTime=function(e){return(0,n.safeAccess)((function(){return t.rawPlayer.getCurrentTime(e)}))},this.getDuration=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getDuration()}))},this.getPlayerType=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getPlayerType()}))},this.getViewMode=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getViewMode()}))},this.getContainer=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getContainer()}))},this.isLive=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.isLive()}))},this.getStreamType=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getStreamType()}))},this.isMuted=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.isMuted()}))},this.isCasting=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.isCasting()}))},this.isAirplayActive=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.isAirplayActive()}))},this.getAudio=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getAudio()}))},this.getSource=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getSource()}))},this.getDroppedVideoFrames=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getDroppedVideoFrames()}))},this.getPlaybackVideoData=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getPlaybackVideoData()}))},this.getPlaybackAudioData=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getPlaybackAudioData()}))},this.getConfig=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getConfig()}))},this.getSubtitleList=function(){return(0,n.safeAccess)((function(){var e;return null===(e=t.rawPlayer.subtitles)||void 0===e?void 0:e.list()}))},this.isLinearAdActive=function(){return(0,n.safeAccess)((function(){var e;return null===(e=t.rawPlayer.ads)||void 0===e?void 0:e.isLinearAdActive()}))},this.getActiveAd=function(){return(0,n.safeAccess)((function(){var e;return null===(e=t.rawPlayer.ads)||void 0===e?void 0:e.getActiveAd()}))},this.getAdModuleInfo=function(){return(0,n.safeAccess)((function(){var e;return null===(e=t.rawPlayer.ads)||void 0===e?void 0:e.getModuleInfo()}))}}return Object.defineProperty(e.prototype,"version",{get:function(){var e=this;return(0,n.safeAccess)((function(){return e.rawPlayer.version}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"remoteControlConfig",{get:function(){var e;return null===(e=this.getConfig())||void 0===e?void 0:e.remotecontrol},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoplay",{get:function(){var e,t;return null===(t=null===(e=this.getConfig())||void 0===e?void 0:e.playback)||void 0===t?void 0:t.autoplay},enumerable:!1,configurable:!0}),e}();t.Bitmovin8PlayerProxy=a},2953:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapBitmovinAdError=function(e,t){var i,r={activeAdId:t},o=e,s=o.data;if((0,n.isNotNullish)(s)&&(r.code=s.code||o.code,r.message=s.message||o.name,"adBreak"in s||"adConfig"in s)){var u=null!==(i=s.adBreak)&&void 0!==i?i:s.adConfig;r.adBreakInfo=a(u)}return r},t.mapBitmovinAd=function(e){var t,i,a,r,o,s,u,l,c,d,p,h={id:e.id,isLinear:e.isLinear,clickThroughUrl:e.clickThroughUrl,width:e.width,height:e.height},m=e.isLinear?e:void 0;(0,n.isNotNullish)(m)&&(h.duration=m.duration,h.skippable=(0,n.isNotNullish)(m.skippableAfter),h.skippableAfter=m.skippableAfter,h.mediaUrl=m.mediaFileUrl);var f=e.data;(0,n.isNotNullish)(f)&&(h.bitrate=f.bitrate,h.mimeType=f.mimeType,h.vastData={adSystem:null===(t=f.adSystem)||void 0===t?void 0:t.name,advertiserName:null===(i=f.advertiser)||void 0===i?void 0:i.name,apiFramework:f.apiFramework,creativeAdId:null===(a=f.creative)||void 0===a?void 0:a.adId,creativeId:null===(r=f.creative)||void 0===r?void 0:r.id,universalAdIdRegistry:null===(s=null===(o=f.creative)||void 0===o?void 0:o.universalAdId)||void 0===s?void 0:s.idRegistry,universalAdIdValue:null===(l=null===(u=f.creative)||void 0===u?void 0:u.universalAdId)||void 0===l?void 0:l.value,adDescription:f.adDescription,adTitle:f.adTitle,wrapperAdsCount:null!==(d=null===(c=f.wrapperAdIds)||void 0===c?void 0:c.length)&&void 0!==d?d:0,surveyUrl:null===(p=f.survey)||void 0===p?void 0:p.uri,minSuggestedDuration:f.minSuggestedDuration});return h},t.mapBitmovinAdBreak=a,t.resolveEffectiveAdTag=r,t.getFallbackIndex=o;var n=i(5063);function a(e){var t={replaceContentDuration:e.replaceContentDuration,fallbackIndex:o(e)};t.id="id"in e?e.id:void 0,t.scheduleTime="scheduleTime"in e?e.scheduleTime:void 0;var i=e,n=r(i),a=n.tagUrl,s=n.tagType;return t.tagUrl=a,t.tagType=s,t.persistent="persistent"in e?i.persistent:void 0,t.position="position"in e?e.position:void 0,t.preloadOffset="preloadOffset"in e?e.preloadOffset:void 0,t}function r(e){if((0,n.isNullish)(e.tag))return{};var t=o(e),i={tagType:e.tag.type,tagUrl:e.tag.url};if((0,n.isNullish)(e.fallbackTags)||t<=0||e.fallbackTags.length<t)return i;var a=e.fallbackTags[t-1];return{tagType:a.type,tagUrl:a.url}}function o(e){var t=e.currentFallbackIndex;return(0,n.isNullish)(t)?0:t}},4067:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeBitmovin8AdapterSsaiAdBreakMetadataAdPosition=void 0;var n=i(5063);t.sanitizeBitmovin8AdapterSsaiAdBreakMetadataAdPosition=function(e){var t=e;return(0,n.isNotNullish)(null==t?void 0:t.adPosition)&&("pre-roll"===t.adPosition?t.adPosition="preroll":"mid-roll"===t.adPosition?t.adPosition="midroll":"post-roll"===(null==t?void 0:t.adPosition)&&(t.adPosition="postroll")),t}},3182:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BITMOVIN8_PLAYER_EVENT=void 0,t.BITMOVIN8_PLAYER_EVENT={AdBreakFinished:"adbreakfinished",AdBreakStarted:"adbreakstarted",AdClicked:"adclicked",AdError:"aderror",AdFinished:"adfinished",AdManifestLoaded:"admanifestloaded",AdQuartile:"adquartile",AdSkipped:"adskipped",AdStarted:"adstarted",AudioChanged:"audiochanged",AudioPlaybackQualityChanged:"audioplaybackqualitychanged",CastStarted:"caststarted",CastStopped:"caststopped",Destroy:"destroy",DownloadFinished:"downloadfinished",Error:"error",LicenseValidated:"licensevalidated",Muted:"muted",Paused:"paused",Play:"play",PlaybackFinished:"playbackfinished",Playing:"playing",Seek:"seek",Seeked:"seeked",SegmentPlayback:"segmentplayback",SourceLoaded:"sourceloaded",SourceUnloaded:"sourceunloaded",StallEnded:"stallended",StallStarted:"stallstarted",TimeChanged:"timechanged",SubtitleDisabled:"subtitledisabled",SubtitleEnabled:"subtitleenabled",Unmuted:"unmuted",VideoPlaybackQualityChanged:"videoplaybackqualitychanged",ViewModeChanged:"viewmodechanged"}},7543:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestTrackingAdapter=void 0,t.mapHttpRequestType=l;var n=i(675),a=i(7912),r=i(2974),o=i(5063),s=i(3182),u=function(){function e(e){var t=this;this.eventDispatcher=new n.EventDispatcher,e.on(s.BITMOVIN8_PLAYER_EVENT.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,i,n;this.eventDispatcher.dispatch({httpRequest:{downloadTime:null!==(t=(0,o.calculateTimeWithUndefined)(null==e?void 0:e.downloadTime))&&void 0!==t?t:0,httpStatus:null!==(i=null==e?void 0:e.httpStatus)&&void 0!==i?i:0,success:null!==(n=null==e?void 0:e.success)&&void 0!==n&&n,timestamp:(0,o.getCurrentTimestamp)(),url:null==e?void 0:e.url,size:null==e?void 0:e.size,timeToFirstByte:(0,o.calculateTimeWithUndefined)(null==e?void 0:e.timeToFirstByte),type:l(null==e?void 0:e.downloadType)}})},e}();function l(e){return(0,r.objectValues)(a.HttpRequestType).includes(e)?e:a.HttpRequestType.UNKNOWN}t.HttpRequestTrackingAdapter=u},8676:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTrackerAdapter=void 0;var n=i(5063),a=i(3182),r=function(){function e(e,t){var i=this;this.handleSegmentPlaybackEvent=function(e){i.segmentTracker.removeSegment(e.url)},this.segmentTracker=t,e.on(a.BITMOVIN8_PLAYER_EVENT.DownloadFinished,(function(e){return i.handleOnDownloadFinishEvent(e)})),e.on(a.BITMOVIN8_PLAYER_EVENT.SegmentPlayback,(function(e){return i.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,i={name:n.getURLResourceName(t),url:t,timestamp:e.timestamp};this.segmentTracker.addSegment(i)}},e}();t.SegmentTrackerAdapter=r},665:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpeedMeterAdapter=void 0;var n=i(3182),a=function(){function e(e,t){var i=this;this.meter=t,e.on(n.BITMOVIN8_PLAYER_EVENT.DownloadFinished,(function(e){return i.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=a},681:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModule=void 0;var n=i(4679);t.PlayerModule={name:"analytics",module:{Analytics:n.Bitmovin8Adapter},hooks:{setup:function(e,t){var i=t.getConfig(),n=!i,a=!1===(null==i?void 0:i.analytics);if(n||a)return Promise.resolve();var r=new(0,e.Analytics)(t);return Promise.resolve(r)}}}},2647:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.InternalAdapter=void 0;var a=i(675),r=i(9796),o=i(4916),s=i(4300),u=i(2361),l=i(4820),c=i(9422),d=i(1916),p=i(5063),h=i(2376),m=function(){function e(e){this.onLicenseKeyReceived=new a.EventDispatcher,this.onLicenseCallFailed=new a.EventDispatcher,this.qualityChangeService=new r.default,this.ssaiService=new s.SsaiService,this.stateMachineCallbacks=n({},l.defaultStateMachineCallbacks),this.sourceInfoFallbackService=new o.SourceInfoFallbackService,this.drmPerformanceInfo=void 0,this.windowEventTracker=new h.WindowEventTracker,e||(e={starttime:void 0}),e.starttime||(e.starttime=(0,p.getCurrentTimestamp)()),this.opts=e}return e.prototype.release=function(){this.stateMachine.resetIntervals(),this.stateMachineCallbacks.release(),this.resetSourceRelatedState(),this.windowEventTracker.release()},e.prototype.eventCallback=function(e,t,i){void 0===i&&(i=Date.now()),t=t||{},this.stateMachine?this.stateMachine.callEvent(e,t,i):d.logger.log("Bitmovin Analytics: StateMachine isn't ready yet")},e.prototype.getCommonPlaybackInfo=function(){var e=(0,c.getGlobalScreenDimensions)();return{screenHeight:null==e?void 0:e.height,screenWidth:null==e?void 0:e.width}},e.prototype.getDrmPerformanceInfo=function(){},e.prototype.getSegmentInfo=function(){return[]},e.prototype.getDownloadSpeedInfo=function(){return{segmentsDownloadCount:0,segmentsDownloadSize:0,segmentsDownloadTime:0,avgDownloadSpeed:0,minDownloadSpeed:0,maxDownloadSpeed:0,avgTimeToFirstByte:0}},e.prototype.resetDownloadSpeedInfoMeasures=function(){},e.prototype.setCustomData=function(e){var t=this.stateMachine.currentState,i={customDataValues:e,currentTime:this.currentTime};!this.stateMachine.currentState||"PAUSE"!==this.stateMachine.currentState&&"PLAYING"!==this.stateMachine.currentState?this.stateMachineCallbacks.customdatachange(void 0,void 0,i):(this.eventCallback(u.Event.CUSTOM_DATA_CHANGE,{currentTime:this.currentTime}),this.eventCallback(u.Event[t],i))},e.prototype.sourceChange=function(e){this.eventCallback(u.Event.MANUAL_SOURCE_CHANGE,{currentTime:this.currentTime,config:e})},e.prototype.resetSourceRelatedState=function(){this.sourceInfoFallbackService.reset(),this.drmPerformanceInfo=void 0},e.prototype.programChange=function(e){var t=this.ssaiService.isInActiveState();this.stateMachine.programChange(this.currentTime,t,e)},e}();t.InternalAdapter=m},5517:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdQuartile=t.AdCallbacks=void 0;var i,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(){},this.onPause=function(){},this.onBeforeUnload=function(){}};t.AdCallbacks=n,function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(i||(t.AdQuartile=i={}))},7596:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsStateMachine=void 0;var a=i(7906),r=i(3458),o=i(2361),s=i(1916),u=i(4649),l=i(5063),c=i(5063),d=[3e3,5e3,1e4,3e4,59700],p=function(){function e(e,t,i){this.stateMachineCallbacks=e,this.onEnterStateTimestamp=0,this.videoStartupTimeoutMs=u.ANALYTICS_VIDEOSTART_TIMEOUT,this.rebufferTimeoutMs=u.ANALYTICS_REBUFFER_TIMEOUT,this.currentRebufferingIntervalIndex=0,this.stateMachine=this.createStateMachine(i),this.playingHeartbeatService=t}return e.prototype.callEvent=function(e,t,i){var n=this.stateMachine[e];if(null!=n)try{n.call(this.stateMachine,i,t)}catch(n){s.logger.error('StateMachine ignored event "'.concat(e,'" call, because it has thrown exception in the current state "').concat(this.currentState,'"'),t,i,n)}else s.logger.warn('StateMachine ignored event "'.concat(e,'" call, because it was not defined'),t,i)},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=setInterval((function(){var e=t.stateMachine.current.toLowerCase();if("rebuffering"===e){var i=(new Date).getTime(),n=i-t.onEnterStateTimestamp;t.stateMachineCallbacks.heartbeat(n,e,{buffered:n}),t.onEnterStateTimestamp=i,t.currentRebufferingIntervalIndex=Math.min(t.currentRebufferingIntervalIndex+1,d.length-1),t.startRebufferingHeartbeatInterval(!1)}else t.resetRebufferingHelpers()}),d[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(){(0,c.isNotNullish)(this.rebufferingHeartbeatIntervalHandle)&&(clearInterval(this.rebufferingHeartbeatIntervalHandle),this.rebufferingHeartbeatIntervalHandle=void 0)},e.prototype.startRebufferingTimeoutHandle=function(){var e=this;this.currentRebufferingIntervalIndex>0||(this.rebufferingTimeoutHandle=setTimeout((function(){e.callEvent(o.Event.ERROR,n(n({},r.ErrorCode.BUFFERING_TIMEOUT_REACHED),{data:{additionalData:"StateMachine timed out after ".concat(e.rebufferTimeoutMs," ms of consecutive buffering.")}}),l.getCurrentTimestamp()),e.stateMachineCallbacks.release()}),this.rebufferTimeoutMs))},e.prototype.clearRebufferingTimeoutHandle=function(e){e&&(0,c.isNotNullish)(this.rebufferingTimeoutHandle)&&(clearTimeout(this.rebufferingTimeoutHandle),this.rebufferingTimeoutHandle=void 0)},e.prototype.setVideoStartTimeout=function(){var e=this;(0,c.isNotNullish)(this.videoStartTimeout)&&this.clearVideoStartTimeout(),this.videoStartTimeout=setTimeout((function(){e.callEvent(o.Event.VIDEOSTART_TIMEOUT,{},Date.now()),e.stateMachineCallbacks.release()}),this.videoStartupTimeoutMs)},e.prototype.clearVideoStartTimeout=function(){clearTimeout(this.videoStartTimeout),this.videoStartTimeout=void 0},e.prototype.onHeartbeat=function(e){this.sendPlayingSample(Date.now(),e)},e.prototype.sendPlayingSample=function(e,t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1);var r=this.stateMachine.current.toLowerCase();if("playing"===r){this.stateMachineCallbacks.setVideoTimeEndFromEvent({currentTime:t});var o=e-this.onEnterStateTimestamp,u={played:o,isProgramChange:!!n||void 0};i&&(u[a.SSAI_RELATED_SAMPLE_MARKER]=!0),this.stateMachineCallbacks.heartbeat(o,r,u),this.resetCurrentStateStart(e,t)}else s.logger.warn('Unexpected call of "sendPlayingSample" in AnalyticsStateMachine from "'.concat(r,'" state'))},e.prototype.resetCurrentStateStart=function(e,t){this.onEnterStateTimestamp=e,this.stateMachineCallbacks.setVideoTimeStartFromEvent({currentTime:t})},e.prototype.programChange=function(e,t,i){if("SETUP"!==this.stateMachine.current&&"READY"!==this.stateMachine.current&&"STARTUP"!==this.stateMachine.current&&"STARTUP_AUTOPLAY"!==this.stateMachine.current){var n=Date.now();"PLAYING"===this.stateMachine.current?this.sendPlayingSample(n,e,t,!0):this.resetCurrentStateStart(n,e),this.stateMachineCallbacks.programChange(i)}else this.stateMachineCallbacks.updateSourceMetadata(i)},e}();t.AnalyticsStateMachine=p},2403:function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(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 i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,a=0,r=t.length;a<r;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AnalyticsStateMachine=void 0;var o,s,u=i(2595),l=i(2361),c=i(3565),d=i(1652),p=i(1916),h=i(1460),m=i(5063),f=i(7596),v=i(8253);!function(e){e.AD_PAUSE="AD_PAUSE",e.AD_PLAYING="AD_PLAYING",e.AD_READY="AD_READY",e.AD_STARTUP="AD_STARTUP",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.CASTING="CASTING",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE",e.END="END",e.END_PLAY_SEEKING="END_PLAY_SEEKING",e.ERROR="ERROR",e.INITIAL_SOURCE_CHANGE="INITIAL_SOURCE_CHANGE",e.MUTING_PAUSE="MUTING_PAUSE",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_READY="MUTING_READY",e.PAUSE="PAUSE",e.PLAY_SEEKING="PLAY_SEEKING",e.PLAYING="PLAYING",e.QUALITY_CHANGE="QUALITY_CHANGE",e.READY="READY",e.REBUFFERING="REBUFFERING",e.SETUP="SETUP",e.SOURCE_CHANGING="SOURCE_CHANGING",e.STARTUP="STARTUP",e.STARTUP_AUTOPLAY="STARTUP_AUTOPLAY",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.VIDEOSTART_FAILED="VIDEOSTART_FAILED"}(o||(o={})),function(e){e.PAUSE_AFTER_SOURCE_LOADED="PAUSE_AFTER_SOURCE_LOADED",e.PAUSE_BEFORE_SOURCE_LOADED="PAUSE_BEFORE_SOURCE_LOADED"}(s||(s={}));var A=function(e){function t(t,i,n){var a=e.call(this,t,i,n)||this;return a.debuggingStates=[],a.enabledDebugging=!1,a.sourceLoadedDuringAutoplayStartup=!1,a}return a(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(o).map((function(e){return o[e]}))},t.prototype.createStateMachine=function(e){var t,i=this;return u.create({initial:{state:o.SETUP,event:l.JSM_INITIAL_EVENT},error:v.customStateMachineErrorCallback,events:r(r([{name:l.Event.SOURCE_LOADED,from:[o.SETUP,o.ERROR,o.SOURCE_CHANGING,o.INITIAL_SOURCE_CHANGE],to:o.READY},{name:l.Event.PLAY,from:o.READY,to:o.STARTUP},{name:l.Event.PLAYING,from:o.READY,to:o.PLAYING},(0,v.on)(l.Event.READY).stayIn(o.READY),{name:l.Event.ERROR,from:[o.STARTUP,o.AD_STARTUP,o.STARTUP_AUTOPLAY],to:o.VIDEOSTART_FAILED},{name:l.Event.UNLOAD,from:[o.STARTUP,o.AD_STARTUP,o.STARTUP_AUTOPLAY],to:o.VIDEOSTART_FAILED},{name:l.Event.VIDEOSTART_TIMEOUT,from:[o.STARTUP,o.STARTUP_AUTOPLAY],to:o.VIDEOSTART_FAILED},{name:l.Event.SOURCE_UNLOADED,from:[o.STARTUP,o.STARTUP_AUTOPLAY],to:o.VIDEOSTART_FAILED},{name:l.Event.MANUAL_SOURCE_CHANGE,from:[o.STARTUP,o.STARTUP_AUTOPLAY],to:o.VIDEOSTART_FAILED},{name:l.Event.TIMECHANGED,from:[o.STARTUP,o.STARTUP_AUTOPLAY],to:o.PLAYING},(0,v.on)(l.Event.PLAY).stayIn(o.STARTUP),(0,v.on)(l.Event.PLAYING).stayIn(o.STARTUP),(0,v.on)(l.Event.START_BUFFERING).stayIn(o.STARTUP),(0,v.on)(l.Event.END_BUFFERING).stayIn(o.STARTUP),(0,v.on)(l.Event.VIDEO_CHANGE).stayIn(o.STARTUP),(0,v.on)(l.Event.AUDIO_CHANGE).stayIn(o.STARTUP),(0,v.on)(l.Event.READY).stayIn(o.STARTUP),{name:l.Event.PAUSE,from:o.STARTUP,to:o.READY},{name:l.Event.LOADSTART_AUTOPLAY,from:[o.SETUP,o.SOURCE_CHANGING,o.INITIAL_SOURCE_CHANGE],to:o.STARTUP_AUTOPLAY},{name:s.PAUSE_BEFORE_SOURCE_LOADED,from:o.STARTUP_AUTOPLAY,to:o.INITIAL_SOURCE_CHANGE},{name:s.PAUSE_AFTER_SOURCE_LOADED,from:o.STARTUP_AUTOPLAY,to:o.READY}],(0,v.whileIn)(o.STARTUP_AUTOPLAY).passOver(l.Event.PAUSE,l.Event.SOURCE_LOADED),!0),[(0,v.on)(l.Event.PLAYING).stayIn(o.PLAYING),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.PLAYING),(0,v.on)(l.Event.END_BUFFERING).stayIn(o.PLAYING),{name:l.Event.START_BUFFERING,from:o.PLAYING,to:o.REBUFFERING},{name:l.Event.END_BUFFERING,from:o.REBUFFERING,to:o.PLAYING},(0,v.on)(l.Event.TIMECHANGED).stayIn(o.REBUFFERING),{name:l.Event.PAUSE,from:o.PLAYING,to:o.PAUSE},{name:l.Event.PAUSE,from:o.REBUFFERING,to:o.PAUSE},{name:l.Event.PLAY,from:o.PAUSE,to:o.PLAYING},{name:l.Event.VIDEO_CHANGE,from:o.PLAYING,to:o.QUALITY_CHANGE},{name:l.Event.AUDIO_CHANGE,from:o.PLAYING,to:o.QUALITY_CHANGE},{name:l.Event.FINISH_QUALITY_CHANGE,from:o.QUALITY_CHANGE,to:o.PLAYING},{name:l.Event.SEEK,from:o.PLAYING,to:o.PLAY_SEEKING},{name:l.Event.PLAY,from:o.PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.PLAYING,from:o.PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.SEEKED,from:o.PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.SEEK,from:o.END_PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.PLAYING,from:o.END_PLAY_SEEKING,to:o.PLAYING},{name:l.Event.TIMECHANGED,from:o.END_PLAY_SEEKING,to:o.PLAYING},{name:l.Event.PAUSE,from:[o.PLAY_SEEKING,o.END_PLAY_SEEKING],to:o.PAUSE},(0,v.on)(l.Event.SEEK).stayIn(o.PLAY_SEEKING),(0,v.on)(l.Event.START_BUFFERING).stayIn(o.PLAY_SEEKING),(0,v.on)(l.Event.END_BUFFERING).stayIn(o.PLAY_SEEKING),(0,v.on)(l.Event.START_BUFFERING).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.END_BUFFERING).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.SEEKED).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.PLAY).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.SEEK).stayIn(o.PAUSE),(0,v.on)(l.Event.SEEKED).stayIn(o.PAUSE),(0,v.on)(l.Event.SEEKED).stayIn(o.PLAYING),{name:l.Event.END,from:o.PLAY_SEEKING,to:o.END},{name:l.Event.END,from:o.PLAYING,to:o.END},{name:l.Event.END,from:o.PAUSE,to:o.END},(0,v.on)(l.Event.SEEK).stayIn(o.END),(0,v.on)(l.Event.SEEKED).stayIn(o.END),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.END),(0,v.on)(l.Event.END_BUFFERING).stayIn(o.END),(0,v.on)(l.Event.START_BUFFERING).stayIn(o.END),(0,v.on)(l.Event.END).stayIn(o.END),{name:l.Event.PLAY,from:o.END,to:o.STARTUP},{name:l.Event.ERROR,from:this.getAllStatesBut([o.STARTUP,o.STARTUP_AUTOPLAY]),to:o.ERROR},{name:l.Event.UNLOAD,from:this.getAllStatesBut([o.STARTUP,o.STARTUP_AUTOPLAY,o.AD_STARTUP]),to:o.END},{name:l.Event.SUBTITLE_CHANGE,from:o.PLAYING,to:o.SUBTITLE_CHANGING},(0,v.on)(l.Event.SUBTITLE_CHANGE).stayIn(o.PAUSE),(0,v.on)(l.Event.SUBTITLE_CHANGE).stayIn(o.REBUFFERING),(0,v.on)(l.Event.SUBTITLE_CHANGE).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.SUBTITLE_CHANGE).stayIn(o.SUBTITLE_CHANGING),{name:l.Event.TIMECHANGED,from:o.SUBTITLE_CHANGING,to:o.PLAYING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.PLAYING,to:o.AUDIOTRACK_CHANGING},(0,v.on)(l.Event.AUDIOTRACK_CHANGED).stayIn(o.PAUSE),(0,v.on)(l.Event.AUDIOTRACK_CHANGED).stayIn(o.REBUFFERING),(0,v.on)(l.Event.AUDIOTRACK_CHANGED).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.AUDIOTRACK_CHANGED).stayIn(o.AUDIOTRACK_CHANGING),{name:l.Event.TIMECHANGED,from:o.AUDIOTRACK_CHANGING,to:o.PLAYING},{name:l.Event.START_AD,from:o.STARTUP,to:o.AD_STARTUP},{name:l.Event.END_AD,from:o.AD_STARTUP,to:o.STARTUP},(0,v.on)(l.Event.PLAY).stayIn(o.AD_STARTUP),(0,v.on)(l.Event.PAUSE).stayIn(o.AD_STARTUP),{name:l.Event.START_AD,from:o.READY,to:o.AD_READY},{name:l.Event.END_AD,from:o.AD_READY,to:o.STARTUP},(0,v.on)(l.Event.PLAY).stayIn(o.AD_READY),(0,v.on)(l.Event.PAUSE).stayIn(o.AD_READY),{name:l.Event.START_AD,from:o.PAUSE,to:o.AD_PAUSE},{name:l.Event.END_AD,from:o.AD_PAUSE,to:o.PAUSE},(0,v.on)(l.Event.PLAY).stayIn(o.AD_PAUSE),(0,v.on)(l.Event.PAUSE).stayIn(o.AD_PAUSE),{name:l.Event.START_AD,from:o.PLAYING,to:o.AD_PLAYING},{name:l.Event.END_AD,from:o.AD_PLAYING,to:o.PLAYING},(0,v.on)(l.Event.PLAY).stayIn(o.AD_PLAYING),(0,v.on)(l.Event.PAUSE).stayIn(o.AD_PLAYING),{name:l.Event.END,from:o.AD_PLAYING,to:o.END},(0,v.on)(l.Event.TIMECHANGED).stayIn(o.AD_STARTUP),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.AD_READY),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.AD_PAUSE),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.AD_PLAYING),(0,v.on)(l.Event.END_AD).stayIn(o.PLAYING),(0,v.on)(l.Event.END_AD).stayIn(o.PAUSE),(0,v.on)(l.Event.END_AD).stayIn(o.READY),(0,v.on)(l.Event.END_AD).stayIn(o.STARTUP),{name:l.Event.MUTE,from:o.READY,to:o.MUTING_READY},{name:l.Event.UN_MUTE,from:o.READY,to:o.MUTING_READY},{name:"FINISH_MUTING",from:o.MUTING_READY,to:o.READY},{name:l.Event.MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:l.Event.UN_MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:"FINISH_MUTING",from:o.MUTING_PLAY,to:o.PLAYING},{name:l.Event.MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:l.Event.UN_MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:"FINISH_MUTING",from:o.MUTING_PAUSE,to:o.PAUSE},{name:l.Event.START_CAST,from:[o.READY,o.PAUSE,o.PLAYING],to:o.CASTING},(0,v.on)(l.Event.PAUSE).stayIn(o.CASTING),(0,v.on)(l.Event.PLAY).stayIn(o.CASTING),(0,v.on)(l.Event.PLAYING).stayIn(o.CASTING),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.CASTING),(0,v.on)(l.Event.MUTE).stayIn(o.CASTING),(0,v.on)(l.Event.UN_MUTE).stayIn(o.CASTING),(0,v.on)(l.Event.SEEK).stayIn(o.CASTING),(0,v.on)(l.Event.SEEKED).stayIn(o.CASTING),{name:l.Event.END_CAST,from:o.CASTING,to:o.READY},(0,v.on)(l.Event.SEEK).stayIn(o.READY),(0,v.on)(l.Event.SEEKED).stayIn(o.READY),(0,v.on)(l.Event.SEEKED).stayIn(o.STARTUP),{name:l.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStatesBut([o.SETUP,o.STARTUP,o.STARTUP_AUTOPLAY]),to:o.SOURCE_CHANGING},{name:l.Event.MANUAL_SOURCE_CHANGE,from:o.SETUP,to:o.INITIAL_SOURCE_CHANGE},{name:l.Event.SOURCE_UNLOADED,from:this.getAllStatesBut([o.STARTUP,o.STARTUP_AUTOPLAY]),to:o.SOURCE_CHANGING},{name:l.Event.CUSTOM_DATA_CHANGE,from:[o.PLAYING,o.PAUSE],to:o.CUSTOMDATACHANGE},{name:l.Event.PLAYING,from:o.CUSTOMDATACHANGE,to:o.PLAYING},{name:l.Event.PAUSE,from:o.CUSTOMDATACHANGE,to:o.PAUSE}],!1),callbacks:(t={},t["onbefore".concat(l.Event.SOURCE_LOADED)]=function(e,t,n,a,r){t===o.STARTUP_AUTOPLAY&&(i.sourceLoadedDuringAutoplayStartup=!0)},t["onbefore".concat(l.Event.SOURCE_UNLOADED)]=function(e,t,n,a,r){return!(t===o.STARTUP_AUTOPLAY&&!i.sourceLoadedDuringAutoplayStartup)},t["onbefore".concat(l.Event.PAUSE)]=function(e,t,n,a,r){return t!==o.STARTUP_AUTOPLAY||(i.sourceLoadedDuringAutoplayStartup?i.stateMachine[s.PAUSE_AFTER_SOURCE_LOADED](a,r):i.stateMachine[s.PAUSE_BEFORE_SOURCE_LOADED](a,r),!1)},t["onleave".concat(o.END_PLAY_SEEKING)]=function(e,t,n,a,r){var s;if(n!==o.PLAY_SEEKING){var u=a-(null!==(s=i.seekStartTimestamp)&&void 0!==s?s:a);i.seekStartTimestamp=void 0,i.stateMachineCallbacks.setVideoTimeEndFromEvent(r),i.stateMachineCallbacks.seeking(u)}},t["onleave".concat(o.PLAYING)]=function(){i.playingHeartbeatService.stopHeartbeat()},t["onleave".concat(o.STARTUP_AUTOPLAY)]=function(){i.sourceLoadedDuringAutoplayStartup=!1,i.clearVideoStartTimeout()},t["onleave".concat(o.PLAY_SEEKING)]=function(e,t,n,a,r){var s;if(n!==o.END_PLAY_SEEKING){var u=a-(null!==(s=i.seekStartTimestamp)&&void 0!==s?s:a);i.seekStartTimestamp=void 0,i.stateMachineCallbacks.seeking(u)}},t.onleavestate=function(e,t,n,a,r){if((0,v.logStateMachineTransition)("LEAVE",e,t,n),e!==l.JSM_INITIAL_EVENT&&(t===o.REBUFFERING&&i.resetRebufferingHelpers(),a)){i.addStatesToLog(e,t,n,a,r);var u=a-i.onEnterStateTimestamp;r&&n!==o.END_PLAY_SEEKING&&i.stateMachineCallbacks.setVideoTimeEndFromEvent(r),r&&e!==l.Event.END_AD&&(i.lastTrackedVideoEndObject=r),t!==o.READY&&t!==o.AD_STARTUP||n!==o.STARTUP?t!==o.STARTUP||n!==o.PLAYING&&n!==o.AD_STARTUP||i.clearVideoStartTimeout():i.setVideoStartTimeout();var d=String(t).toLowerCase();if(n===o.VIDEOSTART_FAILED)i.clearVideoStartTimeout(),i.stateMachineCallbacks.videoStartFailed(u,(0,c.createVideoStartFailedReason)(e));else if(t===o.END_PLAY_SEEKING)(0,m.noOp)();else if(e===l.Event.UNLOAD)i.stateMachineCallbacks.unload(u,d);else if(t===o.AD_PAUSE||t===o.AD_READY||t===o.AD_PLAYING||t===o.AD_STARTUP)(0,m.isNotNullish)(i.lastTrackedVideoEndObject)&&(i.stateMachineCallbacks.setVideoTimeStartFromEvent(i.lastTrackedVideoEndObject),i.stateMachineCallbacks.setVideoTimeEndFromEvent(i.lastTrackedVideoEndObject)),i.stateMachineCallbacks.ad(u,"ad");else if(e===l.Event.START_AD&&t===o.STARTUP)(0,m.noOp)();else if(e===l.Event.SOURCE_LOADED&&t===o.INITIAL_SOURCE_CHANGE)(0,m.noOp)();else if(t===o.SETUP)i.stateMachineCallbacks.setup(1,o.SETUP.toLowerCase());else if(e===l.Event.PAUSE&&t===o.STARTUP&&n===o.READY||e===s.PAUSE_BEFORE_SOURCE_LOADED&&t===o.STARTUP_AUTOPLAY&&n===o.INITIAL_SOURCE_CHANGE||e===s.PAUSE_AFTER_SOURCE_LOADED&&t===o.STARTUP_AUTOPLAY&&n===o.READY)i.clearVideoStartTimeout();else if(t===o.STARTUP_AUTOPLAY)i.stateMachineCallbacks.startup(u,o.STARTUP.toLowerCase());else if(t!==o.ERROR){var h=i.stateMachineCallbacks[d];if((0,m.isFunction)(h))try{h(u,d,r)}catch(e){p.logger.error("Exception occurred in State Machine callback "+d,r,e)}else(0,v.logMissingCallbackWarning)(t,[o.READY,o.SOURCE_CHANGING])}r&&n!==o.END_PLAY_SEEKING&&t!==o.PLAY_SEEKING&&n!==o.PLAY_SEEKING&&t!==o.AD_STARTUP&&t!==o.AD_READY&&t!==o.AD_PLAYING&&t!==o.AD_PAUSE&&i.stateMachineCallbacks.setVideoTimeStartFromEvent(r),e===l.Event.MUTE?i.stateMachineCallbacks.mute():e===l.Event.UN_MUTE&&i.stateMachineCallbacks.unMute()}},t["onenter".concat(o.STARTUP_AUTOPLAY)]=function(){i.setVideoStartTimeout()},t["onenter".concat(o.PLAYING)]=function(){i.playingHeartbeatService.startHeartbeat()},t["onenter".concat(o.PLAY_SEEKING)]=function(e,t,n,a,r){t!==o.END_PLAY_SEEKING&&(i.seekStartTimestamp=a)},t["onenter".concat(o.QUALITY_CHANGE)]=function(e,t,n,a,r){i.stateMachineCallbacks.qualitychange(r),i.stateMachine[l.Event.FINISH_QUALITY_CHANGE](a)},t.onenterstate=function(t,n,a,r,s){(0,v.logStateMachineTransition)("ENTER",t,n,a),i.onEnterStateTimestamp=null!=r?r:Date.now(),(0,h.isNumber)(e.starttime)&&t===l.JSM_INITIAL_EVENT&&(i.onEnterStateTimestamp=e.starttime),!s||a===o.END_PLAY_SEEKING||n===o.PLAY_SEEKING||n===o.AD_STARTUP||n===o.AD_READY||n===o.AD_PLAYING||n===o.AD_PAUSE||t===l.Event.SEEK&&n===o.END_PLAY_SEEKING||i.stateMachineCallbacks.setVideoTimeStartFromEvent(s),t===l.Event.START_CAST&&a===o.CASTING&&i.stateMachineCallbacks.startCasting(r,s),a===o.REBUFFERING&&i.startRebufferingHeartbeatInterval()},t["onafter".concat(l.Event.ERROR)]=function(e,t,n,a,r){i.stateMachineCallbacks.error(r)},t["onafter".concat(l.Event.SOURCE_UNLOADED)]=function(e,t,n,a,r){i.sourceLoadedDuringAutoplayStartup=!1},t.onafterevent=function(e,t,n,a,r){e===l.Event.MANUAL_SOURCE_CHANGE&&t===o.SETUP?i.stateMachineCallbacks.initialSourceChange(r):e===l.Event.MANUAL_SOURCE_CHANGE&&i.stateMachineCallbacks.manualSourceChange(r),n!==o.MUTING_READY&&n!==o.MUTING_PLAY&&n!==o.MUTING_PAUSE||i.stateMachine.FINISH_MUTING(a)},t)})},t.prototype.getStates=function(){return this.debuggingStates},t.prototype.setEnabledDebugging=function(e){this.enabledDebugging=e},t.prototype.addStatesToLog=function(e,t,i,n,a){this.enabledDebugging&&this.debuggingStates.push(new d.EventDebugging(e,t,i,n,a))},t}(f.AnalyticsStateMachine);t.Bitmovin8AnalyticsStateMachine=A},8253:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logStateMachineTransition=t.logMissingCallbackWarning=t.customStateMachineErrorCallback=t.whileIn=t.on=void 0,t.getAllStates=s,t.getAllStatesBut=function(e,t){return s(t).filter((function(t){return e.indexOf(t)<0}))};var n=i(2595),a=i(1916),r=i(2974),o=i(5063);t.on=function(e){return{stayIn:function(t){return{name:e,from:t,to:t}}}};t.whileIn=function(e){var t=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return t.map((function(t){return{name:t,from:e,to:e}}))};return{runEventCallbacksFor:t,passOver:t}};t.customStateMachineErrorCallback=function(e,t,i,r,s,u,l){var c='StateMachine ignored event "'.concat(e,'", ').concat(u),d={eventName:e,from:t,to:i,args:(0,o.tryJSONStringify)(r),errorCode:s,errorMessage:u};s!==n.Error.INVALID_TRANSITION?a.logger.error(c,d):a.logger.log(c,d)};t.logMissingCallbackWarning=function(e,t){(void 0===t&&(t=[]),(0,o.isNullish)(e))||(0,o.isNullish)(t.find((function(t){return e===t})))&&a.logger.warn("Could not find StateMachine callback function for "+e)};function s(e){return(0,r.objectValues)(e)}t.logStateMachineTransition=function(e,t,i,n){"ENTER"===e?a.logger.log("[ENTER] ".concat((0,a.padRight)(n,20)," EVENT: ").concat((0,a.padRight)(t,20)," from ").concat((0,a.padRight)(i,20))):a.logger.log("[LEAVE] ".concat((0,a.padRight)(i,20)," EVENT: ").concat((0,a.padRight)(t,20)," to ").concat((0,a.padRight)(n,20)))}},8917:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdAnalytics=void 0,t.buildInitialActiveAdBreakState=m,t.buildInitialActiveAdState=f;var a=i(5517),r=i(1916),o=i(1460),s=i(6481),u=i(5063),l=i(5063),c=i(2982),d=i(4926),p=i(3612),h=function(){function e(e,t){var i=this;this.onBeforeUnLoadEvent=!1,this.isPlaying=!1,this.adPodPosition=0,this.analytics=e,this.adapter=t,this.adapter.adCallbacks.onAdStarted=function(e){return i.onAdStarted(e)},this.adapter.adCallbacks.onAdFinished=function(e){return i.onAdFinished(e)},this.adapter.adCallbacks.onAdBreakStarted=function(e){return i.onAdBreakStarted(e)},this.adapter.adCallbacks.onAdBreakFinished=function(e){return i.onAdBreakFinished(e)},this.adapter.adCallbacks.onAdClicked=function(e){return i.onAdClicked(e)},this.adapter.adCallbacks.onAdError=function(e){return i.onAdError(e)},this.adapter.adCallbacks.onAdManifestLoaded=function(e){return i.onAdManifestLoaded(e)},this.adapter.adCallbacks.onPlay=function(){return i.onPlay()},this.adapter.adCallbacks.onPause=function(){return i.onPause()},this.adapter.adCallbacks.onBeforeUnload=function(){return i.onBeforeUnload()},this.adapter.adCallbacks.onAdSkipped=function(e){return i.onAdSkipped(e)},this.adapter.adCallbacks.onAdQuartile=function(e){return i.onAdQuartile(e)};var n=this.adapter.getContainer();(0,l.isNotNullish)(n)&&(this.viewportTracker=new p.ViewportTracker(n,(function(){return i.onIntersectionChanged()}),.5))}return e.prototype.release=function(){var e;this.clearCurrentTimeInterval(),null===(e=this.viewportTracker)||void 0===e||e.dispose(),this.adManifestDownloadTime=void 0},e.prototype.onIntersectionChanged=function(){this.activeAdState&&(this.isContainerInViewport()?this.enterViewportTimestamp=Date.now():this.enterViewportTimestamp&&(this.activeAdState.timeInViewport=(this.activeAdState.timeInViewport||0)+Date.now()-this.enterViewportTimestamp))},e.prototype.isContainerInViewport=function(){return!this.viewportTracker||this.viewportTracker.isInViewport()},e.prototype.onPlay=function(){if(this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdState){var e=Date.now();this.beginPlayingTimestamp=e,this.enterViewportTimestamp=e,this.isPlaying=!0}},e.prototype.onPause=function(){this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdState&&(this.updatePlayingTime(this.activeAdState),this.isPlaying=!1)},e.prototype.onAdManifestLoaded=function(e){e.isVmap?this.sendAnalyticsRequest(m(e.adBreakInfo)):this.adManifestDownloadTime=e.manifestDownloadTime},e.prototype.onAdBreakStarted=function(e){this.adPodPosition=0,this.activeAdBreakState=m(n(n({},e),{manifestDownloadTime:this.adManifestDownloadTime})),delete this.adManifestDownloadTime,this.adStartupTimestamp=Date.now()},e.prototype.onAdBreakFinished=function(e){this.resetActiveAd(),this.activeAdBreakState=void 0},e.prototype.onAdStarted=function(e){e.isLinear&&(this.resetActiveAd(),this.activeAdState=f(e),this.currentTime=void 0,this.activeAdState.adStartupTime=this.adStartupTimestamp?Date.now()-this.adStartupTimestamp:void 0,this.startAd(this.activeAdState))},e.prototype.onAdFinished=function(e){if(this.activeAdBreakState&&this.activeAdState){var t=n({},this.activeAdState);t.completed=1,this.resetActiveAd(),this.completeAd(this.activeAdBreakState,t,t.adDuration)}},e.prototype.onAdSkipped=function(e){if(this.activeAdBreakState&&this.activeAdState){var t=n({},this.activeAdState);t.skipped=1,t.skipPosition=this.currentTime,t.skipPercentage=u.calculatePercentage(t.skipPosition,this.activeAdState.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakState,t,t.skipPosition)}},e.prototype.onAdError=function(e){var t,i,n=m(e.adBreakInfo),a=this.analytics.transformError({code:e.code,message:e.message,severity:"CRITICAL"},e);n.errorCode=a.code,n.errorData=(0,l.tryJSONStringify)({code:e.code,message:e.message}),n.errorMessage=a.message,n.errorSeverity=a.severity,this.activeAdState&&e.activeAdId&&this.activeAdState.adId===e.activeAdId&&(t=this.activeAdState,i=this.currentTime,t.errorPosition=this.currentTime,t.errorPercentage=u.calculatePercentage(t.errorPosition,t.adDuration)),this.completeAd(n,t,i)},e.prototype.onAdClicked=function(e){this.activeAdState&&(this.activeAdState.adClickthroughUrl=e.clickThroughUrl,this.activeAdState.clicked=1,this.activeAdState.clickPosition=this.currentTime,this.activeAdState.clickPercentage=u.calculatePercentage(this.activeAdState.clickPosition,this.activeAdState.adDuration))},e.prototype.onAdQuartile=function(e){this.activeAdState&&(e.quartile===a.AdQuartile.FIRST_QUARTILE?this.activeAdState.quartile1=1:e.quartile===a.AdQuartile.MIDPOINT?this.activeAdState.midpoint=1:e.quartile===a.AdQuartile.THIRD_QUARTILE&&(this.activeAdState.quartile3=1))},e.prototype.onBeforeUnload=function(){if(!this.onBeforeUnLoadEvent&&(this.onBeforeUnLoadEvent=!0,this.activeAdState&&this.activeAdBreakState)){var e=n({},this.activeAdState);e.closed=1,e.closePosition=this.currentTime,e.closePercentage=u.calculatePercentage(e.closePosition,e.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakState,e,e.closePosition)}},e.prototype.sendAnalyticsRequest=function(e,t){var i=n(n(n({},(0,s.buildAdSample)(this.analytics.sample)),e),t||f()),a=this.adapter.getAdModuleInfo();i.analyticsVersion=d.VERSION,i.adModule=a.name,i.adModuleVersion=a.version,i.autoplay=this.adapter.getAutoPlay(),i.pageLoadType=u.getPageLoadType(),i.time=Date.now(),i.adImpressionId=(0,c.generateUUID)(),i.percentageInViewport=u.calculatePercentage(i.timeInViewport,i.timePlayed),this.analytics.backend.sendAdRequest(i)},e.prototype.updatePlayingTime=function(e){var t=Date.now();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 i=this;t.started=1,t.timePlayed=0,t.timeInViewport=0,t.adPodPosition=this.adPodPosition;var n=Date.now();this.beginPlayingTimestamp=n,this.enterViewportTimestamp=this.isContainerInViewport()?n:void 0,this.isPlaying=!0,this.currentTime=0,this.adPodPosition++,this.currentTimeInterval=setInterval((function(){try{t&&void 0!==t.adDuration&&t.adDuration>0&&i.adapter.isLinearAdActive()&&(i.currentTime=u.calculateTime(Math.max(i.adapter.currentTime(),0)))}catch(e){r.logger.log("AdStarted monitoring interval failed and got cleared",e),i.resetActiveAd()}}),e.TIMEOUT_CURRENT_TIME_INTERVAL)},e.prototype.completeAd=function(e,t,i){void 0===t&&(t=f()),t.exitPosition=i,t.playPercentage=u.calculatePercentage(t.exitPosition,t.adDuration),(0,l.isNotNullish)(t.playPercentage)&&(0===t.quartile1&&t.playPercentage>=25&&(t.quartile1=1),0===t.midpoint&&t.playPercentage>=50&&(t.midpoint=1),0===t.quartile3&&t.playPercentage>=75&&(t.quartile3=1)),this.adStartupTimestamp=Date.now(),this.updatePlayingTime(t),this.isPlaying=!1,this.sendAnalyticsRequest(e,t)},e.prototype.resetActiveAd=function(){this.clearCurrentTimeInterval(),this.activeAdState=void 0},e.prototype.clearCurrentTimeInterval=function(){clearInterval(this.currentTimeInterval),delete this.currentTime},e.MODULE_NAME="ads",e.TIMEOUT_CURRENT_TIME_INTERVAL=100,e}();function m(e){var t,i={adFallbackIndex:0};if((0,l.isNullish)(e))return i;if(i.adIdPlayer=e.id,i.adReplaceContentDuration=u.calculateTimeWithUndefined(e.replaceContentDuration),i.adIsPersistent=e.persistent,i.adTagType=e.tagType,i.adTagUrl=e.tagUrl,i.adPreloadOffset=u.calculateTimeWithUndefined(e.preloadOffset),i.adFallbackIndex=null!==(t=e.fallbackIndex)&&void 0!==t?t:0,i.manifestDownloadTime=u.calculateTimeWithUndefined(e.manifestDownloadTime),"pre"===e.position||"post"===e.position?i.adPosition=e.position:(0,l.isNotNullish)(e.position)&&(i.adPosition="mid",i.adOffset=e.position),(0,l.isNotNullish)(i.adTagUrl))try{var n=new URL(i.adTagUrl);i.adTagServer=n.hostname,i.adTagPath=n.pathname}catch(e){}return(0,o.isFiniteNumber)(e.scheduleTime)&&(i.adScheduleTime=u.calculateTime(e.scheduleTime)),i}function f(e){var t,i={clicked:0,closed:0,completed:0,midpoint:0,quartile1:0,quartile3:0,skipped:0,started:0};if((0,l.isNullish)(e))return i;if(i.adClickthroughUrl=e.clickThroughUrl,i.adId=e.id,i.mediaUrl=e.mediaUrl,i.isLinear=e.isLinear,i.adPlaybackHeight=e.height,i.adPlaybackWidth=e.width,i.streamFormat=e.mimeType,(0,l.isNotNullish)(i.mediaUrl))try{var n=new URL(i.mediaUrl);i.mediaPath=n.pathname,i.mediaServer=n.hostname}catch(e){}(0,l.isNotNullish)(e.bitrate)&&(i.videoBitrate=1e3*e.bitrate);var a=e.vastData;return(0,l.isNotNullish)(a)&&(i.adSystem=a.adSystem,i.advertiserName=a.advertiserName,i.apiFramework=a.apiFramework,i.creativeAdId=a.creativeAdId,i.creativeId=a.creativeId,i.universalAdIdRegistry=a.universalAdIdRegistry,i.universalAdIdValue=a.universalAdIdValue,i.adDescription=a.adDescription,i.minSuggestedDuration=u.calculateTimeWithUndefined(a.minSuggestedDuration),i.surveyUrl=a.surveyUrl,i.adTitle=a.adTitle,i.wrapperAdsCount=a.wrapperAdsCount),(0,l.isNotNullish)(e.skippableAfter)&&(i.adSkipAfter=-1===e.skippableAfter?e.skippableAfter:u.calculateTime(e.skippableAfter)),i.adSkippable=null!==(t=e.skippable)&&void 0!==t?t:(0,l.isNotNullish)(i.adSkipAfter)?i.adSkipAfter>=0:void 0,i.adDuration=u.calculateTimeWithUndefined(e.duration),i}t.AdAnalytics=h},4350:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=void 0,t.setQualityInfoOnSample=L;var a=i(3588),r=i(3458),o=i(8525),s=i(3565),u=i(6845),l=i(5529),c=i(8331),d=i(404),p=i(5923),h=i(9422),m=i(1916),f=i(1460),v=i(6481),A=i(1820),E=i(5063),g=i(5063),y=i(2982),S=i(4926),T=i(8421),I=i(8917),D=i(3054),b=i(675),_=i(7721),N=i(2226),C=i(847),P=i(8918),R=i(7906),M=function(){function e(e,t,i,a,r,o,s){var u=this;this.adapter=t,this.backendFactory=i,this.sessionHandler=a,this.featureManager=r,this.onErrorDetailEventDispatcher=o,this.identicalErrorReportingLimiter=s,this.hasSentStartupSample=!1,this.droppedSampleFrames=0,this.playerStartupTime=0,this.authenticationCallback={authenticationCompleted:function(e,t){u.featureManager.configureFeatures(e,t)}},this.sourceChange=function(e){if(m.logger.log("Processing Source Change for Analytics",e),(0,g.isNullish)(e))u.adapter.sourceChange(u.config);else{(0,c.guardConfigChangeAgainstMissingTitle)(u.config,e),(0,c.guardConfigChangeAgainstMissingIsLive)(u.config,e),(0,c.guardAgainstDuplicatedUserId)(e);var t=(0,c.mergeAnalyticsConfig)(u.config,e);u.adapter.sourceChange(t)}},this.setCustomDataOnce=function(e){var t=n({},u.config);u.setState("customdatachange"),u.sendSample(e),u.config=n({},t),u.setConfigParameters(),u.setAutoDetectedDeviceInformation()},this.setCustomData=function(e){u.adapter.setCustomData(e)},this.getCurrentImpressionId=function(){return u.sample.impressionId},this.getUserId=function(){return u.sessionHandler.userId},this.changeCustomData=function(e){u.config=n(n({},u.config),(0,l.extractCustomDataFieldsOnly)(e)),u.setConfigParameters(),u.setAutoDetectedDeviceInformation()},this.config=e,this.sessionHandler=new C.SessionPersistenceHandler(this.config);var d=this;this.errorDetailTrackingSettingsProvider={get domain(){return(0,c.getDomainFromAnalyticsConfig)(d.config)},get licenseKey(){var e;return null!==(e=d.config.key)&&void 0!==e?e:""},get impressionId(){var e;return null!==(e=d.getCurrentImpressionId())&&void 0!==e?e:""},get collectorConfig(){return d.config.config}};var p=this.adapter.onLicenseKeyReceived.subscribe((function(e){u.config.key||(u.config.key=e.licenseKey),p()}));this.sample=this.buildInitialSample(),this.droppedSampleFrames=0,this.init(),this.setupStateMachineCallbacks();var h=this.adapter.initialize(this);this.featureManager.registerFeatures(h),this.adapter.adModule&&(this.adAnalytics=new I.AdAnalytics(this,this.adapter.adModule))}return Object.defineProperty(e.prototype,"version",{get:function(){return S.VERSION},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorDetailSubscribable",{get:function(){return this.onErrorDetailEventDispatcher},enumerable:!1,configurable:!0}),e.prototype.init=function(){if(!0===this.adapter.supportsDeferredLicenseLoading||(0,A.isValidString)(this.config.key)&&!(0,A.isBlank)(this.config.key)){m.logger.initialize(this.config.debug),this.featureManager.resetFeatures();var e=(0,c.getDomainFromAnalyticsConfig)(this.config);this.backend=this.backendFactory.createBackend(this.config,{key:this.config.key,domain:e,version:S.VERSION},this.adapter,this.authenticationCallback),this.hasSentStartupSample=!1,this.identicalErrorReportingLimiter.reset(),this.setConfigParameters(),this.setAutoDetectedDeviceInformation(),this.sample.impressionId=(0,y.generateUUID)(),this.sample.userId=this.sessionHandler.userId,this.adapter.videoCompletionTracker&&this.adapter.videoCompletionTracker.reset(),this.adapter.qualityChangeService.resetValues(),this.adapter.ssaiService.resetSourceRelatedState()}else m.logger.errorMessageToUser("Invalid analytics license key provided")},e.prototype.setConfigParameters=function(){var e;this.sample.key=this.config.key,this.sample.playerKey=this.config.playerKey,this.config.player&&(this.sample.player=this.config.player),this.sample.domain=(0,c.getDomainFromAnalyticsConfig)(this.config),this.sample.deviceInformation=(0,c.getDeviceInformationFromAnalyticsConfig)(this.config),this.sample.isLive=!!(0,g.isNotNullish)(this.config.isLive)&&this.config.isLive,this.sample.cdnProvider=this.config.cdnProvider,this.sample.videoId=this.config.videoId,this.sample.videoTitle=this.config.title,this.sample.customUserId=null!==(e=this.config.userId)&&void 0!==e?e:this.config.customUserId,E.transferCustomDataFields(this.config,this.sample),this.sample.experimentName=this.config.experimentName},e.prototype.setAutoDetectedDeviceInformation=function(){var e,t;if(!(0,g.isNotNullish)(null===(e=this.sample.deviceInformation)||void 0===e?void 0:e.model)&&(0,h.hasGlobalWebOSApi)()){var i=(0,T.getWebOSTVModelName)();(0,g.isNullish)(i)||(this.sample.deviceInformation=null!==(t=this.sample.deviceInformation)&&void 0!==t?t:{},this.sample.deviceInformation.model=i)}},e.prototype.setupStateMachineCallbacks=function(){var e=this;this.adapter.stateMachineCallbacks.setup=function(t,i){var n,a;m.logger.log("Setup bitmovin analytics "+e.sample.analyticsVersion+" with impressionId: "+e.sample.impressionId),e.setDuration(t),e.setState(i),e.sample.playerStartupTime=t,e.playerStartupTime=e.sample.playerStartupTime;var r=null===(a=null===(n=p.globalScope.performance)||void 0===n?void 0:n.timing)||void 0===a?void 0:a.navigationStart;if((0,g.isNotNullish)(r)&&(0,f.isFiniteNumber)(r)){var o=Math.round(Date.now()-p.globalScope.performance.timing.navigationStart);e.sample.pageLoadTime=o}e.sendSample()},this.adapter.stateMachineCallbacks.startup=function(t,i){e.setState(i),e.sample.supportedVideoCodecs=d.CodecHelper.supportedVideoFormats;var n=Math.max(t,1);e.setDuration(n),e.sample.videoStartupTime=n,e.sample.startupTime=(e.playerStartupTime||0)+n,e.sample.autoplay=e.adapter.getAutoPlay();var a=e.adapter.getDrmPerformanceInfo();(0,g.isNotNullish)(a)&&(e.sample.drmType=a.drmType,e.sample.drmLoadTime=a.drmLoadTime);var r=e.adapter.getCurrentPlaybackInfo(),o=r.videoBitrate,s=r.audioBitrate;e.adapter.qualityChangeService.setStartupHasFinished(o,s),e.hasSentStartupSample=!0,e.sendSample()},this.adapter.stateMachineCallbacks.programChange=function(t){e.playerStartupTime=0,e.config=(0,c.applySourceMetadataToAnalyticsConfig)(e.config,t),e.sample=e.buildInitialSample(),e.sample.path=(0,A.isValidString)(t.path)?t.path:(0,v.getDefaultSamplePath)(),e.init(),e.setState("programchange"),e.sample.isProgramChange=!0,e.sample.supportedVideoCodecs=d.CodecHelper.supportedVideoFormats;e.setDuration(1),e.sample.videoStartupTime=1,e.sample.startupTime=1,e.sample.autoplay=e.adapter.getAutoPlay(),e.sample.drmType=void 0,e.sample.drmLoadTime=void 0;var i=e.adapter.getCurrentPlaybackInfo(),n=i.videoBitrate,a=i.audioBitrate;e.adapter.qualityChangeService.setStartupHasFinished(n,a),e.hasSentStartupSample=!0,e.sendSample()},this.adapter.stateMachineCallbacks.updateSourceMetadata=function(t){e.config=(0,c.applySourceMetadataToAnalyticsConfig)(e.config,t),e.setConfigParameters(),e.setAutoDetectedDeviceInformation(),e.sample.path=(0,A.isValidString)(t.path)?t.path:(0,v.getDefaultSamplePath)()},this.adapter.stateMachineCallbacks.playing=function(t,i){e.setDuration(t),e.setState(i),e.sample.played=t,e.setCompletionValues(),e.sendSample()},this.adapter.stateMachineCallbacks.unload=function(t,i){var n=e.sample.videoTimeStart;"playing"===i&&(e.setDuration(t),e.setState(i),e.sample.played=t,e.setCompletionValues(),(0,f.isNumber)(e.sample.videoTimeEnd)&&(n=e.sample.videoTimeEnd),e.backend.sendUnloadRequest(e.sample),(0,v.clearSampleStateValues)(e.sample)),e.hasSentStartupSample&&(e.setVideoTimeStart(n),e.setVideoTimeEnd(n),e.setState("closed"),e.backend.sendUnloadRequest(e.sample),(0,v.clearSampleStateValues)(e.sample))},this.adapter.stateMachineCallbacks.heartbeat=function(t,i,a){e.setState(i),e.setDuration(t),e.sample=n(n({},e.sample),a),"playing"===i&&e.setCompletionValues(),e.sendSample()},this.adapter.stateMachineCallbacks.qualitychange=function(t){e.adapter.qualityChangeService.startResetInterval(),e.adapter.qualityChangeService.increaseCounter(),e.adapter.qualityChangeService.hasExceededQualityChangeThreshold()?e.adapter.stateMachineCallbacks.error({code:r.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.code,message:r.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.message,errorSeverity:r.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.errorSeverity,legacyData:void 0,data:{},currentTime:t.currentTime}):(e.setState("qualitychange"),e.setDuration(0),e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.adapter.stateMachineCallbacks.updateSampleQualityInfo(t),e.sendSample())},this.adapter.stateMachineCallbacks.updateSampleQualityInfo=function(t){"audio"===t.type?((0,f.isNumber)(t.bitrate)&&(e.sample.audioBitrate=t.bitrate),(0,A.isValidString)(t.codec)&&(e.sample.audioCodec=t.codec)):"video"===t.type&&((0,f.isNumber)(t.bitrate)&&(e.sample.videoBitrate=t.bitrate),(0,A.isValidString)(t.codec)&&(e.sample.videoCodec=t.codec),(0,f.isNumber)(t.height)&&(e.sample.videoPlaybackHeight=t.height),(0,f.isNumber)(t.width)&&(e.sample.videoPlaybackWidth=t.width))},this.adapter.stateMachineCallbacks.audiotrack_changing=function(){e.sendSample()},this.adapter.stateMachineCallbacks.pause=function(t,i){e.setDuration(t),e.setState(i),e.sample.paused=t,e.sendSample()},this.adapter.stateMachineCallbacks.seeking=function(t){e.setDuration(t),e.setState("seeking"),e.sample.seeked=t,e.sendSample()},this.adapter.stateMachineCallbacks.rebuffering=function(t,i){e.setDuration(t),e.setState(i),e.sample.buffered=t,e.sendSample()},this.adapter.stateMachineCallbacks.videoStartFailed=function(t,i){e.setState("startup"),e.sample.videoStartFailed=!0,e.sample.videoStartFailedReason=i,e.sample.duration=t,i!==s.VideoStartFailedReason.PLAYER_ERROR&&(i===s.VideoStartFailedReason.TIMEOUT&&(e.sample.errorCode=r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.code,e.sample.errorMessage=r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.message,e.sample.errorSeverity=r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.errorSeverity,e.onErrorDetailEventDispatcher.dispatch({code:r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.code,message:r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.message,severity:r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.errorSeverity})),e.sendSample())},this.adapter.stateMachineCallbacks.error=function(t){var i,n=e.transformError({code:t.code,message:t.message,severity:null!==(i=t.errorSeverity)&&void 0!==i?i:"CRITICAL"},t.originalError);!n.code||e.identicalErrorReportingLimiter.shouldReportError(n.code,n.severity)?(e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setState("error"),e.setDuration(0),e.sample.errorCode=n.code,e.sample.errorMessage=n.message,e.sample.errorSeverity=n.severity,e.sample.errorData=(0,g.tryJSONStringify)(t.legacyData),e.sample.errorSegments=e.adapter.getSegmentInfo().map((function(e){return e.name})),e.adapter.onError&&e.adapter.onError(),e.onErrorDetailEventDispatcher.dispatch({code:n.code,message:n.message,severity:n.severity,errorData:t.data}),e.sendSample()):m.logger.log("Bitmovin Analytics: Processing of the error with code ".concat(n.code," was ignored because the error limit was exceeded."))},this.adapter.stateMachineCallbacks.ad=function(t,i){e.setDuration(t),e.setState(i),e.sample.ad=a.AD_TYPE.CSAI,e.sendSample()},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.sendSample()},this.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent=function(t){(0,f.isNumber)(null==t?void 0:t.currentTime)&&e.setVideoTimeEnd(E.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent=function(t){(0,f.isNumber)(null==t?void 0:t.currentTime)&&e.setVideoTimeStart(E.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.manualSourceChange=function(t){e.adapter.resetSourceRelatedState(),e.sample=e.buildInitialSample(),e.droppedSampleFrames=0,e.playerStartupTime=0,e.config=Object.keys(t.config).length>0?t.config:e.config,e.init()},this.adapter.stateMachineCallbacks.initialSourceChange=function(t){e.config=t.config,e.setConfigParameters(),e.setAutoDetectedDeviceInformation()},this.adapter.stateMachineCallbacks.end=function(){e.sample=e.buildInitialSample(),e.droppedSampleFrames=0,e.playerStartupTime=0,e.init()},this.adapter.stateMachineCallbacks.release=function(){var t;e.backend=new N.NoOpBackend,null===(t=e.adAnalytics)||void 0===t||t.release(),e.adapter.qualityChangeService.stopResetInterval(),e.identicalErrorReportingLimiter.reset()},this.adapter.stateMachineCallbacks.customdatachange=function(t,i,n){(0,g.isNotNullish)(null==n?void 0:n.customDataValues)&&e.changeCustomData(n.customDataValues)}},e.prototype.setDuration=function(e){this.sample.duration=e},e.prototype.setState=function(e){this.sample.state=e},e.prototype.setPlaybackInfoFromAdapter=function(){var e=this.adapter.getCurrentPlaybackInfo();e&&(this.sample.isLive=(0,g.isNotNullish)(this.config.isLive)?this.config.isLive:e.isLive,(0,g.isNullish)(this.sample.isLive)&&(this.sample.isLive=!1),(0,A.isValidString)(e.size)&&(this.sample.size=e.size),(0,A.isValidString)(e.playerTech)&&(this.sample.playerTech=e.playerTech),(0,f.isNumber)(e.videoDuration)&&(this.sample.videoDuration=E.calculateTime(e.videoDuration||0)),(0,A.isValidString)(e.streamFormat)&&(this.sample.streamFormat=e.streamFormat),(0,A.isValidString)(e.mpdUrl)&&(this.sample.mpdUrl=e.mpdUrl),(0,A.isValidString)(e.m3u8Url)&&(this.sample.m3u8Url=e.m3u8Url),(0,A.isValidString)(e.progUrl)&&(this.sample.progUrl=e.progUrl),(0,f.isNumber)(e.videoWindowWidth)&&(this.sample.videoWindowWidth=e.videoWindowWidth),(0,f.isNumber)(e.videoWindowHeight)&&(this.sample.videoWindowHeight=e.videoWindowHeight),(0,f.isNumber)(e.screenHeight)&&(this.sample.screenHeight=e.screenHeight),(0,f.isNumber)(e.screenWidth)&&(this.sample.screenWidth=e.screenWidth),E.isBoolean(e.isMuted)&&(this.sample.isMuted=e.isMuted),E.isBoolean(e.isCasting)&&(this.sample.isCasting=e.isCasting),(0,A.isValidString)(e.castTech)&&(this.sample.castTech=e.castTech),(0,A.isValidString)(e.videoTitle)&&!this.config.title&&(this.sample.videoTitle=e.videoTitle),(0,A.isValidString)(e.audioCodec)&&(this.sample.audioCodec=e.audioCodec),(0,A.isValidString)(e.videoCodec)&&(this.sample.videoCodec=e.videoCodec),(0,A.isValidString)(e.audioLanguage)&&(this.sample.audioLanguage=e.audioLanguage),E.isBoolean(e.subtitleEnabled)&&(this.sample.subtitleEnabled=e.subtitleEnabled),(0,A.isValidString)(e.subtitleLanguage)?this.sample.subtitleLanguage=e.subtitleLanguage:this.sample.subtitleLanguage=void 0,(0,f.isNumber)(e.droppedFrames)&&(this.sample.droppedFrames=Math.max(e.droppedFrames-this.droppedSampleFrames,0),this.droppedSampleFrames=e.droppedFrames))},e.prototype.sendSample=function(e){if(this.setPlaybackInfoFromAdapter(),this.sample.time=E.getCurrentTimestamp(),this.sample.downloadSpeedInfo=this.adapter.getDownloadSpeedInfo(),this.adapter.resetDownloadSpeedInfoMeasures(),this.adapter.ssaiService.manipulate(this.sample),null!=e&&this.changeCustomData(e),(0,g.isNullish)(this.sample.videoBitrate)||this.sample.videoBitrate<=0){L(this.sample,this.adapter.getCurrentPlaybackInfo());var t=n({},this.sample);this.backend.sendRequest(t)}else{t=n({},this.sample);this.backend.sendRequest(t),L(this.sample,this.adapter.getCurrentPlaybackInfo())}(0,v.clearSampleStateValues)(this.sample)},e.prototype.sendSsaiEngagementAdSample=function(e){var t;if(!0===(null===(t=this.config.config)||void 0===t?void 0:t.ssaiEngagementTrackingEnabled))if((0,P.isSsaiEngagementStartedData)(e)){var i=(0,R.createStartedAdSample)(this.sample,e);this.backend.sendAdRequest(i)}else if((0,P.isSsaiEngagementQuartileData)(e)){i=(0,R.createQuartileAdSample)(this.sample,e);this.backend.sendAdRequest(i)}else if((0,P.isSsaiEngagementErrorData)(e)){e.analyticsError=this.transformError(e.analyticsError,e.originalError);var n=(0,R.createErrorAdSample)(this.sample,e);this.backend.sendAdRequest(n)}else;},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.transformError=function(e,t){var i,n,a={code:e.code,message:e.message,severity:e.severity};try{var r=null===(n=null===(i=this.config.config)||void 0===i?void 0:i.errorTransformerCallback)||void 0===n?void 0:n.transform(a,{originalError:t});a.code=(0,f.isNumber)(null==r?void 0:r.code)?null==r?void 0:r.code:a.code,a.message=(0,A.isValidString)(null==r?void 0:r.message)?null==r?void 0:r.message:a.message,a.severity=(0,A.isValidString)(null==r?void 0:r.severity)&&(0,g.isErrorSeverity)(null==r?void 0:r.severity)?r.severity:a.severity}catch(e){m.logger.error("Error in errorTransformerCallback",e)}return a},e.prototype.buildInitialSample=function(){var e,t=this.config.player||this.adapter.getPlayerName(),i=(0,h.getGlobalScreenDimensions)();return{ad:0,analyticsVersion:S.VERSION,audioBitrate:0,buffered:0,completedTotal:0,droppedFrames:0,duration:0,isLive:null!==(e=this.config.isLive)&&void 0!==e&&e,language:(0,h.getGlobalNavigatorLanguage)(),pageLoadTime:0,pageLoadType:E.getPageLoadType(),path:(0,v.getDefaultSamplePath)(),paused:0,platform:"web",played:0,player:t,playerStartupTime:0,playerTech:this.adapter.getPlayerTech(),screenHeight:null==i?void 0:i.height,screenWidth:null==i?void 0:i.width,seeked:0,size:o.PlayerSize.Window,startupTime:0,time:0,userAgent:(0,h.getGlobalNavigatorUserAgent)(),version:t+"-"+this.adapter.getPlayerVersion(),videoBitrate:0,videoDuration:0,videoPlaybackHeight:0,videoPlaybackWidth:0,videoStartupTime:0,videoTimeEnd:0,videoTimeStart:0,videoWindowHeight:0,videoWindowWidth:0}},e.create=function(t,i){return new e(t,i,new D.BackendFactory,new C.SessionPersistenceHandler(t),new u.FeatureManager,new b.EventDispatcher,new _.IdenticalErrorReportingLimiter)},e.version=S.VERSION,e}();function L(e,t){(0,f.isNumber)(t.videoPlaybackHeight)&&(e.videoPlaybackHeight=t.videoPlaybackHeight),(0,f.isNumber)(t.videoPlaybackWidth)&&(e.videoPlaybackWidth=t.videoPlaybackWidth),(0,f.isNumber)(t.videoBitrate)&&(e.videoBitrate=t.videoBitrate),(0,f.isNumber)(t.audioBitrate)&&(e.audioBitrate=t.audioBitrate)}t.Analytics=M},3054:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFactory=void 0;var n=i(5253),a=i(4649),r=i(7540),o=i(3489),s=i(399),u=i(2226),l=i(7390),c=function(){function e(){}return e.prototype.createBackend=function(e,t,i,n){if(!this.isEnabled(e))return new u.NoOpBackend;var a=this.createInnerBackend(e,t,i,n);return this.decorateWithDebuggingBackend(e,a)},e.prototype.decorateWithDebuggingBackend=function(e,t){return e.debug?new r.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,i,r){var u=e.config&&e.config.backendUrl||a.ANALYTICS_BACKEND_BASE_URL,c=new o.LicenseCheckingBackend(t,n.LicenseCall,u,i,r);c=this.decorateWithBackendFromConfigIfAvailable(e,c);var d=new l.SequenceNumberBackend(c);return new s.LongPlaytimeFilteringBackend(d)},e}();t.BackendFactory=c},7540:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggingBackend=void 0;var n=i(1916),a=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(i){return t[i]=e[i]})),n.logger.table([t])}},e}();t.DebuggingBackend=a},9664:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadSpeedMeter=void 0;var n=i(5766),a=i(3786),r=function(){function e(){this.measures=[]}return e.prototype.reset=function(){this.measures=[]},e.prototype.addMeasurement=function(e){if(!(e.httpStatus>=400)){var t=new a.Measure(e),i=n.Converter.bitsToBytes(3e8);t.speed>=i||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 n.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=r},675:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDispatcher=void 0;var i=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=i},2663:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartbeatService=t.DEFAULT_HEARTBEAT_INTERVAL_MS=void 0,t.DEFAULT_HEARTBEAT_INTERVAL_MS=59700;var i=function(){function e(e){this.getPlayerCurrentTime=e}return e.prototype.setListener=function(e){this.listener=e},e.prototype.startHeartbeat=function(){var e=this;void 0!==this.heartbeatInterval&&this.clearHeartbeat(),this.heartbeatInterval=setInterval((function(){var t;null===(t=e.listener)||void 0===t||t.onHeartbeat(e.getPlayerCurrentTime())}),t.DEFAULT_HEARTBEAT_INTERVAL_MS)},e.prototype.stopHeartbeat=function(){this.clearHeartbeat()},e.prototype.clearHeartbeat=function(){clearTimeout(this.heartbeatInterval),this.heartbeatInterval=void 0},e}();t.HeartbeatService=i},7721:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdenticalErrorReportingLimiter=void 0;var i=function(){function e(){this._currentErrorCount=0}return e.prototype.shouldReportError=function(t,i){return t===this._lastErrorCode&&i===this._lastErrorSeverity?(this._currentErrorCount++,this._currentErrorCount<=e.MAX_IDENTICAL_ERROR_REPORTING):(this._lastErrorCode=t,this._lastErrorSeverity=i,this._currentErrorCount=1,!0)},e.prototype.reset=function(){this._lastErrorCode=void 0,this._lastErrorSeverity=void 0,this._currentErrorCount=0},e.MAX_IDENTICAL_ERROR_REPORTING=5,e}();t.IdenticalErrorReportingLimiter=i},3489:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCheckingBackend=void 0;var a=i(4501),r=i(1916),o=i(4649),s=i(2226),u=i(1125),l=i(2364),c=function(){function e(e,t,i,a,r){var l=this;this.licenseCall=t,this.backendBaseUrl=i,this.adapter=a,this.authenticationCallback=r,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=n({},e),this.backend=new u.QueueBackend,this.licenseCall=t,void 0!==e.key&&""!==e.key?this.promise=this.wrapLicenseCheckPromiseWithCallback(this.performLicenseCheck(),this.authenticationCallback):!0===a.supportsDeferredLicenseLoading?(a.onLicenseKeyReceived.subscribe(this.licenseKeyReceived),a.onLicenseCallFailed.subscribe(this.licenseCallFailed),this.licenseLazyLoadingTimeoutHandle=setTimeout(this.licenseLazyLoadingTimeout,o.ANALYTICS_LICENSECALL_TIMEOUT)):(r.authenticationCompleted(!1,void 0),this.backend=new s.NoOpBackend)}return e.prototype.performLicenseCheck=function(){var e=this,t=this.info,i=t.key,n=t.domain,o=t.version;if(!i||""===i){var u={status:a.LicensingResult.Denied,message:"No license key provided"};return this.backend=new s.NoOpBackend,Promise.resolve(u)}return this.licenseCall(i,n,o,this.backendBaseUrl).then((function(t){if(t.status!==a.LicensingResult.Granted)throw new Error(t.message);var n=new l.RemoteBackend(e.backendBaseUrl,i);return e.backend.flushTo(n),e.backend=n,t})).catch((function(t){return"Ignoring Impression due to DNT Header being set"===t.message?r.logger.error("License Check for Bitmovin Analytics failed because of",t):r.logger.errorMessageToUser("License Check for Bitmovin Analytics failed because of",t),e.backend=new s.NoOpBackend,{status:a.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===a.LicensingResult.Granted,e.features),e}))},e}();t.LicenseCheckingBackend=c},399:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LongPlaytimeFilteringBackend=void 0;var n=i(5063),a=function(){function e(e){this.nextBackend=e}return e.prototype.sendRequest=function(e){this.isPlayedAboveThreshold(e)||this.nextBackend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.isPlayedAboveThreshold(e)||this.nextBackend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.isPlayedAboveThreshold(e)||this.nextBackend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.nextBackend.sendAdRequest(e)},e.prototype.isPlayedAboveThreshold=function(e){return((0,n.isNullish)(e.played)?0:e.played)>=9e4},e}();t.LongPlaytimeFilteringBackend=a},3786:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Measure=void 0;var i=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=i},2226:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpBackend=void 0;var i=function(){function e(){}return e.prototype.sendRequest=function(e){},e.prototype.sendUnloadRequest=function(e){},e.prototype.sendRequestSynchronous=function(e){},e.prototype.sendAdRequest=function(e){throw new Error("Method not implemented.")},e}();t.NoOpBackend=i},9796:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1460),a=i(4649),r=function(){function e(e){void 0===e&&(e=a.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD),this.qualityChangeCount=0,this.previousVideoBitrate=0,this.previousAudioBitrate=0,this.startupHasFinished=!1,this.QUALITY_CHANGE_COUNT_THRESHOLD=e}return e.prototype.resetValues=function(){this.qualityChangeCount=0,this.stopResetInterval(),this.previousVideoBitrate=0,this.previousAudioBitrate=0,this.startupHasFinished=!1},e.prototype.increaseCounter=function(){this.qualityChangeCount++},e.prototype.hasExceededQualityChangeThreshold=function(){return this.qualityChangeCount>this.QUALITY_CHANGE_COUNT_THRESHOLD},e.prototype.setStartupHasFinished=function(e,t){this.startupHasFinished=!0,(0,n.isFiniteNumber)(e)&&(this.previousVideoBitrate=e),(0,n.isFiniteNumber)(t)&&(this.previousAudioBitrate=t)},e.prototype.shouldAllowVideoQualityChange=function(e){return this.startupHasFinished&&(0,n.isFiniteNumber)(e)&&0!==this.previousVideoBitrate&&this.previousVideoBitrate!==e&&!this.hasExceededQualityChangeThreshold()},e.prototype.setVideoBitrate=function(e){this.startupHasFinished&&(this.previousVideoBitrate=e)},e.prototype.shouldAllowAudioQualityChange=function(e){return this.startupHasFinished&&(0,n.isFiniteNumber)(e)&&0!==this.previousAudioBitrate&&this.previousAudioBitrate!==e&&!this.hasExceededQualityChangeThreshold()},e.prototype.setAudioBitrate=function(e){this.startupHasFinished&&(this.previousAudioBitrate=e)},e.prototype.startResetInterval=function(){var e=this;void 0===this.qualityChangeCountResetIntervalId&&(this.qualityChangeCountResetIntervalId=setInterval((function(){e.qualityChangeCount=0}),a.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL))},e.prototype.stopResetInterval=function(){void 0!==this.qualityChangeCountResetIntervalId&&(clearInterval(this.qualityChangeCountResetIntervalId),delete this.qualityChangeCountResetIntervalId)},e}();t.default=r},1125:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueueBackend=void 0;var i=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=i},2364:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteBackend=void 0;var n=i(5426),a=i(5063),r=function(){function e(e,t){this.analyticsCall=new n.AnalyticsCall(e),this.licenseKey=t}return e.prototype.sendRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendRequest(e,a.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,a.noOp)},e.prototype.sendAdRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendAdRequest(e)},e}();t.RemoteBackend=r},6235:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTracker=void 0;var i=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=i},7390:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceNumberBackend=void 0;var n=i(4649),a=function(){function e(e){this.sequenceNumber=0,this.nextBackend=e}return e.prototype.sendRequest=function(e){this.updateSampleBeforeSending(e),this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.updateSampleBeforeSending(e),this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendUnloadRequest(e)},e.prototype.sendRequestSynchronous=function(e){this.updateSampleBeforeSending(e),this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendRequestSynchronous(e)},e.prototype.sendAdRequest=function(e){this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendAdRequest(e)},e.prototype.updateSampleBeforeSending=function(e){e.sequenceNumber=this.sequenceNumber++},e.prototype.isSequenceNumberAboveThreshold=function(e){var t;return(null!==(t=e.sequenceNumber)&&void 0!==t?t:0)>n.SEQUENCE_NUMBER_LIMIT},e}();t.SequenceNumberBackend=a},847:function(e,t,i){"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 n=i(3848),a=i(1460),r=i(1820),o=i(5063),s=i(2982);t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID="bitmovin_analytics_uuid",t.COOKIE_DEFAULT_MAX_AGE=31536e3;var u=function(e){var i=e.config;if(!1===(null==i?void 0:i.cookiesEnabled))return(0,n.deleteCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID),void(this.userId=(0,s.generateUUID)());var a=(0,n.getCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID);this.userId=(0,o.isNotNullish)(a)&&!(0,r.isBlank)(a)?a:(0,s.generateUUID)();var u=(0,t.validateCookieDomainValue)(null==i?void 0:i.cookiesDomain),l=(0,t.validateCookieMaxAgeValue)(null==i?void 0:i.cookiesMaxAge),c=Date.now(),d=new Date(c+1e3*l).toUTCString();(0,n.setCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID,this.userId,{domain:u,expires:d,maxAge:l})};t.SessionPersistenceHandler=u;t.validateCookieDomainValue=function(e){if(!(0,o.isNullish)(e)&&(0,r.isValidString)(e)&&!(0,r.isBlank)(e))return encodeURIComponent(e)};t.validateCookieMaxAgeValue=function(e){return(0,o.isNullish)(e)?t.COOKIE_DEFAULT_MAX_AGE:(0,a.isNumber)(e)?e:t.COOKIE_DEFAULT_MAX_AGE}},4916:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceInfoFallbackService=void 0;var n=i(1820),a=i(5063),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,n.isBlank)(this.streamFormat)||(e.streamFormat=this.streamFormat)},e.prototype.applyAndStoreCodecInfo=function(e,t){(0,a.isNotNullish)(null==t?void 0:t.audioCodec)&&(this.audioCodec=t.audioCodec),(0,a.isNotNullish)(null==t?void 0:t.videoCodec)&&(this.videoCodec=t.videoCodec),(0,n.isBlank)(this.audioCodec)||(e.audioCodec=this.audioCodec),(0,n.isBlank)(this.videoCodec)||(e.videoCodec=this.videoCodec)},e}();t.SourceInfoFallbackService=r},6743:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,a=i(5063);!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 r=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((0,a.isNullish)(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((0,a.isNullish)(this.videoDuration))throw new Error("no video duration set for completion tracker");for(var e=0,t=0,i=this.watched;t<i.length;t++){var n=i[t];e+=this.getDuration(n)}return e/this.videoDuration},e.prototype.mergeWatched=function(e){for(var t=0;t<e.length;t++)for(var i=e[t],a=t+1;a<e.length;a++){var r=e[a],o=0,s=this.getOverlappingType(i,r);if(s===n.Overlapping?(this.mergeAndReplace(i,t,r,a),o=this.getOverlappingTimespan(i,r)):s===n.FirstContainedInSecond?(this.watched.splice(t,1),o=this.getDuration(i)):s===n.SecondContainedInFirst&&(this.watched.splice(a,1),o=this.getDuration(r)),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,i,n){var a=e.end>i.end?e.end:i.end,r={start:e.start<i.start?e.start:i.start,end:a};this.watched.splice(t,1,r),this.watched.splice(n,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=r},4300:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SsaiService=void 0;var a,r=i(3588),o=i(3458),s=i(5529),u=i(5063),l=i(2982),c=i(7906);!function(e){e[e.AD_BREAK_STARTED=0]="AD_BREAK_STARTED",e[e.ACTIVE=1]="ACTIVE",e[e.IDLE=2]="IDLE"}(a||(a={}));var d=function(){function e(){this.eventHandler=void 0,this.adIndex=-1,this.state=a.IDLE,this.isFirstSampleOfAd=!1,this.sentAdQuartiles=[],this.errorSent=!1}return e.prototype.activate=function(e){this.eventHandler=e},e.prototype.adBreakStart=function(e){p(this.eventHandler)&&this.state==a.IDLE&&(this.state=a.AD_BREAK_STARTED,this.currentAdMetadata=n({},e))},e.prototype.adStart=function(e){var t;if(p(this.eventHandler)&&this.state!=a.IDLE){var i=(new Date).getTime(),n=this.eventHandler.getPlayerCurrentTime();this.eventHandler.reportPlaybackInteraction(i,n),this.state=a.ACTIVE,this.isFirstSampleOfAd=!0,this.adIndex++,this.resetAdData(),this.currentAdMetadata={adPosition:null===(t=this.currentAdMetadata)||void 0===t?void 0:t.adPosition,adId:null==e?void 0:e.adId,adSystem:null==e?void 0:e.adSystem,customData:null==e?void 0:e.customData},this.currentAdImpressionId=(0,l.generateUUID)(),this.timestampOfAdStart=(0,c.getCurrentMonotonicTimestampInMs)(),this.eventHandler.reportEngagementInteraction({type:"started",adIndex:this.adIndex,currentAdImpressionId:this.currentAdImpressionId,currentAdMetadata:(0,u.isNotNullish)(this.currentAdMetadata)?this.currentAdMetadata:{}})}},e.prototype.adQuartileFinished=function(e,t){p(this.eventHandler)&&this.state==a.ACTIVE&&(this.sentAdQuartiles.includes(e)||(this.eventHandler.reportEngagementInteraction({type:"quartile",adIndex:this.adIndex,currentAdImpressionId:this.currentAdImpressionId,currentAdMetadata:(0,u.isNotNullish)(this.currentAdMetadata)?this.currentAdMetadata:{},quartile:e,quartileMetadata:t,timeSinceAdStartedInMs:(0,c.getMonotonicTimestampInMsSince)(this.timestampOfAdStart)}),this.sentAdQuartiles.push(e)))},e.prototype.adBreakEnd=function(){if(p(this.eventHandler)&&this.state!=a.IDLE){if(this.state==a.ACTIVE){var e=(new Date).getTime(),t=this.eventHandler.getPlayerCurrentTime();this.eventHandler.reportPlaybackInteraction(e,t)}this.resetAdBreakData()}},e.prototype.manipulate=function(e){var t,i,n,o;if(p(this.eventHandler)&&this.state==a.ACTIVE){e.ad=r.AD_TYPE.SSAI,e.adId=null===(t=this.currentAdMetadata)||void 0===t?void 0:t.adId,e.adSystem=null===(i=this.currentAdMetadata)||void 0===i?void 0:i.adSystem,e.adPosition=null===(n=this.currentAdMetadata)||void 0===n?void 0:n.adPosition,this.isFirstSampleOfAd&&(e.adIndex=this.adIndex,this.isFirstSampleOfAd=!1);var l=null===(o=this.currentAdMetadata)||void 0===o?void 0:o.customData;(0,u.isNotNullish)(l)&&s.customDataValuesKeys.forEach((function(t){l[t]&&(e[t]=l[t])})),e[c.SSAI_RELATED_SAMPLE_MARKER]=!0}},e.prototype.sendAdEngagementErrorSample=function(e,t){p(this.eventHandler)&&this.state===a.ACTIVE&&(this.errorSent||e.code!==o.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.code&&(this.eventHandler.reportEngagementInteraction({type:"error",adIndex:this.adIndex,currentAdImpressionId:this.currentAdImpressionId,currentAdMetadata:(0,u.isNotNullish)(this.currentAdMetadata)?this.currentAdMetadata:{},analyticsError:e,originalError:t,timeSinceAdStartedInMs:(0,c.getMonotonicTimestampInMsSince)(this.timestampOfAdStart)}),this.errorSent=!0))},e.prototype.isInActiveState=function(){return this.state===a.ACTIVE},e.prototype.resetSourceRelatedState=function(){this.resetAdBreakData(),this.adIndex=-1},e.prototype.resetAdBreakData=function(){this.state=a.IDLE,this.isFirstSampleOfAd=!1,delete this.currentAdMetadata,this.resetAdData()},e.prototype.resetAdData=function(){var e,t,i;null===(e=this.currentAdMetadata)||void 0===e||delete e.customData,null===(t=this.currentAdMetadata)||void 0===t||delete t.adId,null===(i=this.currentAdMetadata)||void 0===i||delete i.adSystem,this.errorSent=!1,this.currentAdImpressionId=void 0,this.sentAdQuartiles=[],this.timestampOfAdStart=void 0},e}();function p(e){return(0,u.isNotNullish)(e)}t.SsaiService=d},6398:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAdPosition=s,t.hasValidSsaiAdBreakMetadataStructure=function(e){if((0,o.isNullish)(e))return!0;if(!(0,o.isPlainObject)(e))return a.logger.errorMessageToUser("Invalid SsaiAdBreakMetadata: not a plain object"),!1;var t=e;if((0,o.isNotNullish)(t.adPosition)&&!s(t.adPosition))return a.logger.errorMessageToUser("Invalid SsaiAdBreakMetadata: 'adPosition' property is not valid"),!1;return!0},t.simplySanitizeSsaiAdBreakMetadata=function(e){if((0,o.isNullish)(e))return;return{adPosition:e.adPosition}},t.hasValidSsaiAdMetadataStructure=function(e){if((0,o.isNullish)(e))return!0;if(!(0,o.isPlainObject)(e))return a.logger.errorMessageToUser("Invalid SsaiAdMetadata: not a plain object"),!1;var t=e;if((0,o.isNotNullish)(t.adId)&&!(0,r.isValidString)(t.adId))return a.logger.errorMessageToUser("Invalid SsaiAdMetadata: 'adId' property is not string"),!1;if((0,o.isNotNullish)(t.adSystem)&&!(0,r.isValidString)(t.adSystem))return a.logger.errorMessageToUser("Invalid SsaiAdMetadata: 'adSystem' property is not string"),!1;if((0,o.isNotNullish)(t.customData)&&!(0,o.isPlainObject)(t.customData))return a.logger.errorMessageToUser("Invalid SsaiAdMetadata: 'customData' property is not a plain object"),!1;return!0},t.simplySanitizeSsaiAdMetadata=function(e){if((0,o.isNullish)(e))return;var t=void 0;(0,o.isNotNullish)(e.customData)&&(t=(0,n.sanitizeCustomDataValues)(e.customData));return{adId:e.adId,adSystem:e.adSystem,customData:t}},t.isSsaiAdQuartile=u,t.hasValidSsaiAdQuartileStructure=function(e){if(!u(e))return a.logger.errorMessageToUser("Invalid SsaiAdQuartile"),!1;return!0},t.sanitizeSsaiAdQuartileMetadata=function(e){if((0,o.isNullish)(e))return{};if(!(0,o.isPlainObject)(e))return a.logger.errorMessageToUser("Invalid SsaiAdQuartileMetadata: not a plain object"),{};var t={failedBeaconUrl:e.failedBeaconUrl};(0,r.isValidString)(t.failedBeaconUrl)?t.failedBeaconUrl=t.failedBeaconUrl.substring(0,500):(a.logger.errorMessageToUser("Invalid SsaiAdQuartileMetadata: 'failedBeaconUrl' property is not string"),t.failedBeaconUrl=void 0);return t};var n=i(5529),a=i(1916),r=i(1820),o=i(5063);function s(e){return"preroll"===e||"midroll"===e||"postroll"===e}function u(e){return"first"===e||"midpoint"===e||"third"===e||"completed"===e}},8918:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSsaiEngagementErrorData=function(e){return"error"===e.type},t.isSsaiEngagementQuartileData=function(e){return"quartile"===e.type},t.isSsaiEngagementStartedData=function(e){return"started"===e.type}},7906:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ROUTING_URL_PARAM_VALUE_SSAI=t.ROUTING_URL_PARAM=t.SSAI_RELATED_SAMPLE_MARKER=void 0,t.isSsaiRelatedSample=function(e){if(e[t.SSAI_RELATED_SAMPLE_MARKER])return delete e[t.SSAI_RELATED_SAMPLE_MARKER],!0;if(2===e.adType)return!0;return!1},t.appendSsaiRoutingParam=function(e){return"".concat(e,"?").concat(t.ROUTING_URL_PARAM,"=").concat(t.ROUTING_URL_PARAM_VALUE_SSAI)},t.createErrorAdSample=function(e,t){return s({playbackSample:e,currentAdImpressionId:t.currentAdImpressionId,adIndex:t.adIndex,currentAdMetadata:t.currentAdMetadata,quartile:void 0,quartileMetadata:void 0,errorCode:t.analyticsError.code,errorMessage:t.analyticsError.message,errorSeverity:t.analyticsError.severity,timeSinceAdStartedInMs:t.timeSinceAdStartedInMs})},t.createStartedAdSample=function(e,t){return s({playbackSample:e,currentAdImpressionId:t.currentAdImpressionId,adIndex:t.adIndex,currentAdMetadata:t.currentAdMetadata,quartile:"started",quartileMetadata:void 0,errorCode:void 0,errorMessage:void 0,errorSeverity:void 0,timeSinceAdStartedInMs:void 0})},t.createQuartileAdSample=function(e,t){return s({playbackSample:e,currentAdImpressionId:t.currentAdImpressionId,adIndex:t.adIndex,currentAdMetadata:t.currentAdMetadata,quartile:t.quartile,quartileMetadata:t.quartileMetadata,timeSinceAdStartedInMs:t.timeSinceAdStartedInMs,errorCode:void 0,errorMessage:void 0,errorSeverity:void 0})},t.getCurrentMonotonicTimestampInMs=u,t.getMonotonicTimestampInMsSince=function(e){if((0,o.isNullish)(e))return;return u()-e};var a=i(5529),r=i(9422),o=i(5063);function s(e){var t,i=e.playbackSample,r=e.currentAdImpressionId,s=e.adIndex,u=e.currentAdMetadata,l=e.quartile,c=e.quartileMetadata,d=e.errorCode,p=e.errorMessage,h=e.errorSeverity,m=e.timeSinceAdStartedInMs,f=n(n({},{audioBitrate:null==(t=i)?void 0:t.audioBitrate,analyticsVersion:null==t?void 0:t.analyticsVersion,adPlaybackHeight:null==t?void 0:t.videoPlaybackHeight,adPlaybackWidth:null==t?void 0:t.videoPlaybackWidth,cdnProvider:null==t?void 0:t.cdnProvider,customData1:null==t?void 0:t.customData1,customData2:null==t?void 0:t.customData2,customData3:null==t?void 0:t.customData3,customData4:null==t?void 0:t.customData4,customData5:null==t?void 0:t.customData5,customData6:null==t?void 0:t.customData6,customData7:null==t?void 0:t.customData7,customData8:null==t?void 0:t.customData8,customData9:null==t?void 0:t.customData9,customData10:null==t?void 0:t.customData10,customData11:null==t?void 0:t.customData11,customData12:null==t?void 0:t.customData12,customData13:null==t?void 0:t.customData13,customData14:null==t?void 0:t.customData14,customData15:null==t?void 0:t.customData15,customData16:null==t?void 0:t.customData16,customData17:null==t?void 0:t.customData17,customData18:null==t?void 0:t.customData18,customData19:null==t?void 0:t.customData19,customData20:null==t?void 0:t.customData20,customData21:null==t?void 0:t.customData21,customData22:null==t?void 0:t.customData22,customData23:null==t?void 0:t.customData23,customData24:null==t?void 0:t.customData24,customData25:null==t?void 0:t.customData25,customData26:null==t?void 0:t.customData26,customData27:null==t?void 0:t.customData27,customData28:null==t?void 0:t.customData28,customData29:null==t?void 0:t.customData29,customData30:null==t?void 0:t.customData30,customData31:null==t?void 0:t.customData31,customData32:null==t?void 0:t.customData32,customData33:null==t?void 0:t.customData33,customData34:null==t?void 0:t.customData34,customData35:null==t?void 0:t.customData35,customData36:null==t?void 0:t.customData36,customData37:null==t?void 0:t.customData37,customData38:null==t?void 0:t.customData38,customData39:null==t?void 0:t.customData39,customData40:null==t?void 0:t.customData40,customData41:null==t?void 0:t.customData41,customData42:null==t?void 0:t.customData42,customData43:null==t?void 0:t.customData43,customData44:null==t?void 0:t.customData44,customData45:null==t?void 0:t.customData45,customData46:null==t?void 0:t.customData46,customData47:null==t?void 0:t.customData47,customData48:null==t?void 0:t.customData48,customData49:null==t?void 0:t.customData49,customData50:null==t?void 0:t.customData50,customData51:null==t?void 0:t.customData51,customData52:null==t?void 0:t.customData52,customData53:null==t?void 0:t.customData53,customData54:null==t?void 0:t.customData54,customData55:null==t?void 0:t.customData55,customData56:null==t?void 0:t.customData56,customData57:null==t?void 0:t.customData57,customData58:null==t?void 0:t.customData58,customData59:null==t?void 0:t.customData59,customData60:null==t?void 0:t.customData60,customData61:null==t?void 0:t.customData61,customData62:null==t?void 0:t.customData62,customData63:null==t?void 0:t.customData63,customData64:null==t?void 0:t.customData64,customData65:null==t?void 0:t.customData65,customData66:null==t?void 0:t.customData66,customData67:null==t?void 0:t.customData67,customData68:null==t?void 0:t.customData68,customData69:null==t?void 0:t.customData69,customData70:null==t?void 0:t.customData70,customData71:null==t?void 0:t.customData71,customData72:null==t?void 0:t.customData72,customData73:null==t?void 0:t.customData73,customData74:null==t?void 0:t.customData74,customData75:null==t?void 0:t.customData75,customData76:null==t?void 0:t.customData76,customData77:null==t?void 0:t.customData77,customData78:null==t?void 0:t.customData78,customData79:null==t?void 0:t.customData79,customData80:null==t?void 0:t.customData80,customData81:null==t?void 0:t.customData81,customData82:null==t?void 0:t.customData82,customData83:null==t?void 0:t.customData83,customData84:null==t?void 0:t.customData84,customData85:null==t?void 0:t.customData85,customData86:null==t?void 0:t.customData86,customData87:null==t?void 0:t.customData87,customData88:null==t?void 0:t.customData88,customData89:null==t?void 0:t.customData89,customData90:null==t?void 0:t.customData90,customData91:null==t?void 0:t.customData91,customData92:null==t?void 0:t.customData92,customData93:null==t?void 0:t.customData93,customData94:null==t?void 0:t.customData94,customData95:null==t?void 0:t.customData95,customData96:null==t?void 0:t.customData96,customData97:null==t?void 0:t.customData97,customData98:null==t?void 0:t.customData98,customData99:null==t?void 0:t.customData99,customData100:null==t?void 0:t.customData100,customUserId:null==t?void 0:t.customUserId,domain:null==t?void 0:t.domain,experimentName:null==t?void 0:t.experimentName,key:null==t?void 0:t.key,language:null==t?void 0:t.language,path:null==t?void 0:t.path,platform:null==t?void 0:t.platform,player:null==t?void 0:t.player,playerKey:null==t?void 0:t.playerKey,playerTech:null==t?void 0:t.playerTech,size:null==t?void 0:t.size,screenHeight:null==t?void 0:t.screenHeight,screenWidth:null==t?void 0:t.screenWidth,streamFormat:null==t?void 0:t.streamFormat,userAgent:null==t?void 0:t.userAgent,userId:null==t?void 0:t.userId,version:null==t?void 0:t.version,videoBitrate:null==t?void 0:t.videoBitrate,videoId:null==t?void 0:t.videoId,videoImpressionId:null==t?void 0:t.impressionId,videoTitle:null==t?void 0:t.videoTitle,videoWindowHeight:null==t?void 0:t.videoWindowHeight,videoWindowWidth:null==t?void 0:t.videoWindowWidth}),{adId:null==u?void 0:u.adId,adImpressionId:r,adIndex:s,adPosition:null==u?void 0:u.adPosition,adSystem:null==u?void 0:u.adSystem,adType:2,errorCode:d,errorMessage:p,errorSeverity:h,time:Date.now(),timeSinceAdStartedInMs:m});switch(l){case"started":f.started=1;break;case"first":f.quartile1=1,f.quartile1FailedBeaconUrl=null==c?void 0:c.failedBeaconUrl;break;case"midpoint":f.midpoint=1,f.midpointFailedBeaconUrl=null==c?void 0:c.failedBeaconUrl;break;case"third":f.quartile3=1,f.quartile3FailedBeaconUrl=null==c?void 0:c.failedBeaconUrl;break;case"completed":f.completed=1,f.completedFailedBeaconUrl=null==c?void 0:c.failedBeaconUrl}var v=null==u?void 0:u.customData;return(0,o.isNotNullish)(v)&&a.customDataValuesKeys.forEach((function(e){v[e]&&(f[e]=v[e])})),f}function u(){var e=(0,r.getGlobalPerformanceNow)();return(0,o.isNullish)(e)?Date.now():Math.floor(e)}t.SSAI_RELATED_SAMPLE_MARKER="triggeredBySsai",t.ROUTING_URL_PARAM="routingParam",t.ROUTING_URL_PARAM_VALUE_SSAI="ssai"},3588:function(e,t){"use strict";var i;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"}(i||(t.AD_TYPE=i={}))},4355:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.CdnProvider=void 0,function(e){e.AKAMAI="akamai",e.BITGRAVITY="bitgravity",e.CHINACACHE="chinacache",e.CLOUDFLARE="cloudflare",e.CLOUDFRONT="cloudfront",e.FASTLY="fastly",e.MAXCDN="maxcdn"}(i||(t.CdnProvider=i={}))},5878:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.CastTech=void 0,function(e){e.AirPlay="AirPlay",e.GoogleCast="GoogleCast",e.WebSocket="WebSocket"}(i||(t.CastTech=i={}))},3458:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0;var i=function(){function e(e,t,i){void 0===i&&(i="CRITICAL"),this.code=e,this.message=t,this.errorSeverity=i}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","INFO"),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=i},2361:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Event=t.JSM_INITIAL_EVENT=void 0,t.JSM_INITIAL_EVENT="jsm-initial",function(e){e.AUDIO_CHANGE="audioChange",e.AUDIOTRACK_CHANGED="audioTrackChanged",e.CUSTOM_DATA_CHANGE="customDataChange",e.END="end",e.END_AD="adEnd",e.END_BUFFERING="endBuffering",e.END_CAST="endCasting",e.END_FULLSCREEN="endFullscreen",e.ERROR="playerError",e.FINISH_QUALITY_CHANGE="finishQualityChange",e.LOADSTART_AUTOPLAY="loadstartAutoplay",e.MANUAL_SOURCE_CHANGE="manualSourceChangeInitiated",e.MUTE="mute",e.PAUSE="pause",e.PLAY="play",e.PLAYING="playing",e.READY="ready",e.SCREEN_RESIZE="resize",e.SEEK="seek",e.SEEKED="seeked",e.SOURCE_LOADED="sourceLoaded",e.SOURCE_UNLOADED="sourceUnloaded",e.START_AD="adStart",e.START_BUFFERING="startBuffering",e.START_CAST="startCasting",e.START_FULLSCREEN="startFullscreen",e.SUBTITLE_CHANGE="subtitleChange",e.TIMECHANGED="timechanged",e.UN_MUTE="unMute",e.UNLOAD="unload",e.VIDEO_CHANGE="videoChange",e.VIDEOSTART_TIMEOUT="VIDEOSTART_TIMEOUT"}(i||(t.Event=i={}))},2168:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MIMETypes=void 0,t.getMIMETypeFromFileExtension=function(e){var i=e.split(/[?#]/)[0].toLowerCase();if((0,n.endsWith)(i,".m3u8"))return t.MIMETypes.HLS;if((0,n.endsWith)(i,".mp4")||(0,n.endsWith)(i,".m4v")||(0,n.endsWith)(i,".m4a"))return t.MIMETypes.MP4;if((0,n.endsWith)(i,".webm"))return t.MIMETypes.WEBM;if((0,n.endsWith)(i,".mpd"))return t.MIMETypes.DASH;return};var n=i(1820);t.MIMETypes={MP4:"video/mp4",WEBM:"video/webm",HLS:"application/x-mpegURL",DASH:"application/dash+xml"}},9946:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PAGE_LOAD_TYPE=void 0,function(e){e[e.FOREGROUND=1]="FOREGROUND",e[e.BACKGROUND=2]="BACKGROUND"}(i||(t.PAGE_LOAD_TYPE=i={}))},556:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Player=void 0,function(e){e.BITMOVIN="bitmovin",e.BITMOVIN_PWX="bitmovin-pwx",e.CHROMECAST_SHAKA="chromecast-shaka",e.HLSJS="hlsjs",e.HTML5="html5",e.JW="jw",e.RADIANT="radiant",e.SHAKA="shaka",e.THEOPLAYER="theoplayer",e.VIDEOJS="videojs"}(i||(t.Player=i={}))},8525:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerSize=void 0,function(e){e.Fullscreen="FULLSCREEN",e.Window="WINDOW"}(i||(t.PlayerSize=i={}))},7224:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTypes=void 0,t.getStreamTypesFromURL=function(e){if((0,r.isNullish)(e)||(0,a.isBlank)(e))return;var t=e.split(/[?#]/)[0].toLowerCase();if((0,a.endsWith)(t,".m3u8"))return n.hls;if((0,a.endsWith)(t,".mp4")||(0,a.endsWith)(t,".m4v")||(0,a.endsWith)(t,".m4a"))return n.prog;if((0,a.endsWith)(t,".webm"))return n.prog;if((0,a.endsWith)(t,".mpd"))return n.dash;return},t.getStreamTypeFromMIMEType=function(e){var t;return((t={})[o.MIMETypes.MP4]=n.prog,t[o.MIMETypes.WEBM]=n.prog,t[o.MIMETypes.HLS]=n.hls,t[o.MIMETypes.DASH]=n.dash,t)[e]};var n,a=i(1820),r=i(5063),o=i(2168);!function(e){e.dash="dash",e.hls="hls",e.prog="progressive"}(n||(t.StreamTypes=n={}))},3565:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStartFailedReason=void 0,t.createVideoStartFailedReason=function(e){switch(e){case a.Event.ERROR:return n.PLAYER_ERROR;case a.Event.UNLOAD:case a.Event.MANUAL_SOURCE_CHANGE:case a.Event.SOURCE_UNLOADED:return n.PAGE_CLOSED;case a.Event.VIDEOSTART_TIMEOUT:return n.TIMEOUT;default:return n.UNKNOWN}};var n,a=i(2361);!function(e){e.PAGE_CLOSED="PAGE_CLOSED",e.PLAYER_ERROR="PLAYER_ERROR",e.TIMEOUT="TIMEOUT",e.UNKNOWN="UNKNOWN"}(n||(t.VideoStartFailedReason=n={}))},348:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Feature=void 0;var n=i(5063),a=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(0,n.isNotNullish)(t)&&(this._config=this.extractConfig(t)),this.configured(e,this._config),this._config},e}();t.Feature=a},6845:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureManager=void 0;var n=i(1916),a=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(i){var a=i.configure(e,t);return!(!e||!0!==(null==a?void 0:a.enabled))||(n.logger.log("Disabling feature ".concat(i.constructor.name," as it isn't enabled according to license callback.")),i.disable(),!1)})),this.features.forEach((function(e){return e.enabled()}))},e}();t.FeatureManager=a},7614:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,a=0,r=t.length;a<r;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailBackend=void 0;var r=i(92),o=i(4649),s=i(5063),u=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,i){var a,r,o=this;return n(n({},e),{message:null===(a=e.message)||void 0===a?void 0:a.substr(0,t),data:this.copyErrorDataTruncateStrings(e.data,t),httpRequests:null===(r=e.httpRequests)||void 0===r?void 0:r.map((function(e){return o.copyHttpRequestTruncateUrls(e,i)}))})},e.copyHttpRequestTruncateUrls=function(e,t){var i,a;return n(n({},e),{url:null===(i=e.url)||void 0===i?void 0:i.substr(0,t),lastRedirectLocation:null===(a=e.lastRedirectLocation)||void 0===a?void 0:a.substr(0,t)})},e.copyErrorDataTruncateStrings=function(e,t){var i,a;return n(n({},e),{exceptionMessage:null===(i=e.exceptionMessage)||void 0===i?void 0:i.substr(0,t),additionalData:null===(a=e.additionalData)||void 0===a?void 0:a.substr(0,t)})},e.copyErrorDetailTruncateHttpRequests=function(e,t){var i;return n(n({},e),{httpRequests:null===(i=e.httpRequests)||void 0===i?void 0:i.slice(-t)})},e.prototype.limitHttpRequestsOfQueuedErrorDetails=function(t){var i=this;this._queue.forEach((function(n,a){i._queue[a]=e.copyErrorDetailTruncateHttpRequests(n,t)}))},e.prototype.send=function(t){var i=e.copyErrorDetailTruncateStringsAndUrls(t,e.MAX_STRING_LENGTH,e.MAX_URL_LENGTH);this.enabled?(0,r.post)(this.backendUrl,i,(function(){})):this._queue.push(i)},e.prototype.flush=function(){for(var e=a([],this._queue,!0),t=e.shift();(0,s.isNotNullish)(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=2e3,e}();t.ErrorDetailBackend=u},9557:function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(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 i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,a=0,r=t.length;a<r;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailTracking=void 0;var o=i(1916),s=i(5063),u=i(4926),l=function(e){function t(t,i,n,a){var l=e.call(this)||this;return l.settingsProvider=t,l.backend=i,l.subscribables=n,l.httpRequestTracking=a,l.errorIndex=0,l.onErrorHandler=function(e){var t,i;try{if(!l.isEnabled)return;var n=null===(t=l.httpRequestTracking)||void 0===t?void 0:t.httpRequests,a=(0,s.isNullish)(n)?void 0:r([],n,!0),c=l.errorIndex;l.errorIndex++;var d={platform:"web",licenseKey:l.settingsProvider.licenseKey,domain:l.settingsProvider.domain,impressionId:l.settingsProvider.impressionId,analyticsVersion:u.VERSION,errorId:c,timestamp:(0,s.getCurrentTimestamp)(),code:e.code,message:e.message,data:null!==(i=e.errorData)&&void 0!==i?i:{additionalData:void 0,exceptionMessage:void 0,exceptionStacktrace:void 0},httpRequests:a,severity:e.severity};o.logger.log("ErrorDetailTracking.onError: ".concat((0,s.tryJSONStringify)(d))),l.backend.send(d)}catch(e){o.logger.error("ErrorDetailTracking.onError: Error in handler",e)}},n.forEach((function(e){return e.subscribe(l.onErrorHandler)})),l}return a(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 i,n,a=Math.max(null!==(i=null==t?void 0:t.numberOfHttpRequests)&&void 0!==i?i:0,0);null===(n=this.httpRequestTracking)||void 0===n||n.configure(a),this.backend.limitHttpRequestsOfQueuedErrorDetails(a)},t.prototype.extractConfig=function(e){return e.errorDetails},t}(i(348).Feature);t.ErrorDetailTracking=l},7881:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestTracking=void 0;var n=i(1916),a=i(3129),r=function(){function e(t){var i=this;this.subscribables=t,this._maxRequests=e.DEFAULT_MAX_REQUESTS,this._httpRequestQueue=new a.Queue,this.onDownloadFinishedHandler=function(e){try{i.addRequest(e.httpRequest)}catch(e){n.logger.error("HttpRequestTracking.onDownloadFinished: Error in handler",e)}},t.forEach((function(e){return e.subscribe(i.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=r},7912:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestType=void 0,function(e){e.MANIFEST_DASH="manifest/dash",e.MANIFEST_HLS_MASTER="manifest/hls/master",e.MANIFEST_HLS_VARIANT="manifest/hls/variant",e.MANIFEST_SMOOTH="manifest/smooth",e.MANIFEST_ADS="manifest/ads",e.MEDIA_AUDIO="media/audio",e.MEDIA_VIDEO="media/video",e.MEDIA_SUBTITLES="media/subtitles",e.MEDIA_THUMBNAILS="media/thumbnails",e.MEDIA_SEGMENTINDEX="media/segmentindex",e.DRM_LICENSE_WIDEVINE="drm/license/widevine",e.DRM_LICENSE_PLAYREADY="drm/license/playready",e.DRM_LICENSE_FAIRPLAY="drm/license/fairplay",e.DRM_LICENSE_PRIMETIME="drm/license/primetime",e.DRM_LICENSE_CLEARKEY="drm/license/clearkey",e.DRM_LICENSE_TVKEY="drm/license/tvkey",e.DRM_CERTIFICATE_FAIRPLAY="drm/certificate/fairplay",e.HLS_INTERSTITIALS_ASSET_LIST="hls/interstitials/asset-list",e.KEY_HLS_AES="key/hls/aes",e.TIME_SYNC="time/sync",e.WEBRTC_SDP_REQUEST="webrtc/sdp/request",e.WEBRTC_SDP_ANSWER="webrtc/sdp/answer",e.WEBRTC_SDP_OFFER="webrtc/sdp/offer",e.UNKNOWN="unknown",e.INTERNAL="internal"}(i||(t.HttpRequestType=i={}))},5529:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeCustomDataValues=t.extractCustomDataFieldsOnly=t.customDataFieldCount=t.customDataValuesKeys=void 0;var n=i(5063);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","customData31","customData32","customData33","customData34","customData35","customData36","customData37","customData38","customData39","customData40","customData41","customData42","customData43","customData44","customData45","customData46","customData47","customData48","customData49","customData50","customData51","customData52","customData53","customData54","customData55","customData56","customData57","customData58","customData59","customData60","customData61","customData62","customData63","customData64","customData65","customData66","customData67","customData68","customData69","customData70","customData71","customData72","customData73","customData74","customData75","customData76","customData77","customData78","customData79","customData80","customData81","customData82","customData83","customData84","customData85","customData86","customData87","customData88","customData89","customData90","customData91","customData92","customData93","customData94","customData95","customData96","customData97","customData98","customData99","customData100","experimentName"],t.customDataFieldCount=t.customDataValuesKeys.filter((function(e){return e.match("customData\\d+")})).length;t.extractCustomDataFieldsOnly=function(e){var i={};return t.customDataValuesKeys.forEach((function(t){e[t]&&(i[t]=e[t])})),i};t.sanitizeCustomDataValues=function(e){var i=(0,t.extractCustomDataFieldsOnly)(e),a={};return(0,n.transferCustomDataFields)(i,a),a.experimentName=(0,n.getCustomDataString)(i.experimentName),a}},4501:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.LicensingResult=void 0,function(e){e.Denied="denied",e.Granted="granted",e.Skip="skip"}(i||(t.LicensingResult=i={}))},3413:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVideoDuration=function(e){if((0,a.isNullish)(e)||Number.isNaN(e)||e===1/0)return 0;return e},t.buildPlaybackInfoStreamTypeFields=function(e,t){var i={streamFormat:null!=e?e:void 0,progUrl:t};if((0,a.isNullish)(e))return i;if(e===n.StreamTypes.dash)return{streamFormat:e,mpdUrl:t};if(e===n.StreamTypes.hls)return{streamFormat:e,m3u8Url:t};if(e===n.StreamTypes.prog)return{streamFormat:e,progUrl:t};return i};var n=i(7224),a=i(5063)},4820:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStateMachineCallbacks=void 0,t.defaultStateMachineCallbacks={setup:function(){},startup:function(){},programChange:function(){},updateSourceMetadata:function(){},playing:function(){},heartbeat:function(){},qualitychange:function(){},updateSampleQualityInfo:function(){},audiotrack_changing:function(){},pause:function(){},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(){}}},5426:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsCall=void 0;var n=i(7906),a=i(5923),r=i(92),o=i(5063),s=function(){function e(e){this.analyticsServerUrl=(0,o.joinUrls)(e,"analytics"),this.adAnalyticsServerUrl=(0,o.joinUrls)(e,"analytics/a")}return e.prototype.sendRequest=function(e,t){var i=this.analyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(i=(0,n.appendSsaiRoutingParam)(i)),(0,r.post)(i,e,t)},e.prototype.sendUnloadRequest=function(e){var t=this,i=this.analyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(i=(0,n.appendSsaiRoutingParam)(i)),this.trySendBeacon((function(e){return t.sendRequestSynchronous(e,o.noOp)}),i,e)},e.prototype.trySendBeacon=function(e,t,i,n){var r;if(void 0===n&&(n={}),void 0===(null===(r=a.globalScope.navigator)||void 0===r?void 0:r.sendBeacon))e(i);else{var o=new Blob([JSON.stringify(i)],n);a.globalScope.navigator.sendBeacon(t,o)||e(i)}},e.prototype.sendRequestSynchronous=function(e,t){var i=this.analyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(i=(0,n.appendSsaiRoutingParam)(i)),(0,r.post)(i,e,t,!1)},e.prototype.sendAdRequest=function(e){var t=this.adAnalyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(t=(0,n.appendSsaiRoutingParam)(t));this.trySendBeacon((function(e){return(0,r.post)(t,e,o.noOp)}),t,e)},e}();t.AnalyticsCall=s},5248:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceInfoFromBitmovinSourceConfig=void 0;var n=i(5063);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 i=t.getPlaybackVideoData(),a=0;return(0,n.isNotNullish)(i)&&!isNaN(+i.id)&&(a=+i.id),{progBitrate:e[a].bitrate||0,progUrl:e[a].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,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodecHelper=void 0;var n=i(5923),a=i(5063),r={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"']},o=function(){function e(){}return Object.defineProperty(e,"supportedVideoFormats",{get:function(){var e;if(!(0,a.isNullish)(null===(e=n.globalScope.MediaSource)||void 0===e?void 0:e.isTypeSupported)&&(0,a.isFunction)(n.globalScope.MediaSource.isTypeSupported))return Object.getOwnPropertyNames(r).filter((function(e){return r[e].some((function(e){return n.globalScope.MediaSource.isTypeSupported(e)}))}))},enumerable:!1,configurable:!0}),e}();t.CodecHelper=o},5766:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;var i=function(){function e(){}return e.bytesToBits=function(e){return 8*e},e.bitsToBytes=function(e){return Math.round(e/8)},e.kiloBitsToBits=function(e){return 1e3*e},e}();t.Converter=i},1652:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDebugging=void 0;var i=function(e,t,i,n,a){this.event=e,this.from=t,this.to=i,this.timestamp=n,this.eventObject=a};t.EventDebugging=i},92:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.post=function(e,t,i,o){void 0===o&&(o=!0);(0,r.isReactNative)()&&!o&&(o=!0);var s,u=!1;n.globalScope.XDomainRequest?(s=new n.globalScope.XDomainRequest,u=!0):s=new XMLHttpRequest;var l=function(){if(s.readyState==XMLHttpRequest.DONE){if(s.responseText<=0)return;var e=JSON.parse(s.responseText);i(e)}};u?s.onload=l:s.onreadystatechange=l;try{s.open("POST",e,o),u||s.setRequestHeader("Content-Type","text/plain"),s.send(JSON.stringify(t))}catch(e){a.logger.error("Failed to send POST request.",e)}};var n=i(5923),a=i(1916),r=i(5063)},5253:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCall=function(e,t,i,r){var o=(0,a.joinUrls)(r,"/licensing"),s={analyticsVersion:i,domain:t,key:e};return new Promise((function(e){(0,n.post)(o,s,(function(t){e(t)}))}))};var n=i(92),a=i(5063)},1916:function(e,t){"use strict";var i=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,a=0,r=t.length;a<r;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.padRight=void 0;var n=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=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];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=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.enabled&&console.warn(e,t)},e.prototype.error=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.enabled&&console.error(e,t)},e.prototype.errorMessageToUser=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.error.apply(console,i([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=n.getInstance()},3129:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Queue=void 0;var i=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=i},4649:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SEQUENCE_NUMBER_LIMIT=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,t.SEQUENCE_NUMBER_LIMIT=1e3},5063:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryJSONStringify=t.isAudioMuted=t.isReactNative=t.joinUrls=t.getURLResourceName=t.calculatePercentage=t.transferCustomDataFields=t.getCustomDataString=t.noOp=t.getCurrentTimestamp=t.calculateTimeWithUndefined=t.calculateTime=t.removeTrailingSlash=t.isFunction=t.isPlainObject=t.isObject=t.toBoolean=t.isBoolean=t.isNotNullish=t.isNullish=void 0,t.isErrorSeverity=function(e){return"CRITICAL"===e||"INFO"===e},t.getPageLoadType=function(){if((0,r.isDocumentHidden)())return n.PAGE_LOAD_TYPE.BACKGROUND;return n.PAGE_LOAD_TYPE.FOREGROUND},t.isArrayBuffer=function(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)};var n=i(9946),a=i(5529),r=i(3848),o=i(9422),s=i(1820);t.isNullish=function(e){return null==e};t.isNotNullish=function(e){return!(0,t.isNullish)(e)};t.isBoolean=function(e){return!(0,t.isNullish)(e)&&"boolean"==typeof e};t.toBoolean=function(e){return Boolean(e).valueOf()};t.isObject=function(e){return(0,t.isNotNullish)(e)&&"object"==typeof e};t.isPlainObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)};t.isFunction=function(e){return"function"==typeof e};t.removeTrailingSlash=function(e){return e.replace(/\/$/g,"")};t.calculateTime=function(e){return Math.round(1e3*e)};t.calculateTimeWithUndefined=function(e){if(!(0,t.isNullish)(e))return(0,t.calculateTime)(e)};t.getCurrentTimestamp=function(){return Date.now()};t.noOp=function(){};t.getCustomDataString=function(e){return"object"==typeof e?(0,t.tryJSONStringify)(e):(0,t.isFunction)(e)?(0,t.getCustomDataString)(e()):void 0===e?e:"string"!=typeof e?String(e):e};t.transferCustomDataFields=function(e,i){for(var n=1;n<=a.customDataFieldCount;n++){var r="customData".concat(n);i[r]=(0,t.getCustomDataString)(e[r])}};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,s.endsWith)(e,"/")&&void 0!==t?e.substr(0,e.length-1):e)+"/"+((0,s.startsWith)(t,"/")?t.substr(1):t)}))};t.isReactNative=function(){return"ReactNative"===(0,o.getGlobalNavigatorProduct)()};t.isAudioMuted=function(e,t){return e||t<.01};t.tryJSONStringify=function(e){if(!(0,t.isNullish)(e))try{return JSON.stringify(e)}catch(e){return}}},4926:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="v2.53.1"},3612:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewportTracker=void 0;var n=i(3848),a=i(5923),r=i(1916),o=i(1820),s=i(5063),u=function(){function e(e,t,i){void 0===i&&(i=1);var a=this;this.inViewport=void 0,this.threshold=i,this.onIntersectionChanged=t,this.element=e;try{var o={root:null,rootMargin:"0px",threshold:i};this.observer=new IntersectionObserver((function(e,t){return a.handleIntersect(e,t)}),o),this.observer.observe(e)}catch(e){r.logger.log("Couldn't create instance of IntersectionObserver. timeInViewport will always be reported as 100%.")}this.hiddenPropertyName=(0,n.getDocumentPropertyWithPrefix)("hidden"),this.hiddenPropertyName&&(this.visibilityChange=this.hiddenPropertyName.replace("hidden","")+"visibilitychange",(0,n.addDocumentEventListener)(this.visibilityChange,this.handleVisibilityChange=this.handleVisibilityChange.bind(this),!1))}return e.prototype.isHidden=function(){return!((0,s.isNullish)(a.globalScope.document)||!(0,o.isValidString)(this.hiddenPropertyName))&&!0===a.globalScope.document[this.hiddenPropertyName]},e.prototype.isInViewport=function(){return!this.isHidden()&&(!!(0,s.isNullish)(this.inViewport)||this.inViewport)},e.prototype.dispose=function(){this.observer&&(this.observer.unobserve(this.element),this.observer.disconnect()),this.visibilityChange&&(0,n.removeDocumentEventListener)(this.visibilityChange,this.handleVisibilityChange,!1)},e.prototype.handleVisibilityChange=function(){this.onIntersectionChanged()},e.prototype.handleIntersect=function(e,t){var i=this;e.forEach((function(e){e.target===i.element&&(i.inViewport=!(e.intersectionRatio<i.threshold))})),this.onIntersectionChanged()},e}();t.ViewportTracker=u},8421:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWebOSTVModelName=function(){try{var e=(0,n.getGlobalWebOSApi)(),t=e.webOSSystem,i=e.PalmSystem,r=(null==t?void 0:t.deviceInfo)?JSON.parse(t.deviceInfo):(null==i?void 0:i.deviceInfo)&&JSON.parse(i.deviceInfo);return(0,a.isValidString)(null==r?void 0:r.modelName)&&!(0,a.isBlank)(null==r?void 0:r.modelName)?r.modelName:void 0}catch(e){return}};var n=i(9422),a=i(1820)},2376:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowEventTracker=void 0;var n=i(9422),a=function(){function e(){this.trackedObjects=[]}return e.prototype.addEventListener=function(e,t){this.trackedObjects.push({eventName:e,func:t}),(0,n.addGlobalEventListener)(e,t)},e.prototype.release=function(){for(;0!==this.trackedObjects.length;){var e=this.trackedObjects.pop();void 0!==e&&(0,n.removeGlobalEventListener)(e.eventName,e.func)}},e}();t.WindowEventTracker=a},8331:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeAnalyticsConfig=function(e){if((0,l.isNullish)(e))return{};u.isBoolean(e.isLive)||(e.isLive=void 0);(0,l.isNotNullish)(e.config)&&(0,l.isNotNullish)(e.config.errorTransformerCallback)&&((0,l.isFunction)(e.config.errorTransformerCallback.transform)||(e.config.errorTransformerCallback=void 0));return e},t.guardConfigChangeAgainstMissingTitle=function(e,t){if((0,l.isNullish)(e)||(0,l.isNullish)(t))return;e.title&&(0,s.isBlank)(t.title)&&o.logger.error("The new analytics configuration does not contain the field `title`")},t.guardConfigChangeAgainstMissingIsLive=function(e,t){if((0,l.isNullish)(e)||(0,l.isNullish)(t))return;e.isLive&&(0,l.isNullish)(t.isLive)&&o.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.")},t.guardAgainstDuplicatedUserId=function(e){if((0,l.isNullish)(e))return;(0,l.isNotNullish)(e.customUserId)&&(0,l.isNotNullish)(e.userId)&&o.logger.warn("Configuration Warning: \nCustomUserId and UserId are set in the config \nValue of UserId will be used in sample \nPlease only use one configuration field to set your userId")},t.getDeviceInformationFromAnalyticsConfig=function(e){if((0,l.isNullish)(e))return;var t={};(0,s.isValidString)(e.deviceType)&&!(0,s.isBlank)(e.deviceType)&&(t.model=e.deviceType);(0,s.isValidString)(e.deviceClass)&&!(0,s.isBlank)(e.deviceClass)&&(t.deviceClass=e.deviceClass);if(0===Object.keys(t).length)return;return t},t.getDomainFromAnalyticsConfig=function(e){var t,i,n=(0,r.getGlobalLocationHostname)(),a=n?u.removeTrailingSlash(n):"";return null!==(i=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.origin)&&void 0!==i?i:a},t.mergeAnalyticsConfig=function(e,t){var i=function(e){var t=["cdnProvider","videoId","title","isLive","experimentName"],i=/customData\d{1,3}$/g;for(var n in e)((0,l.isNotNullish)(n.match(i))||t.includes(n))&&delete e[n];return e}(e),a=function(e,t){if((0,l.isNotNullish)(t))return n(n(n({},e),{enabled:!0}),t);return null!=e?e:{}}(e.config,t.config);return n(n(n({},i),t),{config:a})},t.applySourceMetadataToAnalyticsConfig=function(e,t){var i=n({},e);(0,l.isNotNullish)(t.title)&&(i.title=t.title);(0,l.isNotNullish)(t.videoId)&&(i.videoId=t.videoId);(0,l.isNotNullish)(t.cdnProvider)&&(i.cdnProvider=t.cdnProvider);(0,l.isNotNullish)(t.isLive)&&(i.isLive=t.isLive);(0,l.isNotNullish)(t.customData)&&(i=n(n({},i),(0,a.extractCustomDataFieldsOnly)(t.customData)));return i};var a=i(5529),r=i(9422),o=i(1916),s=i(1820),u=i(5063),l=i(5063)},9627:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.areCollectorRequirementsValid=function(e){var t=[],i=(0,r.isBlank)((0,n.getDomainFromAnalyticsConfig)(e));i&&t.push("no `domain` value found (neither from `window.location` object nor provided by `AnalyticsConfig.config.origin`). Without this value, we cannot verify the origin of your analytics data. Please provide the registered domain via the config during collector creation.");if(t.length>0){var o="Collector setup failed:"+t.join(" -- ");a.logger.errorMessageToUser(o)}return!i};var n=i(8331),a=i(1916),r=i(1820)},3848:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCookie=t.setCookie=t.getCookie=t.removeDocumentEventListener=t.addDocumentEventListener=t.isVideoInFullscreen=t.isDocumentHidden=t.getDocumentPropertyWithPrefix=void 0;var n=i(1916),a=i(1820),r=i(5063);t.getDocumentPropertyWithPrefix=function(e){if(!(0,r.isNullish)(document)){if(e in document)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),i=0,n=["webkit","moz","ms","o"];i<n.length;i++){var a=n[i]+t;if(a in document)return a}}};t.isDocumentHidden=function(){var e=(0,t.getDocumentPropertyWithPrefix)("hidden");return!!(0,a.isValidString)(e)&&!0===document[e]};t.isVideoInFullscreen=function(){var e,i=(0,t.getDocumentPropertyWithPrefix)("fullscreenElement");return!!(0,a.isValidString)(i)&&"VIDEO"===(null===(e=document[i])||void 0===e?void 0:e.nodeName)};t.addDocumentEventListener=function(e,t,i){(0,r.isNullish)(document)||!(0,r.isFunction)(document.addEventListener)||(0,r.isNullish)(t)||document.addEventListener(e,t,i)};t.removeDocumentEventListener=function(e,t,i){(0,r.isNullish)(document)||!(0,r.isFunction)(document.removeEventListener)||(0,r.isNullish)(t)||document.removeEventListener(e,t,i)};t.getCookie=function(e){if(!(0,r.isNullish)(document)){var t;try{t=document.cookie.split(";")}catch(e){return void n.logger.log("failed to access cookie objects on document",e)}for(var i=e+"=",a=0,o=t;a<o.length;a++){for(var s=o[a];" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(i))return s.substring(i.length,s.length)}return""}};t.setCookie=function(e,t,i){if(!(0,r.isNullish)(document)){var a=e+"="+t+"; path=/";(null==i?void 0:i.domain)&&(a+="; domain=".concat(i.domain)),(null==i?void 0:i.expires)&&(a+="; expires=".concat(i.expires)),(null==i?void 0:i.maxAge)&&(a+="; max-age=".concat(i.maxAge));try{document.cookie=a}catch(e){return void n.logger.log("failed to set cookie object on document",e)}}};t.deleteCookie=function(e){if(!(0,r.isNullish)(document))try{document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}catch(e){return void n.logger.log("failed to delete cookies from document",e)}}},5923:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalScope=void 0,t.globalScope=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof window)return window;if(void 0!==i.g)return i.g;if("undefined"!=typeof self)return self;throw new Error("Unable to locate global object")}()},9422:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGlobalTheoPlayerVersion=t.getGlobalVideojsVersion=t.getGlobalNavigatorUserAgent=t.getGlobalNavigatorProduct=t.getGlobalNavigatorLanguage=t.hasGlobalWebOSApi=t.getGlobalWebOSApi=t.getGlobalPerformanceNow=t.getGlobalLocationPathname=t.getGlobalLocationHostname=t.removeGlobalEventListener=t.addGlobalEventListener=t.getGlobalScreenDimensions=t.getGlobalDevicePixelRatio=void 0;var n=i(5923),a=i(1460),r=i(1820),o=i(5063);t.getGlobalDevicePixelRatio=function(){return(0,o.isNullish)(n.globalScope.devicePixelRatio)?1:n.globalScope.devicePixelRatio>0?n.globalScope.devicePixelRatio:1};t.getGlobalScreenDimensions=function(){if(!(0,o.isNullish)(n.globalScope.screen)&&(0,a.isNumber)(n.globalScope.screen.width)&&(0,a.isNumber)(n.globalScope.screen.height)){var e=(0,t.getGlobalDevicePixelRatio)(),i=n.globalScope.screen.width*e,r=n.globalScope.screen.height*e;if(!(!isFinite(i)||!isFinite(r)||i<=0||r<=0))return{width:i,height:r,scale:e}}};t.addGlobalEventListener=function(e,t){(0,o.isNullish)(n.globalScope.addEventListener)||!(0,o.isFunction)(n.globalScope.addEventListener)||(0,o.isNullish)(t)||n.globalScope.addEventListener(e,t)};t.removeGlobalEventListener=function(e,t){(0,o.isNullish)(n.globalScope.removeEventListener)||!(0,o.isFunction)(n.globalScope.removeEventListener)||(0,o.isNullish)(t)||n.globalScope.removeEventListener(e,t)};t.getGlobalLocationHostname=function(){if(!(0,o.isNullish)(n.globalScope.location)&&(0,r.isValidString)(n.globalScope.location.hostname))return n.globalScope.location.hostname};t.getGlobalLocationPathname=function(){if(!(0,o.isNullish)(n.globalScope.location)&&(0,r.isValidString)(n.globalScope.location.pathname))return n.globalScope.location.pathname};t.getGlobalPerformanceNow=function(){var e;if(!(0,o.isNullish)(null===(e=n.globalScope.performance)||void 0===e?void 0:e.now)&&(0,o.isFunction)(n.globalScope.performance.now))return n.globalScope.performance.now()};t.getGlobalWebOSApi=function(){return{webOSSystem:n.globalScope.webOSSystem,PalmSystem:n.globalScope.PalmSystem}};t.hasGlobalWebOSApi=function(){var e=(0,t.getGlobalWebOSApi)(),i=e.webOSSystem,n=e.PalmSystem;return!(0,o.isNullish)(i)||!(0,o.isNullish)(n)};t.getGlobalNavigatorLanguage=function(){if(!(0,o.isNullish)(n.globalScope.navigator))return n.globalScope.navigator.language||n.globalScope.navigator.userLanguage};t.getGlobalNavigatorProduct=function(){if(!(0,o.isNullish)(n.globalScope.navigator))return n.globalScope.navigator.product};t.getGlobalNavigatorUserAgent=function(){if(!(0,o.isNullish)(n.globalScope.navigator)&&(0,r.isValidString)(n.globalScope.navigator.userAgent))return n.globalScope.navigator.userAgent};t.getGlobalVideojsVersion=function(){if(!(0,o.isNullish)(n.globalScope.videojs))return n.globalScope.videojs.VERSION};t.getGlobalTheoPlayerVersion=function(){if(!(0,o.isNullish)(n.globalScope.THEOplayer))return n.globalScope.THEOplayer.version}},1460:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseIntOrUndefined=t.isFiniteNumber=t.isNumber=void 0;var n=i(5063);t.isNumber=function(e){return!(0,n.isNullish)(e)&&"number"==typeof e};t.isFiniteNumber=function(e){return!!(0,t.isNumber)(e)&&((0,n.isFunction)(Number.isFinite)?Number.isFinite(e):isFinite(e))};t.parseIntOrUndefined=function(e){var i=parseInt(e,10);return(0,t.isFiniteNumber)(i)?i:void 0}},2974:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.objectValues=void 0,t.safeAccess=function(e){try{return e()}catch(e){return void n.logger.log("safeAccess catched failed access on property: ",e)}};var n=i(1916);t.objectValues=function(e){return Object.keys(e).map((function(t){return e[t]}))}},2108:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER=void 0,t.hasPlayerAlreadyBeenAugmented=function(e){return!0===e[t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER]},t.markPlayerInstanceAsAugmented=function(e){e[t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER]=!0},t.isDefined=function(e){if((0,a.isNullish)(e))return n.logger.log("Bitmovin Analytics: Adapter hasn't been initialized yet"),!1;return!0};var n=i(1916),a=i(5063);t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER="__bitmovinAnalyticsHasBeenSetup"},6481:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearSampleStateValues=function(e){e.ad=0,e.adId=void 0,e.adIndex=void 0,e.adPosition=void 0,e.adSystem=void 0,e.autoplay=void 0,e.buffered=0,e.castTech=void 0,e.completed=void 0,e.drmLoadTime=void 0,e.droppedFrames=0,e.duration=0,e.errorCode=void 0,e.errorData=void 0,e.errorMessage=void 0,e.errorSegments=void 0,e.errorSeverity=void 0,e.isProgramChange=void 0,e.pageLoadTime=0,e.paused=0,e.played=0,e.playerStartupTime=0,e.seeked=0,e.startupTime=0,e.state=void 0,e.videoStartFailed=void 0,e.videoStartFailedReason=void 0,e.videoStartupTime=0,e[n.SSAI_RELATED_SAMPLE_MARKER]=void 0},t.getDefaultSamplePath=function(){var e=(0,a.getGlobalLocationPathname)();return(0,r.isValidString)(e)?(0,s.removeTrailingSlash)(e):void 0},t.buildAdSample=function(e){var t={platform:"web"};if((0,s.isNullish)(e))return t;return t.cdnProvider=e.cdnProvider,t.customUserId=e.customUserId,t.domain=e.domain,t.key=e.key,t.language=e.language,t.path=e.path,t.player=e.player,t.playerKey=e.playerKey,t.playerTech=e.playerTech,t.screenHeight=e.screenHeight,t.screenWidth=e.screenWidth,t.size=e.size,t.userAgent=e.userAgent,t.userId=e.userId,t.version=e.version,t.videoId=e.videoId,t.videoImpressionId=e.impressionId,t.videoTitle=e.videoTitle,t.videoWindowHeight=e.videoWindowHeight,t.videoWindowWidth=e.videoWindowWidth,o.transferCustomDataFields(e,t),t.experimentName=e.experimentName,t};var n=i(7906),a=i(9422),r=i(1820),o=i(5063),s=i(5063)},1820:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=t.endsWith=t.isBlank=t.isEmpty=t.isValidString=void 0;var n=i(5063);t.isValidString=function(e){return(0,n.isNotNullish)(e)&&"string"==typeof e};t.isEmpty=function(e){return(0,n.isNullish)(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,i){return!(!(0,t.isValidString)(e)||!(0,t.isValidString)(i))&&((0,n.isFunction)(String.prototype.endsWith)?e.endsWith(i):e.substring(e.length-i.length)===i)};t.startsWith=function(e,i){return!(!(0,t.isValidString)(e)||!(0,t.isValidString)(i))&&((0,n.isFunction)(String.prototype.startsWith)?e.startsWith(i):e.substring(0,i.length)===i)}},2982:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUUID=void 0;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={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,i),r.exports}i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var n={};return function(){"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerModule=e.adapters=e.Bitmovin8Adapter=e.CdnProviders=e.Players=e.version=void 0;var t=i(4679);Object.defineProperty(e,"Bitmovin8Adapter",{enumerable:!0,get:function(){return t.Bitmovin8Adapter}});var a=i(681);Object.defineProperty(e,"PlayerModule",{enumerable:!0,get:function(){return a.PlayerModule}});var r=i(4355);Object.defineProperty(e,"CdnProviders",{enumerable:!0,get:function(){return r.CdnProvider}});var o=i(556);Object.defineProperty(e,"Players",{enumerable:!0,get:function(){return o.Player}});var s=i(4926);Object.defineProperty(e,"version",{enumerable:!0,get:function(){return s.VERSION}}),e.adapters={Bitmovin8Adapter:t.Bitmovin8Adapter},e.default={PlayerModule:a.PlayerModule}}(),n}()}));
|
|
11
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.bitmovin=t():(e.bitmovin=e.bitmovin||{},e.bitmovin.analytics=t())}(self,(function(){return function(){var e={2595:function(e,t){var i;i={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 n="string"==typeof e.initial?{state:e.initial}:e.initial,a=e.terminal||e.final,r=t||e.target||{},o=e.events||[],s=e.callbacks||{},u={},l={},c=function(e){var t=Array.isArray(e.from)?e.from:e.from?[e.from]:[i.WILDCARD];u[e.name]=u[e.name]||{};for(var n=0;n<t.length;n++)l[t[n]]=l[t[n]]||[],l[t[n]].push(e.name),u[e.name][t[n]]=e.to||t[n];e.to&&(l[e.to]=l[e.to]||[])};n&&(n.event=n.event||"startup",c({name:n.event,from:"none",to:n.state}));for(var d=0;d<o.length;d++)c(o[d]);for(var p in u)u.hasOwnProperty(p)&&(r[p]=i.buildEvent(p,u[p]));for(var p in s)s.hasOwnProperty(p)&&(r[p]=s[p]);return r.current="none",r.is=function(e){return Array.isArray(e)?e.indexOf(this.current)>=0:this.current===e},r.can=function(e){return!this.transition&&void 0!==u[e]&&(u[e].hasOwnProperty(this.current)||u[e].hasOwnProperty(i.WILDCARD))},r.cannot=function(e){return!this.can(e)},r.transitions=function(){return(l[this.current]||[]).concat(l[i.WILDCARD]||[])},r.isFinished=function(){return this.is(a)},r.error=e.error||function(e,t,i,n,a,r,o){throw o||r},r.states=function(){return Object.keys(l).sort()},n&&!n.defer&&r[n.event](),r},doCallback:function(e,t,n,a,r,o){if(t)try{return t.apply(e,[n,a,r].concat(o))}catch(t){return e.error(n,a,r,o,i.Error.INVALID_CALLBACK,"an exception occurred in a caller-provided callback function",t)}},beforeAnyEvent:function(e,t,n,a,r){return i.doCallback(e,e.onbeforeevent,t,n,a,r)},afterAnyEvent:function(e,t,n,a,r){return i.doCallback(e,e.onafterevent||e.onevent,t,n,a,r)},leaveAnyState:function(e,t,n,a,r){return i.doCallback(e,e.onleavestate,t,n,a,r)},enterAnyState:function(e,t,n,a,r){return i.doCallback(e,e.onenterstate||e.onstate,t,n,a,r)},changeState:function(e,t,n,a,r){return i.doCallback(e,e.onchangestate,t,n,a,r)},beforeThisEvent:function(e,t,n,a,r){return i.doCallback(e,e["onbefore"+t],t,n,a,r)},afterThisEvent:function(e,t,n,a,r){return i.doCallback(e,e["onafter"+t]||e["on"+t],t,n,a,r)},leaveThisState:function(e,t,n,a,r){return i.doCallback(e,e["onleave"+n],t,n,a,r)},enterThisState:function(e,t,n,a,r){return i.doCallback(e,e["onenter"+a]||e["on"+a],t,n,a,r)},beforeEvent:function(e,t,n,a,r){if(!1===i.beforeThisEvent(e,t,n,a,r)||!1===i.beforeAnyEvent(e,t,n,a,r))return!1},afterEvent:function(e,t,n,a,r){i.afterThisEvent(e,t,n,a,r),i.afterAnyEvent(e,t,n,a,r)},leaveState:function(e,t,n,a,r){var o=i.leaveThisState(e,t,n,a,r),s=i.leaveAnyState(e,t,n,a,r);return!1!==o&&!1!==s&&(i.ASYNC===o||i.ASYNC===s?i.ASYNC:void 0)},enterState:function(e,t,n,a,r){i.enterThisState(e,t,n,a,r),i.enterAnyState(e,t,n,a,r)},buildEvent:function(e,t){return function(){var n=this.current,a=t[n]||(t[i.WILDCARD]!=i.WILDCARD?t[i.WILDCARD]:n)||n,r=Array.prototype.slice.call(arguments);if(this.transition)return this.error(e,n,a,r,i.Error.PENDING_TRANSITION,"event "+e+" inappropriate because previous transition did not complete");if(this.cannot(e))return this.error(e,n,a,r,i.Error.INVALID_TRANSITION,"event "+e+" inappropriate in current state "+this.current);if(!1===i.beforeEvent(this,e,n,a,r))return i.Result.CANCELLED;if(n===a)return i.afterEvent(this,e,n,a,r),i.Result.NOTRANSITION;var o=this;this.transition=function(){return o.transition=null,o.current=a,i.enterState(o,e,n,a,r),i.changeState(o,e,n,a,r),i.afterEvent(o,e,n,a,r),i.Result.SUCCEEDED},this.transition.cancel=function(){o.transition=null,i.afterEvent(o,e,n,a,r)};var s=i.leaveState(this,e,n,a,r);return!1===s?(this.transition=null,i.Result.CANCELLED):i.ASYNC===s?i.Result.PENDING:this.transition?this.transition():void 0}}},e.exports&&(t=e.exports=i),t.StateMachine=i},887:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AdModule=void 0;var n=i(5063),a=i(5517),r=i(2953),o=i(3182),s=function(){function e(e,t){var i=this;this.player=e,this.windowEventTracker=t,this.adCallbacks=new a.AdCallbacks,this.isLinearAdActive=function(){var e;return null!==(e=i.player.isLinearAdActive())&&void 0!==e&&e},this.getContainer=function(){return i.player.getContainer()},this.getAdModuleInfo=function(){var e;return null!==(e=i.player.getAdModuleInfo())&&void 0!==e?e:{name:void 0,version:void 0}},this.currentTime=function(){var e;return null!==(e=i.player.getCurrentTime())&&void 0!==e?e:0},this.register()}return e.prototype.getAutoPlay=function(){var e;return null!==(e=this.player.autoplay)&&void 0!==e&&e},e.prototype.register=function(){var e=this;this.player.on(o.BITMOVIN8_PLAYER_EVENT.Play,(function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPlay()})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.Paused,(function(t){"advertising-api"===t.issuer&&e.adCallbacks.onPause()})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdStarted,(function(t){e.adCallbacks.onAdStarted((0,r.mapBitmovinAd)(t.ad))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdFinished,(function(t){e.adCallbacks.onAdFinished((0,r.mapBitmovinAd)(t.ad))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdBreakStarted,(function(t){e.adCallbacks.onAdBreakStarted((0,r.mapBitmovinAdBreak)(t.adBreak))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdBreakFinished,(function(t){e.adCallbacks.onAdBreakFinished((0,r.mapBitmovinAdBreak)(t.adBreak))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdClicked,(function(t){e.adCallbacks.onAdClicked({clickThroughUrl:t.clickThroughUrl})})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdQuartile,(function(t){e.adCallbacks.onAdQuartile({quartile:t.quartile})})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdSkipped,(function(t){e.adCallbacks.onAdSkipped((0,r.mapBitmovinAd)(t.ad))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdError,(function(t){var i;e.adCallbacks.onAdError((0,r.mapBitmovinAdError)(t,null===(i=e.player.getActiveAd())||void 0===i?void 0:i.id))})),this.player.on(o.BITMOVIN8_PLAYER_EVENT.AdManifestLoaded,(function(t){var i,a,o=t.adConfig,s="vmap"===(null===(i=null==o?void 0:o.tag)||void 0===i?void 0:i.type),u=(0,n.isNotNullish)(t.adConfig)?(0,r.mapBitmovinAdBreak)(t.adConfig):void 0,l=null===(a=t.downloadTiming)||void 0===a?void 0:a.downloadTime;e.adCallbacks.onAdManifestLoaded({adBreakInfo:u,manifestDownloadTime:l,isVmap:s})}));var t=function(){e.adCallbacks.onBeforeUnload()};this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},e}();t.Bitmovin8AdModule=s},4679:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8Adapter=void 0;var n=i(4350),a=i(6398),r=i(8331),o=i(9627),s=i(1916),u=i(2108),l=i(4926),c=i(4067),d=i(6596),p=i(6923),h=function(){function e(e,t){var i,l=this;if(this.ssai={adBreakStart:function(e){if((0,u.isDefined)(l.internalAdapter)){var t=(0,c.sanitizeBitmovin8AdapterSsaiAdBreakMetadataAdPosition)(e);if((0,a.hasValidSsaiAdBreakMetadataStructure)(t)){var i=(0,a.simplySanitizeSsaiAdBreakMetadata)(t);l.internalAdapter.ssaiService.adBreakStart(i)}}},adStart:function(e){if((0,u.isDefined)(l.analytics)&&(0,u.isDefined)(l.internalAdapter)&&(0,a.hasValidSsaiAdMetadataStructure)(e)){var t=(0,a.simplySanitizeSsaiAdMetadata)(e);l.internalAdapter.ssaiService.adStart(t),l.analytics.setConfigParameters(),l.analytics.setAutoDetectedDeviceInformation()}},adQuartileFinished:function(e,t){if((0,u.isDefined)(l.analytics)&&(0,u.isDefined)(l.internalAdapter)&&(0,a.hasValidSsaiAdQuartileStructure)(e)){var i=(0,a.sanitizeSsaiAdQuartileMetadata)(t);l.internalAdapter.ssaiService.adQuartileFinished(e,i)}},adBreakEnd:function(){(0,u.isDefined)(l.analytics)&&(0,u.isDefined)(l.internalAdapter)&&(l.internalAdapter.ssaiService.adBreakEnd(),l.analytics.setConfigParameters(),l.analytics.setAutoDetectedDeviceInformation())}},(0,u.hasPlayerAlreadyBeenAugmented)(e))s.logger.errorMessageToUser("Bitmovin Analytics is already hooked up to this player instance");else{(0,u.markPlayerInstanceAsAugmented)(e);var h=e.getConfig(),m=(0,r.sanitizeAnalyticsConfig)(h.analytics);if((0,o.areCollectorRequirementsValid)(m)){(0,r.guardAgainstDuplicatedUserId)(m),m.playerKey=null!==(i=m.playerKey)&&void 0!==i?i:h.key;var f=d.Bitmovin8InternalAdapter.create(new p.Bitmovin8PlayerProxy(e),t);this.internalAdapter=f,this.analytics=n.Analytics.create(m,this.internalAdapter),e.analytics=this,this.wrapPlayerLoad(e,this.analytics,f)}}}return e.prototype.wrapPlayerLoad=function(e,t,i){var n=e.load;e.load=function(){for(var a=[],r=0;r<arguments.length;r++)a[r]=arguments[r];if(a.length>0){var o=a[0].analytics;t.sourceChange(o)}return i.trackLoadstartWithAutoplay(),n.apply(e,a)}},Object.defineProperty(e.prototype,"version",{get:function(){return l.VERSION},enumerable:!1,configurable:!0}),e.prototype.getCurrentImpressionId=function(){if((0,u.isDefined)(this.analytics))return this.analytics.getCurrentImpressionId()},e.prototype.getUserId=function(){if((0,u.isDefined)(this.analytics))return this.analytics.getUserId()},e.prototype.setCustomData=function(e){(0,u.isDefined)(this.internalAdapter)&&this.internalAdapter.setCustomData(e)},e.prototype.setCustomDataOnce=function(e){(0,u.isDefined)(this.analytics)&&this.analytics.setCustomDataOnce(e)},e.prototype.sourceChange=function(e){(0,u.isDefined)(this.analytics)&&this.analytics.sourceChange(e)},e.version=l.VERSION,e}();t.Bitmovin8Adapter=h},6596:function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(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 i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8InternalAdapter=void 0;var o,s=i(2403),u=i(9664),l=i(2663),c=i(6235),d=i(4916),p=i(6743),h=i(5878),m=i(3458),f=i(2361),v=i(556),A=i(8525),E=i(7614),g=i(9557),y=i(7881),S=i(3413),T=i(5248),I=i(4649),D=i(5063),_=i(2647),b=i(887),N=i(3182),C=i(7543),P=i(8676),R=i(665);!function(e){e.Fullscreen="fullscreen",e.Inline="inline",e.PictureInPicture="pictureinpicture"}(o||(o={}));var M=function(e){function t(t,i,n,a,r,o,u){var c=e.call(this,u)||this;c.onBeforeUnLoadEvent=!1,c.getPlayerVersion=function(){var e;return null!==(e=c.player.version)&&void 0!==e?e:"unknown"},c.getPlayerName=function(){return v.Player.BITMOVIN},c.getPlayerTech=function(){var e;return null!==(e=c.player.getPlayerType())&&void 0!==e?e:"unknown"},c.getDrmPerformanceInfo=function(){return c.drmPerformanceInfo},c.httpRequestTrackingAdapter=r,c._videoCompletionTracker=a,c.segmentTracker=n,c.speedMeter=i,c.player=t;var d=new l.HeartbeatService((function(){var e,t;return null!==(t=null!==(e=c.player.getCurrentTime())&&void 0!==e?e:c.lastTrackedCurrentTime)&&void 0!==t?t:0})),p=new s.Bitmovin8AnalyticsStateMachine(c.stateMachineCallbacks,d,c.opts);return d.setListener(p),c.sourceInfoFallbackService=o,c.stateMachine=p,c}return a(t,e),Object.defineProperty(t.prototype,"currentTime",{get:function(){return(0,D.isNotNullish)(this.player.getCurrentTime())&&!this.isAdPlaying?this.player.getCurrentTime():this.lastTrackedCurrentTime?this.lastTrackedCurrentTime:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAdPlaying",{get:function(){return(0,D.isNotNullish)(this.player.getActiveAd())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"supportsDeferredLicenseLoading",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"adModule",{get:function(){return this._adModule},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoCompletionTracker",{get:function(){return this._videoCompletionTracker},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){var t=this;this.registerPlayerEventListeners(),this._adModule=new b.Bitmovin8AdModule(this.player,this.windowEventTracker),this.registerUnloadEventListeners(),this.ssaiService.activate({getPlayerCurrentTime:function(){return t.currentTime},reportEngagementInteraction:function(t){e.sendSsaiEngagementAdSample(t)},reportPlaybackInteraction:function(e,i){t.stateMachine.sendPlayingSample(e,i,!0)}});var i=new y.HttpRequestTracking([this.httpRequestTrackingAdapter]);return[new g.ErrorDetailTracking(e.errorDetailTrackingSettingsProvider,new E.ErrorDetailBackend(e.errorDetailTrackingSettingsProvider.collectorConfig),[e.errorDetailSubscribable],i)]},t.prototype.resetSourceRelatedState=function(){this.ssaiService.resetSourceRelatedState(),e.prototype.resetSourceRelatedState.call(this)},t.prototype.getAutoPlay=function(){var e;return null!==(e=this.player.autoplay)&&void 0!==e&&e},t.prototype.getCurrentPlaybackInfo=function(){var t,i,n=this.player.getContainer(),a=r(r({},e.prototype.getCommonPlaybackInfo.call(this)),{size:this.player.getViewMode()===o.Fullscreen?A.PlayerSize.Fullscreen:A.PlayerSize.Window,playerTech:this.getPlayerTech(),isLive:this.player.isLive(),videoDuration:(0,S.normalizeVideoDuration)(this.videoDuration),streamFormat:this.player.getStreamType(),videoWindowWidth:null==n?void 0:n.offsetWidth,videoWindowHeight:null==n?void 0:n.offsetHeight,isMuted:this.player.isMuted(),isCasting:this.player.isCasting(),audioLanguage:null===(t=this.player.getAudio())||void 0===t?void 0:t.lang,subtitleEnabled:!1,droppedFrames:(0,D.isNotNullish)(this.player.getSource())&&null!==(i=this.player.getDroppedVideoFrames())&&void 0!==i?i:0});return this.applySubtitleProperties(a),this.applyPlaybackQualityProperties(a),this.applyCastingProperties(a),this.applySourceProperties(a),((0,D.isNullish)(a.streamFormat)||"unknown"===a.streamFormat)&&this.sourceInfoFallbackService.applyStreamFormat(a),a},t.prototype.getSegmentInfo=function(){return this.segmentTracker.getSegments()},t.prototype.getDownloadSpeedInfo=function(){return this.speedMeter.getInfo()},t.prototype.resetDownloadSpeedInfoMeasures=function(){this.speedMeter.reset()},t.prototype.onError=function(){this.segmentTracker.reset()},t.prototype.trackLoadstartWithAutoplay=function(){this.getAutoPlay()&&this.eventCallback(f.Event.LOADSTART_AUTOPLAY,{currentTime:this.currentTime})},t.prototype.registerPlayerEventListeners=function(){var e=this;this.player.on(N.BITMOVIN8_PLAYER_EVENT.SourceUnloaded,(function(t){e.segmentTracker.reset(),e.eventCallback(f.Event.SOURCE_UNLOADED,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.SourceLoaded,(function(t){var i;e._videoCompletionTracker.reset(),e.videoDuration=e.player.getDuration(),e._videoCompletionTracker.setVideoDuration(null!==(i=e.player.getDuration())&&void 0!==i?i:0),e.sourceInfoFallbackService.setStreamFormat(e.player.getStreamType()),e.eventCallback(f.Event.SOURCE_LOADED,{})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.CastStarted,(function(t){e.eventCallback(f.Event.START_CAST,t)})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.CastStopped,(function(){e.eventCallback(f.Event.END_CAST,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Play,(function(t){"ui-seek"!==t.issuer&&e.eventCallback(f.Event.PLAY,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Playing,(function(t){"advertising-api"!==t.issuer&&e.eventCallback(f.Event.PLAYING,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Paused,(function(t){"ui-seek"!==t.issuer&&e.eventCallback(f.Event.PAUSE,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.TimeChanged,(function(t){e.isAdPlaying||(e.lastTrackedCurrentTime=e.player.getCurrentTime()),e.eventCallback(f.Event.TIMECHANGED,{currentTime:e.lastTrackedCurrentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Seek,(function(t){e.allowSeeking(t)&&e.eventCallback(f.Event.SEEK,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Seeked,(function(){e.eventCallback(f.Event.SEEKED,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.StallStarted,(function(){e.eventCallback(f.Event.START_BUFFERING,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.StallEnded,(function(){e.eventCallback(f.Event.END_BUFFERING,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AudioPlaybackQualityChanged,(function(t){var i=t,n=i.sourceQuality,a=i.targetQuality;if(!(0,D.isNullish)(a)){var r={type:"audio",bitrate:a.bitrate,currentTime:e.currentTime,codec:a.codec};(0,D.isNotNullish)(n)&&e.qualityChangeService.shouldAllowAudioQualityChange(a.bitrate)&&e.eventCallback(f.Event.AUDIO_CHANGE,r),e.qualityChangeService.setAudioBitrate(a.bitrate),e.stateMachineCallbacks.updateSampleQualityInfo(r)}})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.VideoPlaybackQualityChanged,(function(t){var i=t,n=i.sourceQuality,a=i.targetQuality;if(!(0,D.isNullish)(a)){var r={type:"video",width:a.width,height:a.height,bitrate:a.bitrate,currentTime:e.currentTime,codec:a.codec};(0,D.isNotNullish)(n)&&e.qualityChangeService.shouldAllowVideoQualityChange(a.bitrate)&&e.eventCallback(f.Event.VIDEO_CHANGE,r),e.qualityChangeService.setVideoBitrate(a.bitrate),e.stateMachineCallbacks.updateSampleQualityInfo(r)}})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.ViewModeChanged,(function(t){"fullscreen"===t.to?e.eventCallback(f.Event.START_FULLSCREEN,{currentTime:e.currentTime}):"fullscreen"===t.from&&e.eventCallback(f.Event.END_FULLSCREEN,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AdStarted,(function(t){e.eventCallback(f.Event.START_AD,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AdFinished,(function(t){e.eventCallback(f.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AdSkipped,(function(t){e.eventCallback(f.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AdError,(function(t){e.eventCallback(f.Event.END_AD,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Muted,(function(){e.eventCallback(f.Event.MUTE,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Unmuted,(function(){e.eventCallback(f.Event.UN_MUTE,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.Error,(function(t){e.eventCallback(f.Event.ERROR,{code:t.code,message:t.name,legacyData:t.data,currentTime:e.currentTime,originalError:t,data:{additionalData:(0,D.tryJSONStringify)(t.data)}}),t.code!==m.ErrorCode.BITMOVIN_PLAYER_LICENSING_ERROR.code&&t.code!==m.ErrorCode.SETUP_MISSING_LICENSE_WHITELIST.code||e.onLicenseCallFailed.dispatch({}),e.ssaiService.sendAdEngagementErrorSample({code:t.code,message:t.name,severity:"CRITICAL"},t)})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.PlaybackFinished,(function(){e.eventCallback(f.Event.END,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.DownloadFinished,(function(t){0===t.downloadType.indexOf("drm/license/")&&(e.drmPerformanceInfo={drmType:t.downloadType.replace("drm/license/",""),drmLoadTime:1e3*t.downloadTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.AudioChanged,(function(t){e.eventCallback(f.Event.AUDIOTRACK_CHANGED,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.SubtitleEnabled,(function(t){e.eventCallback(f.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.SubtitleDisabled,(function(t){e.eventCallback(f.Event.SUBTITLE_CHANGE,{currentTime:e.currentTime})})),this.player.on(N.BITMOVIN8_PLAYER_EVENT.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(f.Event.UNLOAD,{currentTime:t})}e.release()};this.player.on(N.BITMOVIN8_PLAYER_EVENT.Destroy,t),this.windowEventTracker.addEventListener("beforeunload",t),this.windowEventTracker.addEventListener("unload",t)},t.prototype.applySourceProperties=function(e){var t=this.player.getSource();if(!(0,D.isNullish)(t)){e.videoTitle=t.title,e.mpdUrl=t.dash,e.m3u8Url=t.hls;var i=(0,T.getSourceInfoFromBitmovinSourceConfig)(t.progressive,this.player);e.progUrl=i.progUrl,"progressive"===this.player.getStreamType()&&(e.videoBitrate=i.progBitrate)}},t.prototype.applySubtitleProperties=function(e){var t,i=null===(t=this.player.getSubtitleList())||void 0===t?void 0:t.find((function(e){return!0===e.enabled}));e.subtitleEnabled=(0,D.isNotNullish)(i),e.subtitleLanguage=(0,D.isNotNullish)(i)?i.lang:void 0},t.prototype.applyPlaybackQualityProperties=function(e){var t=this.player.getPlaybackVideoData();(0,D.isNotNullish)(t)&&(e.videoBitrate=t.bitrate,e.videoPlaybackHeight=t.height,e.videoPlaybackWidth=t.width,e.videoCodec=t.codec);var i=this.player.getPlaybackAudioData();(0,D.isNotNullish)(i)&&(e.audioBitrate=i.bitrate,e.audioCodec=i.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=h.CastTech.AirPlay;else{var i=this.player.remoteControlConfig;if(!(0,D.isNullish)(i))switch(i.type){case"googlecast":e.castTech=h.CastTech.GoogleCast;break;case"websocket":e.castTech=h.CastTech.WebSocket}}},t.prototype.allowSeeking=function(e){var t=e;return Math.abs(t.position-t.seekTarget)>I.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD},t.create=function(e,i){var n=new R.SpeedMeterAdapter(e,new u.DownloadSpeedMeter).getDownloadSpeedMeter(),a=new P.SegmentTrackerAdapter(e,new c.SegmentTracker).getSegmentTracker(),r=new C.HttpRequestTrackingAdapter(e);return new t(e,n,a,new p.default,r,new d.SourceInfoFallbackService,i)},t}(_.InternalAdapter);t.Bitmovin8InternalAdapter=M},6923:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8PlayerProxy=void 0;var n=i(2974),a=function(){function e(e){var t=this;this.rawPlayer=e,this.on=function(e,i){(0,n.safeAccess)((function(){return t.rawPlayer.on(e,i)}))},this.getCurrentTime=function(e){return(0,n.safeAccess)((function(){return t.rawPlayer.getCurrentTime(e)}))},this.getDuration=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getDuration()}))},this.getPlayerType=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getPlayerType()}))},this.getViewMode=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getViewMode()}))},this.getContainer=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getContainer()}))},this.isLive=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.isLive()}))},this.getStreamType=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getStreamType()}))},this.isMuted=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.isMuted()}))},this.isCasting=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.isCasting()}))},this.isAirplayActive=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.isAirplayActive()}))},this.getAudio=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getAudio()}))},this.getSource=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getSource()}))},this.getDroppedVideoFrames=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getDroppedVideoFrames()}))},this.getPlaybackVideoData=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getPlaybackVideoData()}))},this.getPlaybackAudioData=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getPlaybackAudioData()}))},this.getConfig=function(){return(0,n.safeAccess)((function(){return t.rawPlayer.getConfig()}))},this.getSubtitleList=function(){return(0,n.safeAccess)((function(){var e;return null===(e=t.rawPlayer.subtitles)||void 0===e?void 0:e.list()}))},this.isLinearAdActive=function(){return(0,n.safeAccess)((function(){var e;return null===(e=t.rawPlayer.ads)||void 0===e?void 0:e.isLinearAdActive()}))},this.getActiveAd=function(){return(0,n.safeAccess)((function(){var e;return null===(e=t.rawPlayer.ads)||void 0===e?void 0:e.getActiveAd()}))},this.getAdModuleInfo=function(){return(0,n.safeAccess)((function(){var e;return null===(e=t.rawPlayer.ads)||void 0===e?void 0:e.getModuleInfo()}))}}return Object.defineProperty(e.prototype,"version",{get:function(){var e=this;return(0,n.safeAccess)((function(){return e.rawPlayer.version}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"remoteControlConfig",{get:function(){var e;return null===(e=this.getConfig())||void 0===e?void 0:e.remotecontrol},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoplay",{get:function(){var e,t;return null===(t=null===(e=this.getConfig())||void 0===e?void 0:e.playback)||void 0===t?void 0:t.autoplay},enumerable:!1,configurable:!0}),e}();t.Bitmovin8PlayerProxy=a},2953:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapBitmovinAdError=function(e,t){var i,r={activeAdId:t},o=e,s=o.data;if((0,n.isNotNullish)(s)&&(r.code=s.code||o.code,r.message=s.message||o.name,"adBreak"in s||"adConfig"in s)){var u=null!==(i=s.adBreak)&&void 0!==i?i:s.adConfig;r.adBreakInfo=a(u)}return r},t.mapBitmovinAd=function(e){var t,i,a,r,o,s,u,l,c,d,p,h={id:e.id,isLinear:e.isLinear,clickThroughUrl:e.clickThroughUrl,width:e.width,height:e.height},m=e.isLinear?e:void 0;(0,n.isNotNullish)(m)&&(h.duration=m.duration,h.skippable=(0,n.isNotNullish)(m.skippableAfter),h.skippableAfter=m.skippableAfter,h.mediaUrl=m.mediaFileUrl);var f=e.data;(0,n.isNotNullish)(f)&&(h.bitrate=f.bitrate,h.mimeType=f.mimeType,h.vastData={adSystem:null===(t=f.adSystem)||void 0===t?void 0:t.name,advertiserName:null===(i=f.advertiser)||void 0===i?void 0:i.name,apiFramework:f.apiFramework,creativeAdId:null===(a=f.creative)||void 0===a?void 0:a.adId,creativeId:null===(r=f.creative)||void 0===r?void 0:r.id,universalAdIdRegistry:null===(s=null===(o=f.creative)||void 0===o?void 0:o.universalAdId)||void 0===s?void 0:s.idRegistry,universalAdIdValue:null===(l=null===(u=f.creative)||void 0===u?void 0:u.universalAdId)||void 0===l?void 0:l.value,adDescription:f.adDescription,adTitle:f.adTitle,wrapperAdsCount:null!==(d=null===(c=f.wrapperAdIds)||void 0===c?void 0:c.length)&&void 0!==d?d:0,surveyUrl:null===(p=f.survey)||void 0===p?void 0:p.uri,minSuggestedDuration:f.minSuggestedDuration});return h},t.mapBitmovinAdBreak=a,t.resolveEffectiveAdTag=r,t.getFallbackIndex=o;var n=i(5063);function a(e){var t={replaceContentDuration:e.replaceContentDuration,fallbackIndex:o(e)};t.id="id"in e?e.id:void 0,t.scheduleTime="scheduleTime"in e?e.scheduleTime:void 0;var i=e,n=r(i),a=n.tagUrl,s=n.tagType;return t.tagUrl=a,t.tagType=s,t.persistent="persistent"in e?i.persistent:void 0,t.position="position"in e?e.position:void 0,t.preloadOffset="preloadOffset"in e?e.preloadOffset:void 0,t}function r(e){if((0,n.isNullish)(e.tag))return{};var t=o(e),i={tagType:e.tag.type,tagUrl:e.tag.url};if((0,n.isNullish)(e.fallbackTags)||t<=0||e.fallbackTags.length<t)return i;var a=e.fallbackTags[t-1];return{tagType:a.type,tagUrl:a.url}}function o(e){var t=e.currentFallbackIndex;return(0,n.isNullish)(t)?0:t}},4067:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeBitmovin8AdapterSsaiAdBreakMetadataAdPosition=void 0;var n=i(5063);t.sanitizeBitmovin8AdapterSsaiAdBreakMetadataAdPosition=function(e){var t=e;return(0,n.isNotNullish)(null==t?void 0:t.adPosition)&&("pre-roll"===t.adPosition?t.adPosition="preroll":"mid-roll"===t.adPosition?t.adPosition="midroll":"post-roll"===(null==t?void 0:t.adPosition)&&(t.adPosition="postroll")),t}},3182:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BITMOVIN8_PLAYER_EVENT=void 0,t.BITMOVIN8_PLAYER_EVENT={AdBreakFinished:"adbreakfinished",AdBreakStarted:"adbreakstarted",AdClicked:"adclicked",AdError:"aderror",AdFinished:"adfinished",AdManifestLoaded:"admanifestloaded",AdQuartile:"adquartile",AdSkipped:"adskipped",AdStarted:"adstarted",AudioChanged:"audiochanged",AudioPlaybackQualityChanged:"audioplaybackqualitychanged",CastStarted:"caststarted",CastStopped:"caststopped",Destroy:"destroy",DownloadFinished:"downloadfinished",Error:"error",LicenseValidated:"licensevalidated",Muted:"muted",Paused:"paused",Play:"play",PlaybackFinished:"playbackfinished",Playing:"playing",Seek:"seek",Seeked:"seeked",SegmentPlayback:"segmentplayback",SourceLoaded:"sourceloaded",SourceUnloaded:"sourceunloaded",StallEnded:"stallended",StallStarted:"stallstarted",TimeChanged:"timechanged",SubtitleDisabled:"subtitledisabled",SubtitleEnabled:"subtitleenabled",Unmuted:"unmuted",VideoPlaybackQualityChanged:"videoplaybackqualitychanged",ViewModeChanged:"viewmodechanged"}},7543:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestTrackingAdapter=void 0,t.mapHttpRequestType=l;var n=i(675),a=i(7912),r=i(2974),o=i(5063),s=i(3182),u=function(){function e(e){var t=this;this.eventDispatcher=new n.EventDispatcher,e.on(s.BITMOVIN8_PLAYER_EVENT.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,i,n;this.eventDispatcher.dispatch({httpRequest:{downloadTime:null!==(t=(0,o.calculateTimeWithUndefined)(null==e?void 0:e.downloadTime))&&void 0!==t?t:0,httpStatus:null!==(i=null==e?void 0:e.httpStatus)&&void 0!==i?i:0,success:null!==(n=null==e?void 0:e.success)&&void 0!==n&&n,timestamp:(0,o.getCurrentTimestamp)(),url:null==e?void 0:e.url,size:null==e?void 0:e.size,timeToFirstByte:(0,o.calculateTimeWithUndefined)(null==e?void 0:e.timeToFirstByte),type:l(null==e?void 0:e.downloadType)}})},e}();function l(e){return(0,r.objectValues)(a.HttpRequestType).includes(e)?e:a.HttpRequestType.UNKNOWN}t.HttpRequestTrackingAdapter=u},8676:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SegmentTrackerAdapter=void 0;var n=i(5063),a=i(3182),r=function(){function e(e,t){var i=this;this.handleSegmentPlaybackEvent=function(e){i.segmentTracker.removeSegment(e.url)},this.segmentTracker=t,e.on(a.BITMOVIN8_PLAYER_EVENT.DownloadFinished,(function(e){return i.handleOnDownloadFinishEvent(e)})),e.on(a.BITMOVIN8_PLAYER_EVENT.SegmentPlayback,(function(e){return i.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,i={name:n.getURLResourceName(t),url:t,timestamp:e.timestamp};this.segmentTracker.addSegment(i)}},e}();t.SegmentTrackerAdapter=r},665:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpeedMeterAdapter=void 0;var n=i(3182),a=function(){function e(e,t){var i=this;this.meter=t,e.on(n.BITMOVIN8_PLAYER_EVENT.DownloadFinished,(function(e){return i.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=a},681:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerModule=void 0;var n=i(4679);t.PlayerModule={name:"analytics",module:{Analytics:n.Bitmovin8Adapter},hooks:{setup:function(e,t){var i=t.getConfig(),n=!i,a=!1===(null==i?void 0:i.analytics);if(n||a)return Promise.resolve();var r=new(0,e.Analytics)(t);return Promise.resolve(r)}}}},2647:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.InternalAdapter=void 0;var a=i(675),r=i(9796),o=i(4916),s=i(4300),u=i(2361),l=i(4820),c=i(9422),d=i(1916),p=i(5063),h=i(2376),m=function(){function e(e){this.onLicenseKeyReceived=new a.EventDispatcher,this.onLicenseCallFailed=new a.EventDispatcher,this.qualityChangeService=new r.default,this.ssaiService=new s.SsaiService,this.stateMachineCallbacks=n({},l.defaultStateMachineCallbacks),this.sourceInfoFallbackService=new o.SourceInfoFallbackService,this.drmPerformanceInfo=void 0,this.windowEventTracker=new h.WindowEventTracker,e||(e={starttime:void 0}),e.starttime||(e.starttime=(0,p.getCurrentTimestamp)()),this.opts=e}return e.prototype.release=function(){this.stateMachine.resetIntervals(),this.stateMachineCallbacks.release(),this.resetSourceRelatedState(),this.windowEventTracker.release()},e.prototype.eventCallback=function(e,t,i){void 0===i&&(i=Date.now()),t=t||{},this.stateMachine?this.stateMachine.callEvent(e,t,i):d.logger.log("Bitmovin Analytics: StateMachine isn't ready yet")},e.prototype.getCommonPlaybackInfo=function(){var e=(0,c.getGlobalScreenDimensions)();return{screenHeight:null==e?void 0:e.height,screenWidth:null==e?void 0:e.width}},e.prototype.getDrmPerformanceInfo=function(){},e.prototype.getSegmentInfo=function(){return[]},e.prototype.getDownloadSpeedInfo=function(){return{segmentsDownloadCount:0,segmentsDownloadSize:0,segmentsDownloadTime:0,avgDownloadSpeed:0,minDownloadSpeed:0,maxDownloadSpeed:0,avgTimeToFirstByte:0}},e.prototype.resetDownloadSpeedInfoMeasures=function(){},e.prototype.setCustomData=function(e){var t=this.stateMachine.currentState,i={customDataValues:e,currentTime:this.currentTime};!this.stateMachine.currentState||"PAUSE"!==this.stateMachine.currentState&&"PLAYING"!==this.stateMachine.currentState?this.stateMachineCallbacks.customdatachange(void 0,void 0,i):(this.eventCallback(u.Event.CUSTOM_DATA_CHANGE,{currentTime:this.currentTime}),this.eventCallback(u.Event[t],i))},e.prototype.sourceChange=function(e){this.eventCallback(u.Event.MANUAL_SOURCE_CHANGE,{currentTime:this.currentTime,config:e})},e.prototype.resetSourceRelatedState=function(){this.sourceInfoFallbackService.reset(),this.drmPerformanceInfo=void 0},e.prototype.programChange=function(e){var t=this.ssaiService.isInActiveState();this.stateMachine.programChange(this.currentTime,t,e)},e}();t.InternalAdapter=m},5517:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AdQuartile=t.AdCallbacks=void 0;var i,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(){},this.onPause=function(){},this.onBeforeUnload=function(){}};t.AdCallbacks=n,function(e){e.FIRST_QUARTILE="firstQuartile",e.MIDPOINT="midpoint",e.THIRD_QUARTILE="thirdQuartile"}(i||(t.AdQuartile=i={}))},7596:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsStateMachine=void 0;var a=i(7906),r=i(3458),o=i(2361),s=i(1916),u=i(4649),l=i(5063),c=i(5063),d=[3e3,5e3,1e4,3e4,59700],p=function(){function e(e,t,i){this.stateMachineCallbacks=e,this.onEnterStateTimestamp=0,this.videoStartupTimeoutMs=u.ANALYTICS_VIDEOSTART_TIMEOUT,this.bufferTimeoutMs=u.ANALYTICS_BUFFER_TIMEOUT,this.currentBufferingIntervalIndex=0,this.stateMachine=this.createStateMachine(i),this.playingHeartbeatService=t}return e.prototype.callEvent=function(e,t,i){var n=this.stateMachine[e];if(null!=n)try{n.call(this.stateMachine,i,t)}catch(n){s.logger.error('StateMachine ignored event "'.concat(e,'" call, because it has thrown exception in the current state "').concat(this.currentState,'"'),t,i,n)}else s.logger.warn('StateMachine ignored event "'.concat(e,'" call, because it was not defined'),t,i)},Object.defineProperty(e.prototype,"currentState",{get:function(){return this.stateMachine.current},enumerable:!1,configurable:!0}),e.prototype.resetIntervals=function(){this.clearVideoStartTimeout(),this.clearBufferingTimeoutHandle(!0),this.clearBufferingHeartbeatHandle()},e.prototype.startBufferingHeartbeatInterval=function(e){var t=this;void 0===e&&(e=!0),this.resetBufferingHelpers(e),this.startBufferingTimeoutHandle(),this.bufferingHeartbeatIntervalHandle=setInterval((function(){var e=t.stateMachine.current.toLowerCase();if("buffering"===e){var i=(new Date).getTime(),n=i-t.onEnterStateTimestamp;t.stateMachineCallbacks.heartbeat(n,e,{buffered:n}),t.onEnterStateTimestamp=i,t.currentBufferingIntervalIndex=Math.min(t.currentBufferingIntervalIndex+1,d.length-1),t.startBufferingHeartbeatInterval(!1)}else t.resetBufferingHelpers()}),d[this.currentBufferingIntervalIndex])},e.prototype.resetBufferingHelpers=function(e){void 0===e&&(e=!0),e&&(this.currentBufferingIntervalIndex=0),this.clearBufferingHeartbeatHandle(),this.clearBufferingTimeoutHandle(e)},e.prototype.clearBufferingHeartbeatHandle=function(){(0,c.isNotNullish)(this.bufferingHeartbeatIntervalHandle)&&(clearInterval(this.bufferingHeartbeatIntervalHandle),this.bufferingHeartbeatIntervalHandle=void 0)},e.prototype.startBufferingTimeoutHandle=function(){var e=this;this.currentBufferingIntervalIndex>0||(this.bufferingTimeoutHandle=setTimeout((function(){e.callEvent(o.Event.ERROR,n(n({},r.ErrorCode.BUFFERING_TIMEOUT_REACHED),{data:{additionalData:"StateMachine timed out after ".concat(e.bufferTimeoutMs," ms of consecutive buffering.")}}),l.getCurrentTimestamp()),e.stateMachineCallbacks.release()}),this.bufferTimeoutMs))},e.prototype.clearBufferingTimeoutHandle=function(e){e&&(0,c.isNotNullish)(this.bufferingTimeoutHandle)&&(clearTimeout(this.bufferingTimeoutHandle),this.bufferingTimeoutHandle=void 0)},e.prototype.setVideoStartTimeout=function(){var e=this;(0,c.isNotNullish)(this.videoStartTimeout)&&this.clearVideoStartTimeout(),this.videoStartTimeout=setTimeout((function(){e.callEvent(o.Event.VIDEOSTART_TIMEOUT,{},Date.now()),e.stateMachineCallbacks.release()}),this.videoStartupTimeoutMs)},e.prototype.clearVideoStartTimeout=function(){clearTimeout(this.videoStartTimeout),this.videoStartTimeout=void 0},e.prototype.onHeartbeat=function(e){this.sendPlayingSample(Date.now(),e)},e.prototype.sendPlayingSample=function(e,t,i,n){void 0===i&&(i=!1),void 0===n&&(n=!1);var r=this.stateMachine.current.toLowerCase();if("playing"===r){this.stateMachineCallbacks.setVideoTimeEndFromEvent({currentTime:t});var o=e-this.onEnterStateTimestamp,u={played:o,isProgramChange:!!n||void 0};i&&(u[a.SSAI_RELATED_SAMPLE_MARKER]=!0),this.stateMachineCallbacks.heartbeat(o,r,u),this.resetCurrentStateStart(e,t)}else s.logger.warn('Unexpected call of "sendPlayingSample" in AnalyticsStateMachine from "'.concat(r,'" state'))},e.prototype.resetCurrentStateStart=function(e,t){this.onEnterStateTimestamp=e,this.stateMachineCallbacks.setVideoTimeStartFromEvent({currentTime:t})},e.prototype.programChange=function(e,t,i){if("SETUP"!==this.stateMachine.current&&"READY"!==this.stateMachine.current&&"STARTUP"!==this.stateMachine.current&&"STARTUP_AUTOPLAY"!==this.stateMachine.current){var n=Date.now();"PLAYING"===this.stateMachine.current?this.sendPlayingSample(n,e,t,!0):this.resetCurrentStateStart(n,e),this.stateMachineCallbacks.programChange(i)}else this.stateMachineCallbacks.updateSourceMetadata(i)},e}();t.AnalyticsStateMachine=p},2403:function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(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 i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,a=0,r=t.length;a<r;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Bitmovin8AnalyticsStateMachine=void 0;var o,s,u=i(2595),l=i(2361),c=i(3565),d=i(1652),p=i(1916),h=i(1460),m=i(5063),f=i(7596),v=i(8253);!function(e){e.AD_PAUSE="AD_PAUSE",e.AD_PLAYING="AD_PLAYING",e.AD_READY="AD_READY",e.AD_STARTUP="AD_STARTUP",e.AUDIOTRACK_CHANGING="AUDIOTRACK_CHANGING",e.BUFFERING="BUFFERING",e.CASTING="CASTING",e.CUSTOMDATACHANGE="CUSTOMDATACHANGE",e.END="END",e.END_PLAY_SEEKING="END_PLAY_SEEKING",e.ERROR="ERROR",e.INITIAL_SOURCE_CHANGE="INITIAL_SOURCE_CHANGE",e.MUTING_PAUSE="MUTING_PAUSE",e.MUTING_PLAY="MUTING_PLAY",e.MUTING_READY="MUTING_READY",e.PAUSE="PAUSE",e.PLAY_SEEKING="PLAY_SEEKING",e.PLAYING="PLAYING",e.QUALITY_CHANGE="QUALITY_CHANGE",e.READY="READY",e.SETUP="SETUP",e.SOURCE_CHANGING="SOURCE_CHANGING",e.STARTUP="STARTUP",e.STARTUP_AUTOPLAY="STARTUP_AUTOPLAY",e.SUBTITLE_CHANGING="SUBTITLE_CHANGING",e.VIDEOSTART_FAILED="VIDEOSTART_FAILED"}(o||(o={})),function(e){e.PAUSE_AFTER_SOURCE_LOADED="PAUSE_AFTER_SOURCE_LOADED",e.PAUSE_BEFORE_SOURCE_LOADED="PAUSE_BEFORE_SOURCE_LOADED"}(s||(s={}));var A=function(e){function t(t,i,n){var a=e.call(this,t,i,n)||this;return a.debuggingStates=[],a.enabledDebugging=!1,a.sourceLoadedDuringAutoplayStartup=!1,a}return a(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(o).map((function(e){return o[e]}))},t.prototype.createStateMachine=function(e){var t,i=this;return u.create({initial:{state:o.SETUP,event:l.JSM_INITIAL_EVENT},error:v.customStateMachineErrorCallback,events:r(r([{name:l.Event.SOURCE_LOADED,from:[o.SETUP,o.ERROR,o.SOURCE_CHANGING,o.INITIAL_SOURCE_CHANGE],to:o.READY},{name:l.Event.PLAY,from:o.READY,to:o.STARTUP},{name:l.Event.PLAYING,from:o.READY,to:o.PLAYING},(0,v.on)(l.Event.READY).stayIn(o.READY),{name:l.Event.ERROR,from:[o.STARTUP,o.AD_STARTUP,o.STARTUP_AUTOPLAY],to:o.VIDEOSTART_FAILED},{name:l.Event.UNLOAD,from:[o.STARTUP,o.AD_STARTUP,o.STARTUP_AUTOPLAY],to:o.VIDEOSTART_FAILED},{name:l.Event.VIDEOSTART_TIMEOUT,from:[o.STARTUP,o.STARTUP_AUTOPLAY],to:o.VIDEOSTART_FAILED},{name:l.Event.SOURCE_UNLOADED,from:[o.STARTUP,o.STARTUP_AUTOPLAY],to:o.VIDEOSTART_FAILED},{name:l.Event.MANUAL_SOURCE_CHANGE,from:[o.STARTUP,o.STARTUP_AUTOPLAY],to:o.VIDEOSTART_FAILED},{name:l.Event.TIMECHANGED,from:[o.STARTUP,o.STARTUP_AUTOPLAY],to:o.PLAYING},(0,v.on)(l.Event.PLAY).stayIn(o.STARTUP),(0,v.on)(l.Event.PLAYING).stayIn(o.STARTUP),(0,v.on)(l.Event.START_BUFFERING).stayIn(o.STARTUP),(0,v.on)(l.Event.END_BUFFERING).stayIn(o.STARTUP),(0,v.on)(l.Event.VIDEO_CHANGE).stayIn(o.STARTUP),(0,v.on)(l.Event.AUDIO_CHANGE).stayIn(o.STARTUP),(0,v.on)(l.Event.READY).stayIn(o.STARTUP),{name:l.Event.PAUSE,from:o.STARTUP,to:o.READY},{name:l.Event.LOADSTART_AUTOPLAY,from:[o.SETUP,o.SOURCE_CHANGING,o.INITIAL_SOURCE_CHANGE],to:o.STARTUP_AUTOPLAY},{name:s.PAUSE_BEFORE_SOURCE_LOADED,from:o.STARTUP_AUTOPLAY,to:o.INITIAL_SOURCE_CHANGE},{name:s.PAUSE_AFTER_SOURCE_LOADED,from:o.STARTUP_AUTOPLAY,to:o.READY}],(0,v.whileIn)(o.STARTUP_AUTOPLAY).passOver(l.Event.PAUSE,l.Event.SOURCE_LOADED),!0),[(0,v.on)(l.Event.PLAYING).stayIn(o.PLAYING),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.PLAYING),(0,v.on)(l.Event.END_BUFFERING).stayIn(o.PLAYING),{name:l.Event.START_BUFFERING,from:o.PLAYING,to:o.BUFFERING},{name:l.Event.END_BUFFERING,from:o.BUFFERING,to:o.PLAYING},(0,v.on)(l.Event.TIMECHANGED).stayIn(o.BUFFERING),{name:l.Event.PAUSE,from:o.PLAYING,to:o.PAUSE},{name:l.Event.PAUSE,from:o.BUFFERING,to:o.PAUSE},{name:l.Event.PLAY,from:o.PAUSE,to:o.PLAYING},{name:l.Event.VIDEO_CHANGE,from:o.PLAYING,to:o.QUALITY_CHANGE},{name:l.Event.AUDIO_CHANGE,from:o.PLAYING,to:o.QUALITY_CHANGE},{name:l.Event.FINISH_QUALITY_CHANGE,from:o.QUALITY_CHANGE,to:o.PLAYING},{name:l.Event.SEEK,from:o.PLAYING,to:o.PLAY_SEEKING},{name:l.Event.PLAY,from:o.PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.PLAYING,from:o.PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.SEEKED,from:o.PLAY_SEEKING,to:o.END_PLAY_SEEKING},{name:l.Event.SEEK,from:o.END_PLAY_SEEKING,to:o.PLAY_SEEKING},{name:l.Event.PLAYING,from:o.END_PLAY_SEEKING,to:o.PLAYING},{name:l.Event.TIMECHANGED,from:o.END_PLAY_SEEKING,to:o.PLAYING},{name:l.Event.PAUSE,from:[o.PLAY_SEEKING,o.END_PLAY_SEEKING],to:o.PAUSE},(0,v.on)(l.Event.SEEK).stayIn(o.PLAY_SEEKING),(0,v.on)(l.Event.START_BUFFERING).stayIn(o.PLAY_SEEKING),(0,v.on)(l.Event.END_BUFFERING).stayIn(o.PLAY_SEEKING),(0,v.on)(l.Event.START_BUFFERING).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.END_BUFFERING).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.SEEKED).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.PLAY).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.SEEK).stayIn(o.PAUSE),(0,v.on)(l.Event.SEEKED).stayIn(o.PAUSE),(0,v.on)(l.Event.SEEKED).stayIn(o.PLAYING),{name:l.Event.END,from:o.PLAY_SEEKING,to:o.END},{name:l.Event.END,from:o.PLAYING,to:o.END},{name:l.Event.END,from:o.PAUSE,to:o.END},(0,v.on)(l.Event.SEEK).stayIn(o.END),(0,v.on)(l.Event.SEEKED).stayIn(o.END),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.END),(0,v.on)(l.Event.END_BUFFERING).stayIn(o.END),(0,v.on)(l.Event.START_BUFFERING).stayIn(o.END),(0,v.on)(l.Event.END).stayIn(o.END),{name:l.Event.PLAY,from:o.END,to:o.STARTUP},{name:l.Event.ERROR,from:this.getAllStatesBut([o.STARTUP,o.STARTUP_AUTOPLAY]),to:o.ERROR},{name:l.Event.UNLOAD,from:this.getAllStatesBut([o.STARTUP,o.STARTUP_AUTOPLAY,o.AD_STARTUP]),to:o.END},{name:l.Event.SUBTITLE_CHANGE,from:o.PLAYING,to:o.SUBTITLE_CHANGING},(0,v.on)(l.Event.SUBTITLE_CHANGE).stayIn(o.PAUSE),(0,v.on)(l.Event.SUBTITLE_CHANGE).stayIn(o.BUFFERING),(0,v.on)(l.Event.SUBTITLE_CHANGE).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.SUBTITLE_CHANGE).stayIn(o.SUBTITLE_CHANGING),{name:l.Event.TIMECHANGED,from:o.SUBTITLE_CHANGING,to:o.PLAYING},{name:l.Event.AUDIOTRACK_CHANGED,from:o.PLAYING,to:o.AUDIOTRACK_CHANGING},(0,v.on)(l.Event.AUDIOTRACK_CHANGED).stayIn(o.PAUSE),(0,v.on)(l.Event.AUDIOTRACK_CHANGED).stayIn(o.BUFFERING),(0,v.on)(l.Event.AUDIOTRACK_CHANGED).stayIn(o.END_PLAY_SEEKING),(0,v.on)(l.Event.AUDIOTRACK_CHANGED).stayIn(o.AUDIOTRACK_CHANGING),{name:l.Event.TIMECHANGED,from:o.AUDIOTRACK_CHANGING,to:o.PLAYING},{name:l.Event.START_AD,from:o.STARTUP,to:o.AD_STARTUP},{name:l.Event.END_AD,from:o.AD_STARTUP,to:o.STARTUP},(0,v.on)(l.Event.PLAY).stayIn(o.AD_STARTUP),(0,v.on)(l.Event.PAUSE).stayIn(o.AD_STARTUP),{name:l.Event.START_AD,from:o.READY,to:o.AD_READY},{name:l.Event.END_AD,from:o.AD_READY,to:o.STARTUP},(0,v.on)(l.Event.PLAY).stayIn(o.AD_READY),(0,v.on)(l.Event.PAUSE).stayIn(o.AD_READY),{name:l.Event.START_AD,from:o.PAUSE,to:o.AD_PAUSE},{name:l.Event.END_AD,from:o.AD_PAUSE,to:o.PAUSE},(0,v.on)(l.Event.PLAY).stayIn(o.AD_PAUSE),(0,v.on)(l.Event.PAUSE).stayIn(o.AD_PAUSE),{name:l.Event.START_AD,from:o.PLAYING,to:o.AD_PLAYING},{name:l.Event.END_AD,from:o.AD_PLAYING,to:o.PLAYING},(0,v.on)(l.Event.PLAY).stayIn(o.AD_PLAYING),(0,v.on)(l.Event.PAUSE).stayIn(o.AD_PLAYING),{name:l.Event.END,from:o.AD_PLAYING,to:o.END},(0,v.on)(l.Event.TIMECHANGED).stayIn(o.AD_STARTUP),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.AD_READY),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.AD_PAUSE),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.AD_PLAYING),(0,v.on)(l.Event.END_AD).stayIn(o.PLAYING),(0,v.on)(l.Event.END_AD).stayIn(o.PAUSE),(0,v.on)(l.Event.END_AD).stayIn(o.READY),(0,v.on)(l.Event.END_AD).stayIn(o.STARTUP),{name:l.Event.MUTE,from:o.READY,to:o.MUTING_READY},{name:l.Event.UN_MUTE,from:o.READY,to:o.MUTING_READY},{name:"FINISH_MUTING",from:o.MUTING_READY,to:o.READY},{name:l.Event.MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:l.Event.UN_MUTE,from:o.PLAYING,to:o.MUTING_PLAY},{name:"FINISH_MUTING",from:o.MUTING_PLAY,to:o.PLAYING},{name:l.Event.MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:l.Event.UN_MUTE,from:o.PAUSE,to:o.MUTING_PAUSE},{name:"FINISH_MUTING",from:o.MUTING_PAUSE,to:o.PAUSE},{name:l.Event.START_CAST,from:[o.READY,o.PAUSE,o.PLAYING],to:o.CASTING},(0,v.on)(l.Event.PAUSE).stayIn(o.CASTING),(0,v.on)(l.Event.PLAY).stayIn(o.CASTING),(0,v.on)(l.Event.PLAYING).stayIn(o.CASTING),(0,v.on)(l.Event.TIMECHANGED).stayIn(o.CASTING),(0,v.on)(l.Event.MUTE).stayIn(o.CASTING),(0,v.on)(l.Event.UN_MUTE).stayIn(o.CASTING),(0,v.on)(l.Event.SEEK).stayIn(o.CASTING),(0,v.on)(l.Event.SEEKED).stayIn(o.CASTING),{name:l.Event.END_CAST,from:o.CASTING,to:o.READY},(0,v.on)(l.Event.SEEK).stayIn(o.READY),(0,v.on)(l.Event.SEEKED).stayIn(o.READY),(0,v.on)(l.Event.SEEKED).stayIn(o.STARTUP),{name:l.Event.MANUAL_SOURCE_CHANGE,from:this.getAllStatesBut([o.SETUP,o.STARTUP,o.STARTUP_AUTOPLAY]),to:o.SOURCE_CHANGING},{name:l.Event.MANUAL_SOURCE_CHANGE,from:o.SETUP,to:o.INITIAL_SOURCE_CHANGE},{name:l.Event.SOURCE_UNLOADED,from:this.getAllStatesBut([o.STARTUP,o.STARTUP_AUTOPLAY]),to:o.SOURCE_CHANGING},{name:l.Event.CUSTOM_DATA_CHANGE,from:[o.PLAYING,o.PAUSE],to:o.CUSTOMDATACHANGE},{name:l.Event.PLAYING,from:o.CUSTOMDATACHANGE,to:o.PLAYING},{name:l.Event.PAUSE,from:o.CUSTOMDATACHANGE,to:o.PAUSE}],!1),callbacks:(t={},t["onbefore".concat(l.Event.SOURCE_LOADED)]=function(e,t,n,a,r){t===o.STARTUP_AUTOPLAY&&(i.sourceLoadedDuringAutoplayStartup=!0)},t["onbefore".concat(l.Event.SOURCE_UNLOADED)]=function(e,t,n,a,r){return!(t===o.STARTUP_AUTOPLAY&&!i.sourceLoadedDuringAutoplayStartup)},t["onbefore".concat(l.Event.PAUSE)]=function(e,t,n,a,r){return t!==o.STARTUP_AUTOPLAY||(i.sourceLoadedDuringAutoplayStartup?i.stateMachine[s.PAUSE_AFTER_SOURCE_LOADED](a,r):i.stateMachine[s.PAUSE_BEFORE_SOURCE_LOADED](a,r),!1)},t["onleave".concat(o.END_PLAY_SEEKING)]=function(e,t,n,a,r){var s;if(n!==o.PLAY_SEEKING){var u=a-(null!==(s=i.seekStartTimestamp)&&void 0!==s?s:a);i.seekStartTimestamp=void 0,i.stateMachineCallbacks.setVideoTimeEndFromEvent(r),i.stateMachineCallbacks.seeking(u)}},t["onleave".concat(o.PLAYING)]=function(){i.playingHeartbeatService.stopHeartbeat()},t["onleave".concat(o.STARTUP_AUTOPLAY)]=function(){i.sourceLoadedDuringAutoplayStartup=!1,i.clearVideoStartTimeout()},t["onleave".concat(o.PLAY_SEEKING)]=function(e,t,n,a,r){var s;if(n!==o.END_PLAY_SEEKING){var u=a-(null!==(s=i.seekStartTimestamp)&&void 0!==s?s:a);i.seekStartTimestamp=void 0,i.stateMachineCallbacks.seeking(u)}},t.onleavestate=function(e,t,n,a,r){if((0,v.logStateMachineTransition)("LEAVE",e,t,n),e!==l.JSM_INITIAL_EVENT&&(t===o.BUFFERING&&i.resetBufferingHelpers(),a)){i.addStatesToLog(e,t,n,a,r);var u=a-i.onEnterStateTimestamp;r&&n!==o.END_PLAY_SEEKING&&i.stateMachineCallbacks.setVideoTimeEndFromEvent(r),r&&e!==l.Event.END_AD&&(i.lastTrackedVideoEndObject=r),t!==o.READY&&t!==o.AD_STARTUP||n!==o.STARTUP?t!==o.STARTUP||n!==o.PLAYING&&n!==o.AD_STARTUP||i.clearVideoStartTimeout():i.setVideoStartTimeout();var d=String(t).toLowerCase();if(n===o.VIDEOSTART_FAILED)i.clearVideoStartTimeout(),i.stateMachineCallbacks.videoStartFailed(u,(0,c.createVideoStartFailedReason)(e));else if(t===o.END_PLAY_SEEKING)(0,m.noOp)();else if(e===l.Event.UNLOAD)i.stateMachineCallbacks.unload(u,d);else if(t===o.AD_PAUSE||t===o.AD_READY||t===o.AD_PLAYING||t===o.AD_STARTUP)(0,m.isNotNullish)(i.lastTrackedVideoEndObject)&&(i.stateMachineCallbacks.setVideoTimeStartFromEvent(i.lastTrackedVideoEndObject),i.stateMachineCallbacks.setVideoTimeEndFromEvent(i.lastTrackedVideoEndObject)),i.stateMachineCallbacks.ad(u,"ad");else if(e===l.Event.START_AD&&t===o.STARTUP)(0,m.noOp)();else if(e===l.Event.SOURCE_LOADED&&t===o.INITIAL_SOURCE_CHANGE)(0,m.noOp)();else if(t===o.SETUP)i.stateMachineCallbacks.setup(1,o.SETUP.toLowerCase());else if(e===l.Event.PAUSE&&t===o.STARTUP&&n===o.READY||e===s.PAUSE_BEFORE_SOURCE_LOADED&&t===o.STARTUP_AUTOPLAY&&n===o.INITIAL_SOURCE_CHANGE||e===s.PAUSE_AFTER_SOURCE_LOADED&&t===o.STARTUP_AUTOPLAY&&n===o.READY)i.clearVideoStartTimeout();else if(t===o.STARTUP_AUTOPLAY)i.stateMachineCallbacks.startup(u,o.STARTUP.toLowerCase());else if(t!==o.ERROR){var h=i.stateMachineCallbacks[d];if((0,m.isFunction)(h))try{h(u,d,r)}catch(e){p.logger.error("Exception occurred in State Machine callback "+d,r,e)}else(0,v.logMissingCallbackWarning)(t,[o.READY,o.SOURCE_CHANGING])}r&&n!==o.END_PLAY_SEEKING&&t!==o.PLAY_SEEKING&&n!==o.PLAY_SEEKING&&t!==o.AD_STARTUP&&t!==o.AD_READY&&t!==o.AD_PLAYING&&t!==o.AD_PAUSE&&i.stateMachineCallbacks.setVideoTimeStartFromEvent(r),e===l.Event.MUTE?i.stateMachineCallbacks.mute():e===l.Event.UN_MUTE&&i.stateMachineCallbacks.unMute()}},t["onenter".concat(o.STARTUP_AUTOPLAY)]=function(){i.setVideoStartTimeout()},t["onenter".concat(o.PLAYING)]=function(){i.playingHeartbeatService.startHeartbeat()},t["onenter".concat(o.PLAY_SEEKING)]=function(e,t,n,a,r){t!==o.END_PLAY_SEEKING&&(i.seekStartTimestamp=a)},t["onenter".concat(o.QUALITY_CHANGE)]=function(e,t,n,a,r){i.stateMachineCallbacks.qualitychange(r),i.stateMachine[l.Event.FINISH_QUALITY_CHANGE](a)},t.onenterstate=function(t,n,a,r,s){(0,v.logStateMachineTransition)("ENTER",t,n,a),i.onEnterStateTimestamp=null!=r?r:Date.now(),(0,h.isNumber)(e.starttime)&&t===l.JSM_INITIAL_EVENT&&(i.onEnterStateTimestamp=e.starttime),!s||a===o.END_PLAY_SEEKING||n===o.PLAY_SEEKING||n===o.AD_STARTUP||n===o.AD_READY||n===o.AD_PLAYING||n===o.AD_PAUSE||t===l.Event.SEEK&&n===o.END_PLAY_SEEKING||i.stateMachineCallbacks.setVideoTimeStartFromEvent(s),t===l.Event.START_CAST&&a===o.CASTING&&i.stateMachineCallbacks.startCasting(r,s),a===o.BUFFERING&&i.startBufferingHeartbeatInterval()},t["onafter".concat(l.Event.ERROR)]=function(e,t,n,a,r){i.stateMachineCallbacks.error(r)},t["onafter".concat(l.Event.SOURCE_UNLOADED)]=function(e,t,n,a,r){i.sourceLoadedDuringAutoplayStartup=!1},t.onafterevent=function(e,t,n,a,r){e===l.Event.MANUAL_SOURCE_CHANGE&&t===o.SETUP?i.stateMachineCallbacks.initialSourceChange(r):e===l.Event.MANUAL_SOURCE_CHANGE&&i.stateMachineCallbacks.manualSourceChange(r),n!==o.MUTING_READY&&n!==o.MUTING_PLAY&&n!==o.MUTING_PAUSE||i.stateMachine.FINISH_MUTING(a)},t)})},t.prototype.getStates=function(){return this.debuggingStates},t.prototype.setEnabledDebugging=function(e){this.enabledDebugging=e},t.prototype.addStatesToLog=function(e,t,i,n,a){this.enabledDebugging&&this.debuggingStates.push(new d.EventDebugging(e,t,i,n,a))},t}(f.AnalyticsStateMachine);t.Bitmovin8AnalyticsStateMachine=A},8253:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logStateMachineTransition=t.logMissingCallbackWarning=t.customStateMachineErrorCallback=t.whileIn=t.on=void 0,t.getAllStates=s,t.getAllStatesBut=function(e,t){return s(t).filter((function(t){return e.indexOf(t)<0}))};var n=i(2595),a=i(1916),r=i(2974),o=i(5063);t.on=function(e){return{stayIn:function(t){return{name:e,from:t,to:t}}}};t.whileIn=function(e){var t=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return t.map((function(t){return{name:t,from:e,to:e}}))};return{runEventCallbacksFor:t,passOver:t}};t.customStateMachineErrorCallback=function(e,t,i,r,s,u,l){var c='StateMachine ignored event "'.concat(e,'", ').concat(u),d={eventName:e,from:t,to:i,args:(0,o.tryJSONStringify)(r),errorCode:s,errorMessage:u};s!==n.Error.INVALID_TRANSITION?a.logger.error(c,d):a.logger.log(c,d)};t.logMissingCallbackWarning=function(e,t){(void 0===t&&(t=[]),(0,o.isNullish)(e))||(0,o.isNullish)(t.find((function(t){return e===t})))&&a.logger.warn("Could not find StateMachine callback function for "+e)};function s(e){return(0,r.objectValues)(e)}t.logStateMachineTransition=function(e,t,i,n){"ENTER"===e?a.logger.log("[ENTER] ".concat((0,a.padRight)(n,20)," EVENT: ").concat((0,a.padRight)(t,20)," from ").concat((0,a.padRight)(i,20))):a.logger.log("[LEAVE] ".concat((0,a.padRight)(i,20)," EVENT: ").concat((0,a.padRight)(t,20)," to ").concat((0,a.padRight)(n,20)))}},8917:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AdAnalytics=void 0,t.buildInitialActiveAdBreakState=m,t.buildInitialActiveAdState=f;var a=i(5517),r=i(1916),o=i(1460),s=i(6481),u=i(5063),l=i(5063),c=i(2982),d=i(4926),p=i(3612),h=function(){function e(e,t){var i=this;this.onBeforeUnLoadEvent=!1,this.isPlaying=!1,this.adPodPosition=0,this.analytics=e,this.adapter=t,this.adapter.adCallbacks.onAdStarted=function(e){return i.onAdStarted(e)},this.adapter.adCallbacks.onAdFinished=function(e){return i.onAdFinished(e)},this.adapter.adCallbacks.onAdBreakStarted=function(e){return i.onAdBreakStarted(e)},this.adapter.adCallbacks.onAdBreakFinished=function(e){return i.onAdBreakFinished(e)},this.adapter.adCallbacks.onAdClicked=function(e){return i.onAdClicked(e)},this.adapter.adCallbacks.onAdError=function(e){return i.onAdError(e)},this.adapter.adCallbacks.onAdManifestLoaded=function(e){return i.onAdManifestLoaded(e)},this.adapter.adCallbacks.onPlay=function(){return i.onPlay()},this.adapter.adCallbacks.onPause=function(){return i.onPause()},this.adapter.adCallbacks.onBeforeUnload=function(){return i.onBeforeUnload()},this.adapter.adCallbacks.onAdSkipped=function(e){return i.onAdSkipped(e)},this.adapter.adCallbacks.onAdQuartile=function(e){return i.onAdQuartile(e)};var n=this.adapter.getContainer();(0,l.isNotNullish)(n)&&(this.viewportTracker=new p.ViewportTracker(n,(function(){return i.onIntersectionChanged()}),.5))}return e.prototype.release=function(){var e;this.clearCurrentTimeInterval(),null===(e=this.viewportTracker)||void 0===e||e.dispose(),this.adManifestDownloadTime=void 0},e.prototype.onIntersectionChanged=function(){this.activeAdState&&(this.isContainerInViewport()?this.enterViewportTimestamp=Date.now():this.enterViewportTimestamp&&(this.activeAdState.timeInViewport=(this.activeAdState.timeInViewport||0)+Date.now()-this.enterViewportTimestamp))},e.prototype.isContainerInViewport=function(){return!this.viewportTracker||this.viewportTracker.isInViewport()},e.prototype.onPlay=function(){if(this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdState){var e=Date.now();this.beginPlayingTimestamp=e,this.enterViewportTimestamp=e,this.isPlaying=!0}},e.prototype.onPause=function(){this.adapter&&this.adapter.isLinearAdActive()&&this.activeAdState&&(this.updatePlayingTime(this.activeAdState),this.isPlaying=!1)},e.prototype.onAdManifestLoaded=function(e){e.isVmap?this.sendAnalyticsRequest(m(e.adBreakInfo)):this.adManifestDownloadTime=e.manifestDownloadTime},e.prototype.onAdBreakStarted=function(e){this.adPodPosition=0,this.activeAdBreakState=m(n(n({},e),{manifestDownloadTime:this.adManifestDownloadTime})),delete this.adManifestDownloadTime,this.adStartupTimestamp=Date.now()},e.prototype.onAdBreakFinished=function(e){this.resetActiveAd(),this.activeAdBreakState=void 0},e.prototype.onAdStarted=function(e){e.isLinear&&(this.resetActiveAd(),this.activeAdState=f(e),this.currentTime=void 0,this.activeAdState.adStartupTime=this.adStartupTimestamp?Date.now()-this.adStartupTimestamp:void 0,this.startAd(this.activeAdState))},e.prototype.onAdFinished=function(e){if(this.activeAdBreakState&&this.activeAdState){var t=n({},this.activeAdState);t.completed=1,this.resetActiveAd(),this.completeAd(this.activeAdBreakState,t,t.adDuration)}},e.prototype.onAdSkipped=function(e){if(this.activeAdBreakState&&this.activeAdState){var t=n({},this.activeAdState);t.skipped=1,t.skipPosition=this.currentTime,t.skipPercentage=u.calculatePercentage(t.skipPosition,this.activeAdState.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakState,t,t.skipPosition)}},e.prototype.onAdError=function(e){var t,i,n=m(e.adBreakInfo),a=this.analytics.transformError({code:e.code,message:e.message,severity:"CRITICAL"},e);n.errorCode=a.code,n.errorData=(0,l.tryJSONStringify)({code:e.code,message:e.message}),n.errorMessage=a.message,n.errorSeverity=a.severity,this.activeAdState&&e.activeAdId&&this.activeAdState.adId===e.activeAdId&&(t=this.activeAdState,i=this.currentTime,t.errorPosition=this.currentTime,t.errorPercentage=u.calculatePercentage(t.errorPosition,t.adDuration)),this.completeAd(n,t,i)},e.prototype.onAdClicked=function(e){this.activeAdState&&(this.activeAdState.adClickthroughUrl=e.clickThroughUrl,this.activeAdState.clicked=1,this.activeAdState.clickPosition=this.currentTime,this.activeAdState.clickPercentage=u.calculatePercentage(this.activeAdState.clickPosition,this.activeAdState.adDuration))},e.prototype.onAdQuartile=function(e){this.activeAdState&&(e.quartile===a.AdQuartile.FIRST_QUARTILE?this.activeAdState.quartile1=1:e.quartile===a.AdQuartile.MIDPOINT?this.activeAdState.midpoint=1:e.quartile===a.AdQuartile.THIRD_QUARTILE&&(this.activeAdState.quartile3=1))},e.prototype.onBeforeUnload=function(){if(!this.onBeforeUnLoadEvent&&(this.onBeforeUnLoadEvent=!0,this.activeAdState&&this.activeAdBreakState)){var e=n({},this.activeAdState);e.closed=1,e.closePosition=this.currentTime,e.closePercentage=u.calculatePercentage(e.closePosition,e.adDuration),this.resetActiveAd(),this.completeAd(this.activeAdBreakState,e,e.closePosition)}},e.prototype.sendAnalyticsRequest=function(e,t){var i=n(n(n({},(0,s.buildAdSample)(this.analytics.sample)),e),t||f()),a=this.adapter.getAdModuleInfo();i.platform="web",i.analyticsVersion=d.VERSION,i.adModule=a.name,i.adModuleVersion=a.version,i.autoplay=this.adapter.getAutoPlay(),i.pageLoadType=u.getPageLoadType(),i.time=Date.now(),i.adImpressionId=(0,c.generateUUID)(),i.percentageInViewport=u.calculatePercentage(i.timeInViewport,i.timePlayed),this.analytics.backend.sendAdRequest(i)},e.prototype.updatePlayingTime=function(e){var t=Date.now();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 i=this;t.started=1,t.timePlayed=0,t.timeInViewport=0,t.adPodPosition=this.adPodPosition;var n=Date.now();this.beginPlayingTimestamp=n,this.enterViewportTimestamp=this.isContainerInViewport()?n:void 0,this.isPlaying=!0,this.currentTime=0,this.adPodPosition++,this.currentTimeInterval=setInterval((function(){try{null!=(null==t?void 0:t.adDuration)&&t.adDuration>0&&i.adapter.isLinearAdActive()&&(i.currentTime=u.calculateTime(Math.max(i.adapter.currentTime(),0)))}catch(e){r.logger.log("AdStarted monitoring interval failed and got cleared",e),i.resetActiveAd()}}),e.TIMEOUT_CURRENT_TIME_INTERVAL)},e.prototype.completeAd=function(e,t,i){void 0===t&&(t=f()),t.exitPosition=i,t.playPercentage=u.calculatePercentage(t.exitPosition,t.adDuration),(0,l.isNotNullish)(t.playPercentage)&&(0===t.quartile1&&t.playPercentage>=25&&(t.quartile1=1),0===t.midpoint&&t.playPercentage>=50&&(t.midpoint=1),0===t.quartile3&&t.playPercentage>=75&&(t.quartile3=1)),this.adStartupTimestamp=Date.now(),this.updatePlayingTime(t),this.isPlaying=!1,this.sendAnalyticsRequest(e,t)},e.prototype.resetActiveAd=function(){this.clearCurrentTimeInterval(),this.activeAdState=void 0},e.prototype.clearCurrentTimeInterval=function(){clearInterval(this.currentTimeInterval),delete this.currentTime},e.MODULE_NAME="ads",e.TIMEOUT_CURRENT_TIME_INTERVAL=100,e}();function m(e){var t,i={adFallbackIndex:0};if((0,l.isNullish)(e))return i;if(i.adIdPlayer=e.id,i.adReplaceContentDuration=u.calculateTimeWithUndefined(e.replaceContentDuration),i.adIsPersistent=e.persistent,i.adTagType=e.tagType,i.adTagUrl=e.tagUrl,i.adPreloadOffset=u.calculateTimeWithUndefined(e.preloadOffset),i.adFallbackIndex=null!==(t=e.fallbackIndex)&&void 0!==t?t:0,i.manifestDownloadTime=u.calculateTimeWithUndefined(e.manifestDownloadTime),"pre"===e.position||"post"===e.position?i.adPosition=e.position:(0,l.isNotNullish)(e.position)&&(i.adPosition="mid",i.adOffset=e.position),(0,l.isNotNullish)(i.adTagUrl))try{var n=new URL(i.adTagUrl);i.adTagServer=n.hostname,i.adTagPath=n.pathname}catch(e){}return(0,o.isFiniteNumber)(e.scheduleTime)&&(i.adScheduleTime=u.calculateTime(e.scheduleTime)),i}function f(e){var t,i={clicked:0,closed:0,completed:0,midpoint:0,quartile1:0,quartile3:0,skipped:0,started:0};if((0,l.isNullish)(e))return i;if(i.adClickthroughUrl=e.clickThroughUrl,i.adId=e.id,i.mediaUrl=e.mediaUrl,i.isLinear=e.isLinear,i.adPlaybackHeight=e.height,i.adPlaybackWidth=e.width,i.streamFormat=e.mimeType,(0,l.isNotNullish)(i.mediaUrl))try{var n=new URL(i.mediaUrl);i.mediaPath=n.pathname,i.mediaServer=n.hostname}catch(e){}(0,l.isNotNullish)(e.bitrate)&&(i.videoBitrate=1e3*e.bitrate);var a=e.vastData;return(0,l.isNotNullish)(a)&&(i.adSystem=a.adSystem,i.advertiserName=a.advertiserName,i.apiFramework=a.apiFramework,i.creativeAdId=a.creativeAdId,i.creativeId=a.creativeId,i.universalAdIdRegistry=a.universalAdIdRegistry,i.universalAdIdValue=a.universalAdIdValue,i.adDescription=a.adDescription,i.minSuggestedDuration=u.calculateTimeWithUndefined(a.minSuggestedDuration),i.surveyUrl=a.surveyUrl,i.adTitle=a.adTitle,i.wrapperAdsCount=a.wrapperAdsCount),(0,l.isNotNullish)(e.skippableAfter)&&(i.adSkipAfter=-1===e.skippableAfter?e.skippableAfter:u.calculateTime(e.skippableAfter)),i.adSkippable=null!==(t=e.skippable)&&void 0!==t?t:(0,l.isNotNullish)(i.adSkipAfter)?i.adSkipAfter>=0:void 0,i.adDuration=u.calculateTimeWithUndefined(e.duration),i}t.AdAnalytics=h},4350:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=void 0,t.setQualityInfoOnSample=L;var a=i(3588),r=i(3458),o=i(8525),s=i(3565),u=i(6845),l=i(5529),c=i(8331),d=i(404),p=i(5923),h=i(9422),m=i(1916),f=i(1460),v=i(6481),A=i(1820),E=i(5063),g=i(5063),y=i(2982),S=i(4926),T=i(8421),I=i(8917),D=i(3054),_=i(675),b=i(7721),N=i(2226),C=i(847),P=i(8918),R=i(7906),M=function(){function e(e,t,i,a,r,o,s){var u=this;this.adapter=t,this.backendFactory=i,this.sessionHandler=a,this.featureManager=r,this.onErrorDetailEventDispatcher=o,this.identicalErrorReportingLimiter=s,this.hasSentStartupSample=!1,this.droppedSampleFrames=0,this.playerStartupTime=0,this.authenticationCallback={authenticationCompleted:function(e,t){u.featureManager.configureFeatures(e,t)}},this.sourceChange=function(e){if(m.logger.log("Processing Source Change for Analytics",e),(0,g.isNullish)(e))u.adapter.sourceChange(u.config);else{(0,c.guardConfigChangeAgainstMissingTitle)(u.config,e),(0,c.guardConfigChangeAgainstMissingIsLive)(u.config,e),(0,c.guardAgainstDuplicatedUserId)(e);var t=(0,c.mergeAnalyticsConfig)(u.config,e);u.adapter.sourceChange(t)}},this.setCustomDataOnce=function(e){var t=n({},u.config);u.setState("customdatachange"),u.sendSample(e),u.config=n({},t),u.setConfigParameters(),u.setAutoDetectedDeviceInformation()},this.setCustomData=function(e){u.adapter.setCustomData(e)},this.getCurrentImpressionId=function(){return u.sample.impressionId},this.getUserId=function(){return u.sessionHandler.userId},this.changeCustomData=function(e){u.config=n(n({},u.config),(0,l.extractCustomDataFieldsOnly)(e)),u.setConfigParameters(),u.setAutoDetectedDeviceInformation()},this.config=e,this.sessionHandler=new C.SessionPersistenceHandler(this.config);var d=this;this.errorDetailTrackingSettingsProvider={get domain(){return(0,c.getDomainFromAnalyticsConfig)(d.config)},get licenseKey(){var e;return null!==(e=d.config.key)&&void 0!==e?e:""},get impressionId(){var e;return null!==(e=d.getCurrentImpressionId())&&void 0!==e?e:""},get collectorConfig(){return d.config.config}};var p=this.adapter.onLicenseKeyReceived.subscribe((function(e){u.config.key||(u.config.key=e.licenseKey),p()}));this.sample=this.buildInitialSample(),this.droppedSampleFrames=0,this.init(),this.setupStateMachineCallbacks();var h=this.adapter.initialize(this);this.featureManager.registerFeatures(h),this.adapter.adModule&&(this.adAnalytics=new I.AdAnalytics(this,this.adapter.adModule))}return Object.defineProperty(e.prototype,"version",{get:function(){return S.VERSION},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorDetailSubscribable",{get:function(){return this.onErrorDetailEventDispatcher},enumerable:!1,configurable:!0}),e.prototype.init=function(){if(!0===this.adapter.supportsDeferredLicenseLoading||(0,A.isValidString)(this.config.key)&&!(0,A.isBlank)(this.config.key)){m.logger.initialize(this.config.debug),this.featureManager.resetFeatures();var e=(0,c.getDomainFromAnalyticsConfig)(this.config);this.backend=this.backendFactory.createBackend(this.config,{key:this.config.key,domain:e,version:S.VERSION},this.adapter,this.authenticationCallback),this.hasSentStartupSample=!1,this.identicalErrorReportingLimiter.reset(),this.setConfigParameters(),this.setAutoDetectedDeviceInformation(),this.sample.impressionId=(0,y.generateUUID)(),this.sample.userId=this.sessionHandler.userId,this.adapter.videoCompletionTracker&&this.adapter.videoCompletionTracker.reset(),this.adapter.qualityChangeService.resetValues(),this.adapter.ssaiService.resetSourceRelatedState()}else m.logger.errorMessageToUser("Invalid analytics license key provided")},e.prototype.setConfigParameters=function(){var e;this.sample.key=this.config.key,this.sample.playerKey=this.config.playerKey,this.config.player&&(this.sample.player=this.config.player),this.sample.domain=(0,c.getDomainFromAnalyticsConfig)(this.config),this.sample.deviceInformation=(0,c.getDeviceInformationFromAnalyticsConfig)(this.config),this.sample.isLive=!!(0,g.isNotNullish)(this.config.isLive)&&this.config.isLive,this.sample.cdnProvider=this.config.cdnProvider,this.sample.videoId=this.config.videoId,this.sample.videoTitle=this.config.title,this.sample.customUserId=null!==(e=this.config.userId)&&void 0!==e?e:this.config.customUserId,E.transferCustomDataFields(this.config,this.sample),this.sample.experimentName=this.config.experimentName},e.prototype.setAutoDetectedDeviceInformation=function(){var e,t;if(!(0,g.isNotNullish)(null===(e=this.sample.deviceInformation)||void 0===e?void 0:e.model)&&(0,h.hasGlobalWebOSApi)()){var i=(0,T.getWebOSTVModelName)();(0,g.isNullish)(i)||(this.sample.deviceInformation=null!==(t=this.sample.deviceInformation)&&void 0!==t?t:{},this.sample.deviceInformation.model=i)}},e.prototype.setupStateMachineCallbacks=function(){var e=this;this.adapter.stateMachineCallbacks.setup=function(t,i){var n,a;m.logger.log("Setup bitmovin analytics "+e.sample.analyticsVersion+" with impressionId: "+e.sample.impressionId),e.setDuration(t),e.setState(i),e.sample.playerStartupTime=t,e.playerStartupTime=e.sample.playerStartupTime;var r=null===(a=null===(n=p.globalScope.performance)||void 0===n?void 0:n.timing)||void 0===a?void 0:a.navigationStart;if((0,g.isNotNullish)(r)&&(0,f.isFiniteNumber)(r)){var o=Math.round(Date.now()-p.globalScope.performance.timing.navigationStart);e.sample.pageLoadTime=o}e.sendSample()},this.adapter.stateMachineCallbacks.startup=function(t,i){e.setState(i),e.sample.supportedVideoCodecs=d.CodecHelper.supportedVideoFormats;var n=Math.max(t,1);e.setDuration(n),e.sample.videoStartupTime=n,e.sample.startupTime=(e.playerStartupTime||0)+n,e.sample.autoplay=e.adapter.getAutoPlay();var a=e.adapter.getDrmPerformanceInfo();(0,g.isNotNullish)(a)&&(e.sample.drmType=a.drmType,e.sample.drmLoadTime=a.drmLoadTime);var r=e.adapter.getCurrentPlaybackInfo(),o=r.videoBitrate,s=r.audioBitrate;e.adapter.qualityChangeService.setStartupHasFinished(o,s),e.hasSentStartupSample=!0,e.sendSample()},this.adapter.stateMachineCallbacks.programChange=function(t){e.playerStartupTime=0,e.config=(0,c.applySourceMetadataToAnalyticsConfig)(e.config,t),e.sample=e.buildInitialSample(),e.sample.path=(0,A.isValidString)(t.path)?t.path:(0,v.getDefaultSamplePath)(),e.init(),e.setState("programchange"),e.sample.isProgramChange=!0,e.sample.supportedVideoCodecs=d.CodecHelper.supportedVideoFormats;e.setDuration(1),e.sample.videoStartupTime=1,e.sample.startupTime=1,e.sample.autoplay=e.adapter.getAutoPlay(),e.sample.drmType=void 0,e.sample.drmLoadTime=void 0;var i=e.adapter.getCurrentPlaybackInfo(),n=i.videoBitrate,a=i.audioBitrate;e.adapter.qualityChangeService.setStartupHasFinished(n,a),e.hasSentStartupSample=!0,e.sendSample()},this.adapter.stateMachineCallbacks.updateSourceMetadata=function(t){e.config=(0,c.applySourceMetadataToAnalyticsConfig)(e.config,t),e.setConfigParameters(),e.setAutoDetectedDeviceInformation(),e.sample.path=(0,A.isValidString)(t.path)?t.path:(0,v.getDefaultSamplePath)()},this.adapter.stateMachineCallbacks.playing=function(t,i){e.setDuration(t),e.setState(i),e.sample.played=t,e.setCompletionValues(),e.sendSample()},this.adapter.stateMachineCallbacks.unload=function(t,i){var n=e.sample.videoTimeStart;"playing"===i&&(e.setDuration(t),e.setState(i),e.sample.played=t,e.setCompletionValues(),(0,f.isNumber)(e.sample.videoTimeEnd)&&(n=e.sample.videoTimeEnd),e.backend.sendUnloadRequest(e.sample),(0,v.clearSampleStateValues)(e.sample)),e.hasSentStartupSample&&(e.setVideoTimeStart(n),e.setVideoTimeEnd(n),e.setState("closed"),e.backend.sendUnloadRequest(e.sample),(0,v.clearSampleStateValues)(e.sample))},this.adapter.stateMachineCallbacks.heartbeat=function(t,i,a){e.setState(i),e.setDuration(t),e.sample=n(n({},e.sample),a),"playing"===i&&e.setCompletionValues(),e.sendSample()},this.adapter.stateMachineCallbacks.qualitychange=function(t){e.adapter.qualityChangeService.startResetInterval(),e.adapter.qualityChangeService.increaseCounter(),e.adapter.qualityChangeService.hasExceededQualityChangeThreshold()?e.adapter.stateMachineCallbacks.error({code:r.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.code,message:r.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.message,errorSeverity:r.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.errorSeverity,legacyData:void 0,data:{},currentTime:t.currentTime}):(e.setState("qualitychange"),e.setDuration(0),e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.adapter.stateMachineCallbacks.updateSampleQualityInfo(t),e.sendSample())},this.adapter.stateMachineCallbacks.updateSampleQualityInfo=function(t){"audio"===t.type?((0,f.isNumber)(t.bitrate)&&(e.sample.audioBitrate=t.bitrate),(0,A.isValidString)(t.codec)&&(e.sample.audioCodec=t.codec)):"video"===t.type&&((0,f.isNumber)(t.bitrate)&&(e.sample.videoBitrate=t.bitrate),(0,A.isValidString)(t.codec)&&(e.sample.videoCodec=t.codec),(0,f.isNumber)(t.height)&&(e.sample.videoPlaybackHeight=t.height),(0,f.isNumber)(t.width)&&(e.sample.videoPlaybackWidth=t.width))},this.adapter.stateMachineCallbacks.audiotrack_changing=function(){e.sendSample()},this.adapter.stateMachineCallbacks.pause=function(t,i){e.setDuration(t),e.setState(i),e.sample.paused=t,e.sendSample()},this.adapter.stateMachineCallbacks.seeking=function(t){e.setDuration(t),e.setState("seeking"),e.sample.seeked=t,e.sendSample()},this.adapter.stateMachineCallbacks.buffering=function(t,i){e.setDuration(t),e.setState(i),e.sample.buffered=t,e.sendSample()},this.adapter.stateMachineCallbacks.videoStartFailed=function(t,i){e.setState("startup"),e.sample.videoStartFailed=!0,e.sample.videoStartFailedReason=i,e.sample.duration=t,i!==s.VideoStartFailedReason.PLAYER_ERROR&&(i===s.VideoStartFailedReason.TIMEOUT&&(e.sample.errorCode=r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.code,e.sample.errorMessage=r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.message,e.sample.errorSeverity=r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.errorSeverity,e.onErrorDetailEventDispatcher.dispatch({code:r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.code,message:r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.message,severity:r.ErrorCode.VIDEO_STARTUP_TIMEOUT_REACHED.errorSeverity})),e.sendSample())},this.adapter.stateMachineCallbacks.error=function(t){var i,n=e.transformError({code:t.code,message:t.message,severity:null!==(i=t.errorSeverity)&&void 0!==i?i:"CRITICAL"},t.originalError);!n.code||e.identicalErrorReportingLimiter.shouldReportError(n.code,n.severity)?(e.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent(t),e.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent(t),e.setState("error"),e.setDuration(0),e.sample.errorCode=n.code,e.sample.errorMessage=n.message,e.sample.errorSeverity=n.severity,e.sample.errorData=(0,g.tryJSONStringify)(t.legacyData),e.sample.errorSegments=e.adapter.getSegmentInfo().map((function(e){return e.name})),e.adapter.onError&&e.adapter.onError(),e.onErrorDetailEventDispatcher.dispatch({code:n.code,message:n.message,severity:n.severity,errorData:t.data}),e.sendSample()):m.logger.log("Bitmovin Analytics: Processing of the error with code ".concat(n.code," was ignored because the error limit was exceeded."))},this.adapter.stateMachineCallbacks.ad=function(t,i){e.setDuration(t),e.setState(i),e.sample.ad=a.AD_TYPE.CSAI,e.sendSample()},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.sendSample()},this.adapter.stateMachineCallbacks.setVideoTimeEndFromEvent=function(t){(0,f.isNumber)(null==t?void 0:t.currentTime)&&e.setVideoTimeEnd(E.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.setVideoTimeStartFromEvent=function(t){(0,f.isNumber)(null==t?void 0:t.currentTime)&&e.setVideoTimeStart(E.calculateTime(t.currentTime))},this.adapter.stateMachineCallbacks.manualSourceChange=function(t){e.adapter.resetSourceRelatedState(),e.sample=e.buildInitialSample(),e.droppedSampleFrames=0,e.playerStartupTime=0,e.config=Object.keys(t.config).length>0?t.config:e.config,e.init()},this.adapter.stateMachineCallbacks.initialSourceChange=function(t){e.config=t.config,e.setConfigParameters(),e.setAutoDetectedDeviceInformation()},this.adapter.stateMachineCallbacks.end=function(){e.sample=e.buildInitialSample(),e.droppedSampleFrames=0,e.playerStartupTime=0,e.init()},this.adapter.stateMachineCallbacks.release=function(){var t;e.backend=new N.NoOpBackend,null===(t=e.adAnalytics)||void 0===t||t.release(),e.adapter.qualityChangeService.stopResetInterval(),e.identicalErrorReportingLimiter.reset()},this.adapter.stateMachineCallbacks.customdatachange=function(t,i,n){(0,g.isNotNullish)(null==n?void 0:n.customDataValues)&&e.changeCustomData(n.customDataValues)}},e.prototype.setDuration=function(e){this.sample.duration=e},e.prototype.setState=function(e){this.sample.state=e},e.prototype.setPlaybackInfoFromAdapter=function(){var e=this.adapter.getCurrentPlaybackInfo();e&&(this.sample.isLive=(0,g.isNotNullish)(this.config.isLive)?this.config.isLive:e.isLive,(0,g.isNullish)(this.sample.isLive)&&(this.sample.isLive=!1),(0,A.isValidString)(e.size)&&(this.sample.size=e.size),(0,A.isValidString)(e.playerTech)&&(this.sample.playerTech=e.playerTech),(0,f.isNumber)(e.videoDuration)&&(this.sample.videoDuration=E.calculateTime(e.videoDuration||0)),(0,A.isValidString)(e.streamFormat)&&(this.sample.streamFormat=e.streamFormat),(0,A.isValidString)(e.mpdUrl)&&(this.sample.mpdUrl=e.mpdUrl),(0,A.isValidString)(e.m3u8Url)&&(this.sample.m3u8Url=e.m3u8Url),(0,A.isValidString)(e.progUrl)&&(this.sample.progUrl=e.progUrl),(0,f.isNumber)(e.videoWindowWidth)&&(this.sample.videoWindowWidth=e.videoWindowWidth),(0,f.isNumber)(e.videoWindowHeight)&&(this.sample.videoWindowHeight=e.videoWindowHeight),(0,f.isNumber)(e.screenHeight)&&(this.sample.screenHeight=e.screenHeight),(0,f.isNumber)(e.screenWidth)&&(this.sample.screenWidth=e.screenWidth),E.isBoolean(e.isMuted)&&(this.sample.isMuted=e.isMuted),E.isBoolean(e.isCasting)&&(this.sample.isCasting=e.isCasting),(0,A.isValidString)(e.castTech)&&(this.sample.castTech=e.castTech),(0,A.isValidString)(e.videoTitle)&&!this.config.title&&(this.sample.videoTitle=e.videoTitle),(0,A.isValidString)(e.audioCodec)&&(this.sample.audioCodec=e.audioCodec),(0,A.isValidString)(e.videoCodec)&&(this.sample.videoCodec=e.videoCodec),(0,A.isValidString)(e.audioLanguage)&&(this.sample.audioLanguage=e.audioLanguage),E.isBoolean(e.subtitleEnabled)&&(this.sample.subtitleEnabled=e.subtitleEnabled),(0,A.isValidString)(e.subtitleLanguage)?this.sample.subtitleLanguage=e.subtitleLanguage:this.sample.subtitleLanguage=void 0,(0,f.isNumber)(e.droppedFrames)&&(this.sample.droppedFrames=Math.max(e.droppedFrames-this.droppedSampleFrames,0),this.droppedSampleFrames=e.droppedFrames))},e.prototype.sendSample=function(e){if(this.setPlaybackInfoFromAdapter(),this.sample.time=E.getCurrentTimestamp(),this.sample.downloadSpeedInfo=this.adapter.getDownloadSpeedInfo(),this.adapter.resetDownloadSpeedInfoMeasures(),this.adapter.ssaiService.manipulate(this.sample),null!=e&&this.changeCustomData(e),(0,g.isNullish)(this.sample.videoBitrate)||this.sample.videoBitrate<=0){L(this.sample,this.adapter.getCurrentPlaybackInfo());var t=n({},this.sample);this.backend.sendRequest(t)}else{t=n({},this.sample);this.backend.sendRequest(t),L(this.sample,this.adapter.getCurrentPlaybackInfo())}(0,v.clearSampleStateValues)(this.sample)},e.prototype.sendSsaiEngagementAdSample=function(e){var t;if(!0===(null===(t=this.config.config)||void 0===t?void 0:t.ssaiEngagementTrackingEnabled))if((0,P.isSsaiEngagementStartedData)(e)){var i=(0,R.createStartedAdSample)(this.sample,e);this.backend.sendAdRequest(i)}else if((0,P.isSsaiEngagementQuartileData)(e)){i=(0,R.createQuartileAdSample)(this.sample,e);this.backend.sendAdRequest(i)}else if((0,P.isSsaiEngagementErrorData)(e)){e.analyticsError=this.transformError(e.analyticsError,e.originalError);var n=(0,R.createErrorAdSample)(this.sample,e);this.backend.sendAdRequest(n)}else;},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.transformError=function(e,t){var i,n,a={code:e.code,message:e.message,severity:e.severity};try{var r=null===(n=null===(i=this.config.config)||void 0===i?void 0:i.errorTransformerCallback)||void 0===n?void 0:n.transform(a,{originalError:t});a.code=(0,f.isNumber)(null==r?void 0:r.code)?null==r?void 0:r.code:a.code,a.message=(0,A.isValidString)(null==r?void 0:r.message)?null==r?void 0:r.message:a.message,a.severity=(0,A.isValidString)(null==r?void 0:r.severity)&&(0,g.isErrorSeverity)(null==r?void 0:r.severity)?r.severity:a.severity}catch(e){m.logger.error("Error in errorTransformerCallback",e)}return a},e.prototype.buildInitialSample=function(){var e,t=this.config.player||this.adapter.getPlayerName(),i=(0,h.getGlobalScreenDimensions)();return{ad:0,analyticsVersion:S.VERSION,audioBitrate:0,buffered:0,completedTotal:0,droppedFrames:0,duration:0,isLive:null!==(e=this.config.isLive)&&void 0!==e&&e,language:(0,h.getGlobalNavigatorLanguage)(),pageLoadTime:0,pageLoadType:E.getPageLoadType(),path:(0,v.getDefaultSamplePath)(),paused:0,platform:"web",played:0,player:t,playerStartupTime:0,playerTech:this.adapter.getPlayerTech(),screenHeight:null==i?void 0:i.height,screenWidth:null==i?void 0:i.width,seeked:0,size:o.PlayerSize.Window,startupTime:0,time:0,userAgent:(0,h.getGlobalNavigatorUserAgent)(),version:t+"-"+this.adapter.getPlayerVersion(),videoBitrate:0,videoDuration:0,videoPlaybackHeight:0,videoPlaybackWidth:0,videoStartupTime:0,videoTimeEnd:0,videoTimeStart:0,videoWindowHeight:0,videoWindowWidth:0}},e.create=function(t,i){return new e(t,i,new D.BackendFactory,new C.SessionPersistenceHandler(t),new u.FeatureManager,new _.EventDispatcher,new b.IdenticalErrorReportingLimiter)},e.version=S.VERSION,e}();function L(e,t){(0,f.isNumber)(t.videoPlaybackHeight)&&(e.videoPlaybackHeight=t.videoPlaybackHeight),(0,f.isNumber)(t.videoPlaybackWidth)&&(e.videoPlaybackWidth=t.videoPlaybackWidth),(0,f.isNumber)(t.videoBitrate)&&(e.videoBitrate=t.videoBitrate),(0,f.isNumber)(t.audioBitrate)&&(e.audioBitrate=t.audioBitrate)}t.Analytics=M},3054:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFactory=void 0;var n=i(5253),a=i(4649),r=i(7540),o=i(3489),s=i(399),u=i(2226),l=i(7390),c=function(){function e(){}return e.prototype.createBackend=function(e,t,i,n){if(!this.isEnabled(e))return new u.NoOpBackend;var a=this.createInnerBackend(e,t,i,n);return this.decorateWithDebuggingBackend(e,a)},e.prototype.decorateWithDebuggingBackend=function(e,t){return e.debug?new r.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,i,r){var u=e.config&&e.config.backendUrl||a.ANALYTICS_BACKEND_BASE_URL,c=new o.LicenseCheckingBackend(t,n.LicenseCall,u,i,r);c=this.decorateWithBackendFromConfigIfAvailable(e,c);var d=new l.SequenceNumberBackend(c);return new s.LongPlaytimeFilteringBackend(d)},e}();t.BackendFactory=c},7540:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DebuggingBackend=void 0;var n=i(1916),a=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.sendAdRequest=function(e){this.underlying.sendAdRequest(e)},e.prototype.printFields=function(e){if(this.debugFields&&this.debugFields.length){var t={};this.debugFields.forEach((function(i){return t[i]=e[i]})),n.logger.table([t])}},e}();t.DebuggingBackend=a},9664:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadSpeedMeter=void 0;var n=i(5766),a=i(3786),r=function(){function e(){this.measures=[]}return e.prototype.reset=function(){this.measures=[]},e.prototype.addMeasurement=function(e){if(!(e.httpStatus>=400)){var t=new a.Measure(e),i=n.Converter.bitsToBytes(3e8);t.speed>=i||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 n.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=r},675:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDispatcher=void 0;var i=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=i},2663:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeartbeatService=t.DEFAULT_HEARTBEAT_INTERVAL_MS=void 0,t.DEFAULT_HEARTBEAT_INTERVAL_MS=59700;var i=function(){function e(e){this.getPlayerCurrentTime=e}return e.prototype.setListener=function(e){this.listener=e},e.prototype.startHeartbeat=function(){var e=this;void 0!==this.heartbeatInterval&&this.clearHeartbeat(),this.heartbeatInterval=setInterval((function(){var t;null===(t=e.listener)||void 0===t||t.onHeartbeat(e.getPlayerCurrentTime())}),t.DEFAULT_HEARTBEAT_INTERVAL_MS)},e.prototype.stopHeartbeat=function(){this.clearHeartbeat()},e.prototype.clearHeartbeat=function(){clearTimeout(this.heartbeatInterval),this.heartbeatInterval=void 0},e}();t.HeartbeatService=i},7721:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdenticalErrorReportingLimiter=void 0;var i=function(){function e(){this._currentErrorCount=0}return e.prototype.shouldReportError=function(t,i){return t===this._lastErrorCode&&i===this._lastErrorSeverity?(this._currentErrorCount++,this._currentErrorCount<=e.MAX_IDENTICAL_ERROR_REPORTING):(this._lastErrorCode=t,this._lastErrorSeverity=i,this._currentErrorCount=1,!0)},e.prototype.reset=function(){this._lastErrorCode=void 0,this._lastErrorSeverity=void 0,this._currentErrorCount=0},e.MAX_IDENTICAL_ERROR_REPORTING=5,e}();t.IdenticalErrorReportingLimiter=i},3489:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCheckingBackend=void 0;var a=i(4501),r=i(1916),o=i(4649),s=i(2226),u=i(1125),l=i(2364),c=function(){function e(e,t,i,a,r){var l=this;this.licenseCall=t,this.backendBaseUrl=i,this.adapter=a,this.authenticationCallback=r,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=n({},e),this.backend=new u.QueueBackend,this.licenseCall=t,void 0!==e.key&&""!==e.key?this.promise=this.wrapLicenseCheckPromiseWithCallback(this.performLicenseCheck(),this.authenticationCallback):!0===a.supportsDeferredLicenseLoading?(a.onLicenseKeyReceived.subscribe(this.licenseKeyReceived),a.onLicenseCallFailed.subscribe(this.licenseCallFailed),this.licenseLazyLoadingTimeoutHandle=setTimeout(this.licenseLazyLoadingTimeout,o.ANALYTICS_LICENSECALL_TIMEOUT)):(r.authenticationCompleted(!1,void 0),this.backend=new s.NoOpBackend)}return e.prototype.performLicenseCheck=function(){var e=this,t=this.info,i=t.key,n=t.domain,o=t.version;if(!i||""===i){var u={status:a.LicensingResult.Denied,message:"No license key provided"};return this.backend=new s.NoOpBackend,Promise.resolve(u)}return this.licenseCall(i,n,o,this.backendBaseUrl).then((function(t){if(t.status!==a.LicensingResult.Granted)throw new Error(t.message);var n=new l.RemoteBackend(e.backendBaseUrl,i);return e.backend.flushTo(n),e.backend=n,t})).catch((function(t){return"Ignoring Impression due to DNT Header being set"===t.message?r.logger.error("License Check for Bitmovin Analytics failed because of",t):r.logger.errorMessageToUser("License Check for Bitmovin Analytics failed because of",t),e.backend=new s.NoOpBackend,{status:a.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.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===a.LicensingResult.Granted,e.features),e}))},e}();t.LicenseCheckingBackend=c},399:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LongPlaytimeFilteringBackend=void 0;var n=i(5063),a=function(){function e(e){this.nextBackend=e}return e.prototype.sendRequest=function(e){this.isPlayedAboveThreshold(e)||this.nextBackend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.isPlayedAboveThreshold(e)||this.nextBackend.sendUnloadRequest(e)},e.prototype.sendAdRequest=function(e){this.nextBackend.sendAdRequest(e)},e.prototype.isPlayedAboveThreshold=function(e){return((0,n.isNullish)(e.played)?0:e.played)>=9e4},e}();t.LongPlaytimeFilteringBackend=a},3786:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Measure=void 0;var i=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=i},2226:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoOpBackend=void 0;var i=function(){function e(){}return e.prototype.sendRequest=function(e){},e.prototype.sendUnloadRequest=function(e){},e.prototype.sendAdRequest=function(e){throw new Error("Method not implemented.")},e}();t.NoOpBackend=i},9796:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1460),a=i(4649),r=function(){function e(e){void 0===e&&(e=a.ANALYTICS_QUALITY_CHANGE_COUNT_THRESHOLD),this.qualityChangeCount=0,this.previousVideoBitrate=0,this.previousAudioBitrate=0,this.startupHasFinished=!1,this.QUALITY_CHANGE_COUNT_THRESHOLD=e}return e.prototype.resetValues=function(){this.qualityChangeCount=0,this.stopResetInterval(),this.previousVideoBitrate=0,this.previousAudioBitrate=0,this.startupHasFinished=!1},e.prototype.increaseCounter=function(){this.qualityChangeCount++},e.prototype.hasExceededQualityChangeThreshold=function(){return this.qualityChangeCount>this.QUALITY_CHANGE_COUNT_THRESHOLD},e.prototype.setStartupHasFinished=function(e,t){this.startupHasFinished=!0,(0,n.isFiniteNumber)(e)&&(this.previousVideoBitrate=e),(0,n.isFiniteNumber)(t)&&(this.previousAudioBitrate=t)},e.prototype.shouldAllowVideoQualityChange=function(e){return this.startupHasFinished&&(0,n.isFiniteNumber)(e)&&0!==this.previousVideoBitrate&&this.previousVideoBitrate!==e&&!this.hasExceededQualityChangeThreshold()},e.prototype.setVideoBitrate=function(e){this.startupHasFinished&&(this.previousVideoBitrate=e)},e.prototype.shouldAllowAudioQualityChange=function(e){return this.startupHasFinished&&(0,n.isFiniteNumber)(e)&&0!==this.previousAudioBitrate&&this.previousAudioBitrate!==e&&!this.hasExceededQualityChangeThreshold()},e.prototype.setAudioBitrate=function(e){this.startupHasFinished&&(this.previousAudioBitrate=e)},e.prototype.startResetInterval=function(){var e=this;void 0===this.qualityChangeCountResetIntervalId&&(this.qualityChangeCountResetIntervalId=setInterval((function(){e.qualityChangeCount=0}),a.ANALYTICS_QUALITY_CHANGE_COUNT_RESET_INTERVAL))},e.prototype.stopResetInterval=function(){void 0!==this.qualityChangeCountResetIntervalId&&(clearInterval(this.qualityChangeCountResetIntervalId),delete this.qualityChangeCountResetIntervalId)},e}();t.default=r},1125:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueueBackend=void 0;var i=function(){function e(){this.queue=[],this.unloadQueue=[],this.adQueue=[]}return e.prototype.sendRequest=function(e){this.queue.push(e)},e.prototype.sendUnloadRequest=function(e){this.unloadQueue.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.adQueue.forEach((function(t){e.sendAdRequest(t)}))},e}();t.QueueBackend=i},2364:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteBackend=void 0;var n=i(5426),a=function(){function e(e,t){this.analyticsCall=new n.AnalyticsCall(e),this.licenseKey=t}return e.prototype.sendRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){e.key=this.licenseKey,this.analyticsCall.sendUnloadRequest(e)},e.prototype.sendAdRequest=function(e){e.key=this.licenseKey,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 i=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=i},7390:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceNumberBackend=void 0;var n=i(4649),a=function(){function e(e){this.sequenceNumber=0,this.nextBackend=e}return e.prototype.sendRequest=function(e){this.updateSampleBeforeSending(e),this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendRequest(e)},e.prototype.sendUnloadRequest=function(e){this.updateSampleBeforeSending(e),this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendUnloadRequest(e)},e.prototype.sendAdRequest=function(e){this.isSequenceNumberAboveThreshold(e)||this.nextBackend.sendAdRequest(e)},e.prototype.updateSampleBeforeSending=function(e){e.sequenceNumber=this.sequenceNumber++},e.prototype.isSequenceNumberAboveThreshold=function(e){var t;return(null!==(t=e.sequenceNumber)&&void 0!==t?t:0)>n.SEQUENCE_NUMBER_LIMIT},e}();t.SequenceNumberBackend=a},847:function(e,t,i){"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 n=i(3848),a=i(1460),r=i(1820),o=i(5063),s=i(2982);t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID="bitmovin_analytics_uuid",t.COOKIE_DEFAULT_MAX_AGE=31536e3;var u=function(e){var i=e.config;if(!1===(null==i?void 0:i.cookiesEnabled))return(0,n.deleteCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID),void(this.userId=(0,s.generateUUID)());var a=(0,n.getCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID);this.userId=(0,o.isNotNullish)(a)&&!(0,r.isBlank)(a)?a:(0,s.generateUUID)();var u=(0,t.validateCookieDomainValue)(null==i?void 0:i.cookiesDomain),l=(0,t.validateCookieMaxAgeValue)(null==i?void 0:i.cookiesMaxAge),c=Date.now(),d=new Date(c+1e3*l).toUTCString();(0,n.setCookie)(t.COOKIE_NAME_BITMOVIN_ANALYTICS_UUID,this.userId,{domain:u,expires:d,maxAge:l})};t.SessionPersistenceHandler=u;t.validateCookieDomainValue=function(e){if(!(0,o.isNullish)(e)&&(0,r.isValidString)(e)&&!(0,r.isBlank)(e))return encodeURIComponent(e)};t.validateCookieMaxAgeValue=function(e){return(0,o.isNullish)(e)?t.COOKIE_DEFAULT_MAX_AGE:(0,a.isNumber)(e)?e:t.COOKIE_DEFAULT_MAX_AGE}},4916:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourceInfoFallbackService=void 0;var n=i(1820),a=i(5063),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,n.isBlank)(this.streamFormat)||(e.streamFormat=this.streamFormat)},e.prototype.applyAndStoreCodecInfo=function(e,t){(0,a.isNotNullish)(null==t?void 0:t.audioCodec)&&(this.audioCodec=t.audioCodec),(0,a.isNotNullish)(null==t?void 0:t.videoCodec)&&(this.videoCodec=t.videoCodec),(0,n.isBlank)(this.audioCodec)||(e.audioCodec=this.audioCodec),(0,n.isBlank)(this.videoCodec)||(e.videoCodec=this.videoCodec)},e}();t.SourceInfoFallbackService=r},6743:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,a=i(5063);!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 r=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((0,a.isNullish)(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((0,a.isNullish)(this.videoDuration))throw new Error("no video duration set for completion tracker");for(var e=0,t=0,i=this.watched;t<i.length;t++){var n=i[t];e+=this.getDuration(n)}return e/this.videoDuration},e.prototype.mergeWatched=function(e){for(var t=0;t<e.length;t++)for(var i=e[t],a=t+1;a<e.length;a++){var r=e[a],o=0,s=this.getOverlappingType(i,r);if(s===n.Overlapping?(this.mergeAndReplace(i,t,r,a),o=this.getOverlappingTimespan(i,r)):s===n.FirstContainedInSecond?(this.watched.splice(t,1),o=this.getDuration(i)):s===n.SecondContainedInFirst&&(this.watched.splice(a,1),o=this.getDuration(r)),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,i,n){var a=e.end>i.end?e.end:i.end,r={start:e.start<i.start?e.start:i.start,end:a};this.watched.splice(t,1,r),this.watched.splice(n,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=r},4300:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SsaiService=void 0;var a,r=i(3588),o=i(3458),s=i(5529),u=i(5063),l=i(2982),c=i(7906);!function(e){e[e.AD_BREAK_STARTED=0]="AD_BREAK_STARTED",e[e.ACTIVE=1]="ACTIVE",e[e.IDLE=2]="IDLE"}(a||(a={}));var d=function(){function e(){this.eventHandler=void 0,this.adIndex=-1,this.state=a.IDLE,this.isFirstSampleOfAd=!1,this.sentAdQuartiles=[],this.errorSent=!1}return e.prototype.activate=function(e){this.eventHandler=e},e.prototype.adBreakStart=function(e){p(this.eventHandler)&&this.state==a.IDLE&&(this.state=a.AD_BREAK_STARTED,this.currentAdMetadata=n({},e))},e.prototype.adStart=function(e){var t;if(p(this.eventHandler)&&this.state!=a.IDLE){var i=(new Date).getTime(),n=this.eventHandler.getPlayerCurrentTime();this.eventHandler.reportPlaybackInteraction(i,n),this.state=a.ACTIVE,this.isFirstSampleOfAd=!0,this.adIndex++,this.resetAdData(),this.currentAdMetadata={adPosition:null===(t=this.currentAdMetadata)||void 0===t?void 0:t.adPosition,adId:null==e?void 0:e.adId,adSystem:null==e?void 0:e.adSystem,customData:null==e?void 0:e.customData},this.currentAdImpressionId=(0,l.generateUUID)(),this.timestampOfAdStart=(0,c.getCurrentMonotonicTimestampInMs)(),this.eventHandler.reportEngagementInteraction({type:"started",adIndex:this.adIndex,currentAdImpressionId:this.currentAdImpressionId,currentAdMetadata:(0,u.isNotNullish)(this.currentAdMetadata)?this.currentAdMetadata:{}})}},e.prototype.adQuartileFinished=function(e,t){p(this.eventHandler)&&this.state==a.ACTIVE&&(this.sentAdQuartiles.includes(e)||(this.eventHandler.reportEngagementInteraction({type:"quartile",adIndex:this.adIndex,currentAdImpressionId:this.currentAdImpressionId,currentAdMetadata:(0,u.isNotNullish)(this.currentAdMetadata)?this.currentAdMetadata:{},quartile:e,quartileMetadata:t,timeSinceAdStartedInMs:(0,c.getMonotonicTimestampInMsSince)(this.timestampOfAdStart)}),this.sentAdQuartiles.push(e)))},e.prototype.adBreakEnd=function(){if(p(this.eventHandler)&&this.state!=a.IDLE){if(this.state==a.ACTIVE){var e=(new Date).getTime(),t=this.eventHandler.getPlayerCurrentTime();this.eventHandler.reportPlaybackInteraction(e,t)}this.resetAdBreakData()}},e.prototype.manipulate=function(e){var t,i,n,o;if(p(this.eventHandler)&&this.state==a.ACTIVE){e.ad=r.AD_TYPE.SSAI,e.adId=null===(t=this.currentAdMetadata)||void 0===t?void 0:t.adId,e.adSystem=null===(i=this.currentAdMetadata)||void 0===i?void 0:i.adSystem,e.adPosition=null===(n=this.currentAdMetadata)||void 0===n?void 0:n.adPosition,this.isFirstSampleOfAd&&(e.adIndex=this.adIndex,this.isFirstSampleOfAd=!1);var l=null===(o=this.currentAdMetadata)||void 0===o?void 0:o.customData;(0,u.isNotNullish)(l)&&s.customDataValuesKeys.forEach((function(t){l[t]&&(e[t]=l[t])})),e[c.SSAI_RELATED_SAMPLE_MARKER]=!0}},e.prototype.sendAdEngagementErrorSample=function(e,t){p(this.eventHandler)&&this.state===a.ACTIVE&&(this.errorSent||e.code!==o.ErrorCode.QUALITY_CHANGE_THRESHOLD_EXCEEDED.code&&(this.eventHandler.reportEngagementInteraction({type:"error",adIndex:this.adIndex,currentAdImpressionId:this.currentAdImpressionId,currentAdMetadata:(0,u.isNotNullish)(this.currentAdMetadata)?this.currentAdMetadata:{},analyticsError:e,originalError:t,timeSinceAdStartedInMs:(0,c.getMonotonicTimestampInMsSince)(this.timestampOfAdStart)}),this.errorSent=!0))},e.prototype.isInActiveState=function(){return this.state===a.ACTIVE},e.prototype.resetSourceRelatedState=function(){this.resetAdBreakData(),this.adIndex=-1},e.prototype.resetAdBreakData=function(){this.state=a.IDLE,this.isFirstSampleOfAd=!1,delete this.currentAdMetadata,this.resetAdData()},e.prototype.resetAdData=function(){var e,t,i;null===(e=this.currentAdMetadata)||void 0===e||delete e.customData,null===(t=this.currentAdMetadata)||void 0===t||delete t.adId,null===(i=this.currentAdMetadata)||void 0===i||delete i.adSystem,this.errorSent=!1,this.currentAdImpressionId=void 0,this.sentAdQuartiles=[],this.timestampOfAdStart=void 0},e}();function p(e){return(0,u.isNotNullish)(e)}t.SsaiService=d},6398:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAdPosition=s,t.hasValidSsaiAdBreakMetadataStructure=function(e){if((0,o.isNullish)(e))return!0;if(!(0,o.isPlainObject)(e))return a.logger.errorMessageToUser("Invalid SsaiAdBreakMetadata: not a plain object"),!1;var t=e;if((0,o.isNotNullish)(t.adPosition)&&!s(t.adPosition))return a.logger.errorMessageToUser("Invalid SsaiAdBreakMetadata: 'adPosition' property is not valid"),!1;return!0},t.simplySanitizeSsaiAdBreakMetadata=function(e){if((0,o.isNullish)(e))return;return{adPosition:e.adPosition}},t.hasValidSsaiAdMetadataStructure=function(e){if((0,o.isNullish)(e))return!0;if(!(0,o.isPlainObject)(e))return a.logger.errorMessageToUser("Invalid SsaiAdMetadata: not a plain object"),!1;var t=e;if((0,o.isNotNullish)(t.adId)&&!(0,r.isValidString)(t.adId))return a.logger.errorMessageToUser("Invalid SsaiAdMetadata: 'adId' property is not string"),!1;if((0,o.isNotNullish)(t.adSystem)&&!(0,r.isValidString)(t.adSystem))return a.logger.errorMessageToUser("Invalid SsaiAdMetadata: 'adSystem' property is not string"),!1;if((0,o.isNotNullish)(t.customData)&&!(0,o.isPlainObject)(t.customData))return a.logger.errorMessageToUser("Invalid SsaiAdMetadata: 'customData' property is not a plain object"),!1;return!0},t.simplySanitizeSsaiAdMetadata=function(e){if((0,o.isNullish)(e))return;var t=void 0;(0,o.isNotNullish)(e.customData)&&(t=(0,n.sanitizeCustomDataValues)(e.customData));return{adId:e.adId,adSystem:e.adSystem,customData:t}},t.isSsaiAdQuartile=u,t.hasValidSsaiAdQuartileStructure=function(e){if(!u(e))return a.logger.errorMessageToUser("Invalid SsaiAdQuartile"),!1;return!0},t.sanitizeSsaiAdQuartileMetadata=function(e){if((0,o.isNullish)(e))return{};if(!(0,o.isPlainObject)(e))return a.logger.errorMessageToUser("Invalid SsaiAdQuartileMetadata: not a plain object"),{};var t={failedBeaconUrl:e.failedBeaconUrl};(0,r.isValidString)(t.failedBeaconUrl)?t.failedBeaconUrl=t.failedBeaconUrl.substring(0,500):(a.logger.errorMessageToUser("Invalid SsaiAdQuartileMetadata: 'failedBeaconUrl' property is not string"),t.failedBeaconUrl=void 0);return t};var n=i(5529),a=i(1916),r=i(1820),o=i(5063);function s(e){return"preroll"===e||"midroll"===e||"postroll"===e}function u(e){return"first"===e||"midpoint"===e||"third"===e||"completed"===e}},8918:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSsaiEngagementErrorData=function(e){return"error"===e.type},t.isSsaiEngagementQuartileData=function(e){return"quartile"===e.type},t.isSsaiEngagementStartedData=function(e){return"started"===e.type}},7906:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ROUTING_URL_PARAM_VALUE_SSAI=t.ROUTING_URL_PARAM=t.SSAI_RELATED_SAMPLE_MARKER=void 0,t.isSsaiRelatedSample=function(e){if(e[t.SSAI_RELATED_SAMPLE_MARKER])return delete e[t.SSAI_RELATED_SAMPLE_MARKER],!0;if(2===e.adType)return!0;return!1},t.appendSsaiRoutingParam=function(e){return"".concat(e,"?").concat(t.ROUTING_URL_PARAM,"=").concat(t.ROUTING_URL_PARAM_VALUE_SSAI)},t.createErrorAdSample=function(e,t){return s({playbackSample:e,currentAdImpressionId:t.currentAdImpressionId,adIndex:t.adIndex,currentAdMetadata:t.currentAdMetadata,quartile:void 0,quartileMetadata:void 0,errorCode:t.analyticsError.code,errorMessage:t.analyticsError.message,errorSeverity:t.analyticsError.severity,timeSinceAdStartedInMs:t.timeSinceAdStartedInMs})},t.createStartedAdSample=function(e,t){return s({playbackSample:e,currentAdImpressionId:t.currentAdImpressionId,adIndex:t.adIndex,currentAdMetadata:t.currentAdMetadata,quartile:"started",quartileMetadata:void 0,errorCode:void 0,errorMessage:void 0,errorSeverity:void 0,timeSinceAdStartedInMs:void 0})},t.createQuartileAdSample=function(e,t){return s({playbackSample:e,currentAdImpressionId:t.currentAdImpressionId,adIndex:t.adIndex,currentAdMetadata:t.currentAdMetadata,quartile:t.quartile,quartileMetadata:t.quartileMetadata,timeSinceAdStartedInMs:t.timeSinceAdStartedInMs,errorCode:void 0,errorMessage:void 0,errorSeverity:void 0})},t.getCurrentMonotonicTimestampInMs=u,t.getMonotonicTimestampInMsSince=function(e){if((0,o.isNullish)(e))return;return u()-e};var a=i(5529),r=i(9422),o=i(5063);function s(e){var t,i=e.playbackSample,r=e.currentAdImpressionId,s=e.adIndex,u=e.currentAdMetadata,l=e.quartile,c=e.quartileMetadata,d=e.errorCode,p=e.errorMessage,h=e.errorSeverity,m=e.timeSinceAdStartedInMs,f=n(n({},{audioBitrate:null==(t=i)?void 0:t.audioBitrate,analyticsVersion:null==t?void 0:t.analyticsVersion,adPlaybackHeight:null==t?void 0:t.videoPlaybackHeight,adPlaybackWidth:null==t?void 0:t.videoPlaybackWidth,cdnProvider:null==t?void 0:t.cdnProvider,customData1:null==t?void 0:t.customData1,customData2:null==t?void 0:t.customData2,customData3:null==t?void 0:t.customData3,customData4:null==t?void 0:t.customData4,customData5:null==t?void 0:t.customData5,customData6:null==t?void 0:t.customData6,customData7:null==t?void 0:t.customData7,customData8:null==t?void 0:t.customData8,customData9:null==t?void 0:t.customData9,customData10:null==t?void 0:t.customData10,customData11:null==t?void 0:t.customData11,customData12:null==t?void 0:t.customData12,customData13:null==t?void 0:t.customData13,customData14:null==t?void 0:t.customData14,customData15:null==t?void 0:t.customData15,customData16:null==t?void 0:t.customData16,customData17:null==t?void 0:t.customData17,customData18:null==t?void 0:t.customData18,customData19:null==t?void 0:t.customData19,customData20:null==t?void 0:t.customData20,customData21:null==t?void 0:t.customData21,customData22:null==t?void 0:t.customData22,customData23:null==t?void 0:t.customData23,customData24:null==t?void 0:t.customData24,customData25:null==t?void 0:t.customData25,customData26:null==t?void 0:t.customData26,customData27:null==t?void 0:t.customData27,customData28:null==t?void 0:t.customData28,customData29:null==t?void 0:t.customData29,customData30:null==t?void 0:t.customData30,customData31:null==t?void 0:t.customData31,customData32:null==t?void 0:t.customData32,customData33:null==t?void 0:t.customData33,customData34:null==t?void 0:t.customData34,customData35:null==t?void 0:t.customData35,customData36:null==t?void 0:t.customData36,customData37:null==t?void 0:t.customData37,customData38:null==t?void 0:t.customData38,customData39:null==t?void 0:t.customData39,customData40:null==t?void 0:t.customData40,customData41:null==t?void 0:t.customData41,customData42:null==t?void 0:t.customData42,customData43:null==t?void 0:t.customData43,customData44:null==t?void 0:t.customData44,customData45:null==t?void 0:t.customData45,customData46:null==t?void 0:t.customData46,customData47:null==t?void 0:t.customData47,customData48:null==t?void 0:t.customData48,customData49:null==t?void 0:t.customData49,customData50:null==t?void 0:t.customData50,customData51:null==t?void 0:t.customData51,customData52:null==t?void 0:t.customData52,customData53:null==t?void 0:t.customData53,customData54:null==t?void 0:t.customData54,customData55:null==t?void 0:t.customData55,customData56:null==t?void 0:t.customData56,customData57:null==t?void 0:t.customData57,customData58:null==t?void 0:t.customData58,customData59:null==t?void 0:t.customData59,customData60:null==t?void 0:t.customData60,customData61:null==t?void 0:t.customData61,customData62:null==t?void 0:t.customData62,customData63:null==t?void 0:t.customData63,customData64:null==t?void 0:t.customData64,customData65:null==t?void 0:t.customData65,customData66:null==t?void 0:t.customData66,customData67:null==t?void 0:t.customData67,customData68:null==t?void 0:t.customData68,customData69:null==t?void 0:t.customData69,customData70:null==t?void 0:t.customData70,customData71:null==t?void 0:t.customData71,customData72:null==t?void 0:t.customData72,customData73:null==t?void 0:t.customData73,customData74:null==t?void 0:t.customData74,customData75:null==t?void 0:t.customData75,customData76:null==t?void 0:t.customData76,customData77:null==t?void 0:t.customData77,customData78:null==t?void 0:t.customData78,customData79:null==t?void 0:t.customData79,customData80:null==t?void 0:t.customData80,customData81:null==t?void 0:t.customData81,customData82:null==t?void 0:t.customData82,customData83:null==t?void 0:t.customData83,customData84:null==t?void 0:t.customData84,customData85:null==t?void 0:t.customData85,customData86:null==t?void 0:t.customData86,customData87:null==t?void 0:t.customData87,customData88:null==t?void 0:t.customData88,customData89:null==t?void 0:t.customData89,customData90:null==t?void 0:t.customData90,customData91:null==t?void 0:t.customData91,customData92:null==t?void 0:t.customData92,customData93:null==t?void 0:t.customData93,customData94:null==t?void 0:t.customData94,customData95:null==t?void 0:t.customData95,customData96:null==t?void 0:t.customData96,customData97:null==t?void 0:t.customData97,customData98:null==t?void 0:t.customData98,customData99:null==t?void 0:t.customData99,customData100:null==t?void 0:t.customData100,customUserId:null==t?void 0:t.customUserId,domain:null==t?void 0:t.domain,experimentName:null==t?void 0:t.experimentName,key:null==t?void 0:t.key,language:null==t?void 0:t.language,path:null==t?void 0:t.path,platform:null==t?void 0:t.platform,player:null==t?void 0:t.player,playerKey:null==t?void 0:t.playerKey,playerTech:null==t?void 0:t.playerTech,size:null==t?void 0:t.size,screenHeight:null==t?void 0:t.screenHeight,screenWidth:null==t?void 0:t.screenWidth,streamFormat:null==t?void 0:t.streamFormat,userAgent:null==t?void 0:t.userAgent,userId:null==t?void 0:t.userId,version:null==t?void 0:t.version,videoBitrate:null==t?void 0:t.videoBitrate,videoId:null==t?void 0:t.videoId,videoImpressionId:null==t?void 0:t.impressionId,videoTitle:null==t?void 0:t.videoTitle,videoWindowHeight:null==t?void 0:t.videoWindowHeight,videoWindowWidth:null==t?void 0:t.videoWindowWidth}),{adId:null==u?void 0:u.adId,adImpressionId:r,adIndex:s,adPosition:null==u?void 0:u.adPosition,adSystem:null==u?void 0:u.adSystem,adType:2,errorCode:d,errorMessage:p,errorSeverity:h,time:Date.now(),timeSinceAdStartedInMs:m});switch(l){case"started":f.started=1;break;case"first":f.quartile1=1,f.quartile1FailedBeaconUrl=null==c?void 0:c.failedBeaconUrl;break;case"midpoint":f.midpoint=1,f.midpointFailedBeaconUrl=null==c?void 0:c.failedBeaconUrl;break;case"third":f.quartile3=1,f.quartile3FailedBeaconUrl=null==c?void 0:c.failedBeaconUrl;break;case"completed":f.completed=1,f.completedFailedBeaconUrl=null==c?void 0:c.failedBeaconUrl}var v=null==u?void 0:u.customData;return(0,o.isNotNullish)(v)&&a.customDataValuesKeys.forEach((function(e){v[e]&&(f[e]=v[e])})),f}function u(){var e=(0,r.getGlobalPerformanceNow)();return(0,o.isNullish)(e)?Date.now():Math.floor(e)}t.SSAI_RELATED_SAMPLE_MARKER="triggeredBySsai",t.ROUTING_URL_PARAM="routingParam",t.ROUTING_URL_PARAM_VALUE_SSAI="ssai"},3588:function(e,t){"use strict";var i;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"}(i||(t.AD_TYPE=i={}))},4355:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.CdnProvider=void 0,function(e){e.AKAMAI="akamai",e.BITGRAVITY="bitgravity",e.CHINACACHE="chinacache",e.CLOUDFLARE="cloudflare",e.CLOUDFRONT="cloudfront",e.FASTLY="fastly",e.MAXCDN="maxcdn"}(i||(t.CdnProvider=i={}))},5878:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.CastTech=void 0,function(e){e.AirPlay="AirPlay",e.GoogleCast="GoogleCast",e.WebSocket="WebSocket"}(i||(t.CastTech=i={}))},3458:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCode=void 0;var i=function(){function e(e,t,i){void 0===i&&(i="CRITICAL"),this.code=e,this.message=t,this.errorSeverity=i}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","INFO"),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=i},2361:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Event=t.JSM_INITIAL_EVENT=void 0,t.JSM_INITIAL_EVENT="jsm-initial",function(e){e.AUDIO_CHANGE="audioChange",e.AUDIOTRACK_CHANGED="audioTrackChanged",e.CUSTOM_DATA_CHANGE="customDataChange",e.END="end",e.END_AD="adEnd",e.END_BUFFERING="endBuffering",e.END_CAST="endCasting",e.END_FULLSCREEN="endFullscreen",e.ERROR="playerError",e.FINISH_QUALITY_CHANGE="finishQualityChange",e.LOADSTART_AUTOPLAY="loadstartAutoplay",e.MANUAL_SOURCE_CHANGE="manualSourceChangeInitiated",e.MUTE="mute",e.PAUSE="pause",e.PLAY="play",e.PLAYING="playing",e.READY="ready",e.SCREEN_RESIZE="resize",e.SEEK="seek",e.SEEKED="seeked",e.SOURCE_LOADED="sourceLoaded",e.SOURCE_UNLOADED="sourceUnloaded",e.START_AD="adStart",e.START_BUFFERING="startBuffering",e.START_CAST="startCasting",e.START_FULLSCREEN="startFullscreen",e.SUBTITLE_CHANGE="subtitleChange",e.TIMECHANGED="timechanged",e.UN_MUTE="unMute",e.UNLOAD="unload",e.VIDEO_CHANGE="videoChange",e.VIDEOSTART_TIMEOUT="VIDEOSTART_TIMEOUT"}(i||(t.Event=i={}))},2168:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MIMETypes=void 0,t.getMIMETypeFromFileExtension=function(e){var i=e.split(/[?#]/)[0].toLowerCase();if((0,n.endsWith)(i,".m3u8"))return t.MIMETypes.HLS;if((0,n.endsWith)(i,".mp4")||(0,n.endsWith)(i,".m4v")||(0,n.endsWith)(i,".m4a"))return t.MIMETypes.MP4;if((0,n.endsWith)(i,".webm"))return t.MIMETypes.WEBM;if((0,n.endsWith)(i,".mpd"))return t.MIMETypes.DASH;return};var n=i(1820);t.MIMETypes={MP4:"video/mp4",WEBM:"video/webm",HLS:"application/x-mpegURL",DASH:"application/dash+xml"}},9946:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PAGE_LOAD_TYPE=void 0,function(e){e[e.FOREGROUND=1]="FOREGROUND",e[e.BACKGROUND=2]="BACKGROUND"}(i||(t.PAGE_LOAD_TYPE=i={}))},556:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.Player=void 0,function(e){e.BITMOVIN="bitmovin",e.BITMOVIN_PWX="bitmovin-pwx",e.CHROMECAST_SHAKA="chromecast-shaka",e.HLSJS="hlsjs",e.HTML5="html5",e.JW="jw",e.RADIANT="radiant",e.SHAKA="shaka",e.THEOPLAYER="theoplayer",e.VIDEOJS="videojs"}(i||(t.Player=i={}))},8525:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerSize=void 0,function(e){e.Fullscreen="FULLSCREEN",e.Window="WINDOW"}(i||(t.PlayerSize=i={}))},7224:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamTypes=void 0,t.getStreamTypesFromURL=function(e){if((0,r.isNullish)(e)||(0,a.isBlank)(e))return;var t=e.split(/[?#]/)[0].toLowerCase();if((0,a.endsWith)(t,".m3u8"))return n.hls;if((0,a.endsWith)(t,".mp4")||(0,a.endsWith)(t,".m4v")||(0,a.endsWith)(t,".m4a"))return n.prog;if((0,a.endsWith)(t,".webm"))return n.prog;if((0,a.endsWith)(t,".mpd"))return n.dash;return},t.getStreamTypeFromMIMEType=function(e){var t;return((t={})[o.MIMETypes.MP4]=n.prog,t[o.MIMETypes.WEBM]=n.prog,t[o.MIMETypes.HLS]=n.hls,t[o.MIMETypes.DASH]=n.dash,t)[e]};var n,a=i(1820),r=i(5063),o=i(2168);!function(e){e.dash="dash",e.hls="hls",e.prog="progressive"}(n||(t.StreamTypes=n={}))},3565:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoStartFailedReason=void 0,t.createVideoStartFailedReason=function(e){switch(e){case a.Event.ERROR:return n.PLAYER_ERROR;case a.Event.UNLOAD:case a.Event.MANUAL_SOURCE_CHANGE:case a.Event.SOURCE_UNLOADED:return n.PAGE_CLOSED;case a.Event.VIDEOSTART_TIMEOUT:return n.TIMEOUT;default:return n.UNKNOWN}};var n,a=i(2361);!function(e){e.PAGE_CLOSED="PAGE_CLOSED",e.PLAYER_ERROR="PLAYER_ERROR",e.TIMEOUT="TIMEOUT",e.UNKNOWN="UNKNOWN"}(n||(t.VideoStartFailedReason=n={}))},348:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Feature=void 0;var n=i(5063),a=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(0,n.isNotNullish)(t)&&(this._config=this.extractConfig(t)),this.configured(e,this._config),this._config},e}();t.Feature=a},6845:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureManager=void 0;var n=i(1916),a=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(i){var a=i.configure(e,t);return!(!e||!0!==(null==a?void 0:a.enabled))||(n.logger.log("Disabling feature ".concat(i.constructor.name," as it isn't enabled according to license callback.")),i.disable(),!1)})),this.features.forEach((function(e){return e.enabled()}))},e}();t.FeatureManager=a},7614:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)},a=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,a=0,r=t.length;a<r;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailBackend=void 0;var r=i(92),o=i(4649),s=i(5063),u=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,i){var a,r,o=this;return n(n({},e),{message:null===(a=e.message)||void 0===a?void 0:a.substr(0,t),data:this.copyErrorDataTruncateStrings(e.data,t),httpRequests:null===(r=e.httpRequests)||void 0===r?void 0:r.map((function(e){return o.copyHttpRequestTruncateUrls(e,i)}))})},e.copyHttpRequestTruncateUrls=function(e,t){var i,a;return n(n({},e),{url:null===(i=e.url)||void 0===i?void 0:i.substr(0,t),lastRedirectLocation:null===(a=e.lastRedirectLocation)||void 0===a?void 0:a.substr(0,t)})},e.copyErrorDataTruncateStrings=function(e,t){var i,a;return n(n({},e),{exceptionMessage:null===(i=e.exceptionMessage)||void 0===i?void 0:i.substr(0,t),additionalData:null===(a=e.additionalData)||void 0===a?void 0:a.substr(0,t)})},e.copyErrorDetailTruncateHttpRequests=function(e,t){var i;return n(n({},e),{httpRequests:null===(i=e.httpRequests)||void 0===i?void 0:i.slice(-t)})},e.prototype.limitHttpRequestsOfQueuedErrorDetails=function(t){var i=this;this._queue.forEach((function(n,a){i._queue[a]=e.copyErrorDetailTruncateHttpRequests(n,t)}))},e.prototype.send=function(t){var i=e.copyErrorDetailTruncateStringsAndUrls(t,e.MAX_STRING_LENGTH,e.MAX_URL_LENGTH);this.enabled?(0,r.post)(this.backendUrl,i):this._queue.push(i)},e.prototype.flush=function(){for(var e=a([],this._queue,!0),t=e.shift();(0,s.isNotNullish)(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=2e3,e}();t.ErrorDetailBackend=u},9557:function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},n(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 i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,a=0,r=t.length;a<r;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDetailTracking=void 0;var o=i(1916),s=i(5063),u=i(4926),l=function(e){function t(t,i,n,a){var l=e.call(this)||this;return l.settingsProvider=t,l.backend=i,l.subscribables=n,l.httpRequestTracking=a,l.errorIndex=0,l.onErrorHandler=function(e){var t,i;try{if(!l.isEnabled)return;var n=null===(t=l.httpRequestTracking)||void 0===t?void 0:t.httpRequests,a=(0,s.isNullish)(n)?void 0:r([],n,!0),c=l.errorIndex;l.errorIndex++;var d={platform:"web",licenseKey:l.settingsProvider.licenseKey,domain:l.settingsProvider.domain,impressionId:l.settingsProvider.impressionId,analyticsVersion:u.VERSION,errorId:c,timestamp:(0,s.getCurrentTimestamp)(),code:e.code,message:e.message,data:null!==(i=e.errorData)&&void 0!==i?i:{additionalData:void 0,exceptionMessage:void 0,exceptionStacktrace:void 0},httpRequests:a,severity:e.severity};o.logger.log("ErrorDetailTracking.onError: ".concat((0,s.tryJSONStringify)(d))),l.backend.send(d)}catch(e){o.logger.error("ErrorDetailTracking.onError: Error in handler",e)}},n.forEach((function(e){return e.subscribe(l.onErrorHandler)})),l}return a(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 i,n,a=Math.max(null!==(i=null==t?void 0:t.numberOfHttpRequests)&&void 0!==i?i:0,0);null===(n=this.httpRequestTracking)||void 0===n||n.configure(a),this.backend.limitHttpRequestsOfQueuedErrorDetails(a)},t.prototype.extractConfig=function(e){return e.errorDetails},t}(i(348).Feature);t.ErrorDetailTracking=l},7881:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestTracking=void 0;var n=i(1916),a=i(3129),r=function(){function e(t){var i=this;this.subscribables=t,this._maxRequests=e.DEFAULT_MAX_REQUESTS,this._httpRequestQueue=new a.Queue,this.onDownloadFinishedHandler=function(e){try{i.addRequest(e.httpRequest)}catch(e){n.logger.error("HttpRequestTracking.onDownloadFinished: Error in handler",e)}},t.forEach((function(e){return e.subscribe(i.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=r},7912:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpRequestType=void 0,function(e){e.MANIFEST_DASH="manifest/dash",e.MANIFEST_HLS_MASTER="manifest/hls/master",e.MANIFEST_HLS_VARIANT="manifest/hls/variant",e.MANIFEST_SMOOTH="manifest/smooth",e.MANIFEST_ADS="manifest/ads",e.MEDIA_AUDIO="media/audio",e.MEDIA_VIDEO="media/video",e.MEDIA_SUBTITLES="media/subtitles",e.MEDIA_THUMBNAILS="media/thumbnails",e.MEDIA_SEGMENTINDEX="media/segmentindex",e.DRM_LICENSE_WIDEVINE="drm/license/widevine",e.DRM_LICENSE_PLAYREADY="drm/license/playready",e.DRM_LICENSE_FAIRPLAY="drm/license/fairplay",e.DRM_LICENSE_PRIMETIME="drm/license/primetime",e.DRM_LICENSE_CLEARKEY="drm/license/clearkey",e.DRM_LICENSE_TVKEY="drm/license/tvkey",e.DRM_CERTIFICATE_FAIRPLAY="drm/certificate/fairplay",e.HLS_INTERSTITIALS_ASSET_LIST="hls/interstitials/asset-list",e.KEY_HLS_AES="key/hls/aes",e.TIME_SYNC="time/sync",e.WEBRTC_SDP_REQUEST="webrtc/sdp/request",e.WEBRTC_SDP_ANSWER="webrtc/sdp/answer",e.WEBRTC_SDP_OFFER="webrtc/sdp/offer",e.UNKNOWN="unknown",e.INTERNAL="internal"}(i||(t.HttpRequestType=i={}))},5529:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeCustomDataValues=t.extractCustomDataFieldsOnly=t.customDataFieldCount=t.customDataValuesKeys=void 0;var n=i(5063);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","customData31","customData32","customData33","customData34","customData35","customData36","customData37","customData38","customData39","customData40","customData41","customData42","customData43","customData44","customData45","customData46","customData47","customData48","customData49","customData50","customData51","customData52","customData53","customData54","customData55","customData56","customData57","customData58","customData59","customData60","customData61","customData62","customData63","customData64","customData65","customData66","customData67","customData68","customData69","customData70","customData71","customData72","customData73","customData74","customData75","customData76","customData77","customData78","customData79","customData80","customData81","customData82","customData83","customData84","customData85","customData86","customData87","customData88","customData89","customData90","customData91","customData92","customData93","customData94","customData95","customData96","customData97","customData98","customData99","customData100","experimentName"],t.customDataFieldCount=t.customDataValuesKeys.filter((function(e){return e.match("customData\\d+")})).length;t.extractCustomDataFieldsOnly=function(e){var i={};return t.customDataValuesKeys.forEach((function(t){e[t]&&(i[t]=e[t])})),i};t.sanitizeCustomDataValues=function(e){var i=(0,t.extractCustomDataFieldsOnly)(e),a={};return(0,n.transferCustomDataFields)(i,a),a.experimentName=(0,n.getCustomDataString)(i.experimentName),a}},4501:function(e,t){"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.LicensingResult=void 0,function(e){e.Denied="denied",e.Granted="granted",e.Skip="skip"}(i||(t.LicensingResult=i={}))},3413:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeVideoDuration=function(e){if((0,a.isNullish)(e)||Number.isNaN(e)||e===1/0)return 0;return e},t.buildPlaybackInfoStreamTypeFields=function(e,t){var i={streamFormat:null!=e?e:void 0,progUrl:t};if((0,a.isNullish)(e))return i;if(e===n.StreamTypes.dash)return{streamFormat:e,mpdUrl:t};if(e===n.StreamTypes.hls)return{streamFormat:e,m3u8Url:t};if(e===n.StreamTypes.prog)return{streamFormat:e,progUrl:t};return i};var n=i(7224),a=i(5063)},4820:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultStateMachineCallbacks=void 0,t.defaultStateMachineCallbacks={setup:function(){},startup:function(){},programChange:function(){},updateSourceMetadata:function(){},playing:function(){},heartbeat:function(){},qualitychange:function(){},updateSampleQualityInfo:function(){},audiotrack_changing:function(){},pause:function(){},seeking:function(){},buffering: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(){}}},5426:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsCall=void 0;var n=i(7906),a=i(5923),r=i(92),o=i(5063),s=function(){function e(e){this.analyticsServerUrl=(0,o.joinUrls)(e,"analytics"),this.adAnalyticsServerUrl=(0,o.joinUrls)(e,"analytics/a")}return e.prototype.sendRequest=function(e){var t=this.analyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(t=(0,n.appendSsaiRoutingParam)(t)),(0,r.post)(t,e)},e.prototype.sendUnloadRequest=function(e){var t=this,i=this.analyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(i=(0,n.appendSsaiRoutingParam)(i)),this.trySendBeacon((function(e){return t.sendRequestSynchronous(e)}),i,e)},e.prototype.trySendBeacon=function(e,t,i,n){var r;if(void 0===n&&(n={}),void 0===(null===(r=a.globalScope.navigator)||void 0===r?void 0:r.sendBeacon))e(i);else{var o=new Blob([JSON.stringify(i)],n);a.globalScope.navigator.sendBeacon(t,o)||e(i)}},e.prototype.sendRequestSynchronous=function(e){var t=this.analyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(t=(0,n.appendSsaiRoutingParam)(t)),(0,r.post)(t,e,void 0,!1)},e.prototype.sendAdRequest=function(e){var t=this.adAnalyticsServerUrl;(0,n.isSsaiRelatedSample)(e)&&(t=(0,n.appendSsaiRoutingParam)(t));this.trySendBeacon((function(e){return(0,r.post)(t,e)}),t,e)},e}();t.AnalyticsCall=s},5248:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSourceInfoFromBitmovinSourceConfig=void 0;var n=i(5063);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 i=t.getPlaybackVideoData(),a=0;return(0,n.isNotNullish)(i)&&!isNaN(+i.id)&&(a=+i.id),{progBitrate:e[a].bitrate||0,progUrl:e[a].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,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodecHelper=void 0;var n=i(5923),a=i(5063),r={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"']},o=function(){function e(){}return Object.defineProperty(e,"supportedVideoFormats",{get:function(){var e;if(!(0,a.isNullish)(null===(e=n.globalScope.MediaSource)||void 0===e?void 0:e.isTypeSupported)&&(0,a.isFunction)(n.globalScope.MediaSource.isTypeSupported))return Object.getOwnPropertyNames(r).filter((function(e){return r[e].some((function(e){return n.globalScope.MediaSource.isTypeSupported(e)}))}))},enumerable:!1,configurable:!0}),e}();t.CodecHelper=o},5766:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;var i=function(){function e(){}return e.bytesToBits=function(e){return 8*e},e.bitsToBytes=function(e){return Math.round(e/8)},e.kiloBitsToBits=function(e){return 1e3*e},e}();t.Converter=i},1652:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventDebugging=void 0;var i=function(e,t,i,n,a){this.event=e,this.from=t,this.to=i,this.timestamp=n,this.eventObject=a};t.EventDebugging=i},92:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.post=function(e,t,i,o){void 0===o&&(o=!0);var s,u=!1;n.globalScope.XMLHttpRequest&&("withCredentials"in(s=new n.globalScope.XMLHttpRequest)||(s=null));!s&&n.globalScope.XDomainRequest&&(s=new n.globalScope.XDomainRequest,u=!0);if(!s){var l="Failed to create POST request, XHR implementation is missing";return a.logger.error(l),void(i&&i(new Error(l),null))}s.onload=function(){if(u){if(i)try{i(null,JSON.parse(s.responseText))}catch(t){var e="Failed to parse response";a.logger.error(e,t),i(new Error(e+": "+String(t)),null)}}else{if(s.status<200||s.status>=300){e="POST error response:"+s.status+": "+s.statusText;return a.logger.error(e),void(i&&i(new Error(e),null))}if(i)try{i(null,JSON.parse(s.responseText))}catch(t){e="Failed to parse response";a.logger.error(e,t),i(new Error(e+": "+String(t)),null)}}},s.onerror=function(){var e="POST request failed: "+s.status+" "+s.statusText;a.logger.error(e),i&&i(new Error(e),null)};try{var c=o;(0,r.isReactNative)()&&!c&&(c=!0),u&&(c=!0),s.open("POST",e,c),u||s.setRequestHeader("Content-Type","text/plain"),s.send(JSON.stringify(t))}catch(e){l="Failed to send POST request: "+String(e);a.logger.error(l),i&&i(new Error(l),null)}};var n=i(5923),a=i(1916),r=i(5063)},5253:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LicenseCall=function(e,t,i,s){var u=(0,o.joinUrls)(s,"/licensing"),l={analyticsVersion:i,domain:t,key:e};return new Promise((function(e,t){var i=setTimeout((function(){var e="License call POST request timed out";a.logger.error(e),t(new Error(e))}),r.ANALYTICS_LICENSECALL_TIMEOUT);(0,n.post)(u,l,(function(n,a){clearTimeout(i),n?t(n):e(a)}))}))};var n=i(92),a=i(1916),r=i(4649),o=i(5063)},1916:function(e,t){"use strict";var i=this&&this.__spreadArray||function(e,t,i){if(i||2===arguments.length)for(var n,a=0,r=t.length;a<r;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.padRight=void 0;var n=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=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];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=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.enabled&&console.warn(e,t)},e.prototype.error=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this.enabled&&console.error(e,t)},e.prototype.errorMessageToUser=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];console.error.apply(console,i([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=n.getInstance()},3129:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Queue=void 0;var i=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=i},4649:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SEQUENCE_NUMBER_LIMIT=t.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD=t.ANALYTICS_BUFFER_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_BUFFER_TIMEOUT=12e4,t.ANALYTICS_MIN_SEEK_DIFFERENCE_THRESHOLD=3,t.SEQUENCE_NUMBER_LIMIT=1e3},5063:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryJSONStringify=t.isAudioMuted=t.isReactNative=t.joinUrls=t.getURLResourceName=t.calculatePercentage=t.transferCustomDataFields=t.getCustomDataString=t.noOp=t.getCurrentTimestamp=t.calculateTimeWithUndefined=t.calculateTime=t.removeTrailingSlash=t.isFunction=t.isPlainObject=t.isObject=t.toBoolean=t.isBoolean=t.isNotNullish=t.isNullish=void 0,t.isErrorSeverity=function(e){return"CRITICAL"===e||"INFO"===e},t.getPageLoadType=function(){if((0,r.isDocumentHidden)())return n.PAGE_LOAD_TYPE.BACKGROUND;return n.PAGE_LOAD_TYPE.FOREGROUND},t.isArrayBuffer=function(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)};var n=i(9946),a=i(5529),r=i(3848),o=i(9422),s=i(1820);t.isNullish=function(e){return null==e};t.isNotNullish=function(e){return!(0,t.isNullish)(e)};t.isBoolean=function(e){return!(0,t.isNullish)(e)&&"boolean"==typeof e};t.toBoolean=function(e){return Boolean(e).valueOf()};t.isObject=function(e){return(0,t.isNotNullish)(e)&&"object"==typeof e};t.isPlainObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)};t.isFunction=function(e){return"function"==typeof e};t.removeTrailingSlash=function(e){return e.replace(/\/$/g,"")};t.calculateTime=function(e){return Math.round(1e3*e)};t.calculateTimeWithUndefined=function(e){if(!(0,t.isNullish)(e))return(0,t.calculateTime)(e)};t.getCurrentTimestamp=function(){return Date.now()};t.noOp=function(){};t.getCustomDataString=function(e){return"object"==typeof e?(0,t.tryJSONStringify)(e):(0,t.isFunction)(e)?(0,t.getCustomDataString)(e()):void 0===e?e:"string"!=typeof e?String(e):e};t.transferCustomDataFields=function(e,i){for(var n=1;n<=a.customDataFieldCount;n++){var r="customData".concat(n);i[r]=(0,t.getCustomDataString)(e[r])}};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,s.endsWith)(e,"/")&&void 0!==t?e.substr(0,e.length-1):e)+"/"+((0,s.startsWith)(t,"/")?t.substr(1):t)}))};t.isReactNative=function(){return"ReactNative"===(0,o.getGlobalNavigatorProduct)()};t.isAudioMuted=function(e,t){return e||t<.01};t.tryJSONStringify=function(e){if(!(0,t.isNullish)(e))try{return JSON.stringify(e)}catch(e){return}}},4926:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="v2.53.2"},3612:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewportTracker=void 0;var n=i(3848),a=i(5923),r=i(1916),o=i(1820),s=i(5063),u=function(){function e(e,t,i){void 0===i&&(i=1);var a=this;this.inViewport=void 0,this.threshold=i,this.onIntersectionChanged=t,this.element=e;try{var o={root:null,rootMargin:"0px",threshold:i};this.observer=new IntersectionObserver((function(e,t){return a.handleIntersect(e,t)}),o),this.observer.observe(e)}catch(e){r.logger.log("Couldn't create instance of IntersectionObserver. timeInViewport will always be reported as 100%.")}this.hiddenPropertyName=(0,n.getDocumentPropertyWithPrefix)("hidden"),this.hiddenPropertyName&&(this.visibilityChange=this.hiddenPropertyName.replace("hidden","")+"visibilitychange",(0,n.addDocumentEventListener)(this.visibilityChange,this.handleVisibilityChange=this.handleVisibilityChange.bind(this),!1))}return e.prototype.isHidden=function(){return!((0,s.isNullish)(a.globalScope.document)||!(0,o.isValidString)(this.hiddenPropertyName))&&!0===a.globalScope.document[this.hiddenPropertyName]},e.prototype.isInViewport=function(){return!this.isHidden()&&(!!(0,s.isNullish)(this.inViewport)||this.inViewport)},e.prototype.dispose=function(){this.observer&&(this.observer.unobserve(this.element),this.observer.disconnect()),this.visibilityChange&&(0,n.removeDocumentEventListener)(this.visibilityChange,this.handleVisibilityChange,!1)},e.prototype.handleVisibilityChange=function(){this.onIntersectionChanged()},e.prototype.handleIntersect=function(e,t){var i=this;e.forEach((function(e){e.target===i.element&&(i.inViewport=!(e.intersectionRatio<i.threshold))})),this.onIntersectionChanged()},e}();t.ViewportTracker=u},8421:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWebOSTVModelName=function(){try{var e=(0,n.getGlobalWebOSApi)(),t=e.webOSSystem,i=e.PalmSystem,r=(null==t?void 0:t.deviceInfo)?JSON.parse(t.deviceInfo):(null==i?void 0:i.deviceInfo)&&JSON.parse(i.deviceInfo);return(0,a.isValidString)(null==r?void 0:r.modelName)&&!(0,a.isBlank)(null==r?void 0:r.modelName)?r.modelName:void 0}catch(e){return}};var n=i(9422),a=i(1820)},2376:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowEventTracker=void 0;var n=i(9422),a=function(){function e(){this.trackedObjects=[]}return e.prototype.addEventListener=function(e,t){this.trackedObjects.push({eventName:e,func:t}),(0,n.addGlobalEventListener)(e,t)},e.prototype.release=function(){for(;0!==this.trackedObjects.length;){var e=this.trackedObjects.pop();void 0!==e&&(0,n.removeGlobalEventListener)(e.eventName,e.func)}},e}();t.WindowEventTracker=a},8331:function(e,t,i){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeAnalyticsConfig=function(e){if((0,l.isNullish)(e))return{};u.isBoolean(e.isLive)||(e.isLive=void 0);(0,l.isNotNullish)(e.config)&&(0,l.isNotNullish)(e.config.errorTransformerCallback)&&((0,l.isFunction)(e.config.errorTransformerCallback.transform)||(e.config.errorTransformerCallback=void 0));return e},t.guardConfigChangeAgainstMissingTitle=function(e,t){if((0,l.isNullish)(e)||(0,l.isNullish)(t))return;e.title&&(0,s.isBlank)(t.title)&&o.logger.error("The new analytics configuration does not contain the field `title`")},t.guardConfigChangeAgainstMissingIsLive=function(e,t){if((0,l.isNullish)(e)||(0,l.isNullish)(t))return;e.isLive&&(0,l.isNullish)(t.isLive)&&o.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.")},t.guardAgainstDuplicatedUserId=function(e){if((0,l.isNullish)(e))return;(0,l.isNotNullish)(e.customUserId)&&(0,l.isNotNullish)(e.userId)&&o.logger.warn("Configuration Warning: \nCustomUserId and UserId are set in the config \nValue of UserId will be used in sample \nPlease only use one configuration field to set your userId")},t.getDeviceInformationFromAnalyticsConfig=function(e){if((0,l.isNullish)(e))return;var t={};(0,s.isValidString)(e.deviceType)&&!(0,s.isBlank)(e.deviceType)&&(t.model=e.deviceType);(0,s.isValidString)(e.deviceClass)&&!(0,s.isBlank)(e.deviceClass)&&(t.deviceClass=e.deviceClass);if(0===Object.keys(t).length)return;return t},t.getDomainFromAnalyticsConfig=function(e){var t,i,n=(0,r.getGlobalLocationHostname)(),a=n?u.removeTrailingSlash(n):"";return null!==(i=null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.origin)&&void 0!==i?i:a},t.mergeAnalyticsConfig=function(e,t){var i=function(e){var t=["cdnProvider","videoId","title","isLive","experimentName"],i=/customData\d{1,3}$/g;for(var n in e)((0,l.isNotNullish)(n.match(i))||t.includes(n))&&delete e[n];return e}(e),a=function(e,t){if((0,l.isNotNullish)(t))return n(n(n({},e),{enabled:!0}),t);return null!=e?e:{}}(e.config,t.config);return n(n(n({},i),t),{config:a})},t.applySourceMetadataToAnalyticsConfig=function(e,t){var i=n({},e);(0,l.isNotNullish)(t.title)&&(i.title=t.title);(0,l.isNotNullish)(t.videoId)&&(i.videoId=t.videoId);(0,l.isNotNullish)(t.cdnProvider)&&(i.cdnProvider=t.cdnProvider);(0,l.isNotNullish)(t.isLive)&&(i.isLive=t.isLive);(0,l.isNotNullish)(t.customData)&&(i=n(n({},i),(0,a.extractCustomDataFieldsOnly)(t.customData)));return i};var a=i(5529),r=i(9422),o=i(1916),s=i(1820),u=i(5063),l=i(5063)},9627:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.areCollectorRequirementsValid=function(e){var t=[],i=(0,r.isBlank)((0,n.getDomainFromAnalyticsConfig)(e));i&&t.push("no `domain` value found (neither from `window.location` object nor provided by `AnalyticsConfig.config.origin`). Without this value, we cannot verify the origin of your analytics data. Please provide the registered domain via the config during collector creation.");if(t.length>0){var o="Collector setup failed:"+t.join(" -- ");a.logger.errorMessageToUser(o)}return!i};var n=i(8331),a=i(1916),r=i(1820)},3848:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deleteCookie=t.setCookie=t.getCookie=t.removeDocumentEventListener=t.addDocumentEventListener=t.isVideoInFullscreen=t.isDocumentHidden=t.getDocumentPropertyWithPrefix=void 0;var n=i(1916),a=i(1820),r=i(5063);t.getDocumentPropertyWithPrefix=function(e){if(!(0,r.isNullish)(document)){if(e in document)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),i=0,n=["webkit","moz","ms","o"];i<n.length;i++){var a=n[i]+t;if(a in document)return a}}};t.isDocumentHidden=function(){var e=(0,t.getDocumentPropertyWithPrefix)("hidden");return!!(0,a.isValidString)(e)&&!0===document[e]};t.isVideoInFullscreen=function(){var e,i=(0,t.getDocumentPropertyWithPrefix)("fullscreenElement");return!!(0,a.isValidString)(i)&&"VIDEO"===(null===(e=document[i])||void 0===e?void 0:e.nodeName)};t.addDocumentEventListener=function(e,t,i){(0,r.isNullish)(document)||!(0,r.isFunction)(document.addEventListener)||(0,r.isNullish)(t)||document.addEventListener(e,t,i)};t.removeDocumentEventListener=function(e,t,i){(0,r.isNullish)(document)||!(0,r.isFunction)(document.removeEventListener)||(0,r.isNullish)(t)||document.removeEventListener(e,t,i)};t.getCookie=function(e){if(!(0,r.isNullish)(document)){var t;try{t=document.cookie.split(";")}catch(e){return void n.logger.log("failed to access cookie objects on document",e)}for(var i=e+"=",a=0,o=t;a<o.length;a++){for(var s=o[a];" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(i))return s.substring(i.length,s.length)}return""}};t.setCookie=function(e,t,i){if(!(0,r.isNullish)(document)){var a=e+"="+t+"; path=/";(null==i?void 0:i.domain)&&(a+="; domain=".concat(i.domain)),(null==i?void 0:i.expires)&&(a+="; expires=".concat(i.expires)),(null==i?void 0:i.maxAge)&&(a+="; max-age=".concat(i.maxAge));try{document.cookie=a}catch(e){return void n.logger.log("failed to set cookie object on document",e)}}};t.deleteCookie=function(e){if(!(0,r.isNullish)(document))try{document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}catch(e){return void n.logger.log("failed to delete cookies from document",e)}}},5923:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalScope=void 0,t.globalScope=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof window)return window;if(void 0!==i.g)return i.g;if("undefined"!=typeof self)return self;throw new Error("Unable to locate global object")}()},9422:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGlobalTheoPlayerVersion=t.getGlobalVideojsVersion=t.getGlobalNavigatorUserAgent=t.getGlobalNavigatorProduct=t.getGlobalNavigatorLanguage=t.hasGlobalWebOSApi=t.getGlobalWebOSApi=t.getGlobalPerformanceNow=t.getGlobalLocationPathname=t.getGlobalLocationHostname=t.removeGlobalEventListener=t.addGlobalEventListener=t.getGlobalScreenDimensions=t.getGlobalDevicePixelRatio=void 0;var n=i(5923),a=i(1460),r=i(1820),o=i(5063);t.getGlobalDevicePixelRatio=function(){return(0,o.isNullish)(n.globalScope.devicePixelRatio)?1:n.globalScope.devicePixelRatio>0?n.globalScope.devicePixelRatio:1};t.getGlobalScreenDimensions=function(){if(!(0,o.isNullish)(n.globalScope.screen)&&(0,a.isNumber)(n.globalScope.screen.width)&&(0,a.isNumber)(n.globalScope.screen.height)){var e=(0,t.getGlobalDevicePixelRatio)(),i=n.globalScope.screen.width*e,r=n.globalScope.screen.height*e;if(!(!isFinite(i)||!isFinite(r)||i<=0||r<=0))return{width:i,height:r,scale:e}}};t.addGlobalEventListener=function(e,t){(0,o.isNullish)(n.globalScope.addEventListener)||!(0,o.isFunction)(n.globalScope.addEventListener)||(0,o.isNullish)(t)||n.globalScope.addEventListener(e,t)};t.removeGlobalEventListener=function(e,t){(0,o.isNullish)(n.globalScope.removeEventListener)||!(0,o.isFunction)(n.globalScope.removeEventListener)||(0,o.isNullish)(t)||n.globalScope.removeEventListener(e,t)};t.getGlobalLocationHostname=function(){if(!(0,o.isNullish)(n.globalScope.location)&&(0,r.isValidString)(n.globalScope.location.hostname))return n.globalScope.location.hostname};t.getGlobalLocationPathname=function(){if(!(0,o.isNullish)(n.globalScope.location)&&(0,r.isValidString)(n.globalScope.location.pathname))return n.globalScope.location.pathname};t.getGlobalPerformanceNow=function(){var e;if(!(0,o.isNullish)(null===(e=n.globalScope.performance)||void 0===e?void 0:e.now)&&(0,o.isFunction)(n.globalScope.performance.now))return n.globalScope.performance.now()};t.getGlobalWebOSApi=function(){return{webOSSystem:n.globalScope.webOSSystem,PalmSystem:n.globalScope.PalmSystem}};t.hasGlobalWebOSApi=function(){var e=(0,t.getGlobalWebOSApi)(),i=e.webOSSystem,n=e.PalmSystem;return!(0,o.isNullish)(i)||!(0,o.isNullish)(n)};t.getGlobalNavigatorLanguage=function(){if(!(0,o.isNullish)(n.globalScope.navigator))return n.globalScope.navigator.language||n.globalScope.navigator.userLanguage};t.getGlobalNavigatorProduct=function(){if(!(0,o.isNullish)(n.globalScope.navigator))return n.globalScope.navigator.product};t.getGlobalNavigatorUserAgent=function(){if(!(0,o.isNullish)(n.globalScope.navigator)&&(0,r.isValidString)(n.globalScope.navigator.userAgent))return n.globalScope.navigator.userAgent};t.getGlobalVideojsVersion=function(){if(!(0,o.isNullish)(n.globalScope.videojs))return n.globalScope.videojs.VERSION};t.getGlobalTheoPlayerVersion=function(){if(!(0,o.isNullish)(n.globalScope.THEOplayer))return n.globalScope.THEOplayer.version}},1460:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseIntOrUndefined=t.isFiniteNumber=t.isNumber=void 0;var n=i(5063);t.isNumber=function(e){return!(0,n.isNullish)(e)&&"number"==typeof e};t.isFiniteNumber=function(e){return!!(0,t.isNumber)(e)&&((0,n.isFunction)(Number.isFinite)?Number.isFinite(e):isFinite(e))};t.parseIntOrUndefined=function(e){var i=parseInt(e,10);return(0,t.isFiniteNumber)(i)?i:void 0}},2974:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.objectValues=void 0,t.safeAccess=function(e){try{return e()}catch(e){return void n.logger.log("safeAccess catched failed access on property: ",e)}};var n=i(1916);t.objectValues=function(e){return Object.keys(e).map((function(t){return e[t]}))}},2108:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER=void 0,t.hasPlayerAlreadyBeenAugmented=function(e){return!0===e[t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER]},t.markPlayerInstanceAsAugmented=function(e){e[t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER]=!0},t.isDefined=function(e){if((0,a.isNullish)(e))return n.logger.log("Bitmovin Analytics: Adapter hasn't been initialized yet"),!1;return!0};var n=i(1916),a=i(5063);t.BITMOVIN_ANALYTICS_AUGMENTED_MARKER="__bitmovinAnalyticsHasBeenSetup"},6481:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clearSampleStateValues=function(e){e.ad=0,e.adId=void 0,e.adIndex=void 0,e.adPosition=void 0,e.adSystem=void 0,e.autoplay=void 0,e.buffered=0,e.castTech=void 0,e.completed=void 0,e.drmLoadTime=void 0,e.droppedFrames=0,e.duration=0,e.errorCode=void 0,e.errorData=void 0,e.errorMessage=void 0,e.errorSegments=void 0,e.errorSeverity=void 0,e.isProgramChange=void 0,e.pageLoadTime=0,e.paused=0,e.played=0,e.playerStartupTime=0,e.seeked=0,e.startupTime=0,e.state=void 0,e.videoStartFailed=void 0,e.videoStartFailedReason=void 0,e.videoStartupTime=0,e[n.SSAI_RELATED_SAMPLE_MARKER]=void 0},t.getDefaultSamplePath=function(){var e=(0,a.getGlobalLocationPathname)();return(0,r.isValidString)(e)?(0,s.removeTrailingSlash)(e):void 0},t.buildAdSample=function(e){var t={};if((0,s.isNullish)(e))return t;return t.cdnProvider=e.cdnProvider,t.customUserId=e.customUserId,t.domain=e.domain,t.key=e.key,t.language=e.language,t.path=e.path,t.player=e.player,t.playerKey=e.playerKey,t.playerTech=e.playerTech,t.screenHeight=e.screenHeight,t.screenWidth=e.screenWidth,t.size=e.size,t.userAgent=e.userAgent,t.userId=e.userId,t.version=e.version,t.videoId=e.videoId,t.videoImpressionId=e.impressionId,t.videoTitle=e.videoTitle,t.videoWindowHeight=e.videoWindowHeight,t.videoWindowWidth=e.videoWindowWidth,o.transferCustomDataFields(e,t),t.experimentName=e.experimentName,t};var n=i(7906),a=i(9422),r=i(1820),o=i(5063),s=i(5063)},1820:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWith=t.endsWith=t.isBlank=t.isEmpty=t.isValidString=void 0;var n=i(5063);t.isValidString=function(e){return(0,n.isNotNullish)(e)&&"string"==typeof e};t.isEmpty=function(e){return(0,n.isNullish)(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,i){return!(!(0,t.isValidString)(e)||!(0,t.isValidString)(i))&&((0,n.isFunction)(String.prototype.endsWith)?e.endsWith(i):e.substring(e.length-i.length)===i)};t.startsWith=function(e,i){return!(!(0,t.isValidString)(e)||!(0,t.isValidString)(i))&&((0,n.isFunction)(String.prototype.startsWith)?e.startsWith(i):e.substring(0,i.length)===i)}},2982:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUUID=void 0;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={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,i),r.exports}i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var n={};return function(){"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.PlayerModule=e.adapters=e.Bitmovin8Adapter=e.CdnProviders=e.Players=e.version=void 0;var t=i(4679);Object.defineProperty(e,"Bitmovin8Adapter",{enumerable:!0,get:function(){return t.Bitmovin8Adapter}});var a=i(681);Object.defineProperty(e,"PlayerModule",{enumerable:!0,get:function(){return a.PlayerModule}});var r=i(4355);Object.defineProperty(e,"CdnProviders",{enumerable:!0,get:function(){return r.CdnProvider}});var o=i(556);Object.defineProperty(e,"Players",{enumerable:!0,get:function(){return o.Player}});var s=i(4926);Object.defineProperty(e,"version",{enumerable:!0,get:function(){return s.VERSION}}),e.adapters={Bitmovin8Adapter:t.Bitmovin8Adapter},e.default={PlayerModule:a.PlayerModule}}(),n}()}));
|
|
12
12
|
//# sourceMappingURL=bitmovin-analytics-bitmovin-player.js.map
|