=d&&i1?i-1:0),s=1;si?(s.duration=r-s.start,s.duration<0&&c.b.warn("negative duration computed for frag "+s.sn+",level "+s.level+", there should be some duration drift between playlist and fragment!")):(n.duration=s.start-r,n.duration<0&&c.b.warn("negative duration computed for frag "+n.sn+",level "+n.level+", there should be some duration drift between playlist and fragment!")):n.start=e>i?s.start+s.duration:Math.max(s.start-n.duration,0)}function tt(t,i,e,s,n,r){var h=e;if(Object(o.a)(i.startPTS)){var a=Math.abs(i.startPTS-e);Object(o.a)(i.deltaPTS)?i.deltaPTS=Math.max(a,i.deltaPTS):i.deltaPTS=a,h=Math.max(e,i.startPTS),e=Math.min(e,i.startPTS),s=Math.max(s,i.endPTS),n=Math.min(n,i.startDTS),r=Math.max(r,i.endDTS)}var c=e-i.start;i.start=i.startPTS=e,i.maxStartPTS=h,i.endPTS=s,i.startDTS=n,i.endDTS=r,i.duration=s-e;var l,u,d,p=i.sn;if(!t||pt.endSN)return 0;for(l=p-t.startSN,(u=t.fragments)[l]=i,d=l;d>0;d--)Z(u,d,d-1);for(d=l;de.startCC||t&&t.cct&&e.start?-1:0}function ht(t,i,e){var s=1e3*Math.min(i,e.duration+(e.deltaPTS?e.deltaPTS:0));return(e.endProgramDateTime||0)-s>t}var ot=function(){function t(t,i,e,s){this.config=t,this.media=i,this.fragmentTracker=e,this.hls=s,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var i=t.prototype;return i.poll=function(t){var i=this.config,e=this.media,s=this.stalled,n=e.currentTime,r=e.seeking,h=this.seeking&&!r,o=!this.seeking&&r;if(this.seeking=r,n===t){if((o||h)&&(this.stalled=null),!e.paused&&!e.ended&&0!==e.playbackRate&&e.buffered.length){var a=H.bufferInfo(e,n,0),l=a.len>0,u=a.nextStart||0;if(l||u){if(r){if(a.len>2||!u||u-n>2)return;this.moved=!1}if(!this.moved&&this.stalled){var d=Math.max(u,a.start||0)-n;if(d>0&&d<=2)return void this.Na(null)}var p=self.performance.now();if(null!==s){var f=p-s;!r&&f>=250&&this.Ha(a.len);var v=H.bufferInfo(e,n,i.maxBufferHole);this.za(v,f)}else this.stalled=p}}}else if(this.moved=!0,null!==s){if(this.stallReported){var g=self.performance.now()-s;c.b.warn("playback not stuck anymore @"+n+", after "+Math.round(g)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},i.za=function(t,i){var e=this.config,s=this.fragmentTracker,n=this.media.currentTime,r=s.getPartialFragment(n);r&&this.Na(r)||t.len>e.maxBufferHole&&i>1e3*e.highBufferWatchdogPeriod&&(c.b.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this.qa())},i.Ha=function(t){var i=this.hls,e=this.media;this.stallReported||(this.stallReported=!0,c.b.warn("Playback stalling at @"+e.currentTime+" due to low buffer"),i.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},i.Na=function(t){for(var i=this.config,e=this.hls,s=this.media,n=s.currentTime,r=0,o=0;o=r&&n0&&-1===t&&(c.b.log("override startPosition with lastCurrentTime @"+i.toFixed(3)),t=i),this.state=lt,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=ct},d.stopLoad=function(){this.forceStartLoad=!1,t.prototype.stopLoad.call(this)},d.doTick=function(){switch(this.state){case gt:this.fragLoadError=0;break;case lt:this.Ga();break;case bt:var t=this.levels[this.level];t&&t.details&&(this.state=lt);break;case pt:var i=window.performance.now(),e=this.retryDate;(!e||i>=e||this.media&&this.media.seeking)&&(c.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=lt)}this.Ja(),this.Qa()},d.Ga=function(){var t=this.hls,i=t.config,e=this.media;if(void 0!==this.levelLastLoaded&&(e||!this.startFragRequested&&i.startFragPrefetch)){var s;s=this.loadedmetadata?e.currentTime:this.nextLoadPosition;var n=t.nextLoadLevel,r=this.levels[n];if(r){var h,o=r.bitrate;h=o?Math.max(8*i.maxBufferSize/o,i.maxBufferLength):i.maxBufferLength,h=Math.min(h,i.maxMaxBufferLength);var l=H.bufferInfo(this.mediaBuffer?this.mediaBuffer:e,s,i.maxBufferHole),u=l.len;if(!(u>=h)){c.b.trace("buffer length of "+u.toFixed(3)+" is below max of "+h.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=n;var d=r.details;if(!d||d.live&&this.levelLastLoaded!==n)this.state=bt;else{if(this.Xa(l,d)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(a.a.BUFFER_EOS,p),void(this.state=mt)}this.Ya(s,l,d)}}}}},d.Ya=function(t,i,e){var s=this.fragPrevious,n=this.level,r=e.fragments,h=r.length;if(0!==h){var o,a=r[0].start,l=r[h-1].start+r[h-1].duration,u=i.end;if(e.initSegment&&!e.initSegment.data)o=e.initSegment;else if(e.live){var d=this.config.initialLiveManifestSize;if(hp&&p>u.currentTime&&(c.b.log("buffer end: "+i.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+p.toFixed(3)),u.currentTime=p),this.nextLoadPosition=p}if(t.PTSKnown&&i>s&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(n)if(t.hasProgramDateTime)c.b.log("live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),a=function(t,i,e){if(null===i||!Array.isArray(t)||!t.length||!Object(o.a)(i))return null;if(i<(t[0].programDateTime||0))return null;if(i>=(t[t.length-1].endProgramDateTime||0))return null;e=e||0;for(var s=0;s=t.startSN&&f<=t.endSN){var v=r[f-t.startSN];n.cc===v.cc&&(a=v,c.b.log("live playlist, switching playlist, load frag with next SN: "+a.sn))}a||(a=N.search(r,(function(t){return n.cc-t.cc})))&&c.b.log("live playlist, switching playlist, load frag with same CC: "+a.sn)}a||(a=r[Math.min(h-1,Math.round(h/2))],c.b.log("live playlist, switching playlist, unknown, load middle frag : "+a.sn))}return a},d.Za=function(t,i,e,s,n,r,h){var o,a=this.hls.config;if(o=nr-a.maxFragLookUpTolerance?0:a.maxFragLookUpTolerance):s[e-1],o){var l=o.sn-h.startSN,u=i&&o.level===i.level,d=s[l-1],p=s[l+1];if(i&&o.sn===i.sn)if(u&&!o.backtracked)if(o.sna.maxBufferHole&&i.dropped&&l?(o=d,c.b.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(o=p,c.b.log("Re-loading fragment with SN: "+o.sn))}else o=null;else o.backtracked&&(p&&p.backtracked?(c.b.warn("Already backtracked from fragment "+p.sn+", will not backtrack to fragment "+o.sn+". Loading fragment "+p.sn),o=p):(c.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),o.dropped=0,d?(o=d).backtracked=!0:l&&(o=null)))}return o},d.tc=function(t){this.state=ut,this.hls.trigger(a.a.KEY_LOADING,{frag:t})},d.ic=function(t){var i=this.fragmentTracker.getState(t);this.fragCurrent=t,"initSegment"!==t.sn&&(this.startFragRequested=!0),Object(o.a)(t.sn)&&!t.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),t.backtracked||i===j||i===$?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(a.a.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new Y(this.hls,"main")),this.state=dt):i===F&&this.ec(t.duration)&&this.fragmentTracker.removeFragment(t)},d.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,n.MAIN)},d.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},d.Qa=function(){var t,i,e=this.media;if(e&&e.readyState&&!1===e.seeking&&((i=e.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=i),H.isBuffered(e,i)?t=this.getBufferedFrag(i):H.isBuffered(e,i+.1)&&(t=this.getBufferedFrag(i+.1)),t)){var s=t;if(s!==this.fragPlaying){this.hls.trigger(a.a.FRAG_CHANGED,{frag:s});var n=s.level;this.fragPlaying&&this.fragPlaying.level===n||this.hls.trigger(a.a.LEVEL_SWITCHED,{level:n}),this.fragPlaying=s}}},d.immediateLevelSwitch=function(){if(c.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t,i=this.media;i?(t=i.paused,i.pause()):t=!0,this.previouslyPaused=t}var e=this.fragCurrent;e&&e.loader&&e.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},d.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,H.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},d.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var i,e,s;if((e=this.getBufferedFrag(t.currentTime))&&e.startPTS>1&&this.flushMainBuffer(0,e.startPTS-1),t.paused)i=0;else{var n=this.hls.nextLoadLevel,r=this.levels[n],h=this.fragLastKbps;i=h&&this.fragCurrent?this.fragCurrent.duration*r.bitrate/(1e3*h)+1:0}if((s=this.getBufferedFrag(t.currentTime+i))&&(s=this.followingBufferedFrag(s))){var o=this.fragCurrent;o&&o.loader&&o.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(s.maxStartPTS,Number.POSITIVE_INFINITY)}}},d.flushMainBuffer=function(t,i){this.state=gt;var e={startOffset:t,endOffset:i};this.altAudio&&(e.type="video"),this.hls.trigger(a.a.BUFFER_FLUSHING,e)},d.onMediaAttached=function(t){var i=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),i.addEventListener("seeking",this.onvseeking),i.addEventListener("seeked",this.onvseeked),i.addEventListener("ended",this.onvended);var e=this.config;this.levels&&e.autoStartLoad&&this.hls.startLoad(e.startPosition),this.gapController=new ot(e,i,this.fragmentTracker,this.hls)},d.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(c.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var i=this.levels;i&&i.forEach((function(t){t.details&&t.details.fragments.forEach((function(t){t.backtracked=void 0}))})),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},d.onMediaSeeked=function(){var t=this.media,i=t?t.currentTime:void 0;Object(o.a)(i)&&c.b.log("media seeked to "+i.toFixed(3)),this.tick()},d.onManifestLoading=function(){c.b.log("trigger BUFFER_RESET"),this.hls.trigger(a.a.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},d.onManifestParsed=function(t){var i,e=!1,s=!1;t.levels.forEach((function(t){(i=t.audioCodec)&&(-1!==i.indexOf("mp4a.40.2")&&(e=!0),-1!==i.indexOf("mp4a.40.5")&&(s=!0))})),this.audioCodecSwitch=e&&s,this.audioCodecSwitch&&c.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=t.altAudio,this.levels=t.levels,this.startFragRequested=!1;var n=this.config;(n.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(n.startPosition)},d.onLevelLoaded=function(t){var i=t.details,e=t.level,s=this.levels[this.levelLastLoaded],n=this.levels[e],r=i.totalduration,h=0;if(c.b.log("level "+e+" loaded ["+i.startSN+","+i.endSN+"],duration:"+r),i.live){var l=n.details;l&&i.fragments.length>0?(function(t,i){i.initSegment&&t.initSegment&&(i.initSegment=t.initSegment);var e,s=0;if(it(t,i,(function(t,n){s=t.cc-n.cc,Object(o.a)(t.startPTS)&&(n.start=n.startPTS=t.startPTS,n.endPTS=t.endPTS,n.duration=t.duration,n.backtracked=t.backtracked,n.dropped=t.dropped,e=n),i.PTSKnown=!0})),i.PTSKnown){if(s){c.b.log("discontinuity sliding from playlist, take drift into account");for(var n=i.fragments,r=0;rs.length))for(var r=0;r0,this.nc())}},d.nc=function(){if(!(this.state!==vt||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var i=this.mediaBuffer?this.mediaBuffer:this.media;c.b.log("main buffered : "+et.toString(i.buffered)),this.fragPrevious=t;var e=this.stats;e.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*e.total/(e.tbuffered-e.tfirst)),this.hls.trigger(a.a.FRAG_BUFFERED,{stats:e,frag:t,id:"main"}),this.state=lt}this.tick()}},d.onError=function(t){var i=t.frag||this.fragCurrent;if(!i||"main"===i.type){var e=!!this.media&&H.isBuffered(this.media,this.media.currentTime)&&H.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case h.a.FRAG_LOAD_ERROR:case h.a.FRAG_LOAD_TIMEOUT:case h.a.KEY_LOAD_ERROR:case h.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var s=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);c.b.warn("mediaController: frag loading failed, retry in "+s+" ms"),this.retryDate=window.performance.now()+s,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=pt}else c.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=yt;break;case h.a.LEVEL_LOAD_ERROR:case h.a.LEVEL_LOAD_TIMEOUT:this.state!==yt&&(t.fatal?(this.state=yt,c.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==bt||(this.state=lt));break;case h.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==ft&&this.state!==vt||(e?(this.ec(this.config.maxBufferLength),this.state=lt):(c.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},d.ec=function(t){var i=this.config;return i.maxMaxBufferLength>=t&&(i.maxMaxBufferLength/=2,c.b.warn("main:reduce max buffer length to "+i.maxMaxBufferLength+"s"),!0)},d.Ja=function(){var t=this.media;if(t&&0!==t.readyState){var i=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&i.length?(this.loadedmetadata=!0,this.rc()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,i)}},d.onFragLoadEmergencyAborted=function(){this.state=lt,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},d.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;t&&this.fragmentTracker.detectEvictedFragments(f.VIDEO,t.buffered),this.state=lt,this.fragPrevious=null},d.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},d.rc=function(){var t=this.media,i=t.currentTime,e=t.seeking?i:this.startPosition;i!==e&&e>=0&&(c.b.log("target start position not buffered, seek to buffered.start(0) "+e+" from current time "+i+" "),t.currentTime=e)},d.sc=function(t){var i=this.config.defaultAudioCodec||t.audioCodec;return this.audioCodecSwap&&(c.b.log("swapping playlist audio codec"),i&&(i=-1!==i.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),i},r=s,(l=[{key:"state",set:function(t){if(this.state!==t){var i=this.state;this.Wa=t,c.b.log("main stream-controller: "+i+"->"+t),this.hls.trigger(a.a.STREAM_STATE_TRANSITION,{previousState:i,nextState:t})}},get:function(){return this.Wa}},{key:"currentLevel",get:function(){var t=this.media;if(t){var i=this.getBufferedFrag(t.currentTime);if(i)return i.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this.hc},set:function(t){this.hc=t}}])&&wt(r.prototype,l),u&&wt(r,u),s}(function(t){var i,e;function s(){return t.apply(this,arguments)||this}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.doTick=function(){},n.startLoad=function(){},n.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=ct},n.Xa=function(t,i){var e=this.fragCurrent,s=this.fragmentTracker;if(!i.live&&e&&!e.backtracked&&e.sn===i.endSN&&!t.nextStart){var n=s.getState(e);return n===$||n===V}return!1},n.onMediaSeeking=function(){var t=this.config,i=this.media,e=this.mediaBuffer,s=this.state,n=i?i.currentTime:null,r=H.bufferInfo(e||i,n,this.config.maxBufferHole);if(Object(o.a)(n)&&c.b.log("media seeking to "+n.toFixed(3)),s===dt){var h=this.fragCurrent;if(0===r.len&&h){var a=t.maxFragLookUpTolerance,l=h.start-a,u=h.start+h.duration+a;nu?(h.loader&&(c.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),h.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=lt):c.b.log("seeking outside of buffer but within currently loaded fragment range")}}else s===mt&&(0===r.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=lt);i&&(this.lastCurrentTime=n),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=n),this.tick()},n.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},n.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},n.onHandlerDestroyed=function(){this.state=ct,this.fragmentTracker=null},n.computeLivePosition=function(t,i){var e=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*i.targetduration;return t+Math.max(0,i.totalduration-e)},s}(function(t){var i,e;function s(i){for(var e,s=arguments.length,n=new Array(s>1?s-1:0),r=1;r1&&(this.clearNextTick(),this.ac=self.setTimeout(this.oc,0)),this.dc=0)},n.doTick=function(){},s}(u)));function St(t,i){for(var e=0;e0){i=e[0].bitrate,e.sort((function(t,i){return t.bitrate-i.bitrate})),this.fc=e;for(var u=0;u=0&&t1&&u.loadError0){var i=this.currentLevelIndex,e=t.urlId,s=t.url[e];c.b.log("Attempt loading level index "+i+" with URL-id "+e),this.hls.trigger(a.a.LEVEL_LOADING,{url:s,level:i,id:e})}}},n=s,(r=[{key:"levels",get:function(){return this.fc}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var i=this.fc;i&&(t=Math.min(t,i.length-1),this.currentLevelIndex===t&&i[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this.gc&&(this.gc=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this.vc},set:function(t){this.vc=t}},{key:"startLevel",get:function(){if(void 0===this.gc){var t=this.hls.config.startLevel;return void 0!==t?t:this.vc}return this.gc},set:function(t){this.gc=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&St(n.prototype,r),o&&St(n,o),s}(u),Pt=e(4);function kt(t,i){var e;try{e=new Event("addtrack")}catch(t){(e=document.createEvent("Event")).initEvent("addtrack",!1,!1)}e.track=t,i.dispatchEvent(e)}var It=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.MEDIA_ATTACHED,a.a.MEDIA_DETACHING,a.a.FRAG_PARSING_METADATA,a.a.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,e.media=void 0,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){u.prototype.destroy.call(this)},n.onMediaAttached=function(t){this.media=t.media,this.media},n.onMediaDetaching=function(){!function(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}(this.id3Track),this.id3Track=void 0,this.media=void 0},n.getID3Track=function(t){for(var i=0;io&&(c.b.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),o=h+.25);for(var a=0;at[t.length-1].endTime)return t[t.length-1];for(var e=0,s=t.length-1;e<=s;){var n=Math.floor((s+e)/2);if(it[n].endTime))return t[n];e=n+1}}return t[e].endTime-i=this.minWeight_},i.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},i.destroy=function(){},t}();function Mt(t,i){for(var e=0;e500*e.duration/o){var l=t.levels,u=Math.max(1,r.bw?r.bw/8:1e3*r.loaded/h),d=l[e.level],p=d.realBitrate?Math.max(d.realBitrate,d.bitrate):d.bitrate,f=r.total?r.total:Math.max(r.loaded,Math.round(e.duration*p/8)),v=i.currentTime,g=(f-r.loaded)/u,m=(H.bufferInfo(i,v,t.config.maxBufferHole).end-v)/o;if(m<2*e.duration/o&&g>m){var y;for(y=e.level-1;y>n;y--){var b=l[y].realBitrate?Math.max(l[y].realBitrate,l[y].bitrate):l[y].bitrate;if(e.duration*b/(6.4*u)=s;l--){var u=a[l];if(u){var d=u.details,p=d?d.totalduration/d.fragments.length:i,f=!!d&&d.live,v=void 0;v=l<=t?h*e:o*e;var g=a[l].realBitrate?Math.max(a[l].realBitrate,a[l].bitrate):a[l].bitrate,m=g*p/v;if(c.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+l+"/"+Math.round(v)+"/"+g+"/"+p+"/"+r+"/"+m),v>g&&(!m||f&&!this.bitrateTestDelay||m=0)return p;c.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var f=o?Math.min(o,s.maxStarvationDelay):s.maxStarvationDelay,v=s.abrBandWidthFactor,g=s.abrBandWidthUpFactor;if(0===d){var m=this.bitrateTestDelay;m&&(f=(o?Math.min(o,s.maxLoadingDelay):s.maxLoadingDelay)-m,c.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*f)+" ms"),v=g=1)}return p=this.bc(h,o,u,n,i,d+f,v,g,e),Math.max(p,0)}}])&&Mt(n.prototype,r),l&&Mt(n,l),s}(u),Ot=G(),Rt=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.MEDIA_ATTACHING,a.a.MEDIA_DETACHING,a.a.MANIFEST_PARSED,a.a.BUFFER_RESET,a.a.BUFFER_APPENDING,a.a.BUFFER_CODECS,a.a.BUFFER_EOS,a.a.BUFFER_FLUSHING,a.a.LEVEL_PTS_UPDATED,a.a.LEVEL_UPDATED)||this).wc=null,e.xc=null,e.Sc=10,e._c=null,e.Ac=null,e.Pc=!1,e.kc=!1,e.config=void 0,e.audioTimestampOffset=void 0,e.bufferCodecEventsExpected=0,e.Ic=0,e.media=null,e.mediaSource=null,e.segments=[],e.parent=void 0,e.appending=!1,e.appended=0,e.appendError=0,e.flushBufferCounter=0,e.tracks={},e.pendingTracks={},e.sourceBuffer={},e.flushRange=[],e.Cc=function(){c.b.log("media source opened"),e.hls.trigger(a.a.MEDIA_ATTACHED,{media:e.media});var t=e.mediaSource;t&&t.removeEventListener("sourceopen",e.Cc),e.checkPendingTracks()},e.Mc=function(){c.b.log("media source closed")},e.Ec=function(){c.b.log("media source ended")},e.Oc=function(){if(e.audioTimestampOffset&&e.sourceBuffer.audio){var t=e.sourceBuffer.audio;c.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+e.audioTimestampOffset),t.timestampOffset=e.audioTimestampOffset,delete e.audioTimestampOffset}e.Pc&&e.doFlush(),e.kc&&e.checkEos(),e.appending=!1;var i=e.parent,s=e.segments.reduce((function(t,e){return e.parent===i?t+1:t}),0),n={},r=e.sourceBuffer;for(var h in r){var o=r[h];if(!o)throw Error("handling source buffer update end error: source buffer for "+h+" uninitilized and unable to update buffered TimeRanges.");n[h]=o.buffered}e.hls.trigger(a.a.BUFFER_APPENDED,{parent:i,pending:s,timeRanges:n}),e.Pc||e.doAppending(),e.updateMediaElementDuration(),0===s&&e.flushLiveBackBuffer()},e.Rc=function(t){c.b.error("sourceBuffer error:",t),e.hls.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.config=i.config,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){u.prototype.destroy.call(this)},n.onLevelPtsUpdated=function(t){var i=t.type,e=this.tracks.audio;if("audio"===i&&e&&"audio/mpeg"===e.container){var s=this.sourceBuffer.audio;if(!s)throw Error("Level PTS Updated and source buffer for audio uninitalized");if(Math.abs(s.timestampOffset-t.start)>.1){var n=s.updating;try{s.abort()}catch(t){c.b.warn("can not abort audio buffer: "+t)}n?this.audioTimestampOffset=t.start:(c.b.warn("change mpeg audio timestamp offset from "+s.timestampOffset+" to "+t.start),s.timestampOffset=t.start)}}},n.onManifestParsed=function(t){this.bufferCodecEventsExpected=this.Ic=t.altAudio?2:1,c.b.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},n.onMediaAttaching=function(t){var i=this.media=t.media;if(i&&Ot){var e=this.mediaSource=new Ot;e.addEventListener("sourceopen",this.Cc),e.addEventListener("sourceended",this.Ec),e.addEventListener("sourceclose",this.Mc),i.src=window.URL.createObjectURL(e),this.Ac=i.src}},n.onMediaDetaching=function(){c.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){c.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.Cc),t.removeEventListener("sourceended",this.Ec),t.removeEventListener("sourceclose",this.Mc),this.media&&(this.Ac&&this.hls.config.cnxRenderWindow.URL.revokeObjectURL(this.Ac),this.media.src===this.Ac?(this.media.removeAttribute("src"),this.media.load()):c.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this.Ac=null,this.bufferCodecEventsExpected=this.Ic,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(a.a.MEDIA_DETACHED)},n.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,i=this.pendingTracks,e=Object.keys(i).length;(e&&!t||2===e)&&(this.createSourceBuffers(i),this.pendingTracks={},this.doAppending())},n.onBufferReset=function(){var t=this.sourceBuffer;for(var i in t){var e=t[i];try{e&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(e),e.removeEventListener("updateend",this.Oc),e.removeEventListener("error",this.Rc))}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},n.onBufferCodecs=function(t){var i=this;Object.keys(this.sourceBuffer).length||(Object.keys(t).forEach((function(e){i.pendingTracks[e]=t[e]})),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},n.createSourceBuffers=function(t){var i=this.sourceBuffer,e=this.mediaSource;if(!e)throw Error("createSourceBuffers called when mediaSource was null");for(var s in t)if(!i[s]){var n=t[s];if(!n)throw Error("source buffer exists for track "+s+", however track does not");var r=n.levelCodec||n.codec,o=n.container+";codecs="+r;c.b.log("creating sourceBuffer("+o+")");try{var l=i[s]=e.addSourceBuffer(o);l.addEventListener("updateend",this.Oc),l.addEventListener("error",this.Rc),this.tracks[s]={buffer:l,codec:r,id:n.id,container:n.container,levelCodec:n.levelCodec}}catch(t){c.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:o})}}this.hls.trigger(a.a.BUFFER_CREATED,{tracks:this.tracks})},n.onBufferAppending=function(t){this.Pc||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},n.onBufferEos=function(t){for(var i in this.sourceBuffer)if(!t.type||t.type===i){var e=this.sourceBuffer[i];e&&!e.ended&&(e.ended=!0,c.b.log(i+" sourceBuffer now EOS"))}this.checkEos()},n.checkEos=function(){var t=this.sourceBuffer,i=this.mediaSource;if(i&&"open"===i.readyState){for(var e in t){var s=t[e];if(s){if(!s.ended)return;if(s.updating)return void(this.kc=!0)}}c.b.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{i.endOfStream()}catch(t){c.b.warn("exception while calling mediaSource.endOfStream()")}this.kc=!1}else this.kc=!1},n.onBufferFlushing=function(t){t.type?this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}):(this.flushRange.push({start:t.startOffset,end:t.endOffset,type:"video"}),this.flushRange.push({start:t.startOffset,end:t.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},n.flushLiveBackBuffer=function(){if(this._c){var t=this.config.liveBackBufferLength;if(isFinite(t)&&!(t<0))if(this.media)for(var i=this.media.currentTime,e=this.sourceBuffer,s=Object.keys(e),n=i-Math.max(t,this.Sc),r=s.length-1;r>=0;r--){var h=s[r],o=e[h];if(o){var l=o.buffered;l.length>0&&n>l.start(0)&&this.removeBufferRange(h,o,0,n)&&this.hls.trigger(a.a.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n})}}else c.b.error("flushLiveBackBuffer called without attaching media")}},n.onLevelUpdated=function(t){var i=t.details;i.fragments.length>0&&(this.xc=i.totalduration+i.fragments[0].start,this.Sc=i.averagetargetduration||i.targetduration||10,this._c=i.live,this.updateMediaElementDuration())},n.updateMediaElementDuration=function(){var t,i=this.config;if(null!==this.xc&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var e in this.sourceBuffer){var s=this.sourceBuffer[e];if(s&&!0===s.updating)return}t=this.media.duration,null===this.wc&&(this.wc=this.mediaSource.duration),!0===this._c&&!0===i.liveDurationInfinity?(c.b.log("Media Source duration is set to Infinity"),this.wc=this.mediaSource.duration=1/0):(this.xc>this.wc&&this.xc>t||!Object(o.a)(t))&&(c.b.log("Updating Media Source duration to "+this.xc.toFixed(3)),this.wc=this.mediaSource.duration=this.xc)}},n.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this.Pc=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this.Pc=!1;var i=0,e=this.sourceBuffer;try{for(var s in e){var n=e[s];n&&(i+=n.buffered.length)}}catch(t){c.b.error("error while accessing sourceBuffer.buffered")}this.appended=i,this.hls.trigger(a.a.BUFFER_FLUSHED)}},n.doAppending=function(){var t=this.config,i=this.hls,e=this.segments,s=this.sourceBuffer;if(Object.keys(s).length){if(!this.media||this.media.error)return this.segments=[],void c.b.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var n=e.shift();if(n)try{var r=s[n.type];if(!r)return void this.Oc();if(r.updating)return void e.unshift(n);r.ended=!1,this.parent=n.parent,r.appendBuffer(n.data),this.appendError=0,this.appended++,this.appending=!0}catch(s){c.b.error("error while trying to append buffer:"+s.message),e.unshift(n);var o={type:h.b.MEDIA_ERROR,parent:n.parent,details:"",fatal:!1};22===s.code?(this.segments=[],o.details=h.a.BUFFER_FULL_ERROR):(this.appendError++,o.details=h.a.BUFFER_APPEND_ERROR,this.appendError>t.appendErrorMaxRetry&&(c.b.log("fail "+t.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],o.fatal=!0)),i.trigger(a.a.ERROR,o)}}}},n.flushBuffer=function(t,i,e){var s=this.sourceBuffer;if(!Object.keys(s).length)return!0;var n="null";if(this.media&&(n=this.media.currentTime.toFixed(3)),c.b.log("flushBuffer,pos/start/end: "+n+"/"+t+"/"+i),this.flushBufferCounter>=this.appended)return c.b.warn("abort flushing too many retries"),!0;var r=s[e];if(r){if(r.ended=!1,r.updating)return c.b.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(e,r,t,i))return this.flushBufferCounter++,!1}return c.b.log("buffer flushed"),!0},n.removeBufferRange=function(t,i,e,s){try{for(var n=0;n.5){var l="null";return this.media&&(l=this.media.currentTime.toString()),c.b.log("sb remove "+t+" ["+o+","+a+"], of ["+r+","+h+"], pos:"+l),i.remove(o,a),!0}}}catch(t){c.b.warn("removeBufferRange failed",t)}return!1},s}(u);function Bt(t,i){for(var e=0;ethis.autoLevelCapping&&i.streamController.nextLevelSwitch(),this.autoLevelCapping=i.autoLevelCapping}}},o.getMaxLevel=function(t){var i=this;if(!this.levels)return-1;var e=this.levels.filter((function(e,n){return s.isLevelAllowed(n,i.restrictedLevels)&&n<=t}));return s.getMaxLevelByMediaSize(e,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},s.isLevelAllowed=function(t,i){return void 0===i&&(i=[]),-1===i.indexOf(t)},s.getMaxLevelByMediaSize=function(t,i,e){if(!t||t&&!t.length)return-1;for(var s,n,r=t.length-1,h=0;h=i||o.height>=e)&&(s=o,!(n=t[h+1])||s.width!==n.width||s.height!==n.height)){r=h;break}}return r},n=s,h=[{key:"contentScaleFactor",get:function(){return 1}}],(r=[{key:"mediaWidth",get:function(){var t,i=this.media;return i&&(t=i.width||i.clientWidth||i.offsetWidth,t*=s.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t,i=this.media;return i&&(t=i.height||i.clientHeight||i.offsetHeight,t*=s.contentScaleFactor),t}}])&&Bt(n.prototype,r),h&&Bt(n,h),s}(u),Ft=window.performance,$t=function(t){var i,e;function s(i){return t.call(this,i,a.a.MEDIA_ATTACHING)||this}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},n.onMediaAttaching=function(t){var i=this.hls.config;i.capLevelOnFPSDrop&&("function"==typeof(this.video=t.media instanceof this.hls.config.cnxRenderWindow.HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod))},n.checkFPS=function(t,i,e){var s=Ft.now();if(i){if(this.lastTime){var n=s-this.lastTime,r=e-this.lastDroppedFrames,h=i-this.lastDecodedFrames,o=1e3*r/n,l=this.hls;if(l.trigger(a.a.FPS_DROP,{currentDropped:r,currentDecoded:h,totalDroppedFrames:e}),o>0&&r>l.config.fpsDroppedMonitoringThreshold*h){var u=l.currentLevel;c.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=u)&&(u-=1,l.trigger(a.a.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:l.currentLevel}),l.autoLevelCapping=u,l.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=e,this.lastDecodedFrames=i}},n.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var i=t.getVideoPlaybackQuality();this.checkFPS(t,i.totalVideoFrames,i.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},s}(u),Vt=window,Ut=Vt.performance,Nt=Vt.XMLHttpRequest,Ht=function(){function t(t){t&&t.xhrSetup&&(this.xhrSetup=t.xhrSetup)}var i=t.prototype;return i.destroy=function(){this.abort(),this.loader=null},i.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},i.load=function(t,i,e){this.context=t,this.config=i,this.callbacks=e,this.stats={trequest:Ut.now(),retry:0},this.retryDelay=i.retryDelay,this.loadInternal()},i.loadInternal=function(){var t,i=this.context;t=this.loader=new Nt;var e=this.stats;e.tfirst=0,e.loaded=0;var s=this.xhrSetup;try{if(s)try{s(t,i.url)}catch(e){t.open("GET",i.url,!0),s(t,i.url)}t.readyState||t.open("GET",i.url,!0)}catch(e){return void this.callbacks.onError({code:t.status,text:e.message},i,t)}i.rangeEnd&&t.setRequestHeader("Range","bytes="+i.rangeStart+"-"+(i.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=i.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},i.readystatechange=function(t){var i=t.currentTarget,e=i.readyState,s=this.stats,n=this.context,r=this.config;if(!s.aborted&&e>=2)if(window.clearTimeout(this.requestTimeout),0===s.tfirst&&(s.tfirst=Math.max(Ut.now(),s.trequest)),4===e){var h=i.status;if(h>=200&&h<300){var o,a;s.tload=Math.max(s.tfirst,Ut.now()),a="arraybuffer"===n.responseType?(o=i.response).byteLength:(o=i.responseText).length,s.loaded=s.total=a;var l={url:i.responseURL,data:o};this.callbacks.onSuccess(l,s,n,i)}else s.retry>=r.maxRetry||h>=400&&h<499?(c.b.error(h+" while loading "+n.url),this.callbacks.onError({code:h,text:i.statusText},n,i)):(c.b.warn(h+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,r.maxRetryDelay),s.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),r.timeout)},i.loadtimeout=function(){c.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},i.loadprogress=function(t){var i=t.currentTarget,e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total);var s=this.callbacks.onProgress;s&&s(e,this.context,null,i)},t}();e(7),function(t){t.WIDEVINE="com.widevine.alpha",t.PLAYREADY="com.microsoft.playready"}(Dt||(Dt={}));var zt=function(){var t=window.cnxRenderWindow;return void 0!==t&&t.navigator&&t.navigator.requestMediaKeySystemAccess?t.navigator.requestMediaKeySystemAccess.bind(t.navigator):null}();function qt(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var Wt=function(t){for(var i=1;ii)return s;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,i=this.autoLevelCapping;return-1===i&&t&&t.length?t.length-1:i}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var i=this.audioTrackController;i&&(i.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var i=this.subtitleTrackController;i&&(i.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var i=this.subtitleTrackController;i&&(i.subtitleDisplay=t)}}]),s}(Q);Yt.defaultConfig=void 0}]).default)},289:function(t,i,e){var s,n,r;n=[e(4492)],void 0===(r="function"==typeof(s=function(t){"use strict";return(t.roots.common||(t.roots.common=new t.Root)).addJSON({ProtoAdBreak:{fields:{types:{rule:"repeated",type:"ProtoAdBreakTypeEnum",id:1,options:{packed:!1}},maxAdPodDuration:{type:"int32",id:2},maxAdSlotDuration:{type:"int32",id:3,options:{default:180}},numberOfAdSlots:{type:"int32",id:4,options:{default:1}}}},ProtoAdDomainBlockingResponse:{fields:{domains:{rule:"repeated",type:"string",id:1}}},ProtoCoreTamBidRequest:{fields:{lineItemId:{type:"string",id:1},code:{type:"string",id:2},metadata:{type:"MetadataModel",id:3},exploration:{type:"bool",id:4}}},MetadataModel:{fields:{version:{type:"int32",id:1},sessionId:{type:"string",id:2},playerId:{type:"string",id:3},userId:{type:"string",id:4},browser:{type:"Browser",id:5},geo:{type:"GeoLocation",id:6},clientAb0:{type:"int32",id:7},clientAb1:{type:"int32",id:8},serverAb0:{type:"int32",id:9},serverAb1:{type:"int32",id:10},pageUrl:{type:"string",id:15},bundleId:{type:"string",id:17},implementationType:{type:"ProtoImplementationType",id:18},trackAllRequests:{type:"bool",id:19},customParam1:{type:"string",id:20},customParam2:{type:"string",id:21},customParam3:{type:"string",id:22},abTestId:{type:"string",id:24},pageInFocus:{type:"bool",id:25},customParam4:{type:"string",id:26},customParam5:{type:"string",id:27},bundleAbId:{type:"string",id:28},bundlePart:{type:"string",id:29}}},Browser:{fields:{browserVersion:{type:"string",id:1},browserType:{type:"string",id:2},osCode:{type:"string",id:3},device:{type:"ProtoDeviceType",id:4}}},GeoLocation:{fields:{countryGeoId:{type:"int32",id:1},cityId:{type:"int32",id:2},subdivisionId:{type:"int32",id:3},dmaId:{type:"int32",id:4},ip:{type:"string",id:5},lat:{type:"double",id:6},lon:{type:"double",id:7},zipcode:{type:"string",id:8}}},ProtoCoreTamBidResponse:{fields:{errorMessage:{type:"string",id:1},encryptedBidPrice:{type:"string",id:10},ofskp:{type:"double",id:12},impressionTimeSpent:{type:"int32",id:13},bidRate:{type:"double",id:14},successRate:{type:"double",id:15}}},ProtoCookieSettings:{fields:{name:{type:"string",id:1},value:{type:"string",id:2},timestamp:{type:"int64",id:3}}},ProtoCookieSyncRequest:{fields:{cookieList:{rule:"repeated",type:"ProtoCookieSettings",id:1},secureMode:{type:"ProtoCookieSecureModeEnum",id:2},browserInfo:{type:"Browser",id:3}}},ProtoUserInformation:{fields:{userId:{type:"string",id:1},lookupId:{type:"string",id:3},lookupResponseCode:{type:"int32",id:4},callFraudSensor:{type:"bool",id:5},publisherAdsTxt:{type:"string",id:6}}},CreativeTrackerViewModel:{fields:{type:{type:"ProtoTrackerType",id:1},trigger:{type:"ProtoTrackerTriggerType",id:2},url:{type:"string",id:3}}},Insights:{fields:{key:{type:"string",id:1}}},ProtoSentimentAnalysis:{fields:{positive:{type:"double",id:1},neutral:{type:"double",id:2},negative:{type:"double",id:3}}},ProtoInsightsResponse:{fields:{insights:{rule:"repeated",type:"Insights",id:1},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:2}}},ProtoLineItemAdBreakTargeting:{fields:{adRollType:{type:"ProtoAdBreakTypeEnum",id:1},adBreakTypeEnum:{type:"ProtoLineItemAdBreakTypeEnum",id:2}}},ProtoLineItemAdPodTargeting:{fields:{targetingType:{type:"ProtoLineItemTargetingTypeEnum",id:1},adSlotTargetingType:{type:"ProtoLineItemAdSlotTargetingTypeEnum",id:2},adSlotPositions:{rule:"repeated",type:"int32",id:3,options:{packed:!1}}}},ProtoLineItemAdBreakSettings:{fields:{adBreakTargeting:{rule:"repeated",type:"ProtoLineItemAdBreakTargeting",id:1},adPodTargeting:{type:"ProtoLineItemAdPodTargeting",id:2}}},ProtoLineItem:{oneofs:{Dc:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:49,options:{proto3_optional:!0}},publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},adTag:{type:"string",id:3},creativeType:{type:"ProtoCreativeTypeEnum",id:4},sound:{type:"bool",id:6},viewability:{type:"bool",id:7},impressionTimeSpent:{type:"int32",id:9},vendorId:{type:"string",id:10},trackers:{rule:"repeated",type:"CreativeTrackerViewModel",id:12},duration:{type:"int32",id:13},renditions:{rule:"repeated",type:"ProtoRendition",id:14},mediaCreativeId:{type:"string",id:15},ignoreFilledRequests:{type:"bool",id:16},requestCap:{type:"int32",id:17,options:{default:3}},impressionCap:{type:"int32",id:18},successRate:{type:"double",id:19},lineItemPriority:{type:"ProtoLineItemPriority",id:20},headerBidderBids:{type:"string",id:21},headerBidderTimeout:{type:"int32",id:22},mediaCreativeClickUrl:{type:"string",id:23},resetRequestsCapTime:{type:"int32",id:24,options:{default:60}},resetImpressionsCapTime:{type:"int32",id:25,options:{default:60}},resetCapType:{type:"ProtoResetCapTypeEnum",id:26},creativeHlsFileName:{type:"string",id:27},timeBetweenRequests:{type:"int32",id:28},skipMode:{type:"ProtoAdSkipMode",id:29},mediaIdTargeting:{type:"ProtoTargetingChoiceModel",id:30},mediaKeywordsTargeting:{type:"ProtoTargetingChoiceModel",id:31},mediaLanguageTargeting:{type:"ProtoTargetingChoiceModel",id:32},adType:{type:"ProtoAdType",id:33},overlayTime:{type:"int32",id:34,options:{default:30}},floorPrice:{type:"double",id:35},adBreakSettings:{type:"ProtoLineItemAdBreakSettings",id:36},floorPrices:{rule:"repeated",type:"double",id:38,options:{packed:!1}},bidRate:{type:"double",id:39},pauseAdOutOfView:{type:"ProtoLineItemPauseAdOutOfViewEnum",id:40},moatTrackingEnabled:{type:"bool",id:41},cnxCreativeId:{type:"string",id:42},blockedDomainsRevisionNumber:{type:"int32",id:44},advertiserContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:45},publisherContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:46},playerSizeTargetings:{type:"ProtoPlayerSizeTargetings",id:47},amazonDealId:{type:"string",id:48},playerOrientationTargeting:{type:"ProtoPlayerOrientationTargetingEnum",id:50},skipMin:{type:"int32",id:51,options:{default:6}},skippability:{type:"ProtoLineItemSkippabilityType",id:52},forceCallingInEveryAO:{type:"bool",id:53},networkExpiryTimeSeconds:{type:"int32",id:54,options:{default:21600}},nonlinearLineItemSettings:{type:"ProtoNonlinearLineItemSettings",id:55},floorPriceData:{rule:"repeated",type:"FloorPriceModel",id:56},playerSize:{type:"string",id:101}}},ProtoTargetingChoiceModel:{fields:{choiceCriteria:{type:"ProtoChoiceCriteriaEnum",id:1},items:{rule:"repeated",type:"string",id:2}}},ProtoContextualTargetingCaseModel:{fields:{filters:{rule:"repeated",type:"ProtoContextualTargetingFilterModel",id:1}}},ProtoContextualTargetingFilterModel:{fields:{type:{type:"ProtoLineItemContextualTargetingEnum",id:1},items:{rule:"repeated",type:"string",id:2},level:{type:"ProtoContextualTargetingLevelEnum",id:3},hashedItemsIds:{rule:"repeated",type:"string",id:4}}},ProtoPlayerSizeTargetings:{fields:{sizeChoiceCriteria:{type:"ProtoSizeChoiceCriteriaEnum",id:1},minWidth:{type:"int32",id:2},maxWidth:{type:"int32",id:3}}},FloorPriceModel:{fields:{price:{type:"double",id:1},factor:{type:"double",id:2}}},ProtoRendition:{fields:{height:{type:"int32",id:1},codec:{type:"string",id:2},file:{type:"string",id:3}}},ProtoNonlinearLineItemSettings:{fields:{nonLinearRequestType:{type:"ProtoNonlinearRequestType",id:1},nonLinearAdTimeSeconds:{type:"int32",id:2,options:{default:15}}}},ProtoLiveMediaMetadataResponse:{fields:{startDate:{type:"string",id:1},outputUrl:{type:"string",id:2},thumbnailUrl:{type:"string",id:3},altText:{type:"string",id:4},name:{type:"string",id:5}}},ProtoSpriteSheet:{fields:{file:{type:"string",id:1},height:{type:"int32",id:2},count:{type:"int32",id:3}}},ProtoTrack:{fields:{file:{type:"string",id:1},type:{type:"ProtoTrackType",id:2},code:{type:"string",id:3},title:{type:"string",id:4}}},ProtoCustomField:{fields:{name:{type:"string",id:1},value:{type:"string",id:2}}},ProtoMediaMetadataResponse:{fields:{title:{type:"string",id:1},description:{type:"string",id:2},duration:{type:"int32",id:3},clickUrl:{type:"string",id:4},keywordList:{rule:"repeated",type:"string",id:5},trackList:{rule:"repeated",type:"ProtoTrack",id:6},spriteSheet:{type:"ProtoSpriteSheet",id:7},thumbnail:{type:"string",id:8},renditionList:{rule:"repeated",type:"ProtoRendition",id:9},customFields:{rule:"repeated",type:"ProtoCustomField",id:10},hlsFilePath:{type:"string",id:11},languageId:{type:"string",id:12},sourceItemId:{type:"string",id:13},altText:{type:"string",id:14},videoIndexes:{rule:"repeated",type:"string",id:15}}},ProtoNonlinearPlayerSettings:{fields:{numberOfNonlinearAds:{type:"int32",id:1},timeSecondsBetweenNonlinear:{type:"int32",id:2,options:{default:5}},timeSecondsBetweenLinearAndNonlinear:{type:"int32",id:3}}},ProtoRtbRequest:{fields:{metadata:{type:"MetadataModel",id:1},coppa:{type:"bool",id:4},refererUrl:{type:"string",id:5},testMode:{type:"bool",id:6},videoWidth:{type:"int32",id:7},videoHeight:{type:"int32",id:8},gdprCompliant:{type:"bool",id:9},soundOn:{type:"bool",id:10},gdprConsentData:{type:"string",id:11},explorationMode:{type:"bool",id:12},viewability:{type:"bool",id:13},outstream:{type:"bool",id:14},domainURL:{type:"string",id:16},isClickToPlay:{type:"bool",id:18},appVersion:{type:"string",id:21},deviceID:{type:"string",id:24},lineItems:{keyType:"string",type:"ProtoRtbRequestLineItemEntry",id:25},isCcpaBlockingUserInfo:{type:"bool",id:26},usPrivacyString:{type:"string",id:27},gdprConsentMode:{type:"ProtoGdprConsentModeEnum",id:36},maxAdDuration:{type:"int32",id:37,options:{default:180}},customMacros:{keyType:"string",type:"string",id:38},maxBidPrice:{type:"double",id:39},playerWidth:{type:"int32",id:43},playerHeight:{type:"int32",id:44},useNewSkippability:{type:"bool",id:42},liveRampAtsEnvelope:{type:"string",id:45}}},ProtoRtbRequestLineItemEntry:{oneofs:{jc:{oneof:["cachedFloorPrice"]},Dc:{oneof:["predictedFloorPrice"]}},fields:{cachedFloorPrice:{type:"double",id:2,options:{proto3_optional:!0}},predictedFloorPrice:{type:"double",id:9,options:{proto3_optional:!0}},availableRequests:{type:"int32",id:1},gdprConsent:{type:"bool",id:4},publisherLineItemId:{type:"string",id:5},slotWidth:{type:"int32",id:6},slotHeight:{type:"int32",id:7},requestNumber:{type:"int32",id:8},skip:{type:"ProtoSkipEnabledEnum",id:12},skipmin:{type:"int32",id:13},skipafter:{type:"int32",id:14},minDuration:{type:"int32",id:15}}},ProtoRtbResponse:{fields:{lineItemResponses:{rule:"repeated",type:"ProtoRtbLineItem",id:3},liveRampEnvelopeStatus:{type:"LiveRampEnvelopeStatusEnum",id:4}}},ProtoRtbBid:{oneofs:{Fc:{oneof:["floorPriceFactor"]},$c:{oneof:["floorPriceBypassReason"]}},fields:{floorPriceFactor:{type:"double",id:28,options:{proto3_optional:!0}},floorPriceBypassReason:{type:"FloorPriceBypassReasonEnum",id:29,options:{proto3_optional:!0}},winNoticeUrl:{type:"string",id:2},adQualityCheckUrl:{type:"string",id:3},vastTag:{type:"string",id:4},encryptedPrice:{type:"string",id:6},creativeId:{type:"string",id:7},seatId:{type:"string",id:8},adomain:{type:"string",id:9},syncedUser:{type:"bool",id:10},requestedFloorPrice:{type:"double",id:11},floorPriceFactorIndex:{type:"int32",id:12},campaignId:{type:"string",id:13},width:{type:"int32",id:14},height:{type:"int32",id:15},billingNoticeUrlList:{rule:"repeated",type:"string",id:16},mime:{type:"string",id:17,options:{default:"text/html"}},gtkpbp:{type:"double",id:18},successRate:{type:"double",id:19},impressionTimeSpent:{type:"int32",id:20},bidRate:{type:"double",id:21},dspId:{type:"string",id:22},cnxBidId:{type:"string",id:23},logAuctionInformation:{type:"bool",id:24},auctionBidId:{type:"string",id:25},rtbRequestId:{type:"string",id:26},liveRampAts:{type:"bool",id:27}}},ProtoRtbNoBid:{fields:{connatixReason:{type:"ConnatixNoBidReasonEnum",id:1},partnerReason:{type:"PartnerNoBidReasonEnum",id:2},syncedUser:{type:"bool",id:3},requestedFloorPrice:{type:"double",id:4},floorPriceFactorIndex:{type:"int32",id:5},partnerCustomHeaders:{type:"string",id:6}}},ProtoRtbLineItem:{oneofs:{Dc:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:5,options:{proto3_optional:!0}},id:{type:"string",id:1},cachedFloorPrice:{type:"double",id:2},bids:{rule:"repeated",type:"ProtoRtbBid",id:3},noBids:{rule:"repeated",type:"ProtoRtbNoBid",id:4}}},ProtoSupplyChain:{fields:{businessDomain:{type:"string",id:1},supplyChainId:{type:"string",id:3}}},ProtoAdClickTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},publisherLineItemId:{type:"string",id:3},advertiserLineItemId:{type:"string",id:4},type:{type:"ProtoAdClickTypeEnum",id:5},insightIndexes:{rule:"repeated",type:"string",id:10},adBreakType:{type:"ProtoAdBreakTypeEnum",id:11},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:12},pageInsightIndexes:{rule:"repeated",type:"string",id:13}}},ProtoAdOpportunityRequest:{fields:{sessionId:{type:"string",id:1},trackingRequestMeta:{type:"MetadataModel",id:2},adBreak:{type:"ProtoAdBreakTypeEnum",id:3},playerWidth:{type:"int32",id:4},pageInsightIndexes:{rule:"repeated",type:"string",id:5}}},ProtoAuctionInfoRequest:{fields:{cnxBidId:{type:"string",id:1},auctionInformation:{type:"ProtoAuctionInformation",id:2},auctionLossReason:{type:"ProtoAuctionLossReasonEnum",id:3}}},ProtoAuctionInformation:{fields:{highestObfuscatedBidPrice:{type:"double",id:1},secondHighestObfuscatedBidPrice:{type:"double",id:2},bidDensity:{type:"int32",id:3}}},ProtoPrebid:{fields:{publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},syncedUser:{type:"bool",id:3},timeSpent:{type:"int32",id:4},reason:{type:"ConnatixNoBidReasonEnum",id:5},requestNumber:{type:"int32",id:6},partnerReason:{type:"PartnerNoBidReasonEnum",id:7},requestedFloorPrice:{type:"double",id:8},partnerCustomHeaders:{type:"string",id:9},prebidJsBidderName:{type:"string",id:12},predictedFloorPrice:{type:"double",id:13},playerWidth:{type:"int32",id:14},playerHeight:{type:"int32",id:15}}},ProtoBid:{fields:{publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},syncedUser:{type:"bool",id:3},timeSpent:{type:"int32",id:4},requestNumber:{type:"int32",id:5},creativeId:{type:"string",id:6},rtbSeatId:{type:"string",id:7},rtbAdomain:{type:"string",id:8},encryptedPrice:{type:"string",id:9},requestedFloorPrice:{type:"double",id:10},prebidJsBidderName:{type:"string",id:13},customClientPrice:{type:"double",id:14},dspId:{type:"string",id:15},cnxBidId:{type:"string",id:16},predictedFloorPrice:{type:"double",id:17},playerWidth:{type:"int32",id:18},playerHeight:{type:"int32",id:19},floorPriceFactor:{type:"double",id:20},floorPriceFactorBypassReason:{type:"int32",id:21}}},ProtoPostBid:{fields:{publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},syncedUser:{type:"bool",id:3},timeSpent:{type:"int32",id:4},error:{type:"string",id:5},loaded:{type:"bool",id:6},creativeId:{type:"string",id:7},rtbSeatId:{type:"string",id:8},rtbAdomain:{type:"string",id:9},adsourceType:{type:"ProtoAdsourceTypeEnum",id:10},vastMediaType:{type:"string",id:11},adPodSlotPosition:{type:"int32",id:12},prebidJsBidderName:{type:"string",id:13},dspId:{type:"string",id:14},cnxBidId:{type:"string",id:15},winToAdLoadedTime:{type:"int32",id:16},auctionInformation:{type:"ProtoAuctionInformation",id:18},auctionPostbidReason:{type:"ProtoAuctionPostbidReasonEnum",id:19},requestNumber:{type:"int32",id:20},predictedFloorPrice:{type:"double",id:21},floorPrice:{type:"double",id:22},playerWidth:{type:"int32",id:23},playerHeight:{type:"int32",id:24},bidElapsedTimeSeconds:{type:"int32",id:25},adBreakType:{type:"ProtoAdBreakTypeEnum",id:26},liveRampAts:{type:"bool",id:27},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoBidTrackingsRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},prebids:{rule:"repeated",type:"ProtoPrebid",id:4},bids:{rule:"repeated",type:"ProtoBid",id:5},postBids:{rule:"repeated",type:"ProtoPostBid",id:6},logEveryting:{type:"bool",id:7},hasGdprConsentPayload:{type:"bool",id:10},gdprConsentMode:{type:"ProtoGdprConsentModeEnum",id:11},useExploration:{type:"bool",id:12}}},ProtoHeavyAdTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},advertiserLineItemId:{type:"string",id:2},heavyAdBlockTypeEnum:{type:"ProtoHeavyAdBlockTypeEnum",id:3}}},ProtoMediaClickTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},type:{type:"ProtoMediaClickTypeEnum",id:3},clickUrl:{type:"string",id:4},slideTitle:{type:"string",id:5},slideNumber:{type:"int32",id:6},slideMediaType:{type:"ProtoMediaTypeEnum",id:7},insightIndexes:{rule:"repeated",type:"string",id:12},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:13}}},ProtoMediaTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},quartile:{type:"ProtoQuartilesEnum",id:4},insightIndexes:{rule:"repeated",type:"string",id:9},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:10}}},ProtoPlayerStartRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},pageInsightIndexes:{rule:"repeated",type:"string",id:2},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoSessionAdBlockerRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},adBlockDetectionType:{type:"ProtoAdBlockDetectionTypeEnum",id:2},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoSessionTimeTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},timePlayed:{type:"int32",id:2},timePlayedInView:{type:"int32",id:3},sessionTime:{type:"int32",id:4},pageInsightIndexes:{rule:"repeated",type:"string",id:5}}},ProtoSessionViewRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},pageInsightIndexes:{rule:"repeated",type:"string",id:2},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},hasAdBlocker:{type:"bool",id:4},bundleName:{type:"string",id:5},playerWidth:{type:"int32",id:6},playerHeight:{type:"int32",id:7},pageInsightIndexes:{rule:"repeated",type:"string",id:8},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoTrackingResponse:{oneofs:{Vc:{oneof:["viewability"]}},fields:{viewability:{type:"bool",id:5,options:{proto3_optional:!0}},errorMessage:{type:"string",id:1},platformCappedLineItemIdList:{rule:"repeated",type:"string",id:2},impressionRevenue:{type:"double",id:3},adServerLineItemName:{type:"string",id:4}}},ProtoVideoAdImpressionRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:3},publisherLineItemId:{type:"string",id:5},advertiserLineItemId:{type:"string",id:6},syncedUser:{type:"bool",id:7},timeSpent:{type:"int32",id:8},encryptedPrice:{type:"string",id:9},creativeId:{type:"string",id:10},rtbSeatId:{type:"string",id:11},rtbAdomain:{type:"string",id:12},customClientPrice:{type:"double",id:13},adsourceType:{type:"ProtoAdsourceTypeEnum",id:14},vastMediaType:{type:"string",id:15},adPodSlotPosition:{type:"int32",id:18},prebidJsBidderName:{type:"string",id:19},dspId:{type:"string",id:20},cnxBidId:{type:"string",id:21},winToAdLoadedTime:{type:"int32",id:22},startAdToImpressionTime:{type:"int32",id:23},declaredDuration:{type:"double",id:24},impressionDuration:{type:"double",id:25},useExploration:{type:"bool",id:26},auctionInformation:{type:"ProtoAuctionInformation",id:27},playerWidth:{type:"int32",id:28},requestNumber:{type:"int32",id:29},predictedFloorPrice:{type:"double",id:30},floorPrice:{type:"double",id:31},floorPriceFactor:{type:"double",id:44},floorPriceBypassReason:{type:"FloorPriceBypassReasonEnum",id:45},playerHeight:{type:"int32",id:36},bidElapsedTimeSeconds:{type:"int32",id:37},insightIndexes:{rule:"repeated",type:"string",id:38},adBreakType:{type:"ProtoAdBreakTypeEnum",id:40},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:41},hasAdSkip:{type:"bool",id:39},pageInsightIndexes:{rule:"repeated",type:"string",id:42},liveRampAts:{type:"bool",id:43},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoVideoAdImpressionViewableRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:3},publisherLineItemId:{type:"string",id:5},advertiserLineItemId:{type:"string",id:6},rtbSeatId:{type:"string",id:7},dspId:{type:"string",id:8},insightIndexes:{rule:"repeated",type:"string",id:13},hasAdSkip:{type:"bool",id:14},adBreakType:{type:"ProtoAdBreakTypeEnum",id:15},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:16},pageInsightIndexes:{rule:"repeated",type:"string",id:17}}},ProtoVideoAdQuartilesRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:3},publisherLineItemId:{type:"string",id:5},advertiserLineItemId:{type:"string",id:6},quartile:{type:"ProtoQuartilesEnum",id:7},rtbSeatId:{type:"string",id:8},dspId:{type:"string",id:9},insightIndexes:{rule:"repeated",type:"string",id:14},hasAdSkip:{type:"bool",id:15},adBreakType:{type:"ProtoAdBreakTypeEnum",id:16},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:17},pageInsightIndexes:{rule:"repeated",type:"string",id:18}}},ProtoUserSyncRequest:{fields:{userId:{type:"string",id:1},demandPartner:{type:"int32",id:2},demandPartnerUserId:{type:"string",id:3}}},ProtoPlayerPlaybackModeEnum:{values:{Autoplay:0,ScrollToPlay:1,ClickToPlay:2}},ProtoPlayerCloseButtonMode:{values:{Off:0,OnHover:1,OnHoverAfterFirstAd:2,AlwaysOn:3}},ProtoPlayerFloatingMode:{values:{Off:0,OnPageLoad:1,AfterInView:2,Always:3}},ProtoPlayerSoundMode:{values:{Mute:0,On:1,Hover:2}},ProtoPlayerInsertMode:{values:{WithinContainer:0,BeforeContainer:1,AfterContainer:2,ReplaceContainer:3,HideContainer:4}},ProtoAdViewabilityPolicy:{values:{Default:0,Strict:1}},ProtoSharingDestination:{values:{Facebook:0,Twitter:1,LinkedIn:2}},ProtoFloatingFixedPositionMode:{values:{Page:0,Element:1}},ProtoPositionMode:{values:{BottomRight:0,BottomLeft:1,TopRight:2,TopLeft:3}},ProtoAdPlaybackMode:{values:{Autoplay:0,ScrollToPlay:1}},ProtoFloatingAppendLocationEnum:{values:{Above:0,Below:1,Within:2}},ProtoPlayerAdSkippability:{values:{IfLongerThan:0,Always:1,NoRestrictions:2}},ProtoVideoQuality:{values:{Auto:0,High1080p:1,High720p:2,Medium360p:3}},ProtoImplementationType:{values:{Web:0,Amp:1}},ProtoAdBreakTypeEnum:{values:{None:0,PreRoll:1,MidRoll:2,PostRoll:3}},ProtoAdSlotAdTypeEnum:{values:{SingleAd:0,AdPod:1}},ProtoPlayerSkippabilityType:{values:{AllowNonSkipAdsIfTheyAreShorterThan:0,RequireAdsToBeSkippable:1}},ProtoBandwidthLoggingEnum:{values:{Disabled:0,Enabled:1,SaaS:2}},ProtoDeviceType:{values:{Desktop:0,Smartphone:1,Tablet:2,GameConsole:3,SmartTV:4,WearableComputer:5,PDA:6,Unrecognized:7}},ProtoCookieSecureModeEnum:{values:{Secure:0,Unsecure:1,Auto:2}},ProtoTrackerType:{values:{Image:0,Javascript:1}},ProtoTrackerTriggerType:{values:{Impression:0,Complete25Pc:1,Complete50Pc:2,Complete75Pc:3,ViewCompletion:4,VideoClick:5,Pause:6,Resume:7,Mute:8,Unmute:9}},ProtoCreativeTypeEnum:{values:{ThirdParty:0,MediaFile:1,Rtb:2,External:3,HeaderBidder:4,Tam:7,TamDeal:8}},ProtoResetCapTypeEnum:{values:{TimeCapping:0,ContentCapping:1,OpportunityCapping:2}},ProtoAdSlotsEnum:{values:{PreRoll:0,MidRoll:1,PostRoll:2}},ProtoLineItemPriority:{values:{House:0,Default:1,Preferred:2,Top:3}},ProtoAdSkipMode:{values:{IfLongerThan31Sec:0,Always:1,Never:2,NotAplicable:3}},ProtoAdType:{values:{Video:0,Overlay:1,Nonlinear:2}},ProtoChoiceCriteriaEnum:{values:{Only:0,Except:1}},ProtoLineItemAdBreakTypeEnum:{values:{All:1,SingleAd:2,AdPod:3}},ProtoLineItemTargetingTypeEnum:{values:{Only:0,Except:1}},ProtoLineItemAdSlotTargetingTypeEnum:{values:{SpecificSlots:1,Interval:2}},ProtoLineItemPauseAdOutOfViewEnum:{values:{Default:0,Strict:1}},ProtoLineItemContextualTargetingEnum:{values:{IncludeAny:0,IncludeAll:1,ExcludeAny:2,ExcludeAll:3}},ProtoSizeChoiceCriteriaEnum:{values:{GreaterThan:0,SmallerThan:1,Between:2}},ProtoPlayerOrientationTargetingEnum:{values:{Both:0,Portrait:1,Landscape:2}},ProtoLineItemSkippabilityType:{values:{AllowPublisherToDetermineSkippability:0,RequirePublisherToAllowNonSkipAdsShorterThan:1,NotApplicable:2}},ProtoContextualTargetingLevelEnum:{values:{Media:0,Page:1,Both:2}},ProtoNonlinearRequestType:{values:{Banner:0,Video:1}},ProtoTrackType:{values:{ManualSubtitle:0,AutoGeneratedSubtitle:1,ClosedCaptions:2}},ProtoMediaTypeEnum:{values:{Image:0,Video:1}},ProtoSkipEnabledEnum:{values:{No:0,Yes:1}},LiveRampEnvelopeStatusEnum:{values:{Ok:0,EnvelopeExpired:1,Unauthorized:2}},FloorPriceBypassReasonEnum:{values:{MinCpm:0,FixedCpm:1,VideoOrBannerMin:2,PubMinFloor:3,AdvMinFloor:4,BidInHand:5}},ConnatixNoBidReasonEnum:{values:{RequestException:0,Timeout:1,EmptyResponse:2,InvalidResponse:3,NoBid:4,BidBelowFloor:5,DealIdMismatch:6,CsInvalidResponse:7,CsRequestException:8,CsEmptyResponse:9,NoLibInPage:11,BidIsNotTargetingAllowedEver:12}},PartnerNoBidReasonEnum:{values:{Unknown:0,TechnicalError:1,InvalidRequest:2,KnownWebSpider:3,SuspectedNonHumanTraffic:4,CloudIP:5,UnsupportedDevice:6,BlockedPublisher:7,UnmatchedUser:8,DailyReaderCapMet:9,DailyDomainCapMet:10}},ProtoAdBlockDetectionTypeEnum:{values:{Banner:0,Network:1}},ProtoAdClickTypeEnum:{values:{AdClick:1,AdClickThrough:2,AdSkipClick:3,VolumeClick:4,PauseClick:5,PlayClick:6,FullScreenClick:7,MuteClick:8,UnmuteClick:9,ExitFullScreenClick:10,AdUserClose:11}},ProtoAdsourceTypeEnum:{values:{Unknown:0,Vpaid:1,VastMedia:2,CnxMedia:3,Jw:4,Ima:5,AOL:6}},ProtoAuctionLossReasonEnum:{values:{TargetingMismatch:0,CompetitorPriority:1,AdOpportunityEnd:2}},ProtoGdprConsentModeEnum:{values:{Unknown:0,NoCmp:1,NoConsent:2,NoConnatixConsent:3,NotAllDemandConsent:4,AllGood:5}},ProtoAuctionPostbidReasonEnum:{values:{CreativeError:0,SDKFailure:1,UnsupportedMedia:2,TargetingMismatch:3,PlayerError:4}},ProtoHeavyAdBlockTypeEnum:{values:{Global:0,Script:1,VpaidIframe:2,OverlayIframe:3}},ProtoMediaClickTypeEnum:{values:{Click:0,UrlClick:1,VolumeClick:2,PlayClick:3,PauseClick:4,NextClick:5,PreviousClick:6,MuteClick:7,UnmuteClick:8,CloseClick:9,ScrollClick:10,GalleryClick:11,SubtitleClick:12,FullScreenClick:13,ExitFullScreenClick:14}},ProtoQuartilesEnum:{values:{Start:0,First:1,Second:2,Third:3,Fourth:4}}})})?s.apply(i,n):s)||(t.exports=r)},7953:function(t,i,e){var s,n,r;n=[e(4492)],void 0===(r="function"==typeof(s=function(t){"use strict";return(t.roots.elements||(t.roots.elements=new t.Root)).addJSON({ProtoElementsRequest:{fields:{tokens:{rule:"repeated",type:"string",id:1},pageUrl:{type:"string",id:3},userId:{type:"string",id:5},forcePlayerId:{type:"string",id:7},forcePlaylistId:{type:"string",id:9},version:{type:"int32",id:10},forceLineItemIds:{rule:"repeated",type:"string",id:11},clientAb0:{type:"int32",id:12},clientAb1:{type:"int32",id:13},customParam1:{type:"string",id:16},customParam2:{type:"string",id:17},customParam3:{type:"string",id:18},forceExploration:{type:"bool",id:20},es6:{type:"bool",id:21},bundleId:{type:"string",id:22},forceSourceItemId:{type:"string",id:23},parseDomain:{type:"bool",id:24},implementationType:{type:"ProtoImplementationType",id:25},queryJsTargeting:{keyType:"string",type:"string",id:26},isConsentConnatix:{type:"bool",id:27,options:{default:!0}},reloadedPlayers:{keyType:"string",type:"string",id:29},disableTracking:{type:"bool",id:31},referrer:{type:"string",id:32},localTimestamp:{type:"int64",id:33},customParam4:{type:"string",id:34},customParam5:{type:"string",id:35},forceMediaIdList:{rule:"repeated",type:"string",id:36}}},ProtoPlaylistItem:{oneofs:{Uc:{oneof:["insightsRevisionNumber"]}},fields:{insightsRevisionNumber:{type:"int32",id:4,options:{proto3_optional:!0}},mediaId:{type:"string",id:1},revisionNumber:{type:"int32",id:2},mediaContentVersionId:{type:"string",id:3}}},ProtoElements:{fields:{playerId:{type:"string",id:1},playbackMode:{type:"ProtoPlayerPlaybackModeEnum",id:2},soundMode:{type:"ProtoPlayerSoundMode",id:3},upNextMode:{type:"ProtoPlayerUpNextMode",id:4,options:{default:1}},containerSelector:{type:"string",id:5},position:{type:"int32",id:6},insertPosition:{type:"ProtoPlayerInsertMode",id:7},forceInsertPath:{type:"bool",id:8},renderInFrame:{type:"bool",id:9},scrollHijackingProtection:{type:"bool",id:10},preRollBreak:{type:"int32",id:11},postRollBreak:{type:"int32",id:12},midRollNumber:{type:"int32",id:13,options:{default:-1}},timeBetweenAds:{type:"int32",id:14},minTimeBeforeFirstAd:{type:"int32",id:15},adViewabilityPolicy:{type:"ProtoAdViewabilityPolicy",id:16},responsive:{type:"bool",id:18},ratioWidth:{type:"int32",id:19},ratioHeight:{type:"int32",id:20},fixedWidth:{type:"int32",id:21},fixedHeight:{type:"int32",id:22},casting:{type:"bool",id:23},sharingDestinations:{rule:"repeated",type:"ProtoSharingDestination",id:24,options:{packed:!1}},closedCaption:{type:"bool",id:25},muteWatermark:{type:"bool",id:26},expandButton:{type:"bool",id:27},closeButtonMode:{type:"ProtoPlayerCloseButtonMode",id:28},floatingMode:{type:"ProtoPlayerFloatingMode",id:29},floatingDeviceMode:{rule:"repeated",type:"ProtoDeviceType",id:30,options:{packed:!1}},floatingCloseButtonMode:{type:"ProtoPlayerCloseButtonMode",id:31},floatingFixedPosition:{type:"ProtoFloatingFixedPositionMode",id:32},floatingPageElement:{type:"string",id:33},floatingUseElementWidth:{type:"bool",id:34},floatingScrollPosition:{type:"ProtoPositionMode",id:35},floatingGutterX:{type:"int32",id:36},floatingGutterY:{type:"int32",id:37},floatingWidth:{type:"int32",id:38},iconsColor:{type:"string",id:39},accentColor:{type:"string",id:40},tooltipTextColor:{type:"string",id:41},tooltipBackgroundColor:{type:"string",id:42},html:{type:"string",id:43},galleryStyle:{type:"ProtoGalleryStyleMode",id:45},logoPosition:{type:"ProtoLogoPositionMode",id:46},lineItems:{rule:"repeated",type:"ProtoLineItem",id:49},adPlaybackMode:{type:"ProtoAdPlaybackMode",id:50},css:{type:"string",id:51},sessionId:{type:"string",id:52},playlistId:{type:"string",id:53},playerType:{type:"ProtoElementsTypeEnum",id:54},outstreamInitialRendering:{type:"ProtoOutstreamInitialRenderingEnum",id:55},outstreamHouseBackgroundColor:{type:"string",id:56},outstreamTotalAdBreakLength:{type:"int32",id:57},outstreamEndAdBreakPolicy:{type:"ProtoOutstreamEndAdBreakPolicyEnum",id:58},galleryOrientation:{type:"ProtoGalleryOrientationEnum",id:59},playlist:{rule:"repeated",type:"ProtoPlaylistItem",id:60},floatingAppendLocation:{type:"ProtoFloatingAppendLocationEnum",id:61},floatingYAxisPadding:{type:"int32",id:62},customJsCode:{type:"string",id:63},videoQuality:{type:"ProtoVideoQuality",id:64},initializationSettingsJson:{type:"string",id:65},skipAdAfter:{type:"int32",id:67,options:{default:5}},adBreaks:{rule:"repeated",type:"ProtoAdBreak",id:68},amazonTamSlotId:{type:"string",id:69},midRollOnlyOnLongContent:{type:"bool",id:70,options:{default:!0}},limitClientSideApiUse:{type:"bool",id:71},abTestId:{type:"string",id:72},skipMin:{type:"int32",id:73,options:{default:31}},skippability:{type:"ProtoPlayerSkippabilityType",id:74},logoResource:{type:"string",id:76},nonlinearPlayerSettings:{type:"ProtoNonlinearPlayerSettings",id:77},displayAdCountdown:{type:"bool",id:78},bandwidthLoggingState:{type:"ProtoBandwidthLoggingEnum",id:79}}},ProtoElementsResponse:{fields:{errorMessage:{type:"string",id:1},players:{rule:"repeated",type:"ProtoElements",id:10},browser:{type:"Browser",id:11},geoLocation:{type:"GeoLocation",id:12},lineItems:{rule:"repeated",type:"ProtoLineItem",id:13},cookieSyncUrls:{keyType:"int32",type:"string",id:14},explorationMode:{type:"bool",id:15},supplyChain:{type:"ProtoSupplyChain",id:17},secondLevelDomain:{type:"string",id:18},userInformation:{type:"ProtoUserInformation",id:20},serverAb0:{type:"int32",id:21},serverAb1:{type:"int32",id:22},isSeoTraffic:{type:"bool",id:23},apiHostUrl:{type:"string",id:24},publisherNetworkCode:{type:"string",id:26},iOSAppID:{type:"string",id:27},hashedPageUrl:{type:"string",id:28},bundleAbId:{type:"string",id:29},bundlePart:{type:"string",id:30}}},ProtoLineItemAdBreakTargeting:{fields:{adRollType:{type:"ProtoAdBreakTypeEnum",id:1},adBreakTypeEnum:{type:"ProtoLineItemAdBreakTypeEnum",id:2}}},ProtoLineItemAdPodTargeting:{fields:{targetingType:{type:"ProtoLineItemTargetingTypeEnum",id:1},adSlotTargetingType:{type:"ProtoLineItemAdSlotTargetingTypeEnum",id:2},adSlotPositions:{rule:"repeated",type:"int32",id:3,options:{packed:!1}}}},ProtoLineItemAdBreakSettings:{fields:{adBreakTargeting:{rule:"repeated",type:"ProtoLineItemAdBreakTargeting",id:1},adPodTargeting:{type:"ProtoLineItemAdPodTargeting",id:2}}},ProtoLineItem:{oneofs:{Dc:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:49,options:{proto3_optional:!0}},publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},adTag:{type:"string",id:3},creativeType:{type:"ProtoCreativeTypeEnum",id:4},sound:{type:"bool",id:6},viewability:{type:"bool",id:7},impressionTimeSpent:{type:"int32",id:9},vendorId:{type:"string",id:10},trackers:{rule:"repeated",type:"CreativeTrackerViewModel",id:12},duration:{type:"int32",id:13},renditions:{rule:"repeated",type:"ProtoRendition",id:14},mediaCreativeId:{type:"string",id:15},ignoreFilledRequests:{type:"bool",id:16},requestCap:{type:"int32",id:17,options:{default:3}},impressionCap:{type:"int32",id:18},successRate:{type:"double",id:19},lineItemPriority:{type:"ProtoLineItemPriority",id:20},headerBidderBids:{type:"string",id:21},headerBidderTimeout:{type:"int32",id:22},mediaCreativeClickUrl:{type:"string",id:23},resetRequestsCapTime:{type:"int32",id:24,options:{default:60}},resetImpressionsCapTime:{type:"int32",id:25,options:{default:60}},resetCapType:{type:"ProtoResetCapTypeEnum",id:26},creativeHlsFileName:{type:"string",id:27},timeBetweenRequests:{type:"int32",id:28},skipMode:{type:"ProtoAdSkipMode",id:29},mediaIdTargeting:{type:"ProtoTargetingChoiceModel",id:30},mediaKeywordsTargeting:{type:"ProtoTargetingChoiceModel",id:31},mediaLanguageTargeting:{type:"ProtoTargetingChoiceModel",id:32},adType:{type:"ProtoAdType",id:33},overlayTime:{type:"int32",id:34,options:{default:30}},floorPrice:{type:"double",id:35},adBreakSettings:{type:"ProtoLineItemAdBreakSettings",id:36},floorPrices:{rule:"repeated",type:"double",id:38,options:{packed:!1}},bidRate:{type:"double",id:39},pauseAdOutOfView:{type:"ProtoLineItemPauseAdOutOfViewEnum",id:40},moatTrackingEnabled:{type:"bool",id:41},cnxCreativeId:{type:"string",id:42},blockedDomainsRevisionNumber:{type:"int32",id:44},advertiserContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:45},publisherContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:46},playerSizeTargetings:{type:"ProtoPlayerSizeTargetings",id:47},amazonDealId:{type:"string",id:48},playerOrientationTargeting:{type:"ProtoPlayerOrientationTargetingEnum",id:50},skipMin:{type:"int32",id:51,options:{default:6}},skippability:{type:"ProtoLineItemSkippabilityType",id:52},forceCallingInEveryAO:{type:"bool",id:53},networkExpiryTimeSeconds:{type:"int32",id:54,options:{default:21600}},nonlinearLineItemSettings:{type:"ProtoNonlinearLineItemSettings",id:55},floorPriceData:{rule:"repeated",type:"FloorPriceModel",id:56},playerSize:{type:"string",id:101}}},ProtoTargetingChoiceModel:{fields:{choiceCriteria:{type:"ProtoChoiceCriteriaEnum",id:1},items:{rule:"repeated",type:"string",id:2}}},ProtoContextualTargetingCaseModel:{fields:{filters:{rule:"repeated",type:"ProtoContextualTargetingFilterModel",id:1}}},ProtoContextualTargetingFilterModel:{fields:{type:{type:"ProtoLineItemContextualTargetingEnum",id:1},items:{rule:"repeated",type:"string",id:2},level:{type:"ProtoContextualTargetingLevelEnum",id:3},hashedItemsIds:{rule:"repeated",type:"string",id:4}}},ProtoPlayerSizeTargetings:{fields:{sizeChoiceCriteria:{type:"ProtoSizeChoiceCriteriaEnum",id:1},minWidth:{type:"int32",id:2},maxWidth:{type:"int32",id:3}}},FloorPriceModel:{fields:{price:{type:"double",id:1},factor:{type:"double",id:2}}},CreativeTrackerViewModel:{fields:{type:{type:"ProtoTrackerType",id:1},trigger:{type:"ProtoTrackerTriggerType",id:2},url:{type:"string",id:3}}},ProtoRendition:{fields:{height:{type:"int32",id:1},codec:{type:"string",id:2},file:{type:"string",id:3}}},ProtoNonlinearLineItemSettings:{fields:{nonLinearRequestType:{type:"ProtoNonlinearRequestType",id:1},nonLinearAdTimeSeconds:{type:"int32",id:2,options:{default:15}}}},Browser:{fields:{browserVersion:{type:"string",id:1},browserType:{type:"string",id:2},osCode:{type:"string",id:3},device:{type:"ProtoDeviceType",id:4}}},GeoLocation:{fields:{countryGeoId:{type:"int32",id:1},cityId:{type:"int32",id:2},subdivisionId:{type:"int32",id:3},dmaId:{type:"int32",id:4},ip:{type:"string",id:5},lat:{type:"double",id:6},lon:{type:"double",id:7},zipcode:{type:"string",id:8}}},ProtoSupplyChain:{fields:{businessDomain:{type:"string",id:1},supplyChainId:{type:"string",id:3}}},ProtoUserInformation:{fields:{userId:{type:"string",id:1},lookupId:{type:"string",id:3},lookupResponseCode:{type:"int32",id:4},callFraudSensor:{type:"bool",id:5},publisherAdsTxt:{type:"string",id:6}}},ProtoAdBreak:{fields:{types:{rule:"repeated",type:"ProtoAdBreakTypeEnum",id:1,options:{packed:!1}},maxAdPodDuration:{type:"int32",id:2},maxAdSlotDuration:{type:"int32",id:3,options:{default:180}},numberOfAdSlots:{type:"int32",id:4,options:{default:1}}}},ProtoNonlinearPlayerSettings:{fields:{numberOfNonlinearAds:{type:"int32",id:1},timeSecondsBetweenNonlinear:{type:"int32",id:2,options:{default:5}},timeSecondsBetweenLinearAndNonlinear:{type:"int32",id:3}}},ProtoOutstreamInitialRenderingEnum:{values:{ExpandWithAd:0,FullyRendered:1}},ProtoOutstreamEndAdBreakPolicyEnum:{values:{Hide:0,HouseScreen:1,Loop:2}},ProtoGalleryStyleMode:{values:{None:0,Detailed:1,Visual:2}},ProtoLogoPositionMode:{values:{None:0,ControlBar:1,BottomRight:2,BottomLeft:3,TopRight:4,TopLeft:5,Center:6}},ProtoGalleryOrientationEnum:{values:{Landscape:0,Portrait:1}},ProtoElementsTypeEnum:{values:{InStream:0,OutStream:1,InStreamInApp:2,Live:3}},ProtoPlayerUpNextMode:{values:{Loop:0,Next:1,Stop:2}},ProtoCreativeTypeEnum:{values:{ThirdParty:0,MediaFile:1,Rtb:2,External:3,HeaderBidder:4,Tam:7,TamDeal:8}},ProtoResetCapTypeEnum:{values:{TimeCapping:0,ContentCapping:1,OpportunityCapping:2}},ProtoAdSlotsEnum:{values:{PreRoll:0,MidRoll:1,PostRoll:2}},ProtoLineItemPriority:{values:{House:0,Default:1,Preferred:2,Top:3}},ProtoAdSkipMode:{values:{IfLongerThan31Sec:0,Always:1,Never:2,NotAplicable:3}},ProtoAdType:{values:{Video:0,Overlay:1,Nonlinear:2}},ProtoChoiceCriteriaEnum:{values:{Only:0,Except:1}},ProtoLineItemAdBreakTypeEnum:{values:{All:1,SingleAd:2,AdPod:3}},ProtoLineItemTargetingTypeEnum:{values:{Only:0,Except:1}},ProtoLineItemAdSlotTargetingTypeEnum:{values:{SpecificSlots:1,Interval:2}},ProtoLineItemPauseAdOutOfViewEnum:{values:{Default:0,Strict:1}},ProtoLineItemContextualTargetingEnum:{values:{IncludeAny:0,IncludeAll:1,ExcludeAny:2,ExcludeAll:3}},ProtoSizeChoiceCriteriaEnum:{values:{GreaterThan:0,SmallerThan:1,Between:2}},ProtoPlayerOrientationTargetingEnum:{values:{Both:0,Portrait:1,Landscape:2}},ProtoLineItemSkippabilityType:{values:{AllowPublisherToDetermineSkippability:0,RequirePublisherToAllowNonSkipAdsShorterThan:1,NotApplicable:2}},ProtoContextualTargetingLevelEnum:{values:{Media:0,Page:1,Both:2}},ProtoTrackerType:{values:{Image:0,Javascript:1}},ProtoTrackerTriggerType:{values:{Impression:0,Complete25Pc:1,Complete50Pc:2,Complete75Pc:3,ViewCompletion:4,VideoClick:5,Pause:6,Resume:7,Mute:8,Unmute:9}},ProtoPlayerPlaybackModeEnum:{values:{Autoplay:0,ScrollToPlay:1,ClickToPlay:2}},ProtoPlayerCloseButtonMode:{values:{Off:0,OnHover:1,OnHoverAfterFirstAd:2,AlwaysOn:3}},ProtoPlayerFloatingMode:{values:{Off:0,OnPageLoad:1,AfterInView:2,Always:3}},ProtoPlayerSoundMode:{values:{Mute:0,On:1,Hover:2}},ProtoPlayerInsertMode:{values:{WithinContainer:0,BeforeContainer:1,AfterContainer:2,ReplaceContainer:3,HideContainer:4}},ProtoAdViewabilityPolicy:{values:{Default:0,Strict:1}},ProtoSharingDestination:{values:{Facebook:0,Twitter:1,LinkedIn:2}},ProtoFloatingFixedPositionMode:{values:{Page:0,Element:1}},ProtoPositionMode:{values:{BottomRight:0,BottomLeft:1,TopRight:2,TopLeft:3}},ProtoAdPlaybackMode:{values:{Autoplay:0,ScrollToPlay:1}},ProtoFloatingAppendLocationEnum:{values:{Above:0,Below:1,Within:2}},ProtoPlayerAdSkippability:{values:{IfLongerThan:0,Always:1,NoRestrictions:2}},ProtoVideoQuality:{values:{Auto:0,High1080p:1,High720p:2,Medium360p:3}},ProtoImplementationType:{values:{Web:0,Amp:1}},ProtoAdBreakTypeEnum:{values:{None:0,PreRoll:1,MidRoll:2,PostRoll:3}},ProtoAdSlotAdTypeEnum:{values:{SingleAd:0,AdPod:1}},ProtoPlayerSkippabilityType:{values:{AllowNonSkipAdsIfTheyAreShorterThan:0,RequireAdsToBeSkippable:1}},ProtoBandwidthLoggingEnum:{values:{Disabled:0,Enabled:1,SaaS:2}},ProtoNonlinearRequestType:{values:{Banner:0,Video:1}},ProtoDeviceType:{values:{Desktop:0,Smartphone:1,Tablet:2,GameConsole:3,SmartTV:4,WearableComputer:5,PDA:6,Unrecognized:7}}})})?s.apply(i,n):s)||(t.exports=r)},5648:function(t,i,e){var s,n,r;n=[e(4492)],void 0===(r="function"==typeof(s=function(t){"use strict";return(t.roots.playspace||(t.roots.playspace=new t.Root)).addJSON({ProtoPlayspaceVideoSlideRendition:{fields:{width:{type:"int32",id:1},height:{type:"int32",id:2},videoUrl:{type:"string",id:3},codec:{type:"ProtoPlayspaceCodecEnum",id:4}}},ProtoPlayspaceVideoSettings:{fields:{renditions:{rule:"repeated",type:"ProtoPlayspaceVideoSlideRendition",id:1}}},ProtoSlideCapabilityMetadata:{fields:{label:{type:"string",id:1}}},ProtoPlayspaceSlideCapability:{fields:{type:{type:"ProtoPlayspaceSlideCapabilitiesEnum",id:1},metadata:{type:"ProtoSlideCapabilityMetadata",id:2}}},ProtoFallbackStoryResponse:{fields:{storyId:{type:"string",id:1},activeVersionId:{type:"string",id:2}}},ProtoPlayspaceMediaMetadataResponse:{fields:{slides:{rule:"repeated",type:"ProtoPlayspaceSlideMetadata",id:1},storyTitle:{type:"string",id:2}}},ProtoPlayspaceSlideMetadata:{fields:{mediaType:{type:"ProtoMediaTypeEnum",id:1},title:{type:"string",id:2},clickUrl:{type:"string",id:3},imageUrl:{type:"string",id:4},slideDuration:{type:"int32",id:5},videoRendition:{type:"ProtoPlayspaceVideoSettings",id:6},type:{type:"ProtoPlayspaceSlideTypeEnum",id:7},coverMetadata:{type:"ProtoPlayspaceCoverMetadata",id:8},descriptionMetadata:{type:"ProtoPlayspaceDescriptionMetadata",id:9},bulletListMetadata:{type:"ProtoPlayspaceBulletListMetadata",id:10},quoteMetadata:{type:"ProtoPlayspaceQuoteMetadata",id:12},instagramMetadata:{type:"ProtoPlayspaceInstagramMetadata",id:16},capabilityList:{rule:"repeated",type:"ProtoPlayspaceSlideCapability",id:13},portraitImageUrl:{type:"string",id:14},mediaContext:{type:"ProtoMediaContextEnum",id:15},altText:{type:"string",id:17}}},ProtoPlayspaceCoverMetadata:{fields:{title:{type:"string",id:1},subtitle:{type:"string",id:2}}},ProtoPlayspaceDescriptionChunk:{fields:{text:{type:"string",id:1},colorScheme:{type:"ProtoPlayspaceColorSchemeEnum",id:2}}},ProtoPlayspaceDescriptionMetadata:{fields:{chunkList:{rule:"repeated",type:"ProtoPlayspaceDescriptionChunk",id:1},label:{type:"ProtoPlayspaceDescriptionChunk",id:2}}},ProtoBulletOptions:{fields:{title:{type:"string",id:1},description:{type:"string",id:2}}},ProtoPlayspaceBulletListMetadata:{fields:{title:{type:"string",id:1},items:{rule:"repeated",type:"ProtoBulletOptions",id:2}}},ProtoPlayspaceQuoteMetadata:{fields:{text:{type:"string",id:1},source:{type:"string",id:2}}},ProtoPlayspaceInstagramMetadata:{fields:{handle:{type:"string",id:1},createdDate:{type:"string",id:2},likes:{type:"string",id:3},comments:{type:"string",id:4}}},ProtoPlayspaceColorPrimary:{fields:{background:{type:"string",id:1,options:{default:"#F1F1F1"}},foreground:{type:"string",id:2,options:{default:"#000000"}}}},ProtoPlayspaceColorSecondary:{fields:{background:{type:"string",id:1,options:{default:"#000000 "}},foreground:{type:"string",id:2,options:{default:"#F1F1F1"}}}},ProtoPlayspaceColorAccent:{fields:{background:{type:"string",id:1},foreground:{type:"string",id:2}}},ProtoPlayspaceRequest:{fields:{tokens:{rule:"repeated",type:"string",id:1},pageUrl:{type:"string",id:3},userId:{type:"string",id:5},forcePlayerId:{type:"string",id:7},forceStoryId:{type:"string",id:8},version:{type:"int32",id:9},clientAb0:{type:"int32",id:10},clientAb1:{type:"int32",id:11},forceLineItemIds:{rule:"repeated",type:"string",id:12},customParam1:{type:"string",id:14},customParam2:{type:"string",id:15},customParam3:{type:"string",id:16},forceExploration:{type:"bool",id:17},es6:{type:"bool",id:18},bundleId:{type:"string",id:19},parseDomain:{type:"bool",id:20},implementationType:{type:"ProtoImplementationType",id:21},queryJsTargeting:{keyType:"string",type:"string",id:22},isConsentConnatix:{type:"bool",id:23,options:{default:!0}},reloadedPlayers:{keyType:"string",type:"string",id:25},disableTracking:{type:"bool",id:27},referrer:{type:"string",id:28},customParam4:{type:"string",id:29},customParam5:{type:"string",id:30}}},ProtoPlayspace:{fields:{playerId:{type:"string",id:1},playbackMode:{type:"ProtoPlayerPlaybackModeEnum",id:2},soundMode:{type:"ProtoPlayerSoundMode",id:3},endOfCycleMode:{type:"ProtoEndOfSlideCycleMode",id:4},containerSelector:{type:"string",id:5},position:{type:"int32",id:6},insertPosition:{type:"ProtoPlayerInsertMode",id:7},forceInsertPath:{type:"bool",id:8},renderInFrame:{type:"bool",id:9},scrollHijackingProtection:{type:"bool",id:10},preRollBreak:{type:"int32",id:11},postRollBreak:{type:"int32",id:12},midRollNumber:{type:"int32",id:13,options:{default:-1}},slidesBetweenAds:{type:"int32",id:14},minSlidesBeforeFirstAd:{type:"int32",id:15},adViewabilityPolicy:{type:"ProtoAdViewabilityPolicy",id:16},casting:{type:"bool",id:18},sharingDestinations:{rule:"repeated",type:"ProtoSharingDestination",id:19,options:{packed:!1}},expandButton:{type:"bool",id:20},closeButtonMode:{type:"ProtoPlayerCloseButtonMode",id:21},floatingMode:{type:"ProtoPlayerFloatingMode",id:22},floatingDeviceMode:{rule:"repeated",type:"ProtoDeviceType",id:23,options:{packed:!1}},floatingCloseButtonMode:{type:"ProtoPlayerCloseButtonMode",id:24},floatingFixedPosition:{type:"ProtoFloatingFixedPositionMode",id:25},floatingPageElement:{type:"string",id:26},floatingUseElementWidth:{type:"bool",id:27},floatingScrollPosition:{type:"ProtoPositionMode",id:28},floatingGutterX:{type:"int32",id:29},floatingGutterY:{type:"int32",id:30},floatingWidth:{type:"int32",id:31},html:{type:"string",id:35},lineItems:{rule:"repeated",type:"ProtoLineItem",id:37},adPlaybackMode:{type:"ProtoAdPlaybackMode",id:38},css:{type:"string",id:39},sessionId:{type:"string",id:40},orientation:{type:"ProtoPlayerOrientationEnum",id:41},orientationBreakpoint:{type:"int32",id:42},activeVersion:{type:"string",id:43},storyId:{type:"string",id:44},floatingAppendLocation:{type:"ProtoFloatingAppendLocationEnum",id:50},floatingYAxisPadding:{type:"int32",id:51},contentTitleTextColor:{type:"string",id:57},useAccentColorForProgressBar:{type:"bool",id:58},primaryColorList:{type:"ProtoPlayspaceColorPrimary",id:59},secondaryColorList:{type:"ProtoPlayspaceColorSecondary",id:60},accentColorList:{type:"ProtoPlayspaceColorAccent",id:61},customJsCode:{type:"string",id:62},initializationSettingsJson:{type:"string",id:63},publisherName:{type:"string",id:64},skipAdAfter:{type:"int32",id:66,options:{default:5}},adBreaks:{rule:"repeated",type:"ProtoAdBreak",id:67},amazonTamSlotId:{type:"string",id:68},limitClientSideApiUse:{type:"bool",id:69},abTestId:{type:"string",id:70},skipMin:{type:"int32",id:71,options:{default:31}},skippability:{type:"ProtoPlayerSkippabilityType",id:72},logoResource:{type:"string",id:73},activeVersionHasInsights:{type:"bool",id:74},bandwidthLoggingState:{type:"ProtoBandwidthLoggingEnum",id:76}}},ProtoPlayspaceResponse:{fields:{errorMessage:{type:"string",id:1},players:{rule:"repeated",type:"ProtoPlayspace",id:10},browser:{type:"Browser",id:11},geoLocation:{type:"GeoLocation",id:12},lineItems:{rule:"repeated",type:"ProtoLineItem",id:13},cookieSyncUrls:{keyType:"int32",type:"string",id:14},explorationMode:{type:"bool",id:15},supplyChain:{type:"ProtoSupplyChain",id:17},secondLevelDomain:{type:"string",id:18},userInformation:{type:"ProtoUserInformation",id:20},serverAb0:{type:"int32",id:21},serverAb1:{type:"int32",id:22},isSeoTraffic:{type:"bool",id:23},apiHostUrl:{type:"string",id:24},publisherNetworkCode:{type:"string",id:26},iOSAppID:{type:"string",id:27},hashedPageUrl:{type:"string",id:28},bundleAbId:{type:"string",id:29},bundlePart:{type:"string",id:30}}},Browser:{fields:{browserVersion:{type:"string",id:1},browserType:{type:"string",id:2},osCode:{type:"string",id:3},device:{type:"ProtoDeviceType",id:4}}},GeoLocation:{fields:{countryGeoId:{type:"int32",id:1},cityId:{type:"int32",id:2},subdivisionId:{type:"int32",id:3},dmaId:{type:"int32",id:4},ip:{type:"string",id:5},lat:{type:"double",id:6},lon:{type:"double",id:7},zipcode:{type:"string",id:8}}},CreativeTrackerViewModel:{fields:{type:{type:"ProtoTrackerType",id:1},trigger:{type:"ProtoTrackerTriggerType",id:2},url:{type:"string",id:3}}},ProtoLineItemAdBreakTargeting:{fields:{adRollType:{type:"ProtoAdBreakTypeEnum",id:1},adBreakTypeEnum:{type:"ProtoLineItemAdBreakTypeEnum",id:2}}},ProtoLineItemAdPodTargeting:{fields:{targetingType:{type:"ProtoLineItemTargetingTypeEnum",id:1},adSlotTargetingType:{type:"ProtoLineItemAdSlotTargetingTypeEnum",id:2},adSlotPositions:{rule:"repeated",type:"int32",id:3,options:{packed:!1}}}},ProtoLineItemAdBreakSettings:{fields:{adBreakTargeting:{rule:"repeated",type:"ProtoLineItemAdBreakTargeting",id:1},adPodTargeting:{type:"ProtoLineItemAdPodTargeting",id:2}}},ProtoLineItem:{oneofs:{Dc:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:49,options:{proto3_optional:!0}},publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},adTag:{type:"string",id:3},creativeType:{type:"ProtoCreativeTypeEnum",id:4},sound:{type:"bool",id:6},viewability:{type:"bool",id:7},impressionTimeSpent:{type:"int32",id:9},vendorId:{type:"string",id:10},trackers:{rule:"repeated",type:"CreativeTrackerViewModel",id:12},duration:{type:"int32",id:13},renditions:{rule:"repeated",type:"ProtoRendition",id:14},mediaCreativeId:{type:"string",id:15},ignoreFilledRequests:{type:"bool",id:16},requestCap:{type:"int32",id:17,options:{default:3}},impressionCap:{type:"int32",id:18},successRate:{type:"double",id:19},lineItemPriority:{type:"ProtoLineItemPriority",id:20},headerBidderBids:{type:"string",id:21},headerBidderTimeout:{type:"int32",id:22},mediaCreativeClickUrl:{type:"string",id:23},resetRequestsCapTime:{type:"int32",id:24,options:{default:60}},resetImpressionsCapTime:{type:"int32",id:25,options:{default:60}},resetCapType:{type:"ProtoResetCapTypeEnum",id:26},creativeHlsFileName:{type:"string",id:27},timeBetweenRequests:{type:"int32",id:28},skipMode:{type:"ProtoAdSkipMode",id:29},mediaIdTargeting:{type:"ProtoTargetingChoiceModel",id:30},mediaKeywordsTargeting:{type:"ProtoTargetingChoiceModel",id:31},mediaLanguageTargeting:{type:"ProtoTargetingChoiceModel",id:32},adType:{type:"ProtoAdType",id:33},overlayTime:{type:"int32",id:34,options:{default:30}},floorPrice:{type:"double",id:35},adBreakSettings:{type:"ProtoLineItemAdBreakSettings",id:36},floorPrices:{rule:"repeated",type:"double",id:38,options:{packed:!1}},bidRate:{type:"double",id:39},pauseAdOutOfView:{type:"ProtoLineItemPauseAdOutOfViewEnum",id:40},moatTrackingEnabled:{type:"bool",id:41},cnxCreativeId:{type:"string",id:42},blockedDomainsRevisionNumber:{type:"int32",id:44},advertiserContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:45},publisherContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:46},playerSizeTargetings:{type:"ProtoPlayerSizeTargetings",id:47},amazonDealId:{type:"string",id:48},playerOrientationTargeting:{type:"ProtoPlayerOrientationTargetingEnum",id:50},skipMin:{type:"int32",id:51,options:{default:6}},skippability:{type:"ProtoLineItemSkippabilityType",id:52},forceCallingInEveryAO:{type:"bool",id:53},networkExpiryTimeSeconds:{type:"int32",id:54,options:{default:21600}},nonlinearLineItemSettings:{type:"ProtoNonlinearLineItemSettings",id:55},floorPriceData:{rule:"repeated",type:"FloorPriceModel",id:56},playerSize:{type:"string",id:101}}},ProtoTargetingChoiceModel:{fields:{choiceCriteria:{type:"ProtoChoiceCriteriaEnum",id:1},items:{rule:"repeated",type:"string",id:2}}},ProtoContextualTargetingCaseModel:{fields:{filters:{rule:"repeated",type:"ProtoContextualTargetingFilterModel",id:1}}},ProtoContextualTargetingFilterModel:{fields:{type:{type:"ProtoLineItemContextualTargetingEnum",id:1},items:{rule:"repeated",type:"string",id:2},level:{type:"ProtoContextualTargetingLevelEnum",id:3},hashedItemsIds:{rule:"repeated",type:"string",id:4}}},ProtoPlayerSizeTargetings:{fields:{sizeChoiceCriteria:{type:"ProtoSizeChoiceCriteriaEnum",id:1},minWidth:{type:"int32",id:2},maxWidth:{type:"int32",id:3}}},FloorPriceModel:{fields:{price:{type:"double",id:1},factor:{type:"double",id:2}}},ProtoRendition:{fields:{height:{type:"int32",id:1},codec:{type:"string",id:2},file:{type:"string",id:3}}},ProtoNonlinearLineItemSettings:{fields:{nonLinearRequestType:{type:"ProtoNonlinearRequestType",id:1},nonLinearAdTimeSeconds:{type:"int32",id:2,options:{default:15}}}},ProtoSupplyChain:{fields:{businessDomain:{type:"string",id:1},supplyChainId:{type:"string",id:3}}},ProtoUserInformation:{fields:{userId:{type:"string",id:1},lookupId:{type:"string",id:3},lookupResponseCode:{type:"int32",id:4},callFraudSensor:{type:"bool",id:5},publisherAdsTxt:{type:"string",id:6}}},ProtoAdBreak:{fields:{types:{rule:"repeated",type:"ProtoAdBreakTypeEnum",id:1,options:{packed:!1}},maxAdPodDuration:{type:"int32",id:2},maxAdSlotDuration:{type:"int32",id:3,options:{default:180}},numberOfAdSlots:{type:"int32",id:4,options:{default:1}}}},ProtoPlayspaceCodecEnum:{values:{h264:0,hevc:1}},ProtoPlayerOrientationEnum:{values:{Mixed:0,Portrait:1,Landscape:2}},ProtoEndOfSlideCycleMode:{values:{Loop:0,Stop:1}},ProtoPlayspaceColorSchemeEnum:{values:{Default:0,Accent:1,Primary:2,Secondary:3}},ProtoPlayspaceSlideTypeEnum:{values:{Default:0,Cover:1,Description:2,BulletList:3,Stock:4,Quote:5,Instagram:6}},ProtoPlayspaceSlideCapabilitiesEnum:{values:{VolumeControls:0,PlaybackControls:1,PlaylistControls:2,CtaButton:3,TopStoryTitle:4,TopSlideTitle:5}},ProtoMediaContextEnum:{values:{None:0,Logo:1}},ProtoMediaTypeEnum:{values:{Image:0,Video:1}},ProtoDeviceType:{values:{Desktop:0,Smartphone:1,Tablet:2,GameConsole:3,SmartTV:4,WearableComputer:5,PDA:6,Unrecognized:7}},ProtoTrackerType:{values:{Image:0,Javascript:1}},ProtoTrackerTriggerType:{values:{Impression:0,Complete25Pc:1,Complete50Pc:2,Complete75Pc:3,ViewCompletion:4,VideoClick:5,Pause:6,Resume:7,Mute:8,Unmute:9}},ProtoCreativeTypeEnum:{values:{ThirdParty:0,MediaFile:1,Rtb:2,External:3,HeaderBidder:4,Tam:7,TamDeal:8}},ProtoResetCapTypeEnum:{values:{TimeCapping:0,ContentCapping:1,OpportunityCapping:2}},ProtoAdSlotsEnum:{values:{PreRoll:0,MidRoll:1,PostRoll:2}},ProtoLineItemPriority:{values:{House:0,Default:1,Preferred:2,Top:3}},ProtoAdSkipMode:{values:{IfLongerThan31Sec:0,Always:1,Never:2,NotAplicable:3}},ProtoAdType:{values:{Video:0,Overlay:1,Nonlinear:2}},ProtoChoiceCriteriaEnum:{values:{Only:0,Except:1}},ProtoLineItemAdBreakTypeEnum:{values:{All:1,SingleAd:2,AdPod:3}},ProtoLineItemTargetingTypeEnum:{values:{Only:0,Except:1}},ProtoLineItemAdSlotTargetingTypeEnum:{values:{SpecificSlots:1,Interval:2}},ProtoLineItemPauseAdOutOfViewEnum:{values:{Default:0,Strict:1}},ProtoLineItemContextualTargetingEnum:{values:{IncludeAny:0,IncludeAll:1,ExcludeAny:2,ExcludeAll:3}},ProtoSizeChoiceCriteriaEnum:{values:{GreaterThan:0,SmallerThan:1,Between:2}},ProtoPlayerOrientationTargetingEnum:{values:{Both:0,Portrait:1,Landscape:2}},ProtoLineItemSkippabilityType:{values:{AllowPublisherToDetermineSkippability:0,RequirePublisherToAllowNonSkipAdsShorterThan:1,NotApplicable:2}},ProtoContextualTargetingLevelEnum:{values:{Media:0,Page:1,Both:2}},ProtoPlayerPlaybackModeEnum:{values:{Autoplay:0,ScrollToPlay:1,ClickToPlay:2}},ProtoPlayerCloseButtonMode:{values:{Off:0,OnHover:1,OnHoverAfterFirstAd:2,AlwaysOn:3}},ProtoPlayerFloatingMode:{values:{Off:0,OnPageLoad:1,AfterInView:2,Always:3}},ProtoPlayerSoundMode:{values:{Mute:0,On:1,Hover:2}},ProtoPlayerInsertMode:{values:{WithinContainer:0,BeforeContainer:1,AfterContainer:2,ReplaceContainer:3,HideContainer:4}},ProtoAdViewabilityPolicy:{values:{Default:0,Strict:1}},ProtoSharingDestination:{values:{Facebook:0,Twitter:1,LinkedIn:2}},ProtoFloatingFixedPositionMode:{values:{Page:0,Element:1}},ProtoPositionMode:{values:{BottomRight:0,BottomLeft:1,TopRight:2,TopLeft:3}},ProtoAdPlaybackMode:{values:{Autoplay:0,ScrollToPlay:1}},ProtoFloatingAppendLocationEnum:{values:{Above:0,Below:1,Within:2}},ProtoPlayerAdSkippability:{values:{IfLongerThan:0,Always:1,NoRestrictions:2}},ProtoVideoQuality:{values:{Auto:0,High1080p:1,High720p:2,Medium360p:3}},ProtoImplementationType:{values:{Web:0,Amp:1}},ProtoAdBreakTypeEnum:{values:{None:0,PreRoll:1,MidRoll:2,PostRoll:3}},ProtoAdSlotAdTypeEnum:{values:{SingleAd:0,AdPod:1}},ProtoPlayerSkippabilityType:{values:{AllowNonSkipAdsIfTheyAreShorterThan:0,RequireAdsToBeSkippable:1}},ProtoBandwidthLoggingEnum:{values:{Disabled:0,Enabled:1,SaaS:2}},ProtoNonlinearRequestType:{values:{Banner:0,Video:1}}})})?s.apply(i,n):s)||(t.exports=r)},3204:t=>{"use strict";t.exports='\n'},3653:t=>{"use strict";t.exports=''},1505:t=>{"use strict";t.exports=''},2040:t=>{"use strict";t.exports='\n'},3475:t=>{"use strict";t.exports='\n'},1215:t=>{"use strict";t.exports='\n'},5522:t=>{"use strict";t.exports=''},9479:t=>{"use strict";t.exports='\n'},1954:t=>{"use strict";t.exports=''},7089:t=>{"use strict";t.exports='\n'},3409:t=>{"use strict";t.exports='\n'},889:t=>{"use strict";t.exports=''},6514:t=>{"use strict";t.exports=''},89:t=>{"use strict";t.exports='\n'},4670:t=>{"use strict";t.exports=''},1639:t=>{"use strict";t.exports='\n'},834:t=>{"use strict";t.exports='\n'},4562:t=>{"use strict";t.exports='\n'},4368:t=>{"use strict";t.exports=''},9335:t=>{"use strict";t.exports='\n'},8808:t=>{"use strict";t.exports='\n'},8757:t=>{"use strict";t.exports=''},9040:t=>{"use strict";t.exports=''}},i={},e,s;function n(e){var s=i[e];if(void 0!==s)return s.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}n.n=t=>{var i=t&&t.R?()=>t.default:()=>t;return n.d(i,{a:i}),i},s=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,n.t=function(t,i){if(1&i&&(t=this(t)),8&i)return t;if("object"==typeof t&&t){if(4&i&&t.R)return t;if(16&i&&"function"==typeof t.then)return t}var r=Object.create(null);n.r(r);var h={};e=e||[null,s({}),s([]),s(s)];for(var o=2&i&&t;"object"==typeof o&&!~e.indexOf(o);o=s(o))Object.getOwnPropertyNames(o).forEach((i=>h[i]=()=>t[i]));return h.default=()=>t,n.d(r,h),r},n.d=(t,i)=>{for(var e in i)n.o(i,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"R",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";n(8660);var t,i=n(7726),e=n(7272),s=(n(6450),n(289)),r=n(8804),h=n(5880),o=n(782),a=n(3030),c=n(2820);!function(t){t.Deprecation="deprecation",t.Intervention="intervention",t.Crash="crash"}(t||(t={}));class l{constructor(t,i,e){this.Ne=t,this.Nc=i,this.Hc=e,this.qc=!1,this.Wc=()=>{"hidden"===this.Ne.document.visibilityState&&this.Gc()},this.Gc=()=>{if(this.qc||!this.Jc)return;const t=this.Jc.takeRecords();this.Qc(t),this.qc=!0},this.Qc=t=>{t.filter((({body:t})=>"HeavyAdIntervention"===(null==t?void 0:t.id))).forEach((()=>{this.Nc.trackHeavyAdIntervention(this.Hc)}))},this.Xc()&&this.Yo()}destroy(){this.Ne.removeEventListener("pagehide",this.Gc),this.Ne.removeEventListener("visibilitychange",this.Wc)}Xc(){return!!this.Ne.ReportingObserver}Yo(){this.Jc=new this.Ne.ReportingObserver((t=>{this.Qc(t)}),{buffered:!0,types:[t.Intervention]}),this.Jc.observe(),this.Ne.addEventListener("pagehide",this.Gc),this.Ne.addEventListener("visibilitychange",this.Wc)}}var u=n(4280),d=n(497);class p extends h._{constructor(t,i,e,n,r){super(),this.mediator=t,this.playerModel=i,this.app=e,this.Yc=n,this._appSettings=r,this.macroElements={player:[]},this.Kc=!1,this.Zc={description:"{{description}}",title:"{{title}}",player:"{{player}}"},this.tl=null,this.il=500,this.createExperience(i,r),this.el=new l(i.global,this.app.services.TrackingService,{heavyAdBlockTypeEnum:s.ProtoHeavyAdBlockTypeEnum.Global}),this.sl=new l(window,this.app.services.TrackingService,{heavyAdBlockTypeEnum:s.ProtoHeavyAdBlockTypeEnum.Script})}subscribeToEvents(){this.subscribe(o.Uh.Destroy,this.experience,(()=>{this.destroy()})),this.subscribe(o.Uh.CanStart,this.experience,(()=>{this.experience.start()})),this.subscribe(o.Xh.SessionRendered,this.experience,(()=>{this.Yc.wasPlayerReloaded||this.app.services.TrackingService.trackSessionRendered(u._.isBannerBlocked),this.mediator.publish(this,o.Xh.SessionRendered)})),this.subscribe(o.Xh.SessionView,this.experience,(()=>{this.Yc.wasPlayerInView||(this.app.services.TrackingService.trackSessionViewability(),this.mediator.publish(this,o.Xh.SessionView))})),Object.values(this.experience.events).forEach((t=>{this.subscribe(t,this.experience,(i=>{this.experienceApi.trigger(t,i.payload)}))}))}updateMacroContent(t,i){t&&t.forEach((t=>{t.textContent=i}))}de(){this.playerModel.css&&this.app.services.GlobalDomUtilsService.addCssString(this.playerModel.css,`cnx-custom-css-${this.app.config.appId}`)}nl(t){return`${t}`.replace(/{\{([^}]+)}}/g,"$&")}hl(){if(this.experienceContainer=this.ol(),this.playerModel.html){const t=this.app.services.GlobalDomUtilsService.createElementByString(this.nl(this.playerModel.html));this.al(t);const i=this.macroElements.player[0];if(!i)throw Error("player macro was not found");i.innerHTML="",i.parentNode.insertBefore(this.experienceContainer,i),i.parentNode.removeChild(i);(0,a.Sz)(t.children).forEach((t=>{this.playerModel.targetContainer.parentNode.insertBefore(t,this.playerModel.targetContainer)}))}else this.playerModel.targetContainer.parentNode.insertBefore(this.experienceContainer,this.playerModel.targetContainer);this.playerModel.targetContainer.parentElement.removeChild(this.playerModel.targetContainer)}ol(){const t=this.app.config.isMobile?c.s6.Mobile:c.s6.Desktop;return this.app.services.GlobalDomUtilsService.createElementByString(``)}al(t){(0,a.Sz)(t.children).forEach((t=>{t.children.length>0&&this.al(t),Object.keys(this.Zc).forEach((i=>{const e=this.Zc[i];t.textContent.includes(e)&&this.ll(i,t)}))}))}ll(t,i){this.macroElements[t]||(this.macroElements[t]=[]),this.macroElements[t].push(i),i.textContent=""}ul(){null!==this.tl&&(clearInterval(this.tl),this.tl=null)}init(t){this.de(),this.hl();const e=this.app.config.device;return this.isSupportedBreakpoint(e)?(this.subscribeToEvents(),this.experience.dl(this.playerModel,this.app,this.experienceContainer,t),this.tl=setInterval((()=>{this.Kc?this.ul():this.app.services.GlobalDomUtilsService.isDetachedFromDOM(this.experienceContainer)&&(this.destroy(),(0,i.n)({message:"player_removed_from_DOM",level:i.D.INFO}))}),this.il),!0):(this.destroy(),!1)}getApiMethods(){return this.experienceApi.getApiMethods()}get playerContainer(){return this.experienceContainer}destroy(){try{d.S.playerDestroyed=!0,this.Kc=!0,this.ul(),this.app.services.TrackingService.destroy(),this.app.services.ResizeObserver.destroy(),this.app.services.ViewabilityService.destroy(),this.app.services.InteractionService.destroy(),this.experienceApi.setDestroyed(),this.unsubscribeAll(this.experience),this.experience&&(this.experience.destroy(),this.experience=null),this.experienceContainer.parentNode&&this.experienceContainer.parentNode.removeChild(this.experienceContainer),this.el.destroy(),this.sl.destroy()}catch(t){(0,i.n)({callStack:t.stack,level:i.D.WARN,message:"Renderer_destroy",exception:t.message})}}}var f,v,g=n(9078),m=n(1561);!function(t){t[t.DirectionIn=0]="DirectionIn",t[t.DirectionOut=1]="DirectionOut",t[t.FadeIn=2]="FadeIn"}(f||(f={})),function(t){t.Float="float",t.Embed="embed"}(v||(v={}));const y=.5;class b{constructor(t,i,e,s,n,r=0){this.pl=t,this.Wt=i,this.fl=e,this.vl=s,this.Sr=n,this.gl=r,this.ml=void 0,this.yl=null,this.bl=!1,this.Sl=()=>{if(!this.ml||!this._l)return;const t=this.Al(),i=!!this._l;this.Pl(t,i)},this.kl=()=>{var t;if(this.Il()&&(this.Wt.width=null===(t=this._l)||void 0===t?void 0:t.clientWidth),this.Tl(),this.ml){const t=!1,i=this.Al();this.Pl(i,t)}},this.Tl=()=>{this.Cl()?!this.Ml||this.ml||this.bl?this.El():this.Ll():this.ml&&this.Ol()},this.Rl=t=>{if(this.Bl(t.propertyName))switch(this.transitionState){case f.DirectionIn:this.transitionState=void 0,this.Dl();break;case f.DirectionOut:this.transitionState=void 0,this.jl();break;case f.FadeIn:this.transitionState=void 0,this.Fl()}}}get transitionState(){return this.$l}set transitionState(t){this.$l===f.FadeIn&&this.Vl(c.jG.FadeInBase,c.jG.FadeIn),this.$l=t}Ul(...t){(0,m.cn)(this.fl,...t)}Vl(...t){(0,m.IV)(this.fl,...t)}El(){this.vl!==s.ProtoDeviceType.Smartphone&&(this.fl.style.width=`${this.Wt.width}px`);const t=this.fl.getBoundingClientRect().width;this.fl.style.height=this.Wt.getHeight(t)}Nl(){return(0,a.d3)(this.vl,this.Wt.floatingDeviceMode)}Hl(){this.Sr.addEventListenerOnGlobal("scroll",this.Sl)}zl(){this.Sr.removeEventListenerOnGlobal("scroll",this.Sl)}ql(){this._l=this.Sr.querySelector(this.Wt.pageElement),this._l&&(clearInterval(this.yl),this.Wt.width=this._l.clientWidth,this.Tl(),this.pl.on(this._l,this.kl))}Wl(){var t,i;const e=null===(t=this._l)||void 0===t?void 0:t.getBoundingClientRect().top;return this.Wt.appendLocation===s.ProtoFloatingAppendLocationEnum.Above?e-this.fl.offsetHeight-this.Wt.floatingYAxisPadding:this.Wt.appendLocation===s.ProtoFloatingAppendLocationEnum.Below?e+(null===(i=this._l)||void 0===i?void 0:i.offsetHeight)+this.Wt.floatingYAxisPadding:e}Gl(){this.yl=setInterval((()=>{this.ql()}),500),this.ql()}Il(){return this.Wt.floatingPosition===s.ProtoFloatingFixedPositionMode.Element}Bl(t){switch(this.transitionState){case f.DirectionIn:case f.DirectionOut:if("transform"===t)return!0;break;case f.FadeIn:if("opacity"===t)return!0}return!1}Jl(){this.fl.style.top="",this.fl.style.bottom="",this.fl.style.left="",this.fl.style.right="",this.fl.style.width="",this.fl.style.height="",this.fl.style.transform=""}jl(){this.ml=!1,this.Vl(c._7.MainClass,c._7.TransitionClass),this.Jl(),this.Ql()}Pl({x:t,y:i},e){this.Yl(e);const s=()=>this.fl.style.transform=`translate(${t}px, ${i}px)`;e?(this.Sr.cancelRequestAnimationFrame(this.Kl),this.Kl=null,this.Kl=this.Sr.requestAnimationFrameHelper((()=>{s()}))):s()}Yl(t){t?this.Ul(c._7.TransitionClass):this.Vl(c._7.TransitionClass)}Al(){let t,i;if(this.Il()&&this._l){this.Zl();const e=this.Wt.isPositionedLeft?this.Wt.floatingGutterX:-this.Wt.floatingGutterX;t=this.Sr.getElementCoordinates(this._l).clientX+e;const s=this.Wl();return i=s=this.gl}Ll(){if(!this.eu())return;this.Il()&&this.Hl(),this.ml=!0,this.transitionState=f.DirectionIn,this.Ul(c._7.MainClass),this.El();const t=this.Al(),i=this.tu();this.su(),this.Pl({x:i,y:t.y},!1),(0,m.Tp)(this.fl);this.Pl(t,!0)}eu(){return!!this.Cl()&&!(this.Il()&&(!this._l||this._l&&0===this._l.clientWidth))}Zl(){this._l&&(this.Sr.getElementCoordinates(this._l).clientX{const i=this.au.getIsTabInFocus();t&&this.isInFloating&&(this.Ml=!1,this.Ol()),this.cu&&this.Wt.floatingMode===s.ProtoPlayerFloatingMode.AfterInView&&t&&(this.cu=!1),!t&&!this.cu&&this.lu&&i&&(this.Ml=!0,super.Ll())},this.El=()=>{this.isInFloating&&super.El()}}get onFloatingEnterStart(){return this.du.asObservable()}get onFloatingEnterStop(){return this.pu.asObservable()}get onFloatingExitStart(){return this.fu.asObservable()}get onFloatingExitStop(){return this.vu.asObservable()}isFloatingModeEnabled(){return this.cu&&(this.enabled=!1),this.enabled}enableFloatingMode(){this.cu=!1,this.lu=!0,this.start()}disableFloatingMode(){this.lu=!1,this.destroy()}setFloatingSettings(t){this.ou(t),this.start()}Ol(){const t=!this.uu;super.Ol(t)}nu(){this.fu.next()}Ql(){this.mu()}su(){this.du.next()}mu(){this.transitionState=f.FadeIn,this.Vl(c.jG.FadeIn),this.Ul(c.jG.FadeInBase),(0,m.Tp)(this.fl),this.Ul(c.jG.FadeIn)}Dl(){this.pu.next()}Fl(){this.Vl(c.jG.FadeInBase,c.jG.FadeIn),this.vu.next(),this.bl&&super.hu()}yu(){this.au.on(this.fl.parentElement,this.gu,{threshold:y})}bu(){this.au.off(this.fl.parentElement,this.gu)}start(){this.Nl()&&(super.ru(),this.Wt.floatingMode===s.ProtoPlayerFloatingMode.OnPageLoad&&(this.cu=!1),this.yu(),this.gu(this.au.check({element:this.fl.parentElement,threshold:y})))}canFloat(){return this.Nl()&&this.Wt.floatingMode!==s.ProtoPlayerFloatingMode.Off}destroy(){this.isInFloating?(this.jl(),this.bl=!0):super.hu(),this.bu()}get enabled(){return this.lu}set enabled(t){this.lu=t}fullscreenStateChange(t){this.uu=t,t?this.bu():this.yu(),this.gu(t)}}!function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Replay=2]="Replay",t[t.Volume=3]="Volume",t[t.Mute=4]="Mute",t[t.Unmute=5]="Unmute",t[t.Seek=6]="Seek",t[t.DraggingStart=7]="DraggingStart",t[t.DraggingStopped=8]="DraggingStopped",t[t.SeekingStart=9]="SeekingStart",t[t.SeekingStopped=10]="SeekingStopped",t[t.Expand=11]="Expand",t[t.Collapse=12]="Collapse",t[t.Quality=13]="Quality",t[t.Close=14]="Close",t[t.Next=15]="Next",t[t.Prev=16]="Prev",t[t.Settings=17]="Settings",t[t.CaptionOn=18]="CaptionOn",t[t.CaptionOff=19]="CaptionOff",t[t.CaptionUpdate=20]="CaptionUpdate",t[t.VolumeHoverStart=21]="VolumeHoverStart",t[t.VolumeHoverStopped=22]="VolumeHoverStopped",t[t.OverlayClick=23]="OverlayClick",t[t.UIHideStart=24]="UIHideStart",t[t.UIShowStart=25]="UIShowStart",t[t.UIEndShowHide=26]="UIEndShowHide",t[t.AboutClick=27]="AboutClick",t[t.ContextClick=28]="ContextClick",t[t.SettingsMenu=29]="SettingsMenu",t[t.HoverStart=30]="HoverStart",t[t.HoverEnd=31]="HoverEnd",t[t.StateChanged=32]="StateChanged",t[t.RebindComponent=33]="RebindComponent",t[t.SkipAd=34]="SkipAd",t[t.LogoClicked=35]="LogoClicked",t[t.ContextMenuOpen=36]="ContextMenuOpen",t[t.ContextMenuClose=37]="ContextMenuClose",t[t.CaptionMenu=38]="CaptionMenu",t[t.NonLinearClose=39]="NonLinearClose"}(w||(w={}));var _,A,P=n(7427),k=n(5055);class I extends b{constructor(t,i,e,s,n,r=0){super(t,e,i,s,n,r),this.Ml=!0,this.pu=new x.x}get onFloatingEnterStop(){return this.pu.asObservable()}su(){}Dl(){this.pu.next()}nu(){}Ql(){}Fl(){}start(){this.Nl()&&(this.Ul(c._7.AlwaysFloating),super.ru(),super.Ll())}setFloatingSettings(t){this.ou(t),this.start()}}!function(t){t.ShowLinearEvent="showLinearEvent",t.HideLinearEvent="hideLinearEvent",t.PauseLinearEvent="pauseLinearEvent",t.ResumeLinearEvent="resumeLinearEvent",t.SkipLinearEvent="skipLinearEvent"}(_||(_={})),function(t){t.ShowNonLinearEvent="showNonLinearEvent",t.HideNonLinearEvent="hideNonLinearEvent"}(A||(A={}));class T{constructor(t,i,e,s){this.fl=t,this.wu=s,this.xu=this.Su(e,i)}Su(t,i){return Object.assign({},t[i]||t[s.ProtoDeviceType.Smartphone])}updateWidth(t){const i=this._u(t);i!==this.currentBreakpointClass&&((0,m.IV)(this.fl,this.currentBreakpointClass),(0,m.cn)(this.fl,i),this.currentBreakpointClass=i)}_u(t){switch(!0){case t>=this.xu.xxl:return this.wu.Xxl;case t>=this.xu.xl:return this.wu.Xl;case t>=this.xu.lg:return this.wu.Lg;case t>=this.xu.md:return this.wu.Md;case t>=this.xu.sm:return this.wu.Sm;case t>=this.xu.xs:return this.wu.Xs;default:return this.wu.Xxs}}}const C="midRollCapped",M="totalAdBreakDurationExpired",E="enableLinearAds",L="disableLinearAds",O="ForceStopAdSlot",R="ForceStopAdPod",B="linearAdOpportunity",D="AdPodRemainingTime",j="disableNonLinearAds",F="enableNonLinearAds";var $;!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}($||($={}));const V=$;class U{constructor(t){this.urlSuffixerService=t,this.Au={},this.Pu=[]}getImage(t,i,e,s,n="",r=!1){return this.ku=t,this.Iu=(0,P.QM)(i)?i:"",this.Tu=e,this.Cu=s,this.Mu=n,this.Eu=r,this.Lu()}Lu(){const t=this.Ou();if(t)return t;const i=this.ku+this.Mu,e=new Image;return e.src=this.urlSuffixerService.appendParamsToUrl(i),e.alt=this.Iu,this.Au[this.ku]=this.Au[this.ku]||{},this.Au[this.ku][this.Tu]=this.Au[this.ku][this.Tu]||{},this.Au[this.ku][this.Tu][this.Cu]=this.Au[this.ku][this.Tu][this.Cu]||{},this.Au[this.ku][this.Tu][this.Cu][this.Mu]=e,e}Ou(){const t=this.Ru();if(t)return t;if(!this.Eu)return;this.Bu();const i=this.Du();if(i)return i;const e=this.Fu();return e||void 0}Bu(){const t=[];if(!this.Au[this.ku])return void(this.Pu=[]);const i=this.Au[this.ku],e=this.Tu>this.Cu?V.Landscape:V.Portrait;Object.keys(i).forEach((s=>{const n=parseInt(s,10);Object.keys(i[s]).filter((t=>!!i[s][t])).forEach((i=>{const s=parseInt(i,10);if((n>s?V.Landscape:V.Portrait)!==e)return;const r={area:n*s,img:this.$u(this.ku,n,s)};t.push(r)}))})),this.Pu=[...t]}$u(t,i,e){if(this.Au[t]&&this.Au[t][i]&&this.Au[t][i][e])return this.Au[t][i][e][Object.keys(this.Au[t][i][e])[0]]}Ru(){return this.Au[this.ku]&&this.Au[this.ku][this.Tu]&&this.Au[this.ku][this.Tu][this.Cu]&&this.Au[this.ku][this.Tu][this.Cu][this.Mu]}Du(){if(0===this.Pu.length)return;const t=this.Tu*this.Cu,i=this.Pu.filter((({area:i})=>i>t)).sort(((t,i)=>t.area-i.area));return 0!==i.length?i[0].img:void 0}Fu(){if(0===this.Pu.length)return;const t=this.Tu*this.Cu,i=this.Pu.filter((({area:i})=>ii.area-t.area));return 0!==i.length?i[0].img:void 0}}var N,H,z,q,W=n(4959);!function(t){t.Play="play",t.Playing="playing",t.Pause="pause",t.Mute="mute",t.Unmute="unmute",t.Canplay="canplay",t.Ended="ended",t.Timeupdate="timeupdate",t.Seeking="seeking",t.Seeked="seeked",t.Volumechange="volumechange",t.Durationchange="durationchange",t.Fullscreen="fullscreen",t.LoadedData="loadeddata",t.LoadedMetadata="loadedmetadata",t.Error="error"}(N||(N={})),function(t){t[t.Auto=0]="Auto",t[t.Strict=1]="Strict"}(H||(H={})),function(t){t[t.PlayingState=0]="PlayingState",t[t.PausedState=1]="PausedState",t[t.PrerollState=2]="PrerollState",t[t.PostrollState=3]="PostrollState",t[t.StoppedState=4]="StoppedState",t[t.ReplayState=5]="ReplayState",t[t.HiddenState=6]="HiddenState",t[t.BufferingState=7]="BufferingState",t[t.LiveStreamStarting=8]="LiveStreamStarting",t[t.LiveStreamEnded=9]="LiveStreamEnded",t[t.LiveStreamStopped=10]="LiveStreamStopped",t[t.LiveStreamNotSupported=11]="LiveStreamNotSupported"}(z||(z={})),function(t){t.H264="h264",t.Hevc="hevc"}(q||(q={}));const G="playError",J="newVideo",Q="buffering",X="buffered",Y="levelSwitching",K="endOfStream",Z="VideoQualityChanged",tt="CurrentQuality",it="QualityListLoaded";var et;!function(t){t[t.Low144p=144]="Low144p",t[t.Low240p=240]="Low240p",t[t.Medium360p=360]="Medium360p",t[t.Medium480p=480]="Medium480p",t[t.High720p=720]="High720p",t[t.High1080p=1080]="High1080p"}(et||(et={}));function st(t,i){const e=t.length-1;return{currentIndex:i,nextIndex:i===e?0:i+1,prevIndex:0===i?e:i-1,firstIndex:0,lastIndex:e}}function nt(t,i){return!(i.skippability===s.ProtoPlayerSkippabilityType.AllowNonSkipAdsIfTheyAreShorterThan&&t{i.types.forEach((e=>{(function(t,i){let e=!1;switch(t){case s.ProtoAdBreakTypeEnum.PreRoll:e=i===s.ProtoAdSlotsEnum.PreRoll;break;case s.ProtoAdBreakTypeEnum.MidRoll:e=i===s.ProtoAdSlotsEnum.MidRoll;break;case s.ProtoAdBreakTypeEnum.PostRoll:e=i===s.ProtoAdSlotsEnum.PostRoll}return e})(e,t)&&(this.Uu.currentPodNumber=i.numberOfAdSlots,this.Uu.maxAdSlotDuration=i.maxAdSlotDuration,this.Uu.maxAdPodDuration=i.maxAdPodDuration,this.Uu.totalNumberOfAdSlots=i.numberOfAdSlots)}))}))}adStarted(){this.Hu(),0===this.Uu.currentPodNumber&&(this.Uu.currentPodNumber=this.Uu.totalNumberOfAdSlots),this.Uu.currentPodNumber--}endPod(){this.Hu(),this.Uu.currentPodNumber=0}enterPodTimeout(t){this.Hu(),this.Nu=setTimeout((()=>{this.Hu(),t()}),5e3)}isInAdPod(){return this.Uu.currentPodNumber>0}isCurrentBreakInPod(){return this.Uu.totalNumberOfAdSlots>1}getMaxAdSlotDuration(){return this.Uu.maxAdSlotDuration}getMaxAdPodDuration(){return this.Uu.maxAdPodDuration}getMaxAdSlotPossibleDuration(){let t=0;for(let i=0;it?t+1:1}getTotalNumberOfSlots(){return this.Uu.totalNumberOfAdSlots}isInPodTimeout(){return!!this.Nu}getAdBreakState(t){if(!(0,P.$K)(t))return this.zu();const{adSlotDuration:i,adBreakType:e}=t;return{isAdPodBreak:this.isCurrentBreakInPod(),adPodSlotIndex:this.isCurrentBreakInPod()?this.getNextSlotIndex():0,maxAdDuration:Math.round(this.getMaxAdSlotDuration()/ht.s_||rt.DEFAULT_MAX_AD_DURATION),remainingAdDuration:Math.round(i/ht.s_),sessionMaxAdDuration:Math.round(this.getMaxAdSlotPossibleDuration()/ht.s_),adBreakType:e}}zu(){let t=s.ProtoAdBreakTypeEnum.MidRoll;this.adBreaks.forEach((i=>{i.types.some((t=>t===s.ProtoAdBreakTypeEnum.PreRoll))&&(t=s.ProtoAdBreakTypeEnum.PreRoll)}));const i=this.getMaxAdSlotDuration();return this.getAdBreakState({adSlotDuration:i,adBreakType:t})}Hu(){clearTimeout(this.Nu),this.Nu=null}}var at,ct,lt=n(2231),ut=n(8423),dt=n(308),pt=n(6243);!function(t){t[t.None=0]="None",t[t.Portrait=1]="Portrait",t[t.Landscape=2]="Landscape"}(at||(at={})),function(t){t.LINEAR="LINEAR",t.NONLINEAR="NONLINEAR"}(ct||(ct={}));var ft=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};const vt=["com.accuweather.android"],gt=.05*ht.s_;class mt extends h._{constructor(t,i,e){super(),this.mediator=t,this._appSettings=i,this.qu=e,this.Wu=.01,this.Gu=.5,this.Ju=2e3,this.Qu=0,this.Xu=!1,this.Yu=!1,this.Ku=!1,this.Zu=!1,this.td=!1,this.sd=!1,this.nd=!1,this.Ns=s.ProtoAdSlotsEnum.PreRoll,this.rd=!1,this.hd=!1,this.od=!1,this.ud=!1,this.dd=[],this.ki=[],this.pd=[],this.fd=0,this.vd=t=>{this.hd=t,t&&(this.app.services.ViewabilityService.off(this.$playerContainer,this.vd),this.gd())},this.yd=t=>{t&&this.adHandler&&!this.ud&&setTimeout((()=>{this.adHandler.resumeWithoutUserInteraction(this.Ns)}),gt)},this.bd=()=>{this.isBelowSmBreakpoint(this.$experienceContainer.clientWidth)||(0,m.IV)(this.$experienceContainer,c.Gj.NoHeight),!this.Yu&&this.wd()&&(this.mediator.publish(this,o.Uh.CanStart),this.app.services.ResizeObserver.off(this.$experienceContainer,this.bd))},this.xd=t=>{const{playback:i,isFullscreenClose:e}=t;this.floatingModule&&(0,P.$K)(i)&&!e&&(this.floatingModule.enabled=i)},this.Sd=()=>{this._d(1)},this.Pd=()=>{this._d(0)},this.Id=t=>{this.xd(t);const{playback:i}=t;(0,P.$K)(i)&&(i?(this.app.services.EventsStorageService.emitAdPlay(),this.ud=!1):(this.app.services.EventsStorageService.emitAdPause(),this.ud=!0))},this.Td=new U(e)}Cd(){}Ed(t,i,e){this.app.services.EventsStorageService.emitAdImpression(t,i,e)}Ld(t){this.app.services.EventsStorageService.emitAdComplete(t)}Od(){}Rd(){}Bd(){}Dd(){}jd(){}Fd(){}$d(){}Vd(t){const i={state:t};this.app.services.EventsStorageService.emitAdStateChange(i)}Ud(){const{clientWidth:t,clientHeight:i}=this.$playerContainer,e={width:t,height:i};this.app.services.EventsStorageService.emitPlayerResized(e)}Nd(){this.app.services.EventsStorageService.emitOnEnterFullscreen()}Hd(){this.app.services.EventsStorageService.emitOnExitFullscreen()}zd(){this.app.services.EventsStorageService.emitOnPlayerCollapsed()}qd(){this.app.services.EventsStorageService.emitOnPlayerExpanded()}Wd(t){this.Gd(t),this.Jd(t),this.Qd(t),this.Ns=t,this.Xd(t)}Jd(t){this.adHandler&&this.adHandler.adStateChange(t,this.Yd.getMaxAdSlotDuration())}Qd(t){this.Kd.onAdStateChange(t,{maxAdPodDuration:this.Yd.getMaxAdPodDuration(),maxAdSlotDuration:this.Yd.getMaxAdSlotDuration()})}Gd(t){this.Yd.setNewBreak(t)}Xd(t){this.Vd(W.V[t])}Zd(){var t;null===(t=this.adHandler)||void 0===t||t.contentChanged(),this.Kd.contentChanged()}ep(){var t;null===(t=this.adHandler)||void 0===t||t.contentEnded()}sp(){var t,i,e,s,n,r;this.adHandler=this.np(),this.rp(),null===(t=this.adHandler)||void 0===t||t.onLinearImpressionPrice.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionPrice,{payload:t})})),null===(i=this.adHandler)||void 0===i||i.onNonLinearImpressionPrice.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionPrice,{payload:t})})),null===(e=this.adHandler)||void 0===e||e.onLinearImpressionRevenue.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionRevenue,{payload:t})})),null===(s=this.adHandler)||void 0===s||s.onNonLinearImpressionRevenue.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionRevenue,{payload:t})})),null===(n=this.adHandler)||void 0===n||n.onLinearExperienceEvent.subscribe((t=>{o.Uh.UserInteraction===t.type&&this.Id(t.payload)}));const h=()=>{this.app.services.TrackingService.setAdStart(),this.od=!0,this.ud=!1,this.gd(),this.op.unsubscribe()};this.op=null===(r=this.adHandler)||void 0===r?void 0:r.onAdsEnable.subscribe((()=>{h()}))}rp(){this.ap(),this.cp(),this.lp()}ap(){this.pd.push(this.adHandler.onVpaidEvent.subscribe((t=>{switch(t.type){case g.fI.AdImpression:{this.mediator.publish(this,k.Km.AdImpression,t.payload);const{adSourceData:i,customAdData:e,adType:s}=t.payload.payload;this.Ed(i,e,s);break}case g.fI.AdStopped:{if(this.mediator.publish(this,k.Km.AdStopped,t.payload),this.nd&&this.Rd(),!t.payload)return;const{adType:i}=t.payload.payload;this.Ld(i),this.app.services.EventsStorageService.emitAdStopped(i);break}case g.fI.AdError:{const{adType:i}=t.payload;this.mediator.publish(this,k.Km.AdError,t),this.app.services.EventsStorageService.emitAdError(i);break}case g.fI.AdSkipped:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdSkipped,t.payload),this.app.services.EventsStorageService.emitAdSkipped(i),this.Ld(i),this.nd&&this.Rd();break}case g.fI.AdPaused:{const{adType:i}=t.payload.payload;this.app.services.TrackingService.setSessionPlayback(!1),this.app.services.EventsStorageService.emitAdPaused(i),this.mediator.publish(this,k.Km.AdPause,t.payload);break}case g.fI.AdPlaying:{const{adType:i}=t.payload.payload;this.app.services.TrackingService.setSessionPlayback(!0),this.app.services.EventsStorageService.emitAdPlaying(i),this.mediator.publish(this,k.Km.AdPlay,t.payload);break}case g.fI.AdVideoFirstQuartile:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted25,t.payload),this.app.services.EventsStorageService.emitAdVideoFirstQuartile(i);break}case g.fI.AdVideoMidpoint:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted50,t.payload),this.app.services.EventsStorageService.emitAdVideoMidpoint(i);break}case g.fI.AdVideoThirdQuartile:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted75,t.payload),this.app.services.EventsStorageService.emitAdVideoThirdQuartile(i);break}case g.fI.AdVideoComplete:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted100,t.payload),this.app.services.EventsStorageService.emitAdVideoComplete(i);break}case g.fI.AdClickThru:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdClick,t.payload),this.app.services.EventsStorageService.emitAdClickThru(i);break}case g.fI.AdInteraction:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.fI.AdUserAcceptInvitation:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.fI.AdUserClose:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.fI.AdUserMinimize:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.fI.AdVideoStart:{const{adSourceData:i,adType:e}=t.payload,s={duration:i&&i.length,mediaPlayerVolume:this.getVolume()};this.app.services.EventsStorageService.emitAdVideoStart(s,e);break}case g.fI.AdLoaded:{const{payload:i}=t.payload,{adType:e}=i,{adLoadedData:s}=i;(null==s?void 0:s.skipOffset)<0&&(s.skipOffset=void 0);const n=this.up(s);this.app.services.EventsStorageService.emitAdLoaded(n,e);break}case g.fI.AdVolumeChange:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdVolumeChange(i);break}case g.fI.AdLog:}})))}cp(){this.pd.push(this.adHandler.onLinearEvent.subscribe((t=>{switch(t.type){case _.ShowLinearEvent:this.Kd.onAdImpression(t.payload,ct.LINEAR),this.dp();break;case _.HideLinearEvent:this.pp();break;case _.PauseLinearEvent:this.Kd.onLinearAdPause();break;case _.ResumeLinearEvent:this.Kd.onLinearAdPlay();break;case _.SkipLinearEvent:const i=!0;this.floatingModule&&(this.floatingModule.enabled=!0),this.pp(i)}})))}lp(){this.pd.push(this.adHandler.onNonLinearEvent.subscribe((t=>{switch(t.type){case A.ShowNonLinearEvent:this.Kd.onAdImpression(t.payload,ct.NONLINEAR);break;case A.HideNonLinearEvent:const i=!1;this.Kd.onAdFinished(this.adHandler.nonLinearInImpression,ct.NONLINEAR,i)}})))}dp(){this.Yd.adStarted(),this.adHandler.showLinear()}fp(){this.adHandler.hideLinear()}pp(t=!1){let i=this.Yd.isInAdPod();t&&(i=!1,this.Yd.endPod()),this.Kd.onAdFinished(this.adHandler.linearInImpression,ct.LINEAR,i),this.fp(),this.vp.isCloseButton&&this.adHandler&&this.adHandler.firstLinearAdShown&&(this.vp.closeButtonMode!==s.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd||(0,m.pv)(this.$playerContainer,c.s6.CloseHover)||(0,m.cn)(this.$playerContainer,c.s6.CloseHover),this.vp.floatingSettings.floatingCloseButtonMode!==s.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd||(0,m.pv)(this.$playerContainer,c.s6.CloseFloatHover)||(0,m.cn)(this.$playerContainer,c.s6.CloseFloatHover))}gp(t){this.adHandler.enterAdPodLoadingState(),this.Yd.enterPodTimeout((()=>{this.Yd.endPod(),t()}))}mp(){(0,m.Tp)(this.$playerContainer),this.Kd=this.yp(),this.subscribe(F,this.Kd,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.enableAds(ct.NONLINEAR)})),this.subscribe(j,this.Kd,(t=>{var i;const e=t.payload;null===(i=this.adHandler)||void 0===i||i.disableAds(ct.NONLINEAR,e)})),this.subscribe(E,this.Kd,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.enableAds(ct.LINEAR)})),this.subscribe(L,this.Kd,(t=>{var i;const e=t.payload;null===(i=this.adHandler)||void 0===i||i.disableAds(ct.LINEAR,e)})),this.subscribe(O,this.Kd,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.stopAd("forceStopAdSlot")})),this.subscribe(R,this.Kd,(()=>{if(this.adHandler)if(this.adHandler.linearInImpression)this.Yd.endPod(),this.adHandler.stopAd("forceStopAdPod");else{const t=!0;this.pp(t)}})),this.subscribe(D,this.Kd,(t=>{var i;null===(i=this.adHandler)||void 0===i||i.updateLinearPodRemainingTime(t.payload.remainingTime)})),this.subscribe(B,this.Kd,(t=>{var i,e;const s=t.payload.adBreakType,n=null===(i=this.adHandler)||void 0===i?void 0:i.getLinearAdContainerWidth(),r={adBreak:s,playerWidth:(0,P.$K)(n)?n:this.$playerContainer.clientWidth};this.app.services.TrackingService.trackAdOpportunity(r),null===(e=this.adHandler)||void 0===e||e.newLinearAdOpportunity()}))}bp(){this.app.services.ViewabilityService.on(this.$playerContainer,this.vd,{threshold:this.Gu,callbackDelay:this.Ju}),this.app.services.ViewabilityService.on(this.$playerContainer,((t,i)=>this.gu(t,i)),{threshold:this.Wu}),this.app.services.ViewabilityService.subscribe(k.rl.OmidViewabilityThreshold,(t=>{this.mediator.publish(this,k.rl.OmidViewabilityThreshold,{payload:{threshold:t}})})),this.app.config.os.os===dt.M.Ios&&this.app.services.PageFocusService.on(this.yd)}gd(){this.hd&&this.od&&this.mediator.publish(this,o.Xh.SessionView)}gu(t,i=!1){this.Kd.setToggleAdsReason({isAppBackgrounded:i}),this.app.config.isInApp&&(i?(this.wp=this.getVolume(),this.setVolume(0)):this.wp&&(this.setVolume(this.wp),this.wp=null)),this.nd=t,this.mediator.publish(this,k.Km.IsViewable,{payload:t}),this.Kd.viewabilityStateChanged(this.checkFloatingViewability(t),this.Yd.isInAdPod(),this.Yd.isInPodTimeout()),this.app.services.TrackingService.setSessionViewability(t)}checkFloatingViewability(t){const i=this.app.services.ViewabilityService.getIsTabInFocus();return!(t||!this.floatingModule||!this.floatingModule.isInFloating||!i)||t}Cs(){var t,e,s;const n=this.$playerContainer.clientWidth,r=this.$playerContainer.clientHeight,h=this.rd?g.zc.Fullscreen:g.zc.Normal;null===(t=this.adHandler)||void 0===t||t.resizeAd(n,r,h,this.Ns);try{null===(e=this.Kd)||void 0===e||e.onResize(n,r)}catch(t){(0,i.n)({message:"BaseExperience_onResize_player",callStack:t.stack,exception:t.message,level:i.D.WARN})}null===(s=this.adHandler)||void 0===s||s.setPlayerOrientation(this.xp(n,r)),this.breakPointsHandler.updateWidth(n),this.app.services.TrackingService.updatePlayerDimensions(n,r),setTimeout((()=>{this.mediator.publish(this,k.Km.SizeChanged,{payload:{width:n,height:r}}),this.Sp()}))}isBelowSmBreakpoint(t){return ti?at.Landscape:at.None}Sp(){this.rd||this.Ud()}_p(){this.app.services.ResizeObserver.on(this.$playerContainer,(()=>{this.Cs()}))}Ap(){var t;this.rd=!0,this.app.services.InteractionService.disableScrollEvent(),this.Nd(),null===(t=this.adHandler)||void 0===t||t.setVastViewMode(g.zc.Fullscreen)}Pp(){var t;this.rd=!1,this.app.services.InteractionService.enableScrollEvent(),this.Hd(),null===(t=this.adHandler)||void 0===t||t.setVastViewMode(g.zc.Normal)}kp(){const t=``,i=this.app.services.GlobalDomUtilsService.createElementByString(t);return this.Cp(i),i}Cp(t){(0,m.T7)(t,{"padding-bottom":`${this.Mp()}%`})}Mp(){return this.vp.playerSize.ratioHeight/this.vp.playerSize.ratioWidth*100}Ep(){this.dd.push(this.floatingModule.onFloatingEnterStart.subscribe((()=>{this.mediator.publish(this,k.Zr.PlayerFloatChanged,{payload:v.Float}),this.mediator.publish(this,k.Zr.FloatingEnterStart,{payload:!0})})),this.floatingModule.onFloatingExitStart.subscribe((()=>{this.mediator.publish(this,k.Zr.FloatingExitStart,{payload:!0})})),this.floatingModule.onFloatingExitStop.subscribe((()=>{this.mediator.publish(this,k.Zr.PlayerFloatChanged,{payload:v.Embed}),this.mediator.publish(this,k.Zr.FloatingExitStop,{payload:!0})})),this.floatingModule.onFloatingEnterStop.subscribe((()=>{this.mediator.publish(this,k.Zr.FloatingEnterStop,{payload:!0}),this.gu(!0)})))}Lp(){this.floatingModule=new S(this.app.services.ViewabilityService,this.app.services.ResizeObserver,this.$playerContainer,this.vp.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService,this.Op),this.Ep(),this.floatingModule.start()}Rp(){this.alwaysFloatingModule=new I(this.app.services.ResizeObserver,this.$experienceContainer,this.vp.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService),this.dd.push(this.alwaysFloatingModule.onFloatingEnterStop.subscribe((()=>{this.app.services.ViewabilityService.triggerRecheck(this.$playerContainer)}))),this.alwaysFloatingModule.start()}setNewVolume(t){var i;null===(i=this.adHandler)||void 0===i||i.setLinearVolume(t)}Dp(){var t;this.jp(),null===(t=this.adHandler)||void 0===t||t.onLinearExperienceEvent.subscribe((t=>{var i;t.type===o.Uh.UserInteraction&&(null===(i=t.payload)||void 0===i?void 0:i.volume)&&this.Fp()}))}$p(t){this.subscribe(o.Uh.UserInteraction,t,(({payload:{volume:t}})=>{t&&this.Fp()}))}ws(t){this.mediator.publish(this,k.Km.VolumeChanged,{payload:t}),this.app.services.EventsStorageService.emitVolumeChange(t)}_d(t){this.getVolume()!==t&&this.setNewVolume(t)}jp(){this.Xu=!0,this.$playerContainer.addEventListener("mouseover",this.Sd),this.$playerContainer.addEventListener("mouseout",this.Pd)}Fp(){this.Xu&&(this.Xu=!1,this.$playerContainer.removeEventListener("mouseover",this.Sd),this.$playerContainer.removeEventListener("mouseout",this.Pd))}Vp(){this.breakPointsHandler=new T(this.$playerContainer,this.app.config.device,this.Np,this.zp),this.breakPointsHandler.updateWidth(this.$playerContainer.clientWidth)}qp(){var t;if(this.vp.isCloseButton){switch(this.ki.push(null===(t=this.adHandler)||void 0===t?void 0:t.onLinearUiComponentEvent.subscribe((t=>{t.type===w.Close&&this.handleClose()}))),this.vp.closeButtonMode){case s.ProtoPlayerCloseButtonMode.AlwaysOn:(0,m.cn)(this.$playerContainer,c.s6.CloseOn);break;case s.ProtoPlayerCloseButtonMode.Off:(0,m.cn)(this.$playerContainer,c.s6.CloseOff);break;case s.ProtoPlayerCloseButtonMode.OnHover:(0,m.cn)(this.$playerContainer,c.s6.CloseHover)}switch(this.vp.floatingSettings.floatingCloseButtonMode){case s.ProtoPlayerCloseButtonMode.AlwaysOn:(0,m.cn)(this.$playerContainer,c.s6.CloseFloatOn);break;case s.ProtoPlayerCloseButtonMode.Off:(0,m.cn)(this.$playerContainer,c.s6.CloseFloatOff);break;case s.ProtoPlayerCloseButtonMode.OnHover:(0,m.cn)(this.$playerContainer,c.s6.CloseFloatHover)}}}up(t){const{skipOffset:i}=t;return{isAutoPlay:this.vp.playbackMode===s.ProtoPlayerPlaybackModeEnum.Autoplay,skipOffset:i,isSkippable:(0,P.kE)(i)}}Wp(){this.od=!0,this.app.services.TrackingService.setContentStart(),this.gd()}wd(){const{clientWidth:t,clientHeight:i}=this.$experienceContainer;return!(0,lt.ON)({width:t,height:i})&&!this.isBelowSmBreakpoint(t)||((0,m.cn)(this.$experienceContainer,c.Gj.NoHeight),this.Gp())}Gp(){return vt.includes(this.app.config.bundleID)}Jp(t){try{const{display:i,width:e,height:s,flex:n,maxWidth:r,minWidth:h}=this.app.services.GlobalDomUtilsService.getComputedStyle(t),{width:o,height:a}=t.getBoundingClientRect(),c={display:i,compWidth:e,boundWidth:o,compHeight:s,boundHeight:a,flex:n,maxWidth:r,minWidth:h};return{type:t.nodeName,styles:JSON.stringify(c)}}catch(t){return{err:"BaseExperience_getElementInfo_error"}}}Qp(){if(!(0,ut.Vm)([95,5]))return;const t={parent:this.Jp(this.$experienceContainer.parentElement),main:this.Jp(this.$experienceContainer)};(0,i.n)({message:"BaseExperience_invalid_dimensions",level:i.D.INFO,exception:JSON.stringify(t)})}Xp(){this.Yd=new ot(this.vp.adBreaks)}dl(t,i,e,s){this.vp=t,this.app=i,this.$experienceContainer=e,s&&s(),this.Cd(),this.app.services.ViewabilityService.setViewableThreshold(this.Qu),this.generateHTML(),this.Xp(),this.app.services.ResizeObserver.on(this.$experienceContainer,this.bd),this.wd()?this.mediator.publish(this,o.Uh.CanStart):this.Qp()}start(){return ft(this,void 0,void 0,(function*(){this.Yu=!0,this.app.services.TrackingService.updatePlayerDimensions(this.$playerContainer.clientWidth,this.$playerContainer.clientHeight),(0,m.cn)(this.$experienceContainer,c.sN.MainContainerFlex),this.mediator.publish(this,o.Xh.SessionRendered),this.Vp(),this._p(),this.vp.floatingSettings.floatingMode===s.ProtoPlayerFloatingMode.Always?this.Rp():(this.Ud(),this.Lp()),this.vp.lineItemSettings.lineItems.length>0&&!this.vp.disableAdvertising&&!u._.isBannerBlocked&&(this.app.config.isOVPDomain?this.ki.push(u._.onAdBlockerDetected().subscribe((t=>{t||this.sp()}))):this.sp()),this.app.config.isMobile||this.vp.soundMode!==s.ProtoPlayerSoundMode.Hover||this.Dp(),this.vp.isCloseButton&&this.qp(),this.vp.displayAdCountdown&&(0,m.cn)(this.$playerContainer,c.s6.AdShowCountdown);try{this.mp()}catch(t){(0,i.n)({message:"BaseExperience_initAdsController",exception:t.message,callStack:t.stack,level:i.D.INFO})}u._.isBannerBlocked||u._.detectUsingScript().then((t=>{t&&(this.app.services.TrackingService.trackSessionAdBlocker(s.ProtoAdBlockDetectionTypeEnum.Network),this.Kd.disableAdvertising())}))}))}play(){var t;null===(t=this.adHandler)||void 0===t||t.play()}pause(){var t;null===(t=this.adHandler)||void 0===t||t.pause()}setVolume(t){this.setNewVolume(t),this.Fp()}getSize(){return{width:this.$experienceContainer.clientWidth,height:this.$experienceContainer.clientHeight}}setSize(t,i){(0,lt.ON)({width:t,height:i})||(0,m.T7)(this.$experienceContainer,{width:`${t}px`,height:`${i}px`})}setCustomMacros(t){this.app.services.MacrosService.addExtraMacros(t)}isViewable(){return this.app.services.ViewabilityService.check({element:this.$playerContainer,threshold:this.Wu})}setViewableThreshold(t){this.app?this.app.services.ViewabilityService.setViewableThreshold(t):this.Qu=t}setAmpUserConsent(t){this.app.services.UserManagerService.setAmpUserConsent(t)}triggerDestroy(){this.app.services.EventsStorageService.destroy(),this.mediator.publish(this,o.Uh.Destroy)}disableAdvertising(){this.Kd.disableAdvertising()}enableAdvertising(){this.Kd.enableAdvertising()}enableFloatingMode(){var t;null===(t=this.floatingModule)||void 0===t||t.enableFloatingMode()}disableFloatingMode(){var t;null===(t=this.floatingModule)||void 0===t||t.disableFloatingMode()}isFloatingModeEnabled(){return!this.floatingModule||this.floatingModule.isFloatingModeEnabled()}setFloatingSettings(t){this.floatingModule?this.floatingModule.setFloatingSettings(t):this.alwaysFloatingModule.setFloatingSettings(t)}destroy(){(0,pt.i)(this.ki),this.adHandler&&((0,pt.i)(this.pd),this.op.unsubscribe(),this.adHandler.destroy()),this.Kd&&this.Kd.destroy(),this.floatingModule&&(this.floatingModule.destroy(),this.floatingModule=null,(0,pt.i)(this.dd))}}var yt,bt,wt=n(7953);!function(t){t[t.Unknown=0]="Unknown",t[t.TimeoutBetweenAds=1]="TimeoutBetweenAds",t[t.InImpression=2]="InImpression",t[t.LinearDemandMissing=3]="LinearDemandMissing"}(yt||(yt={}));class xt extends h._{constructor(t,i,e,s,n,r,h,o){super(),this.mediator=t,this.Re=i,this.Yp=e,this.Zp=s,this.tf=n,this.if=r,this.qu=h,this.ef=o,this.sf=g.zc.Normal,this.nf=[],this.rf=new x.x,this.hf=new x.x,this.af=new x.x,this.cf=new x.x,this.lf=new x.x,this.uf=new x.x,this.df=new x.x,this.pf=new x.x,this.ff=new x.x,this.vf=new x.x,this.gf=new x.x,this.yf=this.bf(),this.wf(),this.xf=this.Sf(),this.Af(),this.Pf=this.kf(),this.Pf&&this.If()}Tf(t,i){const e=[{container:this.Cf,width:t,height:i,type:wt.ProtoAdType.Overlay},{container:this.Cf,width:t,height:i,type:wt.ProtoAdType.Video},{container:this.Mf,width:t,height:i,type:wt.ProtoAdType.Nonlinear}];return this.Mf||e.pop(),e}wf(){this.nf.push(this.yf.onAdsEnable.subscribe((t=>{this.rf.next(t)})))}If(){var t,i,e;this.nf.push(null===(t=this.Pf)||void 0===t?void 0:t.onVpaidEvent.subscribe((t=>{this.hf.next(t)})),null===(i=this.Pf)||void 0===i?void 0:i.onNonLinearEvent.subscribe((t=>{this.pf.next(t)})),null===(e=this.Pf)||void 0===e?void 0:e.onExperienceEvent.subscribe((t=>{this.ff.next({type:t.type,payload:t.payload})})),this.yf.onNonlinearImpressionPrice.subscribe((t=>{this.vf.next(t)})),this.yf.onNonlinearImpressionRevenue.subscribe((t=>{this.gf.next(t)})))}Af(){this.nf.push(this.xf.onVpaidEvent.subscribe((t=>{this.hf.next(t)})),this.xf.onUiComponentEvent.subscribe((t=>{this.cf.next(t)})),this.xf.onExperienceEvent.subscribe((t=>{this.lf.next({type:t.type,payload:t.payload})})),this.xf.onLinearEvent.subscribe((t=>{t.type===_.ShowLinearEvent&&this.nonLinearInImpression&&this.Pf.pause(this.linearInImpression),this.af.next(t)})),this.yf.onLinearImpressionPrice.subscribe((t=>{this.uf.next(t)})),this.yf.onLinearImpressionRevenue.subscribe((t=>{this.df.next(t)})))}Ef(t,i,e){this.yf.initAd(t,i,this.sf,1,e,this.Tf(t,i),this.if)}adStateChange(t,i){var e;this.xf.adStateChange(t,i),null===(e=this.Pf)||void 0===e||e.adStateChange(t,i)}contentPlaybackStateChanged(t){var i;null===(i=this.Pf)||void 0===i||i.contentPlaybackStateChanged(t)}disableAds(t,i){this.yf.disableAds(t,i)}enableAds(t){this.yf.enableAds(t)}start(t,i,e,s=!1,n=!1){n&&this.startNonLinear(),this.startLinear(e,s),this.Ef(t,i,e)}stopAd(t){var i;this.xf.stopAd(t),null===(i=this.Pf)||void 0===i||i.stopAd(t)}play(){this.xf.play()}pause(){var t;this.xf.pause(),this.linearInImpression||null===(t=this.Pf)||void 0===t||t.pause()}resumeWithoutUserInteraction(t){var i;this.xf.resumeWithoutUserInteraction(),null===(i=this.Pf)||void 0===i||i.resumeWithoutUserInteraction(t)}resizeAd(t,i,e,s){var n;this.setVastViewMode(e),this.xf.resizeAd(t,i),null===(n=this.Pf)||void 0===n||n.resizeAd(t,i,s)}setPlayerOrientation(t){this.yf.setPlayerOrientation(t)}setVastViewMode(t){this.sf=t,this.yf.setVastViewMode(t)}contentChanged(){this.yf.onContentChange()}newLinearAdOpportunity(){this.yf.newLinearAdOpportunity()}destroy(){var t,i,e;(0,pt.i)(this.nf),this.xf.destroy(),null===(t=this.Pf)||void 0===t||t.destroy(),null===(i=this.yf)||void 0===i||i.disableAds(ct.LINEAR,{disableReason:yt.Unknown}),null===(e=this.yf)||void 0===e||e.disableAds(ct.NONLINEAR,{disableReason:yt.Unknown}),this.yf.destroy()}get onAdsEnable(){return this.rf.asObservable()}get onVpaidEvent(){return this.hf.asObservable()}startNonLinear(){var t;null===(t=this.Pf)||void 0===t||t.start()}contentEnded(){var t;this.nonLinearInImpression&&(null===(t=this.Pf)||void 0===t||t.pause())}get onNonLinearEvent(){return this.pf.asObservable()}get onNonLinearExperienceEvent(){return this.ff.asObservable()}get onNonLinearImpressionPrice(){return this.vf.asObservable()}get onNonLinearImpressionRevenue(){return this.gf.asObservable()}get nonLinearInImpression(){return!!this.Pf&&this.Pf.inImpression}get Mf(){var t;return null===(t=this.Pf)||void 0===t?void 0:t.adContainer}startLinear(t,i=!1){this.xf.start(t,i)}setMediaRestrictions(t){this.yf.setMediaRestrictions(t)}getLinearVolume(){return this.xf.getVolume()}setLinearVolume(t){this.xf.setVolume(t)}hideLinear(){this.xf.hide()}showLinear(){this.xf.show()}updateContinueReadingCard(){this.xf.updateContinueReadingCard()}setContinueReadingCard(t){this.xf.setContinueReadingCard(t)}hideContinueReadingCard(){this.xf.hideContinueReadingCard()}setAdMarkerTitle(t){this.xf.setAdMarkerTitle(t)}hideAdMarkerTitle(){this.xf.hideAdMarkerTitle()}enterAdPodLoadingState(){this.xf.enterAdPodLoadingState()}setAdLoadingBackgroundUrl(t){this.xf.setAdLoadingBackgroundUrl(t)}updateLinearPodRemainingTime(t){this.yf.updateLinearPodRemainingTime(t)}get onLinearEvent(){return this.af.asObservable()}get onLinearUiComponentEvent(){return this.cf.asObservable()}get onLinearExperienceEvent(){return this.lf.asObservable()}get onLinearImpressionPrice(){return this.uf.asObservable()}get onLinearImpressionRevenue(){return this.df.asObservable()}get linearInImpression(){return this.xf.inImpression}get Cf(){return this.xf.adContainer}get Lf(){return this.xf.secondaryAdContainer}get linearAdUserInterface(){return this.xf.adUserInterface}get onFullcreenChange(){return this.xf.onFullcreenChange}get linearAdInWin(){return this.xf.adInWin}get firstLinearAdShown(){return this.xf.firstAdShown}get inAdPodLoadingState(){return this.xf.inAdPodLoadingState}getLinearAdContainerWidth(){return this.xf.getMainAdContainerWidth()}userInteraction(t){this.yf.userInteraction(t)}}class St{constructor(){this.Rf=(0,ut.qs)()}get id(){return this.Rf}}!function(t){t[t.NoPrefetch=0]="NoPrefetch",t[t.StartSessionPrefetch=1]="StartSessionPrefetch",t[t.MidSessionPrefetch=2]="MidSessionPrefetch"}(bt||(bt={}));function _t(t){return 2*(t+41)}function At(t){return t/2-41}class Pt{constructor(){this.Bf=Date.now(),this.Df={advertiser:{}}}addPrebid(t){(0,P.$K)(this.Df.advertiser[t])||this.jf(t),this.Df.advertiser[t].prebidData.push({timestamp:Date.now()})}addBid(t,i){(0,P.$K)(this.Df.advertiser[t])||this.jf(t),this.Df.advertiser[t].bidsFloorPriceList.push({timestamp:Date.now(),floorPrice:i})}addImpression(t,i){(0,P.$K)(this.Df.advertiser[t])||this.jf(t),this.Df.advertiser[t].impressionRevenueList.push({timestamp:Date.now(),obfuscatedPrice:i})}shouldRequestLineItem(t){const i=Date.now();return!(this.Ff(i,3)&&this.$f(t,i,5)<-.5&&this.Vf(t,i,3)>=11.5&&this.Uf(t,i,10,.1)<.35)}Ff(t,i){return t-this.Bf>=i*ht.uD}$f(t,i,e){const s=this.Df.advertiser[t];if(!(0,P.$K)(s))return-1;const n=this.Nf(s.impressionRevenueList,i,e).map((t=>t.obfuscatedPrice));let r=0;return(0,a.BZ)(n)&&(r=n.reduce(((t,i)=>t+_t(i)))),this.Hf(r)}Vf(t,i,e){const s=this.Df.advertiser[t];if(!(0,P.$K)(s))return-1;const n=this.Nf(s.prebidData,i,e).length;return this.Hf(n)}Uf(t,i,e,s){const n=this.Df.advertiser[t];if(!(0,P.$K)(n))return-1;const r=this.Nf(n.impressionRevenueList,i,e).map((t=>t.floorPrice)),h=this.zf(r,s);return this.Hf(h)}Nf(t,i,e){const s=i-ht.s_,n=i-e*ht.uD,r=[];for(let i=t.length-1;i>=0&&t[i].timestamp>=n;i--)t[i].timestamp<=s&&r.push(t[i]);return r}Hf(t){return 0===t?-1:t}jf(t){this.Df.advertiser[t]={prebidData:[],bidsFloorPriceList:[],impressionRevenueList:[]}}zf(t,i){if(0===t.length)return 0;if(i<=0)return t[0];if(i>=1)return t[t.length-1];const e=((t=t.sort(((t,i)=>t-i))).length-1)*i,s=Math.floor(e),n=s+1,r=e%1;return n>=t.length?t[s]:t[s]*(1-r)+t[n]*r}}class kt{constructor(){this.creativeView=[],this.start=[],this.firstQuartile=[],this.midpoint=[],this.thirdQuartile=[],this.impression=[],this.viewable_impression=[],this.complete=[],this.mute=[],this.unmute=[],this.pause=[],this.rewind=[],this.resume=[],this.fullscreen=[],this.exitFullscreen=[],this.expand=[],this.collapse=[],this.close=[],this.closeLinear=[],this.acceptInvitationLinear=[],this.acceptInvitation=[],this.skip=[],this.progress=[],this.playerExpand=[],this.playerCollapse=[],this.adExpand=[],this.adCollapse=[],this.fullScreen=[],this.canPlayThrough=[],this.stalled=[],this.waiting=[],this.otherAdInteraction=[]}}class It{constructor(t){this.clickTrackings=[],this.customClicks=[],this.errorUrls=[],this.impressions=[],this.trackingEvents=new kt,t.inLine?this.qf(t.inLine):this.Wf(t.wrapper)}qf(t){this.Gf(t.errors),this.Jf(t.impressions),this.Qf(t.creatives)}Wf(t){this.Gf(t.errors),this.Jf(t.impressions),this.Qf(t.creatives)}Yf(t){this.Kf(t.trackingEvents),this.Zf(t.videoClicks)}Zf(t){t&&(this.tv(t.clickTrackings),this.sv(t.customClicks))}tv(t){this.clickTrackings.push(...t)}sv(t){this.customClicks.push(...t)}Kf(t){t.forEach((t=>{try{this.trackingEvents[t.name].push(t.uri)}catch(e){(0,i.n)({message:"AdManager_VastResponse_tracker",exception:`${t.name}`,callStack:e.stack,level:i.D.INFO})}}))}Qf(t){t.forEach((t=>{t.linear?this.Yf(t.linear):t.nonLinear&&this.Kf(t.nonLinear.trackingEvents)}))}Gf(t){this.errorUrls.push(...t)}Jf(t){this.impressions.push(...t)}}const Tt={[s.ProtoTrackerTriggerType.Impression]:"adImpression",[s.ProtoTrackerTriggerType.Complete25Pc]:"adQuartileFirst",[s.ProtoTrackerTriggerType.Complete50Pc]:"adQuartileSecond",[s.ProtoTrackerTriggerType.Complete75Pc]:"adQuartileThird",[s.ProtoTrackerTriggerType.ViewCompletion]:"adQuartileFourth",[s.ProtoTrackerTriggerType.VideoClick]:"adClick",[s.ProtoTrackerTriggerType.Pause]:"adPause",[s.ProtoTrackerTriggerType.Resume]:"adResume",[s.ProtoTrackerTriggerType.Mute]:"adMute",[s.ProtoTrackerTriggerType.Unmute]:"adUnmute"};class Ct{constructor(){this.adError=[],this.adWin=[],this.adImpression=[],this.adViewableImpression=[],this.adStarted=[],this.adVideoStart=[],this.adQuartileFirst=[],this.adQuartileSecond=[],this.adQuartileThird=[],this.adQuartileFourth=[],this.adClick=[],this.adPause=[],this.adResume=[],this.adSkip=[],this.adMute=[],this.adUnmute=[],this.adUserClose=[],this.adUserAcceptInvitation=[],this.adUserMinimize=[]}static track(t,i,e,n){if(!Array.isArray(t))return;const{width:r,height:h}=n.adContainerState.get(e.adType),{adBreakType:o}=n.adBreakState,{mediaDescription:a,mediaDuration:c,mediaId:l,mediaUrl:u,mediaTitle:d}=n.media;t.forEach((t=>{if(t.url)try{const n=i.replace(t.url,e.vendorId,{adMacros:{adWidth:r,adHeight:h,adPostion:o},mediaMacros:{mediaDescription:a,mediaDuration:c,mediaId:l,mediaUrl:u,mediaTitle:d}});switch(t.type){case s.ProtoTrackerType.Image:(0,ut.Hh)([n],window);break;case s.ProtoTrackerType.Javascript:(0,m.dZ)({src:n},window.document.head,window)}}catch(t){}}))}}function Mt(t,i){t.forEach((t=>function(t,i){(function(t,i){return i[Tt[t]]})(t.trigger,i).push({type:t.type,url:t.url})}(t,i)))}function Et(t){return{type:s.ProtoTrackerType.Image,url:t}}function Lt(t){return t.map((t=>Et(t)))}var Ot;!function(t){t[t.HandlingSdkUrl=0]="HandlingSdkUrl",t[t.NetworkRequestUrl=1]="NetworkRequestUrl",t[t.XmlInvalidString=2]="XmlInvalidString",t[t.XmlParseGeneral=3]="XmlParseGeneral",t[t.XmlInvalidTree=4]="XmlInvalidTree",t[t.XmlInvalidAd=5]="XmlInvalidAd",t[t.XmlAdaptorWrapperLimit=6]="XmlAdaptorWrapperLimit",t[t.HTMLUnknownMimeType=7]="HTMLUnknownMimeType",t[t.ImaAdsManagerInit=8]="ImaAdsManagerInit",t[t.ImaVastEmptyResponse=9]="ImaVastEmptyResponse",t[t.ImaRequestException=10]="ImaRequestException",t[t.ImaTimeout=11]="ImaTimeout",t[t.ImaInvalidResponse=12]="ImaInvalidResponse",t[t.InvalidCreativeUrl=13]="InvalidCreativeUrl",t[t.BidIsNotTargetingAllowedEver=14]="BidIsNotTargetingAllowedEver"}(Ot||(Ot={}));const Rt={[Ot.HandlingSdkUrl]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.NetworkRequestUrl]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.XmlInvalidString]:s.ConnatixNoBidReasonEnum.CsEmptyResponse,[Ot.XmlParseGeneral]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.XmlInvalidTree]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.XmlInvalidAd]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.XmlAdaptorWrapperLimit]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.HTMLUnknownMimeType]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.ImaAdsManagerInit]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.ImaVastEmptyResponse]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.ImaRequestException]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.ImaTimeout]:s.ConnatixNoBidReasonEnum.Timeout,[Ot.ImaInvalidResponse]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.InvalidCreativeUrl]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.BidIsNotTargetingAllowedEver]:s.ConnatixNoBidReasonEnum.BidIsNotTargetingAllowedEver};var Bt,Dt;!function(t){t.VOLUME_DETECTED="volume_detected",t.MALWARE_DETECTED="malware_detected",t.BADURI_DETECTED="baduri_detected"}(Bt||(Bt={})),function(t){t[t.None=0]="None",t[t.Mute=1]="Mute",t[t.ScrollHijack=2]="ScrollHijack",t[t.MemoryLeak=4]="MemoryLeak",t[t.Malware=8]="Malware",t[t.All=15]="All"}(Dt||(Dt={}));class jt{constructor(){this.hf=new x.x}get onVpaidEvent(){return this.hf.asObservable()}handshakeVersion(t="2.0"){return"2.0"}}var Ft=n(2157);function $t(t){switch(t.creativeType){case s.ProtoCreativeTypeEnum.Tam:case s.ProtoCreativeTypeEnum.TamDeal:case s.ProtoCreativeTypeEnum.Rtb:return _t(t.obfuscatedPrice);case s.ProtoCreativeTypeEnum.HeaderBidder:return t.cpm;default:return t.floorPrice}}var Vt,Ut,Nt;n(7417);!function(t){t.Timeout="timeout",t.TimeoutLoaded="timeout_loaded",t.ImaError="imaError",t.ImaScriptFailure="imaScriptFailure",t.ImaObjectNotFound="imaObjectNotFound",t.ImaManagerInit="imaManagerInit",t.ImaInitSdkError="initImasdkError",t.VastVideoTagEventError="vastVideoTagEventError",t.VastUnsupportedMedia="vastUnsupportedMedia",t.VastPlayPromiseReject="playPromiseReject",t.VastNonLinearImageLoadFailure="nonLinearVastImageLoadFailure",t.AdStopped="adStopped",t.MuteEnforce="muteEnforce",t.VpaidOnLoad="vpaidOnLoad",t.VpaidInvalid="vpaidInvalid",t.VpaidGetVpaidAdError="vpaidGetVpaidAdError",t.CnxMediaNoRenditions="noRenditions",t.CnxMediaSrcNotSupported="srcNotSupported",t.InvalidVpaidEvent="invalidVpaidEvent",t.AdxOverlayNoFill="adxOverlayNoFill",t.AdxOverlayGptScriptLoad="adxOverlayGptScriptLoad",t.DisplayIntegratorIframeLoad="displayIntegratorIframeLoad",t.EnforcementMalware="malwareDetected",t.EnforcementVolume="volumeDetected",t.Cancelled="adManagerRemoved",t.DomainBlocked="domainBlocked",t.AdaptorStartAdError="adaptorStartAdError",t.AdaptorInitAdError="adaptorInitAdError",t.WrapperStartAdError="wrapperStartAdError",t.WrapperInitAdError="wrapperInitAdError"}(Vt||(Vt={})),function(t){t[t.Win=0]="Win",t[t.AdLoaded=1]="AdLoaded",t[t.AdStarted=2]="AdStarted",t[t.AdImpression=3]="AdImpression"}(Ut||(Ut={}));class Ht{constructor(t){this.nv=t,this.rv=new Map,(0,P.$K)(this.nv.settings.bidLifecycle)||(this.nv.settings.bidLifecycle={})}onTrackingLifecycleEvent(t){switch(this.rv.set(t,Date.now()),t){case Ut.AdLoaded:this.hv();break;case Ut.AdImpression:this.ov()}}hv(){this.nv.settings.bidLifecycle.winToAdLoadedTime=this.av}ov(){this.nv.settings.bidLifecycle.startAdToImpressionTime=this.lv}get lv(){return this.rv.get(Ut.AdImpression)&&this.rv.get(Ut.AdStarted)?this.rv.get(Ut.AdImpression)-this.rv.get(Ut.AdStarted):0}get av(){return this.rv.get(Ut.AdLoaded)&&this.rv.get(Ut.Win)?this.rv.get(Ut.AdLoaded)-this.rv.get(Ut.Win):0}}!function(t){t.IMPRESSION_TIMEOUT="IMPRESSION_TIMEOUT",t.VIEWABLE_IMPRESSION_TIMEOUT="VIEWABLE_IMPRESSION_TIMEOUT",t.SKIP_AD_TIMEOUT="SKIP_AD_TIMEOUT",t.STOP_AD_TIMEOUT="STOP_AD_TIMEOUT",t.AD_LOADED_TIMEOUT="AD_LOADED_TIMEOUT"}(Nt||(Nt={}));const zt="cnx-ad-bid-slot-selected",qt="Connatix Ad";class Wt extends jt{constructor(t,i){super(),this.uv=t,this.settings=i,this.dv=null,this.fv=null,this.vv=null,this.gv=null,this.mv=void 0,this.yv=!1,this.bl=!1,this.bv=!1,this.wv=!1,this.xv=null,this.nf=[],this.Sv=new x.x,this._v=()=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.Timeout}}),this.kv()},this.Iv=()=>{this.Tv(),this.Cv(Nt.VIEWABLE_IMPRESSION_TIMEOUT).clearTimeout(),this.settings.viewabilityService.off(this.dv,this.Mv)},this.Mv=t=>{const i=this.Cv(Nt.VIEWABLE_IMPRESSION_TIMEOUT);t?i.timeoutHandle.timeoutId||i.setTimeout():i.clearTimeout()},this.Ev=()=>{this.Pv({type:g.fI.AdSkipped}),this.kv()},this.Ov=()=>{this.Pv({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}}),this.kv()},this.Rv=()=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.TimeoutLoaded}}),this.kv()},this.Cv=t=>{const i=this.Bv[t];return{timeoutHandle:i,setTimeout:()=>{i.timeoutId=this.uv.setTimeout((()=>{i.callback()}),i.timeout)},clearTimeout:()=>{null!==i.timeoutId&&(this.uv.clearTimeout(i.timeoutId),i.timeoutId=null)}}},this.Dv=Date.now(),this.creativeId=this.settings.externalCreativeId,this.jv=`cnx-ad-bid-slot-id-${this.settings.requestMetadata.data.cnxBidId}`,this.Fv=`cnx-ad-slot-${this.settings.id}`;const{adType:e}=this.settings.adManagerLineItem.protoLineItem;this.Bv={[Nt.IMPRESSION_TIMEOUT]:{callback:this._v,timeout:25e3,timeoutId:null},[Nt.VIEWABLE_IMPRESSION_TIMEOUT]:{callback:this.Iv,timeout:Ft.xs[e],timeoutId:null},[Nt.SKIP_AD_TIMEOUT]:{callback:this.Ev,timeout:500,timeoutId:null},[Nt.STOP_AD_TIMEOUT]:{callback:this.Ov,timeout:500,timeoutId:null},[Nt.AD_LOADED_TIMEOUT]:{callback:this.Rv,timeout:25e3,timeoutId:null}},this.qu=i.urlSuffixerService}get createdTimestamp(){return this.Dv}getPrice(){const{advertiserLineItemId:t,creativeType:i,floorPrice:e,lineItemPriority:s}=this.settings.adManagerLineItem.protoLineItem;return $t({lineItemId:t,bidId:this.settings.id,creativeType:i,floorPrice:e,obfuscatedPrice:this.settings.obfuscatedPrice,successRate:this.settings.successRate,priority:s,cpm:this.settings.cpm})}skipAd(){this.Cv(Nt.SKIP_AD_TIMEOUT).setTimeout()}stopAd(t){this.Cv(Nt.STOP_AD_TIMEOUT).setTimeout()}startAd(){this.wv&&(0,i.n)({message:"AdManager_ABaseBidAdaptor_samebid",exception:"startAd",callStack:`adv:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId} bidid: ${this.Fv}`,level:i.D.CRITICAL}),this.wv=!0,this.Cv(Nt.IMPRESSION_TIMEOUT).setTimeout()}initAd(t,e,s,n,r,h,o){this.bv&&(0,i.n)({message:"AdManager_ABaseBidAdaptor_samebid",exception:"initAd",callStack:`adv:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId} bidid: ${this.Fv}`,level:i.D.CRITICAL}),this.bv=!0,this.Cv(Nt.AD_LOADED_TIMEOUT).setTimeout(),this.$v(o),this.Vv=new Ht(this),this.Vv.onTrackingLifecycleEvent(Ut.Win)}setAdVolume(t){this.fv.volume=t,(0,m.Q1)(this.fv,t),t<=0?this.settings.adEnforcer.start(Dt.Mute):this.settings.adEnforcer.stop(Dt.Mute)}get impressionStarted(){return this.yv}get creativeId(){return this.mv}set creativeId(t){(0,P.QM)(this.creativeId)||(this.mv=t)}get onAdViewableImpression(){return this.Sv.asObservable()}Uv(t){let i;(0,P.kE)(t.payload.skipOffset)&&(i=t.payload.skipOffset);const e={type:g.fI.AdLoaded,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adLoadedData:{skipOffset:i},adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode}};return this.settings.adLoadedPayload=e,e}Nv(t){return{type:g.fI.AdImpression,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode,adSourceData:{moatTrackingEnabled:this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled,creativeId:this.settings.adManagerLineItem.protoLineItem.cnxCreativeId,adId:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,length:this.getAdDuration(),adVideoUrl:this.adVideoUrl,name:qt,skipOffset:this.settings.adLoadedPayload.payload.adLoadedData.skipOffset},customAdData:{ADVERTISER:this.settings.requestMetadata.data.rtbAdomain,CREATIVE_ID:this.creativeId,CAMPAIGN_ID:this.settings.requestMetadata.data.rtbCampainId}}}}Hv(t){return{type:g.fI.AdVideoStart,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode,adSourceData:{moatTrackingEnabled:this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled,creativeId:this.settings.adManagerLineItem.protoLineItem.cnxCreativeId,adId:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,length:this.getAdDuration(),name:qt},customAdData:{ADVERTISER:this.settings.requestMetadata.data.rtbAdomain,CREATIVE_ID:this.creativeId,CAMPAIGN_ID:this.settings.requestMetadata.data.rtbCampainId}}}}Pv(t){if(t.payload||(t.payload={}),t.payload.adType=this.settings.adManagerLineItem.protoLineItem.adType,this.zv(t))switch(t.type){case g.fI.AdLoaded:0,this.Vv.onTrackingLifecycleEvent(Ut.AdLoaded),this.Cv(Nt.AD_LOADED_TIMEOUT).clearTimeout(),this.hf.next(this.Uv(t));break;case g.fI.AdImpression:this.Vv.onTrackingLifecycleEvent(Ut.AdImpression),this.Cv(Nt.IMPRESSION_TIMEOUT).clearTimeout(),this.qv(),(0,m.cn)(this.vv,zt),this.hf.next(this.Nv(t)),this.yv=!0;break;case g.fI.AdVideoStart:this.Vv.onTrackingLifecycleEvent(Ut.AdStarted),this.hf.next(this.Hv(t));break;case g.fI.AdStopped:case g.fI.AdSkipped:case g.fI.AdError:this.bl&&(0,i.n)({message:"AdManager_ABaseBidAdaptor_double_destroy",exception:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,level:i.D.WARN}),this.hu(),this.hf.next(t);break;default:this.hf.next(t)}else this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.InvalidVpaidEvent}})}$v(t){this.gv=this.Wv(),this.vv=this.gv.slotsContainer,(0,m.cn)(this.vv,this.jv),this.dv=this.gv.adSlot,this.dv.id=this.Fv,this.vv.id=this.settings.bidSlotId,this.fv=this.gv.videoSlot,this.fv.volume=t,(0,m.Q1)(this.fv,t),this.settings.adEnforcer.registerContainer(this.vv,this.Fv),this.nf.push(this.settings.adEnforcer.onEnforcerEvent.subscribe((t=>{this.Gv(t)}))),this.settings.adEnforcer.start(Dt.All)}Wv(){return this.settings.adSlotContainerRecycler.requestAdSlot(this.settings.adContainer)}hu(){this.bl=!0,(0,m.IV)(this.vv,zt),(0,m.IV)(this.vv,this.jv),this.dv.removeAttribute("id"),this.vv.removeAttribute("id"),(0,pt.i)(this.nf),this.kv(),this.settings.adEnforcer.deregisterContainer(this.vv),this.settings.viewabilityService.off(this.dv,this.Mv),null!==this.xv&&this.uv.clearTimeout(this.xv),this.Jv()}Jv(){this.xv=this.uv.setTimeout((()=>{this.settings.adSlotContainerRecycler.destroyAdSlot(this.gv)}),500)}Tv(){const{advertiserLineItemId:t,publisherLineItemId:i}=this.settings.adManagerLineItem.protoLineItem;this.Sv.next({advertiserLineItemId:t,publisherLineItemId:i,rtbSeatId:this.settings.requestMetadata.data.rtbSeatId,dspId:this.settings.requestMetadata.data.dspId})}qv(){const t=Ft.fJ,i=this.dv;this.settings.viewabilityService.on(i,this.Mv,{threshold:t}),this.Mv(this.settings.viewabilityService.check({threshold:t,element:i}))}kv(){Object.keys(this.Bv).forEach((t=>{this.Cv(t).clearTimeout()}))}zv(t){return!(!this.yv&&(t.type===g.fI.AdStopped||t.type===g.fI.AdSkipped))}Gv(t){if(t.detectedContainer!==this.vv)return;let e;switch(t.type){case Bt.BADURI_DETECTED:e="AdManager_enforcer_BadUri";break;case Bt.MALWARE_DETECTED:e="AdManager_enforcer_malware",this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.EnforcementMalware}});break;case Bt.VOLUME_DETECTED:e="AdManager_enforcer_soundBlock",this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.EnforcementVolume}})}(0,i.n)({message:e,exception:t.message,level:i.D.WARN})}Qv(t,e,s){const n=this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,r=this.creativeId;(0,i.n)({message:`AdManager_${t}_${e}`,exception:`advertiserLineItemId:${n}_creativeId:${r}_errorMessage:${null==s?void 0:s.message}`,callStack:null==s?void 0:s.stack,level:i.D.WARN},{throttle:5})}}var Gt;!function(t){t.BANNED_IMA_ADS_ID=["9026814","9053547"],t.KEYWORDS_FOR_BANNED_VAST=["nrb-v.ybp.yahoo.comvasterror","pr.ybp.yahoo.com/vasterror","//s.yimg.com/ff/vista.js"]}(Gt||(Gt={}));var Jt=n(3640);class Qt extends jt{constructor(t,i,e,s,n,r,h){super(),this.Xv=t,this.Zt=i,this.Yv=e,this.Kv=s,this.Zv=n,this.tg=r,this.ig=h,this.eg=new x.x,this.sg=t=>{if(!this.ng(t))return;let i="";try{i=t.getError().getMessage()+"_"+t.getError().getErrorCode()+"_"+t.getError().getVastErrorCode()}catch(t){}this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.ImaError+"_"+i}})},this.rg=t=>{const i=this.Xv.AdEvent.Type;switch(t.type){case i.CLICK:this.hf.next({type:g.fI.AdClickThru,payload:{}});break;case i.LOADED:this.Is(t);break;case i.IMPRESSION:const e={adsManager:this.Zv,adContainer:this.hg,viewMode:this.ag(this.cg),adTag:this.Kv};this.hf.next({type:g.fI.AdVideoStart}),this.hf.next({type:g.fI.AdImpression,payload:{imaMetadata:e}});break;case i.STARTED:this.hf.next({type:g.fI.AdStarted});break;case i.FIRST_QUARTILE:this.hf.next({type:g.fI.AdVideoFirstQuartile});break;case i.MIDPOINT:this.hf.next({type:g.fI.AdVideoMidpoint});break;case i.THIRD_QUARTILE:this.hf.next({type:g.fI.AdVideoThirdQuartile});break;case i.COMPLETE:this.hf.next({type:g.fI.AdVideoComplete}),this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}});break;case i.ALL_ADS_COMPLETED:break;case i.DURATION_CHANGE:this.hf.next({type:g.fI.AdDurationChange});break;case i.PAUSED:this.hf.next({type:g.fI.AdPaused});break;case i.RESUMED:this.hf.next({type:g.fI.AdPlaying});break;case i.LINEAR_CHANGED:this.hf.next({type:g.fI.AdLinearChange});break;case i.SKIPPABLE_STATE_CHANGED:this.hf.next({type:g.fI.AdSkippableStateChange});break;case i.SKIPPED:this.hf.next({type:g.fI.AdSkipped});break;case i.VOLUME_CHANGED:this.hf.next({type:g.fI.AdVolumeChange});break;case i.USER_CLOSE:this.hf.next({type:g.fI.AdUserClose});break;case i.LOG:this.hf.next({type:g.fI.AdLog})}},this.ug()}get onCreativeReceived(){return this.eg.asObservable()}initAd(t,i,e,s,n,r){this.hg=r.slot,this.dg=r.videoSlot,this.cg=e||g.zc.Normal;try{this.Zv.setVolume(0),this.Zv.init(t,i,this.ag(this.cg))}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.ImaManagerInit}})}}startAd(){try{this.Zv.start()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.WrapperStartAdError+`_${t.message}`}})}}stopAd(t){this.Zv.stop(),this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}resizeAd(t,i,e){this.Zv.resize(t,i,this.ag(e))}pauseAd(){this.Zv.pause()}resumeAd(){this.Zv.resume(),this.Zt===dt.M.Ios&&(0,m.UR)(this.dg)}expandAd(){this.Zv.expand()}collapseAd(){this.Zv.collapse()}skipAd(){this.Zv.skip()}getAdRemainingTime(){return this.Zv.getRemainingTime()||0}getAdDuration(){return this.pg?this.pg.getDuration():0}getAdVolume(){return this.Zv.getVolume()}getAdMediaWidth(){return this.pg?this.pg.getVastMediaWidth():0}getAdMediaHeight(){return this.pg?this.pg.getVastMediaHeight():0}setAdVolume(t){this.Zv.setVolume(t)}getMediaFile(){return this.pg?this.pg.getMediaUrl():void 0}ug(){this.Yv.addEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),this.Zv.addEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),Object.keys(this.Xv.AdEvent.Type).forEach((t=>{this.Zv.addEventListener(this.Xv.AdEvent.Type[t],this.rg,!1)}))}fg(){this.Yv.removeEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),this.Zv.removeEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),Object.keys(this.Xv.AdEvent.Type).forEach((t=>{this.Zv.removeEventListener(this.Xv.AdEvent.Type[t],this.rg,!1)}))}ag(t){return t===g.zc.Fullscreen?this.Xv.ViewMode.FULLSCREEN:this.Xv.ViewMode.NORMAL}vg(t){return Gt.BANNED_IMA_ADS_ID.some((i=>i===t))}ng(t){const i=t.getUserRequestContext();return!i||i.id===this.tg.id}Is(t){if(this.pg=t.getAd(),this.vg(this.pg.getAdId()))return void this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VpaidInvalid}});this.eg.next(this.pg.getCreativeId());let i=-1,e="";try{i=this.pg.getSkipTimeOffset();const s=t.getAdData().clickThroughUrl;e=(0,P.QM)(s)?s:void 0}catch(t){}(0,Jt.A)(this.ig,e).then((t=>{t?this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.DomainBlocked}}):this.hf.next({type:g.fI.AdLoaded,payload:{skipOffset:i}})}))}destroy(){try{this.fg(),setTimeout((()=>{this.Zv.destroy()}))}catch(t){}}}const Xt={ImaObjectNotFound:Vt.ImaObjectNotFound,ImaScriptFailure:Vt.ImaScriptFailure},Yt="//imasdk.googleapis.com/js/sdkloader/ima3.js";class Kt{static preloadImaSdk(t){(0,m._w)(Yt,t)}static fetchImaSdk(t,e){return new Promise(((s,n)=>{const r=Kt.gg(t);if(r)return void s(r);const h=e&&1===(0,ut.Vm)([95,5]);(0,m.dZ)({src:Yt},t.document.head,t,(()=>{const e=Kt.gg(t);e?s(e):(h&&(0,i.n)({message:"AdManager_ImaIntegrator_no_image_object_found_after_loading_script",level:i.D.CRITICAL},{throttle:2,sendMaxLog:!1}),n(Xt.ImaObjectNotFound))}),(()=>{n(Xt.ImaScriptFailure)}),h,"AdManager_ImaIntegrator_unable_to_insert_ima_sdk_script")}))}static gg(t){return t.google&&t.google.ima}}class Zt extends Wt{constructor(t,i){super(t,i),this.uv=t,this.settings=i,this.gv=null,this.adMediaType="ima",this.adSourceType=s.ProtoAdsourceTypeEnum.Ima,this.mg=[],this.gv=this.settings.imaAdSlotContainer,this.yg=new Qt(this.settings.imaSdk,this.settings.os,this.settings.imaAdsLoader,this.settings.url,this.settings.imaAdsManager,this.settings.requestAdsContext,this.settings.adManagerLineItem.protoLineItem.publisherLineItemId)}initAd(t,i,e,s,n,r,h){try{super.initAd(t,i,e,s,n,r,h),this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled&&this.bg(),this.mg.push(this.yg.onVpaidEvent.subscribe((t=>{this.Pv(t)})),this.yg.onCreativeReceived.subscribe((t=>{this.creativeId=t}))),this.yg.initAd(t,i,e,s,n,{slot:this.dv,videoSlot:this.fv})}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.yg.startAd()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){try{super.stopAd(t),this.yg.stopAd(t)}catch(t){this.Qv("ImaBidAdaptor","stopAd",t)}}resizeAd(t,i,e){try{this.yg.resizeAd(t,i,e)}catch(t){this.Qv("ImaBidAdaptor","resizeAd",t)}}pauseAd(){try{this.yg.pauseAd()}catch(t){this.Qv("ImaBidAdaptor","pauseAd",t)}}resumeAd(){try{this.yg.resumeAd()}catch(t){this.Qv("ImaBidAdaptor","resumeAd",t)}}expandAd(){try{this.yg.expandAd()}catch(t){this.Qv("ImaBidAdaptor","expandAd",t)}}collapseAd(){try{this.yg.collapseAd()}catch(t){this.Qv("ImaBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.yg.skipAd()}catch(t){this.Qv("ImaBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.yg.getAdRemainingTime()}catch(t){return this.Qv("ImaBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.yg&&this.yg.getAdDuration()||this.settings.adManagerLineItem.protoLineItem.duration}catch(t){return this.Qv("ImaBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.yg.getAdVolume()}catch(t){return this.Qv("ImaBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){return{width:this.yg.getAdMediaWidth(),height:this.yg.getAdMediaHeight()}}setAdVolume(t){try{super.setAdVolume(t),this.yg.setAdVolume(t)}catch(t){this.Qv("ImaBidAdaptor","setAdVolume",t)}}get adVideoUrl(){return this.yg.getMediaFile()}get declaredDurationInSeconds(){return this.yg.getAdDuration()}Nv(t){const i=super.Nv(t);return i.payload.adSourceData.imaMetadata=t.payload.imaMetadata,i}Wv(){return this.gv}Jv(){this.settings.adSlotContainerRecycler.recycleAdSlot(this.gv)}bg(){Kt.fetchImaSdk(this.settings.globalDomUtilsService.getGlobalClosestTop().topFrame,!1)}hu(){try{super.hu(),(0,pt.i)(this.mg),this.yg.destroy()}catch(t){this.Qv("ImaBidAdaptor","_destroy",t)}}}class ti{constructor(t,i,e,s,n,r,h){this.Xv=t,this.Yv=i,this.Tu=e,this.Cu=s,this.Kv=n,this.dg=r,this.Ue=h,this.wg=new x.x,this.xg=new x.x,this.Sg={id:(0,ut.qs)()},this.Zv=null,this.sg=t=>{if(!this.ng(t))return;switch(t.getError().getErrorCode()){case this.Xv.AdError.ErrorCode.VAST_EMPTY_RESPONSE:this._g(Ot.ImaVastEmptyResponse);break;case this.Xv.AdError.ErrorCode.VAST_WRAPPER_ERROR:case this.Xv.AdError.ErrorCode.VAST_MALFORMED_RESPONSE:this._g(Ot.ImaInvalidResponse);break;default:this._g(Ot.ImaRequestException)}},this.Ag=t=>{this.ng(t)&&(this.Zv=t.getAdsManager(this.dg,{loadVideoTimeout:25*ht.s_}),this.Pg(),this.wg.next({imaAdsManager:this.Zv,requestAdsContext:this.Sg}))},this.Yv.addEventListener(this.Xv.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Ag),this.Yv.addEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg)}get onSuccess(){return this.wg.asObservable()}get onError(){return this.xg.asObservable()}loadAd(){const t=new this.Xv.AdsRequest;t.adTagUrl=this.Kv,t.linearAdSlotWidth=t.nonLinearAdSlotWidth=this.Tu,t.linearAdSlotHeight=t.nonLinearAdSlotHeight=this.Cu,t.pageUrl=this.Ue,this.Yv.requestAds(t,this.Sg)}_g(t){this.xg.next(t)}Pg(){this.Yv.removeEventListener(this.Xv.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Ag),this.Yv.removeEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg)}ng(t){const i=t.getUserRequestContext();return!i||i.id===this.Sg.id}destroy(){var t;try{this.Pg(),null===(t=this.Zv)||void 0===t||t.destroy()}catch(t){}}}var ii;!function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"}(ii||(ii={}));const ei=ii;var si=function(t,i){return si=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])},si(t,i)};function ni(t,i){function e(){this.constructor=t}si(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}function ri(t){var i="function"==typeof Symbol&&Symbol.iterator,e=i&&t[i],s=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function hi(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var s,n,r=e.call(t),h=[];try{for(;(void 0===i||i-- >0)&&!(s=r.next()).done;)h.push(s.value)}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return h}function oi(){for(var t=[],i=0;i0},t.prototype.clear=function(){this.kg.clear()},t.prototype.ensure=function(t){this.kg.has(t)||this.kg.set(t,[])},t}();const gi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ni(i,t),i}(vi);const mi=function(){this.scopedResolutions=new Map};function yi(t,i,e){var s,n,r=hi(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1],h=function(t,i){return null===t?"at position #"+i:'"'+t.split(",")[i].trim()+'" at position #'+i}(void 0===r?null:r,i);return s="Cannot inject the dependency "+h+' of "'+t.name+'" constructor. Reason:',void 0===n&&(n=" "),oi([s],e.message.split("\n").map((function(t){return n+t}))).join("\n")}var bi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ni(i,t),i}(vi),wi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ni(i,t),i}(vi);const xi=function(){this.preResolution=new bi,this.postResolution=new wi};var Si=new Map,_i=function(){function t(t){this.parent=t,this.Tg=new gi,this.interceptors=new xi}return t.prototype.register=function(t,i,e){var s;if(void 0===e&&(e={lifecycle:ei.Transient}),s=function(t){return ai(t)||fi(t)||pi(t)||ci(t)}(i)?i:{useClass:i},pi(s))for(var n=[t],r=s;null!=r;){var h=r.useToken;if(n.includes(h))throw new Error("Token registration cycle detected! "+oi(n,[h]).join(" -> "));n.push(h);var o=this.Tg.get(h);r=o&&pi(o.provider)?o.provider:null}if((e.lifecycle===ei.Singleton||e.lifecycle==ei.ContainerScoped||e.lifecycle==ei.ResolutionScoped)&&(fi(s)||ci(s)))throw new Error('Cannot use lifecycle "'+ei[e.lifecycle]+'" with ValueProviders or FactoryProviders');return this.Tg.set(t,{provider:s,options:e}),this},t.prototype.registerType=function(t,i){return ui(i)?this.register(t,{useToken:i}):this.register(t,{useClass:i})},t.prototype.registerInstance=function(t,i){return this.register(t,{useValue:i})},t.prototype.registerSingleton=function(t,i){if(ui(t)){if(ui(i))return this.register(t,{useToken:i},{lifecycle:ei.Singleton});if(i)return this.register(t,{useClass:i},{lifecycle:ei.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var e=t;return i&&!ui(i)&&(e=i),this.register(t,{useClass:e},{lifecycle:ei.Singleton})},t.prototype.resolve=function(t,i){void 0===i&&(i=new mi);var e=this.getRegistration(t);if(!e&&ui(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"Single"),e){var s=this.resolveRegistration(e,i);return this.executePostResolutionInterceptor(t,s,"Single"),s}if(function(t){return"function"==typeof t||t instanceof li}(t)){s=this.construct(t,i);return this.executePostResolutionInterceptor(t,s,"Single"),s}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},t.prototype.executePreResolutionInterceptor=function(t,i){var e,s;if(this.interceptors.preResolution.has(t)){var n=[];try{for(var r=ri(this.interceptors.preResolution.getAll(t)),h=r.next();!h.done;h=r.next()){var o=h.value;"Once"!=o.options.frequency&&n.push(o),o.callback(t,i)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(s=r.return)&&s.call(r)}finally{if(e)throw e.error}}this.interceptors.preResolution.setAll(t,n)}},t.prototype.executePostResolutionInterceptor=function(t,i,e){var s,n;if(this.interceptors.postResolution.has(t)){var r=[];try{for(var h=ri(this.interceptors.postResolution.getAll(t)),o=h.next();!o.done;o=h.next()){var a=o.value;"Once"!=a.options.frequency&&r.push(a),a.callback(t,i,e)}}catch(t){s={error:t}}finally{try{o&&!o.done&&(n=h.return)&&n.call(h)}finally{if(s)throw s.error}}this.interceptors.postResolution.setAll(t,r)}},t.prototype.resolveRegistration=function(t,i){if(t.options.lifecycle===ei.ResolutionScoped&&i.scopedResolutions.has(t))return i.scopedResolutions.get(t);var e,s=t.options.lifecycle===ei.Singleton,n=t.options.lifecycle===ei.ContainerScoped,r=s||n;return e=fi(t.provider)?t.provider.useValue:pi(t.provider)?r?t.instance||(t.instance=this.resolve(t.provider.useToken,i)):this.resolve(t.provider.useToken,i):ai(t.provider)?r?t.instance||(t.instance=this.construct(t.provider.useClass,i)):this.construct(t.provider.useClass,i):ci(t.provider)?t.provider.useFactory(this):this.construct(t.provider,i),t.options.lifecycle===ei.ResolutionScoped&&i.scopedResolutions.set(t,e),e},t.prototype.resolveAll=function(t,i){var e=this;void 0===i&&(i=new mi);var s=this.getAllRegistrations(t);if(!s&&ui(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"All"),s){var n=s.map((function(t){return e.resolveRegistration(t,i)}));return this.executePostResolutionInterceptor(t,n,"All"),n}var r=[this.construct(t,i)];return this.executePostResolutionInterceptor(t,r,"All"),r},t.prototype.isRegistered=function(t,i){return void 0===i&&(i=!1),this.Tg.has(t)||i&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},t.prototype.reset=function(){this.Tg.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var t,i;try{for(var e=ri(this.Tg.entries()),s=e.next();!s.done;s=e.next()){var n=hi(s.value,2),r=n[0],h=n[1];this.Tg.setAll(r,h.filter((function(t){return!fi(t.provider)})).map((function(t){return t.instance=void 0,t})))}}catch(i){t={error:i}}finally{try{s&&!s.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}},t.prototype.createChildContainer=function(){var i,e,s=new t(this);try{for(var n=ri(this.Tg.entries()),r=n.next();!r.done;r=n.next()){var h=hi(r.value,2),o=h[0],a=h[1];a.some((function(t){return t.options.lifecycle===ei.ContainerScoped}))&&s.Tg.setAll(o,a.map((function(t){return t.options.lifecycle===ei.ContainerScoped?{provider:t.provider,options:t.options}:t})))}}catch(t){i={error:t}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(i)throw i.error}}return s},t.prototype.beforeResolution=function(t,i,e){void 0===e&&(e={frequency:"Always"}),this.interceptors.preResolution.set(t,{callback:i,options:e})},t.prototype.afterResolution=function(t,i,e){void 0===e&&(e={frequency:"Always"}),this.interceptors.postResolution.set(t,{callback:i,options:e})},t.prototype.getRegistration=function(t){return this.isRegistered(t)?this.Tg.get(t):this.parent?this.parent.getRegistration(t):null},t.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this.Tg.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},t.prototype.construct=function(t,i){var e=this;if(t instanceof li)return t.createProxy((function(t){return e.resolve(t,i)}));var s=Si.get(t);if(!s||0===s.length){if(0===t.length)return new t;throw new Error('TypeInfo not known for "'+t.name+'"')}var n=s.map(this.resolveParams(i,t));return new(t.bind.apply(t,oi([void 0],n)))},t.prototype.resolveParams=function(t,i){var e=this;return function(s,n){var r,h,o,a;try{return"object"==typeof(a=s)&&"token"in a&&"multiple"in a?di(s)?s.multiple?(r=e.resolve(s.transform)).transform.apply(r,oi([e.resolveAll(s.token)],s.transformArgs)):(h=e.resolve(s.transform)).transform.apply(h,oi([e.resolve(s.token,t)],s.transformArgs)):s.multiple?e.resolveAll(s.token):e.resolve(s.token,t):di(s)?(o=e.resolve(s.transform,t)).transform.apply(o,oi([e.resolve(s.token,t)],s.transformArgs)):e.resolve(s,t)}catch(t){throw new Error(yi(i,n,t))}}},t}(),Ai=new _i;var Pi="injectionTokens";const ki=function(){return function(t){Si.set(t,function(t){var i=Reflect.getMetadata("design:paramtypes",t)||[],e=Reflect.getOwnMetadata(Pi,t)||{};return Object.keys(e).forEach((function(t){i[+t]=e[t]})),i}(t))}};const Ii=function(){return function(t){ki()(t),Ai.registerSingleton(t)}};if("undefined"==typeof Reflect||!Reflect.getMetadata)throw new Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.");class Ti{constructor(t=Ai){this.Cg=t}static getInstance(){return this.Mg||(this.Mg=new Ti),this.Mg}static getGlobalContainer(){return this.getInstance().globalContainer}get globalContainer(){return this.Cg}}var Ci=n(655),Mi=n(5720),Ei=function(t){function i(i,e){return t.call(this)||this}return(0,Ci.ZT)(i,t),i.prototype.schedule=function(t,i){return void 0===i&&(i=0),this},i}(Mi.w0),Li={setInterval:function(){for(var t=[],i=0;i=0;o--)(n=t[o])&&(h=(r<3?n(h):r>3?n(i,e,h):n(i,e))||h);return r>3&&h&&Object.defineProperty(i,e,h),h},qi=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)};let Wi=Hi=class{constructor(){var t,i;this.Bg=new Map,this.Dg=0,this.jg=(void 0===(t=Hi.TIME_BETWEEN_TICKS)&&(t=0),void 0===i&&(i=ji),t<0&&(t=0),Ni(t,t,i)),this.jg.subscribe((()=>this.Fg()))}setTimeout(t,i=0){return this.$g(t,i,!0)}clearTimeout(t){this.Bg.delete(t)}setInterval(t,i=0){return this.$g(t,i,!1)}clearInterval(t){this.Bg.delete(t)}Vg(t){try{t.callback()}catch(t){(0,i.n)({message:"TimerService_error",callStack:t.stack,exception:t.message,level:i.D.INFO},{throttle:1})}}Fg(){const t=(new Date).getTime(),i=[];for(const[e,s]of this.Bg)t-s.startTime{setTimeout((()=>{i(Ot.ImaTimeout)}),25e3)})),i=this.qg(this.zg);return Promise.race([i,t]).then((t=>(this.metrics.fetchEnd=(new Date).getTime(),this.Ug=!0,this.Wg&&(0,pt.i)(this.Hg),t))).catch((t=>{throw this.metrics.fetchEnd=(new Date).getTime(),this.Ug=!0,this.Wg&&((0,pt.i)(this.Hg),this.Wg.destroy(),this.settings.adSlotContainerRecycler.recycleAdSlot(this.zg)),t}))}qg(t){return t.fetchImaDependencies().then((t=>(this.Jg=t,this.Qg(t)))).then((t=>this.Xg(t))).catch((t=>{throw(0,P.$K)(t)?t:Ot.ImaRequestException}))}Qg(t){return this.Ug?Promise.reject():new Promise(((i,e)=>{const s=this.Yg();this.Wg=new ti(t.imaSdk,t.imaAdsLoader,s.width,s.height,this.settings.url,this.zg.videoSlot,this.settings.pageUrl),this.Hg.push(this.Wg.onSuccess.subscribe((t=>{i(t)})),this.Wg.onError.subscribe((t=>{e(t)}))),this.Wg.loadAd()}))}Yg(){return this.settings.callingState.adContainerState.get(this.settings.adManagerLineItem.protoLineItem.adType)}Xg(t){const i=Ti.getGlobalContainer().resolve(Wi);return new Zt(i,{id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,url:this.settings.url,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,externalCreativeId:this.settings.creativeId,imaSdk:this.Jg.imaSdk,imaAdsLoader:this.Jg.imaAdsLoader,imaAdsManager:t.imaAdsManager,requestAdsContext:t.requestAdsContext,imaAdSlotContainer:this.zg,bidSlotId:this.settings.bidSlotId,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService})}}var Ji,Qi,Xi,Yi=n(2324);!function(t){t[t.Javascript=0]="Javascript",t[t.Video=1]="Video"}(Ji||(Ji={})),function(t){function i(t){return/^\s*$/.test(t)?null:/^(?:true|false)$/i.test(t)?"true"===t.toLowerCase():isFinite(t)?parseFloat(t):isFinite(Date.parse(t))?new Date(t):"string"==typeof t?t.trim():t}t.JXONTree=function t(e){let s=0,n="";if(this.keyAttributes||(this.keyAttributes={}),e.hasChildNodes()){for(let i,s,r,h=0;h0:e.hasAttributes()){let t;for(;s").replace(/</g,"<").replace(/&/g,"&")}}(Qi||(Qi={}));class Ki{constructor(t){this.Kg=["text/javascript","text/javascript1.0","text/javascript1.2","text/javascript1.4","text/jscript","application/javascript","application/x-javascript","text/ecmascript","text/ecmascript1.0","text/ecmascript1.2","text/ecmascript1.4","text/livescript","application/ecmascript","application/x-ecmascript"],this.Zg="VPAID",this.delivery=void 0,this.type=void 0,this.width=0,this.height=0,this.codec=void 0,this.id=void 0,this.bitrate=void 0,this.minBitrate=void 0,this.maxBitrate=void 0,this.scalable=void 0,this.maintainAspectRatio=void 0,this.apiFramework=void 0,this.src=void 0,this.delivery=t.keyAttributes.delivery,this.type=t.keyAttributes.type,this.width=t.keyAttributes.width,this.height=t.keyAttributes.height,this.codec=t.keyAttributes.codec,this.id=t.keyAttributes.id,this.bitrate=t.keyAttributes.bitrate,this.minBitrate=t.keyAttributes.minbitrate,this.maxBitrate=t.keyAttributes.maxbitrate,this.scalable=t.keyAttributes.scalable,this.maintainAspectRatio=t.keyAttributes.maintainaspectratio,this.apiFramework=t.keyAttributes.apiframework,this.src=Qi.getKeyValue(t)}isSupported(){return!("application/x-shockwave-flash"===this.type||"video/x-flv"===this.type)}getMediaFileType(){return this.apiFramework===this.Zg||(0,a.d3)(this.type,this.Kg)?Ji.Javascript:Ji.Video}}class Zi{constructor(t){this.clickThrough=void 0,this.clickTrackings=[],this.customClicks=[],this.clickThrough=Qi.getKeyValue(t.clickthrough),this.clickTrackings=this.tm((0,a.qo)(t.clicktracking)),this.customClicks=this.tm((0,a.qo)(t.customclick))}tm(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{i.push(Qi.getKeyValue(t))})),i}}class te{constructor(t){this.duration=void 0,this.mediaFiles=[],this.trackingEvents=[],this.skipoffset=void 0,this.videoClicks=void 0,this.duration=(0,Yi.pP)(Qi.getKeyValue(t.duration)),this.skipoffset=(0,Yi.QI)(t.keyAttributes.skipoffset,this.duration),t.mediafiles&&(this.mediaFiles=this.im((0,a.qo)(t.mediafiles.mediafile))),t.trackingevents&&(this.trackingEvents=Xi.parseTrackingEvents((0,a.qo)(t.trackingevents.tracking),this.duration)),t.videoclicks&&(this.videoClicks=new Zi(t.videoclicks)),t.adparameters&&(this.adParameters=Qi.getKeyValue(t.adparameters),t.adparameters["@xmlEncoded"]&&(this.adParameters=Qi.decodeXMLText(this.adParameters)))}im(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{const e=new Ki(t);e.isSupported()&&i.push(e)})),i}isSupported(){return!0}}class ie{constructor(t){this.minSuggestedDuration=void 0,this.staticResource={},this.htmlResource={},this.iframeResource={},this.nonLinearClickTracking={},this.id=t.keyAttributes.id,this.width=t.keyAttributes.width,this.height=t.keyAttributes.height,this.expandedWidth=t.keyAttributes.expandedheight,this.expandedHeight=t.keyAttributes.expandedwidth,this.scalable=t.keyAttributes.scalable,this.maintainAspectRatio=t.keyAttributes.maintainaspectratio,this.apiFramework=t.keyAttributes.apiframework,this.minSuggestedDuration=(0,Yi.pP)(t.keyAttributes.minsuggestedduration),this.nonLinearClickThrough=t.nonlinearclickthrough.keyValue,t.nonlinearclicktracking&&(this.nonLinearClickTracking.id=t.nonlinearclicktracking.keyAttributes.id,this.nonLinearClickTracking.uri=t.nonlinearclicktracking.keyValue),t.staticresource&&(this.staticResource.creativeType=t.staticresource.keyAttributes.creativetype,this.staticResource.uri=t.staticresource.keyValue),t.iframeresource&&(this.iframeResource.uri=t.iframeresource.keyValue),t.htmlresource&&(this.htmlResource.uri=t.htmlresource.keyValue)}isSupported(){return"VPAID"===this.apiFramework?((0,i.n)({message:"AdManager_NonLinearAd_VPAID_found",level:i.D.INFO}),!1):this.width&&this.height?!(!this.staticResource.creativeType||!this.staticResource.uri)||(this.htmlResource.uri&&(0,i.n)({message:"AdManager_NonLinearAd_htmlResource_found",level:i.D.INFO}),this.iframeResource.uri&&(0,i.n)({message:"AdManager_NonLinearAd_iframeResource_found",level:i.D.INFO}),!1):((0,i.n)({message:"AdManager_NonLinearAd_no_dimensions",level:i.D.INFO}),!1)}}class ee{constructor(t){this.nonLinearAdList=[],this.trackingEvents=[],t.nonlinear&&(this.nonLinearAdList=this.nm((0,a.qo)(t.nonlinear))),t.trackingevents&&(this.trackingEvents=Xi.parseTrackingEvents((0,a.qo)(t.trackingevents.tracking))),t.adparameters&&(this.adParameters=Qi.getKeyValue(t.adparameters),t.adparameters["@xmlEncoded"]&&(this.adParameters=Qi.decodeXMLText(this.adParameters)))}isSupported(){return!0}nm(t){const i=[];return t.forEach((t=>{const e=new ie(t);e.isSupported()&&i.push(e)})),i}}class se{constructor(t){if(this.id=void 0,this.sequence=void 0,this.adId=void 0,this.linear=void 0,this.nonLinear=void 0,this.id=t.keyAttributes.id,this.sequence=t.keyAttributes.sequence,this.adId=t.keyAttributes.adid,t.linear)try{this.linear=new te(t.linear)}catch(t){(0,i.n)({callStack:t.stack,level:i.D.WARN,exception:t.message,message:"Creative_Linear"})}if(t.nonlinearads)try{this.nonLinear=new ee(t.nonlinearads)}catch(t){(0,i.n)({callStack:t.stack,level:i.D.WARN,exception:t.message,message:"Creative_NonLinear"})}}isSupported(){return!0}}class ne{constructor(t,i){this.name=t.keyAttributes.event,this.uri=Qi.getKeyValue(t),"progress"===this.name&&(this.offset=(0,Yi.QI)(t.keyAttributes.offset,i))}}!function(t){function i(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{i.push(Qi.getKeyValue(t))})),i}t.parseImpressions=function(t){return i(t)},t.parseCretives=function(t){const i=[];return t.forEach((t=>{i.push(new se(t))})),i},t.parseErrors=function(t){return i(t)},t.parseTrackingEvents=function(t,i){const e=[];return void 0!==t[0]&&t.forEach((t=>{e.push(new ne(t,i))})),e}}(Xi||(Xi={}));class re{constructor(t){var i;this.description=void 0,this.advertiser=void 0,this.surveys=void 0,this.errors=void 0,this.pricing=void 0,this.extensions=void 0,this.adTitle=Qi.getKeyValue(t.adtitle),this.adSystem=Qi.getKeyValue(t.adsystem),this.impressions=Xi.parseImpressions((0,a.qo)(t.impression)),this.creatives=(null===(i=t.creatives)||void 0===i?void 0:i.creative)?Xi.parseCretives((0,a.qo)(t.creatives.creative)):[],this.description=Qi.getKeyValue(t.description),this.advertiser=Qi.getKeyValue(t.advertiser),this.surveys=Qi.getKeyValue(t.survey),this.errors=Xi.parseErrors((0,a.qo)(t.error)),this.pricing=Qi.getKeyValue(t.pricing),this.extensions=Qi.getKeyValue(t.extensions)}isSupported(){return!0}}class he{constructor(t){var i;this.adSystem=void 0,this.impressions=[],this.VASTAdTagURI=void 0,this.creatives=[],this.errors=void 0,this.extensions=void 0,this.fallowAdditionalWrappers=void 0,this.allowMultipleAds=void 0,this.fallbackOnNoAd=void 0,this.adSystem=Qi.getKeyValue(t.adsystem),this.impressions=Xi.parseImpressions((0,a.qo)(t.impression)),this.VASTAdTagURI=Qi.getKeyValue(t.vastadtaguri),this.creatives=(null===(i=t.creatives)||void 0===i?void 0:i.creative)?Xi.parseCretives((0,a.qo)(t.creatives.creative)):[],this.errors=Xi.parseErrors((0,a.qo)(t.error)),this.extensions=t.extensions,this.fallowAdditionalWrappers=!t.keyAttributes.followadditionalwrappers||t.keyAttributes.followadditionalwrappers,this.allowMultipleAds=t.keyAttributes.allowmultipleads,this.fallbackOnNoAd=t.keyAttributes.fallbackonnoad}}class oe{constructor(t){Array.isArray(t)?this.rm(t):this.hm(t)}isSupported(){return!0}hm(t){this.id=t.keyAttributes.id,this.sequence=t.keyAttributes.sequence,t.inline?this.inLine=new re(t.inline):t.wrapper&&(this.wrapper=new he(t.wrapper))}rm(t){const i=t.filter((t=>{const i=this.om(t).filter((t=>t.linear));return!!(0,a.BZ)(i)}));(0,a.BZ)(i)&&this.hm(i[0])}om(t){return t.inline?(0,a.qo)(t.inline.creatives.creative):t.wrapper?(0,a.qo)(t.wrapper.creatives.creative):[]}}class ae{constructor(t=2){this.am=t}parseVastXml(t){try{if(!this.lm(t))return{error:!0,errorReason:Ot.XmlInvalidString};if(this.um(t))return{error:!0,errorReason:Ot.XmlInvalidAd};const i=(new DOMParser).parseFromString(t,"application/xml"),e=new Qi.JXONTree(i.documentElement);if(!this.dm(e,this.am))return{error:!0,errorReason:Ot.XmlInvalidTree};const s=new oe(e.ad);return this.pm(s)?{error:!1,result:s}:{error:!0,errorReason:Ot.XmlInvalidAd}}catch(t){return{error:!0,errorReason:Ot.XmlParseGeneral}}}lm(t){return(0,P.QM)(t)}um(t){return Gt.KEYWORDS_FOR_BANNED_VAST.some((i=>t.includes(i)))}dm(t,i){if(!t.ad)return!1;const e=parseInt(t.keyAttributes.version,10);return!(e&&e{var i;return null===(i=null==t?void 0:t.linear)||void 0===i?void 0:i.mediaFiles.length})),i=[...e.creatives].filter((t=>{var i;return null===(i=null==t?void 0:t.nonLinear)||void 0===i?void 0:i.nonLinearAdList.length}));if(!(0,a.BZ)(t)&&!(0,a.BZ)(i))return!1}return!0}}class ce{constructor(t){this.mediaFiles=[],this.nonLinearFiles=[],this.adTitle=void 0,this.adParameters=void 0,this.linearClickThrough=void 0,this.creativeId=void 0,t.forEach((t=>{t.inLine?(this.adTitle=t.inLine.adTitle,this.Qf(t.inLine.creatives)):t.wrapper&&this.Qf(t.wrapper.creatives)}))}Yf(t){this.duration=t.duration,this.fm(t.mediaFiles),this.vm(t.skipoffset),this.gm(t.adParameters),t.videoClicks&&t.videoClicks.clickThrough&&this.bm(t.videoClicks.clickThrough)}wm(t){this.xm(t.nonLinearAdList),this.gm(t.adParameters)}xm(t){this.nonLinearFiles=[...this.nonLinearFiles,...t]}gm(t){this.adParameters=t}vm(t){this.skipoffset=t}fm(t){this.mediaFiles=[...this.mediaFiles,...t]}bm(t){this.linearClickThrough=t}Qf(t){t.forEach((t=>{this.creativeId=t.id,t.linear&&this.Yf(t.linear),t.nonLinear&&this.wm(t.nonLinear)}))}}var le,ue=n(2817);!function(t){t[t.FirstQuartile=0]="FirstQuartile",t[t.SecondQuartile=1]="SecondQuartile",t[t.ThirdQuartile=2]="ThirdQuartile",t[t.FourthQuartile=3]="FourthQuartile"}(le||(le={}));var de,pe,fe=n(5874);function ve(t,i,e,s){t.style.top=`${function(t,i,e,s,n){let r=i-s.clientY;const h=s.clientY+s.height-i;n.alignTop&&r>t.offsetHeight?r-=t.offsetHeight:!n.alignTop&&hs.height&&(r=s.height-t.offsetHeight));return r}(t,i.clientY,i.height,e,s)}px`,t.style.left=`${function(t,i,e,s){const n=s.distanceFromMargin?s.distanceFromMargin:0;let r=Math.ceil(i)-Math.ceil(e.clientX),h=i,o=h+t.offsetWidth;const a=e.clientX+e.width;if(s.alignMiddle){const i=t.offsetWidth/2;r-=Math.ceil(i),h-=i,o-=i}if(s.alignMiddle||s.forceRight)return e.clientX>h?r=0+n:aa&&(r-=t.offsetWidth);return r}(t,i.clientX,e,s)}px`}!function(t){t[t.Top=1]="Top",t[t.Bottom=2]="Bottom",t[t.Right=4]="Right",t[t.Left=8]="Left",t[t.Middle=16]="Middle"}(de||(de={}));class ge extends h._{constructor(t,i,e,s,n){super(),this.mediator=t,this.Sr=i,this._m=e,this.Qt=n,this.Am=i.createElementByString(s)}getContainer(){return this.Am}getCoordinates(t){const i=this.Sr.getElementCoordinates(this.Am);return this.Qt&&t?((t&de.Top)===de.Top&&(i.clientY-=this.Am.clientHeight),(t&de.Right)===de.Right&&(i.clientX+=this.Am.clientWidth)):i.clientX+=i.width/2,i}showComponent(t=!1){if(!this.Am||!this.Am.parentElement)return;const i=(0,m.pv)(this.Am.parentElement,"cnx-ui-btn")?this.Am.parentElement:this.Am;t&&(0,m.GF)(i)?(0,m.Ji)(i):(0,m.Ho)(i)}hideComponent(t=!1){if(!this.Am||!this.Am.parentElement)return;const i=(0,m.pv)(this.Am.parentElement,"cnx-ui-btn")?this.Am.parentElement:this.Am;t&&!(0,m.GF)(i)?(0,m.U6)(i,(()=>(0,m.MV)(i))):(0,m.MV)(i)}destroy(){this.Am.innerHTML="",this.Am.style.display="none",this._m.unregisterAll(this)}}!function(t){t[t.SimpleMenuItem=0]="SimpleMenuItem",t[t.ToggleMenuItem=1]="ToggleMenuItem",t[t.SubmenuMenuItem=2]="SubmenuMenuItem"}(pe||(pe={}));class me extends ge{constructor(t,i,e,s,n,r,h,o){super(t,i,e,s,o),this.eventName=n,this.Pm=r,this.km=h,this.Im=[],this.eventList=[w[w.RebindComponent],fe.Z[fe.Z.HoldStart],fe.Z[fe.Z.HoldEnd],w[w.ContextMenuOpen],w[w.ContextMenuClose]],this.Tm=!1,this.Cm=10,this.Mm=t=>{this.Em.removeChild(t.target),this.Em.style.width=`${this.Am.clientWidth}px`},this.close=t=>{t&&(0,ut.Of)(t.target,c.s6.ContextController,this.Cm)||!1!==this.isOpen&&(this.Tm&&(this.mediator.publish(this,fe.Z[fe.Z.HoldEnd]),(0,m.IV)(this.km,c.Gj.OnHold),this.Tm=!1),this.isOpen=!1,this.mediator.publish(this,w[w.ContextMenuClose]),(0,m.cn)(this.Am,c.Gj.Invisible),this._m.removeGlobalActions(this.Am),this.closeAllSubmenuItems())},this.close(),this.cacheCoordinates(),this.eventList.push(this.eventName),this.Em=this.Am.getElementsByClassName(c.Ng.Container)[0],this.Lm=this.Sr.createElementByString(``),this.Em.appendChild(this.Lm),(0,m.cn)(this.Em,c.s6.ContextController)}addNewItemsEvent(t){const i=t.filter((t=>!(0,a.d3)(t,this.eventList)));i.length>0&&(this.eventList=[...this.eventList,...i],this.mediator.publish(this,w[w.RebindComponent],{payload:this.Pm}))}cacheCoordinates(){this.Om=this.Sr.getElementCoordinates(this.km)}positionContextMenu(t){this.cacheCoordinates(),ve(this.Am,t,this.Om,{alignMiddle:this.alignMiddle,alignTop:this.alignTop,forceRight:this.forceRight})}Rm(t){switch(t.type){case pe.SimpleMenuItem:this.close();break;case pe.SubmenuMenuItem:this.Bm(t)}}sendEvent(t,i){this.mediator.publish(this,t,i)}Bm(t){const i=this.Am.clientWidth;t.isOpen?(t.$menuContainer.addEventListener("transitionend",this.Mm),this.Lm.style.left="0px",t.$menuContainer.style.left="0px"):(t.$menuContainer.removeEventListener("transitionend",this.Mm),this.Em.style.width=2*i+"px",this.Em.appendChild(t.$menuContainer),(0,m.Tp)(this.Em),this.Lm.style.left=-i+"px",t.$menuContainer.style.left=-i+"px"),t.isOpen=!t.isOpen}closeAllSubmenuItems(){this.Im.forEach((t=>{t.type===pe.SubmenuMenuItem&&t.isOpen&&this.Bm(t)}))}buildContextMenu(t){let i=[];this.Lm.innerHTML="",this.Em.style.width=`${this.Am.clientWidth}px`,this.Im.forEach((t=>this.unsubscribeAll(t))),this.Im=t,this.Im.forEach((t=>{i=[...i,...t.eventList],t.eventList.forEach((i=>this.subscribe(i,t,(e=>{this.Rm(t),this.sendEvent(i,e)})))),t.initComponent(),this.Lm.appendChild(t.getContainer())})),this.addNewItemsEvent(i)}getAnchorCoordinatesTo(t){return null==t?void 0:t.getCoordinates()}open(t,i=!1){i&&(this.Tm=i,this.mediator.publish(this,fe.Z[fe.Z.HoldStart]),(0,m.cn)(this.km,c.Gj.OnHold)),this.isOpen=!0,this.mediator.publish(this,w[w.ContextMenuOpen]),this.positionContextMenu(t);const e={interactionend:this.close};this._m.addGlobalActions(this.Am,e),(0,m.IV)(this.Am,c.Gj.Invisible)}}class ye extends ge{constructor(t,i,e,s,n){super(t,i,e,s,n),this.eventList=[fe.Z[fe.Z.Scroll],fe.Z[fe.Z.Click]],this.Dm=t=>{this.onInteractionHandler(t)},this.onBeforeClick=t=>{t.stopPropagation()},this.onClick=t=>{this.onInteractionHandler(t),this.onClickHandler(t)}}onInteractionHandler(t){t.stopPropagation()}onClickHandler(t){}initComponent(){const t={interactionstart:this.onBeforeClick,interaction:this.Dm,click:this.onClick};this._m.register(this.Am,this,this._m,t),this.Qt&&(this.subscribe(fe.Z[fe.Z.Click],this._m,(()=>{this.onClickHandler()})),this.relay(fe.Z[fe.Z.Scroll],this._m,this,this.mediator))}destroy(){this.unsubscribeAll(this._m),super.destroy()}}class be extends ye{constructor(t,i,e,s,n){super(t,i,e,be.getTemplate(n),s),this.mediator=t,this.jm=!1,this.type=pe.SimpleMenuItem,this.eventList=[],this.event=n.activeEvent,this.name=n.name,n.eventList?this.eventList=n.eventList:this.eventList.push(this.event),this.Fm=this.Am.getElementsByClassName(c.Ng.ItemTitle)[0],this.$m=this.Am.getElementsByClassName(c.Ng.ItemIcon)[0]}static getTemplate(t){const i=`${t.icon}`,e=``;return`\n ${t.icon?i:""}\n ${t.name}\n ${t.label?e:""}\n `}onClickHandler(t){this.mediator.publish(this,this.event)}changeItemName(t){this.Fm.innerHTML=t}changeItemIcon(t){this.$m.innerHTML=t}get isActive(){return this.jm}set isActive(t){this.jm=t,this.jm?(0,m.cn)(this.Am,c.Gj.Active,c.iu.AccentColor):(0,m.IV)(this.Am,c.Gj.Active,c.iu.AccentColor)}}var we,xe;!function(t){t.MainContainer="cnx-scrollbar",t.Wrapper="cnx-scrollbar-wrapper",t.Content="cnx-scrollbar-content",t.Horizontal="cnx-scrollbar-horizontal",t.Handle="cnx-scrollbar-handle",t.PreventSelect="cnx-scrollbar-prevent-select",t.ShowOnHover="cnx-scrollbar-show-on-hover"}(we||(we={}));class Se{constructor(t,i={}){if(this.Um=t,this.Wt=i,this.Nm=0,this.Hm=t=>{t.preventDefault(),this.zm=t.pageY,this.qm=t.pageX,(0,m.cn)(this.Wm,we.PreventSelect),(0,m.cn)(this.Ne.document.body,we.PreventSelect),this.Ne.document.addEventListener("mousemove",this.Gm),this.Ne.document.addEventListener("mouseup",this.Jm)},this.Gm=t=>{const i=this.Wt.horizontal?t.pageX-this.qm:t.pageY-this.zm;this.zm=t.pageY,this.qm=t.pageX,(0,m.PM)(this.Ne,(()=>{this.Wt.horizontal?this.Qm.scrollLeft+=i/this.Xm:this.Qm.scrollTop+=i/this.Xm}))},this.Jm=t=>{(0,m.IV)(this.Wm,we.PreventSelect),(0,m.IV)(this.Ne.document.body,we.PreventSelect),this.Ne.document.removeEventListener("mousemove",this.Gm),this.Ne.document.removeEventListener("mouseup",this.Jm)},this.Ym=t=>{if(!this.Wt.horizontal)return;const i=t.deltaMode?100*(t.deltaY<0?-1:1):t.deltaY,e=Math.floor(i)/33*20,s=this.Nm+e;s>=-1*this.Wm.clientWidth&&s<=this.Qm.scrollWidth-this.Wm.clientWidth&&(this.Nm=s),(0,m.PM)(this.Ne,(()=>this.Qm.scrollLeft=this.Nm))},this.Zm=()=>{clearTimeout(this.ty),this.ty=setTimeout((()=>{this.iy()}),50)},this.iy=()=>{const t=this.Wt.horizontal?this.Qm.scrollWidth:this.Qm.scrollHeight,i=this.Wt.horizontal?this.Um.clientWidth:this.Um.clientHeight;this.Xm=i/t;const e=-1*(this.Um.clientWidth-(this.Wm.clientWidth||4)-4),s=this.Um.clientHeight-this.Wm.clientHeight-4;(0,m.PM)(this.Ne,(()=>{if(this.Xm>=1)(0,m.MV)(this.Wm);else{if((0,m.Ho)(this.Wm),this.Wt.horizontal)return void(0,m.T7)(this.Wm,{width:`${Math.max(100*this.Xm,10)}%`,height:"",top:`${s}px`,right:"",left:this.Qm.scrollLeft/t*100+"%"});(0,m.T7)(this.Wm,{width:"",height:`${Math.max(100*this.Xm,10)}%`,top:this.Qm.scrollTop/t*100+"%",right:`${e}px`,left:""})}}))},this.Ne=(0,m.LT)(t),!this.Ne)throw new Error("window was not found");this.ey(),this.Wm.addEventListener("mousedown",this.Hm),this.Wt.overrideNativeHorizontalScroll&&this.Qm.addEventListener("wheel",this.Ym,{passive:!0}),this.Ne.addEventListener("resize",this.Zm),this.Qm.addEventListener("scroll",this.iy),this.Qm.addEventListener("mouseenter",this.iy),(0,m.cn)(this.Um,we.MainContainer,this.Wt.horizontal?we.Horizontal:void 0,this.Wt.showOnHover?we.ShowOnHover:void 0),this.iy();const e=(0,m.Dx)(this.Um,this.Ne);"0px"===e.height&&"0px"!==e.maxHeight&&(0,m.T7)(this.Um,{height:e.maxHeight})}ey(){for(this.Wm=(0,m.G$)(``,this.Ne),this.sy=(0,m.G$)(``,this.Ne),this.Qm=(0,m.G$)(``,this.Ne),this.sy.appendChild(this.Qm);this.Um.firstChild;)this.Qm.appendChild(this.Um.firstChild);this.Um.appendChild(this.sy),this.Um.insertAdjacentElement("beforeend",this.Wm)}destroy(){for(this.removeListeners(),(0,m.bX)(this.Wm);this.Qm.firstChild;)this.Um.appendChild(this.Qm.firstChild);(0,m.bX)(this.sy),(0,m.IV)(this.Um,we.MainContainer,we.Horizontal,we.ShowOnHover)}removeListeners(){this.Ne.document.removeEventListener("mousemove",this.Gm),this.Ne.document.removeEventListener("mouseup",this.Jm),this.Wm.removeEventListener("mousedown",this.Hm),this.Qm.removeEventListener("wheel",this.Ym),this.Ne.removeEventListener("resize",this.Zm),this.Qm.removeEventListener("scroll",this.iy),this.Qm.removeEventListener("mouseenter",this.iy)}}class _e extends me{constructor(t,i,e,s,n,r,h,o,a){super(t,i,e,s,n,r,h,o),this.resizeObserver=a,this.alignMiddle=!0,this.alignTop=!0,this.forceRight=!1,this.ny=[],this.hy=new be(this,this.Sr,this._m,this.Qt,{name:"Off",activeEvent:null}),this.oy=[],this.ly=!1}sendEvent(t){this.updateCaptionSelection(t),this.mediator.publish(this,this.eventName,{payload:{event:t?w[w.CaptionOn]:w[w.CaptionOff],data:t}})}createCaptionsMenu(t){if(this.oy===t)return;0===this.ny.length?this.ny.push(this.hy):this.ny=this.ny.slice(0,1),t.forEach((t=>{this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:t.title,activeEvent:t.file}))}));const i=this.oy.find((t=>{var i;return t.title===(null===(i=this.uy)||void 0===i?void 0:i.name)}));this.uy&&i&&this.updateCaptionSelection(i.file),(0,m.T7)(this.getContainer(),{height:"auto"}),this.oy=t,this.resizeObserver&&!this.ly&&(this.resizeObserver.on(this.getContainer(),(t=>this.py(t))),this.ly=!0),this.buildContextMenu(this.ny)}initComponent(){}onResize(t){this.cacheCoordinates(),this.isOpen&&this.positionContextMenu(t)}updateCaptionSelection(t){this.ny.forEach((t=>t.isActive=!1));const i=this.oy.find((i=>i.file===t));i?this.uy=this.ny.find((t=>t.name===i.title)):t||(this.uy=this.ny.find((t=>"Off"===t.name))),this.uy&&(this.uy.isActive=!0)}py(t){t.clientHeight>=188&&(0,m.T7)(t,{height:"188px"}),this.vy||(this.vy=new Se(t,{horizontal:!1}),(0,m.cn)(t,c.Gj.HasCustomScrollbar))}}!function(t){t[t.PlayButton=0]="PlayButton",t[t.BigPlayButton=1]="BigPlayButton",t[t.VolumeButton=2]="VolumeButton",t[t.VolumeProgress=3]="VolumeProgress",t[t.VolumeControls=4]="VolumeControls",t[t.ExpandButton=5]="ExpandButton",t[t.SettingsButton=6]="SettingsButton",t[t.CaptionButton=7]="CaptionButton",t[t.CaptionComponent=8]="CaptionComponent",t[t.CastButton=9]="CastButton",t[t.ShareButton=10]="ShareButton",t[t.UpNextButton=11]="UpNextButton",t[t.UpNextBox=12]="UpNextBox",t[t.PreviousButton=13]="PreviousButton",t[t.LogoComponent=14]="LogoComponent",t[t.LogoOutstream=15]="LogoOutstream",t[t.MoreButton=16]="MoreButton",t[t.ElapsedTimeLabel=17]="ElapsedTimeLabel",t[t.TotalDurationLabel=18]="TotalDurationLabel",t[t.RemainingDurationLabel=19]="RemainingDurationLabel",t[t.ProgressBar=20]="ProgressBar",t[t.QualityMenu=21]="QualityMenu",t[t.QueStateOverlay=22]="QueStateOverlay",t[t.Loader=23]="Loader",t[t.ContextMenu=24]="ContextMenu",t[t.ElementsSettingsMenu=25]="ElementsSettingsMenu",t[t.CloseButton=26]="CloseButton",t[t.SkipAdButton=27]="SkipAdButton",t[t.AdLoadingScreen=28]="AdLoadingScreen",t[t.CtaButton=29]="CtaButton",t[t.PlayspaceProgressBar=30]="PlayspaceProgressBar",t[t.PlayspaceSettingsMenu=31]="PlayspaceSettingsMenu",t[t.ClickToPlayButton=32]="ClickToPlayButton",t[t.SlideTitle=33]="SlideTitle",t[t.SkipAd=34]="SkipAd",t[t.TopTitle=35]="TopTitle",t[t.TopLogo=36]="TopLogo",t[t.TopSlideTitle=37]="TopSlideTitle",t[t.TopStoryTitle=38]="TopStoryTitle",t[t.TextLabel=39]="TextLabel",t[t.LivePoster=40]="LivePoster",t[t.LiveIcon=41]="LiveIcon",t[t.ElementsCaptionMenu=42]="ElementsCaptionMenu",t[t.NonLinearComponent=43]="NonLinearComponent"}(xe||(xe={}));class Ae extends ye{constructor(){super(...arguments),this.onClick=t=>{this.onInteractionHandler(t),this.onClickHandler(),this.addBoomEffect()}}addBoomEffect(){(0,m.cn)(this.Am,"cnx-boom"),(0,m.Tp)(this.Am),(0,m.cn)(this.Am,"cnx-boom-anim");const t=i=>{"transform"===i.propertyName&&((0,m.IV)(this.Am,"cnx-boom"),(0,m.IV)(this.Am,"cnx-boom-anim"),this.Am.removeEventListener("transitionend",t))};this.Am.addEventListener("transitionend",t)}initComponent(){super.initComponent(),this.Am.appendChild(this.Sr.createElementByString(''))}}class Pe extends Ae{constructor(){super(...arguments),this.eventList=[w[w.HoverStart],w[w.HoverEnd],...this.eventList],this.onStartHover=()=>{(0,m.cn)(this.Am,c.Gj.HoverStart),(0,m.cn)(this.Am,c.Gj.HoverEnd),this.mediator.publish(this,w[w.HoverStart])},this.onEndHover=()=>{(0,m.IV)(this.Am,c.Gj.HoverEnd),this.mediator.publish(this,w[w.HoverEnd])}}initComponent(){super.initComponent(),this.Qt?(this.Am.addEventListener("touchstart",this.onStartHover,{passive:!0}),this.Am.addEventListener("touchend",this.onEndHover),this.Am.addEventListener("touchcancel",this.onEndHover)):(this.Am.addEventListener("mouseenter",this.onStartHover),this.Am.addEventListener("mouseleave",this.onEndHover))}destroy(){this.Qt?(this.Am.removeEventListener("touchstart",this.onStartHover),this.Am.removeEventListener("touchend",this.onEndHover),this.Am.removeEventListener("touchcancel",this.onEndHover)):(this.Am.removeEventListener("mouseenter",this.onStartHover),this.Am.removeEventListener("mouseleave",this.onEndHover)),super.destroy()}onInteractionHandler(t){this.onEndHoverClick()}onEndHoverClick(){(0,m.IV)(this.Am,c.Gj.HoverEnd),(0,m.IV)(this.Am,c.Gj.HoverStart)}}class ke extends Pe{constructor(){super(...arguments),this.eventList=[w[w.Settings],...this.eventList],this.gy="Settings"}onClickHandler(){this.mediator.publish(this,w[w.Settings])}toggleHDFlag(t){t?(0,m.cn)(this.Am,c.Gj.Active):(0,m.IV)(this.Am,c.Gj.Active)}get tooltip(){return this.gy}}const Ie='';class Te extends Pe{constructor(t,i,e,s,n,r=!1,h){super(t,i,e,s,h),this.my=n,this.isActive=r}onClickHandler(){this.isActive=!this.isActive,this.onStateChange()}get isActive(){return this.Wa}set isActive(t){this.Wa=t,this.Wa?(0,m.cn)(this.Am,this.my):(0,m.IV)(this.Am,this.my)}}class Ce extends Te{constructor(){super(...arguments),this.eventList=[w[w.CaptionMenu],w[w.CaptionOn],w[w.CaptionOff],w[w.StateChanged],...this.eventList],this.gy="Closed Captions"}onClickHandler(){this.mediator.publish(this,w[w.CaptionMenu])}onStateChange(){this.mediator.publish(this,this.isActive?w[w.CaptionOn]:w[w.CaptionOff]),this.mediator.publish(this,w[w.StateChanged])}get tooltip(){return this.gy}}const Me='';class Ee extends ye{constructor(){super(...arguments),this.nd=!1,this.eventList=[w[w.Next]]}onClickHandler(){this.mediator.publish(this,w[w.Next])}show(){this.nd=!0,this.Am.classList.add("cnx-fade-in-up-next")}hide(){this.nd=!1,this.Am.classList.remove("cnx-fade-in-up-next")}isInView(){return this.nd}updateCard(t,i){const e=this.Am.getElementsByTagName("img")[0];e.setAttribute("src",t),e.style.display="none",e.onload=()=>{e.style.display="block"};this.Am.getElementsByClassName("cnx-up-next-box-text")[0].innerHTML=(0,P.QM)(i)?i:""}}class Le extends ge{constructor(t,i,e,s,n){super(t,i,e,s),this.settings=n,this.eventList=[],this.yy=144,this.by=36}createLogo(){let t=this.Sr.createElement("img");t.onload=()=>{t=this.resizeLogo(t),this.Am.appendChild(t)},t.src=this.settings.logoUrl,t.alt=""}resizeLogo(t){const i=t.naturalWidth,e=t.naturalHeight;if(!i||!e)return t;if(this.settings.logoPosition===wt.ProtoLogoPositionMode.ControlBar)t.style.setProperty("height",`${this.by}px`,"important"),t.style.setProperty("width",`${this.by}px`,"important");else{const s=i/e;this.by*s>this.yy?(t.style.setProperty("width",`${this.yy}px`,"important"),t.style.setProperty("height","auto","important")):(t.style.setProperty("width","auto","important"),t.style.setProperty("height",`${this.by}px`,"important"))}return t}initComponent(){try{this.createLogo()}catch(t){(0,i.n)({message:"LogoComponent_createLogo",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}}class Oe extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.wy=this.Am.getElementsByTagName("cnx-span")[0]}setTime(t){isNaN(t)||"number"!=typeof t?(0,m.cn)(this.Am,c.Gj.Invisible):(this.wy.innerHTML=(0,Yi.to)(t),(0,m.IV)(this.Am,c.Gj.Invisible))}}const Re='';class Be extends ge{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.xy=0,this.Sy=null,this._y=0,this.Ay=0,this.Py=100,this.cacheDomElements()}cacheDomElements(){this.ky=this.Am.getElementsByClassName("cnx-progress-fill")[0],this.Iy=this.Am.getElementsByClassName("cnx-progress-rail")[0]}cacheWidths(){this.xy=this.fixedRailWidth?this.fixedRailWidth:this.Iy.getBoundingClientRect().width,this.Sy=this.Iy.getBoundingClientRect().left}updateUi(t){const i=this.getComputedTranslation(t);this._y=i,this.ky.style.transform=`translateX(${i}px)`}isValidTranslation(){return this._y>=0&&this._y<=this.xy}getComputedTranslation(t){return t<0?0:t>this.xy?this.xy:t}setProgress(t){this.cacheWidths();const i=this.getComputedTranslation((0,lt.dQ)(0,100,0,this.xy,t));this.updateUi(i)}disableTransition(){(0,m.cn)(this.Am,c.Gj.NoTransition)}enableTransition(){(0,m.IV)(this.Am,c.Gj.NoTransition)}Ty(t){this.disableTransition(),this.setProgress(t),(0,m.Tp)(this.ky),this.enableTransition()}forceStartState(){this.Ty(this.Ay)}forceEndState(){this.Ty(this.Py)}initComponent(){this.cacheWidths()}destroy(){super.destroy()}}class De extends Be{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.Cy=0,this._n=null,this.My=!1,this.eventList=[w[w.DraggingStart],w[w.DraggingStopped]],this.Ey=t=>{this.cacheWidths(),this.Ly(this.Oy(t)),this.Qt?this.Am.addEventListener(this.Ry,this.By):this.Sr.addEventListenerOnGlobal(this.Ry,this.By),this.onDragStart()},this.By=t=>{null===this._n&&(this.My||(this.My=!0,this.disableTransition()),this._n=this.Sr.requestAnimationFrameHelper((()=>{const i=this.Dy+(this.Oy(t)-this.jy);this.isValidTranslation()&&this.Fy(i),this._n=null})))},this.$y=t=>{t.stopPropagation(),this.Qt?this.Am.removeEventListener(this.Ry,this.By):this.Sr.removeEventListenerOnGlobal(this.Ry,this.By),this.My=!1,this.enableTransition(),this.onDragEnd()},this.Ry=n?"touchmove":"mousemove"}cacheDomElements(){super.cacheDomElements(),this.Vy=this.Am.getElementsByClassName("cnx-progress-handle")[0]}cacheWidths(){super.cacheWidths(),this.Cy=this.Vy.getBoundingClientRect().width/2}updateUi(t){super.updateUi(t);const i=this.getComputedTranslation(t);this.Vy.style.transform=`translateX(${i-this.Cy}px)`}onDragEnd(){this.mediator.publish(this,w[w.DraggingStopped])}onDragStart(){this.mediator.publish(this,w[w.DraggingStart])}Oy(t){return this.Qt?t.touches.item(0).clientX:t.clientX}Ly(t){this.Dy=t-this.Sy,this.jy=t,this.Fy(this.Dy)}Fy(t){if(this.isValidTranslation()){const i=this.getComputedTranslation(t),e=0,s=this.xy,n=0,r=100;this.updateUi(i),this.onProgressChange((0,lt.dQ)(e,s,n,r,i))}}setProgress(t){super.setProgress(t)}initComponent(){super.initComponent();const t={interactionstart:this.Ey,interactionend:this.$y};this._m.register(this.Am,this,this._m,t)}destroy(){super.destroy()}}class je extends De{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.Uy=!1,this.Ny=t=>{(0,m.cn)(this.Am,c.Gj.HoverEnd),this.Uy=!0},this.Hy=t=>{const i=this.getComputedTranslation(t.clientX-this.Sy);this.zy.style.transform=`translateX(${i}px)`},this.Wy=t=>{this.zy.style.transform="translateX(0)",this.Uy=!1,this.Gy()},this.eventList=this.eventList.concat([w[w.Seek],w[w.SeekingStart],w[w.SeekingStopped]])}onProgressChange(t){this.mediator.publish(this,w[w.Seek],{payload:t-.1})}onDragEnd(){super.onDragEnd(),this.mediator.publish(this,w[w.SeekingStopped]),this.Gy()}onDragStart(){super.onDragStart(),this.mediator.publish(this,w[w.SeekingStart])}Gy(){this.Uy||this.My||(0,m.IV)(this.Am,c.Gj.HoverEnd)}initComponent(){super.initComponent(),this.Am.addEventListener("mousemove",this.Hy),this.Am.addEventListener("mouseenter",this.Ny),this.Am.addEventListener("mouseleave",this.Wy),this.zy=this.Am.getElementsByClassName("cnx-progress-follow")[0]}hide(){(0,m.MV)(this.Am)}show(){(0,m.Ho)(this.Am)}destroy(){super.destroy(),this.Am.removeEventListener("mousemove",this.Hy),this.Am.removeEventListener("mouseenter",this.Ny),this.Am.removeEventListener("mouseleave",this.Wy)}}const Fe='';class $e extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hide()}show(){(0,m.Ho)(this.Am)}hide(){(0,m.MV)(this.Am)}}const Ve='';var Ue=n(7089),Ne=n(45);class He extends me{constructor(){super(...arguments),this.alignMiddle=!1,this.alignTop=!1,this.forceRight=!0}Jy(){const t=Ne.g.version?`V${Ne.g.version}`:"dev",i=[new be(this,this.Sr,this._m,this.Qt,{activeEvent:w[w.AboutClick],name:"About Connatix",icon:Ue,label:t})];this.buildContextMenu(i)}initComponent(){this.Jy()}onResize(){this.cacheCoordinates(),this.close()}}const ze="About Connatix",qe="Closed Captions";var We=n(9335);class Ge extends ye{constructor(t,i,e,s,n){super(t,i,e,Ge.getTemplate(n),s),this.mediator=t,this.Im=[],this.jm=!1,this.type=pe.SubmenuMenuItem,this.eventList=[],this.isOpen=!1,this.event=n.event,this.eventList.push(this.event),this.Qy=new be(this,i,e,s,{activeEvent:n.event,name:n.name.toUpperCase(),icon:""}),this.$menuContainer=this.Sr.createElementByString(``),this.Xy=this.Am.getElementsByClassName(c.Ng.ItemExtra)[0]}static getTemplate(t){const i=`${t.icon}`;return``}onClickHandler(t){this.mediator.publish(this,this.event)}handleItemsEvents(t){this.mediator.publish(this,this.event,{payload:t===this.event?void 0:t})}buildContextMenu(t){this.$menuContainer.innerHTML="",this.Im.forEach((t=>this.unsubscribeAll(t))),this.Im=[this.Qy,...t],this.Im.forEach((t=>{t.eventList.forEach((i=>this.subscribe(i,t,(()=>this.handleItemsEvents(i))))),t.initComponent(),this.$menuContainer.appendChild(t.getContainer())}))}changeLabel(t){this.Xy.innerHTML=`${t}${We}`}get isActive(){return this.jm}set isActive(t){this.jm=t,this.jm?(0,m.cn)(this.Am,c.Gj.Active):(0,m.IV)(this.Am,c.Gj.Active)}}class Je extends Ge{constructor(t,i,e,s,n,r,h){super(t,i,e,s,{event:w[w.CaptionMenu],name:n,icon:Me,options:[]}),this.mediator=t,this.resizeObserver=h,this.ny=[],this.hy=new be(this,this.Sr,this._m,this.Qt,{name:"Off",activeEvent:null}),this.oy=[],this.isActive=r}handleItemsEvents(t){t!==w[w.CaptionMenu]&&this.isOpen&&(this.updateSelection(t),(0,m.T7)(this.$menuContainer,{height:"0"}),this.mediator.publish(this,this.event,{payload:{event:t?w[w.CaptionOn]:w[w.CaptionOff],data:t}}))}createCaptionsMenu(t){0===this.ny.length?this.ny.push(this.hy):this.ny=this.ny.slice(0,1),t.forEach((t=>{this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:t.title,activeEvent:t.file}))}));let i=!1;this.oy.length!==t.length&&(i=!0),this.updateMenu(),this.oy=t;const e=this.oy.find((t=>{var i;return t.title===(null===(i=this.uy)||void 0===i?void 0:i.name)}));this.uy&&e&&this.updateSelection(e.file),this.buildContextMenu(this.ny),this.resizeObserver&&i&&(this.resizeObserver.off(this.$menuContainer,(t=>this.py(t))),this.resizeObserver.on(this.$menuContainer,(t=>this.py(t))))}updateSelection(t){this.ny.forEach((t=>t.isActive=!1));const i=this.oy.find((i=>i.file===t));i?this.uy=this.ny.find((t=>t.name===i.title)):t||(this.uy=this.ny.find((t=>"Off"===t.name))),this.uy&&(this.uy.isActive=!0)}updateMenu(){(0,m.T7)(this.$menuContainer,{height:"auto"})}reset(){var t;this.resizeObserver.off(this.$menuContainer,(t=>this.py(t))),null===(t=this.vy)||void 0===t||t.removeListeners(),this.vy=null,this.oy=[]}py(t){t.clientHeight>=188&&(0,m.T7)(t,{height:"188px"}),this.vy||(this.vy=new Se(t,{horizontal:!1}),(0,m.cn)(t,c.Gj.HasCustomScrollbar))}}class Qe extends me{constructor(t,i,e,s,n,r,h,o,a,c=!0,l){super(t,i,e,s,n,r,h,a),this.alignMiddle=!1,this.alignTop=!1,this.forceRight=!1,this.Yy=[new be(this,this.Sr,this._m,this.Qt,{activeEvent:w[w.AboutClick],name:ze,icon:Ue,label:Ne.g.version?`V${Ne.g.version}`:"dev"})],this.Ky=new Je(this,this.Sr,this._m,this.Qt,qe,c,l),this.Zy=[this.Ky],this.tb=o}ib(){let t=this.Yy;this.tb===c.Rq.Lg&&(t=[...this.Zy,...this.Yy]),this.buildContextMenu(t)}initComponent(){this.ib()}onResize(t,i){this.isOpen&&this.positionContextMenu(t),this.tb!==i?(this.tb=i,this.closeAllSubmenuItems(),this.ib()):this.tb=i}toggleCaptionState(t){this.Ky.isActive!==t&&(this.Ky.isActive=t)}hideCaptionOption(){this.Ky.hideComponent()}showCaptionOption(){this.Ky.showComponent()}updateCaptionSelection(t){this.Ky.updateSelection(t)}updateMenu(){this.Ky.updateMenu()}getAnchorCoordinatesTo(t){let i=de.Right;return this.tb!==c.Rq.Xl&&this.tb!==c.Rq.Xxl&&(i|=de.Top),t.getCoordinates(i)}createCaptionsMenu(t){this.Ky.createCaptionsMenu(t)}reset(){var t;null===(t=this.Ky)||void 0===t||t.reset()}}var Xe=n(8852);class Ye extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.eb=this.Am.getElementsByClassName(c.Yk.CaptionContainer)[0]}updateCaptions(t){this.eb.innerHTML=t&&t.text?(0,Xe.f5)(t.text,"
"):""}}class Ke extends Le{constructor(){super(...arguments),this.sb="cnx-logo-height",this.rb="cnx-logo-width"}createLogo(){this.Am.onload=()=>{this.Am.style.visibility="visible",this.resizeLogo(this.Am)},this.Am.style.visibility="hidden",this.Am.src=this.settings.logoUrl}resizeLogo(t){const i=t.naturalWidth,e=t.naturalHeight;return i&&e?(i>e?(0,m.cn)(t,this.rb):(0,m.cn)(t,this.sb),t):t}}var Ze,ts=n(834),is=n(1639);!function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}(Ze||(Ze={}));class es extends Pe{constructor(t,i,e,s,n){super(t,i,e,s,n),this.hb=!1,this.eventList=[w[w.Play],w[w.Pause],w[w.Replay],w[w.StateChanged],...this.eventList],this.ob="Play",this.ab="Pause",this.setState(Ze.Pause)}onClickHandler(){this.Wa===Ze.Pause?this.mediator.publish(this,w[w.Pause]):this.hb?this.mediator.publish(this,w[w.Replay]):this.mediator.publish(this,w[w.Play])}cb(){}toggleReplay(t){this.hb=t}setState(t){this.Wa!==t&&(this.Wa=t,this.cb(),this.mediator.publish(this,w[w.StateChanged]))}get tooltip(){return this.Wa===Ze.Play?this.ob:this.ab}}class ss extends De{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.lb=80,this.fixedRailWidth=this.lb,this.eventList.push(w[w.Volume])}onProgressChange(t){this.mediator.publish(this,w[w.Volume],{payload:t})}}var ns;!function(t){t[t.expand=0]="expand",t[t.collapse=1]="collapse"}(ns||(ns={}));class rs extends Pe{constructor(){super(...arguments),this.eventList=[w[w.Expand],w[w.Collapse],...this.eventList],this.ub="Full Screen",this.pb="Exit Full Screen"}onClickHandler(){switch(this.Wa){case ns.collapse:this.mediator.publish(this,w[w.Expand]);break;case ns.expand:this.mediator.publish(this,w[w.Collapse]);break;default:this.mediator.publish(this,w[w.Expand])}}cb(){this.Am&&(this.Wa===ns.expand?this.Am.classList.add(c.Gj.Active):this.Am.classList.remove(c.Gj.Active))}setState(t){this.Wa!==t&&(this.Wa=t,this.cb())}get tooltip(){return this.Wa===ns.expand?this.pb:this.ub}}function hs(t,i,e){const s=e?H[H.Auto]:i.height.toString();t.forEach((t=>t.name.includes(s)?t.isActive=!0:t.isActive=!1));const n=t.find((t=>H[t.event]===H.Auto));if(e){const e=t.find((t=>t.event===i.height.toString()));if(e){const t=`${n.name} (${e.name})`;n.changeItemName(t)}}else n.changeItemName(n.name)}class os extends me{constructor(){super(...arguments),this.alignMiddle=!0,this.alignTop=!0,this.forceRight=!1,this.ny=[],this.fb={height:360,quality:H.Auto},this.vb=!0}sendEvent(t){this.vb=H[t]===H.Auto,this.mediator.publish(this,this.eventName,{payload:{height:this.vb?this.fb.height:parseInt(t,10),quality:this.vb?H.Auto:H.Strict}})}initComponent(){}createQualityMenu(t){this.ny=[],this.gb=t,this.gb.forEach((t=>{this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:`${t.videoHeight}p`,activeEvent:t.videoHeight.toString(),label:t.isHD?"HD":void 0}))})),this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:H[H.Auto],activeEvent:H[H.Auto]})),hs(this.ny,this.fb,this.vb),this.buildContextMenu(this.ny)}onResize(t){this.cacheCoordinates(),this.isOpen&&this.positionContextMenu(t)}updateQuality(t){(0,a.BZ)(this.gb)&&(this.vb=t.quality===H.Auto,this.fb.quality=t.quality,this.fb.height=(0,lt.DE)(t.height,this.gb.map((t=>t.videoHeight))),hs(this.ny,this.fb,this.vb))}}class as extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hide()}show(){(0,m.Ho)(this.Am),(0,m.Tp)(this.Am),(0,m.cn)(this.Am,c.Gj.Active)}hide(){(0,m.IV)(this.Am,c.Gj.Active),(0,m.MV)(this.Am)}}class cs extends Pe{constructor(t,i,e,s,n,r,h){super(t,i,e,s,n),this.tooltip=h,this.mb=xe[r],this.eventList.push(this.mb)}onClickHandler(){this.mediator.publish(this,this.mb)}}class ls extends ye{constructor(t,i,e,s,n,r,h){super(t,i,e,s,n),this.tooltip=h,this.eventList=[],this.mb=xe[r],this.eventList.push(this.mb)}onClickHandler(){this.mediator.publish(this,this.mb)}}class us{constructor(t,i,e,s){this.Sr=t,this._m=i,this.Qt=e,this.yb=new Map,Object.keys(s).forEach((t=>this.bb(xe[t],s[t])))}getButton(t,i){const{isHoverable:e,template:s,tooltip:n}=this.wb(t);return e?new cs(i,this.Sr,this._m,s,this.Qt,t,n):new ls(i,this.Sr,this._m,s,this.Qt,t,n)}isGeneralComponent(t){return this.yb.has(t)}wb(t){return this.yb.get(t)}bb(t,i){this.yb.set(t,i)}}var ds=n(1215);function ps(t,i,e=!0){return e?`\n \n \n ${i}\n \n \n `.trim():`${i}`}var fs=n(9040),vs=n(89);const gs={[xe[xe.MoreButton]]:{template:ps(xe.MoreButton,vs),tooltip:"More",isHoverable:!0},[xe[xe.CloseButton]]:{template:ps(xe.CloseButton,ds),tooltip:"Close Player",isHoverable:!0},[xe[xe.UpNextButton]]:{template:ps(xe.UpNextButton,fs),tooltip:"Next",isHoverable:!0},[xe[xe.PreviousButton]]:{template:ps(xe.PreviousButton,fs),tooltip:"Previous",isHoverable:!0}};class ms extends Pe{constructor(){super(...arguments),this.eventList=[w[w.SkipAd],...this.eventList],this.xb=-1,this.Sb=-1}initComponent(){super.initComponent(),this.hideComponent(),this._b=this.Am.getElementsByTagName("cnx-span")[0],this._b.innerHTML="Ad",this.Ab=this.Am.querySelectorAll(`.${c.Hs.Timer} svg`)[0]}setSecondsUntilSkip(t){this.xb=Math.ceil(t),this.Sb=-1,this.xb>0&&(0,m.T7)(this.Ab,{"animation-duration":this.xb+"s"})}tickDown(t){const i=this.xb-Math.floor(t);if(i<0||0===this.Sb)return;const e=(0,m.pv)(this.Am,c.Hs.InTimer);this.Sb=i,0===this.Sb?(e&&(0,m.IV)(this.Am,c.Hs.InTimer),this._b.innerHTML="Ad"):(e||(0,m.cn)(this.Am,c.Hs.InTimer),this._b.innerHTML=`in ${this.Sb}s`)}get tooltip(){}onClickHandler(){0===this.Sb&&this.mediator.publish(this,w[w.SkipAd])}}var ys=n(4670);class bs extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.Pb=this.Am.getElementsByClassName(c.mr.BackgroundImg)[0],this.kb=this.Am.getElementsByClassName(c.mr.Icon)[0],this.kb.innerHTML=ys,this.Ib=this.Am.getElementsByClassName(c.mr.ButtonContainer)[0];const t=this.Am.getElementsByClassName(c.mr.Button)[0];this.Tb=this.Sr.createElementByString(``),this.Tb.target=ue.bS.Blank,this.Tb.appendChild(t),this.Ib.innerHTML="",this.Ib.appendChild(this.Tb),this.Cb=this.Am.getElementsByClassName(c.mr.InfoContainer)[0],this.Mb=this.Am.getElementsByClassName(c.mr.FallbackContainer)[0],this.Eb=this.Am.getElementsByClassName(c.mr.SlotCountText)[0]}setBackgroundImg(t){(0,P.QM)(t)?((0,m.IV)(this.Pb,c.Gj.DisplayNone),this.Pb.src=t):(0,m.cn)(this.Pb,c.Gj.DisplayNone)}setClickUrl(t){if(!(0,P.QM)(t))return(0,m.Ho)(this.Mb),void(0,m.MV)(this.Cb);(0,m.Ho)(this.Cb),(0,m.MV)(this.Mb),this.Tb.href=t}setFallbackText(t,i){const e=t||1,s=i||1;this.Eb.innerHTML=`Loading ad ${e}/${s}`}}class ws{constructor(t,i,e,s={},n={}){this.Sr=t,this._m=i,this.Am=e,this.Wt=s,this.Lb={[xe.PlayButton]:t=>this.Ob(!1,t),[xe.BigPlayButton]:t=>this.Ob(!0,t),[xe.VolumeProgress]:t=>new ss(t,this.Sr,this._m,''),[xe.ExpandButton]:t=>new rs(t,this.Sr,this._m,'',this.Wt.isMobile),[xe.QualityMenu]:t=>new os(t,this.Sr,this._m,'',w[w.Quality],xe.QualityMenu,this.Am,this.Wt.isMobile),[xe.Loader]:t=>new as(t,this.Sr,this._m,Ve),[xe.SkipAdButton]:t=>new ms(t,this.Sr,this._m,'Skip ',this.Wt.isMobile),[xe.AdLoadingScreen]:t=>new bs(t,this.Sr,this._m,'Visit Advertiser websiteGO TO PAGE')},this.Ob=(t,i)=>new es(i,this.Sr,this._m,function(t=!1){return`\n \n \n ${ts}\n ${is}\n \n \n`.trim()}(t),this.Wt.isMobile),this.Rb=t=>i=>{const e=this.Lb[t];if(e)return e(i)},this.Bb=new us(this.Sr,this._m,this.Wt.isMobile,Object.assign(Object.assign({},gs),n))}createComponent(t,i){const e=this.Rb(t)(i);return e||(this.Bb.isGeneralComponent(t)?this.Bb.getButton(t,i):void 0)}}var xs;!function(t){t[t.Mute=0]="Mute",t[t.Unmute=1]="Unmute"}(xs||(xs={}));class Ss extends Pe{constructor(t,i,e,s,n,r){super(t,i,e,s,r),this.eventList=[w[w.Mute],w[w.Unmute],w[w.StateChanged],...this.eventList],this.Db="Mute",this.jb="Unmute",this.Wa=n}onClickHandler(){this.Wa===xs.Mute?(this.mediator.publish(this,w[w.Unmute]),this.setState(xs.Unmute)):(this.mediator.publish(this,w[w.Mute]),this.setState(xs.Mute))}cb(){this.Wa===xs.Mute?(0,m.L_)(this.Am,"cnx-sound-on","cnx-sound-off"):(0,m.L_)(this.Am,"cnx-sound-off","cnx-sound-on")}get tooltip(){return this.Wa===xs.Mute?this.jb:this.Db}initComponent(){super.initComponent(),this.cb()}setState(t){this.Wa!==t&&(this.Wa=t,this.cb(),this.mediator.publish(this,w[w.StateChanged]))}setVolume(t){t>0?this.setState(xs.Unmute):this.setState(xs.Mute)}}class _s{constructor(t,i){this.Fb=t,this.Sr=i,this.$b=/\[\[([0-9]+)]]/g,this.Vb=[],this.Ub=[],this.Hb=this.Sr.createElementByString(this.zb(this.Fb))}qb(t){return``}zb(t){return t.replace(this.$b,((t,i)=>(this.Vb.push(parseInt(i,10)),this.qb(i))))}Gb(t,i){return this.Ub.some((i=>i.slotName===t))||this.Ub.some((t=>t.component===i))?null:this.Hb.getElementsByClassName(`pl_${t}`)[0]}getComponentList(){return this.Vb}getRenderedDom(){return this.Hb}registerSlot(t,i){const e=this.Gb(t,i);if(null!==e){const s=i.getContainer();return e.parentNode.replaceChild(s,e),this.Ub.push({component:i,slotName:t}),!0}return!1}initComponents(){this.Ub.forEach((t=>t.component.initComponent()))}}class As extends h._{constructor(t,i,e){super(),this.globalDomUtilsService=t,this.templateString=i,this.componentFactory=e,this.Jb={},this.Qb=new _s(i,t),this.addComponents()}addComponents(){this.Qb.getComponentList().forEach((t=>{const i=this.componentFactory.createComponent(t,this);this.registerComponent(t,i)}))}registerComponent(t,i){this.Qb.registerSlot(t,i),this.Jb[t]=i,this.Xb(i)}Xb(t){t.eventList.forEach((i=>{this.subscribe(i,t,(e=>{i===w[w.RebindComponent]&&this.rebindComponentEvents(t),this.handleComponentEvent(i,e,t)}))}))}rebindComponentEvents(t){t&&(this.unsubscribeAll(t),this.Xb(t))}getComponent(t){return this.Jb[t]}destroy(){Object.keys(this.Jb).forEach((t=>{this.Jb[t].destroy()}))}}class Ps extends As{constructor(t,i,e,s){super(i,e,s),this.mediator=t,this.Am=this.Qb.getRenderedDom()}getContainer(){return this.Am}initComponent(){this.Qb.initComponents()}showComponent(){(0,m.Ho)(this.Am)}hideComponent(){(0,m.MV)(this.Am)}}class ks extends Ps{constructor(t,i,e,s){super(t,i,e,s),this.Yb=null,this.eventList=[w[w.Volume],w[w.VolumeHoverStart],w[w.VolumeHoverStopped],w[w.DraggingStopped],w[w.DraggingStart],w[w.HoverStart],w[w.HoverEnd],w[w.StateChanged]],this.Kb=.2,this.Zb=600,this.tw=!1,this.iw=t=>{clearTimeout(this.Yb),(0,m.cn)(this.Am,"cnx-mod-hover"),this.mediator.publish(this,w[w.VolumeHoverStart])},this.ew=()=>{this.tw||(null!==this.Yb&&clearTimeout(this.Yb),this.Yb=setTimeout((()=>{(0,m.IV)(this.Am,"cnx-mod-hover"),this.mediator.publish(this,w[w.VolumeHoverStopped])}),this.Zb))},this.rw=this.Kb,this.hw=this.getComponent(xe.VolumeButton),this.ow=this.getComponent(xe.VolumeProgress)}handleComponentEvent(t,i,e){let s;switch(t){case w[w.Volume]:s=i.payload/100,this.aw(s),this.cw(i.payload);break;case w[w.Mute]:s=0,this.setVolumeProgress(0);break;case w[w.Unmute]:s=this.rw,this.setVolumeProgress(100*this.rw);break;case w[w.DraggingStopped]:this.tw=!1,this.mediator.publish(this,w[w.DraggingStopped]),this.ew();break;case w[w.DraggingStart]:this.tw=!0,this.mediator.publish(this,w[w.DraggingStart]);break;case w[w.HoverStart]:this.mediator.publish(this,w[w.HoverStart],{payload:{targetComponent:e}});break;case w[w.HoverEnd]:this.mediator.publish(this,w[w.HoverEnd],{payload:{targetComponent:e}});break;case w[w.StateChanged]:this.mediator.publish(this,w[w.StateChanged],{payload:{targetComponent:e}})}void 0!==s&&this.lw(s)}aw(t){t\n \n [[${xe.VolumeButton}]]\n \n \n [[${xe.VolumeProgress}]]\n \n \n`.trim();var Ts=n(2040),Cs=n(8808);const Ms={[xe[xe.ShareButton]]:{template:ps(xe.ShareButton,Cs),tooltip:"Share",isHoverable:!0},[xe[xe.CastButton]]:{template:ps(xe.CastButton,Ts),tooltip:"Cast",isHoverable:!0}};var Es=n(1505),Ls=n(3653);const Os=90*ht.Y0,Rs="This live stream will start shortly";class Bs extends ge{constructor(){super(...arguments),this.eventList=[],this.uw=null}initComponent(){this.dw=this.Sr.createElementByString(""),this.Am.appendChild(this.dw),this.pw=this.Am.getElementsByTagName("cnx-span")[0],this.fw=this.Am.getElementsByClassName("cnx-live-message")[0],this.gw=this.Am.getElementsByClassName("cnx-live-icon")[0]}setPosterSrc(t){(0,P.QM)(t)&&(this.dw.src=t)}setPosterAltText(t){this.dw.alt=t}setIconToStarting(){this.gw.innerHTML=`${Es}`}setIconToEnded(){this.gw.innerHTML=`${Ls}`}setMessageToStarting(){this.mw(Rs)}setMessageToEnded(){this.mw("This live stream is not currently available. Please check again shortly")}setMessageToNotSupported(){this.mw("Live stream not supported by browser")}handleDelayedStart(t){(0,P.r)(Date.parse(t))&&(this.yw=new Date(t),this.ww()>0&&(this.xw(),clearInterval(this.uw),this.uw=setInterval((()=>{this.xw()}),ht.s_*ht.Y0)))}showMessage(){(0,m.Ho)(this.gw),(0,m.Ho)(this.fw)}hideMessage(){(0,m.MV)(this.gw),(0,m.MV)(this.fw)}show(){(0,m.Ho)(this.Am),(0,m.cn)(this.Am,c.Gj.Active)}hide(){(0,m.IV)(this.Am,c.Gj.Active),(0,m.MV)(this.Am)}destroy(){super.destroy(),clearInterval(this.uw)}xw(){const t=this.ww();if(t>0){const i=this.Sw(t);this.mw(`Live in ${i}`)}else this.mw(Rs),clearInterval(this.uw),this.uw=null}ww(){return(Math.max(this.yw.getTime(),Date.now())-Date.now())/ht.s_}Sw(t){const i=t>=Os?Math.round(t/(ht.Y0*ht.oG)):Math.ceil(t/ht.Y0);return`${i} ${t>=Os?"hours":"minute"+(1===i?"":"s")}`}mw(t){this.pw.innerHTML=t}}class Ds extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hideComponent()}}class js extends Pe{constructor(){super(...arguments),this.eventList=[w[w.NonLinearClose],...this.eventList]}initComponent(){super.initComponent(),this.showComponent()}get tooltip(){}onClickHandler(){this.mediator.publish(this,w[w.NonLinearClose])}}class Fs extends ws{constructor(t,i,e,s,n,r){super(t,i,e,s,Ms),this.Sr=t,this.Am=e,this.Wt=s,this.Aw=n,this.Er=r,this.Pw={[xe.VolumeControls]:t=>new ks(t,this.Sr,Is,this),[xe.VolumeButton]:t=>new Ss(t,this.Sr,this._m,'',xs.Mute,this.Wt.isMobile),[xe.SettingsButton]:t=>new ke(t,this.Sr,this._m,Ie,this.Wt.isMobile),[xe.CaptionButton]:t=>new Ce(t,this.Sr,this._m,Me,c.Gj.Active,this.Wt.closedCaptionDefault,this.Wt.isMobile),[xe.UpNextBox]:t=>new Ee(t,this.Sr,this._m,'NEXT',this.Wt.isMobile),[xe.LogoComponent]:t=>{if(!(0,P.$K)(this.Wt.logoUrl)&&!(0,P.$K)(this.Wt.logoPosition))throw new Error("custom logo is undefined");return new Le(t,this.Sr,this._m,'',{logoUrl:this.Wt.logoUrl,logoPosition:this.Wt.logoPosition})},[xe.LogoOutstream]:t=>{if(!(0,P.$K)(this.Wt.logoUrl)&&!(0,P.$K)(this.Wt.logoPosition))throw new Error("outstream logo undefined");return new Ke(t,this.Sr,this._m,'',{logoUrl:this.Wt.logoUrl})},[xe.LivePoster]:t=>new Bs(t,this.Sr,this._m,' '),[xe.LiveIcon]:t=>new Ds(t,this.Sr,this._m,''),[xe.ElapsedTimeLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.TotalDurationLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.RemainingDurationLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.ProgressBar]:t=>new je(t,this.Sr,this._m,Fe,this.Wt.isMobile),[xe.QueStateOverlay]:t=>new $e(t,this.Sr,this._m,Ve),[xe.ContextMenu]:t=>new He(t,this.Sr,this._m,'',w[w.ContextClick],xe.ContextMenu,this.Am,this.Wt.isMobile),[xe.ElementsSettingsMenu]:t=>new Qe(t,this.Sr,this._m,'',w[w.SettingsMenu],xe.ElementsSettingsMenu,this.Am,this.Aw,this.Wt.isMobile,this.Wt.closedCaptionDefault,this.Er),[xe.ElementsCaptionMenu]:t=>new _e(t,this.Sr,this._m,'',w[w.CaptionMenu],xe.ElementsCaptionMenu,this.Am,this.Wt.isMobile,this.Er),[xe.CaptionComponent]:t=>new Ye(t,this.Sr,this._m,''),[xe.NonLinearComponent]:t=>new js(t,this.Sr,this._m,'',this.Wt.isMobile)},this.kw=t=>i=>{const e=this.Pw[t];if(e)return e(i)}}createComponent(t,i){return this.kw(t)(i)||super.createComponent(t,i)}}var $s;!function(t){t.InPod="cnx-ad-in-pod",t.AdMarkerInPodTextContainer="cnx-ad-marker-text",t.AdDurationLabel="cnx-ad-duration",t.AdTitleLabel="cnx-ad-title",t.AdMarkerTitleContainer="cnx-ad-marker-title",t.AdMarkerTitleText="cnx-ad-title-text",t.CardImage="cnx-ad-card-image",t.CardTitle="cnx-ad-card-title",t.AdUiContent="cnx-ui-ad-content",t.AdUiNonLinearAdSlot="cnx-non-linear-ad-slot"}($s||($s={}));class Vs extends As{constructor(t,i,e,s,n){super(e,s,n),this.mediator=t,this.$container=i,this.componentFactory=n,this.$uiContainer=this.Qb.getRenderedDom(),i.appendChild(this.$uiContainer),this.Qb.initComponents()}changeState(t){const i=this.Iw[t];i!==this.currentState&&this.currentState.canTransitionToState(i)&&(this.currentState.exitState(i),i.enterState())}hide(){(0,m.cn)(this.$uiContainer,c.Gj.DisplayNone)}show(){(0,m.IV)(this.$uiContainer,c.Gj.DisplayNone)}destroy(){super.destroy(),this.$uiContainer.parentNode.removeChild(this.$uiContainer)}}class Us extends Vs{constructor(t,i,e,s,n,r={}){super(t,s,i,n,new Fs(i,e,s,r)),this.mediator=t,this.globalDomUtilsService=i,this.$container=s,this.settings=r,this.Iw={},this.Tw=this.$container.querySelector(`.${$s.AdUiNonLinearAdSlot}`)}handleComponentEvent(t,i){this.mediator.publish(this,t,i)}show(){super.show()}hide(){super.hide()}get adUiNonLinearAdSlot(){return this.Tw}}class Ns{constructor(){}get template(){return`\n \n \n [[${xe.NonLinearComponent}]]\n \n \n `.trim()}}class Hs extends h._{constructor(t,i,e){super(),this.imageUrl=t,this.Cw=i,this._m=e,this.Mw=new x.x,this.xg=new x.x,this.Ew=new x.x,this.Lw=new x.x}get onDisplayAd(){return this.Mw.asObservable()}get onError(){return this.xg.asObservable()}get onClick(){return this.Ew.asObservable()}get onClickClose(){return this.Lw.asObservable()}destroy(){this.Ow.hide(),this.Ow.adUiNonLinearAdSlot.removeChild(this.Rw),this.Ow.destroy()}initializeAd(t,i,e,s){this.Bw=t,this.Dw(),this.jw(s,i,e),this.Ow.adUiNonLinearAdSlot.appendChild(this.Rw)}getAdMediaWidth(){return this.Rw.clientWidth}getAdMediaHeight(){return this.Rw.clientHeight}jw(t,i,e){this.Rw=this.Cw.createElement("img"),this.Rw.onload=()=>{this.Mw.next()},this.Rw.onerror=()=>{this.xg.next(Vt.VastNonLinearImageLoadFailure)},this.Rw.onclick=()=>{this.Ew.next()},t?this.Fw(i,e):(0,m.T7)(this.Rw,{height:`${i.height}px`,width:`${i.width}px`,display:"block","pointer-events":"all"}),this.Rw.src=this.imageUrl}Dw(){this.Ow=new Us(this,this.Cw,this._m,this.Bw,(new Ns).template),this.subscribe(w[w.NonLinearClose],this.Ow,(()=>{this.Lw.next()}))}Fw(t,i){const e=(0,lt.Tc)(i.height,rt.NON_LINEAR_MAX_HEIGHT_PERCENT),s=i.width,n=t.height/e;t.width/s>n?(0,m.T7)(this.Rw,{width:"100%",display:"block","pointer-events":"all"}):(0,m.T7)(this.Rw,{height:"100%",display:"block","pointer-events":"all"})}}class zs{constructor(t,i=0,e=1e3){this.uv=t,this.timerDuration=i,this.$w=e,this.Vw=0,this.Uw=null,this.Nw=!1,this.Hw=!1,this.zw=new x.x,this.qw=new x.x,this.Ww=new x.x,this.Gw=[{event:le.FirstQuartile,quartile:1},{event:le.SecondQuartile,quartile:2},{event:le.ThirdQuartile,quartile:3},{event:le.FourthQuartile,quartile:4}],this.Qw=null,this.Xw=()=>{this.Yw(),this.zw.next(),this.Kw(this.Vw,this.timerDuration),this.Zw(),this.tx=(new Date).getTime()},i||this.disable()}start(){this.Hw=!0,null===this.Uw&&this.sx()}stop(){this.Hw=!1,null!==this.Uw&&(this.Yw(),this.nx())}reset(t){t&&(this.timerDuration=t),this.Vw=0,this.Nw=!1,this.Qw=null,(null!==this.Uw||this.Hw)&&(this.nx(),this.sx())}get timeElapsed(){return this.Vw}get timeRemaining(){return this.timerDuration-this.Vw}disable(){this.Nw=!0,this.nx()}get onTimeUpdate(){return this.zw.asObservable()}get onTimeElapsed(){return this.qw.asObservable()}get onQuartile(){return this.Ww.asObservable()}Yw(){this.Vw+=(new Date).getTime()-this.tx}sx(){this.Nw||(this.Zw(),this.tx=(new Date).getTime(),this.Uw=this.uv.setInterval(this.Xw,this.$w))}nx(){this.uv.clearInterval(this.Uw),this.Uw=null}hx(){this.disable(),this.qw.next(),this.Vw=0}Zw(){this.Vw/ht.s_>=this.timerDuration/ht.s_&&this.hx()}Kw(t,i){const e=Math.floor((0,lt.dQ)(0,i,1,4,t));this.Qw<=e&&this.Gw.forEach((({event:t,quartile:i})=>{i===e&&i!==this.Qw&&(this.Ww.next(t),this.Qw=i)}))}}const qs={[le.FirstQuartile]:g.fI.AdVideoFirstQuartile,[le.SecondQuartile]:g.fI.AdVideoMidpoint,[le.ThirdQuartile]:g.fI.AdVideoThirdQuartile,[le.FourthQuartile]:g.fI.AdVideoComplete};class Ws extends Wt{constructor(t,i){super(t,i),this.uv=t,this.settings=i,this.adMediaType="nonLinearVast",this.adSourceType=s.ProtoAdsourceTypeEnum.VastMedia,this.ox=[],this.$w=500,this.lx=0,this.nonLinearOnClick=()=>{this.ux.nonLinearClickTracking.uri&&this.settings.globalDomUtilsService.trackWithImages([this.ux.nonLinearClickTracking.uri]),this.ux.nonLinearClickThrough&&this.settings.globalDomUtilsService.open(this.ux.nonLinearClickThrough,ue.bS.Blank),this.Pv({type:g.fI.AdClickThru,payload:{}})}}initAd(t,i,e,s,n,r,h){try{if(super.initAd(t,i,e,s,n,r,h),this.ux=this.vx(),!this.ux)return void this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.VastUnsupportedMedia}});this.gx(),this.mx(),this.Pv({type:g.fI.AdLoaded,payload:{}})}catch(t){this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorInitAdError+`_${t.message}`}})}}startAd(){super.startAd(),this.yx.start(),this.ox.push(this.wx.onDisplayAd.subscribe((()=>{this.Pv({type:g.fI.AdStarted}),this.Pv({type:g.fI.AdVideoStart}),this.Pv({type:g.fI.AdImpression,payload:{}})})),this.wx.onError.subscribe((t=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:t}})})),this.wx.onClick.subscribe((()=>this.nonLinearOnClick())),this.wx.onClickClose.subscribe((()=>{this.Pv({type:g.fI.AdUserClose,payload:{}}),this.stopAd(g.r5)})));const t={height:this.ux.height,width:this.ux.width},i={height:this.fv.clientHeight,width:this.fv.clientWidth};this.wx.initializeAd(this.dv,t,i,this.ux.scalable)}get adVideoUrl(){return this.xx}get declaredDurationInSeconds(){return this.lx/ht.s_}getAdMediaSize(){return{height:this.wx.getAdMediaHeight(),width:this.wx.getAdMediaWidth()}}resizeAd(t,i,e){}pauseAd(){this.yx.stop()}resumeAd(){this.yx.start()}expandAd(){}collapseAd(){}getAdRemainingTime(){return this.yx.timeRemaining}getAdDuration(){return this.lx/ht.s_}getAdVolume(){return 0}gx(){this.ux.staticResource&&(this.wx=new Hs(this.ux.staticResource.uri,this.settings.globalDomUtilsService,this.settings.interactionService),this.xx=this.ux.staticResource.creativeType,this.Sx())}Sx(){this.fv.style.visibility="hidden"}mx(){var t;this.lx=(null===(t=this.settings.adManagerLineItem.protoLineItem.nonlinearLineItemSettings)||void 0===t?void 0:t.nonLinearAdTimeSeconds)*ht.s_,this.yx=new zs(this.uv,this.lx,this.$w),this.ox.push(this.yx.onTimeUpdate.subscribe((()=>{this.Pv({type:g.fI.AdRemainingTimeChange})})),this.yx.onTimeElapsed.subscribe((()=>{this.stopAd("nonLinearTimerElapsed")})),this.yx.onQuartile.subscribe((t=>{this.Pv({type:qs[t],payload:{}})})))}hu(){var t,i;try{super.hu(),null===(t=this.yx)||void 0===t||t.stop(),(0,pt.i)(this.ox),null===(i=this.wx)||void 0===i||i.destroy()}catch(t){this.Qv("NonLinearBidAdaptor","_destroy",t)}}vx(){let t;if(t=this.settings.vastResponse.nonLinearFiles.find((t=>!0===t.scalable)),!t){const i=(0,lt.Tc)(this.fv.clientHeight,rt.NON_LINEAR_MAX_HEIGHT_PERCENT);t=this.settings.vastResponse.nonLinearFiles.find((t=>t.height<=i&&t.width<=this.fv.clientWidth))}return t}}function Gs(t,i){t.sort(((t,i)=>t.width===i.width?t.bitrate-i.bitrate:t.width-i.width));for(let e=0;e=i)return t[e-1]||t[e];return t[t.length-1]}const Js=()=>`cnx_bid_slot_${(0,ut.qs)()}`,Qs={enableWorker:!1,capLevelToPlayerSize:!0,cnxRenderWindow:window,maxBufferSize:5e6,maxBufferLength:5,maxMaxBufferLength:10,liveBackBufferLength:0};class Xs{constructor(t,i,e,s,n){this._x=t,this.Ax=i,this.Px=e,this.Cw=s,this.kx=n,this.Ix=[],this.Tx=(t,i)=>{if(i.fatal)switch(i.type){case this._x.ErrorTypes.NETWORK_ERROR:if(i.details===this._x.ErrorDetails.MANIFEST_PARSING_ERROR||i.details===this._x.ErrorDetails.MANIFEST_LOAD_ERROR)return void this.Cx();this.Mx.startLoad();break;case this._x.ErrorTypes.MEDIA_ERROR:this.Mx.recoverMediaError();break;default:this.Cx()}},this.Ex=()=>{this.Mx.off(this._x.Events.MEDIA_ATTACHED,this.Ex),this.Mx.loadSource(this.Ax),this.Mx.once(this._x.Events.MANIFEST_PARSED,this.Lx)},this.Lx=()=>{this.Mx.off(this._x.Events.MANIFEST_PARSED,this.Lx),this.Ox(),this.kx.forceMaxLevel&&this.Rx(),this.kx.forceResolutionHeight&&this.Bx(this.kx.forceResolutionHeight),this.jx()},(this.kx.forceMaxLevel||this.kx.forceResolutionHeight)&&(Qs.capLevelToPlayerSize=!1)}start(t,i){this.jx=t,this.Cx=i,this._x&&this._x.isSupported()?(this.Mx=new this._x(Object.assign(Object.assign({},Qs),{cnxRenderWindow:this.Cw.global})),this.Fx()):this.Cx()}destroy(){this.Mx&&(this.Mx.destroy(),this.Mx=null)}Fx(){this.Mx.on(this._x.Events.ERROR,this.Tx),this.Mx.attachMedia(this.Px),this.Mx.once(this._x.Events.MEDIA_ATTACHED,this.Ex)}Rx(){const t=this.Mx.levels.length-1;this.$x(t)}Bx(t){const i=this.Ix.find((i=>i.height===t));i&&this.$x(i.level)}$x(t){this.Mx.currentLevel=t,this.Mx.startLevel=t,this.Mx.nextLevel=t}Ox(){this.Mx.levels.forEach(((t,i)=>{this.Ix.find((({height:i})=>i===t.height))||this.Ix.push({level:i,height:t.height})}))}}var Ys=n(2356);const Ks="huffpost",Zs=540;class tn extends jt{constructor(t,e,s,n,r,h,o,a,c,l=!1,u){super(),this.Sr=t,this.Vx=e,this.dg=s,this.Zt=n,this.Ux=r,this.Nx=h,this.Hx=o,this.zx=a,this._x=c,this.qx=l,this.si=u,this.Wx=!1,this.pageFocus=new Ys.v(this.Sr),this.Gx=Object.values(N),this.Jx=!1,this.Qx=!0,this.Xx=!1,this.Yx=[{event:g.fI.AdVideoStart,position:0},{event:g.fI.AdVideoFirstQuartile,position:25},{event:g.fI.AdVideoMidpoint,position:50},{event:g.fI.AdVideoThirdQuartile,position:75},{event:g.fI.AdVideoComplete,position:100}],this.Kx=this.Yx[0],this.Zx=t=>{try{switch(t.type){case N.Pause:if(this.Nx&&!this.Qx)return this.Qx=!0,void this.tS("pause_event_loopAd");this.Jx=!1;break;case N.Play:if(!this.Jx&&this.qx)return void this.dg.pause();break;case N.Canplay:case N.Durationchange:this.iS();break;case N.Timeupdate:this.eS();break;case N.Error:this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VastVideoTagEventError}});break;case"click":this.hf.next({type:g.fI.AdClickThru,payload:{}})}}catch(t){(0,i.n)({level:i.D.CRITICAL,callStack:t.stack,message:"AdManager_VastIntegrator_onVideoEvent",exception:t.message},{throttle:10,sendMaxLog:!1})}}}initAd(t,i,e,s,n,r){try{this.dg=r.videoSlot,this.width=t,this.height=i,this.bm(this.Ux,this.dg.parentElement),this.resizeAd(t,i,e),this.addVideoEvents(this.dg),this.zx&&this._x&&this._x.isSupported()?this.sS(this._x):(this.dg.setAttribute("src",this.Vx),this.dg.setAttribute("preload","metadata"),this.dg.load()),this.pageFocus.isDocumentVisible()||this.iS()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.WrapperInitAdError+`_${t.message}`}})}}startAd(){try{(0,m.cn)(this.dg,"cnx-ad-video-slot"),this.Jx=!0,this.pageFocus.isDocumentVisible()?this.dg.play().then((()=>{this.hf.next({type:g.fI.AdStarted}),this.hf.next({type:g.fI.AdImpression,payload:{}})})).catch((t=>{this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VastPlayPromiseReject}})})):(this.hf.next({type:g.fI.AdStarted}),this.hf.next({type:g.fI.AdImpression,payload:{}}),this.dg.play())}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.WrapperStartAdError+`_${t.message}`}})}}stopAd(t){this.qx&&this.dg.pause(),"videoComplete"===t&&this.Nx?this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!1}}):this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}resizeAd(t,i,e){(0,m.T7)(this.dg,{width:`${t}px`,height:`${i}px`}),this.hf.next({type:g.fI.AdSizeChange})}pauseAd(){this.Jx=!1,this.Hx&&void 0===this.Kx&&(this.Kx=this.Yx[0]),this.dg.pause(),this.hf.next({type:g.fI.AdPaused})}resumeAd(){this.Nx&&void 0===this.Kx&&(this.Kx=this.Yx[0]),this.Jx=!0,this.tS("resumeAd"),this.Zt===dt.M.Ios&&(0,m.UR)(this.dg),this.hf.next({type:g.fI.AdPlaying})}expandAd(){}collapseAd(){}skipAd(){this.hf.next({type:g.fI.AdSkipped})}getAdRemainingTime(){return this.dg.duration-this.dg.currentTime}getAdDuration(){return this.dg.duration?this.dg.duration:0}getAdVolume(){return this.dg.volume}setAdVolume(t){this.dg.volume=t}getAdMediaWidth(){return this.dg.videoWidth}getAdMediaHeight(){return this.dg.videoHeight}destroy(){if(!this.Hx&&!this.Nx)try{(0,m.IV)(this.dg,"cnx-ad-video-slot"),this.nS(this.dg),this.dg.removeAttribute("src"),this.rS&&(this.rS.destroy(),this.rS=null)}catch(t){(0,i.n)({level:i.D.WARN,message:"AdManager_VastIntegrator_destroyAd",exception:t.message,callStack:t.stack})}}sS(t){let i={forceMaxLevel:!0};this.si&&this.si.includes(Ks)&&(i={forceMaxLevel:!1,forceResolutionHeight:Zs}),this.rS=new Xs(t,this.Vx,this.dg,this.Sr,i),this.rS.start((()=>{this.iS()}),(()=>{this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.CnxMediaSrcNotSupported}})}))}bm(t,i){this.hS=this.Sr.createElement("a"),t&&(this.hS.href=t,this.hS.target="_blank"),(0,m.cn)(this.hS,"cnx-ad-slot"),i.appendChild(this.hS),this.hS.addEventListener("click",this.Zx)}addVideoEvents(t){this.Gx.forEach((i=>{t.addEventListener(i,this.Zx)})),this.hS&&this.hS.addEventListener("click",this.Zx)}nS(t){this.Gx.forEach((i=>{t.removeEventListener(i,this.Zx)})),this.hS&&this.hS.removeEventListener("click",this.Zx)}iS(){this.Wx||(this.Wx=!0,this.hf.next({type:g.fI.AdLoaded,payload:{}}))}eS(){this.hf.next({type:g.fI.AdRemainingTimeChange});const t=(0,lt.dQ)(0,this.dg.duration,0,100,this.dg.currentTime);if(this.Kx&&t>=this.Kx.position){this.Xx||this.hf.next({type:this.Kx.event});const t=this.Kx;this.Kx=this.Yx[this.Yx.indexOf(this.Kx)+1],t.event===g.fI.AdVideoComplete&&(this.Nx&&(this.dg.currentTime=.01),this.Qx=!1,this.stopAd("videoComplete"),this.Xx=!0)}}tS(t){try{this.dg.play().catch((e=>(0,i.n)({level:i.D.WARN,message:`AdManager_VastIntegrator_play_${t}`,exception:`playError: ${e.message}`,callStack:e.stack})))}catch(e){(0,i.n)({level:i.D.WARN,message:`AdManager_VastIntegrator__play_${t}`,exception:`promiseError: ${e.message}`,callStack:e.stack})}}}var en,sn;!function(t){t.errorIframe="Error creating iframe"}(en||(en={}));class nn{constructor(t,i,e){this.Sr=t,this.Nc=i,this.en=e}oS(t,i,e){let s=!1;return n=>{n.contentWindow&&!s&&(s=!0,this.aS(n,this.cS(t,i),e))}}lS(t,i,e,s,n,r,h=!0){return this.uS(t,this.oS(i,e,s),n,r,h)}uS(t,i,e,s,n=!0){const r=this.Sr.createElement("iframe",s);return r.allow="autoplay",r.src="javascript:false",r.srcdoc="",r.width="100%",r.height="100%",r.style.position="absolute",r.style.left="0",r.style.top="0",r.style.margin="0px",r.style.padding="0px",r.style.border="0px",r.style.width="100%",r.style.height="100%",n||(r.style.display="none"),r.setAttribute("SCROLLING","NO"),null==e||e.forEach((t=>{r.setAttribute(t.key,t.value)})),r.onload=()=>{i(r)},t.appendChild(r),i(r),r}aS(t,i,e){const s=(0,m.LT)(t);(class{static executeAsync(t,i){this.dS(t)(i)}static pS(t){return!!t.cnxProxyTask}static dS(t){return this.pS(t)||this.fS(t),t.cnxProxyTask}static fS(t){const i=t.document.head;(0,m.ML)(i,t,"\n window.cnxProxyTask = function(task) {\n setTimeout(function(){\n task();\n }, 0);\n }\n")}}).executeAsync(s,(()=>{try{const e=t.contentWindow&&t.contentWindow.document;e.open(),e.write(i)}catch(i){this.vS(t,i),t=null}e(t)}))}cS(t,i){return Object.keys(i).forEach((function(e){const s="object"==typeof i[e]?JSON.stringify(i[e]):i[e];t=t.replace(new RegExp(`{{${e}}}`,"g"),s)})),t}loadIframe(t){const i=''+(t.customHead?t.customHead:"")+''+(t.customHtml?t.customHtml:"")+'