!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ff244466-48a7-4a12-a8e8-0aad862e95c0",e._sentryDebugIdIdentifier="sentry-dbid-ff244466-48a7-4a12-a8e8-0aad862e95c0")}catch(e){}}(),(self.webpackChunktwitch_twilight=self.webpackChunktwitch_twilight||[]).push([[74689],{953059:function(e,t,n){var i,a,r=n(373738);a="undefined"!=typeof self?self:this,i=function(){return a.ns_=function(e){(e=e||{}).ns_=e;var t,n,i,a,o={uid:function(){var e=1;return function(){return+new Date+"_"+e++}}(),filter:function(e,t){var n={};for(var i in t)t.hasOwnProperty(i)&&e(t[i])&&(n[i]=t[i]);return n},extend:function(e){var t,n=arguments.length;e=e||{};for(var i=1;n>i;i++)if(t=arguments[i])for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a]);return e},getString:function(e,t){var n=String(e);return null==e?t||"na":n},getLong:function(e,t){var n=Number(e);return null==e||isNaN(n)?t||0:n},getInteger:function(e,t){var n=Number(parseInt(e));return null==e||isNaN(n)?t||0:n},getBoolean:function(e,t){var n="true"==String(e).toLowerCase();return null==e?t||!1:n},parseBoolean:function(e,t){return t=t||!1,e?"0"!=e&&void 0:t},isNotEmpty:function(e){return!this.isEmpty(e)},isEmpty:function(e){return null==e||""===e||e instanceof Array&&0===e.length},indexOf:function(e,t){var n=-1;return this.forEach(t,(function(t,i){t==e&&(n=i)})),n},forEach:function(e,t,n){try{if("function"==typeof t)if(n=void 0!==n?n:null,"number"!=typeof e.length||void 0===e[0]){var i=void 0!==e.__proto__;for(var a in e)e.hasOwnProperty(a)&&(!i||i&&void 0===e.__proto__[a])&&"function"!=typeof e[a]&&t.call(n,e[a],a)}else for(var r=0,o=e.length;o>r;r++)t.call(n,e[r],r)}catch(e){}},regionMatches:function(e,t,n,i,a){if(0>t||0>i||t+a>e.length||i+a>n.length)return!1;for(;--a>=0;)if(e.charAt(t++)!=n.charAt(i++))return!1;return!0},size:function(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&t++;return t},log:function(e,t){if(void 0!==t&&t&&"undefined"!=typeof console&&console){var n=new Date,i=n.getHours()+":"+n.getMinutes()+":"+n.getSeconds();console.log(i,e)}},isTrue:function(e){return void 0!==e&&("string"==typeof e?"true"===(e=e.toLowerCase())||"1"===e||"on"===e:!!e)},toString:function(e){if(void 0===e)return"undefined";if("string"==typeof e)return e;if("[object Array]"===Object.prototype.toString.call(e))return e.join(",");if(this.size(e)>0){var t="";for(var n in e)e.hasOwnProperty(n)&&(t+=n+":"+e[n]+";");return t}return e.toString()},exists:function(e){return void 0!==e&&null!=e},firstGreaterThan0:function(){for(var e=0,t=arguments.length;t>e;e++){var n=arguments[e];if(n>0)return n}return 0},cloneObject:function(e){if(null==e||"object"!=r(e))return e;var t=function(){function e(){}function t(t){return"object"==r(t)?(e.prototype=t,new e):t}function n(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}function i(){this.copiedObjects=[];var e=this;this.recursiveDeepCopy=function(t){return e.deepCopy(t)},this.depth=0}function a(e,t){var n=new i;return t&&(n.maxDepth=t),n.deepCopy(e)}function o(e){return"undefined"!=typeof window&&window&&window.Node?e instanceof Node:"undefined"!=typeof document&&e===document||"number"==typeof e.nodeType&&e.attributes&&e.childNodes&&e.cloneNode}var s=[];return n.prototype={constructor:n,canCopy:function(){return!1},create:function(e){},populate:function(e,t,n){}},i.prototype={constructor:i,maxDepth:256,cacheResult:function(e,t){this.copiedObjects.push([e,t])},getCachedResult:function(e){for(var t=this.copiedObjects,n=t.length,i=0;n>i;i++)if(t[i][0]===e)return t[i][1]},deepCopy:function(e){if(null===e)return null;if("object"!=r(e))return e;var t=this.getCachedResult(e);if(t)return t;for(var n=0;nthis.maxDepth)throw new Error("Maximum recursion depth exceeded.");return e.populate(this.recursiveDeepCopy,t,n),this.depth--,n}},a.DeepCopier=n,a.deepCopiers=s,a.register=function(e){e instanceof n||(e=new n(e)),s.unshift(e)},a.register({canCopy:function(){return!0},create:function(e){return e instanceof e.constructor?t(e.constructor.prototype):{}},populate:function(e,t,n){for(var i in t)t.hasOwnProperty(i)&&(n[i]=e(t[i]));return n}}),a.register({canCopy:function(e){return e instanceof Array},create:function(e){return new e.constructor},populate:function(e,t,n){for(var i=0;i=t))return o.cloneObject(e);if(r.start=t,r.end=n,0==e.length)return e.push(r),o.cloneObject(e);for(a=0;a=e[a].start&&r.end<=e[a].end)return o.cloneObject(e);var s,l=!1;for(s=0;s=e[s].start||r.start>=e[s].start&&r.starti&&(i=t);U.setLongestPlaybackInterval(i);var a=0;for(e=0;er&&(r=t);U.setAssetLongestPlaybackInterval(r)}var n,i,a,r,l,d,u,p,v,m,f,g,y,h,_,k,S,C,b,P,A,E,I,T,D,N,w,R,x,L,F,M,V,O,U=this,B=c.INTERVAL_MERGE_TOLERANCE;o.extend(this,{getHash:function(){return n},setHash:function(e){n=e},setPlaybackIntervalMergeTolerance:function(e){B=e},getPlaybackIntervalMergeTolerance:function(){return B},setLabels:function(e){null!=e&&o.extend(x,e)},getLabels:function(){return x},setLabel:function(e,t){var n={};n[e]=t,U.setLabels(n)},getLabel:function(e){return x[e]},getClipNumber:function(){return parseInt(U.getLabel("ns_st_cn"))},setClipNumber:function(e){U.setLabel("ns_st_cn",String(e))},getPartNumber:function(){return parseInt(U.getLabel("ns_st_pn"))},createLabels:function(e){var t,n,i,r=e||{};return r.ns_st_dbt=String(U.getBufferingTime()-A),A=U.getBufferingTime(),r.ns_st_det=String(U.getElapsedTime()-v),v=U.getElapsedTime(),r.ns_st_dupc=String(U.getUniquePlaybackInterval()-h),h=U.getUniquePlaybackInterval(),parseInt(r.ns_st_dupc)<0&&(r.ns_st_dupc="0"),t=o.exists(r.ns_st_upc)?parseInt(r.ns_st_upc):U.getUniquePlaybackInterval(),r.ns_st_iupc=String(t-_),_=t,parseInt(r.ns_st_iupc)<0&&(r.ns_st_iupc="0"),r.ns_st_dupa=String(U.getAssetUniquePlaybackInterval()-k),k=U.getAssetUniquePlaybackInterval(),parseInt(r.ns_st_dupa)<0&&(r.ns_st_dupa="0"),n=o.exists(r.ns_st_upa)?parseInt(r.ns_st_upa):U.getAssetUniquePlaybackInterval(),r.ns_st_iupa=String(n-S),S=n,parseInt(r.ns_st_iupa)<0&&(r.ns_st_iupa="0"),r.ns_st_dlpc=String(U.getLongestPlaybackInterval()-C),C=U.getLongestPlaybackInterval(),parseInt(r.ns_st_dlpc)<0&&(r.ns_st_dlpc="0"),r.ns_st_dlpa=String(U.getAssetLongestPlaybackInterval()-b),b=U.getAssetLongestPlaybackInterval(),parseInt(r.ns_st_dlpa)<0&&(r.ns_st_dlpa="0"),i=o.exists(r.ns_st_pt)?parseInt(r.ns_st_pt):U.getPlaybackTime(),r.ns_st_ipt=String(i-d),d=i,r.ns_st_dpt=String(U.getPlaybackTime()-l),l=U.getPlaybackTime(),r.ns_st_dpc=String(U.getPauses()-L),L=U.getPauses(),r.ns_st_dskc=String(U.getSeeks()-F),F=U.getSeeks(),r.ns_st_dbc=String(U.getBuffers()-M),M=U.getBuffers(),r.ns_st_dskt=String(U.getSeekingTime()-T),T=U.getSeekingTime(),r.ns_st_dska=String(U.getSeekingAmount()-w),w=U.getSeekingAmount(),o.extend(r,U.getLabels()),U.setSeekingDirection(0),a&&(r.ns_st_spc=String(V),r.ns_st_apc=String(O)),a||o.parseBoolean(r.ns_st_sc)||(r.ns_st_sc="1"),r},getVideoTrack:function(){return U.getLabel("ns_st_vt")},setVideoTrack:function(e){U.setLabel("ns_st_vt",String(e))},getAudioTrack:function(){return U.getLabel("ns_st_at")},setAudioTrack:function(e){U.setLabel("ns_st_at",String(e))},getSubtitleTrack:function(){return U.getLabel("ns_st_tt")},setSubtitleTrack:function(e){U.setLabel("ns_st_tt",String(e))},getCDN:function(){return U.getLabel("ns_st_cdn")},setCDN:function(e){U.setLabel("ns_st_cdn",String(e))},getClipPlaybackIntervals:function(){return f},setClipPlaybackIntervals:function(e){f=e},getAssetPlaybackIntervals:function(){return g},getUniquePlaybackInterval:function(){return parseInt(U.getLabel("ns_st_upc"))},getAssetUniquePlaybackInterval:function(){return parseInt(U.getLabel("ns_st_upa"))},setAssetUniquePlaybackInterval:function(e){U.setLabel("ns_st_upa",String(e))},setUniquePlaybackInterval:function(e){U.setLabel("ns_st_upc",String(e))},getLongestPlaybackInterval:function(){return parseInt(U.getLabel("ns_st_lpc"))},setLongestPlaybackInterval:function(e){U.setLabel("ns_st_lpc",String(e))},getAssetLongestPlaybackInterval:function(){return parseInt(U.getLabel("ns_st_lpa"))},setAssetLongestPlaybackInterval:function(e){U.setLabel("ns_st_lpa",String(e))},incrementPauses:function(){U.setLabel("ns_st_pc",String(U.getPauses()+1))},incrementSeeks:function(){U.setLabel("ns_st_skc",String(U.getSeeks()+1))},incrementPlayCounter:function(){U.setLabel("ns_st_sq",String(U.getPlayCounter()+1))},getPlayCounter:function(){return parseInt(U.getLabel("ns_st_sq"))},getBufferingTime:function(){return parseInt(U.getLabel("ns_st_bt"))},setBufferingTime:function(e){U.setLabel("ns_st_bt",String(e))},addBufferingTime:function(e){if(!isNaN(P)){var t=U.getBufferingTime();t+=e-P,U.setBufferingTime(t),P=NaN}},setPlaybackStartPosition:function(e){y=parseInt(e)},getPlaybackStartPosition:function(){return y},addInterval:function(e){isNaN(y)||isNaN(e)||(f=o.addNewPlaybackInterval(f,y,e,B),g=o.addNewPlaybackInterval(g,y,e,B),t(),y=NaN)},getElapsedTime:function(){return parseInt(U.getLabel("ns_st_et"))},setElapsedTime:function(e){U.setLabel("ns_st_et",String(e))},addElapsedTime:function(e){if(!isNaN(p)){var t=U.getElapsedTime();t+=e-p,U.setElapsedTime(t),p=NaN}},getElapsedTimestamp:function(){return p},setElapsedTimestamp:function(e){p=e},addPlaybackTime:function(e){if(!isNaN(r)){var t=U.getPlaybackTime();t+=e-r,U.setPlaybackTime(t),r=NaN}},getPlaybackTime:function(){return parseInt(U.getLabel("ns_st_pt"))},getExpectedPlaybackPosition:function(e){return isNaN(r)||(u+=e-r),u},setPlaybackTimeOffset:function(e){u=e},getPlaybackTimeOffset:function(){return u},setPlaybackTime:function(e){U.setLabel("ns_st_pt",String(e))},getPlaybackTimestamp:function(){return r},setPlaybackTimestamp:function(e){r=e},setPreviousPlaybackTime:function(e){l=e},setPreviousPlaybackTimestamp:function(e){},getBufferingTimestamp:function(){return P},setBufferingTimestamp:function(e){P=e},getPauses:function(){return parseInt(U.getLabel("ns_st_pc"))},setPauses:function(e){U.setLabel("ns_st_pc",String(e))},getSeeks:function(){return parseInt(U.getLabel("ns_st_skc"))},setSeeks:function(e){U.setLabel("ns_st_skc",String(e))},setSeeking:function(e){E=e},isSeeking:function(){return E},setCollectingSeekingTime:function(e){N=e},isCollectingSeekingTime:function(){return N},setClipStarted:function(e){i=e},isClipStarted:function(){return i},setPlaybackStarted:function(e){a=e},isPlaybackStarted:function(){return a},setSeekingTimestamp:function(e){I=e},getSeekingTimestamp:function(){return I},addSeekingTime:function(e){if(!isNaN(I)){var t=U.getSeekingTime();t+=e-I,U.setSeekingTime(t),I=NaN}},getSeekingTime:function(){return parseInt(U.getLabel("ns_st_skt"))},setSeekingTime:function(e){U.setLabel("ns_st_skt",String(e))},setSeekingTimeBeforeEnd:function(e){R=e},getSeekingTimeBeforeEnd:function(){return R},setSeekStartPosition:function(e){D=e},getSeekStartPosition:function(){return D},setSeekingAmount:function(e){U.setLabel("ns_st_ska",String(e))},getSeekingAmount:function(){return parseInt(U.getLabel("ns_st_ska"))},addSeekingAmount:function(e){var t,n=U.getSeekingAmount();n+=Math.abs(e-D),U.setSeekingAmount(n),D==e?t=0:D>e?t=-1:e>D&&(t=1),U.setSeekingDirection(t),D=0},getSeekingDirection:function(){return parseInt(U.getLabel("ns_st_skd"))},setSeekingDirection:function(e){U.setLabel("ns_st_skd",String(e))},resetClipLifecycleLabels:function(){x.ns_st_pt="0",l=0,d=0,x.ns_st_bt="0",A=0,x.ns_st_bc="0",M=0,x.ns_st_pc="0",L=0,x.ns_st_sq="0",x.ns_st_upa="0",k=0,S=0,x.ns_st_et="0",v=0,x.ns_st_lpa="0",b=0,x.ns_st_skt="0",T=0,x.ns_st_ska="0",w=0,x.ns_st_skc="0",F=0},incrementSegmentPlaybackCounter:function(){V++},incrementClipLoadCounter:function(){U.setLabel("ns_st_sc",String(U.getClipLoadCounter()+1))},incrementAssetPlaybackCounter:function(){O++},setPreviousUniquePlaybackInterval:function(e){h=e},setPreviousEventIndependentUniquePlaybackInterval:function(e){_=e},setPreviousLongestPlaybackInterval:function(e){C=e},resetAssetPlaybackCounters:function(){g=[],U.setAssetUniquePlaybackInterval(0),k=0,S=0,U.setAssetLongestPlaybackInterval(0),b=0},setSegmentPlaybackCounter:function(e){V=e},setClipLoadCounter:function(e){U.setLabel("ns_st_sc",String(e))},setAssetPlaybackCounter:function(e){O=e},setLowestPartNumberPlayed:function(e){m=e},getSegmentPlaybackCounter:function(){return V},getClipLoadCounter:function(){return parseInt(U.getLabel("ns_st_sc"))},getAssetPlaybackCounter:function(){return O},getLowestPartNumberPlayed:function(){return m},getBuffers:function(){return parseInt(U.getLabel("ns_st_bc"))},incrementBufferCount:function(){U.setLabel("ns_st_bc",String(U.getBuffers()+1))},getPreviousBufferingTime:function(){return A}}),e()}return e.resetClip=function(e,t,n){for(var i=e.getLabels(),a={},r=0;n&&rl&&(l=t)},setLabels:function(e){null!=e&&o.extend(a,e)},getLabels:function(){return a},setLabel:function(e,t){var n={};n[e]=t,c.setLabels(n)},getLabel:function(e){return a[e]},getClip:function(){return t},createLabels:function(e){var n=e||{};return d||(n.ns_st_pb=null!=n.ns_st_pb?n.ns_st_pb:"1"),o.extend(n,c.getLabels()),t.isPlaybackStarted()&&(n.ns_st_ppc=String(u)),n},incrementPlayCounter:function(){c.setLabel("ns_st_sp",String(parseInt(c.getLabel("ns_st_sp"))+1))},incrementPauses:function(){c.setLabel("ns_st_pp",String(c.getPauses()+1))},addPlaybackTime:function(e){if(!isNaN(i)){var t=c.getPlaybackTime();t+=e-i,c.setPlaybackTime(t),i=NaN}},addBufferingTime:function(e){if(!isNaN(n)){var t=c.getBufferingTime();t+=e-n,c.setBufferingTime(t),n=NaN}},getBufferingTime:function(){return parseInt(c.getLabel("ns_st_bp"))},setBufferingTime:function(e){c.setLabel("ns_st_bp",String(e))},getPlaybackTime:function(){return parseInt(c.getLabel("ns_st_pa"))},setBufferingTimestamp:function(e){n=e},getBufferingTimestamp:function(){return n},setPlaybackTime:function(e){c.setLabel("ns_st_pa",String(e))},setPlaybackTimestamp:function(e){i=e},getPlaybackTimestamp:function(){return i},getPauses:function(){return parseInt(c.getLabel("ns_st_pp"))},setPauses:function(e){c.setLabel("ns_st_pp",String(e))},isPlaylistStarted:function(){return r},setPlaylistStarted:function(e){r=e},getPlaybackCounter:function(){return u},incrementPlaybackCounter:function(){u++},setFirstEventSent:function(e){d=e}}),e()}return e.resetPlaylist=function(t,n,i){for(var a=t.getClip(),r=t.getLabels(),o={},s=0;i&&sm&&(m=p);t.ns_st_lpc=String(m),t.ns_st_dlpc=String(m-e.getPlaylist().getClip().getLongestPlaybackInterval());var f=0;for(c=0;cg&&(g=p);t.ns_st_lpa=String(g),t.ns_st_dlpa=String(g-e.getPlaylist().getClip().getAssetLongestPlaybackInterval()),t.ns_st_hc=String(e.getHeartbeat().getCount());var y=e.getSSECore().createLabels(l.HEARTBEAT,t,n);e.getEventManager().newEvent(y),r=0,u.resume()}function i(){null!=a&&(e.getSSECore().getPlatformAPI().clearTimeout(a),a=null)}var a,r,s,u=this,p=c.DEFAULT_HEARTBEAT_INTERVAL;o.extend(this,{getCount:function(){return s},setIntervals:function(e){p=e},getInterval:function(e){var t=0;if(null!=p)for(var n=0;ne){t=i.interval;break}}return t},resume:function(){i();var t=u.getInterval(e.getPlaylist().getClip().getPlaybackTime()+(+new Date-e.getPlaylist().getClip().getPlaybackTimestamp()));if(t>0){var o=r>0?r:t;a=e.getSSECore().getPlatformAPI().setTimeout(n,o)}r=0},pause:function(){i();var t=u.getInterval(e.getPlaylist().getClip().getPlaybackTime()+(+new Date-e.getPlaylist().getClip().getPlaybackTimestamp()));r=t-(e.getPlaylist().getClip().getPlaybackTime()+(+new Date-e.getPlaylist().getClip().getPlaybackTimestamp()))%t}}),t()},g=function(e){function t(){}function n(){var t={},n=o.fixEventTime(t);t.ns_st_po=String(e.getPlaylist().getClip().getExpectedPlaybackPosition(n)),e.getPlaylist().addPlaybackTime(n),e.getPlaylist().setPlaybackTimestamp(n),e.getPlaylist().getClip().addPlaybackTime(n),e.getPlaylist().getClip().setPlaybackTimestamp(n),e.getStateMachine().getCurrentState()==d.BUFFERING_DURING_PLAYBACK&&(e.getPlaylist().addBufferingTime(n),e.getPlaylist().setBufferingTimestamp(n),e.getPlaylist().getClip().addBufferingTime(n),e.getPlaylist().getClip().setBufferingTimestamp(n)),e.getPlaylist().getClip().addElapsedTime(n),e.getPlaylist().getClip().setElapsedTimestamp(n),e.getPlaylist().getClip().addInterval(parseInt(t.ns_st_po)),e.getPlaylist().getClip().setPlaybackStartPosition(parseInt(t.ns_st_po));var i=e.getSSECore().createLabels(l.KEEPALIVE,t,n);e.getEventManager().newEvent(i),r.resume()}function i(){null!=a&&(e.getSSECore().getPlatformAPI().clearTimeout(a),a=null)}var a,r=this,s=c.DEFAULT_KEEP_ALIVE_INTERVAL;o.extend(r,{resume:function(){i(),a=e.getSSECore().getPlatformAPI().setTimeout(n,s)},pause:function(){i()},setInterval:function(e){s=e},getInterval:function(){return s}}),t()},y=function(e){function t(){a=d.IDLE,i=null,n=NaN}var n,i,a,r=this;o.extend(r,{eventTypeToState:function(e){if(a==d.IDLE){if(e==l.PLAY)return d.PLAYING;if(e==l.SEEK_START)return d.SEEKING_BEFORE_PLAYBACK;if(e==l.BUFFER)return d.BUFFERING_BEFORE_PLAYBACK}else if(a==d.PLAYBACK_NOT_STARTED){if(e==l.PLAY)return d.PLAYING;if(e==l.SEEK_START)return d.SEEKING_BEFORE_PLAYBACK;if(e==l.BUFFER)return d.BUFFERING_BEFORE_PLAYBACK;if(e==l.END||e==l.AD_SKIP)return d.IDLE}else if(a==d.PLAYING){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.BUFFER)return d.BUFFERING_DURING_PLAYBACK;if(e==l.PAUSE)return d.PAUSED;if(e==l.SEEK_START)return d.SEEKING_DURING_PLAYBACK}else if(a==d.PAUSED){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.BUFFER)return d.BUFFERING_DURING_PAUSE;if(e==l.PLAY)return d.PLAYING;if(e==l.SEEK_START)return d.SEEKING_DURING_PAUSE}else if(a==d.BUFFERING_BEFORE_PLAYBACK){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.PAUSE||e==l.BUFFER_STOP)return d.PLAYBACK_NOT_STARTED;if(e==l.PLAY)return d.PLAYING;if(e==l.SEEK_START)return d.SEEKING_BEFORE_PLAYBACK}else if(a==d.BUFFERING_DURING_PLAYBACK){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.PLAY||e==l.BUFFER_STOP)return d.PLAYING;if(e==l.PAUSE_ON_BUFFERING)return d.PAUSED_DURING_BUFFERING;if(e==l.SEEK_START)return d.SEEKING_DURING_BUFFERING;if(e==l.PAUSE)return d.PAUSED}else if(a==d.BUFFERING_DURING_SEEKING){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.PLAY)return d.PLAYING;if(e==l.BUFFER_STOP)return d.SEEKING_DURING_PLAYBACK;if(e==l.PAUSE)return d.PAUSED}else if(a==d.BUFFERING_DURING_PAUSE){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.PLAY)return d.PLAYING;if(e==l.SEEK_START)return d.SEEKING_DURING_PAUSE;if(e==l.BUFFER_STOP||e==l.PAUSE)return d.PAUSED}else if(a==d.SEEKING_BEFORE_PLAYBACK){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.PAUSE)return d.PLAYBACK_NOT_STARTED;if(e==l.PLAY)return d.PLAYING;if(e==l.BUFFER)return d.BUFFERING_BEFORE_PLAYBACK}else if(a==d.SEEKING_DURING_PLAYBACK){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.PLAY)return d.PLAYING;if(e==l.PAUSE)return d.PAUSED;if(e==l.BUFFER)return d.BUFFERING_DURING_SEEKING}else if(a==d.SEEKING_DURING_BUFFERING){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.PLAY)return d.PLAYING;if(e==l.PAUSE||e==l.BUFFER_STOP)return d.PAUSED}else if(a==d.SEEKING_DURING_PAUSE){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.PLAY)return d.PLAYING;if(e==l.PAUSE||e==l.BUFFER_STOP)return d.PAUSED;if(e==l.BUFFER)return d.BUFFERING_DURING_PAUSE}else if(a==d.PAUSED_DURING_BUFFERING){if(e==l.END||e==l.AD_SKIP)return d.IDLE;if(e==l.SEEK_START)return d.SEEKING_DURING_BUFFERING;if(e==l.PAUSE)return d.PAUSED;if(e==l.PLAY||e==l.BUFFER_STOP)return d.PLAYING}return null},getCurrentState:function(){return a},newEvent:function(e,t){var o=r.eventTypeToState(e);a!=o&&(i=a,a=o,n=t)},getPreviousState:function(){return i},getLastStateChangeTimestamp:function(){return n}}),t()},h=function(e){var t=this;o.extend(t,{onSeekStartWhenPausedOrBufferingDuringPause:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().getClip().isSeeking()?e.getPlaylist().getClip().isCollectingSeekingTime()||(e.getPlaylist().getClip().setSeekingTimestamp(t),e.getPlaylist().getClip().setCollectingSeekingTime(!0)):e.getPlaylist().getClip().incrementSeeks(),e.getPlaylist().getClip().isSeeking()||(e.getPlaylist().getClip().setSeeking(!0),e.getPlaylist().getClip().setCollectingSeekingTime(!0),e.getPlaylist().getClip().setSeekStartPosition(i),e.getPlaylist().getClip().setSeekingTimestamp(t))},onBufferWhenSeekingOrPlayBackNotStartedOrPaused:function(t,n){e.getPlaylist().setBufferingTimestamp(t),e.getPlaylist().getClip().setBufferingTimestamp(t)},onPlayWhenSeekingDuringBufferingOrSeekingDuringPause:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().getClip().isSeeking()&&(e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().getClip().addSeekingAmount(i),e.getPlaylist().getClip().setSeeking(!1)),e.getPlaylist().getClip().incrementPlayCounter(),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)},onBufferStopWhenBufferingDuringSeekingOrBufferingDuringPause:function(t,n){e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t)},onPauseWhenSeekingDuringPlaybackOrSeekingDuringPause:function(t,n){e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1))},onEndOrAdSkipWhenSeekingDuringBufferingOrSeekingDuringPause:function(t,n){e.getSSECore().resetHeartbeat(),e.getSSECore().resetKeepAlive(),e.getPlaylist().getClip().addElapsedTime(t);var i=e.getSSECore().createLabels(l.END,n,t);e.getEventManager().newEvent(i),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().setSeekingTimeBeforeEnd(t-e.getPlaylist().getClip().getSeekingTimestamp()),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().storeClipPlaybackCounters(),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onBufferStopWhenSeekingDuringBufferingOrSeekingDuringPause:function(t,n){e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1))}})},_=function(e){var t=this;o.extend(t,{onEndOrAdSkip:function(t,n){e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&e.getPlaylist().getClip().setSeekingTimeBeforeEnd(t-e.getPlaylist().getClip().getSeekingTimestamp()),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onBufferStop:function(t,n){e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1))},onSeekStart:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().isSeeking()?e.getPlaylist().getClip().isCollectingSeekingTime()||(e.getPlaylist().getClip().setSeekingTimestamp(t),e.getPlaylist().getClip().setCollectingSeekingTime(!0)):e.getPlaylist().getClip().incrementSeeks(),e.getPlaylist().getClip().isSeeking()||(e.getPlaylist().getClip().setSeeking(!0),e.getPlaylist().getClip().setCollectingSeekingTime(!0),e.getPlaylist().getClip().setSeekStartPosition(i),e.getPlaylist().getClip().setSeekingTimestamp(t))},onPause:function(t,n){e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1))},onPlay:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().isSeeking()&&(e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().getClip().addSeekingAmount(i),e.getPlaylist().getClip().setSeeking(!1)),e.getPlaylist().isPlaylistStarted()||(e.getPlaylist().setPlaylistStarted(!0),e.getPlaylist().incrementPlaybackCounter()),e.getPlaylist().getClip().setClipStarted(!0),e.getPlaylist().getClip().setPlaybackStarted(!0),e.getPlaylist().getClip().incrementSegmentPlaybackCounter(),(0==e.getPlaylist().getClip().getLowestPartNumberPlayed()||parseInt(e.getPlaylist().getClip().getLabels().ns_st_pn)<=e.getPlaylist().getClip().getLowestPartNumberPlayed())&&(e.getPlaylist().getClip().setLowestPartNumberPlayed(parseInt(e.getPlaylist().getClip().getLabels().ns_st_pn)),e.getPlaylist().getClip().incrementAssetPlaybackCounter(),e.getPlaylist().getClip().resetAssetPlaybackCounters()),e.getPlaylist().getClip().incrementPlayCounter(),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getSSECore().isLoadingTimeSent()||(n.ns_st_lt=String(e.getSSECore().getLoadTimeOffset()+t-e.getSSECore().getInitTimestamp()),e.getSSECore().setLoadingTimeSent(!0)),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)}})},k=function(e){var t=this;o.extend(t,{onEndAndSkip:function(t,n){e.getSSECore().resetHeartbeat(),e.getSSECore().resetKeepAlive(),e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().addElapsedTime(t);var i=e.getSSECore().createLabels(l.END,n,t);e.getEventManager().newEvent(i),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().setSeekingTimeBeforeEnd(t-e.getPlaylist().getClip().getSeekingTimestamp()),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().storeClipPlaybackCounters(),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onPause:function(t,n){e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t)},onPlay:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().isSeeking()&&(e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().getClip().addSeekingAmount(i),e.getPlaylist().getClip().setSeeking(!1)),e.getPlaylist().getClip().incrementPlayCounter(),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)}})},S=function(e){var t=this;o.extend(t,{onPauseOnBuffering:function(t,n){var i=parseInt(n.ns_st_po);e.getSSECore().stopPausedOnBufferingTimer(),e.getHeartbeat().pause(),e.getSSECore().resetKeepAlive(),e.getPlaylist().addPlaybackTime(t),e.getPlaylist().getClip().addPlaybackTime(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().addInterval(i),e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().incrementPauses(),e.getPlaylist().getClip().incrementPauses();var a=e.getSSECore().createLabels(l.PAUSE,n,t);e.getEventManager().newEvent(a),e.getPlaylist().setBufferingTimestamp(t),e.getPlaylist().getClip().setBufferingTimestamp(t),e.getPlaylist().getClip().setPlaybackTimeOffset(i)},onBufferStop:function(t,n){e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t)},onEndOrAdSkip:function(t,n){var i=parseInt(n.ns_st_po);e.getSSECore().resetHeartbeat(),e.getSSECore().resetKeepAlive(),e.getSSECore().stopPausedOnBufferingTimer(),e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().addPlaybackTime(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().addInterval(i);var a=e.getSSECore().createLabels(l.END,n,t);e.getEventManager().newEvent(a),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onSeekStart:function(t,n){var i=parseInt(n.ns_st_po);e.getSSECore().stopPausedOnBufferingTimer(),e.getPlaylist().addPlaybackTime(t),e.getPlaylist().getClip().addPlaybackTime(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().addInterval(i),e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().incrementSeeks(),e.getPlaylist().getClip().setSeeking(!0),e.getPlaylist().getClip().setCollectingSeekingTime(!0),e.getPlaylist().getClip().setSeekStartPosition(i),e.getPlaylist().getClip().setSeekingTimestamp(t),e.getPlaylist().incrementPauses(),e.getPlaylist().getClip().incrementPauses();var a=e.getSSECore().createLabels(l.PAUSE,n,t);e.getEventManager().newEvent(a)},onPause:function(t,n){var i=parseInt(n.ns_st_po);e.getSSECore().stopPausedOnBufferingTimer(),e.getPlaylist().addPlaybackTime(t),e.getPlaylist().getClip().addPlaybackTime(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().addInterval(i),e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().incrementPauses(),e.getPlaylist().getClip().incrementPauses();var a=e.getSSECore().createLabels(l.PAUSE,n,t);e.getEventManager().newEvent(a)},onPlay:function(t,n){e.getSSECore().stopPausedOnBufferingTimer(),e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t)}})},C=function(e){var t=this;o.extend(t,{onEndOrAdSkip:function(t,n){e.getSSECore().resetHeartbeat(),e.getSSECore().resetKeepAlive(),e.getSSECore().stopPausedOnBufferingTimer(),e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().addElapsedTime(t);var i=e.getSSECore().createLabels(l.END,n,t);e.getEventManager().newEvent(i),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().setSeekingTimeBeforeEnd(t-e.getPlaylist().getClip().getSeekingTimestamp()),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().storeClipPlaybackCounters(),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onPause:function(t,n){e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().incrementPauses(),e.getPlaylist().getClip().incrementPauses(),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1))},onPlay:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().isSeeking()&&(e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().getClip().addSeekingAmount(i),e.getPlaylist().getClip().setSeeking(!1)),e.getPlaylist().getClip().incrementPlayCounter(),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)}})},b=function(e){var t=this;o.extend(t,{onBuffer:function(t,n){e.getPlaylist().getClip().setSeekingTime(e.getPlaylist().getClip().getSeekingTimeBeforeEnd()),e.getPlaylist().setBufferingTimestamp(t),e.getPlaylist().getClip().setBufferingTimestamp(t)},onSeekStart:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().getClip().setSeekingTime(e.getPlaylist().getClip().getSeekingTimeBeforeEnd()),e.getPlaylist().getClip().incrementSeeks(),e.getPlaylist().getClip().setSeeking(!0),e.getPlaylist().getClip().setCollectingSeekingTime(!0),e.getPlaylist().getClip().setSeekStartPosition(i),e.getPlaylist().getClip().setSeekingTimestamp(t)},onPlay:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().getClip().setSeekingTime(e.getPlaylist().getClip().getSeekingTimeBeforeEnd()),e.getPlaylist().getClip().isSeeking()&&(e.getPlaylist().getClip().addSeekingAmount(i),e.getPlaylist().getClip().setSeeking(!1)),e.getPlaylist().isPlaylistStarted()||(e.getPlaylist().setPlaylistStarted(!0),e.getPlaylist().incrementPlaybackCounter()),e.getPlaylist().getClip().setClipStarted(!0),e.getPlaylist().getClip().setPlaybackStarted(!0),e.getPlaylist().getClip().incrementSegmentPlaybackCounter(),(0==e.getPlaylist().getClip().getLowestPartNumberPlayed()||parseInt(e.getPlaylist().getClip().getLabel("ns_st_pn"))<=e.getPlaylist().getClip().getLowestPartNumberPlayed())&&(e.getPlaylist().getClip().setLowestPartNumberPlayed(parseInt(e.getPlaylist().getClip().getLabel("ns_st_pn"))),e.getPlaylist().getClip().incrementAssetPlaybackCounter(),e.getPlaylist().getClip().resetAssetPlaybackCounters()),e.getPlaylist().getClip().incrementPlayCounter(),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getSSECore().isLoadingTimeSent()||(n.ns_st_lt=String(e.getSSECore().getLoadTimeOffset()+t-e.getSSECore().getInitTimestamp()),e.getSSECore().setLoadingTimeSent(!0)),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)}})},P=function(e){var t=this;o.extend(t,{onEndOrAdSkip:function(t,n){e.getSSECore().resetHeartbeat(),e.getSSECore().resetKeepAlive(),e.getPlaylist().getClip().addElapsedTime(t);var i=e.getSSECore().createLabels(l.END,n,t);e.getEventManager().newEvent(i),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().setSeekingTimeBeforeEnd(t-e.getPlaylist().getClip().getSeekingTimestamp()),e.getPlaylist().getClip().setSeeking(!1)),e.getPlaylist().storeClipPlaybackCounters(),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onPlay:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().getClip().isSeeking()&&(e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().getClip().addSeekingAmount(i),e.getPlaylist().getClip().setSeeking(!1)),e.getPlaylist().getClip().incrementPlayCounter(),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)}})},A=function(e){var t=this;o.extend(t,{onEndOrAdSkip:function(t,n){e.getSSECore().resetHeartbeat(),e.getSSECore().resetKeepAlive(),e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().addElapsedTime(t);var i=e.getSSECore().createLabels(l.END,n,t);e.getEventManager().newEvent(i),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().setSeekingTimeBeforeEnd(t-e.getPlaylist().getClip().getSeekingTimestamp()),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().storeClipPlaybackCounters(),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onBufferStop:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)},onSeekStart:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().isSeeking()?e.getPlaylist().getClip().isCollectingSeekingTime()||(e.getPlaylist().getClip().setSeekingTimestamp(t),e.getPlaylist().getClip().setCollectingSeekingTime(!0)):e.getPlaylist().getClip().incrementSeeks(),e.getPlaylist().getClip().isSeeking()||(e.getPlaylist().getClip().setSeeking(!0),e.getPlaylist().getClip().setCollectingSeekingTime(!0),e.getPlaylist().getClip().setSeekStartPosition(i),e.getPlaylist().getClip().setSeekingTimestamp(t))},onPause:function(t,n){e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().incrementPauses(),e.getPlaylist().getClip().incrementPauses()},onPlay:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().addBufferingTime(t),e.getPlaylist().getClip().addBufferingTime(t),e.getPlaylist().getClip().incrementPlayCounter(),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)}})},E=function(e){var t=this;o.extend(t,{onEndOrAdSkip:function(t,n){e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().setSeekingTimeBeforeEnd(t-e.getPlaylist().getClip().getSeekingTimestamp()),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().storeClipPlaybackCounters(),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onSeekStart:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().getClip().isSeeking()?e.getPlaylist().getClip().setSeekingTimestamp(t):e.getPlaylist().getClip().incrementSeeks(),e.getPlaylist().getClip().isSeeking()||(e.getPlaylist().getClip().setSeeking(!0),e.getPlaylist().getClip().setCollectingSeekingTime(!0),e.getPlaylist().getClip().setSeekStartPosition(i),e.getPlaylist().getClip().setSeekingTimestamp(t))},onPlay:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().getClip().isSeeking()&&(e.getPlaylist().getClip().addSeekingAmount(i),e.getPlaylist().getClip().setSeeking(!1)),e.getPlaylist().isPlaylistStarted()||(e.getPlaylist().setPlaylistStarted(!0),e.getPlaylist().incrementPlaybackCounter()),e.getPlaylist().getClip().setClipStarted(!0),e.getPlaylist().getClip().setPlaybackStarted(!0),e.getPlaylist().getClip().incrementSegmentPlaybackCounter(),(0==e.getPlaylist().getClip().getLowestPartNumberPlayed()||parseInt(e.getPlaylist().getClip().getLabels().ns_st_pn)<=e.getPlaylist().getClip().getLowestPartNumberPlayed())&&(e.getPlaylist().getClip().setLowestPartNumberPlayed(parseInt(e.getPlaylist().getClip().getLabels().ns_st_pn)),e.getPlaylist().getClip().incrementAssetPlaybackCounter(),e.getPlaylist().getClip().resetAssetPlaybackCounters()),e.getPlaylist().getClip().incrementPlayCounter(),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getSSECore().isLoadingTimeSent()||(n.ns_st_lt=String(e.getSSECore().getLoadTimeOffset()+t-e.getSSECore().getInitTimestamp()),e.getSSECore().setLoadingTimeSent(!0)),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)}})},I=function(e){var t=this;o.extend(t,{onEndOrAdSkip:function(t,n){var i=parseInt(n.ns_st_po);e.getSSECore().resetHeartbeat(),e.getSSECore().resetKeepAlive(),e.getPlaylist().addPlaybackTime(t),e.getPlaylist().getClip().addPlaybackTime(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().addInterval(i);var a=e.getSSECore().createLabels(l.END,n,t);e.getEventManager().newEvent(a),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onBuffer:function(t,n){e.getSSECore().isPauseOnBufferingEnabled()&&e.getSSECore().startPausedOnBufferingTimer(t,n),e.getPlaylist().getClip().incrementBufferCount(),e.getPlaylist().setBufferingTimestamp(t),e.getPlaylist().getClip().setBufferingTimestamp(t)},onSeekStart:function(t,n){var i=parseInt(n.ns_st_po);e.getHeartbeat().pause(),e.getSSECore().resetKeepAlive(),e.getPlaylist().addPlaybackTime(t),e.getPlaylist().getClip().addPlaybackTime(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().addInterval(i),e.getPlaylist().getClip().incrementSeeks(),e.getPlaylist().getClip().setSeeking(!0),e.getPlaylist().getClip().setCollectingSeekingTime(!0),e.getPlaylist().getClip().setSeekStartPosition(i),e.getPlaylist().getClip().setSeekingTimestamp(t),e.getPlaylist().incrementPauses(),e.getPlaylist().getClip().incrementPauses();var a=e.getSSECore().createLabels(l.PAUSE,n,t);e.getEventManager().newEvent(a)},onPause:function(t,n){var i=parseInt(n.ns_st_po);e.getHeartbeat().pause(),e.getSSECore().resetKeepAlive(),e.getPlaylist().addPlaybackTime(t),e.getPlaylist().getClip().addPlaybackTime(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().addInterval(i),e.getPlaylist().incrementPauses(),e.getPlaylist().getClip().incrementPauses();var a=e.getSSECore().createLabels(l.PAUSE,n,t);e.getEventManager().newEvent(a)}})},T=function(e){var t=this;o.extend(t,{onEndOrAdSkip:function(t,n){e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().setSeekingTimeBeforeEnd(t-e.getPlaylist().getClip().getSeekingTimestamp()),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().storeClipPlaybackCounters(),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onPause:function(t,n){e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1))},onPlay:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().getClip().isSeeking()&&(e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().getClip().addSeekingAmount(i),e.getPlaylist().getClip().setSeeking(!1)),e.getPlaylist().isPlaylistStarted()||(e.getPlaylist().setPlaylistStarted(!0),e.getPlaylist().incrementPlaybackCounter()),e.getPlaylist().getClip().setClipStarted(!0),e.getPlaylist().getClip().setPlaybackStarted(!0),e.getPlaylist().getClip().incrementSegmentPlaybackCounter(),(0==e.getPlaylist().getClip().getLowestPartNumberPlayed()||parseInt(e.getPlaylist().getClip().getLabels().ns_st_pn)<=e.getPlaylist().getClip().getLowestPartNumberPlayed())&&(e.getPlaylist().getClip().setLowestPartNumberPlayed(parseInt(e.getPlaylist().getClip().getLabels().ns_st_pn)),e.getPlaylist().getClip().incrementAssetPlaybackCounter(),e.getPlaylist().getClip().resetAssetPlaybackCounters()),e.getPlaylist().getClip().incrementPlayCounter(),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getSSECore().isLoadingTimeSent()||(n.ns_st_lt=String(e.getSSECore().getLoadTimeOffset()+t-e.getSSECore().getInitTimestamp()),e.getSSECore().setLoadingTimeSent(!0)),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)}})},D=function(e){var t=this;o.extend(t,{onPause:function(t,n){e.getPlaylist().incrementPauses(),e.getPlaylist().getClip().incrementPauses(),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1))}})},N=function(e){var t=this;o.extend(t,{onEndOrAdSkip:function(t,n){parseInt(n.ns_st_po),e.getSSECore().resetHeartbeat(),e.getSSECore().resetKeepAlive(),e.getPlaylist().getClip().addElapsedTime(t);var i=e.getSSECore().createLabels(l.END,n,t);e.getEventManager().newEvent(i),e.getPlaylist().getClip().isSeeking()&&e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().setSeekingTimeBeforeEnd(t-e.getPlaylist().getClip().getSeekingTimestamp()),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().storeClipPlaybackCounters(),e.getPlaylist().getClip().resetClipLifecycleLabels(),e.getPlaylist().getClip().setPlaybackStarted(!1),n.hasOwnProperty("ns_st_pe")&&o.parseBoolean(n.ns_st_pe,!1)&&e.getSSECore().resetPlaylist()},onPlay:function(t,n){var i=parseInt(n.ns_st_po);e.getPlaylist().getClip().isSeeking()&&(e.getPlaylist().getClip().isCollectingSeekingTime()&&(e.getPlaylist().getClip().addSeekingTime(t),e.getPlaylist().getClip().setCollectingSeekingTime(!1)),e.getPlaylist().getClip().addSeekingAmount(i),e.getPlaylist().getClip().setSeeking(!1)),e.getPlaylist().getClip().incrementPlayCounter(),e.getPlaylist().setPlaybackTimestamp(t),e.getPlaylist().getClip().setPlaybackTimestamp(t),e.getPlaylist().getClip().addElapsedTime(t),e.getPlaylist().getClip().setElapsedTimestamp(t),e.getPlaylist().getClip().setPlaybackStartPosition(i),e.getSSECore().isLoadingTimeSent()||(n.ns_st_lt=String(e.getSSECore().getLoadTimeOffset()+t-e.getSSECore().getInitTimestamp()),e.getSSECore().setLoadingTimeSent(!0)),e.getHeartbeat().resume(),e.getKeepAlive().resume();var a=e.getSSECore().createLabels(l.PLAY,n,t);e.getEventManager().newEvent(a)}})},w=function(){function e(){r=new R(ne),o.getNamespace().comScore?(ie=o.getNamespace().comScore.exports,r.setAppCore(ie.c())):r.setAppCore(null),r.setKeepAlive(new g(r)),r.setHeartbeat(new f(r)),r.setEventManager(new m(r)),r.setStateMachine(new y),r.setPlaylist(new v),$={},p=new b(r),w=new P(r),x=new E(r),L=new I(r),F=new _(r),M=new S(r),V=new C(r),O=new k(r),U=new A(r),B=new T(r),j=new D(r),q=new N(r),G=new h(r),H=!1,K=0,z=+new Date,W=!0,Z=!1,X=[]}function t(e){var t=r.getStateMachine().getCurrentState();if(t==d.IDLE||t==d.PLAYBACK_NOT_STARTED||t==d.BUFFERING_BEFORE_PLAYBACK||t==d.SEEKING_BEFORE_PLAYBACK){if(e==l.PLAY)return!0}else if(t==d.PLAYING){if(e==l.END||e==l.AD_SKIP||e==l.SEEK_START||e==l.PAUSE)return!0}else if(t==d.PAUSED||t==d.BUFFERING_DURING_PAUSE||t==d.SEEKING_DURING_PLAYBACK||t==d.SEEKING_DURING_BUFFERING||t==d.SEEKING_DURING_PAUSE){if(e==l.END||e==l.AD_SKIP||e==l.PLAY)return!0}else if(t==d.BUFFERING_DURING_PLAYBACK){if(e==l.PAUSE_ON_BUFFERING||e==l.END||e==l.AD_SKIP||e==l.SEEK_START||e==l.PAUSE||e==l.PLAY)return!0}else if(t==d.BUFFERING_DURING_SEEKING){if(e==l.END||e==l.AD_SKIP||e==l.PAUSE||e==l.PLAY)return!0}else if(t==d.PAUSED_DURING_BUFFERING&&(e==l.END||e==l.AD_SKIP||e==l.BUFFER_STOP||e==l.PLAY))return!0;return!1}function n(e,n,i){var a=r.getStateMachine().getCurrentState();e==l.AD_SKIP&&!i.hasOwnProperty("ns_st_ui")&&t(e)?i.ns_st_ui="skip":e==l.SEEK_START&&!i.hasOwnProperty("ns_st_ui")&&t(e)&&(i.ns_st_ui="seek"),a==d.IDLE?e==l.BUFFER?p.onBuffer(n,i):e==l.SEEK_START?p.onSeekStart(n,i):e==l.PLAY&&p.onPlay(n,i):a==d.PLAYBACK_NOT_STARTED?e==l.END||e==l.AD_SKIP?x.onEndOrAdSkip(n,i):e==l.SEEK_START?x.onSeekStart(n,i):e==l.PLAY?x.onPlay(n,i):e==l.BUFFER&&G.onBufferWhenSeekingOrPlayBackNotStartedOrPaused(n,i):a==d.PLAYING?e==l.END||e==l.AD_SKIP?L.onEndOrAdSkip(n,i):e==l.BUFFER?L.onBuffer(n,i):e==l.SEEK_START?L.onSeekStart(n,i):e==l.PAUSE&&L.onPause(n,i):a==d.PAUSED?e==l.END||e==l.AD_SKIP?w.onEndOrAdSkip(n,i):e==l.PLAY?w.onPlay(n,i):e==l.BUFFER?G.onBufferWhenSeekingOrPlayBackNotStartedOrPaused(n,i):e==l.SEEK_START&&G.onSeekStartWhenPausedOrBufferingDuringPause(n,i):a==d.BUFFERING_BEFORE_PLAYBACK?e==l.END||e==l.AD_SKIP?F.onEndOrAdSkip(n,i):e==l.BUFFER_STOP?F.onBufferStop(n,i):e==l.SEEK_START?F.onSeekStart(n,i):e==l.PAUSE?F.onPause(n,i):e==l.PLAY&&F.onPlay(n,i):a==d.BUFFERING_DURING_PLAYBACK?e==l.PAUSE_ON_BUFFERING?M.onPauseOnBuffering(n,i):e==l.BUFFER_STOP?M.onBufferStop(n,i):e==l.END||e==l.AD_SKIP?M.onEndOrAdSkip(n,i):e==l.SEEK_START?M.onSeekStart(n,i):e==l.PAUSE?M.onPause(n,i):e==l.PLAY&&M.onPlay(n,i):a==d.BUFFERING_DURING_SEEKING?e==l.END||e==l.AD_SKIP?V.onEndOrAdSkip(n,i):e==l.PAUSE?V.onPause(n,i):e==l.PLAY?V.onPlay(n,i):e==l.BUFFER_STOP&&G.onBufferStopWhenBufferingDuringSeekingOrBufferingDuringPause(n,i):a==d.BUFFERING_DURING_PAUSE?e==l.END||e==l.AD_SKIP?O.onEndAndSkip(n,i):e==l.PAUSE?O.onPause(n,i):e==l.PLAY?O.onPlay(n,i):e==l.SEEK_START?G.onSeekStartWhenPausedOrBufferingDuringPause(n,i):e==l.BUFFER_STOP&&G.onBufferStopWhenBufferingDuringSeekingOrBufferingDuringPause(n,i):a==d.SEEKING_BEFORE_PLAYBACK?e==l.END||e==l.AD_SKIP?B.onEndOrAdSkip(n,i):e==l.PAUSE?B.onPause(n,i):e==l.PLAY?B.onPlay(n,i):e==l.BUFFER&&G.onBufferWhenSeekingOrPlayBackNotStartedOrPaused(n,i):a==d.SEEKING_DURING_PLAYBACK?e==l.END||e==l.AD_SKIP?q.onEndOrAdSkip(n,i):e==l.PLAY?q.onPlay(n,i):e==l.BUFFER?G.onBufferWhenSeekingOrPlayBackNotStartedOrPaused(n,i):e==l.PAUSE&&G.onPauseWhenSeekingDuringPlaybackOrSeekingDuringPause(n,i):a==d.SEEKING_DURING_BUFFERING?e==l.PAUSE?j.onPause(n,i):e==l.BUFFER?G.onBufferWhenSeekingOrPlayBackNotStartedOrPaused(n,i):e==l.PLAY?G.onPlayWhenSeekingDuringBufferingOrSeekingDuringPause(n,i):e==l.END||e==l.AD_SKIP?G.onEndOrAdSkipWhenSeekingDuringBufferingOrSeekingDuringPause(n,i):e==l.BUFFER_STOP&&G.onBufferStopWhenSeekingDuringBufferingOrSeekingDuringPause(n,i):a==d.PAUSED_DURING_BUFFERING?e==l.END||e==l.AD_SKIP?U.onEndOrAdSkip(n,i):e==l.BUFFER_STOP?U.onBufferStop(n,i):e==l.SEEK_START?U.onSeekStart(n,i):e==l.PAUSE?U.onPause(n,i):e==l.PLAY&&U.onPlay(n,i):a==d.SEEKING_DURING_PAUSE&&(e==l.BUFFER?G.onBufferWhenSeekingOrPlayBackNotStartedOrPaused(n,i):e==l.PLAY?G.onPlayWhenSeekingDuringBufferingOrSeekingDuringPause(n,i):e==l.PAUSE?G.onPauseWhenSeekingDuringPlaybackOrSeekingDuringPause(n,i):e==l.END||e==l.AD_SKIP?G.onEndOrAdSkipWhenSeekingDuringBufferingOrSeekingDuringPause(n,i):e==l.BUFFER_STOP&&G.onBufferStopWhenSeekingDuringBufferingOrSeekingDuringPause(n,i)),t(e)&&r.getPlaylist().setFirstEventSent(!0)}function i(e,t){for(var n,i=ee.encodeURIComponent||escape,a=[],r=c.LABELS_ORDER,s=e.split("?"),l=s[0],d=s[1].split("&"),u=0,p=d.length;p>u;u++){var v=d[u].split("="),m=unescape(v[0]),f=unescape(v[1]);m&&(t[m]=f)}for(var g={},y=0,h=r.length;h>y;y++){var _=r[y];if(t.hasOwnProperty(_)){var k=t[_];void 0!==k&&null!=k&&(g[_]=!0,a.push(i(_)+"="+i(t[_])))}}for(var S in t)if(t.hasOwnProperty(S)){if(g[S])continue;var C=t[S];void 0!==C&&null!=C&&a.push(i(S)+"="+i(t[S]))}n=(n=l+"?"+a.join("&"))+(n.indexOf("&c8=")<0?"&c8="+i(te.title):"")+(n.indexOf("&c7=")<0?"&c7="+i(te.URL):"")+(n.indexOf("&c9=")<0?"&c9="+i(te.referrer):"");var b=o.browserAcceptsLargeURLs()?c.URL_LENGTH_LIMIT:c.RESTRICTED_URL_LENGTH_LIMIT;if(n.length>b&&n.indexOf("&")>0){var P=n.substr(0,b-8).lastIndexOf("&");n=(n.substring(0,P)+"&ns_cut="+i(n.substring(P+1))).substr(0,b)}return n}var r,p,w,x,L,F,M,V,O,U,B,j,q,G,H,K,z,W,Q,Z,Y,X,$,J,ee,te,ne=this,ie={},ae=c.DEFAULT_PAUSED_ON_BUFFERING_INTERVAL,re=c.THROTTLING_DELAY;o.extend(ne,{createLabels:function(e,t,n){var i={};if("undefined"!=typeof document){var a=document;i.c7=a.URL,i.c8=a.title,i.c9=a.referrer}return null!=t&&o.extend(i,t),i.ns_ts=null!=i.ns_ts?i.ns_ts:String(+new Date),i.ns_st_ev=null!=i.ns_st_ev?i.ns_st_ev:l.toString(e),i.ns_st_mp=null!=i.ns_st_mp?i.ns_st_mp:c.DEFAULT_PLAYERNAME,i.ns_st_mv=null!=i.ns_st_mv?i.ns_st_mv:c.STREAMSENSE_VERSION,i.ns_st_ub=null!=i.ns_st_ub?i.ns_st_ub:"0",i.ns_st_br=null!=i.ns_st_br?i.ns_st_br:"0",i.ns_st_pn=null!=i.ns_st_pn?i.ns_st_pn:"1",i.ns_st_tp=null!=i.ns_st_tp?i.ns_st_tp:"1",i.ns_st_it=null!=i.ns_st_it?i.ns_st_it:u.toString(u.SINGLE_CLIP),i.ns_st_sv=null!=i.ns_st_sv?i.ns_st_sv:c.STREAMSENSE_VERSION,i.ns_st_smv=null!=i.ns_st_smv?i.ns_st_smv:c.MODEL_VERSION,i.ns_type=null!=i.ns_type?i.ns_type:"hidden",i.ns_st_ec=null!=i.ns_st_ec?i.ns_st_ec:String(r.getEventManager().getEventCounter()),i.ns_st_po=null!=i.ns_st_po?i.ns_st_po:String(r.getPlaylist().getPlaylist().getClip().getExpectedPlaybackPosition(n)),i.ns_st_ki=null!=i.ns_st_ki?i.ns_st_ki:String(r.getKeepAlive().getInterval()),r.getPlaylist().createLabels(i),r.getPlaylist().getClip().createLabels(i),o.extend(i,ne.getLabels()),o.extend(i,t),{eventType:e,eventLabels:i}},newEvent:function(e,t,i,a){ne.stopDelayedTransitionTimer();var o=r.getStateMachine().getCurrentState(),s=r.getStateMachine().eventTypeToState(e);if(null!=s&&s!=o)if(!ne.isThrottlingEnabled()||o!=d.PLAYING&&o!=d.PAUSED||s!=d.PLAYING&&s!=d.PAUSED||a){i.ns_st_po||(r.getStateMachine().getCurrentState()==d.PLAYING&&e==l.BUFFER||r.getStateMachine().getCurrentState()==d.BUFFERING_DURING_PLAYBACK&&e==l.BUFFER_STOP?i.ns_st_po=String(r.getPlaylist().getClip().getPlaybackTimeOffset()+(t-r.getPlaylist().getClip().getPlaybackTimestamp())):i.ns_st_po=String(r.getPlaylist().getClip().getExpectedPlaybackPosition(t))),n(e,t,i);var u=0;isNaN(r.getStateMachine().getLastStateChangeTimestamp())||(u=t-r.getStateMachine().getLastStateChangeTimestamp()),r.getStateMachine().newEvent(e,t);for(var c=0,p=X.length;p>c;c++)X[c](o,s,i,u)}else Y=r.getPlatformAPI().setTimeout(function(e,n,i){return function(){ne.newEvent(e,t,i,!0)}}(e,0,i),re)},newPseudoEvent:function(e,t,n){if(e!=l.LOAD&&e!=l.START||r.getStateMachine().getCurrentState()==d.IDLE){e!=l.ERROR||n.ns_st_er||(n.ns_st_er=s.UNKNOWN_VALUE),r.getStateMachine().getCurrentState()!=d.IDLE&&r.getStateMachine().getCurrentState()!=d.PLAYBACK_NOT_STARTED&&r.getStateMachine().getCurrentState()!=d.SEEKING_BEFORE_PLAYBACK&&r.getStateMachine().getCurrentState()!=d.BUFFERING_BEFORE_PLAYBACK&&(r.getPlaylist().getClip().addElapsedTime(t),r.getPlaylist().getClip().setElapsedTimestamp(t));var i,a,o,u=!0,c=!1;switch(e){case l.BIT_RATE:i="ns_st_br",a="ns_st_pbr",c=!0;break;case l.PLAYBACK_RATE:i="ns_st_rt",a="ns_st_prt",c=!0;break;case l.VOLUME:i="ns_st_vo",a="ns_st_pvo",c=!0;break;case l.WINDOW_STATE:i="ns_st_ws",a="ns_st_pws",c=!0;break;case l.AUDIO:i="ns_st_at",a="ns_st_pat",c=!1;break;case l.VIDEO:i="ns_st_vt",a="ns_st_pvt",c=!1;break;case l.SUBS:i="ns_st_tt",a="ns_st_ptt",c=!1;break;case l.CDN:i="ns_st_cdn",a="ns_st_pcdn",c=!1;break;default:u=!1}if(u&&n.hasOwnProperty(i)&&(c?(ne.getLabels().hasOwnProperty(i)&&(o=ne.getLabels()[i],n[a]=o),ne.setLabel(i,n[i])):(r.getPlaylist().getClip().getLabels().hasOwnProperty(i)&&(o=r.getPlaylist().getClip().getLabels()[i],n[a]=o),r.getPlaylist().getClip().setLabel(i,n[i]))),!u||r.getStateMachine().getCurrentState()==d.PLAYING||r.getStateMachine().getCurrentState()==d.BUFFERING_DURING_PLAYBACK){n.ns_st_po||(n.ns_st_po=String(r.getPlaylist().getClip().getExpectedPlaybackPosition(t))),r.getStateMachine().getCurrentState()!=d.PLAYING&&r.getStateMachine().getCurrentState()!=d.BUFFERING_DURING_PLAYBACK||(r.getPlaylist().addPlaybackTime(t),r.getPlaylist().setPlaybackTimestamp(t),r.getPlaylist().getClip().addPlaybackTime(t),r.getPlaylist().getClip().setPlaybackTimestamp(t),r.getPlaylist().getClip().addInterval(parseInt(n.ns_st_po)),r.getPlaylist().getClip().setPlaybackStartPosition(parseInt(n.ns_st_po))),r.getStateMachine().getCurrentState()!=d.BUFFERING_BEFORE_PLAYBACK&&r.getStateMachine().getCurrentState()!=d.BUFFERING_DURING_PAUSE&&r.getStateMachine().getCurrentState()!=d.BUFFERING_DURING_PLAYBACK&&r.getStateMachine().getCurrentState()!=d.BUFFERING_DURING_SEEKING||(r.getPlaylist().addBufferingTime(t),r.getPlaylist().setBufferingTimestamp(t),r.getPlaylist().getClip().addBufferingTime(t),r.getPlaylist().getClip().setBufferingTimestamp(t));var p=ne.createLabels(e,n,t);r.getEventManager().newEvent(p)}}},getState:function(){return r.getStateMachine().getCurrentState()},addListener:function(e){X.push(e)},removeListener:function(e){X.splice(o.indexOf(e,X),1)},getLabel:function(e){return $[e]},getLabels:function(){return $},setLabel:function(e,t){null==t?delete $[e]:$[e]=t},setLabels:function(e){for(var t in e)e.hasOwnProperty(t)&&ne.setLabel(t,e[t])},getPlatformAPI:function(){return r.getAppCore()?r.getAppCore().getPlatformAPI():a},getExports:function(){return ie},isProperlyInitialized:function(){var e=r.getAppCore().getAppContext(),t=r.getAppCore().getSalt(),n=r.getAppCore().getPixelURL();return e&&n&&t},setImplementationType:function(e){r.getStateMachine().getCurrentState()!=d.IDLE||e!=u.SINGLE_CLIP&&e!=u.SEGMENTED&&e!=u.REDUCED||r.getPlaylist().setLabel("ns_st_it",u.toString(e))},setThrottlingDelay:function(e){re=e},getThrottlingDelay:function(){return re},isThrottlingEnabled:function(){return Z},setThrottlingEnabled:function(e){Z=e},isLoadingTimeSent:function(){return H},setLoadingTimeSent:function(e){H=e},getLoadTimeOffset:function(){return K},setLoadTimeOffset:function(e){K=e},getInitTimestamp:function(){return z},setPauseOnBufferingInterval:function(e){ae=e},getPauseOnBufferingInterval:function(){return ae},isPauseOnBufferingEnabled:function(){return W},setPauseOnBufferingEnabled:function(e){W=e},startPausedOnBufferingTimer:function(e,t){ne.stopPausedOnBufferingTimer(),Q=ne.getPlatformAPI().setTimeout((function(){var n={},i=o.fixEventTime(n),a=parseInt(t.ns_st_po);n.ns_st_po=String(a+i-e),ne.newEvent(l.PAUSE_ON_BUFFERING,i,n)}),ae)},stopPausedOnBufferingTimer:function(){null!=Q&&(ne.getPlatformAPI().clearTimeout(Q),Q=null)},stopDelayedTransitionTimer:function(){Y&&(ne.getPlatformAPI().clearTimeout(Y),Y=null)},setPixelURL:function(e){if(null==e||0==e.length)return null;var t=decodeURIComponent||unescape,n=e.indexOf("?");if(n>=0){if(na;a++){var o=i[a].split("=");2==o.length?ne.setLabel(o[0],t(o[1])):1==o.length&&ne.setLabel(c.PAGE_NAME_LABEL,t(o[0]))}e=e.substring(0,n+1)}}else e+="?";return J=e},getPixelURL:function(){return J||("undefined"!=typeof ns_p&&"string"==typeof ns_p.src?J=ns_p.src.replace(/&/,"&").replace(/&ns__t=\d+/,""):"string"==typeof ns_pixelUrl?J=ns_pixelUrl.replace(/&/,"&").replace(/&ns__t=\d+/,""):null)},getSseSM:function(){return r},resetPlaylist:function(e){var t=r.getPlaylist();r.setPlaylist(new v),v.resetPlaylist(t,r.getPlaylist(),e)},resetHeartbeat:function(){r.getHeartbeat().pause(),r.setHeartbeat(new f(r))},resetKeepAlive:function(){r.getKeepAlive().pause(),r.setKeepAlive(new g(r))}}),o.isBrowser()?(ee=window,te=document):(ee={},te={location:{href:""},title:"",URL:"",referrer:"",cookie:""}),o.extend(this,{prepareUrl:i}),e()},R=function(e){var t,n,i,a,r,s,l=this;o.extend(l,{getAppCore:function(){return t},getSSECore:function(){return e},getEventManager:function(){return n},getStateMachine:function(){return i},getHeartbeat:function(){return a},getKeepAlive:function(){return r},getPlaylist:function(){return s},setAppCore:function(e){t=e},setKeepAlive:function(e){r=e},setHeartbeat:function(e){a=e},setEventManager:function(e){n=e},setStateMachine:function(e){i=e},setPlaylist:function(e){s=e}})},x=function(e,t){function n(){u=new w,s=!0,e&&p.setLabels(e),t&&p.setPixelURL(t)}function i(e,t){p.notify(l.CUSTOM,e,t)}function a(){s&&u.getSseSM().getStateMachine().getCurrentState()!=d.IDLE&&p.end()}var s,u,p=this,m=c.STANDARD_METADATA_LABELS;o.extend(this,{isProperlyInitialized:function(){return u.isProperlyInitialized()},reset:function(e){var t=u;t.getSseSM().getKeepAlive().pause(),t.getSseSM().getHeartbeat().pause(),u=new w,v.resetPlaylist(t.getSseSM().getPlaylist(),u.getSseSM().getPlaylist(),e)},setPauseOnBufferingInterval:function(e){u.setPauseOnBufferingInterval(e)},getPauseOnBufferingInterval:function(){return u.getPauseOnBufferingInterval()},setKeepAliveInterval:function(e){u.getSseSM().getKeepAlive().setInterval(e)},getKeepAliveInterval:function(){return u.getSseSM().getKeepAlive().getInterval()},setHeartbeatIntervals:function(e){u.getSseSM().getHeartbeat().setIntervals(e)},play:function(e,t){p.notify(l.PLAY,e,t)},pause:function(e,t){p.notify(l.PAUSE,e,t)},end:function(e,t){p.notify(l.END,e,t)},bufferStart:function(e,t){p.notify(l.BUFFER,e,t)},bufferStop:function(e,t){p.notify(l.BUFFER_STOP,e,t)},load:function(e,t){p.notify(l.LOAD,e,t)},start:function(e,t){p.notify(l.START,e,t)},seekStart:function(e,t){p.notify(l.SEEK_START,e,t)},skipAd:function(e,t){p.notify(l.AD_SKIP,e,t)},callToAction:function(e,t){p.notify(l.CTA,e,t)},error:function(e,t){p.notify(l.ERROR,e,t)},transferPlayback:function(e,t){p.notify(l.TRANSFER,e,t)},drmFail:function(e,t){p.notify(l.DRM_FAILED,e,t)},drmApprove:function(e,t){p.notify(l.DRM_APPROVED,e,t)},drmDeny:function(e,t){p.notify(l.DRM_DENIED,e,t)},changeBitrate:function(e,t,n){if(null!=e){var i=n||{};i.ns_st_br=String(e),p.notify(l.BIT_RATE,i,t)}},changePlaybackRate:function(e,t,n){if(null!=e){var i=n||{};i.ns_st_rt=String(e),p.notify(l.PLAYBACK_RATE,i,t)}},changeVolume:function(e,t,n){if(null!=e){var i=n||{};i.ns_st_vo=String(e),p.notify(l.VOLUME,i,t)}},changeWindowState:function(e,t,n){if(null!=e){var i=n||{};i.ns_st_ws=String(e),p.notify(l.WINDOW_STATE,i,t)}},changeAudio:function(e,t,n){if(null!=e){var i=n||{};i.ns_st_at=String(e),p.notify(l.AUDIO,i,t)}},changeVideo:function(e,t,n){if(null!=e){var i=n||{};i.ns_st_vt=String(e),p.notify(l.VIDEO,i,t)}},changeSubtitle:function(e,t,n){if(null!=e){var i=n||{};i.ns_st_tt=String(e),p.notify(l.SUBS,i,t)}},changeCDN:function(e,t,n){if(null!=e){var i=n||{};i.ns_st_cdn=String(e),p.notify(l.CDN,i,t)}},notify:function(e){var t,n;if(t="object"==r(arguments[1])?arguments[1]:"object"==r(arguments[2])?arguments[2]:{},n="number"==typeof arguments[1]?arguments[1]:"number"==typeof arguments[2]?arguments[2]:NaN,l.toString(e)){t=o.jsonObjectToStringDictionary(t);var i=o.fixEventTime(t);t.ns_st_po||isNaN(n)||(t.ns_st_po=o.getInteger(n,0).toString()),t.ns_st_po&&u.getSseSM().getPlaylist().getClip().setPlaybackTimeOffset(parseInt(t.ns_st_po)),e==l.PLAY||e==l.PAUSE||e==l.BUFFER||e==l.END||e==l.SEEK_START||e==l.AD_SKIP||e==l.BUFFER_STOP?u.newEvent(e,i,t):u.newPseudoEvent(e,i,t)}},getLabels:function(){return u.getLabels()},getState:function(){return u.getSseSM().getStateMachine().getCurrentState()},setLabels:function(e){u.setLabels(e)},getLabel:function(e){return u.getLabel(e)},setLabel:function(e,t){u.setLabel(e,t)},getLoadTimeOffset:function(){return u.getLoadTimeOffset()},setLoadTimeOffset:function(e){u.setLoadTimeOffset(e)},setPixelURL:function(e){return u.setPixelURL(e)},getPixelURL:function(){return u.getSseSM().getSSECore().getPixelURL()},setImplementationType:function(e){u.setImplementationType(e)},isPauseOnBufferingEnabled:function(){return u.isPauseOnBufferingEnabled()},setPauseOnBufferingEnabled:function(e){u.setPauseOnBufferingEnabled(e)},isThrottlingEnabled:function(){return u.isThrottlingEnabled()},setThrottlingEnabled:function(e){u.setThrottlingEnabled(e)},setThrottlingDelay:function(e){u.setThrottlingDelay(e)},getThrottlingDelay:function(){return u.getThrottlingDelay()},setPlaybackIntervalMergeTolerance:function(e){u.getSseSM().getPlaylist().getClip().setPlaybackIntervalMergeTolerance(e)},getPlaybackIntervalMergeTolerance:function(){return u.getSseSM().getPlaylist().getClip().getPlaybackIntervalMergeTolerance()},setClip:function(e,t,n){if(void 0===n&&(n=!0),e=o.jsonObjectToStringDictionary(e),n&&u.getSseSM().getStateMachine().getCurrentState()!==d.IDLE&&p.end(),u.getSseSM().getStateMachine().getCurrentState()==d.IDLE){var i="",a=0;if(null!=e.ns_st_cn)i=String(e.ns_st_cn);else for(var r=0;r=t;t++)if(P.hasOwnProperty(String(t))){E=t;break}return e.StreamSense.activeIndex=E,E}function a(t,n){return n=n||null,(t=t||null)&&"object"==r(t)&&(n=t,t=null),P[++A]=new e.StreamSense(n,t),i(),P[A]}function s(){var t=!1,n=E;if("number"==typeof arguments[0]&&isFinite(arguments[0]))n=arguments[0];else if(arguments[0]instanceof e.StreamSense)for(var a in P)if(P.hasOwnProperty(a)&&P[a]===arguments[0]){n=a;break}return P.hasOwnProperty(String(n))&&(t=P[n],delete P[n],t.reset(),i()),t}function l(e){return e=e||{},n().setPlaylist(e),n().getPlaylist()}function d(e,t,i){return e=e||{},"number"==typeof t&&(e.ns_st_cn=String(t)),n().setClip(e,i),n().getClip()}function u(e,t,i){return void 0!==e&&(i=i||null,t=t||{},n().notify(e,t,i))}function c(e){void 0!==e&&n().setLabels(e)}function p(){return n().getLabels()}function v(e){void 0!==e&&n().getPlaylist().setLabels(e)}function m(){return n().getPlaylist().getLabels()}function f(e){void 0!==e&&n().getClip().setLabels(e)}function g(){return n().getClip().getLabels()}function y(e){return n().reset(e||{})}function h(e){return n().getPlaylist().reset(e||{})}function _(e){return n().getClip().reset(e||{})}function k(e){return e=e||{},n().viewNotify(null,e)}function S(e,t){return arguments.length>2&&(e=arguments[1],t=arguments[2]),e=e||{},"number"==typeof t&&(e.ns_st_po=String(t)),n().customNotify(e,t)}function C(){return n().exportState()}function b(e){n().importState(e)}var P={},A=-1,E=-1;o.extend(t,{activeIndex:E,newInstance:a,new:a,destroyInstance:s,destroy:s,newPlaylist:l,newClip:d,notify:u,setLabels:c,getLabels:p,setPlaylistLabels:v,getPlaylistLabels:m,setClipLabels:f,getClipLabels:g,resetInstance:y,resetPlaylist:h,resetClip:_,viewEvent:k,customEvent:S,exportState:C,importState:b})}(x),x.PlayerEvents=l,x.InternalStates=d,x.ImplementationType=u,x}(),e.StreamingTag=e.StreamingTag||(t=e.StreamSense,e.StreamSense.PlayerEvents,n=e.StreamSense.InternalStates||null,i=e.StreamSense.ImplementationType||null,a=null!=e.StreamSense.InternalStates&&null!=e.StreamSense.ImplementationType,function(){var e={LongFormOnDemand:"12",ShortFormOnDemand:"11",Live:"13",UserGeneratedLongFormOnDemand:"22",UserGeneratedShortFormOnDemand:"21",UserGeneratedLive:"23",Bumper:"99",Other:"00"},r={LinearOnDemandPreRoll:"11",LinearOnDemandMidRoll:"12",LinearOnDemandPostRoll:"13",LinearLive:"21",Other:"00"},s=function(e){function r(){if(a)if(o.getNamespace().comScore)(g=new t).setImplementationType(i.REDUCED);else if(o.exists(e))if(y=o.isTrue(e.debug),o.exists(e.customerC2)&&e.customerC2.length>0){var n=e.secure?"https://sb":"http"+("s"==document.location.href.charAt(4)?"s://sb":"://b");(g=new t).setPixelURL(n+".scorecardresearch.com/p?c1=2"),g.setLabel("c2",e.customerC2),g.setImplementationType(i.REDUCED)}else y&&console&&console.log("Warning: customerC2 is not provided (or incorrect) in the StreamingTag configuration.")}function s(e){for(var t in o.exists(e)||(e={}),_)_.hasOwnProperty(t)&&!o.exists(e[_[t]])&&("ns_st_ci"==_[t]?e.ns_st_ci="0":e[_[t]]="*null");return e}function l(e){for(var t in _)if(_.hasOwnProperty(t)&&!d(_[t],m,e))return!1;return!0}function d(e,t,n){if(o.exists(e)&&o.exists(t)&&o.exists(n)){var i=t[e],a=n[e];return o.exists(i)&&o.exists(a)&&i===a}return!1}function u(e){v++;var t={ns_st_cn:String(v),ns_st_pn:"1",ns_st_tp:"0"};o.extend(t,e),g.setClip(t),m=e,g.play()}function c(e){v++,e=s(e);var t={ns_st_cn:String(v),ns_st_pn:"1",ns_st_tp:"1",ns_st_ad:"1"};o.extend(t,e),g.setClip(t),g.play(),f=!1}function p(e,t){e=s(e),k==h.None&&(k=t),f&&k==t&&l(e)?(g.getClip().setLabels(e),g.getState()!=n.PLAYING&&g.play()):u(e),f=!0,k=t}var v=0,m=null,f=!1,g=null,y=!1,h={None:0,AudioContent:1,VideoContent:2},_=["ns_st_ci","c3","c4","c6","ns_st_st","ns_st_pu","ns_st_pr","ns_st_ep","ns_st_sn","ns_st_en","ns_st_ct"],k=h.None;o.extend(this,{playAdvertisement:function(){g&&(y&&console&&console.warn("Calling deprecated function 'playAdvertisement'. Please call 'playVideoAdvertisement' or 'playAudioAdvertisement' functions instead."),c({ns_st_ct:"va"}))},playVideoAdvertisement:function(e,t){if(g){var n={ns_st_ct:"va"};t?n.ns_st_ct="va"+t:y&&console&&console.warn("Calling 'playVideoAdvertisement' without specifying the media type as a second parameter."),e&&o.extend(n,e),c(n)}},playAudioAdvertisement:function(e,t){if(g){var n={ns_st_ct:"aa"};t?n.ns_st_ct="aa"+t:y&&console&&console.warn("Calling 'playAudioAdvertisement' without specifying the media type as a second parameter."),e&&o.extend(n,e),c(n)}},playContentPart:function(e){if(g){y&&console&&console.warn("Calling deprecated function 'playContentPart'. Please call 'playVideoContentPart' or 'playAudioContentPart' functions instead.");var t={ns_st_ct:"vc"};e&&o.extend(t,e),p(t,h.VideoContent)}},playVideoContentPart:function(e,t){if(g){var n={ns_st_ct:"vc"};t?n.ns_st_ct="vc"+t:y&&console&&console.warn("Calling 'playVideoContentPart' without specifying the media type as a second parameter."),e&&o.extend(n,e),p(n,h.VideoContent)}},playAudioContentPart:function(e,t){if(g){var n={ns_st_ct:"ac"};t?n.ns_st_ct="ac"+t:y&&console&&console.warn("Calling 'playAudioContentPart' without specifying the media type as a second parameter."),e&&o.extend(n,e),p(n,h.AudioContent)}},stop:function(){g&&g.pause()}}),r()};return s.ContentType=e,s.AdType=r,s}()),e}(a.ns_)}.apply(t,[]),void 0===i||(e.exports=i)},383361:function(){},757245:function(e,t,n){"use strict";n.d(t,{X:function(){return l}});var i=n(331635),a=n(474848),r=n(296540),o=n(733016),s=n(151702);function l(e){return function(t){var n;return n=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return(0,i.__extends)(r,n),r.prototype.render=function(){return(0,a.jsx)(o.t,(0,i.__assign)({},e,{children:(0,a.jsx)(t,(0,i.__assign)({},this.props))}))},r}(r.Component),n.displayName=(0,s.K)("WithErrorBoundary",t),n}}},879028:function(e,t,n){"use strict";n.d(t,{$:function(){return h}});var i=n(331635),a=n(474848),r=n(959340),o=n(914421),s=n(636367),l=n(97774),d=n(235233),u=n(298830),c=n(312663),p=n(26538),v=n(603707),m=n(296540),f=n.p+"assets/404_boxart-285x380-55299d79a777bd47e9e7.jpg",g=n(973474),y=function(e){function t(t){var n=e.call(this,t)||this;return n.setImage=function(e){var t=e.src,i=e.altSrc,a=new Image;a.onerror=function(){return n.setState({src:i})},a.onload=function(){return n.setState({src:t})},a.src=t},n.state={src:t.src},n}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.src&&this.setImage(this.props)},t.prototype.componentDidUpdate=function(e){e.src!==this.props.src&&this.setImage(this.props)},t.prototype.render=function(){return(0,a.jsx)(g.L,(0,i.__assign)({},this.props,{src:this.state.src}))},t}(m.Component),h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(){t.props.onClick&&t.props.onClick(t.props.index)},t}return(0,i.__extends)(t,e),t.prototype.render=function(){var e={src:this.props.imageURL,alt:this.props.text};return(0,a.jsx)(r.P,{className:"media-row",display:o.nl.Flex,flexWrap:o.I4.NoWrap,children:(0,a.jsx)(s.tD,{linkTo:this.props.linkTo,onClick:this.onClick,selected:this.props.active,children:(0,a.jsxs)(r.P,{display:o.nl.Flex,flexDirection:o.bo.Row,padding:.5,children:[(0,a.jsxs)(r.P,{className:"media-row__image-wrapper",flexGrow:0,flexShrink:0,borderRadius:l.Z.Small,overflow:o.nE.Hidden,position:o.yX.Relative,children:[(0,a.jsx)(d.j$,{align:d.W3.Center,ratio:d.gl.BoxArt,children:(0,a.jsx)(y,(0,i.__assign)({},e,{altSrc:f}))}),(0,a.jsx)(r.P,{className:this.props.active?"":"media-row__image-play-overlay",alignItems:o.k2.Center,background:o.VS.Overlay,color:o.Q1.Overlay,display:o.nl.Flex,justifyContent:o.A9.Center,position:o.yX.Absolute,attachTop:!0,attachBottom:!0,attachLeft:!0,attachRight:!0,children:(0,a.jsx)(u.A,{fillColor:"inherit"})})]}),(0,a.jsxs)(r.P,{display:o.nl.Flex,flexDirection:o.bo.Column,flexGrow:1,flexShrink:1,padding:{left:1,top:1},children:[(0,a.jsx)(r.P,{className:"media-row__info-text",children:(0,a.jsx)(c.N,{children:this.props.text})}),(0,a.jsx)(r.P,{className:"media-row__info-description",children:(0,a.jsx)(c.N,{children:this.props.description})})]}),this.renderCount()]})})})},t.prototype.renderCount=function(){return this.props.count?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.P,{alignSelf:o.gB.Center,children:(0,a.jsx)(p.a,{label:this.props.count.toString()})}),(0,a.jsx)(v.R,{fillColor:"alt"})]}):null},t}(m.Component)},940594:function(e,t,n){"use strict";n.d(t,{j8:function(){return s}});var i=n(331635),a=n(296540),r={};function o(e){return r[e]}var s=function(e,t){var n=(0,a.useState)(o(e)),s=n[0],l=n[1];return(0,a.useEffect)((function(){if(e){var n=function(t){!function(e,t){r[e].status=t}(e,t),l((0,i.__assign)({},o(e)))},a=function(){return n("loaded")},d=function(){return n("failed")},u=function(){return n("loading")},c=s||o(e),p=(null==c?void 0:c.element)||function(e){var t=document.createElement("script");return t.src=e,r[e]={element:t,status:"preload"},t}(e);return p.addEventListener("load",a),p.addEventListener("error",d),p.addEventListener("loadstart",u),s||(c||(t&&(p=t(p)),document.body.appendChild(p)),n("preload")),function(){p.removeEventListener("load",a),p.removeEventListener("error",d),p.removeEventListener("loadstart",u)}}}),[e,s,t]),s}},453595:function(e,t,n){"use strict";n.d(t,{W:function(){return o}});var i=n(331635),a=n(474848),r=(n(296540),n(433989));function o(){return function(e){return function(t){var n={fullscreen:(0,r.H)()};return(0,a.jsx)(e,(0,i.__assign)({},n,t))}}}},433989:function(e,t,n){"use strict";n.d(t,{H:function(){return m}});var i=n(581925),a=n.n(i),r=n(296540),o=[];a().onchange=function(){o.forEach((function(e){e()}))};var s=function(e){o.push(e)},l=function(e){o=o.filter((function(t){return t!==e}))},d=function(){return!!a().enabled},u=function(e){return!(!e||!a().videoEnabled(e))},c=function(){return a().element},p=function(e){a().request(e)},v=function(){a().exit()};function m(){return r.useMemo((function(){return{addChangeListener:s,removeChangeListener:l,supported:d,videoSupported:u,element:c,enable:p,disable:v}}),[])}},910889:function(e,t,n){"use strict";n.d(t,{s:function(){return l}});var i=n(726561),a=n(891975),r=n(296540),o=n(883474),s=n(239293);function l(e){var t=e.topic,n=e.onError,l=e.onMessage,d=e.onListenSuccess,u=e.skip,c=e.jitterUpToMaxMS,p=(0,i.F)(c),v=(0,i.F)(l),m=(0,i.F)(n),f=(0,i.F)(d),g=r.useRef(new Set);(0,a.S)((function(){return function(){g.current.forEach((function(e){window.clearTimeout(e)}))}})),r.useEffect((function(){if(t&&!u){var e=o.UE.subscribe({topic:t,failure:function(e){var t;null===(t=m.current)||void 0===t||t.call(m,e)},success:function(){var e;null===(e=f.current)||void 0===e||e.call(f)},onMessage:function(e){if(p.current){var t=window.setTimeout((function(){g.current.delete(t),v.current(e)}),(0,s.yT)(p.current));g.current.add(t)}else v.current(e)}});return e}}),[u,p,m,v,f,t])}},323570:function(e,t,n){"use strict";function i(){try{return window.self!==window.top}catch(e){return!0}}n.d(t,{W:function(){return i}})},71062:function(e,t,n){"use strict";n.d(t,{n:function(){return a}});var i=n(407350),a=n.n(i)()},276426:function(e,t,n){"use strict";n.d(t,{b:function(){return a},m:function(){return r}});var i=["input:not([type=hidden]):not([disabled])","button:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contenteditable=""]','[contenteditable="true"]',"a[href]","[tabindex]:not([disabled])"].join(", ");function a(e){if(e){var t=e.querySelectorAll(i)[0];t&&!t.className.includes("hidden-focusable-elem")?t.focus():e.focus()}}function r(){return window.innerHeight||document.documentElement.clientHeight||screen.height}},134889:function(e,t,n){"use strict";n.d(t,{M:function(){return d}});var i=n(331635),a=n(474848),r=n(891975),o=n(296540),s=n(494028),l=n(242644);function d(e){var t=e.id,n=!t.trim(),d=(0,o.useContext)(s.T),u=(0,l.Y6)(t,{currentStep:1,seen:!1},n),c=u.seen;(0,r.S)((function(){(0,l.rj)(e)||!t?n||u.seen||d.add(t,(0,i.__assign)({showOnPageLoad:e.showOnPageLoad},u)):(0,l.OT)(t)}));var p=d.activeItem===t,v=t&&d.requests[t],m=p&&v?null==v?void 0:v.currentStep:void 0;return{currentStep:m,seen:c,next:function(){if(!n&&m){var e={currentStep:m+1};(0,l.zO)(t,e),d.update(t,e)}},previous:function(){if(!n&&m&&1!==m){var e={currentStep:m-1};(0,l.zO)(t,e),d.update(t,e)}},markAsSeen:function(){if(!n){var e={seen:c=!0};(0,l.zO)(t,e),d.update(t,e)}},show:function(){n||d.show(t)},FTUE:function(e){var t=e.children,i=e.step;return n||m!==(void 0===i?1:i)?null:(0,a.jsx)(a.Fragment,{children:t})},skipped:!!n}}},242644:function(e,t,n){"use strict";n.d(t,{OT:function(){return s},Y6:function(){return r},rj:function(){return l},zO:function(){return o}});var i=n(331635),a=n(883474),r=function(e,t,n){var i=e&&a.IG.getOptional("ftue-".concat(e));if(!i){var r=t||{seen:!1};return n||a.IG.set("ftue-".concat(e),r),r}return i},o=function(e,t){var n=r(e);a.IG.set("ftue-".concat(e),(0,i.__assign)((0,i.__assign)({},n),t))},s=function(e){a.IG.remove("ftue-".concat(e))},l=function(e){var t=e.startDate,n=e.endDate,i=new Date;return t?i>t&&i8e3&&(m&&m(),A())}),[m]),I=r.useCallback((function(e){e?k.current||(S.current=Date.now(),k.current=setInterval(E,1e3)):A()}),[E]),T=u((function(e){var t;b("ad_pod_complete",e,{stitched:!1}),b("ad_client_pod_completion",e,(0,o.iB)(e.adInfo,p,c)),null===(t=null==h?void 0:h.get(l.V.ContentResumeRequested))||void 0===t||t({event:e})})),D=u((function(e){var t;b("ad_pause",e,{ad_is_paused:!1}),I(!0),null===(t=null==h?void 0:h.get(l.V.Resumed))||void 0===t||t({event:e})})),N=u((function(e){var t;b("ad_pause",e,{ad_is_paused:!0}),I(!1),null===(t=null==h?void 0:h.get(l.V.Paused))||void 0===t||t({event:e})})),w=u((function(e){var t;null===(t=null==h?void 0:h.get(l.V.ContentPauseRequested))||void 0===t||t({event:e})})),R=u((function(e){var i;b("video_ad_loaded",e,{player_mute:!!t,player_volume:+(n||0).toFixed(10)}),null===(i=null==h?void 0:h.get(l.V.Loaded))||void 0===i||i({event:e})})),x=u((function(e){var t;null===(t=null==h?void 0:h.get(l.V.VolumeChanged))||void 0===t||t({event:e})})),L=u((function(e){var t,n;b("ad_mute",e,{ad_is_muted:e.muted}),e.muted?null===(t=null==h?void 0:h.get(l.V.Muted))||void 0===t||t({event:e}):null===(n=null==h?void 0:h.get(l.V.Unmuted))||void 0===n||n({event:e})})),F=u((function(e){var t;b("ad_click",e,{stitched:!1}),null===(t=null==h?void 0:h.get(l.V.Click))||void 0===t||t({event:e})})),M=u((function(e){var t;I(!0),null===(t=null==h?void 0:h.get(l.V.Started))||void 0===t||t({event:e})})),V=u((function(e){var t,n,a;switch(b("ad_quartile",e,{quartile:e.quartile}),b("ad_client_quartile",e,(0,i.__assign)((0,i.__assign)({},(0,o.iB)(e.adInfo,p,c)),{quartile:e.quartile})),e.quartile){case 1:null===(t=null==h?void 0:h.get(l.V.FirstQuartile))||void 0===t||t({event:e});break;case 2:null===(n=null==h?void 0:h.get(l.V.Midpoint))||void 0===n||n({event:e});break;case 3:null===(a=null==h?void 0:h.get(l.V.ThirdQuartile))||void 0===a||a({event:e})}})),O=u((function(e){var t;V(e),I(!1),b("video_ad_impression_complete",e,{stitched:!1}),null===(t=null==h?void 0:h.get(l.V.Complete))||void 0===t||t({event:e})})),U=u((function(e){var t;b("video_ad_time_elapsed",e,{time_elapsed:e.progress}),S.current=Date.now(),null===(t=null==h?void 0:h.get(l.V.Progress))||void 0===t||t({event:e})})),B=u((function(e){var t,i,a,r,d,u,m,g,y,_,k,S,C,A=Date.now(),E=c,I=null===(t=null==E?void 0:E.adInfo)||void 0===t?void 0:t.adSystem,T={request_to_impression_latency:A-e.request.requestTime,pre_impression_player_volume:f,player_volume:+(n||0).toFixed(10),quality:(null==v?void 0:v.isAutoQualityMode)?"auto":"".concat(null!==(i=null==v?void 0:v.currentVideoWidth)&&void 0!==i?i:0,"x").concat(null!==(a=null==v?void 0:v.currentVideoHeight)&&void 0!==a?a:0),current_bitrate:Math.round(null!==(r=null==v?void 0:v.currentVideoBitrate)&&void 0!==r?r:0),ad_stored_bitrate_kbps:null!==(d=null==v?void 0:v.storedAdBitrate)&&void 0!==d?d:0,ad_max_bitrate_kbps:null!==(u=null==v?void 0:v.maxAdBitrate)&&void 0!==u?u:0,ad_resolution:"".concat(null!==(g=null===(m=e.adInfo)||void 0===m?void 0:m.vastMediaWidth)&&void 0!==g?g:0,"x").concat(null!==(_=null===(y=e.adInfo)||void 0===y?void 0:y.vastMediaHeight)&&void 0!==_?_:0),ad_bitrate_kbps:null!==(S=null===(k=e.adInfo)||void 0===k?void 0:k.vastMediaBitrate)&&void 0!==S?S:0};P(s.V.AdImpression,e,T),I&&"FAS"===I?b("ad_impression_fake",e,T):(b("ad_impression",e,T),b("ad_client_impression",e,(0,o.iB)(e.adInfo,p,c))),null===(C=null==h?void 0:h.get(l.V.Impression))||void 0===C||C({event:e})})),j=u((function(e){var t,n={reason:e.reason,error_code:e.errorCode,error_type:e.errorType};g("ad_error",n),null===(t=null==h?void 0:h.get(l.V.Error))||void 0===t||t()})),q=u((function(){var e;null===(e=null==h?void 0:h.get(l.V.PodReplayLoopStarted))||void 0===e||e()}));r.useEffect((function(){C.current=!!c&&null!==c.videoAd&&((0,d.hr)(c)||(0,d.nD)(c))}),[c]);var G=r.useCallback((function(e,t){_(e,(function(e){C.current&&t(e)}))}),[_]);(0,a.S)((function(){G(l.V.ContentPauseRequested,w),G(l.V.ContentResumeRequested,T),G(l.V.Complete,O),G(l.V.Error,j),G(l.V.FirstQuartile,V),G(l.V.Impression,B),G(l.V.Loaded,R),G(l.V.Midpoint,V),G(l.V.Paused,N),G(l.V.Progress,U),G(l.V.Resumed,D),G(l.V.Started,M),G(l.V.ThirdQuartile,V),G(l.V.VolumeChanged,x),G(l.V.Click,F),G(l.V.Muted,L),G(l.V.Unmuted,L),G(l.V.PodReplayLoopStarted,q)}))}},218692:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var i=n(891975),a=n(296540),r=n(573527),o=function(e){var t=(0,a.useRef)([]),n=(0,a.useRef)([]),o=e.videoAdMetadata,s=e.adFormatMetadata,l=e.feedAdMetadata,d=function(e,t,n){return e.filter((function(e){var i=e.event,a=e.listener;return t!==i&&n!==a}))},u=(0,a.useCallback)((function(e,i){var a={event:e,listener:i},u=(0,r.jC)(o,s,l);u?(n.current.push(a),t.current=d(t.current,e,i),u.addEventListener(e,i)):t.current.push(a)}),[s,o,l]),c=(0,a.useCallback)((function(e,t){var i=(0,r.jC)(o,s,l);i&&(n.current=d(n.current,e,t),i.removeEventListener(e,t))}),[s,o,l]),p=(0,a.useCallback)((function(e){0!==t.current.length&&e&&!e.stitched&&t.current.forEach((function(e){var t=e.event,n=e.listener;return u(t,n)}))}),[u]);return(0,a.useEffect)((function(){o?p(o):(0,r.hr)(s)?p(s):(0,r.nD)(l)?p(l):0!==n.current.length&&(n.current.forEach((function(e){return t.current.push(e)})),n.current=[])}),[c,p,o,s,l]),(0,i.S)((function(){return function(){var e=(0,r.jC)(o,s,l);n.current.forEach((function(t){var n=t.event,i=t.listener;null==e||e.removeEventListener(n,i)}))}})),{adEvents:{addEventListener:u,removeEventListener:c}}}},68428:function(e,t,n){"use strict";n.d(t,{p:function(){return _}});var i=n(331635),a=n(29896),r=n(664865),o=n(229045),s=n(883474),l=n(430107),d=n(590745),u=n(59889),c=n(318098),p=n(588547),v=n(62026),m=n(110657),f=n(573527),g=n(249448),y=n(404981),h=n.n(y),_=function(e){var t=e.adFormatRequest,n=e.adFormatMetadata,y=e.adPlacement,_=e.radToken,k=e.content,S=e.behaviors,C=e.muted,b=e.volume,P=e.videoSessionId,A=e.videoContainer,E=e.track,I=(0,d.S9)().data,T=(0,a.n_)(h())[0],D=new Set(["ad_impression",p.V.AdImpression,"ad_quartile"]),N=s.vF.withCategory("WithAdFormatTrackingComponent"),w=function(e){if(D.has(e))return(0,c.K)(A)},R=function(e){var a,r,d,c,p,h,_,A,E;if((0,f.lq)(n))return{stitched:!0};var T=k?(0,g.DG)(k)?o.cM.Live:(0,g.wy)(k)?o.cM.VOD:(0,g.Jn)(k)?o.cM.Clip:"":"",D={advertising_id:(0,l.O)(),tab_session_id:s.x2.session.tabID,browser:navigator.userAgent,content_type:T,gdpr_logs:null===(r=null===(a=null==I?void 0:I.consent)||void 0===a?void 0:a.gdprUserPreferences)||void 0===r?void 0:r.tcData.tcString,gdpr_consent:null===(p=null===(c=null===(d=null==I?void 0:I.consent)||void 0===d?void 0:d.gdprUserPreferences)||void 0===c?void 0:c.tcData.purpose.consents)||void 0===p?void 0:p.valueOf(),gdpr_enabled:null===(A=null===(_=null===(h=null==I?void 0:I.consent)||void 0===h?void 0:h.gdprUserPreferences)||void 0===_?void 0:_.tcData.ifGDPRApplies)||void 0===A?void 0:A.valueOf(),referrer_domain:null===(E=s.E5.getLastPageview())||void 0===E?void 0:E.referrer_domain,is_embed:null==S?void 0:S.embed,ad_placement:y,player_mute:C,player_volume:b,player_visibility:w(e),tab_in_view:"visible"===document.visibilityState,video_session_id:P};if(!t)return D;var N={};t.status!==m.sC.Pending&&(N={sdk:t.sdk});var R=n?n.adFormat:t.adFormat,x=void 0;return(0,u.Ix)(R)?x=R:(0,u.vK)(R)&&(x=v.Z$[R]),(0,i.__assign)((0,i.__assign)({is_mafs:!!t.mafsDecision,ad_position:(null==n?void 0:n.adPosition)||0,ad_session_id:t.sessionID,break_length:t.duration,commercial_id:t.commercialID,creative_id:t.adCreativeID,format_name:x,roll_type:t.roll,stitched:(null==n?void 0:n.stitched)||!1,twitch_correlator:t.twitchCorrelator},D),N)};return{trackAdFormatData:function(e,t){E?E(e,(0,i.__assign)((0,i.__assign)({},R(e)),t)):s.E5.track(e,(0,i.__assign)((0,i.__assign)({},R(e)),t))},trackAdFormatRAdEvent:function(e,t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var n,a;return(0,i.__generator)(this,(function(o){switch(o.label){case 0:if("string"!=typeof _)return[2];n={eventName:e,eventPayload:JSON.stringify((0,i.__assign)((0,i.__assign)({},t),R(e))),radToken:_},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,T((0,r.AR)(n))];case 2:return o.sent(),[3,4];case 3:return a=o.sent(),N.errorAndReport(a,"Failed to record ad event in RAds"),[3,4];case 4:return[2]}}))}))}}}},192133:function(e,t,n){"use strict";n.d(t,{HY:function(){return o},X_:function(){return l},u4:function(){return d}});var i="https://s.amazon-adsystem.com/iui3?pid=a30f442a-e833-4300-a302-987199caf562",a="amznidpxl";function r(e,t){setTimeout((function(){var n=document.getElementById(t);n&&n.remove(),(n=document.createElement("iframe")).src=e,n.height="1",n.width="1",n.scrolling="no",n.frameBorder="0",n.id=t,document.body.appendChild(n)}),0)}function o(){var e=i,t=a;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(function(){return r(e,t)}),!1):r(e,t)}function s(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16))}))}function l(e,t){void 0===t&&(t={});var n=[];return t.ASSETURI&&(t.ASSETURI=s(t.ASSETURI)),t.CONTENTPLAYHEAD&&(t.CONTENTPLAYHEAD=s(t.CONTENTPLAYHEAD)),t.ERRORCODE&&!/^[0-9]{3}$/.test("".concat(t.ERRORCODE))&&(t.ERRORCODE=900),t.CACHEBUSTING=Math.round(1e8*Math.random()).toString(),t.TIMESTAMP=s((new Date).toISOString()),e.forEach((function(e){if(e){for(var i in t)if(t.hasOwnProperty(i)){var a=t[i],r="\\[".concat(i,"\\]"),o="%%".concat(i,"%%");e=(e=e.replace(new RegExp(r),"".concat(a))).replace(new RegExp(o),"".concat(a))}n.push(e)}})),n}function d(e,t){void 0===t&&(t={}),l(e,t).forEach((function(e){if("undefined"!=typeof window&&null!==window){if(!function(e){return null!==e.match(/^((http(s?)?):\/\/)/g)}(e))return;if("https:"===window.location.protocol&&0===e.indexOf("http://"))return;(new Image).src=e}}))}},131869:function(e,t,n){"use strict";n.d(t,{DV:function(){return u},KK:function(){return c}});var i=n(331635),a=n(474848),r=(n(296540),n(830137)),o=n(55927),s=n(410493),l={loading:!1,data:null,campaignSettings:null,channel:void 0,currentUser:void 0,isDarkMode:!1,canShowChannelSkins:!1,creatorColor:"",placements:{videoOverlay:null,frontPageVideoOverlay:null,aboveChat:null,subSubAboveChat:null,giftSubMatchAboveChat:null,ribbon:null},trackImpression:function(){},trackClick:function(){},trackUserNoticeImpression:function(){},trackUserNoticeClick:function(){},subsidizedSubscriptions:null,giftSubMatch:null,requiresVideoTokenRefresh:!1,setRequiresVideoTokenRefresh:function(){},animationCadence:{animationTrigger:0}},d=(0,n(854622).e)("ChannelSkinsContext",l,(function(e){return{channelSkinsContext:e}})),u=(d.withMemoContext,d.context),c=function(e){var t=e.children,n=e.channelLogin,l=(0,i.__rest)(e,["children","channelLogin"]),d=(0,s.N)(),c=(0,r.h5)(),p=n||(null==d?void 0:d.channelLogin)||(null==c?void 0:c.channelLogin)||"",v=(0,o.Di)((0,i.__assign)({channelLogin:p.toLowerCase()},l));return(0,a.jsx)(u.Provider,{value:v,children:t||null})}},830137:function(e,t,n){"use strict";n.d(t,{HX:function(){return d},Rn:function(){return s},h5:function(){return l}});var i=n(474848),a=n(296540),r=(0,n(265827).q)("SelectedChannelLoginContext",{channelLogin:null,setChannelLogin:function(){return null}}),o=r.context,s=r.withContext,l=function(){return a.useContext(o)},d=function(e){var t=e.children,n=a.useState(null),r=n[0],s=n[1],l=a.useMemo((function(){return{channelLogin:r,setChannelLogin:s}}),[r,s]);return(0,i.jsx)(o.Provider,{value:l,children:t})}},744883:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var i=n(29896),a=n(837033),r=n.n(a),o=function(){var e,t,n=(0,i.IT)(r()),a=n.data;return!n.loading&&(null===(t=null===(e=null==a?void 0:a.currentUser)||void 0===e?void 0:e.isChatHappeningNowEnabled)||void 0===t||t)}},907251:function(e,t,n){"use strict";n.d(t,{$:function(){return u}});var i=n(331635),a=n(296540),r=n(29896),o=n(837033),s=n.n(o),l=n(942802),d=n.n(l),u=function(){var e=(0,r.n_)(d(),{update:function(e,t){var n=t.data;if(null==n?void 0:n.setChatHappeningNowSettings){var a=e.readQuery({query:s()}),r=null==a?void 0:a.currentUser;if(!r)return;e.writeQuery({query:s(),data:{currentUser:(0,i.__assign)((0,i.__assign)({},r),{isChatHappeningNowEnabled:n.setChatHappeningNowSettings.isChatHappeningNowEnabled})}})}}})[0];return{setHappeningNowSettings:a.useCallback((function(t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var n,a;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return[4,e({variables:{input:{isChatHappeningNowEnabled:t}}})];case 1:return n=i.sent().data,[2,null===(a=null==n?void 0:n.setChatHappeningNowSettings)||void 0===a?void 0:a.isChatHappeningNowEnabled]}}))}))}),[e])}}},224300:function(e,t,n){"use strict";n.d(t,{Ee:function(){return r},FI:function(){return o},HK:function(){return u},Pi:function(){return i},Wn:function(){return l},sZ:function(){return s},yj:function(){return a},zQ:function(){return d}});var i=15,a="chat.has_interacted_with_full_screen_chat",r="chat.happening_now_hide_info",o="chat.has_seen_happening_now_settings",s={count:0,seenDisablePrompt:!1},l=3,d=5184e6,u=300},783826:function(e,t,n){"use strict";n.d(t,{g:function(){return i}});n(296540),n(415044),n(368770);var i="community-moments-rollout"},988886:function(e,t,n){"use strict";n.d(t,{D:function(){return r},M:function(){return a}});var i=n(296540),a=function(e){var t=e.sourceAsset,n=e.portraitAsset,a=i.useState("landscape-only"),o=a[0],s=a[1];return i.useEffect((function(){s(r({sourceAsset:t,portraitAsset:n}))}),[n,t]),{contentFormat:o}},r=function(e){var t=e.sourceAsset,n=e.portraitAsset,i=n&&!n.portraitMetadata;return t&&i?"dual-format":!t&&i?"portrait-only":"landscape-only"}},243707:function(e,t,n){"use strict";n.d(t,{Ip:function(){return y},JF:function(){return g},hq:function(){return f}});var i=n(891975),a=n(632017),r=n.n(a),o=n(296540),s=n(29896),l=n(876531),d=n(988886),u=n(936536),c=n(501096),p=n(843920),v=n.n(p),m=3e5,f=function(e){var t,n,a=e.onPollComplete,u=o.useState(!1),c=u[0],p=u[1],f=o.useState(!1),y=f[0],h=f[1],_=(0,s._l)(v(),{fetchPolicy:"no-cache",pollInterval:2e3,onError:function(){h(!0),p(!0)},notifyOnNetworkStatusChange:!0,onCompleted:function(e){(null==e?void 0:e.clip)||(B(),b())}}),k=_[0],S=_[1],C=S.data,b=S.stopPolling,P=o.useRef(C),A=g(null===(t=null==C?void 0:C.clip)||void 0===t?void 0:t.assets),E=A.sourceAsset,I=A.portraitAsset,T=o.useState(void 0),D=T[0],N=T[1],w=o.useState(!1),R=w[0],x=w[1],L=o.useState((null==E?void 0:E.creationState)===l.j2q.CREATING),F=L[0],M=L[1],V=o.useState((null==I?void 0:I.creationState)===l.j2q.CREATING),O=V[0],U=V[1],B=o.useCallback((function(){M(!1),p(!0),U(!1),h(!0),N(!0),b()}),[b]),j=o.useCallback((function(){null==a||a(),M(!1),U(!1),N(!0),b()}),[a,b]),q=o.useRef();(0,i.S)((function(){return function(){return clearTimeout(q.current)}})),o.useEffect((function(){if(e.clipSlug){k({variables:{slug:e.clipSlug}});var t=setTimeout(B,m);q.current=t,N(!1)}}),[e.clipSlug,k,B]),o.useEffect((function(){var e,t=g(null===(e=null==C?void 0:C.clip)||void 0===e?void 0:e.assets),n=t.sourceAsset,i=t.portraitAsset,a=null==n?void 0:n.creationState,o=null==i?void 0:i.creationState,s="portrait-only"===(0,d.D)({sourceAsset:n,portraitAsset:i});if((s?o:a)&&!r()(P.current,C)){if(a!==l.j2q.CREATING||F||M(!0),o!==l.j2q.CREATING||O||U(!0),a===l.j2q.FAILED&&(M(!1),p(!0)),o===l.j2q.FAILED&&(U(!1),h(!0)),!o&&a!==l.j2q.CREATING)return P.current=C,void j();a!==l.j2q.CREATING&&o!==l.j2q.CREATING&&(P.current=C,j()),s&&o!==l.j2q.CREATING&&(P.current=C,j())}}),[C,null===(n=null==C?void 0:C.clip)||void 0===n?void 0:n.assets,O,F,b,a,j]);var G=function(e){var t,n,i,a,r,o,s,l,d,u,p,v,m,f,h,_=g(null===(t=null==e?void 0:e.clip)||void 0===t?void 0:t.assets);return{source:{asset:_.sourceAsset,hasError:c},portrait:{asset:_.portraitAsset,hasError:y},exportAsset:null!==(i=null!==(n=_.portraitAsset)&&void 0!==n?n:_.sourceAsset)&&void 0!==i?i:null,clip:null==e?void 0:e.clip,broadcasterDisplayName:null===(r=null===(a=null==e?void 0:e.clip)||void 0===a?void 0:a.broadcaster)||void 0===r?void 0:r.displayName,broadcasterID:null===(s=null===(o=null==e?void 0:e.clip)||void 0===o?void 0:o.broadcaster)||void 0===s?void 0:s.id,broadcasterLogin:null===(d=null===(l=null==e?void 0:e.clip)||void 0===l?void 0:l.broadcaster)||void 0===d?void 0:d.login,createdAt:null===(u=null==e?void 0:e.clip)||void 0===u?void 0:u.createdAt,createdBy:null===(v=null===(p=null==e?void 0:e.clip)||void 0===p?void 0:p.curator)||void 0===v?void 0:v.id,durationSeconds:null===(m=null==e?void 0:e.clip)||void 0===m?void 0:m.durationSeconds,title:null===(f=null==e?void 0:e.clip)||void 0===f?void 0:f.title,viewCount:null===(h=null==e?void 0:e.clip)||void 0===h?void 0:h.viewCount,hasRepolled:R,hasPollEnded:D,onRePollClipRenderStatus:H,isPollingForSourceAsset:F,isPollingForPortraitAsset:O}},H=function(){if(e.clipSlug){x(!0),N(!1);var t=setTimeout(b,m);return q.current=t,k({variables:{slug:e.clipSlug}}).then((function(e){var t,n,i=G(e.data);return(null===(t=i.source.asset)||void 0===t?void 0:t.creationState)!==l.j2q.CREATING||F||M(!0),(null===(n=i.source.asset)||void 0===n?void 0:n.creationState)!==l.j2q.CREATING||O||U(!0),i}))}};return G(C)};function g(e){var t,n;if(!(null==e?void 0:e.length))return{sourceAsset:null,portraitAsset:null};var i=[],a=[];function r(e,t){var n=new Date(e.createdAt);return new Date(t.createdAt).getTime()-n.getTime()}return e.forEach((function(e){(0,u.eP)(e)?a.push(e):i.push(e)})),i.sort(r),a.sort(r),{sourceAsset:null!==(t=i[0])&&void 0!==t?t:null,portraitAsset:null!==(n=a[0])&&void 0!==n?n:null}}function y(e){var t,n,i,a=e.exportAsset,r=e.clip,o=e.download,s=null===(t=null==a?void 0:a.videoQualities)||void 0===t?void 0:t[0].sourceURL,l=null===(n=null==r?void 0:r.playbackAccessToken)||void 0===n?void 0:n.value,d=null===(i=null==r?void 0:r.playbackAccessToken)||void 0===i?void 0:i.signature,p=(0,u.q7)(a)?"LANDSCAPE":"PORTRAIT";if(s&&l&&d){var v=(0,c.D)({createdAt:a.createdAt,slug:r.slug,aspectRatioType:p});return(0,c.F)(s,l,d,o?{requestContentAsDownload:!0,fileName:v}:void 0)}}},936536:function(e,t,n){"use strict";n.d(t,{eP:function(){return r},q7:function(){return a},s0:function(){return o}});var i=n(975928),a=function(e){return(null==e?void 0:e.aspectRatio)&&(null==e?void 0:e.aspectRatio)>=1},r=function(e){return(null==e?void 0:e.aspectRatio)&&(null==e?void 0:e.aspectRatio)<1},o=function(e){var t,n;if(!(null==e?void 0:e.length))return null;var o=e.find((function(e){return r(e)})),s=e.find((function(e){return a(e)}));return(0,i.JK)()?null!==(t=null!=o?o:s)&&void 0!==t?t:null:null!==(n=null!=s?s:o)&&void 0!==n?n:null}},959391:function(e,t,n){"use strict";n.d(t,{Cv:function(){return u},L$:function(){return d},NC:function(){return c},p6:function(){return l}});var i=n(882439),a=n(883474),r=n(933936),o=n(368600),s="clips_target";function l(e){switch(e){case"CAN_CREATE_CLIP_NOT_SUBSCRIBED":case"CATEGORY_NOT_CLIPPABLE":case"FOLLOWING_LENGTH_REQUIREMENT_NOT_MET":case"USER_NOT_FOLLOWING":return!0;default:return!1}}function d(e){switch(e){case"CAN_CREATE_CLIP_NOT_SUBSCRIBED":case"CATEGORY_NOT_CLIPPABLE":case"FOLLOWING_LENGTH_REQUIREMENT_NOT_MET":case"USER_NOT_FOLLOWING":case"DJ_CATEGORY_NOT_CLIPPABLE":case"PARTICIPATING_DJ":return!0;default:return!1}}function u(e,t){if(!e)return(0,a.hw)("Clip ({clipKey}+x)",{clipKey:p()},"ClipsButtonComponent");if("FOLLOWING_LENGTH_REQUIREMENT_NOT_MET"===e)switch(t){case 10:return(0,a.hw)("Follow for 10m to clip","ClipsButtonComponent");case 30:return(0,a.hw)("Follow for 30m to clip","ClipsButtonComponent");case 60:return(0,a.hw)("Follow for 1h to clip","ClipsButtonComponent");case 1440:return(0,a.hw)("Follow for 1d to clip","ClipsButtonComponent");case 10080:return(0,a.hw)("Follow for 1w to clip","ClipsButtonComponent");case 43200:return(0,a.hw)("Follow for 1 month to clip","ClipsButtonComponent");case 129600:return(0,a.hw)("Follow for 3 months to clip","ClipsButtonComponent");default:return(0,a.hw)("Following length requirement not met","ClipsButtonComponent")}switch(e){case"CAN_CREATE_CLIP_NOT_SUBSCRIBED":return(0,a.hw)("Subscribe to clip","ClipsButtonComponent");case"CATEGORY_NOT_CLIPPABLE":return(0,a.hw)("This channel does not permit clips of this category.","ClipsButtonComponent");case"USER_NOT_FOLLOWING":return(0,a.hw)("Follow to clip","ClipsButtonComponent");case"DJ_CATEGORY_NOT_CLIPPABLE":return(0,a.hw)("DJ category can't be clipped.","ClipsButtonComponent");case"PARTICIPATING_DJ":return(0,a.hw)("DJ channels can't be clipped.","ClipsButtonComponent");default:return""}}var c=function(e){var t=e.broadcastID,n=e.broadcasterLogin,a=e.offsetSeconds,o=e.vodID,l=window.location.origin,d=window.location.search,u=window.open("","_blank"),c=function(e,t){return/\/\/(www|dashboard|player|embed|go|canary|rc|.*\.rc|.*\.canary)\.twitch\.tv/.test(e)?"https://clips.twitch.tv":t[s]?"https://clips-".concat(t[s],".twitch.tv"):t.clips_use_localhost?"https://clips-localhost.twitch.tech:8080":/\/\/pr\d{5}\.twitch\.tech/.test(e)?"https://clips-".concat(e.replace("https://","")):/\/\/betaplayer\.twitch\.tv/.test(e)?"https://clips-alpha.twitch.tv":(0,r.Ri)("clips-staging","string")||"https://clips-main.twitch.tech"}(l,(0,i.parse)(d)),p={offsetSeconds:a,broadcastID:t,broadcasterLogin:n||void 0,vodID:o};c="".concat(c,"/create?").concat(i.stringify(p)),u?u.location.href=c:window.open(c,"_blank")};function p(){return o.j.os.isMacOS()?"⌥":"alt"}},501096:function(e,t,n){"use strict";n.d(t,{D:function(){return o},F:function(){return r}});var i=n(917705),a=n(882439);function r(e,t,n,i){var r=e.match(/\.[^.]*$/);return"".concat(e,"?").concat((0,a.stringify)({token:t,sig:n,"response-content-disposition":(null==i?void 0:i.requestContentAsDownload)?'attachment; filename="'.concat(i.fileName).concat(r,'"'):void 0}))}var o=function(e){var t=e.createdAt,n=e.slug,a="LANDSCAPE"===e.aspectRatioType,r=isNaN(new Date(t).getTime())?new Date:new Date(t),o=(0,i.format)(r,"YYYYMMDD");return"".concat(o,"_").concat(n,"_").concat(a?"source":"portrait")}},654195:function(e,t,n){"use strict";n.d(t,{HF:function(){return p},J0:function(){return d},cU:function(){return l},sL:function(){return c}});var i,a=n(331635),r=n(474848),o=n(296540),s=n(148223),l=(i=(0,n(265827).q)("DVRPlayerContentContext",{content:void 0,setPlayerContent:function(){},playbackID:"",setPlaybackID:function(){}})).withContext,d=i.context,u=function(e){var t=e.children,n=(0,o.useState)(void 0),i=n[0],a=n[1],l=(0,o.useState)(""),u=l[0],c=l[1],p=(0,o.useCallback)((function(){c((0,s.aq)())}),[]),v=(0,o.useMemo)((function(){return{content:i,setPlayerContent:a,playbackID:u,setPlaybackID:p}}),[i,a,u,p]);return(0,r.jsx)(d.Provider,{value:v,children:t})},c=function(){return(0,o.useContext)(d)};function p(e){return function(t){return(0,r.jsx)(u,{children:(0,r.jsx)(e,(0,a.__assign)({},t))})}}},241978:function(e,t,n){"use strict";n.d(t,{Dh:function(){return l},U7:function(){return d},Vc:function(){return s}});var i,a=n(331635),r=n(474848),o=n(296540),s=(i=(0,n(265827).q)("EmbedVisibilityContext",{isDefaultContext:!0})).context,l=i.withContext,d=function(e){var t=e.children,n=o.useState((function(){return{isDefaultContext:!1,hasObserved:!1}})),i=n[0],l=n[1];return o.useEffect((function(){var e=document.body;if(e&&"undefined"!=typeof IntersectionObserver){var t=new IntersectionObserver((function(t){var n=t[0],i=void 0===n.isVisible?e.checkVisibility({opacityProperty:!0,visibilityProperty:!0,contentVisibilityAuto:!0}):n.isVisible,r=Math.round(10*n.intersectionRatio)/10,o=n.boundingClientRect,s=o.width,d=o.height;l((function(e){return e.isDefaultContext?e:e.hasObserved?e.isVisible===i&&e.intersectionRatio===r&&e.bCRWidth===s&&e.bCRHeight===d?e:(0,a.__assign)((0,a.__assign)({},e),{isVisible:i,intersectionRatio:r,bCRWidth:s,bCRHeight:d}):(0,a.__assign)((0,a.__assign)({},e),{isVisible:i,intersectionRatio:r,bCRHeight:d,bCRWidth:s,hasObserved:!0})}))}),{threshold:[0,.5,1],trackVisibility:!0,delay:1e3});return t.observe(e),function(){t.unobserve(e)}}}),[]),(0,r.jsx)(s.Provider,{value:i,children:t})}},620643:function(e,t,n){"use strict";var i;n.d(t,{D7:function(){return i},qK:function(){return a},wu:function(){return r}}),function(e){e.Loading="pbyp_loading",e.Playing="pbyp_playing",e.Paused="pbyp_paused",e.Unavailable="pbyp_unavailable"}(i||(i={}));var a="p_by_p_adstart_show_player",r=new Map([["515214","Politics"],["116747788","Pools, Hot Tubs, and Beaches"],["498566","Slots"],["493887283","Casino"],["29452","Virtual Casino"],["498592","I'm only sleeping"],["509659","ASMR"],["1109340850","Weed Shop 3"],["27921","Dragon Age II"],["1076084581","Kingdoms of Amalur: Re-Reckoning"],["656954215","Leisure Suit Larry: Wet Dreams Don't Cry"],["190657827","OnlyCans: Thirst Date"],["1402669719","OnlyCans: Thirst Date (second game id)"],["513794","Apsulov: End of Gods"],["106662","The Cat Lady"],["357396995","Abyss of Neptune"],["512047","Struggling"],["77223888-8535-4614-974b-b1b2673456eb","Visual ASMR"],["64d9afa6-139a-48d5-ab4e-51d0a92b22de","Auditory ASMR"]])},929843:function(e,t,n){"use strict";n.d(t,{FO:function(){return h},YJ:function(){return S},dC:function(){return _}});var i,a=n(331635),r=n(474848),o=n(296540),s=n(868238),l=n(883474),d=n(757245),u=n(12109),c=n(697621),p=n(403772),v=n(854622),m=n(334963),f=n(110657),g=n(249448),y=n(620643),h=(i=(0,v.e)("PictureByPictureContext",{onChannelChange:function(){return null},onMainPlayerContentRestricted:function(){return null},onMainPlayerContentClassificationChange:function(){return null},onMainPlayerPlay:function(){return null},onMainPlayerPause:function(){return null},onMainPlayerAdPodStart:function(){return null},onMainPlayerAdPodEnd:function(){return null},onMainPlayerInit:function(){return null},onMainPlayerHLSTrigger:function(){return null},onMirrorPbyPAdPodTrigger:function(){return null},onMirrorPbyPAdPodStart:function(){return null},setReady:function(){return null},setIsShowing:function(){return null},setIsShowingTurboAdsUpsell:function(){return null},setTriggerAfterAdBreakTurboUpsell:function(){return null},getMainPlayerMetadata:function(){return{playSessionId:""}},track:function(){return null},resetMirrorPbyPAd:function(){return null},setMainPlayerMuted:function(){return null},isEligible:!1,isShowing:!1,isReady:!1,isStitched:!1,isRestricted:!1,hasContentClassificationGate:!1,preflight:null,status:y.D7.Unavailable,rollType:null,adSessionID:null,isShowingTurboAdsUpsell:!1,triggerAfterAdBreakTurboUpsell:!1,mirrorPbyPAdMetadata:null,isShowingMirrorPbyPAdPod:!1},(function(e){return{pictureByPicturePlayerContext:e}}))).context,_=i.withMemoContext,k=function(e){function t(t){var n=e.call(this,t)||this;return n.logger=l.vF.withCategory("picture-by-picture-context"),n.setReady=function(e){n.setState({isReady:e})},n.setIsShowing=function(e){n.setState({isShowing:e})},n.setIsShowingTurboAdsUpsell=function(e){n.setState({isShowingTurboAdsUpsell:e})},n.setTriggerAfterAdBreakTurboUpsell=function(e){n.setState({triggerAfterAdBreakTurboUpsell:e})},n.onChannelChange=function(){n.logger.debug("pbyp player detected a channel change, reset isRestricted"),n.setState({isRestricted:!1})},n.onMainPlayerContentRestricted=function(){n.logger.debug("content restricted from pbyp context"),n.setState({isRestricted:!0})},n.onMainPlayerContentClassificationChange=function(e){var t=(0,p.cJ)(e);n.logger.debug("content classification change from pbyp context, should display gate:",t),n.setState({hasContentClassificationGate:t})},n.onMainPlayerPause=function(){n.logger.debug("pausing from pbyp context"),n.setState({status:y.D7.Paused})},n.onMainPlayerPlay=function(){n.logger.debug("playing from pbyp context"),n.setState({status:y.D7.Playing,isRestricted:!1})},n.onMainPlayerAdPodStart=function(e){var t=e.stitched,i=e.content,a=e.roll,r=e.sessionID,o=n.state.isReady,s=(0,u.fX)(y.qK),l=e.adFormat&&(0,c.ZJ)(e.adFormat);if(s&&(0,g.DG)(i)&&(a===f.df.Mid||a===f.df.Pre)&&!l){n.logger.debug("".concat("".concat(t?"stitched":"","adstart")," detected of rollType ").concat(a));var d=o;n.setState({isShowing:d,isStitched:t,rollType:a,adSessionID:r||"",isShowingTurboAdsUpsell:!0})}},n.onMainPlayerAdPodEnd=function(e){var t=e.stitched,i=e.roll;n.logger.debug("".concat("".concat(t?"stitched":"","adend")," detected of rollType ").concat(i)),n.setState({isShowing:!1,isStitched:t,rollType:null,adSessionID:null,isShowingTurboAdsUpsell:!1,triggerAfterAdBreakTurboUpsell:!0})},n.onMainPlayerInit=function(e){n.api=e},n.onMainPlayerHLSTrigger=function(e){n.setState({preflight:e})},n.getMainPlayerMetadata=function(){return n.api?n.api.getPlayerMetadata():m.S5},n.onMirrorPbyPAdPodTrigger=function(e){n.setState({mirrorPbyPAdMetadata:e})},n.onMirrorPbyPAdPodStart=function(e){n.setState({mirrorPbyPAdMetadata:e,isShowingMirrorPbyPAdPod:!0})},n.resetMirrorPbyPAd=function(){var e;if(n.state.mirrorPbyPAdMetadata){var t=n.state.mirrorPbyPAdMetadata.adFormatMetadata;null===(e=null==t?void 0:t.videoAd)||void 0===e||e.stop(),n.state.mirrorPbyPAdMetadata.resetAdContext()}n.setState({mirrorPbyPAdMetadata:null,isShowingMirrorPbyPAdPod:!1})},n.track=function(e,t){var i;null===(i=n.api)||void 0===i||i.track(e,t)},n.setMainPlayerMuted=function(e){var t;null===(t=n.api)||void 0===t||t.setMuted(e)},n.state={onChannelChange:n.onChannelChange,onMainPlayerContentRestricted:n.onMainPlayerContentRestricted,onMainPlayerContentClassificationChange:n.onMainPlayerContentClassificationChange,onMainPlayerPause:n.onMainPlayerPause,onMainPlayerPlay:n.onMainPlayerPlay,onMainPlayerAdPodStart:n.onMainPlayerAdPodStart,onMainPlayerAdPodEnd:n.onMainPlayerAdPodEnd,onMainPlayerInit:n.onMainPlayerInit,onMainPlayerHLSTrigger:n.onMainPlayerHLSTrigger,onMirrorPbyPAdPodTrigger:n.onMirrorPbyPAdPodTrigger,onMirrorPbyPAdPodStart:n.onMirrorPbyPAdPodStart,getMainPlayerMetadata:n.getMainPlayerMetadata,setReady:n.setReady,setIsShowing:n.setIsShowing,setIsShowingTurboAdsUpsell:n.setIsShowingTurboAdsUpsell,setTriggerAfterAdBreakTurboUpsell:n.setTriggerAfterAdBreakTurboUpsell,track:n.track,resetMirrorPbyPAd:n.resetMirrorPbyPAd,setMainPlayerMuted:n.setMainPlayerMuted,isEligible:!0,isShowing:!1,isStitched:!1,isReady:!1,isRestricted:!1,hasContentClassificationGate:!1,preflight:null,status:y.D7.Loading,rollType:null,adSessionID:null,isShowingTurboAdsUpsell:!1,triggerAfterAdBreakTurboUpsell:!1,mirrorPbyPAdMetadata:null,isShowingMirrorPbyPAdPod:!1},n}return(0,a.__extends)(t,e),t.prototype.render=function(){return(0,r.jsx)(h.Provider,{value:this.state,children:this.props.children})},t}(o.Component),S=(0,s.Zz)((0,d.X)({name:"PictureByPictureContextManager"}))(k)},410493:function(e,t,n){"use strict";n.d(t,{N:function(){return r}});var i=n(834455),a=n(394945),r=function(){var e,t,n=(0,i.zy)(),r=null===(e=n.state)||void 0===e?void 0:e.channelView,o=(0,i.RQ)({path:"/:channelLogin"}),s=!(!r||!o),l=(0,i.RQ)("/:channelLogin/video/:videoID"),d=!(!r||!l),u=(0,i.RQ)("/videos/:videoID"),c=!(!r||!u),p=(0,i.RQ)("/collections/:collectionID"),v=!(!r||!p),m=(0,i.RQ)("/:channelLogin/collection/:collectionID"),f=!(!r||!m),g=c||v?null:s?o.params.channelLogin:d?l.params.channelLogin:f?m.params.channelLogin:null,y=d?l.params.videoID:c?u.params.videoID:null,h=v?p.params.collectionID:f?m.params.collectionID:null!==(t=(0,a.ov)(n.search,"collection"))&&void 0!==t?t:null;return{channelLogin:null!=g?g:null,videoID:null!=y?y:null,collectionID:null!=h?h:null}}},358741:function(e,t,n){"use strict";n.d(t,{O:function(){return r},Z:function(){return a}});var i=n(508952),a=i.x.wrap((function(){return n.e(2435).then(n.bind(n,61944))}),"ReportUserModal"),r=i.x.wrap((function(){return Promise.all([n.e(29747),n.e(49129),n.e(53583)]).then(n.bind(n,624499))}),"ReportWizardNew")},429373:function(e,t,n){"use strict";n.d(t,{eO:function(){return s},Yy:function(){return v},gH:function(){return u},mt:function(){return l},XH:function(){return d},aC:function(){return c}});var i=n(883474),a=n(368600),r=n(922747);function o(){for(var e=0,t=Object.values((0,r.P)());em&&e[c]("&")>0&&(n=e[p](0,m-8).lastIndexOf("&"),e=(e[p](0,n)+f+"cut="+y(e[p](n+1)))[p](0,m)),l.images?(i=new Image,g.ns_p||(g.ns_p=i),"function"==typeof t&&(i.onload=i.onerror=t),i.src=e):l.write("<","p","><",'img src="proxy.php?url=',e,'" height="1" width="1" alt="*"',"><","/p",">")}("https://sb.scorecardresearch.com/p?".concat(o.stringify(t))),n.prevPlaySessionId=n.props.playSessionId}n.isAdPlaying()||n.streaming||n.startComscore()},n.onIdle=function(){n.isAdPlaying()||n.stopComscore()},n.onEnded=function(){n.resetTag()},n.onContentPauseRequested=function(){n.stopComscore()},n.onAdImpression=function(){var e,t;if(n.props.videoAdMetadata||n.props.adFormatMetadata||(0,I.hr)(n.props.adFormatMetadata)){var i=(0,I.hr)(n.props.adFormatMetadata)?n.props.adFormatMetadata:n.props.videoAdMetadata,a=i.duration,o=i.roll,s=L((0,r.__assign)((0,r.__assign)({},n.consentMetadata()),((e={})[C.ClipLength]=1e3*a,e)));n.streaming=!0,null===(t=n.streamingTag)||void 0===t||t.playVideoAdvertisement(s,function(e){switch(e){case D.df.Pre:return w().StreamingTag.AdType.LinearOnDemandPreRoll;case D.df.Mid:return w().StreamingTag.AdType.LinearOnDemandMidRoll;case D.df.Post:return w().StreamingTag.AdType.LinearOnDemandPostRoll;default:return w().StreamingTag.AdType.Other}}(o))}},n.onAdImpressionComplete=function(){n.stopComscore()},n.resetTag(),n}return(0,r.__extends)(t,e),t.prototype.componentDidMount=function(){var e;(0,c.fS)(null===(e=this.props.adFormatMetadata)||void 0===e?void 0:e.adFormat)||(this.props.playerEvents.addEventListener(E.p.PLAYING,this.onPlaying),this.props.playerEvents.addEventListener(E.p.IDLE,this.onIdle),this.props.playerEvents.addEventListener(E.p.ENDED,this.onEnded),this.props.adEvents.addEventListener(A.V.ContentPauseRequested,this.onContentPauseRequested)),this.props.adEvents&&(this.props.adEvents.addEventListener(A.V.Impression,this.onAdImpression),this.props.adEvents.addEventListener(A.V.Complete,this.onAdImpressionComplete))},t.prototype.componentDidUpdate=function(e){this.props.playSessionId!==e.playSessionId&&this.resetTag()},t.prototype.componentWillUnmount=function(){var e;this.stopComscore(),(0,c.fS)(null===(e=this.props.adFormatMetadata)||void 0===e?void 0:e.adFormat)&&(this.props.adEvents.removeEventListener(A.V.Impression,this.onAdImpression),this.props.adEvents.removeEventListener(A.V.Complete,this.onAdImpressionComplete))},t.prototype.render=function(){return null},t.prototype.startComscore=function(){var e,t=this.assetMetadata();t&&(this.streaming=!0,null===(e=this.streamingTag)||void 0===e||e.playVideoContentPart(L(t)))},t.prototype.stopComscore=function(){var e;this.streaming&&(this.streaming=!1,null===(e=this.streamingTag)||void 0===e||e.stop())},t.prototype.resetTag=function(){this.stopComscore(),this.streamingTag=new(w().StreamingTag)({customerC2:"6745306",secure:!0})},t.prototype.assetMetadata=function(){var e,t,n;if(this.props.isLive){var i=this.props.data&&this.props.data.user;return i?(0,r.__assign)((0,r.__assign)((0,r.__assign)({},P),this.consentMetadata()),((e={})[C.AssetID]=this.props.broadcastID||"",e[C.ClipLength]=0,e[C.StationTitle]=i.displayName,e[C.EpisodeTitle]=i.broadcastSettings&&i.broadcastSettings.title||"",e[C.Genre]=x(i.stream&&i.stream.game&&i.stream.game.name),e[C.DigitalAirdate]=R(i.stream&&i.stream.createdAt),e[C.IsCompleteEpisode]=!0,e)):null}if(this.props.isVodOrCollection){var a=this.props.data&&this.props.data.video;return a?(0,r.__assign)((0,r.__assign)((0,r.__assign)({},P),this.consentMetadata()),((t={})[C.AssetID]=a.id||"",t[C.ClipLength]=a.lengthSeconds&&1e3*a.lengthSeconds||null,t[C.StationTitle]=a.owner&&a.owner.displayName,t[C.EpisodeTitle]=a.title,t[C.Genre]=x(a.game&&a.game.name),t[C.DigitalAirdate]=R(a.createdAt),t[C.IsCompleteEpisode]=a.broadcastType===u.Suw.ARCHIVE,t)):null}if(this.props.isClip){var o=this.props.data&&this.props.data.clip;return o?(0,r.__assign)((0,r.__assign)((0,r.__assign)({},P),this.consentMetadata()),((n={})[C.AssetID]=o.id||"",n[C.ClipLength]=1e3*o.durationSeconds,n[C.StationTitle]=o.broadcaster&&o.broadcaster.displayName,n[C.EpisodeTitle]=o.title,n[C.Genre]=x(o.game&&o.game.name),n[C.DigitalAirdate]=R(o.createdAt),n[C.IsCompleteEpisode]=!1,n)):null}return null},t.prototype.consentMetadata=function(){var e,t,n,i=(0,p.gK)(v.F.ComScore,null===(t=this.props)||void 0===t?void 0:t.consent)?!(0,p.bq)(v.F.ComScore,null===(n=this.props)||void 0===n?void 0:n.consent):null;return(e={})[C.DidConsent]=i,e},t.prototype.isAdPlaying=function(){return!!this.props.videoAdMetadata||(0,I.pt)(this.props.adFormatMetadata)},t}(s.Component),B=(0,l.Zz)((0,_.dd)(q),(0,y.X)(),(0,h.VX)(G),(0,k.cj)(H),(0,f.O)(),m.z3,(0,g.h)(),(0,d._v)(O(),{options:function(e){var t,n,i,a;return{variables:{channel:null!==(t=e.channelLogin)&&void 0!==t?t:"",clipSlug:null!==(n=e.clipSlug)&&void 0!==n?n:"",isClip:e.isClip,isLive:e.isLive,isVodOrCollection:e.isVodOrCollection,vodID:null!==(a=null!==(i=e.vodID)&&void 0!==i?i:e.collectionVodID)&&void 0!==a?a:""}}},skip:function(e){var t;return e.isVodOrCollection&&!(null!==(t=e.vodID)&&void 0!==t?t:e.collectionVodID)}}))(U),j=(0,l.Zz)((0,_.dd)(q),(0,k.cj)(H),(0,h.VX)((function(e,t){return G(e,t)})),m.z3,(0,g.h)(),(0,d._v)(O(),{options:function(e){var t,n,i,a;return{variables:{channel:null!==(t=e.channelLogin)&&void 0!==t?t:"",clipSlug:null!==(n=e.clipSlug)&&void 0!==n?n:"",isClip:e.isClip,isLive:e.isLive,isVodOrCollection:e.isVodOrCollection,vodID:null!==(a=null!==(i=e.vodID)&&void 0!==i?i:e.collectionVodID)&&void 0!==a?a:""}}},skip:function(e){var t;return e.isVodOrCollection&&!(null!==(t=e.vodID)&&void 0!==t?t:e.collectionVodID)}}))(U);function q(e){return{broadcastID:(0,M.RX)(e)||null,playSessionId:e.playSessionId}}function G(e,t){return void 0===t&&(t={}),{videoAdMetadata:e.videoAdMetadata,adFormatMetadata:t.adFormatMetadata||e.adFormatMetadata,adEvents:t.adEventsProp||t.adEvents}}function H(e){var t=e.content;return{channelLogin:(0,F.hd)(t),clipSlug:(0,F.Qc)(t),isClip:(0,F.Jn)(t),isLive:(0,F.DG)(t),isVodOrCollection:(0,F.wy)(t)||(0,F.P3)(t),vodID:(0,F.hq)(t)}}},472180:function(e,t,n){"use strict";n.d(t,{G:function(){return u},H:function(){return c}});var i=n(296540),a=n(26576),r=n(641896),o=n(911906),s=n(170148),l=n(605840),d=n(562099),u=864e5,c=function(){var e=(0,i.useContext)(r.$g),t=(0,i.useContext)(o.kl),n=t.behaviors&&t.behaviors.disableUserPreferencePersistence,c=e.mediaPlayerInstance,p=e.updateContext,v=e.quality,m=e.availableQualities,f=t.type,g=(0,d.m)((0,d.uU)(e),m),y=v===l.w_||g,h=(0,i.useCallback)((function(){Date.now()-(0,d.Xz)(0)>=u&&c&&y&&(c.setAutoQualityMode(!0),p({quality:s._6.Auto,qualityBitrate:l.IJ.bitrate}),n||(0,d.XF)(l.IJ,f))}),[c,p,n,f,y]);return(0,a.p)("2020",h),null}},331333:function(e,t,n){"use strict";function i(e,t){var n={currSegment:null,prevSegment:null};if(!e||!t)return n;for(var i=e.length-1;i>=0;i--){if(a(e[i],t))return n.currSegment=e[i],n.prevSegment=e[i-1]||null,n;!n.prevSegment&&e[i].endOffset<=t&&(n.prevSegment=e[i])}return n}function a(e,t){return e.startOffset<=t&&t<=e.endOffset}function r(e,t){if(!e||!t)return!e&&!t;var n=e.segments,i=t.segments;return!((n||i)&&n!==i&&(!n||n.length||!i||i.length))||!(!n||!i||n.length!==i.length)&&n.every((function(e,t){var n=e.startOffset,a=e.endOffset,r=i[t],o=r.startOffset,s=r.endOffset;return n===o&&a===s}))}n.d(t,{F:function(){return r},y:function(){return i}})},196476:function(e,t,n){"use strict";n.d(t,{Jn:function(){return I},NH:function(){return D},aS:function(){return E}});var i=n(331635),a=n(706411),r=n.n(a),o=n(296540),s=n(868238),l=n(453595),d=n(654195),u=n(233936),c=n(641896),p=n(911906),v=n(731820),m=n(334963),f=n(339563),g=n(573527),y=n(852747),h=n(249448),_=n(920953),k=n(894320),S=n(15111),C=["space","k"],b=["shift+up","shift+down"],P=["j","l","left","right"],A=[",","."],E=10,I=2,T=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mouseTrapInstance=null,t.trackingBroadcastID=null,t.togglePlayback=function(e,n){t.props.hasPlaybackRestriction||"space"===n&&document.activeElement&&document.activeElement!==document.body||(e.preventDefault(),t.props.isPlaying?t.props.pause({userTriggered:!0}):t.props.play({userTriggered:!0}))},t.changeVolume=function(e,n){if(!t.props.disableAudio){e.preventDefault();var i=t.props.volume||0,a="shift+up"===n?Math.round(100*Math.min(i+.1,1))/100:Math.round(100*Math.max(i-.1,0))/100;t.props.setVolume(a,{persist:!0,userTriggered:!0})}},t.closeCollectionsSidebar=function(e){e.preventDefault(),t.props.isCollectionSidebarShowing&&t.props.toggleCollectionSidebar()},t.seek=function(e,n){e.preventDefault();var i=(0,y.E9)(t.props),a=(0,y.Ds)(t.props);if(isFinite(a)){!(0,g.cz)(t.props.videoAdMetadata)&&t.props.isDVRContent&&t.props.isLiveContent&&t.props.mediaPlayerInstance&&(a=i=t.props.mediaPlayerInstance.getStartOffset()+t.props.mediaPlayerInstance.getPosition());var r=E;t.props.isClipContent?r=I:t.props.isLiveContent&&t.props.isDVRContent&&(r=(0,m.e8)());var o=t.calculateTargetSeekTime(i,"j"===n||"left"===n?-r:r,.01,a);o&&(t.props.isDVRContent?(t.props.dvrSeek(o,a),(0,S.G)({broadcastID:t.trackingBroadcastID,currOffset:i,pauseTriggered:!1,playbackID:t.props.playbackID,uptime:a,targetOffset:o,vodID:t.props.dvrVodID})):t.props.seek(o))}},t.toggleFullscreen=function(e){if(t.props.fullscreen.supported()&&!t.props.disableFullscreen){e.preventDefault();var n=t.props,i=n.isFullscreen,a=n.enterFullscreen,r=n.exitFullscreen;i?r():a()}},t.toggleMute=function(e){var n=t.props,i=n.disableAudio,a=n.isClipContent,r=n.muted,o=n.setMuted;a||i||(e.preventDefault(),o(!r,{persist:!0,userTriggered:!0}))},t.changePlaybackRate=function(e,n){if(!t.props.isLiveContent){e.preventDefault();var i=(0,y.ym)(t.props),a=y.Fy.findIndex((function(e){return e===i})),r=","===n?a-1:a+1;if(r>=0&&r<=y.Fy.length-1){var o=y.Fy[r];(0,y.qr)(o,t.props)}}},t.toggleShortcutOverlay=function(e){e.preventDefault(),t.props.isKeyboardShortcutsVisible?t.props.hideKeyboardShortcuts():(t.props.showKeyboardShortcuts(),t.props.setStatsOverlay(v.Uz.None))},t.initHandlers=function(){t.clearKeyHandlers(),t.mouseTrapInstance=new(r());var e=t.mouseTrapInstance.stopCallback;t.mouseTrapInstance.stopCallback=t.stopCallback(e),t.setKeyHandlers()},t.setKeyHandlers=function(){t.mouseTrapInstance&&(t.mouseTrapInstance.bind(C,t.togglePlayback,"keydown"),t.mouseTrapInstance.bind(b,t.changeVolume,"keydown"),t.mouseTrapInstance.bind("esc",t.closeCollectionsSidebar,"keydown"),t.mouseTrapInstance.bind(P,t.seek,"keydown"),t.mouseTrapInstance.bind("m",t.toggleMute,"keydown"),t.mouseTrapInstance.bind("f",t.toggleFullscreen,"keydown"),t.mouseTrapInstance.bind(A,t.changePlaybackRate,"keydown"),t.mouseTrapInstance.bind("?",t.toggleShortcutOverlay,"keydown"))},t.clearKeyHandlers=function(){t.mouseTrapInstance&&(t.mouseTrapInstance.unbind(C,"keydown"),t.mouseTrapInstance.unbind(b,"keydown"),t.mouseTrapInstance.unbind("esc","keydown"),t.mouseTrapInstance.unbind(P,"keydown"),t.mouseTrapInstance.unbind("m","keydown"),t.mouseTrapInstance.unbind("f","keydown"),t.mouseTrapInstance.unbind(A,"keydown"),t.mouseTrapInstance.unbind("?","keydown"))},t.stopCallback=function(e){return function(n,i,a){return!!(e(n,i,a)||t.props.disableKeyboardShortcuts||t.props.forceControlVisibilityHidden)}},t.calculateTargetSeekTime=function(e,t,n,i){var a=e+t;return ai?null:a},t}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){var e,t;this.initHandlers();var n=null===(e=this.props.mediaPlayerInstance)||void 0===e?void 0:e.getSessionData();this.trackingBroadcastID=null!==(t=n&&n["BROADCAST-ID"])&&void 0!==t?t:null},t.prototype.componentWillUnmount=function(){this.clearKeyHandlers()},t.prototype.componentDidUpdate=function(e){var t,n;this.props.contentChannelLogin!==e.contentChannelLogin&&(this.trackingBroadcastID=null);var i=null===(t=this.props.mediaPlayerInstance)||void 0===t?void 0:t.getSessionData(),a=null!==(n=i&&i["BROADCAST-ID"])&&void 0!==n?n:null;a&&(this.trackingBroadcastID=a)},t.prototype.render=function(){return null},t}(o.Component);var D=(0,s.Zz)((0,u.VX)((function(e){return{videoAdMetadata:e.videoAdMetadata}})),(0,l.W)(),(0,c.dd)((function(e){return{hasPlaybackRestriction:(0,_.k1)(e),mediaPlayerInstance:e.mediaPlayerInstance}})),(0,p.cj)((function(e){var t=(0,k.wk)({playerPublicPropsContext:e}),n=e.content;return{disableAudio:t.disableAudio,disableFullscreen:t.disableFullscreen,disableKeyboardShortcuts:t.disableKeyboardShortcuts,disableUserPreferencePersistence:t.disableUserPreferencePersistence,forceControlVisibilityHidden:t.forceControlVisibility===f.Ie.Hidden,isClipContent:(0,h.Jn)(n),isDVRContent:(0,h.lp)(n),isLiveContent:(0,h.DG)(n)}})),(0,v.c0)((function(e){return{enterFullscreen:e.enterFullscreen,exitFullscreen:e.exitFullscreen,hideKeyboardShortcuts:e.hideKeyboardShortcuts,isCollectionSidebarShowing:e.isCollectionSidebarShowing,isFullscreen:e.isFullscreen,isKeyboardShortcutsVisible:e.isKeyboardShortcutsVisible,setStatsOverlay:e.setStatsOverlay,showKeyboardShortcuts:e.showKeyboardShortcuts,toggleCollectionSidebar:e.toggleCollectionSidebar}})),(0,m.AP)((function(e){return{dvrSeek:e.dvrSeek,isPlaying:e.isPlaying,muted:e.muted,pause:e.pause,play:e.play,seek:e.seek,setMuted:e.setMuted,setVolume:e.setVolume,volume:e.volume}})),(0,d.cU)((function(e){var t,n=e.content,i=e.playbackID;return{contentChannelLogin:n&&null!==(t=(0,h.hd)(n))&&void 0!==t?t:null,dvrVodID:n?(0,h.dB)(n):null,playbackID:i}})))(T)},962678:function(e,t,n){"use strict";n.d(t,{Ae:function(){return r},NZ:function(){return s},VY:function(){return o}});var i=n(274092),a=n(249448);function r(e,t){var n,i,r,s,l=void 0;return(0,a.DG)(e)?l=null===(i=null===(n=t.user)||void 0===n?void 0:n.broadcastSettings)||void 0===i?void 0:i.title:(0,a.wy)(e)||(0,a.P3)(e)?l=null===(r=t.video)||void 0===r?void 0:r.title:(0,a.Jn)(e)&&(l=null===(s=t.clip)||void 0===s?void 0:s.title),l||o(e,t)}function o(e,t){return(0,i.d)(function(e,t){var n,i,r,o,s;return(0,a.DG)(e)?(null===(n=t.user)||void 0===n?void 0:n.login)||"":(0,a.wy)(e)||(0,a.P3)(e)?(null===(r=null===(i=t.video)||void 0===i?void 0:i.owner)||void 0===r?void 0:r.login)||"":(0,a.Jn)(e)?(null===(s=null===(o=t.clip)||void 0===o?void 0:o.broadcaster)||void 0===s?void 0:s.login)||"":(0,a.hd)(e)||null}(e,t),function(e,t){var n,i,r,o,s,l=void 0;return(0,a.DG)(e)?l=null===(n=t.user)||void 0===n?void 0:n.displayName:(0,a.wy)(e)||(0,a.P3)(e)?l=null===(r=null===(i=t.video)||void 0===i?void 0:i.owner)||void 0===r?void 0:r.displayName:(0,a.Jn)(e)&&(l=null===(s=null===(o=t.clip)||void 0===o?void 0:o.broadcaster)||void 0===s?void 0:s.displayName),null!=l?l:null}(e,t),!0)}function s(e,t){var n,i,r,o,s;return(0,a.DG)(e)?null===(n=t.user)||void 0===n?void 0:n.profileImageURL:(0,a.wy)(e)||(0,a.P3)(e)?null===(r=null===(i=t.video)||void 0===i?void 0:i.owner)||void 0===r?void 0:r.profileImageURL:(0,a.Jn)(e)?null===(s=null===(o=t.clip)||void 0===o?void 0:o.broadcaster)||void 0===s?void 0:s.profileImageURL:void 0}},571921:function(e,t,n){"use strict";n.d(t,{j:function(){return c}});var i=n(331635),a=n(296540),r=n(868238),o=n(71062),s=n(514105),l=n(641896),d=n(947153),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeInSecFloored=0,t.onTimeChanged=function(){var e=t.props.mediaPlayerInstance;if(e){var n=e.getPosition(),i=Math.floor(n);t.props.onTimeChanged&&t.props.onTimeChanged(n),i!==t.timeInSecFloored&&(t.props.onTimeSecondsChanged&&t.props.onTimeSecondsChanged(i),t.timeInSecFloored=i)}},t}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.throttleMilliseconds?(this.onTimeChangedThrottled=(0,o.n)(this.onTimeChanged,this.props.throttleMilliseconds,{leading:!1}),this.props.playerEvents.addEventListener(d.a.TIME_UPDATE,this.onTimeChangedThrottled)):this.props.playerEvents.addEventListener(d.a.TIME_UPDATE,this.onTimeChanged)},t.prototype.componentDidUpdate=function(e){e.throttleMilliseconds&&!this.props.throttleMilliseconds?(this.props.playerEvents.removeEventListener(d.a.TIME_UPDATE,this.onTimeChangedThrottled),this.onTimeChangedThrottled.cancel(),this.props.playerEvents.addEventListener(d.a.TIME_UPDATE,this.onTimeChanged)):!e.throttleMilliseconds&&this.props.throttleMilliseconds&&this.props.playerEvents.removeEventListener(d.a.TIME_UPDATE,this.onTimeChanged),this.props.throttleMilliseconds&&e.throttleMilliseconds!==this.props.throttleMilliseconds&&(e.throttleMilliseconds&&(this.props.playerEvents.removeEventListener(d.a.TIME_UPDATE,this.onTimeChangedThrottled),this.onTimeChangedThrottled.cancel()),this.onTimeChangedThrottled=(0,o.n)(this.onTimeChanged,this.props.throttleMilliseconds,{leading:!1}),this.props.playerEvents.addEventListener(d.a.TIME_UPDATE,this.onTimeChangedThrottled))},t.prototype.componentWillUnmount=function(){this.onTimeChangedThrottled&&(this.props.playerEvents.removeEventListener(d.a.TIME_UPDATE,this.onTimeChangedThrottled),this.onTimeChangedThrottled.cancel())},t.prototype.render=function(){return null},t}(a.Component),c=(0,r.Zz)((0,l.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}})),(0,s.X)())(u)},165495:function(e,t,n){"use strict";n.d(t,{F$:function(){return m},yg:function(){return v}});var i=n(331635),a=n(474848),r=n(296540),o=n(868238),s=n(276337),l=n(151702),d=n(911906),u=n(249448),c=n(368859),p=n.n(c);function v(){return function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,i.__extends)(n,t),n.prototype.render=function(){return(0,a.jsx)(e,(0,i.__assign)({},this.props))},n.displayName=(0,l.K)(n.name,e),n}(r.Component),n=(0,s._v)(p(),{options:function(e){return{variables:{channel:e.liveChannelLogin}}},skip:function(e){return!e.liveChannelLogin}});return(0,o.Zz)((0,d.cj)(f),n)(t)}}function m(e){return!!(e&&e.user&&e.user.stream&&e.user.stream.isEncrypted)}function f(e){var t=e.content;return{liveChannelLogin:(0,u.jp)(t)}}},279528:function(e,t,n){"use strict";n.d(t,{_u:function(){return a},s_:function(){return o}});var i=n(854622),a={preAdPodVolume:null,preAdPodMuted:null,streamLoudness:null,reachedDurationThreshold:!1},r=(0,i.e)("AdLoudnessContext",a,(function(e){return{adLoudness:e}})),o=(r.withMemoContext,r.context)},104199:function(e,t,n){"use strict";n.d(t,{K:function(){return c},c:function(){return p}});var i=n(296540),a=n(883474),r=n(233936),o=n(911906),s=n(62026),l=n(573527),d=n(894320),u=n(279528),c=function(e){return e===s.Z$.STANDARD_AUDIO?-14:-10.98},p=function(){var e=(0,i.useContext)(u.s_),t=e.preAdPodMuted,n=e.preAdPodVolume,s=e.streamLoudness,p=(0,i.useContext)(r.jK),v=p.adFormatRequest,m=p.adFormatMetadata,f=p.videoAdRequest,g=p.videoAdMetadata,y=p.userManuallyAdjustedVolumeDuringAd,h=(0,i.useContext)(o.kl),_=(0,d.wk)({playerPublicPropsContext:h}).disableAutoAdVolumeAdjustment,k=(0,i.useRef)(c());(0,i.useEffect)((function(){var e=null!=f?f:v;k.current=c(null==e?void 0:e.adFormat)}),[v,f]);var S=(0,i.useCallback)((function(){return(0,l.EF)(g)||(0,l.hr)(m)}),[g,m]),C=(0,i.useCallback)((function(e){var n,i=s&&Date.now()-s.timestamp<=3e5,r=(!!f||!!v)&&S()&&!_&&e>.1&&!y&&!!(s&&k.current>s.loudness)&&i;return a.E5.track("ad_loudness_normalization",{has_ad_request:!!f||!!v,has_ad_metadata:!!g||!!m,stitched_ad_metadata:!!(null==g?void 0:g.stitched)||!!(null==m?void 0:m.stitched),auto_ad_volume_adjustment_disabled:!!_,pre_ad_pod_muted:!!t,pre_impression_volume:e,user_manually_adjusted_volume_during_ad:y,has_recent_stream_loudness:!!i,play_session_id:a.E5.getVideoPlayerTrackingData().playSessionID,was_normalized:!!r,ad_session_id:(null==f?void 0:f.sessionID)||(null==v?void 0:v.sessionID),channel:null===(n=a.E5.getLastPageview())||void 0===n?void 0:n.channel}),r}),[s,v,m,f,g,_,t,y,k,S]),b=(0,i.useCallback)((function(){return(f||(0,l.tl)(v))&&!y}),[y,f,v]),P=(0,i.useCallback)((function(e){return function(e){var t=e.playerVolume,n=e.streamLoudness,i=e.adLoudness;if(!n||!i)return null;var a=8.6901,r=.0029,o=a*Math.log(t)-r+(n-i),s=Math.exp((o+r)/a);return s===1/0?1/0:s>1?1:+s.toFixed(10)}({playerVolume:e,streamLoudness:s&&s.loudness,adLoudness:k.current})}),[k,s]);return{shouldAdjustVolume:C,getAdjustedVolume:P,getInitialVolume:(0,i.useCallback)((function(){return n}),[n]),shouldResetVolumeOnContentResume:b,getInitialMuteState:(0,i.useCallback)((function(){return!!t}),[t])}}},409484:function(e,t,n){"use strict";n.d(t,{B:function(){return s}});var i=n(331635),a=n(474848),r=(n(296540),n(151702)),o=n(104199);function s(){return function(e){var t=function(t){var n=(0,o.c)();return(0,a.jsx)(e,(0,i.__assign)({},t,n))};return t.displayName=(0,r.K)("WithAdLoudness",e),t}}},523471:function(e,t,n){"use strict";n.d(t,{Hq:function(){return r},qu:function(){return i},wG:function(){return a}});var i=[/^IAS$/,/^doubleverify.com-omid$/,/^amazon.com-omid$/,/^iabtechlab.com-omid$/,/^moat\.com(?!-omsdktwitchhostedamazonvideo963371838528|-omsdktwitchhostedssaiamazonvideo236473939629)/,/^protected.media-omid$/,/^adloox.com-omid$/],a=[/^IAS$/,/^amazon.com-omid$/,/^moat\.com(?!-omsdktwitchhostedamazonvideo963371838528|-omsdktwitchhostedssaiamazonvideo236473939629)/,/^protected.media-omid$/,/^adloox.com-omid$/],r=["ddacn6pr5v0tl.cloudfront.net","c.amazon-adsystem.com","www.twitch.tv"]},109342:function(e,t,n){"use strict";n.d(t,{c:function(){return ke}});var i,a,r,o,s,l=n(331635),d=n(474848),u=n(891975),c=n(296540),p=n(806677),v=n(697621),m=n(233936),f=n(731820),g=n(334963),y=n(110657),h=n(523471);function _(e){return"".concat(e.adSessionID,"-").concat(e.adPosition)}function k(e,t,n){return{adSessionID:_(e),type:t,timestamp:Date.now(),data:void 0!==n?n:null}}function S(e){return{viewport:{width:window.innerWidth,height:window.innerHeight},adView:{percentageInView:e.percentageInView,geometry:e.geometry,onScreenGeometry:e.onScreenGeometry,reasons:e.reasons}}}function C(e,t){var n=function(e){return{skippable:!1,autoPlay:!0,position:e.roll}}(e);t(k(e,i.Loaded,n))}function b(e,t,n){var a=function(e,t){return{duration:e.duration,videoPlayerVolume:+(t||0).toFixed(10)}}(e,n);t(k(e,i.Start,a))}function P(e,t,n){var a=function(e){return(0,l.__assign)({mediaType:"video",videoEventAdaptorType:"jsCustom",videoEventAdaptorVersion:"1.2"},S(e))}(n);t(k(e,i.Impression,a))}function A(e,t,n){if(n>0&&n<4){var a=function(e){switch(e){case 1:return i.FirstQuartile;case 2:return i.Midpoint;case 3:return i.ThirdQuartile;default:return i.Complete}}(n);t(k(e,a))}}function E(e,t){t(k(e,i.Pause))}function I(e,t){t(k(e,i.Resume))}function T(e,t){var n={interactionType:r.Click};t(k(e,i.AdUserInteraction,n))}function D(e,t,n){var a=null==t?void 0:t.getElementsByTagName("video"),r=a&&a[0]?a[0]:null,o={context:{apiVersion:"",environment:"web",accessMode:"full",videoElement:r,adSessionType:"html",adServerId:"",adCount:1,omidNativeInfo:{partnerName:"Amazon",partnerVersion:"1.0"},omidJsInfo:{omidImplementer:"omsdk",serviceVersion:"1.3",sessionClientVersion:"1.3",partnerName:"Amazon",partnerVersion:"1.0"},supports:["clid"]}};n(k(e,i.SessionStart,o))}!function(e){e.SessionStart="sessionStart",e.SessionError="sessionError",e.SessionFinish="sessionFinish",e.Impression="impression",e.Loaded="loaded",e.Start="start",e.FirstQuartile="firstQuartile",e.Midpoint="midpoint",e.ThirdQuartile="thirdQuartile",e.Complete="complete",e.Pause="pause",e.Resume="resume",e.BufferStart="bufferStart",e.BufferFinish="bufferFinish",e.VolumeChange="volumeChange",e.PlayerStateChange="playerStateChange",e.AdUserInteraction="proxy.php?url=adUserInteraction",e.GeometryChange="geometryChange"}(i||(i={})),function(e){e.Minimized="minimized",e.Collapsed="collapsed",e.Normal="normal",e.Expanded="expanded",e.Fullscreen="fullscreen"}(a||(a={})),function(e){e.Click="click",e.InvitationAccepted="invitation_accepted"}(r||(r={})),function(e){e.NotFound="notFound",e.Hidden="hidden",e.Backgrounded="backgrounded",e.Viewport="viewport",e.Obstructed="obstructed",e.Clipped="clipped"}(o||(o={})),function(e){e.Video="video",e.Generic="generic"}(s||(s={}));var N=n(78058),w=n(430228),R=n.n(w),x=n(883474),L=new Set([i.SessionStart,i.SessionError,i.SessionFinish]),F="session",M="video";function V(e){return!L.has(e)&&e!==i.Impression&&e!==i.GeometryChange}function O(){var e=c.useRef(new(R())),t=c.useRef([]);return{emitOMIDEvent:(0,N.K)((function(n){x.vF.debug("ad ".concat(n.type,", omidEvent"),n),t.current.push(n),L.has(n.type)?e.current.emit(F,n):(e.current.emit(n.type,n),V(n.type)&&e.current.emit(M,n))})),removeOldEventsFromCache:(0,N.K)((function(e){t.current=t.current.filter((function(t){return t.adSessionID!==_(e)}))})),getOMIDClient:function(n,a){function r(e){return e.type===i.SessionStart?(0,l.__assign)((0,l.__assign)({},e),{data:(0,l.__assign)((0,l.__assign)({},e.data||{}),{verificationParameters:a})}):e}function o(e){return e.adSessionID===_(n)}var s=function(n,i){t.current.filter(o).filter(function(e){switch(e){case F:return function(e){return L.has(e.type)};case M:return function(e){return V(e.type)};default:return function(t){return t.type===e}}}(n)).map(r).forEach((function(e){return i(e)})),e.current.addListener(n,(function(e){o(e)&&i(r(e))}))};return{registerSessionObserver:function(e,t){s(F,e)},addEventListener:s}}}}var U=n(12109),B=n(536330);function j(){return{x:0,y:0,width:window.innerWidth,height:window.innerHeight}}function q(e){return e.width*e.height}function G(e,t){if(!t)return[];var n={x:0,y:0,width:window.innerWidth,height:50};return 0===q(W(e,n))?[]:[n]}function H(e){var t=[];if(e){var n={x:0,y:0,width:e>0?window.innerWidth:0,height:e};t.push(n)}return t}function K(e,t){if(0===t)return 0;var n=Math.round(e/t*100);return Math.min(100,Math.max(0,n))}function z(e,t){var n=W(e,j()),i=t.map((function(e){return(0,l.__assign)((0,l.__assign)({},W(e,n)),{depth:1})}));var a=q(n);return function e(t){var n=t.filter((function(e){return q(e)>0}));if(0===n.length)return[];var i=n[0],a=e(n.slice(1)),r=[];return a.forEach((function(e){r.push(e),r.push((0,l.__assign)((0,l.__assign)({},W(e,i)),{depth:i.depth+e.depth}))})),r.push(i),r}(i).forEach((function(e){e.depth%2==1?a-=q(e):a+=q(e)})),a}function W(e,t){var n=Math.max(e.x,t.x),i=Math.max(e.y,t.y),a=Math.min(e.x+e.width,t.x+t.width)-n,r=Math.min(e.y+e.height,t.y+t.height)-i;return a<=0||r<=0?{x:0,y:0,width:0,height:0}:{x:n,y:i,width:a,height:r}}var Q=function(e,t){switch(t.type){case"SetInitialAdViewGeometry":case"ResetAdViewReasons":return(0,l.__assign)((0,l.__assign)({},e),t.payload);case"ResetAdViewGeometry":var n=function(e,t,n,i,r){var s,d=(0,B.G)(e),u=d.x,c=void 0===u?0:u,p=d.y,v=void 0===p?0:p,m=d.width,f=void 0===m?0:m,g=d.height,y=void 0===g?0:g,h={x:c,y:v,width:f,height:y},_=0;if(r){var k=t.onScreenGeometry.obstructions[0]||{x:0,y:0,width:0,height:0},S=k.y+k.height;_=v>S?v:S}var C,b=(0,U.fX)("dont_report_non_overlapping_obstructions")?G(h,r):H(_),P=W(h,j()),A=q(h),E=q(P),I=z(h,b),T=K(I,A),D=[];return It.area?a.Expanded:T>0?a.Collapsed:a.Minimized,{initialGeometry:t.initialGeometry,geometry:h,onScreenGeometry:(0,l.__assign)((0,l.__assign)({},P),{obstructions:b}),area:A,percentageInView:T,reasons:D,playerState:C}}(t.payload.videoContainer,e,t.payload.lastPlayerState,t.payload.isFullscreen,t.payload.isTopNavShowing);return(0,l.__assign)((0,l.__assign)({},e),{geometry:n.geometry,onScreenGeometry:n.onScreenGeometry,area:n.area,percentageInView:n.percentageInView,reasons:n.reasons,playerState:n.playerState});case"SetAdComplete":return(0,l.__assign)({},e);default:throw new Error}},Z=n(26576),Y=n(459487),X=function(e){var t=e.listenerProps,n=t.omidAdMetadata,a=t.emitOMIDEvent;return(0,Z.p)(Y.p.BUFFERING,c.useCallback((function(){a(k(n,i.BufferStart))}),[n,a])),(0,Z.p)(Y.p.PLAYING,c.useCallback((function(){a(k(n,i.BufferFinish))}),[n,a])),null},$=n(633547),J=n(292241),ee=function(e){var t=e.adFormatMetadataProp,n=e.listenerProps,i=n.omidAdMetadata,a=n.emitOMIDEvent,r=c.useContext(m.jK),o=r.addClickListener,s=r.removeClickListener;(0,$._)(J.V.Click,c.useCallback((function(){T(i,a)}),[i,a]),{adFormatMetadata:t});var l=c.useCallback((function(){T(i,a)}),[i,a]);return c.useEffect((function(){return o(l),function(){s(l)}}),[l,s,o]),null},te=function(e){var t=e.adFormatMetadataProp,n=e.listenerProps,a=n.omidAdMetadata,r=n.emitOMIDEvent;return(0,$._)(J.V.Error,c.useCallback((function(e){var t,n,o,l,d;t=a,n=s.Generic,o=e.reason,l=r,d=function(e,t){return{error_type:e,message:t}}(n,o),l(k(t,i.SessionError,d))}),[a,r]),{adFormatMetadata:t}),null},ne=n(726561),ie=n(415044),ae=n(621790),re=n(844023),oe=n(176061),se=n(183198),le=function(e){var t=e.verificationsIsNotEmpty,n=e.listenerProps,a=n.omidAdMetadata,r=n.emitOMIDEvent,s=e.adViewState,l=e.updateAdViewState,u=e.lastPlayerState,p=e.videoContainerProp,v=c.useContext(f._t).isFullscreen,m=c.useContext(f._t).videoContainer||p,g=(0,ie.d4)(se.GQ),y=!v&&!g;c.useEffect((function(){!function(e,t,n){var a=S(n);t(k(e,i.GeometryChange,a))}(a,r,s)}),[s,a,r]);var h=c.useCallback((function(){"visible"!==document.visibilityState?l({type:"ResetAdViewReasons",payload:{reasons:[o.Backgrounded],percentageInView:0}}):l({type:"ResetAdViewGeometry",payload:{videoContainer:m,lastPlayerState:u,isFullscreen:v,isTopNavShowing:y}})}),[l,m,u,v,y]);c.useEffect((function(){return document.addEventListener("visibilitychange",h),function(){document.removeEventListener("visibilitychange",h)}}),[h]);var _=(0,ne.F)((function(){m&&l({type:"ResetAdViewGeometry",payload:{videoContainer:m,lastPlayerState:u,isFullscreen:v,isTopNavShowing:y}})})),C=c.useMemo((function(){return(0,oe.s)((function(){_.current()}),1e3)}),[_]),b=c.useContext(re.MD).registerReceiver;return c.useEffect((function(){var e=b({checkVisible:C});return function(){e()}}),[C,b]),(0,d.jsx)(d.Fragment,{children:t&&(0,d.jsx)(ae.$,{onResize:C})})},de=n(610009),ue=function(e){var t=e.listenerProps,n=e.videoPlaybackState,i=t.omidAdMetadata,a=t.emitOMIDEvent;(0,de.i)({onPlay:c.useCallback((function(){n||I(i,a)}),[n,i,a]),onPause:c.useCallback((function(){n||E(i,a)}),[a,i,n])});var r=c.useRef();return c.useEffect((function(){n&&(void 0===r.current?n.isPlaying?I(i,a):E(i,a):!r.current&&n.isPlaying?I(i,a):r.current&&!n.isPlaying&&E(i,a),r.current=n.isPlaying)}),[null==n?void 0:n.isPlaying,i,a,n]),null},ce=function(e){var t=e.listenerProps,n=t.omidAdMetadata,i=t.emitOMIDEvent,a=e.setOMIDAdMetadata,r=e.addVerifications,o=e.onAdComplete,s=e.adViewState,l=e.getVolume,d=e.videoAdRequestProp,u=e.videoContainerProp,p=c.useContext(m.jK).videoAdRequest,v=c.useContext(f._t).videoContainer,g=p||d,y=v||u;return(0,$._)(J.V.Loaded,c.useCallback((function(e){var t,n,i,o={adSessionID:(null==g?void 0:g.sessionID)||"",duration:e.adInfo&&e.adInfo.duration||0,adPosition:(null===(n=null===(t=e.adInfo)||void 0===t?void 0:t.adPodInfo)||void 0===n?void 0:n.adPosition)||0,roll:e.request.roll};a(o),r((null===(i=e.adInfo)||void 0===i?void 0:i.verificationResources)||[],o)}),[null==g?void 0:g.sessionID,a,r]),{adFormatMetadata:e.adFormatMetadataProp}),(0,$._)(J.V.Impression,c.useCallback((function(){P(n,i,s)}),[n,s,i]),{adFormatMetadata:e.adFormatMetadataProp}),(0,$._)(J.V.Started,c.useCallback((function(){D(n,y,i),C(n,i),b(n,i,l())}),[n,y,i,l]),{adFormatMetadata:e.adFormatMetadataProp}),(0,$._)(J.V.FirstQuartile,c.useCallback((function(e){A(n,i,e.quartile)}),[n,i]),{adFormatMetadata:e.adFormatMetadataProp}),(0,$._)(J.V.Midpoint,c.useCallback((function(e){A(n,i,e.quartile)}),[n,i]),{adFormatMetadata:e.adFormatMetadataProp}),(0,$._)(J.V.ThirdQuartile,c.useCallback((function(e){A(n,i,e.quartile)}),[n,i]),{adFormatMetadata:e.adFormatMetadataProp}),(0,$._)(J.V.Complete,c.useCallback((function(){o(n)}),[n,o]),{adFormatMetadata:e.adFormatMetadataProp}),null},pe=n(697864),ve=n(947153),me=n(573527),fe=x.x2.logger.withCategory("ssai-progress-listener"),ge=function(e){var t=e.listenerProps,n=t.omidAdMetadata,i=t.emitOMIDEvent,a=e.setOMIDAdMetadata,r=e.addVerifications,o=e.onAdComplete,s=e.adViewState,l=e.getVolume,d=c.useContext(m.jK).videoAdMetadata,u=c.useContext(f._t).videoContainer,p=(0,me.lq)(d)&&d||void 0,v=c.useCallback((function(e){if(e["X-TV-TWITCH-AD-ADVERIFICATIONS"])if(e.DURATION&&e["X-TV-TWITCH-AD-POD-POSITION"]&&e["X-TV-TWITCH-AD-ROLL-TYPE"]){var t,d={adSessionID:e["X-TV-TWITCH-AD-AD-SESSION-ID"]||"",duration:parseInt(e.DURATION,10)||0,adPosition:parseInt(e["X-TV-TWITCH-AD-POD-POSITION"],10)+1,roll:(t=e["X-TV-TWITCH-AD-ROLL-TYPE"],"MIDROLL"===t?y.df.Mid:"POSTROLL"===t?y.df.Post:y.df.Pre)};if(_(d)!==_(n)){o(n),a(d);var c=[];try{c=function(e){var t=e.Verifications||e.Verification;if(!t)return[];return t.map((function(e){return{vendor:e.vendor,JavaScriptResources:e.JavaScriptResource.map((function(e){return{apiFramework:e.apiFramework,URI:e.URI}})),VerificationParameters:e.VerificationParameters}}))}(JSON.parse(atob(e["X-TV-TWITCH-AD-ADVERIFICATIONS"])))}catch(e){fe.warn("failed to parse stitched ad verifications")}r(c,d),D(d,u,i),C(d,i),b(d,i,l()),P(d,i,s)}}else fe.warn("Unable to create omidAdMetadata for stitched ad.")}),[n,o,a,r,u,i,l,s]),g=c.useCallback((function(e){if(e["X-TV-TWITCH-AD-QUARTILE"]){var t=parseInt(e["X-TV-TWITCH-AD-QUARTILE"]||"",10);A(n,i,t)}}),[i,n]),h=c.useCallback((function(e){p&&"live"===e["X-TV-TWITCH-STREAM-SOURCE"]&&o(n)}),[p,o,n]),k=c.useCallback((function(e){if("text/json"===e.type){var t=void 0;try{t=JSON.parse(e.data)}catch(e){return void fe.warn("failed to parse stitched ad metadata")}if(!t)return void fe.warn("failed to parse stitched ad metadata");switch(t.CLASS){case pe.cG:v(t);break;case pe.Pv:g(t);break;case pe.ur:h(t)}}}),[v,g,h]);return(0,Z.p)(ve.a.METADATA,k),null};var ye=function(e){var t=e.listenerProps,n=t.omidAdMetadata,a=t.emitOMIDEvent,r=e.getVolume,o=c.useRef(null);null===o.current&&(o.current=r());var s=c.useMemo((function(){return(0,oe.s)((function(e){var t,r,o;t=n,r=a,o=function(e){return{videoPlayerVolume:+e.toFixed(10)}}(e),r(k(t,i.VolumeChange,o))}),1e3)}),[a,n]);return c.useEffect((function(){var e=r();e!==o.current&&(o.current=e,s(e))}),[s,a,r,n]),null},he=x.x2.logger.withCategory("ad-verification-manager").withCategory("vendor-iframe"),_e=function(e){var t=c.useRef(null),n=c.useCallback((function(){var n,i,a,r,o;if((null===(n=t.current)||void 0===n?void 0:n.contentWindow)&&(null===(i=t.current)||void 0===i?void 0:i.contentDocument))if(0!==e.verification.JavaScriptResources.length){var s=null===(a=t.current)||void 0===a?void 0:a.contentWindow;s.omid3p=e.omidClient;var l=s.document.createElement("script");l.src=e.verification.JavaScriptResources[0].URI,h.wG.some((function(t){return t.test(e.verification.vendor)}))&&(null===(r=t.current)||void 0===r||r.setAttribute("sandbox","allow-scripts")),(null===(o=t.current)||void 0===o?void 0:o.contentDocument).body.appendChild(l)}else he.warn("setupIFrame failed because JavaScriptResources was empty");else he.warn("setupIFrame failed because the iframe was null")}),[e.omidClient,e.verification.JavaScriptResources,e.verification.vendor]);return(0,u.S)((function(){return t.current=document.createElement("iframe"),t.current.style.display="none",t.current.title="VendorIFrame",e.adSessionId&&(t.current.dataset.testid=e.adSessionId),t.current.addEventListener("load",(function(){n()})),document.body.appendChild(t.current),function(){try{document.body.removeChild(t.current)}catch(e){he.warn("failed to remove iframe from document:",e)}}})),null},ke=function(e){var t,n,r,s,S=c.useState([]),C=S[0],b=S[1],P=c.useContext(f._t).videoContainer,A=c.useContext(g.wL),E=A.muted,I=A.volume,T=c.useContext(m.jK),D=T.muted,N=T.volume,w=T.adFormatMetadata,R=T.thirdPartyOutstreamVideoAdElement,x=(0,v.fS)(null===(t=e.adFormatMetadata)||void 0===t?void 0:t.adFormat),L=x?null===(n=e.videoPlaybackState)||void 0===n?void 0:n.isMuted:D,F=x?null===(r=e.videoPlaybackState)||void 0===r?void 0:r.currentVolume:N,M=x?e.adFormatMetadata:w,V=x?null===(s=e.containerNode)||void 0===s?void 0:s.current:R,j=c.useMemo((function(){return M&&(0,v.C_)(null==M?void 0:M.adFormat)&&V?[L,F,V]:[E,I,P]}),[E,I,L,F,M,P,V]),W=j[0],Z=j[1],Y=j[2],$=O(),J=$.emitOMIDEvent,ne=$.removeOldEventsFromCache,ie=$.getOMIDClient,ae=c.useState({adSessionID:"",duration:0,adPosition:0,roll:y.df.Pre}),re=ae[0],oe=ae[1],se=c.useReducer(Q,function(e){var t=(0,B.G)(e),n=t.x,i=void 0===n?0:n,r=t.y,s=void 0===r?0:r,d=t.width,u=void 0===d?0:d,c=t.height,p=void 0===c?0:c,v={y:s,x:i,width:u,height:p},m=(0,U.fX)("dont_report_non_overlapping_obstructions")?G(v,!0):H(s),f=K(z(v,m),q(v)),g=f<100?[o.Obstructed]:[];return"visible"!==document.visibilityState&&(g=[o.Backgrounded],f=0),{initialGeometry:v,geometry:v,onScreenGeometry:(0,l.__assign)((0,l.__assign)({},v),{obstructions:m}),area:u*p,percentageInView:f,reasons:g,playerState:a.Normal}}(Y)),de=se[0],pe=se[1],ve=(0,p.Z)(de.playerState),me=c.useState([]),fe=me[0],he=me[1],ke=c.useCallback((function(){return W?0:Z||0}),[W,Z]),Se=c.useCallback((function(e,t){b((function(n){return e.forEach((function(e){e.JavaScriptResources=e.JavaScriptResources.filter((function(e){return"omid"===(null==e?void 0:e.apiFramework)})),function(e){return h.qu.some((function(t){return t.test(e.vendor)}))&&e.JavaScriptResources.length>0}(e)&&n.push({omidAdMetadata:t,verification:e})})),n}))}),[]),Ce=c.useCallback((function(e){ne(e),b((function(t){return t.filter((function(t){return _(t.omidAdMetadata)!==_(e)}))}))}),[ne]),be=c.useCallback((function(e){var t=setTimeout((function(){return Ce(e)}),2e3);he((function(e){return(0,l.__spreadArray)((0,l.__spreadArray)([],e,!0),[t],!1)}))}),[Ce]);(0,u.S)((function(){return function(){return fe.forEach((function(e){return clearTimeout(e)}))}}));var Pe=c.useCallback((function(e){return(0,l.__awaiter)(void 0,void 0,void 0,(function(){return(0,l.__generator)(this,(function(t){return function(e,t){t(k(e,i.Complete))}(e,J),function(e,t){t(k(e,i.SessionFinish))}(e,J),be(e),[2]}))}))}),[J,be]);var Ae={omidAdMetadata:re,emitOMIDEvent:J};return(0,d.jsxs)(d.Fragment,{children:[C.map((function(e){var t=e.verification,n=JSON.stringify(e);return(0,d.jsx)(_e,{verification:t,omidClient:ie(re,t.VerificationParameters),adSessionId:_(e.omidAdMetadata)},n)})),(0,d.jsx)(ce,{listenerProps:Ae,setOMIDAdMetadata:oe,addVerifications:Se,onAdComplete:Pe,adViewState:de,getVolume:ke,adFormatMetadataProp:e.adFormatMetadata,videoAdRequestProp:e.adFormatRequest,videoContainerProp:Y}),(0,d.jsx)(ge,{listenerProps:Ae,setOMIDAdMetadata:oe,addVerifications:Se,onAdComplete:Pe,adViewState:de,getVolume:ke}),(0,d.jsx)(le,{listenerProps:Ae,verificationsIsNotEmpty:!!C.length,adViewState:de,updateAdViewState:pe,lastPlayerState:ve,videoContainerProp:Y}),(0,d.jsx)(ee,{listenerProps:Ae,adFormatMetadataProp:e.adFormatMetadata}),(0,d.jsx)(X,{listenerProps:Ae}),(0,d.jsx)(ue,{listenerProps:Ae,videoPlaybackState:e.videoPlaybackState}),(0,d.jsx)(ye,{listenerProps:Ae,getVolume:ke}),(0,d.jsx)(te,{listenerProps:Ae,adFormatMetadataProp:e.adFormatMetadata})]})}},706098:function(e,t,n){"use strict";var i,a;n.d(t,{f:function(){return i},p:function(){return a}}),function(e){e.AUDIO="AUDIO",e.VIDEO="VIDEO"}(i||(i={})),function(e){e.LinearCreative="linear",e.CompanionCreative="companion"}(a||(a={}))},162711:function(e,t,n){"use strict";n.d(t,{A7:function(){return T},b3:function(){return N},iB:function(){return D}});var i=n(331635),a=n(296540),r=n(868238),o=n(12109),s=n(883474),l=n(697621),d=n(409484),u=n(706098),c=n(59889),p=n(657789),v=n(164557),m=n(588547),f=n(233936),g=n(641896),y=n(911906),h=n(334963),_=n(62026),k=n(331536),S=n(110657),C=n(292241),b=n(553428),P=n(573527),A=n(249448),E=n(920953),I=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isCleanAdContextTimeoutEnabled=(0,o.fX)("csai_ad_context_auto_clean"),t.addInStreamEventListener=function(e,n){(0,t.props.adEvents.addEventListener)(e,(function(e){(0,P.EF)(t.props.videoAdMetadata)&&n(e)}))},t.onContentResumeRequested=function(e){var n,i,a,r,o={stitched:!1};t.trackRad(m.V.VideoAdPodComplete,e,o),t.track("ad_pod_complete",e,o),t.track("ad_client_pod_completion",e,D(e.adInfo,t.props.videoAdRequest,t.props.videoAdMetadata)),(0,c.qA)("ad_pod_end",{ad_pod_duration:null===(i=null===(n=e.adInfo)||void 0===n?void 0:n.adPodInfo)||void 0===i?void 0:i.totalDuration,num_ads_in_pod:null===(r=null===(a=e.adInfo)||void 0===a?void 0:a.adPodInfo)||void 0===r?void 0:r.totalAds}),t.clearMetadataAndRestartMediaPlayer()},t.onPlaying=function(e){t.props.updateAdPlaying(!0),t.setClearAdContextTimeout(!0);var n=t.props.mediaPlayerInstance;(e.adInfo&&e.adInfo.adFormat||u.f.VIDEO)===u.f.AUDIO&&(null==n||n.play())},t.onPaused=function(e){t.props.updateAdPlaying(!1),t.setClearAdContextTimeout(!1);var n=t.props.mediaPlayerInstance;(e.adInfo&&e.adInfo.adFormat||u.f.VIDEO)===u.f.AUDIO&&(null==n||n.pause())},t.onContentPauseRequested=function(e){var n=t.props,i=n.ended,a=n.isLiveContent,r=n.mediaPlayerInstance,o=t.props,s=o.volume,l=o.muted,d=void 0!==s?s:.5;e.videoAd.setVolume(d),t.props.updateAdVolume(d),l&&(e.videoAd.setMuted(!0),t.props.updateAdMuted(!0)),a?(null==r?void 0:r.isMuted())||null==r||r.setMuted(!0):i||null==r||r.pause()},t.onLoad=function(e){t.track("video_ad_loaded",e,{player_mute:!!t.props.muted,player_volume:+(t.props.volume||0).toFixed(10)})},t.onVolumeChanged=function(e){t.props.updateAdVolume(e.volume)},t.onMuteChange=function(e){t.props.updateAdMuted(e.muted)},t.onCreativeClicked=function(e){var n;(null===(n=e.adInfo)||void 0===n?void 0:n.companionEvent)||t.track("ad_click",e,{stitched:!1})},t.getFormat=function(e){var n=t.props.videoAdRequest,i=e.adInfo;return i&&i.adFormat&&i.adFormat===u.f.AUDIO?_.Z$.STANDARD_AUDIO:(null==n?void 0:n.mafsDecision)?_.Z$.STANDARD_VIDEO:_.gz.STANDARD_VIDEO},t.onStart=function(e){var n=e.adInfo&&e.adInfo.adPodInfo,i=e.adInfo;t.setClearAdContextTimeout(!0),t.props.startClientSideAd({adFormat:t.getFormat(e),position:n&&n.adPosition||1,numberOfAds:n&&n.totalAds||1,adInfo:i})},t.onComplete=function(e){t.trackQuartileEvent(e),t.setClearAdContextTimeout(!1);t.track("video_ad_impression_complete",e,{stitched:!1}),t.trackAdSprigEventAdEnd(e),(0,b.DL)(Date.now());var n=t.props.videoAdRequest&&t.props.videoAdRequest.status===S.sC.Filled?t.props.videoAdRequest:void 0;n&&n.broadcaster&&(0,b.JN)(n.broadcaster.id,Date.now())},t.trackAdSprigEventAdEnd=function(e){var n,i,a=e.adInfo&&e.adInfo.adPodInfo,r=e.adInfo,o=null===(n=t.props.videoAdMetadata)||void 0===n?void 0:n.adFormat;if(null!=o){var s=(0,_.uN)(o);!!(null===(i=t.props.videoAdMetadata)||void 0===i?void 0:i.roll)&&((0,l.zf)(o)||o===_.gz.STANDARD_VIDEO)?(0,c.qA)("".concat(t.props.videoAdMetadata.roll,"_ad_end"),{ad_pod_duration:null==a?void 0:a.totalDuration,num_ads_in_pod:null==a?void 0:a.totalAds,current_ad_duration:null==r?void 0:r.duration}):(0,c.qA)("".concat(s.toLowerCase(),"_ad_end"),{ad_pod_duration:null==a?void 0:a.totalDuration,num_ads_in_pod:null==a?void 0:a.totalAds,current_ad_duration:null==r?void 0:r.duration})}},t.onProgress=function(e){t.track("video_ad_time_elapsed",e,{time_elapsed:e.progress}),t.lastAdProgressTime=Date.now()},t.checkAdProgress=function(){Date.now()-t.lastAdProgressTime>8e3&&(t.props.reset(),t.clearIntervalTimeout())},t.setClearAdContextTimeout=function(e){t.isCleanAdContextTimeoutEnabled&&(e?t.timeoutID||(t.lastAdProgressTime=Date.now(),t.timeoutID=setInterval(t.checkAdProgress,1e3)):t.clearIntervalTimeout())},t.clearIntervalTimeout=function(){t.timeoutID&&(clearInterval(t.timeoutID),t.timeoutID=void 0)},t.onImpression=function(e){var n,i,a,r,o,s,l,d,u,c,p,v,f=t.props,g=f.shouldAdjustVolume,y=f.getAdjustedVolume,h=f.setVolume,_=f.getInitialMuteState,k=f.setMuted,S=f.clientSideAdSelectionParams,C=e.videoAd.getVolume(),b=Date.now(),A=y(C),E=Math.max(A||0,.1),I=g(C),T=I?E:C,N=_(),w=(0,P.EF)(t.props.videoAdMetadata)?t.props.videoAdMetadata:void 0,R=null===(n=null==w?void 0:w.adInfo)||void 0===n?void 0:n.adSystem;I&&(t.props.logger.withCategory("AdLoudness").debug("Adjusting ad volume at impression",{nextVolume:E,impressionVolume:C,playerMuted:N}),h(E),k(N));var x,L={request_to_impression_latency:b-e.request.requestTime,pre_impression_player_volume:C,player_volume:+(T||0).toFixed(10),quality:(null==S?void 0:S.isAutoQualityMode)?"auto":"".concat(null!==(i=null==S?void 0:S.currentVideoWidth)&&void 0!==i?i:0,"x").concat(null!==(a=null==S?void 0:S.currentVideoHeight)&&void 0!==a?a:0),current_bitrate:Math.round(null!==(r=null==S?void 0:S.currentVideoBitrate)&&void 0!==r?r:0),ad_stored_bitrate_kbps:null!==(o=null==S?void 0:S.storedAdBitrate)&&void 0!==o?o:0,ad_max_bitrate_kbps:null!==(s=null==S?void 0:S.maxAdBitrate)&&void 0!==s?s:0,ad_resolution:"".concat(null!==(d=null===(l=e.adInfo)||void 0===l?void 0:l.vastMediaWidth)&&void 0!==d?d:0,"x").concat(null!==(c=null===(u=e.adInfo)||void 0===u?void 0:u.vastMediaHeight)&&void 0!==c?c:0),ad_bitrate_kbps:null!==(v=null===(p=e.adInfo)||void 0===p?void 0:p.vastMediaBitrate)&&void 0!==v?v:0};t.trackRad(m.V.VideoAdImpression,e,L),t.trackAdSprigEventAdStart(e,w),R&&"FAS"===R?(t.track("video_ad_impression_fake",e,L),t.track("ad_impression_fake",e,L)):(x="ad_client_impression",t.track(x,e,D(e.adInfo,t.props.videoAdRequest,t.props.videoAdMetadata)),t.track("video_ad_impression",e,L),t.track("ad_impression",e,L))},t.trackAdSprigEventAdStart=function(e,t){var n=e.adInfo&&e.adInfo.adPodInfo,i=e.adInfo,a=null==t?void 0:t.adFormat;if(null!=a){(n&&n.adPosition||1)<=1&&(0,c.qA)("ad_pod_start",{ad_pod_duration:null==n?void 0:n.totalDuration,num_ads_in_pod:null==n?void 0:n.totalAds});var r=(0,_.uN)(a);!!(null==t?void 0:t.roll)&&((0,l.zf)(a)||a===_.gz.STANDARD_VIDEO)?(0,c.qA)("".concat(t.roll,"_ad_start"),{ad_pod_duration:null==n?void 0:n.totalDuration,num_ads_in_pod:null==n?void 0:n.totalAds,current_ad_duration:null==i?void 0:i.duration}):(0,c.qA)("".concat(r.toLowerCase(),"_ad_start"),{ad_pod_duration:null==n?void 0:n.totalDuration,num_ads_in_pod:null==n?void 0:n.totalAds,current_ad_duration:null==i?void 0:i.duration})}},t.onError=function(e){var n={reason:e.reason,error_code:e.errorCode,error_type:e.errorType};t.props.trackVideoAdData("video_ad_error",n),t.props.trackVideoRAdEvent(m.V.VideoAdError,n),t.props.trackVideoAdData("ad_error",n),t.clearMetadataAndRestartMediaPlayer()},t.clearMetadataAndRestartMediaPlayer=function(){var e=t.props,n=e.shouldResetVolumeOnContentResume,i=e.getInitialMuteState,a=e.setMuted,r=e.mediaPlayerInstance,o=e.getInitialVolume,s=e.setVolume,l=e.audioBlocked,d=e.paused,u=e.ended,c=e.adMuted,p=e.adVolume,v=o(),m=i(),f=n();f&&v&&(t.props.logger.withCategory("AdLoudness").debug("Adjusting ad volume at resume",{nextVolume:v,nextMute:m}),s(v),a(m)),f||void 0===p||null==r||r.setVolume(p),c!==!!(null==r?void 0:r.isMuted())&&(c?null==r||r.setMuted(!0):l||null==r||r.setMuted(!1)),d&&!u&&(null==r||r.play()),t.props.reset()},t.track=function(e,n,i){var a=!!t.props.adMuted,r=+(t.props.adVolume||0).toFixed(10),o=T(n.adInfo,i,a,r);t.props.trackVideoAdData(e,o)},t.trackRad=function(e,n,i){var a=!!t.props.adMuted,r=+(t.props.adVolume||0).toFixed(10),o=T(n.adInfo,i,a,r);t.props.trackVideoRAdEvent(e,o)},t.trackQuartileEvent=function(e){var n={quartile:e.quartile};t.trackRad(m.V.VideoAdQuartileComplete,e,n),t.track("video_ad_quartile_complete",e,n),t.track("ad_quartile",e,n),t.track("ad_client_quartile",e,D(e.adInfo,t.props.videoAdRequest,t.props.videoAdMetadata))},t}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.addInStreamEventListener(C.V.ContentPauseRequested,this.onContentPauseRequested),this.addInStreamEventListener(C.V.ContentResumeRequested,this.onContentResumeRequested),this.addInStreamEventListener(C.V.Complete,this.onComplete),this.addInStreamEventListener(C.V.Error,this.onError),this.addInStreamEventListener(C.V.FirstQuartile,this.trackQuartileEvent),this.addInStreamEventListener(C.V.Impression,this.onImpression),this.addInStreamEventListener(C.V.Loaded,this.onLoad),this.addInStreamEventListener(C.V.Midpoint,this.trackQuartileEvent),this.addInStreamEventListener(C.V.Paused,this.onPaused),this.addInStreamEventListener(C.V.Progress,this.onProgress),this.addInStreamEventListener(C.V.Resumed,this.onPlaying),this.addInStreamEventListener(C.V.Started,this.onStart),this.addInStreamEventListener(C.V.ThirdQuartile,this.trackQuartileEvent),this.addInStreamEventListener(C.V.VolumeChanged,this.onVolumeChanged),this.addInStreamEventListener(C.V.Click,this.onCreativeClicked),this.addInStreamEventListener(C.V.Muted,this.onMuteChange),this.addInStreamEventListener(C.V.Unmuted,this.onMuteChange)},t.prototype.render=function(){return null},t}(a.Component),T=function(e,t,n,a){return(0,i.__assign)({player_mute:!!n,player_volume:a||0,visible:"visible"===document.visibilityState,audible:!n&&(a||0)>0,ad_id:e&&e.adID,ad_position:e&&e.adPodInfo&&e.adPodInfo.adPosition,duration:e&&e.duration,ad_system:e&&e.adSystem,creative_id:e&&e.creativeID,total_ads:e&&e.adPodInfo&&e.adPodInfo.totalAds,title:e&&e.title,stitched:!1},t)},D=function(e,t,n){return{date:(new Date).toDateString(),ad_id:e&&e.adID,emitting_service:"AdvantEdge",format_name:(0,_.uN)(null==t?void 0:t.adFormat),sdk:C.K.VAES,duration_actual:null==n?void 0:n.duration,commercial_id:null==t?void 0:t.commercialID,break_length:null==t?void 0:t.duration,ad_placement:k.p.CHANNEL_PLAYER,requested_ad_size:null,ad_size:null,allocation_strategy:(null==t?void 0:t.mafsDecision)||"",available_impression:(null==n?void 0:n.numberOfAds)||0,main_play_session_id:s.E5.getVideoPlayerTrackingData().playSessionID,stitched:!1}},N=(0,r.Zz)((0,p.O)(),(0,v._)(),(0,d.B)(),(0,f.VX)((function(e){var t=e.muted,n=e.volume,i=e.videoAdMetadata,a=e.videoAdRequest,r=e.reset,o=e.startClientSideAd,s=e.updateAdVolume,l=e.updateAdMuted,d=e.updateAdPlaying,u=e.clientSideAdSelectionParams;return{adMuted:t,adVolume:n,reset:r,videoAdMetadata:i,videoAdRequest:a,startClientSideAd:o,updateAdVolume:s,updateAdMuted:l,updateAdPlaying:d,clientSideAdSelectionParams:u,toggleAdClosedCaptions:function(e){(0,P.EF)(i)&&i.videoAd&&i.videoAd.toggleClosedCaptions(e)}}})),(0,g.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance,paused:(0,E.xB)(e),volume:e.volume,muted:e.muted,audioBlocked:e.audioBlocked,ended:(0,E.pl)(e),logger:e.logger}})),(0,h.AP)((function(e){var t=e.setVolume,n=e.setMuted;return{setVolume:t,setMuted:n}})),(0,y.cj)((function(e){var t=e.content;return{isLiveContent:(0,A.DG)(t)}})))(I)},610009:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});var i=n(296540),a=n(334963);function r(e){var t=i.useRef(),n=i.useContext(a.wL),r=e.onPlay,o=e.onPause;i.useEffect((function(){t.current?!t.current.isPlaying&&n.isPlaying?r():t.current.isPlaying&&!n.isPlaying&&o():n.isPlaying?r():o()}),[t,n,r,o]),i.useEffect((function(){t.current=n}),[n])}},936676:function(e,t,n){"use strict";n.d(t,{ws:function(){return _},lQ:function(){return k},Ng:function(){return b},Lz:function(){return C},CA:function(){return S},_o:function(){return h}});var i=n(891975),a=n(296540),r=n(883474),o=n(940594),s=n(638230),l=n(537620),d=n(463503),u=n(697621),c=n(26576),p=n(233936),v=n(731820),m=n(947153),f=n.p+"assets/omid-session-client-v1-1374438327435f831087.js",g=n.p+"assets/omweb-v1-f78c6a5ddcfaf451f382.js",y=[/^IAS$/,/^doubleverify.com-omid$/,/^amazon.com-omid$/,/^iabtechlab.com-omid$/,/^moat\.com(?!-omsdktwitchhostedamazonvideo963371838528|-omsdktwitchhostedssaiamazonvideo236473939629)/,/^protected.media-omid$/,/^adloox.com-omid$/];function h(){var e=(0,o.j8)(g),t=(0,o.j8)(f),n=!(!e||"loaded"!==e.status),i=!(!t||"loaded"!==t.status);return n&&i}var _=function(e){var t,n=a.useContext(v._t).videoContainer,o=a.useContext(p.jK),l=o.videoAdMetadata,d=o.adFormatMetadata,f=o.thirdPartyOutstreamVideoAdElement,g=(0,s._)("omsdk_iab_compliance","boolean",!1).value,_=h(),P=(0,u.fS)(null===(t=e.adFormatMetadata)||void 0===t?void 0:t.adFormat),A=P?e.adFormatMetadata:d,E=P?e.videoElement:(null==f?void 0:f.querySelector("video"))||null,I=(0,u.rF)(null==A?void 0:A.adFormat)?A:l,T=a.useRef(new Map),D=a.useRef(new Map),N=a.useRef(new Map),w=a.useRef(null),R=a.useRef(null);return(0,i.S)((function(){return function(){T.current.forEach((function(e){try{e.finish()}catch(e){r.vF.warn("Error finishing OMSDK session",e)}})),T.current.clear(),D.current.clear(),N.current.clear()}})),a.useEffect((function(){if(_&&I){var t=b(I);if(!T.current.has(t)){var i=(0,u.C_)(null==A?void 0:A.adFormat)&&E?E:I.stitched?(null==n?void 0:n.querySelector('[data-a-target="video-ref"] video'))||null:(null==n?void 0:n.querySelector('[data-a-target="ax-overlay"] video'))||null;if(w.current=i,i){var a;try{a=null===OmidSessionClient||void 0===OmidSessionClient?void 0:OmidSessionClient.default}catch(e){return void r.vF.warn("Error initializing OMSDK session",e)}if(a){var o=a.AdSession,s=a.Partner,l=a.Context,d=a.VastProperties,c=a.VerificationScriptResource,p=a.AdEvents,v=a.MediaEvents,m=window.location.href,f=new s("TWITCHTV","1.5.6"),h=window.top,x=P?S(e.vast,c,g):I.stitched&&R.current?function(e,t,n){if(n)return[new t("https://compliance.iabtechnologylab.com/compliance-js/omid-validation-verification-script-v1.js","iabtechlab.com-omid","iabtechlab-Amazon","full")];try{var i=atob(e),a=JSON.parse(i);return(a.Verifications||a.Verification||[]).filter((function(e){return y.some((function(t){return t.test(e.vendor||"")}))})).map((function(e){var n,i,a=(null===(i=null===(n=e.JavaScriptResource)||void 0===n?void 0:n[0])||void 0===i?void 0:i.URI)||"";return new t(a,e.vendor,e.VerificationParameters||"","full")}))}catch(e){return r.vF.warn("OMSDK failed to parse SSAI verification header",e),[]}}(R.current,c,g):function(e,t,n){var i,a,r;if(n)return[new t("https://compliance.iabtechnologylab.com/compliance-js/omid-validation-verification-script-v1.js","iabtechlab.com-omid","iabtechlab-Amazon","full")];if(!e||!("adInfo"in e))return[];return(null===(r=null===(a=null===(i=null==e?void 0:e.adInfo)||void 0===i?void 0:i.verificationResources)||void 0===a?void 0:a.filter((function(e){var t;return y.some((function(t){return t.test(e.vendor||"")}))&&(null===(t=e.JavaScriptResources)||void 0===t?void 0:t.length)>0})))||void 0===r?void 0:r.map((function(e){var n,i=(null===(n=e.JavaScriptResources[0])||void 0===n?void 0:n.URI)||"",a="full";return new t(i,e.vendor,e.VerificationParameters,a)})))||[]}(I,c,g),L=new l(f,x,m);L.setVideoElement(i),L.setServiceWindow(h||window);var F=new o(L);if(F.setCreativeType("video"),F.setImpressionType("beginToRender"),F.isSupported()){if(F.start(),C(I)&&I.adPosition>1){var M="pod-".concat(I.adPosition-1),V=T.current.get(M);if(V){try{V.finish()}catch(e){r.vF.warn("Error finishing previous pod ad session",e)}T.current.delete(M),D.current.delete(M),N.current.delete(M)}}T.current.set(t,F);var O=new p(F);F.registerSessionObserver((function(e){if("sessionStart"===e.type){var t=!!(null==I?void 0:I.stitched)&&null!=(null==I?void 0:I.minSkipDuration),n=t&&I.minSkipDuration?I.minSkipDuration:0,i=new d(t,n,!0,I.roll);O.loaded(i),O.impressionOccurred()}else{if("sessionError"===e.type)return;if("sessionFinish"===e.type)return}}));var U=new v(F);D.current.set(t,U),N.current.set(t,-1),k(T,D,N,i,I,n)}}else r.vF.warn("OMSDK session is unavailable")}}}}),[null==A?void 0:A.adFormat,I,P,e.vast,_,E,g,n]),function(e,t,n,i,o){(0,c.p)(m.a.METADATA,a.useCallback((function(a){if(a&&"text/json"===a.type){var s;try{s=JSON.parse(a.data)}catch(e){return}if("twitch-stitched-ad"===s.CLASS&&s["X-TV-TWITCH-AD-ADVERIFICATIONS"]&&(o.current=s["X-TV-TWITCH-AD-ADVERIFICATIONS"]),(null==n?void 0:n.stitched)&&i.current){var l=b(n),d=e.current.get(l),u=t.current.get(l);if(d&&u&&"twitch-ad-quartile"===s.CLASS&&s["X-TV-TWITCH-AD-QUARTILE"]){var c=parseInt(s["X-TV-TWITCH-AD-QUARTILE"],10);if(1===c)u.start(n.duration,i.current.volume),u.firstQuartile();else if(2===c)u.midpoint();else if(3===c)u.thirdQuartile();else if(4===c){u.complete();try{d.finish()}catch(e){r.vF.warn("Error finishing OMSDK session",e)}e.current.delete(l),t.current.delete(l)}}}}}),[n,i,e,t,o]))}(T,D,I,w,R),null};function k(e,t,n,i,a,o){var s,l=function(o,l){var d=b(a),u=e.current.get(d),c=t.current.get(d);if(u&&c)switch(o){case"timeupdate":var p=n.current.get(d)||-1,v=function(e,t,n,i,a,o){if(null==i?void 0:i.stitched)return 0;var s=t.currentTime/t.duration;if(a<0&&s>=0)n.start(t.duration,t.volume);else if(a<.25&&s>=.25)n.firstQuartile();else if(a<.5&&s>=.5)n.midpoint();else if(a<.75&&s>=.75)n.thirdQuartile();else if(a<1&&s>=1){if(n.complete(),e.current){try{e.current.finish()}catch(e){r.vF.warn("Error finishing OMSDK session",e)}e.current=null}null==o||o()}return s}({current:u},i,c,a,p,(function(){e.current.delete(d),t.current.delete(d),n.current.delete(d)}));n.current.set(d,v);break;case"volumechange":if(i.volume===s)break;s=i.volume,c.volumeChange(i.volume);break;case"pause":c.pause();break;case"play":c.resume();break;case"click":if("MID_FEED_VIDEO"===(null==a?void 0:a.adFormat)&&(null==l?void 0:l.isTrusted))break;c.adUserInteraction(o);break;case"error":c.adUserInteraction(o);break;case"fullscreenchange":case"webkitfullscreenchange":case"mozfullscreenchange":case"msfullscreenchange":var m=null!==document.fullscreenElement?"fullscreen":"normal";c.playerStateChange(m);break;default:r.vF.warn("Unhandled video event type: ".concat(o))}};["timeupdate","play","pause","volumechange","click","error"].forEach((function(e){i.addEventListener(e,(function(t){return l(e,t)}))}));if(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"].forEach((function(e){document.addEventListener(e,(function(){return l(e)}))})),(null==a?void 0:a.stitched)&&o){o.addEventListener("click",(function(){var e=b(a),n=t.current.get(e);n&&n.adUserInteraction("click")}))}}function S(e,t,n){var i,a;if(n)return[new t("https://compliance.iabtechnologylab.com/compliance-js/omid-validation-verification-script-v1.js","iabtechlab.com-omid","iabtechlab-Amazon","full")];if(!e)return[];var r=new l.p,o=e.getElementsByTagName("Ad")||[];if(0===o.length)return[];var s=r.parse(new d.Ad,o[0]);return(null===(a=null===(i=null==s?void 0:s.adVerifications)||void 0===i?void 0:i.filter((function(e){var t;return y.some((function(t){return t.test(e.vendor||"")}))&&(null===(t=e.jsResource)||void 0===t?void 0:t.length)>0})))||void 0===a?void 0:a.map((function(e){var n,i=(null===(n=e.jsResource[0])||void 0===n?void 0:n.uri)||"",a=e.vendor||"",r=e.parameters||"";return new t(i,a,r,"full")})))||[]}function C(e){return Boolean((null==e?void 0:e.numberOfAds)&&(null==e?void 0:e.numberOfAds)>1)}function b(e){return e&&C(e)?"pod-".concat(e.adPosition):"single"}},697864:function(e,t,n){"use strict";n.d(t,{Pv:function(){return S},Tm:function(){return P},bi:function(){return i},cG:function(){return _},ur:function(){return k}});var i,a=n(331635),r=n(296540),o=n(868238),s=n(883474),l=n(59889),d=n(906182),u=n(164557),c=n(588547),p=n(514105),v=n(233936),m=n(641896),f=n(110657),g=n(947153),y=n(573527);!function(e){e.StandardAudioAd="STANDARD_AUDIO",e.StandardVideoAd="standard_video_ad"}(i||(i={}));var h,_="twitch-stitched-ad",k="twitch-stream-source",S="twitch-ad-quartile",C="|",b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMetadata=function(e){var n,r,o,d,u,p,v;try{if("text/json"===e.type){var m=void 0;try{m=JSON.parse(e.data)}catch(e){return void s.x2.logger.warn("failed to parse stitched ad metadata")}if(!m)return void s.x2.logger.warn("failed to parse stitched ad metadata");var f=t.getAdFormat(m["X-TV-TWITCH-AD-AD-FORMAT"]),g=f===i.StandardAudioAd;if(m.CLASS===_){var b=m["X-TV-TWITCH-AD-CLICK-TRACKING-URL"],P=parseFloat(m["X-TV-TWITCH-AD-LOUDNESS"]),T=m["X-TV-TWITCH-AD-MUTE-TRACKING-URL"],D=m["X-TV-TWITCH-AD-UNMUTE-TRACKING-URL"],N=m["X-TV-TWITCH-AD-PAUSE-TRACKING-URL"],w=m["X-TV-TWITCH-AD-RESUME-URL"],R=m["X-TV-TWITCH-AD-CREATIVE-VIEW"],x=m["X-TV-TWITCH-AD-COMPANION-CREATIVE-VIEW"],L={duration:parseInt(m.DURATION,10)||0,start:new Date(m["START-DATE"]).getTime(),numberOfAds:parseInt(m["X-TV-TWITCH-AD-POD-LENGTH"],10),adPosition:parseInt(m["X-TV-TWITCH-AD-POD-POSITION"],10)+1,adUrl:m["X-TV-TWITCH-AD-URL"],roll:t.getRollType(m["X-TV-TWITCH-AD-ROLL-TYPE"]),advertiserId:m["X-TV-TWITCH-AD-ADVERTISER-ID"]||"",creativeId:m["X-TV-TWITCH-AD-CREATIVE-ID"]||"",lineItemId:m["X-TV-TWITCH-AD-LINE-ITEM-ID"]||"",adSessionId:m["X-TV-TWITCH-AD-AD-SESSION-ID"]||"",adFormat:f,orderId:m["X-TV-TWITCH-AD-ORDER-ID"]||"",stitchedAdTrackingURLsStart:m["X-TV-TWITCH-AD-TRACKING-START"]||"",stichedAdTrackingURLsComplete:m["X-TV-TWITCH-AD-TRACKING-COMPLETE"]||"",stitched:!0,stitchedAdClickTrackUrls:b?b.split(C):[],radsToken:m["X-TV-TWITCH-AD-RADS-TOKEN"]||"",isVLM:"1"===m["X-TV-TWITCH-AD-VLM"],hideAdOverlay:"1"===m["X-TV-TWITCH-AD-HIDE-AD-OVERLAY"],clickBeaconId:m["X-TV-TWITCH-AD-CLICK-BEACON-ID"]||"",podFilledDuration:parseInt(m["X-TV-TWITCH-AD-POD-FILLED-DURATION"],10)||0,stitchedAdMuteTrackUrls:T?T.split(C):[],stitchedAdUnMuteTrackUrls:D?D.split(C):[],stitchedAdPauseTrackUrls:N?N.split(C):[],stitchedAdResumeTrackUrls:w?w.split(C):[],stitchedAdCreativeViewTrackUrls:R?R.split(C):[],stitchedAdCompanionCreativeViewTrackUrls:x?x.split(C):[],dsaAdvertiserId:m["X-TV-TWITCH-AD-DSA-ADVERTISER-ID"]||"",dsaCampaignId:m["X-TV-TWITCH-AD-DSA-CAMPAIGN-ID"]||"",dsaContext:"1"===m["X-TV-TWITCH-AD-DSA-SS-CONTEXT"],dsaLocation:"1"===m["X-TV-TWITCH-AD-DSA-SS-LOCATION"],dsaPastActivity:m["X-TV-TWITCH-AD-DSA-SS-PAST-ACTIVITY"]||"",dsaVersion:parseInt(m["X-TV-TWITCH-AD-DSA-VERSION"],10),playbackStartPos:null!==(r=null===(n=t.props.mediaPlayerInstance)||void 0===n?void 0:n.getPosition())&&void 0!==r?r:0,minSkipDuration:t.getMinSkipDuration(m["SKIPPABLE-REQUIRED"]),appAdMetadata:E(m["X-TV-TWITCH-AD-APP-METADATA"]),skanMetadata:I(m["X-TV-TWITCH-AD-SKAN-METADATA"])},F={ad_loudness:P,has_ad_metadata:!!L,stitched_ad_metadata:!!(null==L?void 0:L.stitched),play_session_id:s.E5.getVideoPlayerTrackingData().playSessionID,was_normalized:void 0,ad_session_id:null==L?void 0:L.adSessionId,channel:null===(o=s.E5.getLastPageview())||void 0===o?void 0:o.channel,roll_type:null==L?void 0:L.roll,stitched:!0,format_name:null==L?void 0:L.adFormat};t.props.setRadToken(L.radsToken),(null===(d=t.props.stitchedAdMetadata)||void 0===d?void 0:d.adPosition)&&L.adPosition&&L.adPosition>(null===(u=t.props.stitchedAdMetadata)||void 0===u?void 0:u.adPosition)?(A(h.END,t.props.stitchedAdMetadata.stichedAdTrackingURLsComplete),(0,l.qA)("".concat(t.props.stitchedAdMetadata.roll,"_ad_end"),{ad_pod_duration:L.podFilledDuration,num_ads_in_pod:L.numberOfAds,current_ad_duration:t.props.stitchedAdMetadata.duration})):1===L.adPosition&&(0,l.qA)("ad_pod_start",{ad_pod_duration:L.podFilledDuration,num_ads_in_pod:L.numberOfAds}),A(h.START,L.stitchedAdTrackingURLsStart),(0,l.qA)("".concat(L.roll,"_ad_start"),{ad_pod_duration:L.podFilledDuration,num_ads_in_pod:L.numberOfAds,current_ad_duration:L.duration});var M=(0,a.__assign)((0,a.__assign)({},F),{min_skip_duration:L.minSkipDuration,is_skippable:!!L.minSkipDuration,ad_position:L.adPosition,ad_id:L.lineItemId,creative_id:L.creativeId});t.props.trackVideoAdData("ad_client_impression",M),s.x2.tracking.track("ad_loudness_normalization",F),t.props.startStitchedAd(L)}else if(m.CLASS===S&&m["X-TV-TWITCH-AD-QUARTILE"]){var V=parseInt(m["X-TV-TWITCH-AD-QUARTILE"]||"",10);0===V?t.props.trackVideoRAdEvent(g?c.V.AdImpression:c.V.VideoAdImpression,t.buildTrackingPayload()):(t.props.trackVideoRAdEvent(g?c.V.AdQuartile:c.V.VideoAdQuartileComplete,t.buildTrackingPayload({quartile:V})),t.props.trackVideoAdData("ad_client_quartile",t.buildTrackingPayload({quartile:V})))}else if(t.props.stitchedAdMetadata&&m.CLASS===k&&"live"===m["X-TV-TWITCH-STREAM-SOURCE"]){var O=t.props.minAdCountdownReached<=1;if((0,y.n)(t.props.stitchedAdMetadata)&&!O){var U=t.props.isAdSkippedByUser?"skip_button":"player";t.props.trackVideoAdData("ad_skipped",t.buildTrackingPayload({skip_trigger:U,time_elapsed:(null===(p=t.props.stitchedAdMetadata)||void 0===p?void 0:p.duration)-t.props.minAdCountdownReached,min_skip_duration:null===(v=t.props.stitchedAdMetadata)||void 0===v?void 0:v.minSkipDuration}))}A(h.END,t.props.stitchedAdMetadata.stichedAdTrackingURLsComplete),(0,l.qA)("".concat(t.props.stitchedAdMetadata.roll,"_ad_end"),{ad_pod_duration:t.props.stitchedAdMetadata.podFilledDuration,num_ads_in_pod:t.props.stitchedAdMetadata.numberOfAds,current_ad_duration:t.props.stitchedAdMetadata.duration});var B={stitched:!0,roll_type:t.props.stitchedAdMetadata.roll,player_mute:!!t.props.muted,player_volume:+(t.props.volume||0).toFixed(10),visible:"visible"===document.visibilityState,ad_session_id:t.props.stitchedAdMetadata.adSessionId,format_name:f};(0,l.qA)("ad_pod_end",{ad_pod_duration:t.props.stitchedAdMetadata.podFilledDuration,num_ads_in_pod:t.props.stitchedAdMetadata.numberOfAds}),t.props.trackVideoAdData("ad_pod_complete",B),t.props.trackVideoRAdEvent(g?c.V.AdPodComplete:c.V.VideoAdPodComplete,B),t.props.reset()}}}catch(e){t.props.logger.errorAndReport(e,"Unable to create metadata for stitched ad.")}},t.buildTrackingPayload=function(e){var n=t.props.stitchedAdMetadata;return(0,a.__assign)({player_mute:!!t.props.muted,player_volume:+(t.props.volume||0).toFixed(10),visible:"visible"===document.visibilityState,ad_id:null==n?void 0:n.advertiserId,ad_position:null==n?void 0:n.adPosition,duration:null==n?void 0:n.duration,creative_id:null==n?void 0:n.creativeId,total_ads:null==n?void 0:n.numberOfAds,order_id:null==n?void 0:n.orderId,line_item_id:null==n?void 0:n.lineItemId,roll_type:null==n?void 0:n.roll,ad_session_id:null==n?void 0:n.adSessionId,stitched:!0},e)},t}return(0,a.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.playerEvents.addEventListener(g.a.METADATA,this.onMetadata)},t.prototype.render=function(){return null},t.prototype.getRollType=function(e){return"MIDROLL"===e?f.df.Mid:"POSTROLL"===e?f.df.Post:f.df.Pre},t.prototype.getAdFormat=function(e){switch(e){case"standard_audio_ad":case"STANDARD_AUDIO":return i.StandardAudioAd;default:return i.StandardVideoAd}},t.prototype.getMinSkipDuration=function(e){return e?parseInt(e,10):void 0},t}(r.Component),P=(0,o.Zz)((0,u._)(),(0,v.VX)((function(e){var t=e.reset,n=e.startStitchedAd,i=e.videoAdMetadata,a=e.setRadToken,r=e.isAdSkippedByUser,o=(0,y.lq)(i)&&i||void 0;return{reset:t,startStitchedAd:n,stitchedAdMetadata:o,setRadToken:a,isAdSkippedByUser:r}})),(0,m.dd)((function(e){var t=e.logger,n=e.muted,i=e.volume,a=e.mediaPlayerInstance;return{logger:t,muted:n,volume:i,mediaPlayerInstance:a}})),(0,p.X)(),(0,d.RW)())(b);function A(e,t){t?t.split("|").forEach((function(e){return fetch(e)})):s.x2.logger.warn("failed to send stitched ad ".concat(e," tracking event - no ").concat(e," URL(s) provided"))}function E(e){var t,n,i,a;if(e)try{var r=atob(e),o=JSON.parse(r);return{brandLogoURL:null!==(t=o.brandLogoURL)&&void 0!==t?t:"",description:null!==(n=o.description)&&void 0!==n?n:"",title:null!==(i=o.title)&&void 0!==i?i:"",rating:parseFloat(null!==(a=o.rating)&&void 0!==a?a:"0")}}catch(e){return}}function I(e){var t,n,i,a,r,o;if(e)try{var s=atob(e),l=JSON.parse(s);return{version:null!==(t=l.version)&&void 0!==t?t:"",network:null!==(n=l.network)&&void 0!==n?n:"",sourceIdentifier:null!==(i=l.sourceIdentifier)&&void 0!==i?i:"",iTunesItem:null!==(a=l.iTunesItem)&&void 0!==a?a:"",fidelities:(null!==(r=l.fidelities)&&void 0!==r?r:[]).map((function(e){var t,n,i,a;return{fidelity:null!==(t=e.fidelity)&&void 0!==t?t:0,nonce:null!==(n=e.nonce)&&void 0!==n?n:"",timestamp:null!==(i=e.timestamp)&&void 0!==i?i:"",signature:null!==(a=e.signature)&&void 0!==a?a:""}})),sourceApp:null!==(o=l.sourceApp)&&void 0!==o?o:""}}catch(e){return}}!function(e){e.START="start",e.END="end"}(h||(h={}))},650989:function(e,t,n){"use strict";n.d(t,{OK:function(){return u},bi:function(){return i}});var i,a=n(331635),r=n(854622),o=n(62026);!function(e){e[e.Default=0]="Default",e[e.InVideo=1]="InVideo",e[e.Pushdown=2]="Pushdown"}(i||(i={}));var s={iframeEl1:void 0,iframeEl2:void 0,curFrame:1,hasActiveBid:!1,isSDASequenceVisible:!1,sdaFormat:o.Z$.SQUEEZEBACK,sdaMode:i.Default,pushdownAvailable:!1,isPauseAd:!1},l=(0,a.__assign)((0,a.__assign)({},s),{reportMount:function(){return null},reportUnmount:function(){return null},setSDAMode:function(){return null},setPushdownAvailable:function(){return null},checkAndUpdateSDAHiddenState:function(){return null}}),d=(0,r.e)("SDAContext",l,(function(e){return{sdaContext:e}})),u=(d.withMemoContext,d.context)},850007:function(e,t,n){"use strict";n.d(t,{F:function(){return C},J:function(){return S}});var i,a=n(296540),r=n(975928),o=n(697621),s=n(196190),l=n(326984),d=n(233936),u=n(911906),c=n(62026),p=n(573527),v=n(894320),m=n(445865),f=n(650989),g=n(727925),y="channel_skins",h="default",_="sda_upsell",k=((i={})[h]={height:90,width:728},i[c.Z$[c.Z$.LOWER_THIRD]]={height:90,width:728},i[c.Z$[c.Z$.SQUEEZEBACK]]={height:1050,width:300},i[c.Z$[c.Z$.OUTSTREAM_VERTICAL_VIDEO]]={height:1920,width:1080},i[c.Z$[c.Z$.OUTSTREAM_VERTICAL_VIDEO_PLAYABLE]]={height:1920,width:1080},i[y]={height:113,width:728},i[_]={height:90,width:728},i[c.gz[c.gz.LEFT_THIRD]]={height:600,width:160},i);function S(){var e,t,n=a.useContext(d.jK),i=n.adFormatMetadata,y=n.isDisplayingSDASequence,h=a.useContext(s.m9).isSurveyShowing,_=a.useContext(u.kl),S=(0,m.f)(),b=(0,l.U0)(),P=b.isSDAUpsellShowing,A=b.isMobileWelcomeBannerShowing,E=(0,g.Sg)(),I=(null===(e=a.useContext(u.kl).behaviors)||void 0===e?void 0:e.mini)||E,T=null===(t=_.behaviors)||void 0===t?void 0:t.disableSDAUpsell,D=!(!P||!S||I||T),N=!(!A||I),w=a.useState(void 0),R=w[0],x=w[1],L=a.useState(void 0),F=L[0],M=L[1],V=a.useState(1),O=V[0],U=V[1],B=a.useState(0),j=B[0],q=B[1],G=a.useState(0),H=G[0],K=G[1],z=a.useState(1),W=z[0],Q=z[1],Z=a.useState(1),Y=Z[0],X=Z[1],$=a.useState(0),J=$[0],ee=$[1],te=a.useState(0),ne=te[0],ie=te[1],ae=a.useContext(u.kl).behaviors,re=a.useState(!1),oe=re[0],se=re[1];a.useEffect((function(){!oe&&(0,p.I9)(i)&&"visible"===i.status?se(!0):oe&&!(0,p.I9)(i)&&se(!1)}),[oe,i]);var le=(0,v.N8)(ae,"enableStreamDisplayAds")&&i&&(0,o.rW)(i.adFormat),de=i&&(i.adFormat===c.Z$.OUTSTREAM_VERTICAL_VIDEO||i.adFormat===c.Z$.OUTSTREAM_VERTICAL_VIDEO_PLAYABLE),ue=de&&"hiding"!==(null==i?void 0:i.status),ce=le&&y||h||D||N,pe=(0,o.rW)(null==i?void 0:i.adFormat)&&(null==i?void 0:i.adFormat)===c.Z$.SQUEEZEBACK,ve=a.useContext(f.OK).sdaMode,me=(0,o.rW)(null==i?void 0:i.adFormat)&&(null==i?void 0:i.adFormat)===c.Z$.LOWER_THIRD&&ve===f.bi.Pushdown,fe=(0,o.rW)(null==i?void 0:i.adFormat)&&(null==i?void 0:i.adFormat)===c.gz.LEFT_THIRD,ge=a.useMemo((function(){var e=D&&!((0,r.JK)()&&ve===f.bi.Pushdown),t=N&&!((0,r.JK)()&&ve===f.bi.Pushdown);return[{"video-player--stream-display-ad_lower-third":!me&&le&&!pe&&!de&&!fe||h||e||t,"video-player--stream-display-ad_squeezeback":!(me||!le||!pe||fe||de||h||D),"video-player--stream-display-ad_vertical-video":!(!de||me||pe||fe||h||D),"video-player--stream-display-ad_left-third":!(!fe||!le||me||pe||h||D)}]}),[me,le,pe,de,fe,h,D,N,ve]),ye=a.useMemo((function(){var e=D&&!((0,r.JK)()&&ve===f.bi.Pushdown),t=N&&!((0,r.JK)()&&ve===f.bi.Pushdown);return!me&&ce&&oe||!me&&de&&ue||h||e||t?{height:"calc(".concat(100*W,"% - ").concat(J,"px)"),width:"calc(".concat(100*Y,"%)"),insetInlineStart:pe||de?"".concat(ne,"px"):void 0,insetInlineEnd:fe?"0px":void 0}:{}}),[ce,oe,pe,h,W,J,Y,ne,me,de,D,N,ue,fe,ve]),he=(0,p.I9)(i)?i:void 0,_e=a.useMemo((function(){return null==he?void 0:he.bid}),[null==he?void 0:he.bid]),ke=(0,p.hr)(i)?i:void 0,Se=he||ke,Ce=Se&&Se.adFormat;Ce!==c.Z$.OUTSTREAM_VERTICAL_VIDEO&&Ce!==c.Z$.OUTSTREAM_VERTICAL_VIDEO_PLAYABLE&&Ce!==c.Z$.SQUEEZEBACK&&Ce!==c.Z$.LOWER_THIRD&&Ce!==c.gz.LEFT_THIRD&&(Ce=void 0);var be=a.useMemo((function(){return C(Ce,_e,h,D)}),[_e,h,Ce,D]),Pe=a.useMemo((function(){return{height:O?be.height*O:be.height,width:O?be.width*O:be.width}}),[be,O]),Ae=a.useMemo((function(){return F&&(pe||de||fe)?{height:Pe.height,width:Pe.width+Y*F}:Pe}),[Pe,F,Y,pe,de,fe]),Ee=a.useMemo((function(){return O?{height:Ae.height/O,width:Ae.width/O}:Ae}),[O,Ae]),Ie=a.useCallback((function(e,t){x(t),M(e)}),[]);return a.useEffect((function(){if(void 0!==F&&void 0!==R&&(Ce===c.Z$.LOWER_THIRD||h||D&&(!(0,r.JK)()||ve!==f.bi.Pushdown)||N&&(!(0,r.JK)()||ve!==f.bi.Pushdown))){var e=R/4,t=100*(be.height?Math.min(1,e/be.height):1)/100,n=100*(be.width?Math.min(1,F/be.width):1)/100,i=Math.min(1,Math.max(0,Math.min(n,t)));U(i);var a=i*be.height,o=Math.min(R,9*F/16),s=o?Math.min(1,(R-a)/o):1;Q(s),X(1);var l=R-o,d=l/2,u=Math.max(0,de?(ie((F-(e+i))/2),ee(0),q(0)):(ie(0),ee(0),q(0))}}),[be,R,F,Ce,h,D,N,fe,ve]),a.useEffect((function(){if(void 0!==F&&void 0!==R&&!(Ce!==c.Z$.OUTSTREAM_VERTICAL_VIDEO&&Ce!==c.Z$.OUTSTREAM_VERTICAL_VIDEO_PLAYABLE||h)){var e=Math.min(F,16*R/9),t=Math.min(R,9*F/16)/be.height*be.width,n=.084*t,i=F/(e+t+3*n),a=e*i,r=9*a/16,o=t*i/be.width,s=n*i,l=Math.max(Math.min(1,a/F),0),d=Math.max(Math.min(1,r/R),0);X(l),Q(d),ie(s),ee(0),U(Math.min(1,o)),K(s),q(0)}}),[be,R,F,Ce,h]),a.useMemo((function(){return{handleResize:Ie,sdaHorizontalOffset:H,sdaScale:O,sdaVerticalOffset:j,sdaVideoRefClasses:ge,sdaVideoRefStyles:ye,adDimensions:be,scaledAdDimensions:Pe,containerDimensions:Ee,scaledContainerDimensions:Ae}}),[be,Ee,Ie,Pe,Ae,H,O,j,ge,ye])}function C(e,t,n,i){var a=k[h],r=e&&e===c.gz.LEFT_THIRD;return r&&(a=k[c.gz.LEFT_THIRD]),e&&!r&&c.Z$[e]in k&&(a=k[c.Z$[e]]),n?k[y]:i?k[_]:t&&isFinite(t.width)&&isFinite(t.height)?{height:t.height,width:t.width}:a}},89279:function(e,t,n){"use strict";n.d(t,{M:function(){return a}});var i=n(296540),a=function(e){var t=i.useState(!1),n=t[0],a=t[1];return i.useEffect((function(){if(e&&e.current){var t=null==e?void 0:e.current,n=function(){return a(!0)},i=function(){return a(!1)};return t.addEventListener("mouseenter",n),t.addEventListener("mouseleave",i),function(){t.removeEventListener("mouseenter",n),t.removeEventListener("mouseleave",i)}}}),[e]),{isHovering:n}}},870679:function(e,t,n){"use strict";n.d(t,{N:function(){return ve}});var i,a=n(331635),r=n(474848),o=n(959340),s=n(296540),l=n(621790),d=n(697621),u=n(196190),c=n(326984),p=n(233936),v=n(345942),m=n(641896),f=n(911906),g=n(731820),y=n(334963),h=n(331337),_=n(894320),k=n(112246),S=n(762227),C=n(914421),b=n(246942),P=n.n(b),A=n(868238),E=n(757245),I=n(540325),T=n(975928),D=n(332884),N=n(66066),w=n(731929),R=n(62026),x=n(573527),L=n(727234),F=n(508952),M=n(131869),V=n(650989),O=n(727925),U=(n(383361),n(249448)),B=n(445865),j=F.x.wrap((function(){return Promise.all([n.e(43792),n.e(70390)]).then(n.bind(n,967239))}),"BrandLiftSurveyManager",{placeholder:null,failSilently:!0}),q=F.x.wrap((function(){return Promise.all([n.e(49084),n.e(47181),n.e(18051),n.e(44567),n.e(30326),n.e(24576),n.e(31506),n.e(34726),n.e(21878),n.e(5244)]).then(n.bind(n,800189))}),"SDAUpsellContainer",{placeholder:null,failSilently:!0}),G=F.x.wrap((function(){return n.e(22503).then(n.bind(n,209510))}),"WelcomeBanner",{placeholder:null,failSilently:!0});!function(e){e.Wrapper="sda-wrapper",e.Container="sda-container",e.Transform="sda-transform",e.Frame="sda-frame",e.IFrame="sda-iframe",e.IFrame1="sda-iframe-1",e.IFrame2="sda-iframe-2"}(i||(i={}));var H,K=(0,A.Zz)((0,E.X)({name:"LowerThirdContainer"}))((function(e){var t,n,o,l=e.injectStyles,d=(0,D.zB)(R.Z$.LOWER_THIRD).slotId,h=(0,R.Zj)(R.Z$.LOWER_THIRD),_=e.sdaVerticalOffset,S=e.scaledAdDimensions,C=e.sdaScale,b=s.useContext(g._t),A=s.useContext(y.wL),E=s.useContext(v.MP),I=s.useContext(f.kl),N=s.useContext(p.jK),w=s.useContext(m.$g),F=s.useContext(M.DV),H=s.useContext(u.m9),K=(0,O.Sg)(),W=(null===(t=I.behaviors)||void 0===t?void 0:t.mini)||K,Q=null===(n=I.behaviors)||void 0===n?void 0:n.disableSDAUpsell,Z=(0,B.f)(),Y=(0,c.U0)(),X=Y.isSDAUpsellShowing,$=Y.closeSDAUpsell,J=Y.isMobileWelcomeBannerShowing,ee=X&&Z&&!W,te=J&&!W,ne=(0,a.__assign)((0,a.__assign)({uiContext:b,videoPlaybackContext:A,playerPublicPropsContext:I},E),{adContext:N,playerContext:w,channelSkinsContext:F,brandLiftContext:H,isSDAUpsellShowing:ee}),ie=s.useContext(u.m9),ae=ie.startVideoSession,re=ie.isSurveyOpportunity,oe=ie.isSurveyShowing,se=ie.setRefetchEnabled,le=ie.retriggerTimer,de=re||oe,ue=(0,U.hd)(I.content)||null,ce=(0,L.Z)(ue),pe=(0,k.SU)(ne)&&!oe?Math.max(44,_):_,ve={height:"".concat(S.height+pe,"px")},me=(0,a.__assign)((0,a.__assign)((0,a.__assign)({},h),l),ve),fe=N.adFormatMetadata,ge=N.isDisplayingSDASequence,ye=s.useState(!1),he=ye[0],_e=ye[1],ke=(0,x.I9)(fe)?(null===(o=fe.trackingParams)||void 0===o?void 0:o.sda_sequence_number)||0:void 0;s.useEffect((function(){if(ke){_e(!0);var e=setTimeout((function(){_e(!1)}),500);return function(){clearTimeout(e)}}_e(!1)}),[ke]),s.useEffect((function(){ce&&ce!==ue&&(clearTimeout(le.current),ae(),se(!0))}),[ue,ce,le,se,ae]),s.useEffect((function(){!Z&&X&&$(),ce&&ce!==ue&&$(),Q&&$()}),[$,ue,ce,Z,X,Q]);var Se={transform:"translateX(".concat("rtl"===document.dir?"":"-","50%) scale(").concat(C,")"),transition:he?"scale ".concat(500,"ms ease-in-out"):void 0},Ce={height:"".concat(S.height,"px"),width:"".concat(S.width,"px"),transition:he?"height ".concat(500,"ms ease-in-out width ").concat(500,"ms ease-in-out"):void 0},be=s.useContext(V.OK),Pe=be.sdaFormat,Ae=be.isSDASequenceVisible,Ee=be.sdaMode,Ie=ee&&!((0,T.JK)()&&Ee===V.bi.Pushdown),Te=te&&!((0,T.JK)()&&Ee===V.bi.Pushdown),De=Ie||Te,Ne=!!((0,x.I9)(fe)&&ge&&Ae||de||De),we=P()("stream-display-ad__wrapper","stream-display-ad__wrapper_lower-third","stream-display-ad__wrapper-".concat(Ne?"visible":"hidden"),{"stream-display-ad__wrapper_lower-third--upsell-active":De&&(0,T.JK)()&&Ee===V.bi.InVideo}),Re=P()({"stream-display-ad__container_lower-third":!0,"stream-display-ad__container_lower-third-hidden":!Ne});return Pe===R.Z$.LOWER_THIRD||de||De?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{"data-test-selector":i.Wrapper,className:we,children:(0,r.jsx)("div",{"data-test-selector":i.Container,className:Re,style:me,children:(0,r.jsx)("div",{"data-test-selector":i.Transform,className:"stream-display-ad__transform-container_lower-third",style:Ce,tabIndex:Ee===V.bi.Pushdown?-1:0,children:(0,r.jsx)("div",{"data-test-selector":i.Frame,id:d,className:"stream-display-ad__frame_lower-third",style:Se,children:de?(0,r.jsx)(j,{}):Ie?(0,r.jsx)(q,{channelLogin:ue||""}):Te?(0,r.jsx)(G,{channelName:ue||""}):(0,r.jsx)(z,(0,a.__assign)({format:R.Z$.LOWER_THIRD,isSkyscraper:!1},e))})})})})}):null})),z=(0,A.Zz)((0,w.A)(),(0,E.X)({name:"StreamDisplayAd"}))((function(e){var t,n,a=s.useContext(V.OK),l=a.hasActiveBid,u=a.curFrame,c=a.iframeEl1,v=a.iframeEl2,m=a.sdaFormat,f=a.sdaMode,g=a.reportMount,y=a.reportUnmount,h=e.format,_=s.useContext(p.jK).adFormatMetadata,k=(0,x.I9)(_)?_:void 0,S=l&&e.format===m&&(m!==R.Z$.LOWER_THIRD||f!==V.bi.Pushdown);s.useEffect((function(){var t={format:h,mode:V.bi.InVideo,isSkyscraper:e.isSkyscraper};S?g(t):y(t)}),[h,e.isSkyscraper,g,y,S]);var C=(null==_?void 0:_.adFormat)===R.Z$.SQUEEZEBACK&&(160!==e.adDimensions.width||600!==e.adDimensions.height),b=s.useState({}),A=b[0],E=b[1],I=s.useState({}),T=I[0],D=I[1];if(s.useEffect((function(){C&&(1===u?E({width:e.containerDimensions.width||e.adDimensions.width,height:e.containerDimensions.height||e.adDimensions.height}):2===u&&D({width:e.containerDimensions.width||e.adDimensions.width,height:e.containerDimensions.height||e.adDimensions.height}))}),[u,e.adDimensions.height,e.adDimensions.width,e.containerDimensions.height,e.containerDimensions.width,C]),!S)return null;var w=(null==_?void 0:_.adFormat)===R.Z$.LOWER_THIRD?"lower-third":(null==_?void 0:_.adFormat)===R.gz.LEFT_THIRD?"left-third":"squeezeback",L=P()(((t={})["stream-display-ad__iframe_".concat(w)]=!0,t["stream-display-ad__iframe_".concat(w,"--visible")]=1===u,t["stream-display-ad__iframe_".concat(w,"--hidden")]=2===u,t)),F=P()(((n={})["stream-display-ad__iframe_".concat(w)]=!0,n["stream-display-ad__iframe_".concat(w,"--visible")]=2===u,n["stream-display-ad__iframe_".concat(w,"--hidden")]=1===u,n)),M=(0,O.c0)(),U=C?"mirrorc":(null==_?void 0:_.adFormat)===R.Z$.LOWER_THIRD?d.iN.stream.lowerthird:(null==_?void 0:_.adFormat)===R.Z$.SQUEEZEBACK?d.iN.stream.squeezeback:(null==_?void 0:_.adFormat)===R.gz.LEFT_THIRD?d.iN.stream.leftthird:"",B=C?e.containerDimensions.width:e.adDimensions.width,j=C?"1 1.1":"1",q=(0,x.DU)(null==k?void 0:k.bid)?null==k?void 0:k.bid:void 0,G=void 0!==q?(0,d.A9)(q,U,null==k?void 0:k.adSessionId):{adInput:{advertiserIDNS:"",campaignIDNS:""},clientInput:{},countryInfo:{geoCode:null,isFromEU:!1}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("iframe",{"aria-hidden":2===u,"data-test-selector":i.IFrame1,className:L,style:1===u?A:void 0,title:M,ref:c,scrolling:"no",marginHeight:0,marginWidth:0}),(0,r.jsx)("iframe",{"aria-hidden":1===u,"data-test-selector":i.IFrame2,className:F,style:2===u?T:void 0,title:M,ref:v,scrolling:"no",marginHeight:0,marginWidth:0}),(0,r.jsx)(o.P,{position:"relative",margin:"auto",style:{width:B,scale:j},children:(0,r.jsx)(N.V,{dsaContext:G,format:U,rendersInVideoPlayer:!0})})]})})),W=(0,A.Zz)((0,E.X)({name:"LeftThirdContainer"}))((function(e){var t,n,i,l=e.injectStyles,d=(0,D.zB)(R.gz.LEFT_THIRD).slotId,u=(0,R.Zj)(R.gz.LEFT_THIRD),c=e.scaledAdDimensions,v=e.sdaHorizontalOffset,m=e.sdaScale,f={left:"0",right:"".concat(v,"px")},g={height:"".concat(c.height,"px"),width:"".concat(4*c.height/15,"px")},y=(0,a.__assign)((0,a.__assign)((0,a.__assign)((0,a.__assign)({},u),l),g),{background:"black"}),h=s.useContext(p.jK),_=h.adFormatMetadata,k=h.isDisplayingSDASequence,S="rtl"===document.dir,b={transform:"translateX(".concat(S?"":"-","50%) scale(").concat(m,")")},A=s.useContext(V.OK),E=A.sdaFormat,N=A.isSDASequenceVisible,w=!!((0,x.I9)(_)&&k&&N),L="left-third",F=P()("stream-display-ad__wrapper","stream-display-ad__wrapper_".concat(L),"stream-display-ad__wrapper-".concat(w?"visible":"hidden")),M=P()(((t={})["stream-display-ad__container_".concat(L)]=!0,t)),O=P()(((n={})["stream-display-ad__transform-container_".concat(L)]=!0,n)),U=P()(((i={})["stream-display-ad__frame_".concat(L)]=!0,i)),B=E===R.gz.LEFT_THIRD,j=(0,T.JK)()||(0,T.FP)(),q=(0,I.fs)();return B&&j&&q?(0,r.jsx)(o.P,{className:F,style:f,zIndex:C.Py.Above,children:(0,r.jsx)("div",{className:M,style:y,tabIndex:0,children:(0,r.jsx)("div",{className:O,style:{},children:(0,r.jsx)("div",{id:d,className:U,style:b,children:(0,r.jsx)(z,(0,a.__assign)({format:R.gz.LEFT_THIRD,isSkyscraper:!1},e))})})})}):null}));!function(e){e.Wrapper="sda-wrapper",e.Container="sda-container",e.Transform="sda-transform",e.Frame="sda-frame",e.IFrame="sda-iframe",e.IFrame1="sda-iframe-1",e.IFrame2="sda-iframe-2"}(H||(H={}));var Q,Z=(0,A.Zz)((0,E.X)({name:"SkyscraperContainer"}))((function(e){var t,n,i,o=e.injectStyles,l=(0,D.zB)(R.Z$.SQUEEZEBACK).slotId,d=(0,R.Zj)(R.Z$.SQUEEZEBACK),u=e.adDimensions,c=e.scaledAdDimensions,v=e.sdaHorizontalOffset,m=e.sdaScale,f={left:"".concat(v,"px"),right:"0"},g={height:"".concat(c.height,"px"),width:"".concat(4*c.height/15,"px")},y=(0,a.__assign)((0,a.__assign)((0,a.__assign)((0,a.__assign)({},d),o),g),{background:"black"}),h=s.useContext(p.jK),_=h.adFormatMetadata,k=h.isDisplayingSDASequence,S={transform:"translateX(-50%) scale(".concat(m,")")},C=s.useContext(V.OK),b=C.sdaFormat,A=C.isSDASequenceVisible,E=!!((0,x.I9)(_)&&k&&A),I=P()("stream-display-ad__wrapper","stream-display-ad__wrapper_skyscraper","stream-display-ad__wrapper-".concat(E?"visible":"hidden")),T="skyscraper",N=P()(((t={})["stream-display-ad__container_".concat(T)]=!0,t)),w=P()(((n={})["stream-display-ad__transform-container_".concat(T)]=!0,n)),L=P()(((i={})["stream-display-ad__frame_".concat(T)]=!0,i));return b===R.Z$.SQUEEZEBACK&&(0,O.Ny)(u)?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{"data-test-selector":H.Wrapper,className:I,style:f,children:(0,r.jsx)("div",{"data-test-selector":H.Container,className:N,style:y,tabIndex:0,children:(0,r.jsx)("div",{"data-test-selector":H.Transform,className:w,style:{},children:(0,r.jsx)("div",{"data-test-selector":H.Frame,id:l,className:L,style:S,children:(0,r.jsx)(z,(0,a.__assign)({format:R.Z$.SQUEEZEBACK,isSkyscraper:!0},e))})})})})}):null}));!function(e){e.Wrapper="sda-wrapper",e.Container="sda-container",e.Transform="sda-transform",e.Frame="sda-frame",e.IFrame="sda-iframe",e.IFrame1="sda-iframe-1",e.IFrame2="sda-iframe-2"}(Q||(Q={}));var Y=(0,A.Zz)((0,E.X)({name:"SqueezebackContainer"}))((function(e){var t,n,i,o,l=e.injectStyles,d=(0,D.zB)(R.Z$.LOWER_THIRD).slotId,u=(0,R.Zj)(R.Z$.LOWER_THIRD),c=e.adDimensions,v=e.scaledAdDimensions,m=e.sdaScale,f=e.sdaHorizontalOffset,g={height:"".concat(v.height,"px"),width:"".concat(16*v.height/9,"px")},y=(0,a.__assign)((0,a.__assign)((0,a.__assign)((0,a.__assign)({},u),l),g),{background:"black"}),h=s.useContext(p.jK),_=h.adFormatMetadata,k=h.isDisplayingSDASequence,S="rtl"===document.dir,C={transform:"translateX(".concat(S?"":"-","50%) scale(").concat(m,")")},b=s.useContext(V.OK),A=b.sdaFormat,E=b.isSDASequenceVisible,I=!!((0,x.I9)(_)&&k&&E),T=s.useState({}),N=T[0],w=T[1];s.useEffect((function(){w({width:e.containerDimensions.width||300,height:e.containerDimensions.height||1050,background:"black"})}),[e.containerDimensions.height,e.containerDimensions.width]);var L=P()("stream-display-ad__wrapper","stream-display-ad__wrapper_squeezeback","stream-display-ad__wrapper-".concat(I?"visible":"hidden")),F="squeezeback",M=P()(((t={})["stream-display-ad__container_".concat(F)]=!0,t)),U=P()(((n={})["stream-display-ad__transform-container_".concat(F)]=!0,n)),B=P()(((i={})["stream-display-ad__frame_".concat(F)]=!0,i)),j=P()(((o={})["stream-display-ad__iframe_".concat(F)]=!0,o["stream-display-ad__iframe_".concat(F,"--visible")]=!0,o)),q={position:"absolute",width:"".concat(f,"px"),right:"0",height:"100%",zIndex:"-1"};if(A!==R.Z$.SQUEEZEBACK)return null;var G=(0,r.jsx)(z,(0,a.__assign)({format:R.Z$.SQUEEZEBACK,isSkyscraper:!1},e));return(0,O.Ny)(c)&&(G=(0,r.jsx)("div",{"data-test-selector":Q.IFrame,className:j,style:N})),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("div",{"data-test-selector":Q.Wrapper,className:L,children:(0,r.jsxs)("div",{"data-test-selector":Q.Container,className:M,style:y,children:[(0,r.jsx)("div",{className:"squeezeback-accessibility-frame",style:q,tabIndex:0}),(0,r.jsx)("div",{"data-test-selector":Q.Transform,className:U,style:{},children:(0,r.jsx)("div",{"data-test-selector":Q.Frame,id:d,className:B,style:C,children:G})})]})})})})),X=n(940594),$=n(192133),J=function(){function e(e){this.firedEvents=new Set,this.urls=e}return e.prototype.handleEvent=function(e,t,n){var i=this;switch(e){case"impression":this.fireOnce("impression",(function(){return i.fireImpression()}));break;case"game_started":this.fireOnce("start",(function(){return i.fireTrackingEvent("start")}));break;case"first_quartile":this.fireOnce("firstQuartile",(function(){return i.fireTrackingEvent("firstQuartile")}));break;case"mid_quartile":this.fireOnce("midpoint",(function(){return i.fireTrackingEvent("midpoint")}));break;case"third_quartile":this.fireOnce("thirdQuartile",(function(){return i.fireTrackingEvent("thirdQuartile")}));break;case"game_completed":case"timer_expired":this.fireOnce("complete",(function(){return i.fireTrackingEvent("complete")}));break;case"error":this.fireOnce("error",(function(){return i.fireError()}));break;case"ad_click":this.fireOnce("click",(function(){return i.fireClick()})),"click_through"===(null==n?void 0:n.toLowerCase())&&this.fireOnce("clickThrough",(function(){return i.fireClickThrough()}))}},e.prototype.fireOnce=function(e,t){this.firedEvents.has(e)||(this.firedEvents.add(e),t())},e.prototype.fireImpression=function(){var e;(null===(e=this.urls.impressionURLs)||void 0===e?void 0:e.length)>0&&(0,$.u4)(this.urls.impressionURLs)},e.prototype.fireTrackingEvent=function(e){var t,n=null===(t=this.urls.trackingEvents)||void 0===t?void 0:t[e];(null==n?void 0:n.length)>0&&(0,$.u4)(n)},e.prototype.fireError=function(e){var t;(void 0===e&&(e=900),(null===(t=this.urls.errorURLs)||void 0===t?void 0:t.length)>0)&&(0,$.X_)(this.urls.errorURLs,{ERRORCODE:e}).forEach((function(e){"undefined"!=typeof window&&null!==window&&((new Image).src=e)}))},e.prototype.fireClick=function(){var e;(null===(e=this.urls.clickTrackingURLs)||void 0===e?void 0:e.length)>0&&(0,$.u4)(this.urls.clickTrackingURLs)},e.prototype.fireClickThrough=function(){this.urls.clickThroughURL&&(0,$.u4)([this.urls.clickThroughURL])},e}(),ee={memory_match:1,word_maker:2},te=function(e){var t;return e&&null!==(t=ee[e])&&void 0!==t?t:0},ne="Creative:fatalError",ie="Creative:recordMetricEvent",ae={ad_click:{spadeEventName:"ad_click"},game_started:{spadeEventName:"ad_impression"},zero_quartile:{spadeEventName:"ad_quartile",additionalData:{quartile:0}},first_quartile:{spadeEventName:"ad_quartile",additionalData:{quartile:1}},mid_quartile:{spadeEventName:"ad_quartile",additionalData:{quartile:2}},third_quartile:{spadeEventName:"ad_quartile",additionalData:{quartile:3}},fourth_quartile:{spadeEventName:"ad_quartile",additionalData:{quartile:4}},game_completed:{spadeEventName:"video_ad_impression_complete",additionalData:{stitched:!1,ad_format:(0,R.uN)(R.Z$.OUTSTREAM_VERTICAL_VIDEO_PLAYABLE)}}},re="uninitialized",oe="error",se=function(e){var t,n,i=e.adMetadata,l=e.onStart,d=e.trackAdFormatData,u=e.style,c=e.adFormat,p=e.resetAdContext,v=e.playAdTrackingUrls,m=i.playAdConfig,f=i.containerId,g=void 0===f?"creative-container":f,y=i.adDuration,h=void 0===y?30:y,_=(0,s.useRef)(null),k=(0,s.useRef)(null),S=(0,s.useRef)(null),C=(0,s.useRef)(null),b=(0,s.useRef)(d),P=(0,s.useRef)(null),A=(0,s.useRef)();(0,s.useEffect)((function(){b.current=d}),[d]);var E=(0,s.useRef)(null);(0,s.useEffect)((function(){v&&!E.current&&(E.current=new J(v))}),[v]);var I=(0,X.j8)("https://d18c1dvmdor32i.cloudfront.net/interactive-ad-assets/prod/lib/interactive-creative-manager-lib-v0.1.0.js");(0,s.useEffect)((function(){"preload"!==(null==I?void 0:I.status)&&"loading"!==(null==I?void 0:I.status)||P.current||(P.current=performance.now())}),[I]);var T=null!==(n=null===(t=S.current)||void 0===t?void 0:t.getState())&&void 0!==n?n:re,D=(0,s.useCallback)((function(){return(0,a.__awaiter)(void 0,void 0,void 0,(function(){var e,t,n,i,r,o,s,d,u,c,v,f,y;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:if(!_.current||!window.TwitchInteractiveCreatives)return[2];P.current&&(e=Math.round(performance.now()-P.current),P.current=null),a.label=1;case 1:return a.trys.push([1,4,,5]),(t=window.TwitchInteractiveCreatives.InteractiveCreativeManager)?(n=_.current.getBoundingClientRect(),i=Math.floor(n.width)||300,r=Math.floor(n.height)||250,o=new t(_.current),k.current=o,s={environmentData:{dimensions:{width:i,height:r},containerId:g},creativeData:{adParameters:m}},d=performance.now(),[4,o.preload(s)]):[2];case 2:return u=a.sent(),S.current=u,[4,o.start()];case 3:return a.sent(),c=Math.round(performance.now()-d),null===(v=b.current)||void 0===v||v.call(b,"video_ad_loaded",{dependency_load_latency:null!=e?e:0,ad_load_latency:c,interactive_creative_id:te(A.current)}),C.current=new ResizeObserver((function(e){var t,n,i=(null===(t=e[0])||void 0===t?void 0:t.contentRect)||{},a=i.width,r=i.height;if(a&&r)try{o.resize({width:Math.floor(a),height:Math.floor(r)})}catch(e){null===(n=b.current)||void 0===n||n.call(b,"ad_error",{reason:"creative_resize_failed",interactive_creative_id:te(A.current)})}})),C.current.observe(_.current),null===(f=E.current)||void 0===f||f.handleEvent("impression"),null==l||l(),[3,5];case 4:return a.sent(),null===(y=b.current)||void 0===y||y.call(b,"ad_error",{reason:"creative_init_failed",interactive_creative_id:te(A.current)}),null==p||p(),[3,5];case 5:return[2]}}))}))}),[m,g,l,p]),w=(0,s.useCallback)((function(){return(0,a.__awaiter)(void 0,void 0,void 0,(function(){var e,t,n;return(0,a.__generator)(this,(function(i){switch(i.label){case 0:if(null===(t=C.current)||void 0===t||t.disconnect(),C.current=null,!(e=k.current))return[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,e.end()];case 2:return i.sent(),k.current=null,S.current=null,[3,4];case 3:return i.sent(),null===(n=b.current)||void 0===n||n.call(b,"ad_error",{reason:"creative_end_failed",interactive_creative_id:te(A.current)}),[3,4];case 4:return[2]}}))}))}),[]);(0,s.useEffect)((function(){"loaded"===(null==I?void 0:I.status)&&_.current&&window.TwitchInteractiveCreatives&&!k.current&&D()}),[I,D]),(0,s.useEffect)((function(){var e=setTimeout((function(){var e;null===(e=b.current)||void 0===e||e.call(b,"ad_client_pod_completion",{}),null==p||p()}),1e3*h);return function(){clearTimeout(e)}}),[h,p,g]),(0,s.useEffect)((function(){return function(){w()}}),[w]);var x=(0,s.useCallback)((function(e){var t,n,i;if(e.data&&"object"==typeof e.data){var r=e.data,o=r.type,s=r.sessionId,l=r.messageId,d=(0,a.__rest)(r,["type","sessionId","messageId"]),u=null==o?void 0:o.startsWith("Creative:");if(!(!u&&!(!s||!l))&&u){if(o===ie)((null===(t=d.args)||void 0===t?void 0:t.metricList)||[]).forEach((function(e){var t,n,i,r=ae[e.metricName];if(r){var o=r.spadeEventName,s=r.additionalData,l=e.dimensions,d=null==l?void 0:l.game,u=null==l?void 0:l.event_category,c=null==e?void 0:e.isReplay;d&&!A.current&&(A.current=d);var p=(0,a.__assign)((0,a.__assign)({},s),{interactive_creative_id:te(d||A.current),ad_click_type:u,is_replay:c});null===(t=b.current)||void 0===t||t.call(b,o,p)}null===(n=E.current)||void 0===n||n.handleEvent(e.metricName,e.metricVal,null===(i=e.dimensions)||void 0===i?void 0:i.event_category)}));o===ne&&(null===(n=b.current)||void 0===n||n.call(b,"ad_error",{reason:"creative_fatal_error",interactive_creative_id:te(A.current)}),null===(i=E.current)||void 0===i||i.handleEvent("error"),null==p||p())}}}),[p]);return(0,s.useEffect)((function(){return window.addEventListener("message",x),function(){window.removeEventListener("message",x)}}),[x]),(0,s.useEffect)((function(){if("undefined"!=typeof ReportingObserver){var e=new ReportingObserver((function(e){e.forEach((function(e){var t,n,i=e.body;if("HeavyAdIntervention"===(null==i?void 0:i.id)){var a=(null===(t=i.message)||void 0===t?void 0:t.toLowerCase())||"",r=a.includes("cpu")?"cpu":a.includes("network")?"network":"unknown";null===(n=b.current)||void 0===n||n.call(b,"ad_error",{reason:"heavy_ad_intervention_".concat(r),interactive_creative_id:te(A.current)}),null==p||p()}}))}),{types:["intervention"],buffered:!0});return e.observe(),function(){return e.disconnect()}}}),[p]),I&&"preload"!==I.status&&"loading"!==I.status?"failed"===I.status||T===oe?("failed"===I.status&&(null==d||d("ad_error",{reason:"cdn_load_failed",interactive_creative_id:te(A.current)})),T===oe&&(null==d||d("ad_error",{reason:"creative_error_state",interactive_creative_id:te(A.current)})),null==p||p(),null):(0,r.jsx)(o.P,{ref:_,width:"100%",height:"100%",position:"relative",overflow:"hidden",style:u,children:(0,r.jsx)(N.V,{dsaContext:{adInput:{adIDValue:"0",adProgramIDValue:null,adSessionIDValue:"0",advertiserIDNS:"0",campaignIDNS:"0",creativeIDValue:"0",mediaDurationInSeconds:h,pageURL:document.URL,selectionSignals:{dsaPastActivity:"",dsaVersion:1,isShownBasedOffUserDsaContext:!1,isShownBasedOffUserDsaLocation:!1},slotName:c.toString()},clientInput:{ttMedium:"online_video"},countryInfo:{geoCode:null,isFromEU:!1}},format:R.Z$.OUTSTREAM_VERTICAL_VIDEO_PLAYABLE.toString(),rendersInVideoPlayer:!1})}):(0,r.jsx)(o.P,{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",style:u})},le=n(906182),de=n(812294),ue=n(89279),ce=F.x.wrap((function(){return n.e(24175).then(n.bind(n,785133))}),"VerticalVideoControls",{failSilently:!0,placeholder:null}),pe=(0,A.Zz)((0,w.A)(),(0,E.X)({name:"VerticalVideoContainer"}))((function(e){var t=e.scaledAdDimensions,n=e.sdaHorizontalOffset,i=e.trackAdFormatData,l=s.useContext(p.jK),d=l.adFormatMetadata,u=l.thirdPartyOutstreamVideoAdElement,c=l.updateOutstreamAdElement,v=l.videoAdMetadata,m=l.resetOutstreamAd,g=s.useContext(V.OK).checkAndUpdateSDAHiddenState,y=s.useContext(f.kl).behaviors,h=(0,x.hr)(d),_=h&&"hiding"===(null==d?void 0:d.status),k=h&&!_,S=(0,L.Z)(k),C=s.useRef(null),b=h&&d.adFormat===R.Z$.OUTSTREAM_VERTICAL_VIDEO_PLAYABLE,P=(0,ue.M)(C).isHovering,A=(0,le.gD)(void 0,void 0,d),E=A.minutes,I=A.seconds,T=void 0;d&&(0,x.pt)(d)&&(T=d.numberOfAds>1?(0,le.ZV)(d.adPosition,d.numberOfAds,E,I):(0,le.KV)(E,I));var D={position:"absolute",transition:"visibility 0.25s, opacity 0.25s ease-in-out",width:"100%",height:"100%",right:"0",visibility:k?"visible":"hidden"},N={position:"absolute",top:"50%",transform:"translateY(-50%)",height:"".concat(t.height,"px"),width:"".concat(t.width,"px"),opacity:k?1:0,background:"black",right:"".concat(n,"px")};s.useEffect((function(){if(k&&!(null==d?void 0:d.started)){var e=setTimeout((function(){var e;null===(e=d.videoAd)||void 0===e||e.start(),g(u)}),1e3);return function(){return clearTimeout(e)}}}),[k,d,g,u]),s.useEffect((function(){k&&(null==v?void 0:v.stitched)&&(i("ad_opportunity_abort",{abort_reason:"SureStream"}),m())}),[k,m,null==v?void 0:v.stitched,i]),s.useEffect((function(){k&&(null==y?void 0:y.mini)&&(i("ad_opportunity_abort",{abort_reason:"MINI"}),m())}),[k,m,null==y?void 0:y.mini,i]),s.useEffect((function(){k&&i("ad_container_render_lifecycle",{render_stage:"MOUNT"}),S&&!k&&i("ad_container_render_lifecycle",{render_stage:"UNMOUNT",format_name:(0,R.uN)(R.Z$.OUTSTREAM_VERTICAL_VIDEO)})}),[k]);var w=(0,x.RO)(d),F={onClick:function(){return null==w?void 0:w.pause()},onClose:function(){return null==w?void 0:w.play()},right:2,adInfoTextOverride:T};return(0,r.jsx)(o.P,{style:D,children:(0,r.jsxs)(o.P,{style:N,ref:C,children:[b?(0,r.jsx)(se,{adMetadata:{playAdConfig:d.playAdConfig||"",containerId:"creative-container",adDuration:d.duration||30},adSessionId:"creative-container",adFormat:d.adFormat,trackAdFormatData:i,resetAdContext:m,playAdTrackingUrls:d.playAdTrackingUrls,style:{width:"100%",height:"100%"}}):(0,r.jsx)(o.P,{width:"100%",height:"100%","data-a-target":"outstream-ax-overlay","aria-label":"outstream video overlay",ref:c}),k&&!b&&(0,r.jsx)(o.P,{position:"absolute",width:"100%",style:{bottom:0,width:"100%"},children:(0,r.jsx)(ce,{showControls:P})}),k&&!b&&(0,r.jsx)(de.Cq,(0,a.__assign)({},F))]})})})),ve=function(e){var t=e.children,n=e.handleResize,i=s.useContext(f.kl),C=i.behaviors,b=s.useContext(g._t),P=s.useContext(y.wL),A=s.useContext(v.MP),E=s.useContext(p.jK),I=s.useContext(m.$g),T=s.useContext(u.m9),D=(0,c.U0)().isSDAUpsellShowing,N=(0,a.__assign)((0,a.__assign)({uiContext:b,videoPlaybackContext:P,playerPublicPropsContext:i},A),{adContext:E,playerContext:I,brandLiftContext:T,isSDAUpsellShowing:D}),w=E.adFormatMetadata,R=T.isSurveyShowing,x=T.isMouseHovering,L=w&&(0,d.rW)(w.adFormat)||R&&!x||D,F=!(0,_.N8)(C,"enableStreamDisplayAds")||e.playerType===h.C.WatchPartyHost;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.$,{onResize:n}),!F&&(0,r.jsx)(Y,(0,a.__assign)({},e)),!F&&(0,r.jsx)(Z,(0,a.__assign)({},e)),!F&&(0,r.jsx)(pe,(0,a.__assign)({},e)),!F&&(0,r.jsx)(W,(0,a.__assign)({},e)),t,!F&&(0,r.jsx)(K,(0,a.__assign)({},e)),!F&&(0,k.oZ)(N)&&(0,r.jsx)(o.P,{hidden:!L,children:(0,r.jsx)(S.q,{shouldShow:(0,k.SU)(N),isOffline:!1,isAccessibilityLandmark:!1,hideDVRSeekbar:!0})})]})};ve.displayName="StreamDisplayAdWrapper"},906182:function(e,t,n){"use strict";n.d(t,{AF:function(){return A},KV:function(){return _},RW:function(){return P},S:function(){return C},ZV:function(){return k},gD:function(){return b}});var i=n(331635),a=n(474848),r=n(959340),o=n(914421),s=n(312663),l=n(588702),d=n(296540),u=n(883474),c=n(975928),p=n(218692),v=n(26576),m=n(233936),f=n(641896),g=n(292241),y=n(947153),h=n(573527),_=function(e,t){return(0,u.hw)("Ad {minutes}:{seconds}",{minutes:e,seconds:S(t)},"VideoAdCountdown")},k=function(e,t,n,i){return(0,u.hw)("Ad {currentAdPosition} of {totalAds} · {minutes}:{seconds}",{currentAdPosition:e,totalAds:t,minutes:n,seconds:S(i)},"VideoAdCountdown")},S=function(e){return e<10?"0".concat(e):String(e)},C=function(e){var t=(0,d.useContext)(f.$g).mediaPlayerInstance,n=(0,d.useContext)(m.jK),i=n.videoAdMetadata,a=n.adFormatMetadata,r=b(t,i,a),o=r.minutes,s=r.seconds,l=r.time,p=r.adPosition,v=r.numberOfAds,g=S(s);return!(0,h.cz)(i)||!e&&l<0?"":(0,c.Fr)()?(0,u.hw)("{minutes}:{seconds}",{minutes:o,seconds:g},"VideoAdCountdownMWeb"):e?v>1?(0,u.hw)("Twitch Ad {adPosition} of {numberOfAds} : ({minutes}:{seconds})",{adPosition:p,numberOfAds:v,minutes:o,seconds:g},"VideoAdCountdown"):(0,u.hw)("Twitch Ad : ({minutes}:{seconds})",{minutes:o,seconds:g},"VideoAdCountdown"):(0,h.lq)(i)?(0,u.hw)("Ad ({minutes}:{seconds})",{minutes:o,seconds:g},"VideoAdCountdown"):v>1?(0,u.hw)("Ad {adPosition} of {numberOfAds} : ({minutes}:{seconds})",{adPosition:p,numberOfAds:v,minutes:o,seconds:g},"VideoAdCountdown"):(0,u.hw)("{minutes}:{seconds}",{minutes:o,seconds:g},"VideoAdCountdown")},b=function(e,t,n){var i,a,r=(0,h.hr)(n),o=r?n:t,s=null!==(i=null==o?void 0:o.numberOfAds)&&void 0!==i?i:0,l=(0,h.lq)(t)?t:void 0,u=(0,h.cz)(t),c=null!==(a=null==o?void 0:o.adPosition)&&void 0!==a?a:0,m=(0,d.useState)(0),f=m[0],_=m[1],k=d.useState(0),S=k[0],C=k[1],b=(0,d.useCallback)((function(e){_(Math.round(e.duration-e.progress))}),[]);(0,p.A)({videoAdMetadata:t,adFormatMetadata:n}).adEvents.addEventListener(g.V.Progress,b);var P=d.useMemo((function(){return e&&l?{duration:+l.duration,podFilledDuration:+l.podFilledDuration,startPosition:e.getPosition()||0}:null}),[e,l]);if(d.useEffect((function(){P?1===c&&C(P.startPosition):C(0)}),[P,c]),(0,v.p)(y.a.TIME_UPDATE,(0,d.useCallback)((function(){if(e&&P){var t=P.podFilledDuration-(e.getPosition()-S);_(Math.round(t))}}),[e,P,S])),!u&&!r)return{minutes:0,seconds:0,time:0,roundedTime:0,adPosition:0,numberOfAds:0};var A=Math.max(0,f);return{minutes:Math.floor(A/60),seconds:Math.round(A%60),time:f,roundedTime:A,adPosition:c,numberOfAds:s}},P=function(){return function(e){return function(t){var n=(0,d.useContext)(f.$g).mediaPlayerInstance,r=(0,d.useContext)(m.jK).videoAdMetadata,o=b(n,r).roundedTime,s=(0,d.useState)(o),l=s[0],u=s[1];return d.useEffect((function(){o&&0!==o&&u((function(e){return e?Math.min(o,e):o}))}),[o,l]),(0,a.jsx)(e,(0,i.__assign)({},t,{minAdCountdownReached:l}))}}},A=function(){var e=C();return e?(0,a.jsx)(r.P,{position:o.yX.Absolute,attachTop:!0,attachLeft:!0,padding:1,background:o.VS.Overlay,display:o.nl.InlineBlock,"data-a-target":"video-ad-countdown",children:(0,a.jsx)(s.N,{color:o.Q1.Overlay,type:l.M2.Span,children:e})}):null};A.displayName="VideoAdCountdown"},812294:function(e,t,n){"use strict";n.d(t,{Cq:function(){return v}});var i=n(331635),a=n(474848),r=(n(296540),n(415044)),o=n(868238),s=n(975928),l=n(66066),d=n(233936),u=n(911906),c=n(334963),p=n(573527);var v=(0,o.Zz)((0,r.Ng)((function(e){return{theatreModeEnabled:e.ui.theatreModeEnabled,rightColumnExpanded:e.ui.rightColumnExpanded}})),(0,d.VX)((function(e){return{videoAdMetadata:e.videoAdMetadata,adFormatMetadata:e.adFormatMetadata,request:e.videoAdRequest,isVideoAdShowing:(0,p.cz)(e.videoAdMetadata),stitchedAdMetadata:(0,p.lq)(e.videoAdMetadata)&&e.videoAdMetadata||void 0,clientSideAdMetadata:(0,p.EF)(e.videoAdMetadata)&&e.videoAdMetadata||void 0}})),(0,u.cj)((function(e){return{behaviors:e.behaviors}})),(0,c.AP)((function(e){return{play:e.play,pause:e.pause}})))((function(e){var t,n,r,o,d=e.rightColumnExpanded,u=null===(t=e.videoAdMetadata)||void 0===t?void 0:t.stitched,c=e.format,v="audio-csai"===c,m=e.left,f=e.bottom;if(!e.isVideoAdShowing&&!(0,p.pt)(e.adFormatMetadata))return null;var g=u?function(e){var t,n,a,r,o,s,l,d,u,c,p,v,m;return(0,i.__assign)({adInput:{adIDValue:null===(t=e.stitchedAdMetadata)||void 0===t?void 0:t.lineItemId,adProgramIDValue:null,adSessionIDValue:null===(n=e.stitchedAdMetadata)||void 0===n?void 0:n.adSessionId,advertiserIDNS:null!==(r=null===(a=e.stitchedAdMetadata)||void 0===a?void 0:a.dsaAdvertiserId)&&void 0!==r?r:"",campaignIDNS:null!==(s=null===(o=e.stitchedAdMetadata)||void 0===o?void 0:o.dsaCampaignId)&&void 0!==s?s:"",creativeIDValue:null===(l=e.stitchedAdMetadata)||void 0===l?void 0:l.creativeId,mediaDurationInSeconds:null===(d=e.videoAdMetadata)||void 0===d?void 0:d.duration,pageURL:document.URL,selectionSignals:{dsaPastActivity:null===(u=e.stitchedAdMetadata)||void 0===u?void 0:u.dsaPastActivity,dsaVersion:null===(c=e.stitchedAdMetadata)||void 0===c?void 0:c.dsaVersion,isShownBasedOffUserDsaContext:null===(p=e.stitchedAdMetadata)||void 0===p?void 0:p.dsaContext,isShownBasedOffUserDsaLocation:null===(v=e.stitchedAdMetadata)||void 0===v?void 0:v.dsaLocation},slotName:null===(m=e.stitchedAdMetadata)||void 0===m?void 0:m.adFormat}},{clientInput:{ttMedium:"channel_videos"},countryInfo:{geoCode:null,isFromEU:!1}})}(e):function(e){var t,n,a,r,o,s,l,d,u,c,v,m,f,g,y,h,_,k,S,C=(0,p.hr)(e.adFormatMetadata)?e.adFormatMetadata:e.clientSideAdMetadata;return(0,i.__assign)({adInput:{adIDValue:(null===(t=null==C?void 0:C.adInfo)||void 0===t?void 0:t.adCfId)||(null===(n=null==C?void 0:C.adInfo)||void 0===n?void 0:n.adID),adProgramIDValue:null,adSessionIDValue:null===(a=e.request)||void 0===a?void 0:a.sessionID,advertiserIDNS:null!==(s=null===(o=null===(r=null==C?void 0:C.adInfo)||void 0===r?void 0:r.transparencyInfo)||void 0===o?void 0:o.advertiserId)&&void 0!==s?s:"",campaignIDNS:null!==(u=null===(d=null===(l=null==C?void 0:C.adInfo)||void 0===l?void 0:l.transparencyInfo)||void 0===d?void 0:d.campaignId)&&void 0!==u?u:"",creativeIDValue:(null===(c=null==C?void 0:C.adInfo)||void 0===c?void 0:c.creativeCfId)||(null===(v=null==C?void 0:C.adInfo)||void 0===v?void 0:v.creativeID),mediaDurationInSeconds:null==C?void 0:C.duration,pageURL:document.URL,selectionSignals:{dsaPastActivity:null===(f=null===(m=null==C?void 0:C.adInfo)||void 0===m?void 0:m.transparencyInfo)||void 0===f?void 0:f.selectionSignals.pastActivity,dsaVersion:null===(y=null===(g=null==C?void 0:C.adInfo)||void 0===g?void 0:g.transparencyInfo)||void 0===y?void 0:y.version,isShownBasedOffUserDsaContext:null===(_=null===(h=null==C?void 0:C.adInfo)||void 0===h?void 0:h.transparencyInfo)||void 0===_?void 0:_.selectionSignals.context,isShownBasedOffUserDsaLocation:null===(S=null===(k=null==C?void 0:C.adInfo)||void 0===k?void 0:k.transparencyInfo)||void 0===S?void 0:S.selectionSignals.location},slotName:null==C?void 0:C.adFormat.toString()}},{clientInput:{ttMedium:"channel_videos"},countryInfo:{geoCode:null,isFromEU:!1}})}(e);return(0,a.jsx)(l.V,{dsaContext:g,onClick:null!==(n=e.onClick)&&void 0!==n?n:e.pause,onClose:null!==(r=e.onClose)&&void 0!==r?r:e.play,format:c,left:m,bottom:f,margin:{left:(0,s.Fr)()?1:0,bottom:(0,s.Fr)()?1:0,top:v?0:d?1:2,right:v?0:d?1:null!==(o=e.right)&&void 0!==o?o:4},adInfoTextOverride:e.adInfoTextOverride,rendersInVideoPlayer:!0})}));v.displayName="VideoDSAButton"},731929:function(e,t,n){"use strict";n.d(t,{A:function(){return f}});var i=n(331635),a=n(474848),r=(n(296540),n(868238)),o=n(151702),s=n(68428),l=n(233936),d=n(641896),u=n(911906),c=n(129721),p=n(731820),v=n(334963),m=n(331536);function f(){return function(e){var t=function(t){var n=(0,s.p)((0,i.__assign)((0,i.__assign)({},t),{adPlacement:m.p.CHANNEL_PLAYER,videoSessionId:t.mediaPlayerInstance&&t.mediaPlayerInstance.getSessionData()["VIDEO-SESSION-ID"]}));return(0,a.jsx)(e,(0,i.__assign)({},t,n))};return t.displayName=(0,o.K)(t.name,e),(0,r.Zz)((0,u.cj)((function(e){return{content:e.content,behaviors:e.behaviors}})),(0,l.VX)((function(e){return{adFormatRequest:e.adFormatRequest,adFormatMetadata:e.adFormatMetadata,radToken:e.radToken}})),(0,d.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}})),(0,c.o1)(),(0,p.c0)((function(e){return{videoContainer:e.videoContainer}})),(0,v.AP)((function(e){return{muted:e.muted,volume:e.volume}})))(t)}}},989071:function(e,t,n){"use strict";var i;n.d(t,{V:function(){return i}}),function(e){e.AdImpression="ad_impression"}(i||(i={}))},318098:function(e,t,n){"use strict";function i(e){if(!e)return 0;var t=e.getBoundingClientRect(),n={height:window.innerHeight||document.documentElement.clientHeight||screen.height||0,width:window.innerWidth||document.documentElement.clientWidth||screen.width||0};if(t.top0&&t.bottom>0){var i=t.bottom-t.top;return Math.min(n.height-t.top,t.bottom,i,n.height)/i}return 0}n.d(t,{K:function(){return i}})},657789:function(e,t,n){"use strict";n.d(t,{O:function(){return d}});var i=n(331635),a=n(474848),r=n(296540),o=n(151702),s=n(218692),l=n(233936);function d(){return function(e){var t=function(t){var n=(0,r.useContext)(l.jK),o=n.adFormatMetadata,d=n.videoAdMetadata,u=(0,s.A)({videoAdMetadata:d,adFormatMetadata:o});return(0,a.jsx)(e,(0,i.__assign)({},t,u))};return t.displayName=(0,o.K)("WithVideoAdEvents",e),t}}},633547:function(e,t,n){"use strict";n.d(t,{_:function(){return o}});var i=n(296540),a=n(233936),r=n(573527);function o(e,t,n){var o=i.useContext(a.jK),s=o.videoAdMetadata,l=o.adFormatMetadata,d=l||(null==n?void 0:n.adFormatMetadata);i.useEffect((function(){var n=(0,r.jC)(s,d);return n&&n.addEventListener(e,t),function(){n&&n.removeEventListener(e,t)}}),[s,l,e,t,d])}},164557:function(e,t,n){"use strict";n.d(t,{_:function(){return w}});var i=n(331635),a=n(474848),r=n(296540),o=n(868238),s=n(883474),l=n(276337),d=n(306730),u=n(664865),c=n(151702),p=n(229045),v=n(430107),m=n(590745),f=n(59889),g=n(318098),y=n(233936),h=n(641896),_=n(911906),k=n(129721),S=n(731820),C=n(334963),b=n(62026),P=n(110657),A=n(573527),E=n(249448),I=n(588547),T=n(478540),D=n.n(T);function N(e){return{muted:e.muted,volume:e.volume}}function w(){return function(e){var t=function(t){function n(e){var n=t.call(this,e)||this;return n.logger=s.vF.withCategory("WithVideoAdTrackingComponent"),n.playerVisibilityAllowlist=new Set(["ad_impression",I.V.AdImpression,"ad_quartile"]),n.trackVideoAdData=function(e,t){n.props.track(e,(0,i.__assign)((0,i.__assign)({},n.getRequestProperties(e)),t))},n.trackVideoRAdEvent=function(e,t){return(0,i.__awaiter)(n,void 0,void 0,(function(){var n,a,r;return(0,i.__generator)(this,(function(o){switch(o.label){case 0:if("string"!=typeof(n=this.props.radToken))return[2];a={eventName:e,eventPayload:JSON.stringify((0,i.__assign)((0,i.__assign)({},this.getRequestProperties(e)),t)),radToken:n},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.props.recordAdEvent((0,u.AR)(a))];case 2:return o.sent(),[3,4];case 3:return r=o.sent(),this.logger.errorAndReport(r,"Failed to record ad event in RAds"),[3,4];case 4:return[2]}}))}))},n.getRequestProperties=function(e){var t,a,r,o,l,u,c,m,g,y,h=n.props,_=h.videoAdRequest,k=h.videoAdMetadata,S=h.content,C=h.behaviors,I=h.consent,T=h.muted,D=h.volume,N=h.mediaPlayerInstance;if((0,A.lq)(k))return{stitched:!0};var w=k,R="";if(w&&"sdkUrl"in w&&w.sdkUrl&&(R=w.sdkUrl),!_)return{ad_session_id:null,roll_type:null,time_break:null};var x={};_.status!==P.sC.Pending&&(x={provider:_.sdk,ad_server:_.server&&_.server.toLowerCase(),sdk_url:R});var L=k?k.adFormat:_.adFormat,F=void 0;(0,f.Ix)(L)?F=L:(0,f.vK)(L)&&(F=b.Z$[L]);var M=(0,E.DG)(S)?p.cM.Live:(0,E.wy)(S)?p.cM.VOD:(0,E.Jn)(S)?p.cM.Clip:"";return(0,i.__assign)({advertising_id:(0,v.O)(),stitched:(0,A.lq)(k),tab_session_id:s.x2.session.tabID,browser:navigator.userAgent,country:(0,d.If)()||"",content_type:M,is_mafs:!!_.mafsDecision,gdpr_logs:null===(a=null===(t=null==I?void 0:I.consent)||void 0===t?void 0:t.gdprUserPreferences)||void 0===a?void 0:a.tcData.tcString,gdpr_consent:null===(l=null===(o=null===(r=null==I?void 0:I.consent)||void 0===r?void 0:r.gdprUserPreferences)||void 0===o?void 0:o.tcData.purpose.consents)||void 0===l?void 0:l.valueOf(),gdpr_enabled:null===(m=null===(c=null===(u=null==I?void 0:I.consent)||void 0===u?void 0:u.gdprUserPreferences)||void 0===c?void 0:c.tcData.ifGDPRApplies)||void 0===m?void 0:m.valueOf(),referrer_domain:null===(g=s.E5.getLastPageview())||void 0===g?void 0:g.referrer_domain,is_embed:null==C?void 0:C.embed,twitch_correlator:_.twitchCorrelator,ad_session_id:_.sessionID,roll_type:_.roll,time_break:_.duration,break_length:_.duration,commercial_id:_.commercialID,format_name:F,sdk_url:R,player_mute:T,player_visibility:n.getPlayerVisibility(e),video_session_id:null===(y=null==N?void 0:N.getSessionData())||void 0===y?void 0:y["VIDEO-SESSION-ID"],player_volume:D,closed_captions_included:!!(null==k?void 0:k.closedCaptionsAvailable)},x)},n.state={trackVideoAdData:n.trackVideoAdData,trackVideoRAdEvent:n.trackVideoRAdEvent},n}return(0,i.__extends)(n,t),n.prototype.render=function(){return(0,a.jsx)(e,(0,i.__assign)({},this.props,this.state))},n.prototype.getPlayerVisibility=function(e){if(this.playerVisibilityAllowlist.has(e))return(0,g.K)(this.props.videoContainer)},n.displayName=(0,c.K)(n.name,e),n}(r.Component);return(0,o.Zz)((0,_.cj)((function(e){return{content:e.content,behaviors:e.behaviors}})),(0,k.o1)(),(0,h.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}})),(0,S.c0)((function(e){return{videoContainer:e.videoContainer}})),(0,C.AP)(N),(0,y.VX)((function(e){return{videoAdRequest:e.videoAdRequest,videoAdMetadata:e.videoAdMetadata,radToken:e.radToken}})),(0,l._v)(D(),{name:"recordAdEvent"}),m.z3)(t)}}},588547:function(e,t,n){"use strict";var i;n.d(t,{V:function(){return i}}),function(e){e.AdImpression="ad_impression",e.AdPodComplete="ad_pod_complete",e.AdQuartile="ad_quartile",e.VideoAdRequest="video_ad_request",e.VideoAdRequestDeclined="video_ad_request_declined",e.VideoAdRequestError="video_ad_request_error",e.VideoAdError="video_ad_error",e.VideoAdImpression="video_ad_impression",e.VideoAdQuartileComplete="video_ad_quartile_complete",e.VideoAdPodComplete="video_ad_pod_complete"}(i||(i={}))},584074:function(e,t,n){"use strict";n.d(t,{e:function(){return c}});var i=n(331635),a=n(474848),r=n(296540),o=n(911906),s=n(894320),l=n(212276),d=n(782426),u=n(249448);function c(){return function(e){var t=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.getContentUrl=function(t,n){var i=e.props;return function(e,t){var n,i,a,r;void 0===t&&(t={});var o=t.contentRoutingOverrides;return(0,u.DG)(e)?(null!==(n=null==o?void 0:o[l.FC.Live])&&void 0!==n?n:d.U)(e,t):(0,u.wy)(e)?(null!==(i=null==o?void 0:o[l.FC.VOD])&&void 0!==i?i:d.zb)(e,t):(0,u.P3)(e)?(null!==(a=null==o?void 0:o[l.FC.Collection])&&void 0!==a?a:d.Mr)(e,t):(0,u.Jn)(e)?(null!==(r=null==o?void 0:o[l.FC.Clip])&&void 0!==r?r:d.cs)(e,t):void 0}(t,{trackingContext:n,linkTrackingContext:i.linkTrackingContext,contentRoutingOverrides:i.overrideContentRouting})},e.getFullyFormedUrl=function(t,n){return function(e,t){return void 0===t&&(t={}),(0,u.DG)(e)&&(0,d.b3)(e,t)||(0,u.wy)(e)&&(0,d.A9)(e,t)||(0,u.P3)(e)&&(0,d.$q)(e,t)||(0,u.Jn)(e)&&(0,d.zM)(e,t)||d.Kk}(t,{trackingContext:n,linkTrackingContext:e.props.linkTrackingContext})},e}return(0,i.__extends)(n,t),n.prototype.render=function(){return(0,a.jsx)(e,(0,i.__assign)({},this.props,{getContentUrl:this.getContentUrl,getFullyFormedUrl:this.getFullyFormedUrl}))},n}(r.Component);return(0,o.cj)(p)(t)}}function p(e){var t=(0,s.wk)({playerPublicPropsContext:e});return{linkTrackingContext:t.linkTrackingContext,overrideContentRouting:t.overrideContentRouting}}},345484:function(e,t,n){"use strict";n.d(t,{A3:function(){return s},GZ:function(){return r},iu:function(){return l}});var i=n(854622),a=n(975387),r={overlayExtension:null,componentExtensions:[],shouldMountExtensionComponents:!1,allVideoExtensions:[],isChannelInfoVisible:!1,isOverlayVisible:!1,permissionsStates:{},setOverlayVisibility:function(){},setMenuState:function(e,t){},setPlayerMenuState:function(e,t){},setPermissionsState:function(e,t){},setNotification:function(e){},openPopover:function(e){},closePopover:function(e){},togglePopover:function(e){},hoverExtensionCard:function(e){},isMenuOpen:function(e){return!1},isPopoverOpen:function(e){return!1},isDockIconHovered:function(e){return!1},isAnyPopoverOpen:function(){return!1},getMenuState:function(e){return{type:a.gu.NONE}},getPlayerMenuState:function(){return{type:a.gu.NONE,selectedInstallationID:null}},getNotification:function(){return{type:a._n.NONE}},hideExtensions:!0,trackEvent:function(e,t,n){}},o=(0,i.e)("ExtensionsUIContext",r,(function(e){return{extensionsUIContext:e}})),s=o.withMemoContext,l=o.context},450140:function(e,t,n){"use strict";n.d(t,{Zx:function(){return L}});var i,a=n(331635),r=n(474848),o=n(288480),s=n(296540),l=n(415044),d=n(868238),u=n(276337),c=n(368770),p=n(700904),v=n(233936),m=n(699511),f=n(911906),g=n(129721),y=n(731820),h=n(334963),_=n(975387),k=n(573527),S=n(249448),C=n(894320),b=n(696894),P=n(465403),A=n.n(P),E=n(345484);!function(e){e[e.RESET=0]="RESET",e[e.SET_OVERLAY_VISIBILITY=1]="SET_OVERLAY_VISIBILITY",e[e.OPEN_POPOVER=2]="OPEN_POPOVER",e[e.CLOSE_POPOVER=3]="CLOSE_POPOVER",e[e.SET_MENU_STATE=4]="SET_MENU_STATE",e[e.SET_PLAYER_MENU_STATE=5]="SET_PLAYER_MENU_STATE",e[e.SET_NOTIFICATION_STATE=6]="SET_NOTIFICATION_STATE"}(i||(i={}));var I=n(248699);function T(e){var t=e.extensionsForChannel;return t&&t.fetchedChannelID}function D(e){var t=e.extensionsForChannel;if(!t)return!1;var n=t.error,i=t.loading,a=t.installedExtensions;return!(n||i||!a||!a.length)}function N(e){return e.reduce((function(e,t){var n=(0,b.wv)(t);return n&&(e[n]={identityLinkedStatus:(0,b.aX)(t.extension.token).identityLinkedStatus}),e}),{})}var w={isOverlayVisible:!0,menuState:{type:_.gu.NONE},playerMenuState:{type:_.gu.NONE,selectedInstallationID:null},notificationState:{type:_._n.NONE},selectedExtensionID:null,hoveredExtensionID:null,permissionsStates:{}},R=function(e){function t(t){var n=e.call(this,t)||this;return n.computeContextProps=function(){var e,t,i,r,o=n.sortExtensions();return(0,a.__assign)((0,a.__assign)((0,a.__assign)((0,a.__assign)({},E.GZ),{loginID:n.props.loginID,channelID:T(n.props),hideExtensions:(e=n.props,t=e.isMini,i=e.isVideoAdShowing,r=e.isPlaying,!(!e.isCasting&&!t&&r&&!i)),isChannelInfoVisible:n.props.isFullscreen||n.props.isTheatreMode||!!n.props.showChannelInfoOnHover}),o),{shouldMountExtensionComponents:D(n.props),isOverlayVisible:n.state.isOverlayVisible&&!!o.overlayExtension,permissionsStates:n.state.permissionsStates,setOverlayVisibility:n.setOverlayVisibility,openPopover:n.openPopover,closePopover:n.closePopover,togglePopover:n.togglePopover,hoverExtensionCard:n.hoverExtensionCard,setMenuState:n.setMenuState,setPlayerMenuState:n.setPlayerMenuState,setPermissionsState:n.setPermissionsState,setNotification:n.setNotification,isMenuOpen:n.isMenuOpen,isDockIconHovered:n.isDockIconHovered,getMenuState:n.getMenuState,getPlayerMenuState:n.getPlayerMenuState,getNotification:n.getNotification,isPopoverOpen:n.isPopoverOpen,isAnyPopoverOpen:n.isAnyPopoverOpen,trackEvent:n.trackEvent})},n.sortExtensions=function(){var e=(0,b.gw)(n.installations),t=e[o.Z1.Overlay][0]||null,i=e[o.Z1.Component];return{overlayExtension:t,componentExtensions:i,allVideoExtensions:(0,a.__spreadArray)((0,a.__spreadArray)([],t?[t]:[],!0),i,!0)}},n.computeInitialNotificationState=function(e,t){return e===_._n.BITS_BALANCE?(0,a.__assign)((0,a.__assign)({},t),{type:_._n.BITS_BALANCE,expiration:Date.now()+b.QH}):{type:_._n.NONE}},n.computeNewState=function(e,t,r){switch(e.type){case i.RESET:return n.defaultState;case i.SET_OVERLAY_VISIBILITY:return(0,a.__assign)((0,a.__assign)({},t),{isOverlayVisible:e.payload.visible});case i.SET_NOTIFICATION_STATE:return(0,a.__assign)((0,a.__assign)({},t),{notificationState:e.payload.notificationState});case i.OPEN_POPOVER:var o=_.gu.NONE;return(0,b.l1)(e.payload.installation)&&(o=_.gu.SETTINGS),(0,b.MA)(e.payload.installation,t.permissionsStates)||(o=_.gu.UNRELEASED),(0,a.__assign)((0,a.__assign)({},t),{menuState:{type:o},selectedExtensionID:(0,b.wv)(e.payload.installation)});case i.CLOSE_POPOVER:return(0,a.__assign)((0,a.__assign)({},t),{menuState:{type:_.gu.NONE},selectedExtensionID:null});case i.SET_MENU_STATE:return e.payload.menuState.type===_.gu.NONE&&(0,b.l1)(e.payload.installation)?(0,a.__assign)((0,a.__assign)({},t),{menuState:{type:_.gu.NONE},selectedExtensionID:null}):(0,b.l1)(e.payload.installation)||e.payload.menuState.type!==_.gu.MANAGE_ACCESS&&e.payload.menuState.type!==_.gu.LOGIN_REQUIRED||t.selectedExtensionID===(0,b.wv)(e.payload.installation)?e.payload.menuState.type!==_.gu.MANAGE_ACCESS||r.loginID?(0,a.__assign)((0,a.__assign)({},t),{menuState:e.payload.menuState,selectedExtensionID:(0,b.wv)(e.payload.installation)}):(0,a.__assign)((0,a.__assign)({},t),{menuState:n.addOnDestroyCallbackToMenuState(e.payload.menuState),selectedExtensionID:(0,b.wv)(e.payload.installation)}):t;case i.SET_PLAYER_MENU_STATE:return(0,a.__assign)((0,a.__assign)({},t),{playerMenuState:{type:e.payload.type,selectedInstallationID:e.payload.installation?(0,b.wv)(e.payload.installation):null}});default:return t}},n.getDefaultState=function(e){return e.length?(0,a.__assign)((0,a.__assign)({},w),{permissionsStates:N(e)}):w},n.updateState=function(e,t,i){void 0===i&&(i=!1);var a=n.state;n.setState((function(i){return n.computeNewState(e,i,t||n.props)}),(function(){n.handleExpiringNotification(),i||n.handleDestroyedConfirmationRequests(a),n.props.setIsMenuShowing(n.getPlayerMenuState().type!==_.gu.NONE)}))},n.handleDestroyedConfirmationRequests=function(e){var t=e.menuState;t!==n.state.menuState&&((0,_.GS)(t)||(0,_.Ns)(t)||(0,_.UE)(t))&&t.onDestroy&&t.onDestroy(t.confirmationRequest)},n.handleExpiringNotification=function(){var e=n.state.notificationState;(0,_.dD)(e)?n.createExpiringNotificationTimeout(e):n.cancelExpiringNotificationTimeout()},n.cancelExpiringNotificationTimeout=function(){n.expiringNotificationTimer&&(clearTimeout(n.expiringNotificationTimer),n.expiringNotificationTimer=0)},n.createExpiringNotificationTimeout=function(e){n.cancelExpiringNotificationTimeout(),n.expiringNotificationTimer=setTimeout(n.removeExpiringNotificationIfExpired,n.remainingExpiringNotificationTime(e))},n.removeExpiringNotificationIfExpired=function(){n.cancelExpiringNotificationTimeout();var e=n.state.notificationState;(0,_.dD)(e)&&(0===n.remainingExpiringNotificationTime(e)&&n.updateState({type:i.SET_NOTIFICATION_STATE,payload:{notificationState:{type:_._n.NONE}}}))},n.remainingExpiringNotificationTime=function(e){var t=Date.now(),n=e.expiration;return Math.max(n-t,0)},n.setNotification=function(e,t){n.updateState({type:i.SET_NOTIFICATION_STATE,payload:{notificationState:n.computeInitialNotificationState(e,t)}})},n.getNotification=function(){return n.state.notificationState},n.setOverlayVisibility=function(e){n.updateState({type:i.SET_OVERLAY_VISIBILITY,payload:{visible:e}})},n.openPopover=function(e){n.updateState({type:i.OPEN_POPOVER,payload:{installation:e}})},n.closePopover=function(e){n.updateState({type:i.CLOSE_POPOVER,payload:{installation:e}})},n.togglePopover=function(e){n.isPopoverOpen(e)?n.closePopover(e):n.openPopover(e)},n.hoverExtensionCard=function(e){var t=e&&(0,b.wv)(e);n.setState((function(e){return e.hoveredExtensionID!==t?{hoveredExtensionID:t}:null})),e&&n.trackEvent(I.X2.ExtensionDockIconHover,I.iN.DisplayHoverInfo,I.si.ExtensionDockIconHover,e)},n.setMenuState=function(e,t,a){void 0===a&&(a=!1),n.updateState({type:i.SET_MENU_STATE,payload:{menuState:n.addOnDestroyCallbackToMenuState(e),installation:t}},void 0,a)},n.setPlayerMenuState=function(e,t){n.updateState({type:i.SET_PLAYER_MENU_STATE,payload:{type:e,installation:t}})},n.addOnDestroyCallbackToMenuState=function(e){return(0,_.GS)(e)||(0,_.Ns)(e)||(0,_.UE)(e)?(0,a.__assign)((0,a.__assign)({},e),{onDestroy:function(e){e&&e.resultCallback&&e.defaultResult&&e.resultCallback(e.defaultResult)}}):e},n.reset=function(){n.updateState({type:i.RESET})},n.getMenuState=function(e){return n.state.selectedExtensionID===(0,b.wv)(e)?n.state.menuState:{type:_.gu.NONE}},n.getPlayerMenuState=function(){return n.state.playerMenuState},n.isMenuOpen=function(e){return n.state.selectedExtensionID===(0,b.wv)(e)&&n.state.menuState.type!==_.gu.NONE},n.isDockIconHovered=function(e){return n.state.hoveredExtensionID===(0,b.wv)(e)},n.isPopoverOpen=function(e){return n.state.selectedExtensionID===(0,b.wv)(e)},n.isAnyPopoverOpen=function(){return null!==n.state.selectedExtensionID},n.setPermissionsState=function(e,t){var i=(0,b.wv)(e);n.setState((function(e){var n;return{permissionsStates:(0,a.__assign)((0,a.__assign)({},e.permissionsStates),(n={},n[i]=(0,a.__assign)((0,a.__assign)({},e.permissionsStates[i]),t),n))}}))},n.trackEvent=function(e,t,i,a){var r=(0,I.w1)(i);r&&n.props.track(r,(0,I.dP)(e,t,a))},n.state=n.getDefaultState(n.installations),n}return(0,a.__extends)(t,e),Object.defineProperty(t.prototype,"installations",{get:function(){var e=this.props.extensionsForChannel;return e&&e.installedExtensions?function(e){var t=e.extensionsForChannel;return t&&t.installedExtensions?t.installedExtensions.filter((function(e){return e.activationConfig.state===o.sh.Active})):[]}(this.props):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultState",{get:function(){var e=this.props.extensionsForChannel;return e&&e.installedExtensions?(0,a.__assign)((0,a.__assign)({},w),{permissionsStates:N(this.installations)}):w},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e){T(e)!==T(this.props)&&this.reset()},t.prototype.render=function(){return(0,r.jsx)(E.iu.Provider,{value:this.computeContextProps(),children:this.props.children||null})},t}(s.Component);function x(e){return e.channelID&&e.channelID.user&&e.channelID.user.id}var L=(0,d.Zz)((0,l.Ng)((function(e){var t=(0,c.wz)(e);return{loginID:t&&t.id||void 0,isTheatreMode:e.ui.theatreModeEnabled}})),(0,f.cj)((function(e){var t,n=(0,C.wk)({playerPublicPropsContext:e});return{extensionsEnabled:null!==(t=n.enableExtensions)&&void 0!==t&&t,channelLogin:(0,S.jp)(e.content),parentChannelID:(0,S.b3)(e.content),isMini:!!n.mini,showChannelInfoOnHover:!!n.showChannelInfoOnHover}})),(0,y.c0)((function(e){return{isFullscreen:e.isFullscreen,setIsMenuShowing:e.setIsMenuShowing,videoContainer:e.videoContainer}})),(0,g.o1)(),(0,h.AP)((function(e){return{isPlaying:e.isPlaying}})),(0,v.VX)((function(e){return{isVideoAdShowing:(0,k.cz)(e.videoAdMetadata)}})),(0,m.vM)((function(e){return{isCasting:(0,m.mh)(e)}})),(0,u._v)(A(),{name:"channelID",skip:function(e){return!(e.extensionsEnabled&&e.channelLogin)},options:function(e){return{variables:{channelLogin:e.channelLogin}}}}),(0,p.Fe)({name:"extensionsForChannel",skip:function(e){return!(e.extensionsEnabled&&x(e))},options:function(e){return{variables:{channelID:e.parentChannelID||x(e)||""}}}}))(R)},248699:function(e,t,n){"use strict";var i,a,r;function o(e,t,n){return{action_type:e,action_result:t,extension_id:n.id,extension_name:n.extension.name,extension_type:n.activationConfig.anchor,extension_version:n.extension.version}}function s(e){switch(e){case r.ExtensionDockIconClick:return"extension_dock_icon_click";case r.ExtensionDockMenuOptionClick:return"extension_dock_menu_option_click";case r.ExtensionDockToolbarIconClick:return"extension_dock_toolbar_icon_click";default:return null}}n.d(t,{X2:function(){return i},dP:function(){return o},iN:function(){return a},si:function(){return r},w1:function(){return s}}),function(e){e.ToolbarLeftAngleIconClick="toolbar_left_angle_icon_click",e.ToolbarGearIconClick="toolbar_gear_icon_click",e.ToolbarXIconClick="toolbar_x_icon_click",e.MenuOptionClick="menu_option_click",e.ExtensionDockIconClick="dock_icon_click",e.ExtensionDockIconHover="dock_icon_hover"}(i||(i={})),function(e){e.MaximizeExtension="maximize_extension",e.MinimizeExtension="minimize_extension",e.BuildExtension="build_extension",e.ReportExtension="report_extension",e.ViewDetails="view_details",e.Grant="grant_access",e.Revoke="revoke_access",e.ViewMenu="view_menu",e.HideMenu="hide_menu",e.HideOverlay="hide_overlay",e.ViewOverlay="view_overlay",e.DisplayHoverInfo="display_hover_info"}(a||(a={})),function(e){e.ExtensionDockIconClick="extension_dock_icon_click",e.ExtensionDockToolbarIconClick="extension_dock_toolbar_icon_click",e.ExtensionDockMenuOptionClick="extension_dock_menu_option_click",e.ExtensionDockIconHover="extension_dock_icon_hover"}(r||(r={}))},911906:function(e,t,n){"use strict";n.d(t,{cj:function(){return c},df:function(){return v},kl:function(){return p}});var i=n(331635),a=n(474848),r=n(296540),o=n(212276),s=n(331337),l=n(854622),d={behaviors:{},callbacks:{},content:{type:o.FC.Invalid},type:s.C.Site},u=(0,l.e)("PlayerPublicPropsContext",d,(function(e){return{playerPublicPropsContext:e}})),c=u.withMemoContext,p=u.context,v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return(0,a.jsx)(p.Provider,{value:this.props,children:this.props.children||null})},t}(r.PureComponent)},293001:function(e,t,n){"use strict";n.d(t,{$_:function(){return c},BZ:function(){return u}});var i=n(854622),a=n(641896),r=n(129721),o=n(731820),s=n(334963),l={play:s.Sm.play,pause:s.Sm.pause,seek:s.Sm.seek,requestManualReset:a.Sw.requestManualReset,setVolume:s.Sm.setVolume,setMuted:s.Sm.setMuted,setQuality:s.Sm.setQuality,getPlayerMetadata:s.Sm.getPlayerMetadata,setClosedCaptionsEnabled:o._u.setClosedCaptionsEnabled,track:r._u.track},d=(0,i.e)("PublicAPIContext",l,(function(e){return{publicAPIContext:e}})),u=d.withMemoContext,c=d.context},358302:function(e,t,n){"use strict";n.d(t,{kw:function(){return u}});var i=n(296540),a=n(641896),r=n(911906),o=n(731820),s=n(605840),l=n(249448),d=n(562099);function u(){var e=c(),t=e.isClipContent,n=e.playerType,a=e.disableUserPreferencePersistence,r=p(),o=r.availableQualities,l=r.unavailableQualities,u=r.mediaPlayerInstance,m=r.selectedQuality,f=r.updateContext,g=v().setRequestedQuality;return{allQualities:(0,d.Ql)({availableQualities:o,unavailableQualities:l}),selectedQuality:m,unavailableQualities:l,setQuality:(0,i.useCallback)((function(e){u&&(f({quality:e.group,qualityBitrate:e.bitrate}),(0,d.WF)(e,u,g),a||(0,d.XF)(e,n)),(e.group===s.w_||(0,d.m)(e,o))&&(0,d.di)()}),[a,t,u,g,n,f,o])}}var c=function(){var e=(0,i.useContext)(r.kl),t=e.content,n=e.type,a=e.behaviors,o=null==a?void 0:a.disableUserPreferencePersistence;return{isClipContent:(0,l.Jn)(t),playerType:n,disableUserPreferencePersistence:o}},p=function(){var e=(0,i.useContext)(a.$g);return{availableQualities:e.availableQualities,unavailableQualities:e.unavailableQualities,mediaPlayerInstance:e.mediaPlayerInstance,selectedQuality:e.quality,updateContext:e.updateContext}},v=function(){return{setRequestedQuality:(0,i.useContext)(o._t).setRequestedQuality}}},818233:function(e,t,n){"use strict";n.d(t,{a:function(){return v}});var i=n(331635),a=n(296540),r=n(148223),o=n(233936),s=n(641896),l=n(129721),d=n(459487),u={bandwidth:0,broadcast_id:0,cluster:"",current_bitrate:0,current_fps_exact:0,current_fps:0,decoded_frames:0,dropped_frames:0,hls_latency_broadcaster:0,hls_target_duration:0,manifest_cluster:"",manifest_node_type:"",manifest_node:"",node:"",paused:!1,playing:!1,segment_protocol:"",serving_id:0,stream_time_offset:0,stream_time:0,totalMemoryNumber:0,user_ip:"",vid_display_height:0,vid_display_width:0,vid_height:0,vid_width:0,video_buffer_size:0,vod_cdn_origin:"",vod_cdn_region:"",volume:0},c=function(e){var t=e.getSessionData(),n={broadcast_id:t["BROADCAST-ID"],cluster:t.CLUSTER,manifest_cluster:t["MANIFEST-CLUSTER"],manifest_node_type:t["MANIFEST-NODE_TYPE"],manifest_node:t["MANIFEST-NODE"],node:t.NODE,segment_protocol:"https:"===window.location.protocol?"https":"http",serving_id:t["SERVING-ID"],stream_time_offset:parseFloat(t["STREAM-TIME"]||"0"),user_ip:t.USER_IP,vod_cdn_origin:t.ORIGIN,vod_cdn_region:t.REGION},a={};if(e){var r=e.getState(),o=e.getVideoBitRate()/1e3,s=e.getVideoFrameRate();a={bandwidth:o,current_bitrate:o,current_fps_exact:s,current_fps:Math.round(s),decoded_frames:e.getDecodedFrames(),dropped_frames:e.getDroppedFrames(),hls_latency_broadcaster:Math.round(1e3*e.getLiveLatency()),hls_target_duration:5,paused:r===d.p.IDLE,playing:r===d.p.PLAYING,stream_time:e.getPosition(),totalMemoryNumber:64,vid_display_height:e.getDisplayHeight(),vid_display_width:e.getDisplayWidth(),vid_height:e.getVideoHeight(),vid_width:e.getVideoWidth(),video_buffer_size:e.getBufferDuration(),volume:e.getVolume()}}return(0,i.__assign)((0,i.__assign)((0,i.__assign)({},u),n),a)},p=function(e){var t=e.adPosition,n=e.adWrapperIds,i=e.contentType,a=e.creativeId,r=e.duration,o=e.impressionTime,s=e.mediaUrl,l=e.system,d=e.title,u=e.totalAds,c=e.vastMediaBitrate,p=e.vastMediaHeight,v=e.vastMediaWidth;return{adPosition:t,adWrapperId:n?n[0]:void 0,contentType:i,creativeId:a,duration:r,impressionTime:o,mediaUrl:s,system:l,title:d,totalAds:u,vastMediaBitrate:c,vastMediaHeight:p,vastMediaWidth:v}};function v(){var e=(0,a.useContext)(s.$g).mediaPlayerInstance,t=(0,a.useContext)(o.jK).adPodStats,n=(0,a.useContext)(l.g7).track,d=(0,a.useState)(!1),u=d[0],v=d[1],m=(0,a.useState)(null),f=m[0],g=m[1],y=(0,a.useCallback)((function(){var e=(0,r.yr)(16);t.forEach((function(t){var a=(0,i.__assign)({adPodId:e},p(t));n("ad_issue_report",(0,i.__assign)({issuetype:f},a))}))}),[t,f,n]),h=(0,a.useCallback)((function(){e&&n("vid_issue_report",(0,i.__assign)({issue:f},c(e)))}),[f,e,n]),_=(0,a.useCallback)((function(){e&&f&&((null==f?void 0:f.startsWith("ad-"))?y():h(),v(!0))}),[f,e,y,h]);return{currentlySelectedIssue:f,setCurrentlySelectedIssue:g,submitReport:_,recentlySubmitted:u}}},473327:function(e,t,n){"use strict";n.d(t,{KP:function(){return d},QT:function(){return o},Qw:function(){return a},WY:function(){return u},lt:function(){return l},ni:function(){return s}});var i=n(883474),a=function(){return(0,i.hw)("Report Playback Issue","SettingsMenuItemReportPlaybackIssue")},r="SettingsMenuSubmenuReportPlaybackIssue",o=function(){return(0,i.hw)("Noticed a video playback issue? Let us know!",r)},s=function(){return(0,i.hw)("Select",r)},l=[{value:"stutter-both",text:function(){return(0,i.hw)("Audio and video stutter",r)}},{value:"stutter-video",text:function(){return(0,i.hw)("Video stutters, but audio is fine",r)}},{value:"black-screen",text:function(){return(0,i.hw)("Video is completely black or doesn't load",r)}},{value:"av-desync",text:function(){return(0,i.hw)("Audio and video aren't synced",r)}},{value:"fullscreen-broken",text:function(){return(0,i.hw)("Fullscreen playback doesn't work",r)}},{value:"ad-broken",text:function(){return(0,i.hw)("Advertisement playback doesn't work.",r)}},{value:"ad-repeat",text:function(){return(0,i.hw)("Advertisement has played too many times.",r)}},{value:"ad-offensive-inappropriate",text:function(){return(0,i.hw)("Advertisement is offensive or inappropriate.",r)}},{value:"ad-too-loud",text:function(){return(0,i.hw)("Advertisement is too loud.",r)}},{value:"ad-not-relevant",text:function(){return(0,i.hw)("Advertisement is not relevant to my interests.",r)}}],d=function(){return(0,i.hw)("Submit",r)},u=function(){return(0,i.hw)("Thanks for your report",r)}},98100:function(e,t,n){"use strict";n.d(t,{W:function(){return Qr}});var i=n(331635),a=n(474848),r=n(296540),o=n(868238),s=n(883474),l=n(757245),d=n(148223),u=n(455600),c=n(415044),p=n(997942),v=n(508952),m=n(102203),f=n(263787),g=n(657789),y=n(514105),h=n(641896),_=n(911906),k=n(334963),S=n(292241),C=n(459487),b=n(300457),P=n(894320),A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onPlayerStateChange=function(e){t.maybeSetActivePlayerRef(e===C.p.PLAYING,e===C.p.IDLE)},t.onAdStateChange=function(e){var n=e===S.V.Resumed||e===S.V.Started,i=e===S.V.Paused;t.maybeSetActivePlayerRef(n,i)},t.maybeSetActivePlayerRef=function(e,n){var i=t.props.playerRefID===t.props.activeVideoPlayerRefID;e&&!i&&t.props.reportPlayerInstanceStarted(t.props.playerRefID),n&&i&&t.props.reportPlayerInstanceStarted(void 0)},t}return(0,i.__extends)(t,e),t.prototype.componentDidUpdate=function(e){e.activeVideoPlayerRefID!==this.props.activeVideoPlayerRefID&&this.props.activeVideoPlayerRefID&&this.props.activeVideoPlayerRefID!==this.props.playerRefID&&this.props.isPlaying&&this.props.exclusivePlayback&&this.props.pause()},t.prototype.componentDidMount=function(){var e=this;[C.p.IDLE,C.p.PLAYING].forEach((function(t){e.props.playerEvents.addEventListener(t,(function(){return e.onPlayerStateChange(t)}))})),[S.V.Paused,S.V.Started,S.V.Resumed].forEach((function(t){e.props.adEvents.addEventListener(t,(function(){return e.onAdStateChange(t)}))}))},t.prototype.render=function(){return null},t}(r.Component),E=(0,o.Zz)((0,c.Ng)((function(e){return{activeVideoPlayerRefID:(0,b.LG)(e)}}),(function(e){return(0,o.zH)({reportPlayerInstanceStarted:f.A},e)})),(0,k.AP)((function(e){var t=e.isPlaying,n=e.pause;return{isPlaying:t,pause:n}})),(0,h.dd)((function(e){var t=e.playerRefID;return{playerRefID:t}})),(0,_.cj)((function(e){return{exclusivePlayback:!!(0,P.wk)({playerPublicPropsContext:e}).exclusivePlayback}})),(0,y.X)(),(0,g.O)())(A);var I=function(e){return function(e){var t=e.playerId,n=(0,c.d4)(b.LG),i=(0,c.wA)(),a=(0,r.useRef)(n);(0,r.useEffect)((function(){a.current=n}),[n]);var o=(0,r.useRef)(t);(0,r.useEffect)((function(){o.current=t}),[t]),(0,r.useEffect)((function(){return function(){o.current===a.current&&i((0,f.A)(void 0))}}),[i])}(e),null},T=n(225745);function D(){return document.visibilityState}function N(e){return window.addEventListener("visibilitychange",e),function(){window.removeEventListener("visibilitychange",e)}}var w=function(){return(0,r.useSyncExternalStore)(N,D)},R=n(176061),x=n(26576),L=n(233936),F=n(947153),M=function(){var e=(0,r.useRef)(void 0),t=(0,r.useRef)(void 0),n=(0,r.useRef)(void 0),i=(0,r.useContext)(h.$g),a=i.muted,o=i.playSessionId,l=(0,r.useContext)(L.jK).videoAdMetadata,d="hidden"===w(),u=!!a,c=function(e,t,i,a,r){s.E5.track("player_state_update",{play_session_id:e,video_session_id:t,muted:i,hidden:a,video_session_active:r,creative_id:n.current})},p=(0,r.useCallback)((function(n){var i,a=null===(i=n.sessionData)||void 0===i?void 0:i["VIDEO-SESSION-ID"];!a&&e.current&&t.current&&c(t.current,e.current,u,d,!1),o&&a&&a!==e.current&&o!==t.current&&(c(o,a,u,d,!0),e.current=a,t.current=o)}),[u,d,o]);(0,x.p)(F.a.SESSION_DATA,p);var v=(0,r.useRef)((0,R.s)((function(n,i){t.current&&e.current&&c(t.current,e.current,n,i,!0)}),500,{leading:!0,trailing:!0})).current;return(0,r.useEffect)((function(){t.current&&e.current&&v(u,d)}),[u,d,v]),(0,r.useEffect)((function(){l&&l.stitched?n.current=l.creativeId:n.current=void 0}),[l]),(0,T.i)((function(){v.flush(),t.current&&e.current&&c(t.current,e.current,u,d,!1)})),null},V=n(29896),O=n(664865),U=n(249448),B=n(514492),j=n.n(B),q=function(){var e=(0,V.n_)(j())[0],t=(0,r.useContext)(h.$g).logger,n=(0,r.useRef)(t.withCategory("clips-update-view-count")),a=(0,r.useContext)(_.kl).content,o=(0,U.Qc)(a),s=(0,U.Jn)(a),l=(0,r.useCallback)((function(t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){var a;return(0,i.__generator)(this,(function(r){switch(r.label){case 0:if("video-play"!==t.name||!s||!o)return[3,4];n.current.debug("incrementing clip view count",o),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e((0,i.__assign)({},(0,O.AR)({slug:o})))];case 2:return r.sent(),[3,4];case 3:return a=r.sent(),n.current.warn("Failed to increment clip view count.",a),[3,4];case 4:return[2]}}))}))}),[o,s,e]);return(0,x.p)(F.a.ANALYTICS_EVENT,l),null},G=function(e){return e.isClip?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(q,{})}):null},H=n(276337),K=n(73849),z=n(584074),W=n(212276),Q=n(782426),Z=n(798747),Y=n.n(Z),X=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.logger=s.x2.logger.withCategory("CollectionManagerComponent"),t.getVodID=function(){var e,n,i,a,r;return null!==(r=null!==(e=t.props.vodID)&&void 0!==e?e:null===(a=null===(i=null===(n=t.props.data)||void 0===n?void 0:n.collection)||void 0===i?void 0:i.items.edges[0])||void 0===a?void 0:a.node.id)&&void 0!==r?r:null},t.handleEndOfVideo=function(e,n){if(n&&e){var i=function(e){var t=e.items.edges;return t.filter((function(e){return null!==e})).map((function(e){return e.node}))}(n),a=i.findIndex((function(t){return t.id===e}));if(!(a<0||i.length<=a))a0&&e<1/0}(a)&&l)if(m){if(!y||k)return void At.debug("Still waiting on GraphQL data to load");n(!1),function(e){var t,n;At.debug("Trying to resume watch as a logged in user for VOD ".concat(e.vodID));var i=e.data.video;if(!i)return void At.debug("User cannot see this video from GraphQL.");if("number"!=typeof(null===(n=null===(t=i.self)||void 0===t?void 0:t.viewingHistory)||void 0===n?void 0:n.position))return At.debug("User has saved watch times from GraphQL, but not for this VOD ".concat(e.vodID,".")),void e.mediaPlayerInstance.seekTo(.01);var a=i.self.viewingHistory.position;if(Tt(a,e.duration))return void At.debug("Resume time ".concat(a," is too close to end of VOD ").concat(e.vodID," (").concat(e.duration,")s"));At.debug("Resuming watch to ".concat(a," for VOD ").concat(e.vodID)),e.mediaPlayerInstance.seekTo(a)}({vodID:u,duration:a,data:y,mediaPlayerInstance:l})}else n(!1),function(e){At.debug("Trying to resume watch as a logged out user for VOD ".concat(e.vodID));var t=function(e){var t="v".concat(e);return s.IG.get(Ct.U.VOD_RESUME_TIMES,{})[t]}(e.vodID);if(void 0===t)return e.mediaPlayerInstance.seekTo(.01),void At.debug("No resume time found in local storage for VOD ".concat(e.vodID));if(Tt(t,e.duration))return void At.debug("Resume time ".concat(t," is too close to end of VOD ").concat(e.vodID," (").concat(e.duration,")s"));At.debug("Resuming watch to ".concat(t," for VOD ").concat(e.vodID)),e.mediaPlayerInstance.seekTo(t)}({vodID:u,duration:a,mediaPlayerInstance:l})}),[t,m,u,y,k,l,a]),null};var It=120;function Tt(e,t){return t-eo.bottom)r!==Ut.Fc.Once||t.hasEverPausedFromBeingOutsideViewPort||(t.pausePlayer(),t.unregisterScrollListener()),r===Ut.Fc.Always&&t.pausePlayer()}},t.pausePlayer=function(){t.hasEverPausedFromBeingOutsideViewPort=!0,t.props.pause()},t.unregisterScrollListener=function(){t.unregister&&t.unregister()},t}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.pausingBehavior&&(this.unregister=this.props.registerReceiver(this))},t.prototype.componentDidUpdate=function(e){!e.pausingBehavior&&this.props.pausingBehavior&&(this.unregister=this.props.registerReceiver(this))},t.prototype.componentWillUnmount=function(){this.unregisterScrollListener()},t.prototype.render=function(){return null},t}(r.Component),jt=(0,o.Zz)((0,ft.c0)((function(e){var t=e.videoContainer;return{videoContainer:t}})),(0,k.AP)((function(e){var t=e.isPlaying,n=e.pause;return{isPlaying:t,pause:n}})),(0,_.cj)((function(e){return{pausingBehavior:(0,P.wk)({playerPublicPropsContext:e}).pauseWhenNotInViewport}})),(0,Ot.UJ)((function(e){return{registerReceiver:e.registerReceiver}})))(Bt);var qt=n(574751),Gt=n.n(qt),Ht=s.x2.logger.withCategory("StreamRefetchManagerComponent"),Kt=[6e4,3e5,6e5,9e5];function zt(e){var t=e&&e.getSessionData();return t&&t["BROADCAST-ID"]}var Wt=(0,o.Zz)((0,h.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance,isPlayerCoreLoading:e.isPlayerCoreLoading}})),(0,_.cj)((function(e){var t=e.content;return{isLive:(0,U.DG)(t),channelLogin:(0,U.DG)(t)?t.channelLogin:void 0}})),(0,H._v)(Gt(),{options:function(e){return{variables:{channel:e.channelLogin}}},skip:function(e){return!e.isLive}}))((function(e){var t=(0,r.useRef)(""),n=(0,r.useRef)(!0),a=e.mediaPlayerInstance,o=e.isPlayerCoreLoading,s=(0,r.useState)((function(){return zt(a)})),l=s[0],u=s[1],c=(0,r.useRef)(!1),p=e.data&&e.data.user&&e.data.user.stream&&e.data.user.stream.id||void 0,v=e.data&&e.data.refetch,m=!(!e.data||!e.data.loading),f=(0,r.useCallback)((function(){Ht.debug("set broadcast id",{id:zt(a)}),u(zt(a))}),[a,u]);return(0,r.useEffect)((function(){var e;return t.current=(0,d.k3)(),Ht.debug("running the effect",{isLoading:m,gqlBroadcastId:p,playerCoreBroadcastID:l,effectId:t.current,isPlayerCoreLoading:o}),m||o||p===l||!v?p===l&&(Ht.debug("ID stabilized",{effectId:t.current,gqlBroadcastId:p,playerCoreBroadcastID:l}),n.current=!1):(c.current=!0,(0,i.__awaiter)(void 0,void 0,void 0,(function(){function a(){return(0,i.__awaiter)(this,arguments,void 0,(function(n){var r,o;return void 0===n&&(n=0),(0,i.__generator)(this,(function(i){switch(i.label){case 0:return v?(Ht.debug("refetch",{retryNumber:n}),r=t.current,[4,v().catch((function(){return Ht.warn("gql error")}))]):(Ht.errorAndReport(new Error("refetch function is missing"),"refetch function is missing"),[2,void 0]);case 1:return o=i.sent(),r!==t.current?(Ht.debug("got results from a refetch, but discarding them as the effect closed over it was torn down",{effectIdForThisRequest:r,effectId:t.current,retryNumber:n}),[2]):p!==l?[2,new Promise((function(i,o){Ht.debug("IDs do not match, setting a timeout to do a retry",{effectIdForThisRequest:r,effectId:t.current,retryNumber:n,timeout:Kt[n],gqlBroadcastId:p,playerCoreBroadcastID:l}),e=setTimeout((function(){a(n+1).then(i,o)}),(n>=Kt.length-1?Kt[Kt.length-1]:Kt[n])+12e4*Math.random()-6e4)}))]:(Ht.debug("ID stabilized",{effectIdForThisRequest:r,effectId:t.current,retryNumber:n,timeout:Kt[n],gqlBroadcastId:p,playerCoreBroadcastID:l,result:o}),[2,o])}}))}))}return(0,i.__generator)(this,(function(i){return Ht.debug("broadcast ID mismatch, polling for new ID",{gqlBroadcastId:p,playerCoreBroadcastID:l,effectId:t.current,isPlayerCoreLoading:o}),n.current?(e=setTimeout((function(){return a()}),Kt[0]),n.current=!1):a(),c.current=!1,[2]}))}))),function(){Ht.debug("something changed, tearing down effect",{effectId:t.current}),clearTimeout(e)}}),[f,p,a,v,l,m,o]),(0,x.p)(F.a.DURATION_CHANGED,(function(){Ht.debug("duration changed"),f()})),(0,x.p)(C.p.ENDED,(function(){Ht.debug("ended"),u(void 0)})),(0,x.p)(F.a.ERROR,(function(){Ht.debug("error"),f()})),null})),Qt=n(735319),Zt=n.n(Qt);var Yt=(0,o.Zz)((0,_.cj)((function(e){var t=e.content;return{isLiveContent:(0,U.DG)(t),channelLogin:(0,U.hd)(t)||"",videoID:(0,U.hq)(t)||"",content:t}})),(0,H._v)(Zt(),{name:"channelData",skip:function(e){var t=e.isLiveContent,n=e.channelLogin;return!t||!n},options:function(e){return{variables:{channel:e.channelLogin}}}}))((function(e){var t=e.isLiveContent,n=e.content,i=(0,r.useContext)(h.$g),a=i.isOffline,o=i.hasPlayed,s=(0,r.useContext)(Be.g7).track,l=(0,r.useRef)(n),d=function(e){var t,n,i,a=e.channelData;if(a&&!a.loading&&!a.error)return(null===(i=null===(n=null===(t=a.user)||void 0===t?void 0:t.stream)||void 0===n?void 0:n.freeformTags)||void 0===i?void 0:i.map((function(e){return e.name})))||null;return null}(e),u=(0,r.useRef)(d),c=(0,r.useRef)(!1);(0,tt.jL)(n,l.current)&&(c.current=!1),l.current=n;var p=(0,r.useCallback)((function(){c.current=!0,s("play_session_tags",{freeform_tag_stream:u.current?JSON.stringify(u.current):null})}),[s]),v=o&&d&&(t&&!a);return(0,r.useEffect)((function(){if(v){var e,t,n=(e=u.current,t=d,!(!e&&!t||e&&!e.length&&t&&!t.length||e&&t&&e.length===t.length&&e.every((function(e){return t.includes(e)}))));n&&(u.current=d);var i=n&&c.current;c.current&&!i||p()}}),[v,d,p]),null}));var Xt=n(638230),$t=n(104199),Jt="video_ads.stream_loudness";var en,tn=function(e){var t=(0,r.useRef)(e);t.current=e,(0,r.useEffect)((function(){var e=function(){var e;t.current&&(e=t.current,s.IG.set(Jt,e))},n=setInterval(e,3e4);return e(),function(){clearInterval(n),e()}}),[])},nn="TXXX";function an(e){var t=e.filter(rn),n=t.length&&t[0];if(!n||!n.info||!n.info.length)return null;try{var i=JSON.parse(n.info[0]);return{cmd:i.cmd,stream_loudness:i.stream_loudness,length:i.length,commercial_id:i.commercial_id,splice_event_id:i.splice_event_id,avail_num:i.avail_num}}catch(e){return null}}function rn(e){return e.id===nn}!function(e){e.BeginAdPod="BeginAdPod",e.DurationThreshold="DurationThreshold",e.ResetAdPod="ResetAdPod",e.ResetContext="ResetContext",e.StreamLoudness="StreamLoudness"}(en||(en={}));var on=n(279528);function sn(e,t){switch(t.update){case en.BeginAdPod:return(0,i.__assign)((0,i.__assign)({},e),{preAdPodVolume:t.volume,preAdPodMuted:t.muted});case en.DurationThreshold:return(0,i.__assign)((0,i.__assign)({},e),{reachedDurationThreshold:!0});case en.ResetAdPod:return(0,i.__assign)((0,i.__assign)({},e),{preAdPodVolume:null,preAdPodMuted:null});case en.ResetContext:return(0,i.__assign)({},on._u);case en.StreamLoudness:return(0,i.__assign)((0,i.__assign)({},e),{streamLoudness:t.next});default:return e}}var ln,dn=function(e){var t=r.useContext(_.kl).content,n=r.useReducer(sn,(0,i.__assign)((0,i.__assign)({},on._u),{streamLoudness:s.IG.getOptional(Jt)})),o=n[0],l=n[1];return(0,a.jsxs)(on.s_.Provider,{value:o,children:[((0,U.DG)(t)||(0,U.wy)(t))&&(0,a.jsx)(un,{state:o,dispatch:l}),e.children]})},un=function(e){var t=e.state,n=e.dispatch;return cn(n,t),pn(n,t),r.useEffect((function(){return function(){n({update:en.ResetContext})}}),[n]),null},cn=function(e,t){var n=t.streamLoudness,i=t.reachedDurationThreshold;tn(n),(0,x.p)(ze.ID3,r.useCallback((function(t){var n,a=null!==(n=function(e){var t=an(e);return t&&t.stream_loudness||void 0}(t))&&void 0!==n?n:(0,$t.K)();a&&i&&e({update:en.StreamLoudness,next:{loudness:a,timestamp:Date.now()}})}),[i,e])),r.useEffect((function(){var t=setTimeout((function(){e({update:en.DurationThreshold})}),5e3);return function(){return clearTimeout(t)}}),[e])},pn=function(e,t){var n=r.useContext(L.jK),i=n.adFormatMetadata,a=n.videoAdMetadata,o=r.useContext(h.$g),s=o.volume,l=o.muted,d=t.preAdPodMuted,u=t.preAdPodVolume,c=(0,Qe.EF)(a)||(0,Qe.hr)(i);r.useEffect((function(){c?null===d&&null===u&&e({update:en.BeginAdPod,volume:s||0,muted:!!l}):e({update:en.ResetAdPod})}),[c,s,l,d,u,e])},vn=n(697621),mn=n(164557),fn=n(588547),gn=n(747512),yn=n(826094),hn=n(603191),_n=n(697864),kn=n(331536),Sn=n(192118),Cn=n(553428),bn=n(358020),Pn=n(687866),An=n.n(Pn),En=60,In=3e5,Tn=3e4,Dn="broadcaster";function Nn(e){return(0,i.__awaiter)(this,void 0,Promise,(function(){var t,n,a;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return[4,Fn(e)];case 1:return t=i.sent(),n=function(e){var t=e.request,n=e.props,i=new Set,a=_e.parse(window.location.search),r=Date.now(),o=n.video,s=n.broadcaster,l=n.currentUser,d=t.roll===Me.df.Pre,u=t.roll===Me.df.Mid,c=t.roll===Me.df.Post,p=(0,Cn.B2)(),v=(0,Cn.tb)(),m=s&&s.adProperties;n.declineVideoAdsReason&&i.add(n.declineVideoAdsReason);t.roll===Me.df.Pre&&n.content.type===W.FC.Live&&l&&s&&l.id===s.id&&i.add(Sn.k.BroadcasterPreroll);o&&o.lengthSeconds&&o.lengthSeconds0)return a[0]}return e.video}function ti(e){var t=Jn(e),n=ei(e);return n?n.game:(null==t?void 0:t.stream)?t.stream.game:void 0}function ni(e){var t=Jn(e),n=t&&t.adProperties;if(n)return n.adServerDefault||S.K.DFP}var ii=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=this.props.adFormatRequest;return e&&(0,vn.rF)(e.adFormat)?(0,a.jsx)($n,(0,i.__assign)({},this.props)):this.props.loading?null:(0,a.jsx)(qn,(0,i.__assign)({},this.props))},t}(r.Component),ai=(0,o.Zz)((0,_.cj)((function(e){var t=(0,P.wk)({playerPublicPropsContext:e});return{content:e.content,declineVideoAdsReason:t.declineVideoAdsReason,embeddedPromotionalVOD:t.embeddedPromotionalVOD,playerType:e.type,embed:!!t.embed,disableAutoplay:t.disableAutoplay,mini:!!t.mini}})),(0,L.VX)((function(e){var t=e.adFormatRequest,n=e.processAdRequest,i=e.setRadToken,a=e.reset,r=e.videoAdMetadata,o=(0,Qe.lq)(r)&&r||void 0;return{adFormatRequest:t,reset:a,setRadToken:i,processAdRequest:n,stitchedAdMetadata:o}})),(0,H._v)(Hn(),{props:function(e){return{broadcaster:(t=e.data)&&Jn(t)||null,currentUser:t&&t.currentUser||null,error:t&&t.error,game:t&&ti(t)||null,inputVariables:t&&t.variables,loading:!(!t||!t.loading),server:t&&ni(t),video:t&&ei(t)||null};var t},options:function(e){var t=e.content;return{variables:{isLive:!!(0,U.DG)(t),login:(0,U.hd)(t)||"",isVOD:!!(0,U.wy)(t)||!(!(0,U.P3)(t)||!t.vodID),vodID:(0,U.hq)(t)||"",isCollection:!!(0,U.P3)(t)&&!t.vodID,collectionID:!(0,U.hq)(t)&&(0,U.Eq)(t)||""}}}}))(ii);var ri,oi=n(12109),si=n(528461),li=n(929843),di=n(558148),ui=n(440961),ci=n(540325),pi=n(975928),vi=n(332884),mi=n(850007),fi=n(727925),gi=n(989071),yi=n(650989),hi=s.vF.withCategory("stream-display-ad");!function(e){e.Start="START",e.End="END",e.Abort="ABORT"}(ri||(ri={}));var _i=1e3,ki=function(e){return e===Fe.gz.LEFT_THIRD?Fe.gz[e]:Fe.Z$[e]};function Si(e){var t=r.useState(!1),n=t[0],a=t[1],o=r.useState(0),s=o[0],l=o[1],d=r.useRef(void 0),u=r.useRef(!1),c=e.trackAdFormatData,p=e.trackAdFormatRAdEvent,v=r.useContext(ft._t).setIsMenuShowing,m=r.useContext(_.kl).behaviors,f=(0,ke.If)(),g=r.useContext(L.jK),y=g.adFormatRequest,h=g.adFormatMetadata,k=g.reset,S=g.resetOutstreamAd,C=g.startClientSideAd,b=g.updateOutstreamAdDisplayStatus,P=g.videoAdMetadata,A=g.isDisplayingSDASequence,E=g.updateSDAHiddenState,I=g.isSDAContainerHidden,T=r.useRef(null),D=r.useRef(null),N=r.useState(1),w=N[0],R=N[1],x=r.useRef(w),F=r.useState(yi.bi.Default),M=F[0],V=F[1],O=r.useState(!1),U=O[0],B=O[1],j=r.useRef(M);r.useEffect((function(){j.current=M}),[M]);var q=(0,pi.JK)()||(0,pi.FP)(),G=(0,ci.fs)(),H=r.useRef();H.current=(0,Qe.I9)(h)?h.adFormat===Fe.Z$.LOWER_THIRD?yi.bi[M]:yi.bi[yi.bi.InVideo]:void 0;var K=r.useMemo((function(){return function(e){if(e===Fe.Z$.PAUSE_ADS)return Fe.Z$.SQUEEZEBACK;if(!(0,vn.rW)(e))return Fe.Z$.SQUEEZEBACK;return e}((null==h?void 0:h.adFormat)||(null==y?void 0:y.adFormat))}),[null==h?void 0:h.adFormat,null==y?void 0:y.adFormat]),z=r.useState({}),W=z[0],Q=z[1],Z=r.useCallback((function(e){hi.debug("reporting mount of ".concat(e.format?ki(e.format):void 0," format, ").concat(yi.bi[e.mode||yi.bi.Default]," mode, ").concat(e.isSkyscraper?"skyscraper":"non-skyscraper"," SDA component")),Q(e)}),[]),Y=r.useCallback((function(e){hi.debug("reporting unmount of ".concat(e.format?ki(e.format):void 0," format, ").concat(yi.bi[e.mode||yi.bi.Default]," mode, ").concat(e.isSkyscraper?"skyscraper":"non-skyscraper"," SDA component")),Q((function(t){return e.format===t.format&&e.mode===t.mode&&e.isSkyscraper===t.isSkyscraper?{}:t}))}),[]),X=r.useRef({}),$=r.useCallback((function(e){if((0,oi.fX)("nab_gate")&&void 0!==f&&!ke.l$.has(f)){var t=function(e){return!(!e||!e.offsetParent)}(e);t?c("nab_detection",(0,i.__assign)((0,i.__assign)({},X.current),{nab_value:"1",client_country_code:f})):(c("nab_detection",(0,i.__assign)((0,i.__assign)({},X.current),{nab_value:"3",client_country_code:f})),E(!0))}}),[f,c,E]);r.useEffect((function(){x.current=w}),[w]);var J=r.useCallback((function(){R((function(e){return e%2+1}))}),[]),ee=r.useCallback((function(){return x.current%2?T.current:D.current}),[]),te=r.useCallback((function(){return x.current%2?D.current:T.current}),[]),ne=r.useCallback((function(e){e&&(e.src="proxy.php?url=about:blank",e.srcdoc="")}),[]),ie=h,ae=r.useMemo((function(){return null==ie?void 0:ie.bid}),[null==ie?void 0:ie.bid]),re=r.useMemo((function(){return(0,mi.F)(K,ae)}),[ae,K]),oe=r.useMemo((function(){return(0,fi.Ny)(re)}),[re]),se=r.useMemo((function(){if(null==ie?void 0:ie.bid)return Date.now()+1e3*((null==ie?void 0:ie.duration)||0)}),[null==ie?void 0:ie.duration,null==ie?void 0:ie.bid]),le=r.useCallback((function(){var e=(0,oi.fX)("sda_dynamic_durations"),t=1e3*((null==ie?void 0:ie.duration)||0);if(!e||void 0===se)return hi.debug("Using default SDA duration of ".concat(t)),t;var n=Math.max(2e3,Math.min(se-Date.now(),t));return hi.debug("Using updated SDA duration of ".concat(n)),n}),[se,null==ie?void 0:ie.duration]),de=r.useCallback((function(e){X.current=e||{}}),[]),ue=r.useState(!0),ce=ue[0],pe=ue[1],ve=r.useRef(0),me=r.useCallback((function(){v(!1),a(!1),l(0),pe(!0),de(void 0),clearInterval(d.current)}),[v,a,l,de]),fe=r.useRef(""),ge=r.useState(!1),ye=ge[0],he=ge[1];r.useEffect((function(){ye&&(me(),(null==P?void 0:P.stitched)?S():k(),c("stream_display_ad_visibility_state",(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null==ae?void 0:ae.width,"x").concat(null==ae?void 0:ae.height),state:ri.Abort,format_name:(0,Fe.uN)(K,null==ae?void 0:ae.isPauseAd),sub_format_name:(0,vi.Fn)(K,null==ae?void 0:ae.height,null==ae?void 0:ae.width,null==ae?void 0:ae.isPauseAd),abort_reason:"Error",error:fe.current})),he(!1))}),[me,null==ae?void 0:ae.height,null==ae?void 0:ae.width,ye,k,S,K,c,null==P?void 0:P.stitched]),r.useEffect((function(){y&&y.status===Me.sC.Filled&&(0,Qe.I9)(ie)&&(null==m?void 0:m.mini)&&(me(),k(),c("stream_display_ad_visibility_state",(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null==ae?void 0:ae.width,"x").concat(null==ae?void 0:ae.height),state:ri.Abort,abort_reason:"MINI",format_name:(0,Fe.uN)(K,null==ae?void 0:ae.isPauseAd),sub_format_name:(0,vi.Fn)(K,null==ae?void 0:ae.height,null==ae?void 0:ae.width,null==ae?void 0:ae.isPauseAd)})))}),[y,null==m?void 0:m.mini,me,ae,k,K,ie,c]),r.useEffect((function(){y&&y.status===Me.sC.Filled&&(0,Qe.I9)(ie)&&(null==P?void 0:P.stitched)&&(me(),S(),c("stream_display_ad_visibility_state",(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null==ae?void 0:ae.width,"x").concat(null==ae?void 0:ae.height),state:ri.Abort,abort_reason:"SureStream",format_name:(0,Fe.uN)(K,null==ae?void 0:ae.isPauseAd),sub_format_name:(0,vi.Fn)(K,null==ae?void 0:ae.height,null==ae?void 0:ae.width,null==ae?void 0:ae.isPauseAd)})))}),[y,me,ae,S,K,ie,c,null==P?void 0:P.stitched]),r.useEffect((function(){q&&y&&y.status===Me.sC.Filled&&(0,Qe.I9)(ie)&&ie.adFormat===Fe.gz.LEFT_THIRD&&!G&&(me(),k(),c("stream_display_ad_visibility_state",(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null==ae?void 0:ae.width,"x").concat(null==ae?void 0:ae.height),state:ri.Abort,abort_reason:"portrait",sub_format_name:(0,vi.Fn)(K,null==ae?void 0:ae.height,null==ae?void 0:ae.width)})))}),[y,me,ae,G,q,k,K,ie,c]);var _e=(0,Ne.Z)(M);r.useEffect((function(){y&&y.status===Me.sC.Filled&&(0,Qe.I9)(ie)&&ie.adFormat===Fe.Z$.LOWER_THIRD&&void 0!==_e&&_e!==M&&(me(),k(),c("stream_display_ad_visibility_state",(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null==ae?void 0:ae.width,"x").concat(null==ae?void 0:ae.height),state:ri.Abort,abort_reason:"PushdownEligibilityChanged",format_name:(0,Fe.uN)(K,null==ae?void 0:ae.isPauseAd),sub_format_name:(0,vi.Fn)(K,null==ae?void 0:ae.height,null==ae?void 0:ae.width,null==ae?void 0:ae.isPauseAd)})))}),[y,me,null==ae?void 0:ae.height,null==ae?void 0:ae.width,M,_e,k,K,ie,c]),r.useEffect((function(){(null==ae?void 0:ae.creativeHtml)&&n&&"visible"===(null==ie?void 0:ie.status)&&a(!1)}),[ae,n,null==ie?void 0:ie.status]);var Se=r.useCallback((function(){var e,t,n,i=(0,Fe.uN)(K),a=(null==ie?void 0:ie.duration)||0,r=(null===(e=null==ie?void 0:ie.trackingParams)||void 0===e?void 0:e.sda_sequence_length)||1,o=a*r;1!==(null===(t=null==ie?void 0:ie.trackingParams)||void 0===t?void 0:t.sda_sequence_number)&&(null===(n=null==ie?void 0:ie.trackingParams)||void 0===n?void 0:n.sda_sequence_number)||(0,Le.qA)("ad_pod_start",{ad_pod_duration:o,num_ads_in_pod:r}),(0,Le.qA)("".concat(i.toLowerCase(),"_ad_start"),{ad_pod_duration:o,num_ads_in_pod:r,current_ad_duration:a})}),[K,null==ie?void 0:ie.duration,null==ie?void 0:ie.trackingParams]);r.useEffect((function(){var e=te();if(y&&y.status===Me.sC.Filled&&(0,Qe.I9)(ie)&&e){var t=K!==Fe.Z$.LOWER_THIRD||M===W.mode||M===yi.bi.Default&&W.mode===yi.bi.InVideo,r=K!==Fe.Z$.SQUEEZEBACK||oe===W.isSkyscraper;K===W.format&&t&&r&&!u.current&&!n&&ce&&(null==ie?void 0:ie.bid)&&"ready"===(null==ie?void 0:ie.status)&&(hi.debug("rendering the ad in the new location ".concat(W.format?ki(W.format):void 0," format, ").concat(yi.bi[W.mode||yi.bi.Default]," mode, ").concat(W.isSkyscraper?"skyscraper":"non-skyscraper"," SDA component")),ne(e),de(null==ie?void 0:ie.trackingParams),(null==ae?void 0:ae.creativeHtml)&&(u.current=!0,si.F.renderCreative(ae,e,c,!1,ki(ie.adFormat),(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null==ae?void 0:ae.width,"x").concat(null==ae?void 0:ae.height),pushdown_mode:H.current})).then((function(){var t,n;1!==(null===(t=null==ie?void 0:ie.trackingParams)||void 0===t?void 0:t.sda_sequence_number)&&(null===(n=null==ie?void 0:ie.trackingParams)||void 0===n?void 0:n.sda_sequence_number)||$(e),Se(),p(gi.V.AdImpression,(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null==ae?void 0:ae.width,"x").concat(null==ae?void 0:ae.height),pushdown_mode:H.current})),(0,ui.flushSync)((function(){a(!0)})),(0,ui.flushSync)((function(){pe(!1)})),(0,ui.flushSync)((function(){l(0)})),(0,ui.flushSync)((function(){J()}))})).catch((function(e){hi.warn(e),fe.current=(0,yn.d)(e,{useRawMessage:!0})||"caught an error while rendering an SDA",he(!0)})).finally((function(){u.current=!1}))))}}),[W.format,W.isSkyscraper,W.mode,ce,y,ne,ae,A,oe,te,K,M,E,n,ie,J,c,p,de,I,f,$,Se]),r.useEffect((function(){if(n&&"ready"===(null==ie?void 0:ie.status)){var e=setTimeout((function(){C({adFormat:ie.adFormat,position:ie.adPosition,numberOfAds:1}),v(!1)}),0);return function(){return clearTimeout(e)}}}),[v,null==ie?void 0:ie.status,null==ie?void 0:ie.adFormat,null==ie?void 0:ie.adPosition,n,C]),r.useEffect((function(){if("visible"===(null==ie?void 0:ie.status)){var e=le(),t=setTimeout((function(){b("hiding")}),e);return clearInterval(d.current),d.current=setInterval((function(){return l((function(e){return e+1}))}),(e-600)/4),function(){return clearTimeout(t)}}}),[null==ie?void 0:ie.status,null==ie?void 0:ie.duration,b,le]),r.useEffect((function(){if(!A&&"hiding"===(null==ie?void 0:ie.status)){var e=setTimeout((function(){me(),k()}),_i);return function(){return clearTimeout(e)}}}),[me,k,A,null==ie?void 0:ie.status]);var Ce=r.useCallback((function(){var e,t,n,i=(0,Fe.uN)(K),a=(null==ie?void 0:ie.duration)||0,r=(null===(e=null==ie?void 0:ie.trackingParams)||void 0===e?void 0:e.sda_sequence_length)||1,o=a*r;(0,Le.qA)("".concat(i.toLowerCase(),"_ad_end"),{ad_pod_duration:o,num_ads_in_pod:r,current_ad_duration:a}),(null===(t=null==ie?void 0:ie.trackingParams)||void 0===t?void 0:t.sda_sequence_number)!==r&&(null===(n=null==ie?void 0:ie.trackingParams)||void 0===n?void 0:n.sda_sequence_number)||(0,Le.qA)("ad_pod_end",{ad_pod_duration:o,num_ads_in_pod:r})}),[K,null==ie?void 0:ie.duration,null==ie?void 0:ie.trackingParams]);r.useEffect((function(){"visible"===(null==ie?void 0:ie.status)?c("stream_display_ad_visibility_state",(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null==ae?void 0:ae.width,"x").concat(null==ae?void 0:ae.height),state:ri.Start,format_name:(0,Fe.uN)(K,null==ae?void 0:ae.isPauseAd),sub_format_name:(0,vi.Fn)(K,null==ae?void 0:ae.height,null==ae?void 0:ae.width),pushdown_mode:H.current})):"hiding"===(null==ie?void 0:ie.status)&&(c("stream_display_ad_visibility_state",(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null==ae?void 0:ae.width,"x").concat(null==ae?void 0:ae.height),state:ri.End,format_name:(0,Fe.uN)(K,null==ae?void 0:ae.isPauseAd),sub_format_name:(0,vi.Fn)(K,null==ae?void 0:ae.height,null==ae?void 0:ae.width),pushdown_mode:H.current})),Ce())}),[ae,c,null==ie?void 0:ie.status,null==ie?void 0:ie.bid,null==ie?void 0:ie.trackingParams,K,Ce]);var be=r.useRef(ae);r.useEffect((function(){be.current=ae}),[ae]),r.useEffect((function(){var e,t,n,a,r,o,l,u,p=ee();ve.current!==s&&(s>0&&s<=4&&p&&(c("ad_quartile",(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null===(e=be.current)||void 0===e?void 0:e.width,"x").concat(null===(t=be.current)||void 0===t?void 0:t.height),sub_format_name:(0,vi.Fn)(K,null===(n=be.current)||void 0===n?void 0:n.height,null===(a=be.current)||void 0===a?void 0:a.width),quartile:s,pushdown_mode:H.current})),c("ad_client_quartile",(0,i.__assign)((0,i.__assign)({},X.current),{ad_size:"".concat(null===(r=be.current)||void 0===r?void 0:r.width,"x").concat(null===(o=be.current)||void 0===o?void 0:o.height),sub_format_name:(0,vi.Fn)(K,null===(l=be.current)||void 0===l?void 0:l.height,null===(u=be.current)||void 0===u?void 0:u.width),quartile:s,pushdown_mode:H.current})),ve.current=s),s>=4&&(pe(!0),clearInterval(d.current)))}),[s,c,ee,K]);var Pe=!!P,Ae=r.useRef(!1);r.useEffect((function(){(0,Qe.I9)(h)?Ae.current=!0:Ae.current&&(me(),Pe?S():k(),Ae.current=!1)}),[h,me,S,k,Pe,c]);var Ee=!!(0,Qe.I9)(h);r.useEffect((function(){Ee||(ne(T.current),ne(D.current))}),[Ee,ne]),r.useEffect((function(){w%2&&(hi.debug("clearing iframe 2"),ne(D.current)),w%2||(hi.debug("clearing iframe 1"),ne(T.current))}),[w,ne]);var Ie=r.useState(!1),Te=Ie[0],De=Ie[1];r.useEffect((function(){!Te&&(0,Qe.I9)(h)&&"visible"===h.status?De(!0):Te&&!(0,Qe.I9)(h)&&De(!1)}),[Te,h]);var we=r.useMemo((function(){return!(!(null==ie?void 0:ie.bid)||!(null==ae?void 0:ae.creativeHtml))}),[null==ae?void 0:ae.creativeHtml,null==ie?void 0:ie.bid]),Re=r.useMemo((function(){return!0===(null==ae?void 0:ae.isPauseAd)}),[null==ae?void 0:ae.isPauseAd]);return r.useMemo((function(){return{isSDASequenceVisible:Te,iframeEl1:T,iframeEl2:D,curFrame:w,hasActiveBid:we,sdaFormat:K,sdaMode:M,pushdownAvailable:U,isPauseAd:Re,setSDAMode:V,setPushdownAvailable:B,reportMount:Z,reportUnmount:Y,checkAndUpdateSDAHiddenState:$}}),[Te,w,we,K,M,U,Re,Z,Y,$])}var Ci,bi=s.vF.withCategory("useSDATimers");!function(e){e[e.Reset=0]="Reset",e[e.NextRequest=1]="NextRequest"}(Ci||(Ci={}));var Pi=s.vF.withCategory("OutstreamAdRequester"),Ai=(0,Xn.A)()((function(e){var t=e.trackAdFormatData,n=e.trackAdFormatRAdEvent,a=r.useContext(L.jK),o=a.adFormatRequest,s=a.reset,l=a.fillClientSideAd,d=a.prepareClientSideAd,u=a.transferClientSideAd,c=a.displaySDASequence,p=a.videoAdMetadata,v=a.resetOutstreamAd,m=a.updateLastSDAAdRequestBlocked,f=a.incrementSDARequestCount,g=a.updateDeclinedFormats,y=a.radToken,S=a.startClientSideAd,C=r.useContext(_.kl),b=C.behaviors,P=C.content,A=r.useContext(h.$g).mediaPlayerInstance,E=r.useContext(li.FO).onMirrorPbyPAdPodTrigger,I=r.useContext(ft._t).videoContainer,T=r.useContext(k.wL),D=T.volume,N=T.muted,w=(0,hn._t)(),R=!(!b||!b.declineVideoAdsReason),x=r.useRef(!1),F=r.useRef(!1),M=r.useRef(),V=r.useRef(""),O=r.useRef(0),U=r.useRef(0),B=r.useRef(0),j=r.useRef(0),q=r.useRef(0),G=r.useRef([]),H=r.useRef([]),K=r.useRef([]),z=r.useRef(!1);r.useEffect((function(){z.current=!!(null==p?void 0:p.stitched)}),[null==p?void 0:p.stitched]);var W=r.useRef(!1);r.useEffect((function(){W.current=!!(null==b?void 0:b.mini)}),[null==b?void 0:b.mini]);var Q=function(){var e=r.useState(void 0),t=e[0],n=e[1];r.useEffect((function(){return function(){return clearTimeout(t)}}),[t]);var i=r.useState(void 0),a=i[0],o=i[1];r.useEffect((function(){return function(){return clearTimeout(a)}}),[a]);var s=r.useCallback((function(){return void 0!==t||void 0!==a}),[t,a]);return{clearAllSDATimeouts:r.useCallback((function(){void 0!==t&&(bi.debug("Clearing the 'state reset' SDA timeout"),n(void 0)),void 0!==a&&(bi.debug("Clearing the 'next request' SDA timeout"),o(void 0))}),[t,a]),setNewSDATimeout:r.useCallback((function(e,t){e===Ci.Reset?(bi.debug("Updating the 'state reset' SDA timeout"),n(t)):e===Ci.NextRequest&&(bi.debug("Updating the 'next request' SDA timeout"),o(t))}),[]),hasActiveTimeouts:s}}(),Z=Q.clearAllSDATimeouts,Y=Q.setNewSDATimeout,X=Q.hasActiveTimeouts,$=r.useRef((0,vi.nv)(o));return r.useEffect((function(){$.current=(0,vi.nv)(o)}),[o]),r.useEffect((function(){if(!R&&o&&o.status===Me.sC.Processed&&A&&!x.current){var e=o,n=e.adFormat,a=e.duration,r=e.sequenceLength,p=new Date,h={allocation_strategy:Fe.Z$[n],date:p.toDateString(),sdk:zn.hJ.Amazon,emitting_service:"AdvantEdge",stitched:!1,pbyp_visible:!1,is_mafs:!!o.mafsDecision,eligible_formats:null,allocation_type:"PreFill",fallback_format:null};n&&(0,vn.rF)(n)&&(B.current=r&&Number(r)||1,O.current=Math.floor(a/B.current),U.current=B.current,x.current=!0,C(e,M.current,V.current))}function _(){c(!1),x.current=!1,F.current=!1,Y(Ci.Reset,setTimeout((function(){z.current?(Pi.debug("Outstream ad requester is resetting the SDA state as a stitched ad is active"),v()):(Pi.debug("Outstream ad requester is resetting the ad context state"),s())}),1500))}function k(n){var a=this;Y(Ci.NextRequest,setTimeout((function(){return(0,i.__awaiter)(a,void 0,void 0,(function(){return(0,i.__generator)(this,(function(n){switch(n.label){case 0:return U.current>0||!$.current?[4,C(e,M.current,V.current)]:[3,2];case 1:return n.sent(),[3,3];case 2:Pi.debug("Outstream ad break has completed and will reset"),j.current>1&&t("ad_client_pod_completion",{flexsealTrackingProps:h,sda_sequence_length:j.current,sda_sequence_number:q.current}),_(),n.label=3;case 3:return[2]}}))}))}),n))}function C(r,s,p){return(0,i.__awaiter)(this,void 0,Promise,(function(){var C,T,R,L,Q,Z,Y,X,J,ee,te,ne,ie,ae,re,oe,se,le,de,ue,ce,pe,ve,me,fe,ge,ye,he;return(0,i.__generator)(this,(function(_e){switch(_e.label){case 0:return _e.trys.push([0,3,4,5]),U.current<=0||z.current||W.current?(_(),[2]):(C=(0,vn.rF)(s)?s:r.adFormat,T=""!==p?p:r.mafsDecision,R=(0,vi.zB)(C).size,L=B.current,Q=B.current-U.current+1,Pi.debug("Outstream ad break is currently on ad ".concat(Q,"/").concat(L)),1===Q&&(Pi.info("resetting sda sequence parameters"),G.current=[],H.current=[],K.current=[],f()),Z=(0,i.__assign)((0,i.__assign)({},r),{adFormat:C,mafsDecision:T,duration:O.current}),[4,(0,hn.L9)(new di.C,(0,i.__assign)((0,i.__assign)({},Z),{duration:a}),w)]);case 1:return Y=_e.sent(),L>1&&(j.current=L,q.current=Q,Pi.info("applying sda sequence parameters to request"),Y=Y.withBlockedCreatives(G.current.join("|")).withBlockedAdvertisers(H.current.join("|")).withBlockedCategories(K.current.join("|")).withMaxSequence(L).withSequenceNumber(Q)),X=[],e.declinedAdFormats&&(X=(0,i.__spreadArray)([],e.declinedAdFormats,!0)),Q>1&&(J=!1,X.includes(Fe.Z$.OUTSTREAM_VERTICAL_VIDEO)||(X.push(Fe.Z$.OUTSTREAM_VERTICAL_VIDEO),J=!0),X.includes(Fe.Z$.OUTSTREAM_MIRROR_PBYP_VIDEO)||(X.push(Fe.Z$.OUTSTREAM_MIRROR_PBYP_VIDEO),J=!0),J&&g(e,X)),Y=Y.withDeclinedFormats(X),ee=L>1?{sda_sequence_length:L,sda_sequence_number:Q}:void 0,te=function(e,n){var a=null==o?void 0:o.adFormat;return Q>1&&M.current&&(a=M.current),t(e,(0,i.__assign)((0,i.__assign)((0,i.__assign)({ad_size:JSON.stringify(R),format_name:(0,Fe.uN)(a)},n||{}),ee||{}),h))},ne=function(e){var n=(0,oi.fX)("nab_gate"),i=(0,ke.If)();n&&void 0!==i&&!ke.l$.has(i)&&e<250&&(m(!0),t("nab_detection",{nab_value:"2",client_country_code:(0,ke.If)()}))},[4,si.F.requestAd(Y,te,ne)];case 2:if(ie=_e.sent()||{},U.current-=1,(0,vi.Jp)(ie)){if(ae=ie.resp,(0,vi.UK)(ae))return(re=(0,vi.Tm)(ae))?(oe=(0,vi.x4)(ae),se=null!=oe?oe:115,le=(0,vi.in)(ae),me={adPosition:1,duration:se,numberOfAds:1,roll:e.roll,start:Date.now(),adFormat:Fe.Z$.OUTSTREAM_VERTICAL_VIDEO_PLAYABLE,stitched:!1,started:!1,podReplayLoopStarted:!1,playAdConfig:re,playAdTrackingUrls:le},l(me,e),S({adFormat:Fe.Z$.OUTSTREAM_VERTICAL_VIDEO_PLAYABLE,position:1,numberOfAds:1}),t("ad_client_pod_start",{flexsealTrackingProps:h,format_name:(0,Fe.uN)(Fe.Z$.OUTSTREAM_VERTICAL_VIDEO_PLAYABLE),requested_ad_size:JSON.stringify((0,vi.zB)(n).size)}),c(!1),x.current=!1,[2]):(Pi.debug("No playable ad config found, stopping"),x.current=!1,[2]);r.adFormat=ie.format,ie.format===Fe.Z$.OUTSTREAM_MIRROR_PBYP_VIDEO?(u((0,i.__assign)((0,i.__assign)({},r),{vast:ae}),r),E({adFormatRequest:r,vast:ae,resetAdContext:v,radToken:y,content:P,behaviors:b,videoContainer:I,videoSessionId:A&&A.getSessionData()["VIDEO-SESSION-ID"],videoVolume:D,videoMuted:N,mediaPlayerBitrate:null==A?void 0:A.getVideoBitRate()})):d((0,i.__assign)((0,i.__assign)({},r),{vast:ae}),r),U.current=0}else{if(de=null!==(he=ie.resp)&&void 0!==he?he:{},!F.current&&de&&(0,vn.rW)(de.returnedAdFormat)&&de.updatedMafsDecision&&(M.current=de.returnedAdFormat,V.current=de.updatedMafsDecision,F.current=!0),!$.current)return Pi.debug("Outstream ad break was aborted during ad request, so not filling the ad"),_(),[2];de.creativeHtml?(Pi.debug("got sda bid response, now ".concat(U.current," ads remaining"),de),de.adv&&de.adv.length>0&&!de.adv.find((function(e){return"amazon.com"===e.toLowerCase()}))&&(Pi.info("adding a new adv",de.adv),(ge=H.current).push.apply(ge,de.adv)),de.cat&&de.cat.length>0&&!de.cat.find((function(e){return"IAB22"===e.toUpperCase()}))&&(Pi.info("adding a new cat",de.cat),(ye=K.current).push.apply(ye,de.cat)),ue=(0,vn.rW)(M.current)?M.current:Z.adFormat,ce=""===V.current?Z.mafsDecision:V.current,pe=(0,i.__assign)((0,i.__assign)({},Z),{adFormat:ue,mafsDecision:ce}),(ve=(0,vi.aE)(ue,de))&&(pe.adFormat=Fe.gz.LEFT_THIRD),me=(0,vi.V4)(pe,de,ee),l(me,pe),c(!0),1===Q&&t("ad_client_pod_start",(0,i.__assign)({flexsealTrackingProps:h,format_name:(0,Fe.uN)(ve?Fe.gz.LEFT_THIRD:de.returnedAdFormat,de.isPauseAd),sub_format_name:(0,vi.Fn)(de.returnedAdFormat,de.height,de.width,de.isPauseAd),requested_ad_size:JSON.stringify(R)},ee||{})),k(me.duration*_i)):(Pi.debug("no sda returned, now ".concat(U.current," ads remaining")),k(0))}return[3,5];case 3:return fe=_e.sent(),Pi.debug("caught an error while handling ad edge response",fe),_(),[3,5];case 4:return x.current=U.current>0,[7];case 5:return[2]}}))}))}}),[o,c,l,d,A,s,v,Y,R,t,n,m,f,g,E,u,y,P,b,I,D,N,S,w]),r.useEffect((function(){(0,vi.nv)(o)||(X()&&(Pi.debug("adFormatRequest has been reset while SDA timeouts are active. Clearing active timeouts"),Z()),x.current=!1,F.current=!1)}),[o,Z,X]),r.useEffect((function(){o||(M.current=void 0,V.current="")}),[o]),null})),Ei=v.x.wrap((function(){return Promise.all([n.e(38673),n.e(76127),n.e(94398)]).then(n.bind(n,49967))}),"InStreamAndVerticalVideoAdPlayer"),Ii=function(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ei,{}),(0,a.jsx)(Ai,{})]})},Ti=(0,g.O)()((function(e){var t=e.adEvents,n=r.useContext(L.jK).updateAdStats;return r.useEffect((function(){var e=function(e){n(function(e){var t=e.adInfo;return{id:t&&t.adID||void 0,adPosition:t&&t.adPodInfo?t.adPodInfo.adPosition:void 0,adWrapperIds:t&&t.adWrapperIds||void 0,creativeId:t&&t.creativeID||void 0,duration:t&&t.duration||void 0,impressionTime:Date.now(),totalAds:t&&t.adPodInfo?t.adPodInfo.totalAds:void 0,system:t&&t.adSystem||void 0,title:t&&t.title||void 0,contentType:t&&t.contentType||void 0,vastMediaHeight:t&&void 0!==t.vastMediaHeight?t.vastMediaHeight:void 0,vastMediaWidth:t&&void 0!==t.vastMediaWidth?t.vastMediaWidth:void 0,vastMediaBitrate:t&&void 0!==t.vastMediaBitrate?t.vastMediaBitrate:void 0,mediaUrl:t&&t.mediaUrl||void 0}}(e))};return t.addEventListener(S.V.Impression,e),function(){t.removeEventListener(S.V.Impression,e)}}),[t,n]),null}));var Di=n(109342),Ni=n(162711),wi=n(319435),Ri=n(409484),xi=(0,o.Zz)((0,g.O)(),(0,Xn.A)(),(0,Ri.B)(),(0,L.VX)((function(e){var t=e.muted,n=e.volume,i=e.adFormatMetadata,a=e.adFormatRequest,r=e.resetOutstreamAd,o=e.startClientSideAd,s=e.updateAdVolume,l=e.updateAdMuted,d=e.updateAdPlaying,u=e.clientSideAdSelectionParams,c=e.updateOutstreamAdDisplayStatus;return{adMuted:t,adVolume:n,resetOutstreamAd:r,adFormatMetadata:i,adFormatRequest:a,startClientSideAd:o,updateAdVolume:s,updateAdMuted:l,updateAdPlaying:d,clientSideAdSelectionParams:u,updateOutstreamAdDisplayStatus:c}})),(0,h.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance,volume:e.volume,muted:e.muted}})))((function(e){var t,n,i=e.adVolume,a=e.adMuted,o=e.adFormatMetadata,s=e.adFormatRequest,l=e.clientSideAdSelectionParams,d=e.resetOutstreamAd,u=e.startClientSideAd,c=e.updateAdVolume,p=e.updateAdMuted,v=e.updateAdPlaying,m=e.updateOutstreamAdDisplayStatus,f=e.mediaPlayerInstance,g=e.volume,y=e.muted,h=e.getInitialMuteState,_=e.getAdjustedVolume,k=e.shouldAdjustVolume,C=e.trackAdFormatData,b=e.trackAdFormatRAdEvent,P=new Map;P.set(S.V.Resumed,(0,r.useCallback)((function(){v(!0)}),[v])),P.set(S.V.Paused,(0,r.useCallback)((function(){v(!1)}),[v])),P.set(S.V.ContentPauseRequested,(0,r.useCallback)((function(e){var t=e.event,n=null!=g?g:.5;t.videoAd.setVolume(n),t.videoAd.setMuted(!0),p(!0)}),[g,p])),P.set(S.V.VolumeChanged,(0,r.useCallback)((function(e){var t=e.event;c(t.volume)}),[c]));var A=(0,r.useCallback)((function(e){var t=e.event,n=t;if(p(n.muted),!n.muted){var i=n.videoAd.getVolume(),a=_(i),r=k(i)?a:g,o=Math.max(r||0,.1);t.videoAd.setVolume(o),null==f||f.setMuted(!0)}}),[p,_,k,g,f]);P.set(S.V.Muted,A),P.set(S.V.Unmuted,A),P.set(S.V.Started,(0,r.useCallback)((function(t){var n,i,a=t.event,r=a.adInfo&&a.adInfo.adPodInfo,s=a.adInfo,l=null===(n=e.adFormatMetadata)||void 0===n?void 0:n.adFormat,d=(0,Fe.uN)(l),c=r&&r.adPosition||1;c<=1?(0,Le.qA)("ad_pod_start",{ad_pod_duration:null==r?void 0:r.totalDuration,num_ads_in_pod:null==r?void 0:r.totalAds}):(0,Le.qA)("".concat(d.toLowerCase(),"_ad_end"),{ad_pod_duration:null==r?void 0:r.totalDuration,num_ads_in_pod:null==r?void 0:r.totalAds}),(0,Le.qA)("".concat(d.toLowerCase(),"_ad_start"),{ad_pod_duration:null==r?void 0:r.totalDuration,num_ads_in_pod:null==r?void 0:r.totalAds,current_ad_duration:null==s?void 0:s.duration}),v(!0),u({adFormat:null!==(i=null==o?void 0:o.adFormat)&&void 0!==i?i:Fe.Z$.OUTSTREAM_VERTICAL_VIDEO,position:c,numberOfAds:r&&r.totalAds||1,adInfo:s})}),[null==o?void 0:o.adFormat,null===(t=e.adFormatMetadata)||void 0===t?void 0:t.adFormat,u,v]));var E=(0,r.useCallback)((function(){var e=h();e!==!!y&&(null==f||f.setMuted(e)),m("hiding");var t=setTimeout((function(){d()}),1e3);return function(){return clearTimeout(t)}}),[h,f,y,d,m]);return P.set(S.V.Error,E),P.set(S.V.ContentResumeRequested,(0,r.useCallback)((function(t){var n,i=t.event,a=i.adInfo&&i.adInfo.adPodInfo,r=i.adInfo,o=null===(n=e.adFormatMetadata)||void 0===n?void 0:n.adFormat,s=(0,Fe.uN)(o);(0,Le.qA)("".concat(s.toLowerCase(),"_ad_end"),{ad_pod_duration:null==a?void 0:a.totalDuration,num_ads_in_pod:null==a?void 0:a.totalAds,current_ad_duration:null==r?void 0:r.duration}),(0,Le.qA)("ad_pod_end",{ad_pod_duration:null==a?void 0:a.totalDuration,num_ads_in_pod:null==a?void 0:a.totalAds}),E()}),[E,null===(n=e.adFormatMetadata)||void 0===n?void 0:n.adFormat])),(0,wi.Z)({adMuted:a,adVolume:i,adFormatMetadata:o,adFormatRequest:s,clientSideAdSelectionParams:l,mainPlayerVolume:g,eventSideEffectOptions:P,reset:d,trackAdFormatData:C,trackAdFormatRAdEvent:b,addEventListener:e.adEvents.addEventListener}),null}));var Li,Fi,Mi,Vi=function(){var e=r.useContext(h.$g).mediaPlayerInstance,t=(0,st.O)(r.useContext(_.kl)),n=r.useContext(Be.g7).track;return(0,x.p)(F.a.METADATA,r.useCallback((function(i){var a;try{if("text/json"!==i.type)return;var r=void 0;try{r=JSON.parse(i.data)}catch(e){return void s.x2.logger.warn("failed to parse metadata event")}if("twitch-session"!==r.CLASS)return;if(void 0===r["X-TV-TWITCH-SESSIONID"]||void 0===r["START-DATE"])return;var o=null===(a=null==e?void 0:e.getSessionData())||void 0===a?void 0:a["VIDEO-SESSION-ID"],l=r["X-TV-TWITCH-SESSIONID"],d=r["START-DATE"];o!==l&&void 0!==l&&n("ads_hank",{player:t,video_session_id:o,hank_id:"hs",hank_payload:JSON.stringify({hank_session_id:l,hank_start_time:d})})}catch(e){}}),[e,t,n])),null},Oi=n(71062);!function(e){e.Paused="AdPaused",e.Playing="AdPlaying",e.Stopped="AdStopped",e.VideoComplete="AdVideoComplete",e.VideoFirstQuartile="AdVideoFirstQuartile",e.VideoMidpoint="AdVideoMidpoint",e.VideoStart="AdVideoStart",e.VideoThirdQuartile="AdVideoThirdQuartile",e.VolumeChanged="AdVolumeChanged"}(Li||(Li={})),function(e){e.Start="start",e.FirstQuartile="first-quartile",e.Midpoint="midpoint",e.ThirdQuartile="third-quartile",e.Complete="complete"}(Fi||(Fi={})),function(e){e.Stitched="stitched",e.VAES="vaes"}(Mi||(Mi={}));function Ui(e){var t=e.clearMoatAnalytics,n=e.initializeMoatAnalytics,i=e.trackMoatEvent,a=e.currentMoatAnalyticsType,o=r.useCallback((function(e){a===Mi.VAES&&i(e)}),[a,i]);(0,We._)(S.V.Loaded,r.useCallback((function(e){(function(e){var t=e.request;return!(!t.server||t.server!==S.K.VAES)})(e)&&e.adInfo&&n({type:Mi.VAES,duration:e.adInfo.duration,adCfId:e.adInfo.adCfId,advertiserCfId:e.adInfo.advertiserCfId,campaignCfId:e.adInfo.campaignCfId,creativeCfId:e.adInfo.creativeCfId})}),[n])),(0,We._)(S.V.Progress,r.useCallback((function(){return o(Li.Playing)}),[o])),(0,We._)(S.V.Paused,r.useCallback((function(){return o(Li.Paused)}),[o])),(0,We._)(S.V.VolumeChanged,r.useMemo((function(){return(0,Oi.n)((function(){o(Li.VolumeChanged)}),5e3)}),[o])),(0,We._)(S.V.Started,r.useCallback((function(){return o(Li.VideoStart)}),[o])),(0,We._)(S.V.FirstQuartile,r.useCallback((function(){return o(Li.VideoFirstQuartile)}),[o])),(0,We._)(S.V.Midpoint,r.useCallback((function(){return o(Li.VideoMidpoint)}),[o])),(0,We._)(S.V.ThirdQuartile,r.useCallback((function(){return o(Li.VideoThirdQuartile)}),[o])),(0,We._)(S.V.Complete,r.useCallback((function(){return o(Li.VideoComplete)}),[o])),(0,We._)(S.V.ContentResumeRequested,r.useCallback((function(){o(Li.Stopped),t()}),[o,t]))}var Bi="unknown";function ji(e){var t=e.videoAdRequest;if(!t||t.status!==Me.sC.Processed&&t.status!==Me.sC.Filled)return Bi;var n=t.broadcaster&&t.broadcaster.login,i=t.game&&t.game.name.toLowerCase().replace(/[^a-z0-9]+/g,"_"),a=n||Bi;return i?"".concat(a," + ").concat(i):a}var qi,Gi,Hi="www.twitch.tv";function Ki(e){var t=r.useContext(L.jK),n=function(){var e=r.useContext(L.jK).volume,t=r.useContext(k.wL),n=t.volume,i=t.muted,a=r.useRef(e),o=r.useRef(n),s=r.useRef(i);return r.useEffect((function(){a.current=e,o.current=n,s.current=i})),r.useCallback((function(e){return s.current?0:e===Mi.VAES?a.current:o.current}),[])}(),i=r.useState(null),a=i[0],o=i[1],s=r.useState(null),l=s[0],d=s[1],u=r.useCallback((function(){o(null),d(null)}),[o]),c=r.useCallback((function(t){var n=window.navigator.languages||window.navigator.language||"";e("video_ad_moat_viewability_event",{accept_languages:n,query_string:t.queryString,stitched:t.stitched,ad_server:t.adServer,provider:t.provider})}),[e]),p=r.useCallback((function(e){if(e.type===Mi.VAES){var n={level1:e.advertiserCfId,level2:e.campaignCfId,level3:e.adCfId,level4:e.creativeCfId,slicer1:Hi,slicer2:ji(t)};o(function(e,t,n,i,a,r){var o,s,l=document.createElement("script"),d=[],u={vidIntType:"3",vidIntVersion:"1.0",adData:{ids:t,duration:n,url:a},dispatchEvent:function(e){u.sendEvent?(d&&(d.push(e),e=d,d=!1),u.sendEvent(e)):d&&d.push(e)},clientCallback:r};t="_mApi"+Math.floor(1e8*Math.random());try{s=(o=e.ownerDocument).defaultView||o.parentWindow}catch(e){o=document,s=window}return s[t]=u,l.type="text/javascript",e&&e.insertBefore(l,e.childNodes[0]||null),l.src="proxy.php?url=https://www.twitch.tv/r/s/m/va.min.js#".concat(t),u}(t.thirdPartyVideoAdElement,n,e.duration,0,null,(function(e){return c({adServer:qi.VAES,provider:Gi.Amazon,stitched:!1,queryString:e})}))),d(Mi.VAES)}else if(e.type===Mi.Stitched){n={level1:e.advertiserId,level2:e.campaignId,level3:e.adId,level4:e.creativeId,slicer1:Hi,slicer2:ji(t)};o(function(e,t,n,i,a,r){var o,s,l=document.createElement("script"),d=[],u={vidIntType:"3",vidIntVersion:"1.0",adData:{ids:t,duration:n,url:a},dispatchEvent:function(e){u.sendEvent?(d&&(d.push(e),e=d,d=!1),u.sendEvent(e)):d&&d.push(e)},clientCallback:r};t="_mApi"+Math.floor(1e8*Math.random());try{s=(o=e.ownerDocument).defaultView||o.parentWindow}catch(e){o=document,s=window}return s[t]=u,l.type="text/javascript",e&&e.insertBefore(l,e.childNodes[0]||null),l.src="proxy.php?url=https://www.twitch.tv/r/s/m/nat.min.js#".concat(t),u}(t.thirdPartyVideoAdElement,n,e.duration,0,null,(function(e){return c({adServer:qi.VAES,provider:Gi.Fring,stitched:!0,queryString:e})}))),d(Mi.Stitched)}}),[o,t,c]),v=r.useCallback((function(e,t){if(void 0===t&&(t={}),a){var i=void 0===t.volume?n(l):t.volume;a.dispatchEvent({adVolume:i||0,type:e})}}),[a,n,l]);return{moatAnalytics:a,currentMoatAnalyticsType:l,initializeMoatAnalytics:p,clearMoatAnalytics:u,trackMoatEvent:v}}!function(e){e.VAES="vaes"}(qi||(qi={})),function(e){e.Amazon="amazon",e.Fring="fring"}(Gi||(Gi={}));var zi=5e3;var Wi,Qi=n(610009);function Zi(e){if(e)return e.status===Me.sC.Filled||e.status===Me.sC.Processed?e.server:void 0}!function(e){e.StartTracking="start-tracking",e.StopTracking="stop-tracking",e.Track="track",e.TrackStart="track-start",e.TrackFirstQuartile="track-first-quartile",e.TrackMidpoint="track-midpoint",e.TrackThirdQuartile="track-third-quartile",e.TrackComplete="track-complete"}(Wi||(Wi={}));var Yi=function(e,t){var n;switch(t.type){case Wi.StartTracking:return(0,i.__assign)((0,i.__assign)({},e),{hasTracked:{start:!1,firstQuartile:!1,midpoint:!1,thirdQuartile:!1,complete:!1},currentAd:{duration:t.adDuration,startTime:t.adStartTime}});case Wi.StopTracking:return(0,i.__assign)((0,i.__assign)({},e),{currentAd:null});case Wi.Track:return e.currentAd?(0,i.__assign)((0,i.__assign)({},e),{hasTracked:(0,i.__assign)((0,i.__assign)({},e.hasTracked),(n={},n[t.quartile]=!0,n))}):e;default:return e}};function Xi(e){var t,n,i,a,o=e.initializeMoatAnalytics,s=e.trackMoatEvent,l=e.clearMoatAnalytics,d=e.currentMoatAnalyticsType,u=r.useCallback((function(e,t){void 0===t&&(t={}),d===Mi.Stitched&&s(e,t)}),[s,d]),c=function(e){var t=r.useContext(h.$g).mediaPlayerInstance,n=r.useReducer(Yi,{hasTracked:{start:!1,firstQuartile:!1,midpoint:!1,thirdQuartile:!1,complete:!1},currentAd:null}),i=n[0],a=n[1],o=r.useCallback((function(e){a({type:Wi.StartTracking,adDuration:e.adDuration,adStartTime:e.adStartTime})}),[a]),s=r.useCallback((function(){a({type:Wi.StopTracking})}),[a]),l=r.useCallback((function(t){e(t,s)}),[e,s]),d=r.useCallback((function(){if(i.currentAd&&t){var e=t.getPosition(),n=i.currentAd,r=n.duration,o=(r+n.startTime-e)/r;o<=.02?i.hasTracked.complete||(a({type:Wi.Track,quartile:"complete"}),l(Fi.Complete)):o<.25?i.hasTracked.thirdQuartile||(a({type:Wi.Track,quartile:"thirdQuartile"}),l(Fi.ThirdQuartile)):o<.5?i.hasTracked.midpoint||(a({type:Wi.Track,quartile:"midpoint"}),l(Fi.Midpoint)):o<.75?i.hasTracked.firstQuartile||(a({type:Wi.Track,quartile:"firstQuartile"}),l(Fi.FirstQuartile)):o<.99&&(i.hasTracked.start||(a({type:Wi.Track,quartile:"start"}),l(Fi.Start)))}}),[i,t,l]);return(0,x.p)(F.a.TIME_UPDATE,d),{startStitchedQuartileTracking:o,stopStitchedQuartileTracking:s}}(r.useCallback((function(e,t){switch(e){case Fi.Start:u(Li.VideoStart);break;case Fi.FirstQuartile:u(Li.VideoFirstQuartile);break;case Fi.Midpoint:u(Li.VideoMidpoint);break;case Fi.ThirdQuartile:u(Li.VideoThirdQuartile);break;case Fi.Complete:u(Li.VideoComplete),t(),l()}}),[u,l])),p=c.startStitchedQuartileTracking,v=c.stopStitchedQuartileTracking;t=r.useCallback((function(e){var t=e.adMetadata,n=e.adServer,i=e.startTime;p({adDuration:t.duration,adStartTime:i}),o({type:Mi.Stitched,duration:t.duration,adId:t.lineItemId,creativeId:t.creativeId,advertiserId:t.advertiserId,campaignId:t.orderId,adServer:n})}),[o,p]),n=r.useRef(),i=r.useContext(L.jK),a=r.useContext(h.$g).mediaPlayerInstance,r.useEffect((function(){i.videoAdMetadata&&i.videoAdMetadata.stitched&&(n.current&&n.current.videoAdMetadata===i.videoAdMetadata||!a||t({adMetadata:i.videoAdMetadata,adServer:Zi(i.videoAdRequest),startTime:a.getPosition()}))}),[n,i,t,a]),r.useEffect((function(){n.current=i}),[i]),function(e){var t=r.useContext(h.$g).mediaPlayerInstance,n=r.useMemo((function(){return(0,Oi.n)((function(){var n=t&&t.isMuted()?0:t&&t.getVolume();e(n)}),zi)}),[e,t]);(0,x.p)(F.a.VOLUME_CHANGED,n),(0,x.p)(F.a.MUTED_CHANGED,n)}(r.useCallback((function(e){u(Li.VolumeChanged,{volume:e})}),[u])),(0,Qi.i)({onPlay:r.useCallback((function(){u(Li.Playing)}),[u]),onPause:r.useCallback((function(){u(Li.Paused)}),[u])}),r.useEffect((function(){var e=function(){u(Li.Stopped),v(),l()};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}),[u,v,l])}var $i=(0,mn._)()((function(e){var t=Ki(e.trackVideoAdData);return Ui(t),Xi(t),null})),Ji=(0,o.Zz)((0,Xn.A)())((function(e){var t=(0,r.useContext)(L.jK),n=t.adFormatRequest,i=t.videoAdMetadata,a=(0,r.useContext)(_.kl).behaviors,o=(0,r.useContext)(li.FO).resetMirrorPbyPAd,s=e.trackAdFormatData;return(0,r.useEffect)((function(){var e=(null==n?void 0:n.status)===Me.sC.Transferred&&n.adFormat===Fe.Z$.OUTSTREAM_MIRROR_PBYP_VIDEO,t=!1,r="";(null==i?void 0:i.stitched)?(t=!0,r="SureStream"):(null==a?void 0:a.mini)&&(t=!0,r="MINI"),e&&t&&(s("ad_opportunity_abort",{abort_reason:r}),o())}),[null==n?void 0:n.adFormat,null==n?void 0:n.status,null==a?void 0:a.mini,s,o,null==i?void 0:i.stitched]),null})),ea=n(936676),ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onMetadata=function(e){try{if("text/json"===e.type){var n=void 0;try{n=JSON.parse(e.data)}catch(e){return void s.x2.logger.warn("failed to parse pbyp metadata")}if(!n)return void s.x2.logger.warn("failed to parse pbyp metadata");if("live-video-net-metadata"===n.CLASS&&"pbyp-preflight"===n["X-NET-LIVE-VIDEO-METADATA-TYPE"]){var i=(n["X-NET-LIVE-VIDEO-METADATA-PBYP-WEIGHTED-BUCKETS"]||"").split(","),a={jitterTime:parseInt(n["X-NET-LIVE-VIDEO-METADATA-PBYP-JITTER-TIME"]||"",10),jitterBuckets:parseInt(n["X-NET-LIVE-VIDEO-METADATA-PBYP-JITTER-BUCKETS"]||"",10),warmupTime:parseInt(n["X-NET-LIVE-VIDEO-METADATA-PBYP-WARMUP-TIME"]||"",10),commercialId:n["X-NET-LIVE-VIDEO-METADATA-PBYP-COMMERCIAL-ID"]||"",weightedBuckets:i.map((function(e){return parseFloat(e)}))},r=a.weightedBuckets.reduce((function(e,t){return e+t}));isNaN(a.jitterTime)||isNaN(a.jitterBuckets)||isNaN(a.warmupTime)||!a.commercialId||1!==r||t.props.onMainPlayerHLSTrigger(a)}}}catch(e){s.x2.logger.errorAndReport(e,"Unable to create metadata for pbyp preflight.")}},t}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.playerEvents.addEventListener(F.a.METADATA,this.onMetadata)},t.prototype.render=function(){return null},t}(r.Component),na=(0,o.Zz)((0,li.dC)((function(e){return{onMainPlayerHLSTrigger:e.onMainPlayerHLSTrigger}})),(0,y.X)())(ta);var ia=["US"],aa=function(){var e=(0,ke.If)()||"";return ia.includes(e)&&"treatment"===s.x2.flags.getAssignment("twilight_p_4","string","control")?45:30};function ra(e){return(null==e?void 0:e.split(",").map((function(e){var t=parseInt(e,10);return t in Fe.Z$?t:void 0})).filter((function(e){return void 0!==e})))||[]}var oa=n(194442),sa=n.n(oa),la=(0,o.Zz)((0,_.cj)((function(e){return{content:e.content}})),(0,H._v)(sa(),{props:function(e){var t=e.data;return{broadcastType:ua(t),adProperties:da(t)}},options:function(e){var t=e.content;return{variables:{isVOD:!!(0,U.wy)(t)||!(!(0,U.P3)(t)||!t.vodID),vodID:(0,U.hq)(t)||"",isCollection:!!(0,U.P3)(t)&&!t.vodID,collectionID:!(0,U.hq)(t)&&(0,U.Eq)(t)||""}}}}))((function(e){var t=r.useContext(L.jK),n=t.videoAdMetadata,i=t.requestAd,a=r.useContext(k.wL).isPlaying,o=e.adProperties,s=e.broadcastType,l=o&&o.hasVodAdsEnabled,d=o&&o.vodArchiveMidrolls,u=o&&o.vodArchiveMidrollsBreakLength,c=o&&o.vodArchiveMidrollsFrequency,p=s===Dt.Suw.ARCHIVE||s===Dt.Suw.PAST_PREMIERE,v=r.useCallback((function(){i({adFormat:Fe.gz.STANDARD_VIDEO,sessionID:(0,Le.SG)(),roll:Me.df.Mid,duration:u||30})}),[i,u]);"treatment"===(0,Xt._)("vods_cooldown","string","control").value&&(c=8);var m=function(e,t){var n=(0,r.useRef)(0),i=(0,r.useRef)(0),a=(0,r.useRef)(0),o=(0,r.useCallback)((function(){i.current=0,a.current=0,clearTimeout(n.current)}),[]),s=(0,r.useCallback)((function(){a.current=Date.now();var r=e-i.current;clearTimeout(n.current),n.current=window.setTimeout((function(){t(),o(),s()}),r)}),[t,e,o]),l=(0,r.useCallback)((function(){clearTimeout(n.current),a.current>0&&(i.current=Date.now()-a.current+i.current)}),[]);return(0,r.useEffect)((function(){return o}),[o,e,t]),{start:s,pause:l,stop:o}}(6e4*(c||0),v),f=m.start,g=m.pause,y=m.stop,h=!(l&&c&&p&&"inserted"===d&&!n);return r.useEffect((function(){h?y():a?f():g()}),[h,a,f,y,g]),null}));function da(e){return e?e.video?e.video.owner&&e.video.owner.adProperties:e.collection?e.collection.owner&&e.collection.owner.adProperties:null:null}function ua(e){if(!e)return null;if(e.video)return e.video.broadcastType;if(e.collection){var t=e.collection&&e.collection.items&&e.collection.items.edges,n=t&&(0,O.bK)(t);if(n&&n.length>0)return n[0].broadcastType}return null}var ca,pa,va,ma=(0,o.Zz)((0,mn._)(),(0,Xn.A)())((function(e){var t=e.trackVideoAdData,n=e.trackAdFormatData,i=r.useContext(L.jK),o=i.requestAd,l=i.videoAdRequest,d=i.adFormatMetadata,u=i.resetOutstreamAd,c=i.updateOutstreamAdDisplayStatus,p=i.adFormatRequest,v=r.useContext(h.$g),m=r.useContext(_.kl).content,f=v.hasPlayed,g=v.logger,y=r.useContext(li.FO).resetMirrorPbyPAd,k=(0,be.k1)(v),S=r.useRef(k),b=r.useRef(f),P=(0,U.Jn)(m);(0,x.p)(ze.ID3,r.useCallback((function(e){if(!(0,U.DG)(m)||!(0,oi.fX)("VLM_HLS_Midrolls")){var t=function(e){var t=an(e);return t&&"commercial"===t.cmd&&t.length&&t.commercial_id?{duration:t.length,commercialID:t.commercial_id,spliceEventID:t.splice_event_id,availNum:t.avail_num}:null}(e);t&&o({sessionID:(0,Le.SG)(),adFormat:Fe.gz.STANDARD_VIDEO,roll:Me.df.Mid,duration:+t.duration,broadcasterInitiated:!0,commercialID:t.commercialID})}}),[o,m])),(0,x.p)(F.a.METADATA,r.useCallback((function(e){if((0,oi.fX)("VLM_HLS_Midrolls"))try{if("text/json"===e.type){var i=void 0;try{i=JSON.parse(e.data)}catch(e){return void g.warn("failed to parse client ad metadata")}if(!i)return void g.warn("failed to parse client ad metadata");if("twitch-maf-ad"===i.CLASS&&i["X-TTV-MAF-AD-COMMERCIAL-ID"]&&i["X-TTV-MAF-AD-AD-SESSION-ID"]&&i["X-TTV-MAF-AD-PRIMARY-POD"]&&i["PLANNED-DURATION"]){var a=parseInt(i["PLANNED-DURATION"],10),r=i["X-TTV-MAF-AD-RADS-TOKEN"],v=i["X-TTV-MAF-AD-AD-SESSION-ID"]||(0,Le.SG)(),m=i["X-TTV-MAF-AD-COMMERCIAL-ID"],f=i["X-TTV-MAF-AD-DECISION"],h=ra(i["X-TTV-MAF-AD-PRIMARY-POD"]),_=ra(i["X-TTV-MAF-AD-FALLBACK-FORMATS"]);if(t("ad_request_client_trigger_received",{allocation_type:"PreFill",break_length:a,format_name:(0,Fe.uN)(h[0]),fallback_format_name:(0,Fe.uN)(_[0]),is_mafs:!!f,commercial_id:m,stitched:!1,roll_type:Me.df.Mid,ad_session_id:v,twitch_correlator:null==l?void 0:l.twitchCorrelator,main_play_session_id:s.E5.getVideoPlayerTrackingData().playSessionID,pbyp_play_session_id:void 0}),h.length>0&&(0,vn.rF)(h[0])){g.debug("outstream ad metadata event",{duration:a,primaryPod:h,fallbackFormats:_,radsToken:r,adSessionId:v});var k=(null==d?void 0:d.adFormat)===Fe.Z$.OUTSTREAM_VERTICAL_VIDEO,S=(null==p?void 0:p.status)===Me.sC.Transferred;(k||S)&&n("ad_opportunity_abort",{abort_reason:"NextOutstreamAd"}),k&&(c("hiding"),setTimeout((function(){u()}),1e3)),S&&y(),o({adFormat:h[0],sessionID:v,duration:a,roll:Me.df.Mid,commercialID:m,radsToken:r,isVLM:!0,mafsDecision:f,sequenceLength:i["X-TTV-MAF-AD-SDA-SEQUENCE-LENGTH"],primaryFormats:h,fallbackFormats:_})}else h.length>0&&f&&(0,vn.zf)(h[0])&&o({adFormat:h[0],sessionID:v,duration:a,roll:Me.df.Mid,broadcasterInitiated:!0,commercialID:m,radsToken:r,isVLM:"1"===i["X-TV-TWITCH-AD-VLM"],mafsDecision:f})}}}catch(e){g.errorAndReport(e,"Unable to create request for client side ad.")}}),[g,t,null==l?void 0:l.twitchCorrelator,null==d?void 0:d.adFormat,null==p?void 0:p.status,o,n,c,u,y])),r.useEffect((function(){!k&&S.current?(o({sessionID:(0,Le.SG)(),adFormat:Fe.gz.STANDARD_VIDEO,roll:Me.df.Pre,duration:aa()}),S.current=!1):k&&(S.current=!0)}),[k,S,o]),(0,x.p)(C.p.ENDED,r.useCallback((function(){f&&(0,U.DG)(m)&&o({sessionID:(0,Le.SG)(),adFormat:Fe.gz.STANDARD_VIDEO,roll:Me.df.Post,duration:30})}),[o,f,m]));var A=r.useRef(!1);return(0,x.p)(C.p.READY,r.useCallback((function(){return A.current=!0}),[])),(0,x.p)(F.a.DURATION_CHANGED,r.useCallback((function(){if(A.current){var e={sessionID:(0,Le.SG)(),adFormat:Fe.gz.STANDARD_VIDEO,roll:Me.df.Pre,duration:aa(),forced:!1};A.current=!1,o(function(e){var t=_e.parse(e);if(!(t.force_preroll||t.force_midroll||t.force_postroll||t.force_lower_third_display||t.force_squeezeback_display||t.force_outstream_video))return null;var n={sessionID:(0,Le.SG)(),adFormat:Fe.gz.STANDARD_VIDEO,duration:30,forced:!0,roll:Me.df.Pre};t.force_midroll&&(n.roll=Me.df.Mid,n.duration=parseInt(t.force_midroll.toString(),10)||30);t.force_postroll&&(n.roll=Me.df.Post);t.force_lower_third_display&&(n.adFormat=Fe.Z$.LOWER_THIRD,n.duration=parseInt(t.force_lower_third_display.toString(),10)||10,n.roll=Me.df.Mid,n.mafsDecision=Me.ne);t.force_squeezeback_display&&(n.adFormat=Fe.Z$.SQUEEZEBACK,n.duration=parseInt(t.force_squeezeback_display.toString(),10)||10,n.roll=Me.df.Mid,n.mafsDecision=Me.tV);t.force_outstream_video&&(n.roll=Me.df.Mid);t.amzpvw&&t.previewSlot&&Number.isInteger(Number(t.amzpvw))&&(n.previewCreativeId=t.amzpvw.toString(),n.previewCreativeSlot=t.previewSlot.toString(),n.previewCountryCode=t.previewCountryCode?t.previewCountryCode.toString():"US",n.adFormat=(0,Fe.sW)(t.previewSlot.toString()),n.duration=60,n.mafsDecision=Me.iG);return n}(window.location.search)||e)}}),[o])),r.useEffect((function(){!f||b.current||P||o({sessionID:(0,Le.SG)(),adFormat:Fe.gz.STANDARD_VIDEO,roll:Me.df.Pre,duration:aa()}),b.current=f}),[o,f,P]),(0,a.jsx)(la,{})})),fa=v.x.wrap((function(){return n.e(6184).then(n.bind(n,579962))}),"PushdownSDAEligibilityHandler",{failSilently:!0,placeholder:null}),ga=(0,l.X)({name:"VideoAds"})((function(){var e=(0,c.d4)((function(e){return{firstPageLoaded:e.session.firstPageLoaded}}),c.bN).firstPageLoaded,t=r.useContext(h.$g).mediaPlayerInstance,n=(0,Xt._)("omsdk_ad_measurement","boolean",!1).value;return r.useEffect((function(){if(t){var e={timeoutID:void 0,setup:function(){this.timeoutID=setTimeout((function(){var e,n;t&&!t.isPaused()&&s.IG.set("ads_bitrate_bps",null!==(n=null===(e=t.getQuality())||void 0===e?void 0:e.bitrate)&&void 0!==n?n:0,{expireInMS:12096e5})}),2e4)},cancel:function(){clearTimeout(this.timeoutID)}},n=function(){e.setup()};return t.addEventListener(C.p.PLAYING,n),function(){t&&t.removeEventListener(C.p.PLAYING,n),e.cancel()}}}),[t]),(0,a.jsxs)(dn,{children:[(0,a.jsx)(ma,{}),(0,a.jsx)(ai,{}),(0,a.jsx)(Ii,{}),(0,a.jsx)(Ni.b3,{}),(0,a.jsx)(xi,{}),(0,a.jsx)(Ti,{}),(0,a.jsx)(_n.Tm,{}),(0,a.jsx)($i,{}),(0,a.jsx)(na,{}),n?(0,a.jsx)(ea.ws,{}):(0,a.jsx)(Di.c,{}),e&&(0,a.jsx)(fa,{}),(0,a.jsx)(Vi,{}),(0,a.jsx)(Ji,{})]})})),ya=n(412085);!function(e){e.UNKNOWN="Unspecified",e.FILE="File",e.SEGMENT="Segment",e.SOURCE="Source",e.DECODER="Decode",e.RENDERER="Render",e.MASTER_PLAYLIST="MasterPlaylist",e.MEDIA_PLAYLIST="MediaPlaylist",e.DRM="DRM"}(ca||(ca={})),function(e){e.GENERIC="Error",e.NOT_SUPPORTED="ErrorNotSupported",e.NO_SOURCE="ErrorNoSource",e.INVALID_DATA="ErrorInvalidData",e.INVALID_STATE="ErrorInvalidState",e.INVALID_PARAMETER="ErrorInvalidParameter",e.TIMEOUT="ErrorTimeout",e.INVALID_OUTPUT="ErrorInvalidOutput",e.INTERNAL="ErrorInternal",e.NETWORK="ErrorNetwork",e.NETWORK_IO="ErrorNetworkIO",e.AUTHORIZATION="ErrorAuthorization",e.NOT_AVAILABLE="ErrorNotAvailable"}(pa||(pa={})),function(e){e[e.GEOBLOCKED=1]="GEOBLOCKED",e[e.UNSUPPORTED_DEVICE=2]="UNSUPPORTED_DEVICE",e[e.ANONYMIZER_BLOCKED=3]="ANONYMIZER_BLOCKED",e[e.CELLULAR_NETWORK_PROHIBITED=4]="CELLULAR_NETWORK_PROHIBITED",e[e.UNAUTHORIZATION_ENTITLEMENTS=5]="UNAUTHORIZATION_ENTITLEMENTS",e[e.VOD_RESTRICTED=6]="VOD_RESTRICTED"}(va||(va={}));var ha=n(543005);function _a(e){var t=e.disableAutoplay;return e.exclusivePlayback?!(t||e.activePlayerRefID&&e.activePlayerRefID!==e.playerRefID):!t}var ka,Sa=n(216743),Ca=n(709870),ba=n.n(Ca);!function(e){e.Failure="failure",e.Skipped="skipped",e.Success="success"}(ka||(ka={}));var Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lastStreamUpServerTime:0,channelLoginWaitingForTrackingUpdate:null},t.vp9Disabled=!1,t.logger=t.props.logger.withCategory("on-video-source-props-changed"),t.retryVP9Error=function(e,n){return(0,i.__awaiter)(t,void 0,Promise,(function(){var t,a,r,o,s;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return(t=this.props.mediaPlayerInstance)&&(a=t.getQuality())?(r=a.codecs,o=e===ca.DECODER,s=(e===ca.MASTER_PLAYLIST||e===ca.MEDIA_PLAYLIST)&&n>=500,r.includes(tt.Hn)&&(o||s)?(this.vp9Disabled=!0,Sa.e3(),[4,this.setSrc()]):[3,2]):[2,!1];case 1:return[2,i.sent()===ka.Success];case 2:return[2,!1]}}))}))},t.setSrc=function(){for(var e=[],n=0;n0&&a.IG.set(u.U.BITRATE,e.bitrate))}function g(e,t){var n=m(e);if(n){var i=A(t,n);if(i)return i}return l.IJ}function y(){return a.IG.getOptional(u.U.BITRATE)}function h(){a.IG.set(l.A8,Date.now())}function _(e){return void 0===e&&(e=0),a.IG.get(l.A8,e)}function k(e){return"p"===e.quality.trim().slice(-1)?e.quality:"".concat(e.quality,"p")}function S(e,t){var n=e.getQualities();return t?n:(0,i.__spreadArray)([l.IJ],n,!0)}function C(e){return(e.getUnavailableQualities()||[]).filter((function(e){var t=0===e.authReasons.length||e.authReasons.every((function(e){return v.iq.includes(e)})),n=0===e.filterReasons.length||e.filterReasons.every((function(e){return v.iq.includes(e)})),i=e.authReasons.length>0||e.filterReasons.length>0;return t&&n&&i}))}function b(e){return function(e,t){return A(function(e){return e.availableQualities}(t),e)}(e.quality,e)||l.IJ}function P(e){var t="string"==typeof e?e:e.group;if(t)return t.split("-")[0]}function A(e,t){return e.find((function(e){return P(e)===P(t)}))}function E(e){return o()&&(0,c.Jn)(e.playerPublicPropsContext.content)?"0":(0,p.wk)(e).forceQuality||(0,p.wk)(e).initialQuality||m(e.playerPublicPropsContext.type)||s.Sw.quality}function I(e,t){return{quality:e,strategy:t}}function T(e,t,n,i){var a=A(e,t);if(a)return I(a,"matching");if(i){var r=parseInt(t,10),o=e.slice().reverse().find((function(e){return parseInt(e.group,10)>r}));return o?I(o,"closest"):I(e[0],"highest")}var s=e.concat().sort((function(e,t){return t.bitrate-e.bitrate})),l=s.find((function(e){return e.bitrate=4096e3?"4k":t>=2304e3?"2k":t>=1024e3?"fullHD":t>=921600?"HD":"SD"}function N(e,t){return"2k"!==t&&"4k"!==t||(e.startsWith("hev1")||e.startsWith("hvc1"))}function w(e){return e.hasOwnProperty("filterReasons")}function R(e){return e.find((function(e){return e.group===l.ep&&!w(e)}))}var x=["2k","4k"];function L(e){var t=e.find((function(e){return e&&e.group===l.w_}));return t||e.reduce((function(e,t){return t?"source"!==t.variantSource?e:e?t.bitrate>e.bitrate?t:e:t:e}),null)}function F(e,t){if(!e)return!1;if(!function(e){return e.group===l.w_||"variantSource"in e&&"source"===e.variantSource}(e))return!1;var n=L(t);return e.variantId?e.variantId===(null==n?void 0:n.variantId):e.name===(null==n?void 0:n.name)}function M(e){var t,n=e.availableQualities,a=e.unavailableQualities,r=(null===(t=n[0])||void 0===t?void 0:t.group)===l.s9;return(0,i.__spreadArray)((0,i.__spreadArray)((0,i.__spreadArray)([r?n[0]:null],a,!0),[r?null:n[0]],!1),n.slice(1),!0).filter((function(e){return!!e}))}function V(e,t,n){if(e.group===l.s9)t.setAutoQualityMode(!0);else{var i=t.getQuality();i&&i.group!==e.group&&n(!0);var a=e.group!==l.ep;t.setQuality(e,a)}}var O=function(e,t,n){t&&e({availableQualities:S(t,n),unavailableQualities:C(t)})},U=function(e){return e.variantId===l.eU}},113024:function(e,t,n){"use strict";n.d(t,{DZ:function(){return r},iq:function(){return l},oq:function(){return o},vb:function(){return s}});var i=n(883474),a=function(){return(0,i.hw)("Learn more","SettingsMenuSubmenuQuality")},r={deviceNotSupported:function(){return{id:"NOT_SUPPORTED",title:(0,i.hw)("Device not supported","SettingsMenuSubmenuQuality"),message:(0,i.hw)("The device you are using is not compatible with some stream qualities.","SettingsMenuSubmenuQuality"),linkText:a(),linkTo:"https://link.twitch.tv/resolution#how-to-watch"}},deviceOrSettingsIssue:function(){return{id:"DEVICE_OR_SETTINGS_ISSUE",title:(0,i.hw)("Device or settings issue","SettingsMenuSubmenuQuality"),message:(0,i.hw)("Your browser settings, software, or device do not support some stream qualities","SettingsMenuSubmenuQuality"),linkText:(0,i.hw)("Troubleshooting","SettingsMenuSubmenuQuality"),linkTo:"https://link.twitch.tv/resolution#troubleshooting"}},locationRestriction:function(){return{id:"LOCATION_RESTRICTION",title:(0,i.hw)("Location restriction","SettingsMenuSubmenuQuality"),message:(0,i.hw)("The disabled quality settings are not currently supported in your location.","SettingsMenuSubmenuQuality"),linkText:a(),linkTo:"https://link.twitch.tv/resolution#how-to-watch"}},loggedOut:function(){return{id:"LOGGED_OUT",title:(0,i.hw)("You're logged out!","SettingsMenuSubmenuQuality"),message:(0,i.hw)("Sign up or log in to view higher resolutions.","SettingsMenuSubmenuQuality")}},generic:function(){return{id:"GENERIC",title:(0,i.hw)("Heads up!","SettingsMenuSubmenuQuality"),message:(0,i.hw)("Some stream qualities may not be available to you.","SettingsMenuSubmenuQuality"),linkText:a(),linkTo:"https://link.twitch.tv/resolution"}}},o={FR_RESOLUTION_DISALLOWED:r.generic,FR_BITRATE_DISALLOWED:r.generic,FR_FRAMERATE_DISALLOWED:r.generic,FR_SOURCE_DISALLOWED:r.generic,FR_OTHER_DISALLOWED:r.generic,FR_CODEC_NOT_REQUESTED:r.deviceOrSettingsIssue,FR_CODEC_DEVICE_INCOMPATIBLE:r.deviceOrSettingsIssue,FR_CODEC_DEVICE_BLOCKLISTED:r.deviceNotSupported,FR_EXPERIMENT_FILTERING:r.generic,AUTHZ_GEO:r.locationRestriction,AUTHZ_NOT_LOGGED_IN:r.loggedOut,AUTHZ_NOT_SUBSCRIBED:r.generic,AUTHZ_NOT_TURBO:r.generic,AUTHZ_DISALLOWED_BITRATE:r.generic},s=[r.locationRestriction,r.deviceNotSupported,r.loggedOut,r.deviceOrSettingsIssue,r.generic],l=["FR_CODEC_NOT_REQUESTED","FR_CODEC_DEVICE_INCOMPATIBLE","FR_CODEC_DEVICE_BLOCKLISTED","AUTHZ_GEO","AUTHZ_NOT_LOGGED_IN"]},163419:function(e,t,n){"use strict";n.d(t,{FQ:function(){return a},iI:function(){return r}});var i=["landscape","portrait"];var a=function(e,t,n){var i=null==t?void 0:t.getSourceGroups();if((null==i?void 0:i.length)&&i.find((function(t){return t.name===e}))){var a=null==t?void 0:t.getSourceGroup();e!==(null==a?void 0:a.name)&&(n({pendingChange:!0}),null==t||t.setSourceGroup(e))}},r=function(e,t){var n,a,r=null===(n=null==e?void 0:e.getSourceGroup())||void 0===n?void 0:n.name,o=r&&("string"==typeof(a=r)&&i.includes(a))?r:void 0,s=null==e?void 0:e.getSourceGroups();t({current:o,multiformat:!!(s&&s.length>1),pendingChange:!1})}},536330:function(e,t,n){"use strict";function i(e){return e?{height:e.clientHeight,width:e.clientWidth}:{}}function a(e){if(e){var t=e.getBoundingClientRect(),n=t.top;return{x:t.left,y:n,width:t.width,height:t.height}}return{}}n.d(t,{G:function(){return a},P:function(){return i}})},39896:function(e,t,n){"use strict";n.d(t,{Hn:function(){return b},Ub:function(){return A},jL:function(){return P}});var i=n(331635),a=n(882439),r=n(883474),o=n(12109),s=n(323570),l=n(975928),d=n(697621),u=n(243707),c=n(212276),p=n(366824),v=n(249448),m=n(562099),f=n(334609),g=n.n(f),y=n(686499),h=n.n(y),_=n(411749),k=n(94245),S=n(336001),C="https://usher.ttvnw.net",b="vp09";function P(e,t){if((0,v.DG)(e)&&(0,v.DG)(t))return e.channelLogin!==t.channelLogin;if(e.type!==t.type)return!0;if((0,v.wy)(e))return e.vodID!==t.vodID;if((0,v.P3)(e))return e.collectionID!==t.collectionID||e.vodID!==t.vodID;if((0,v.Jn)(e)){var n=t,i=(e.editing&&e.editing.videoUrl)!==(n.editing&&n.editing.videoUrl);return e.clipSlug!==n.clipSlug||i||e.preferPortrait!==n.preferPortrait}}function A(e,t,n,a){return(0,i.__awaiter)(this,arguments,Promise,(function(e,t,n,a,r,o,s){var l;return void 0===r&&(r=!1),(0,i.__generator)(this,(function(i){switch(i.label){case 0:switch(l=n||C,e.type){case c.FC.Live:return[3,1];case c.FC.VOD:return[3,2];case c.FC.Collection:return[3,3];case c.FC.Clip:return[3,4]}return[3,6];case 1:return[2,E(e.channelLogin,t,l,r,a,o,s)];case 2:return[2,I(e.vodID,t,l,r,a,o,s)];case 3:return[2,T(e,t,l,r,a,o,s)];case 4:return[4,w(e.clipSlug,e.preferPortrait)];case 5:return[2,i.sent()];case 6:return[2,{src:null}]}}))}))}function E(e,t,n,a,o,s,l){return(0,i.__awaiter)(this,void 0,void 0,(function(){var d,u,c,p,v,m,f,g,y,h;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return e=e.toLowerCase(),d=performance.now(),[4,(0,S.l)({channelLogin:e,playerType:t,refreshAccessToken:a})];case 1:if(u=i.sent(),c=Math.round(performance.now()-d),!u)return[2,{src:null,videoAccessToken:void 0,accessTokenLoadTime:c}];p=null,v=!1;try{(m=JSON.parse(u.token))&&m.authorization&&(p=isNaN(m.authorization.access_expiration)?null:m.authorization.access_expiration,v=m.authorization.forbidden)}catch(e){r.vF.warn("Error parsing video access token: ".concat(e))}return f=!!(null==l?void 0:l.multiformat),g=!!(null==l?void 0:l.usherV2)&&(0,k.Rh)(),y=g||f,[2,{src:"".concat(n,"/api").concat(y?"/v2":"","/channel/hls/").concat(e,".m3u8?").concat(D({live:!0,videoAccessToken:u,isVP9Available:o,playSessionId:s,includeUnavailableVariants:!0,includeMultigroupVideo:f,allowAudioOnly:null!==(h=null==l?void 0:l.allowAudioOnly)&&void 0!==h&&h})),videoAccessToken:u,forbidden:v,accessExpiration:p,accessTokenLoadTime:c}]}}))}))}function I(e,t,n,a,r,o,s){return(0,i.__awaiter)(this,void 0,void 0,(function(){var l,d,u,c,p,v,m,f;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return e=e.startsWith("v")?e.substr(1):e,l=performance.now(),[4,(0,S.l)({playerType:t,vodID:e,refreshAccessToken:a})];case 1:return d=i.sent(),u=Math.round(performance.now()-l),d?(c=!!(null==s?void 0:s.multiformat),p=!!(null==s?void 0:s.usherV2)&&(0,k._h)(),v=p||c,m="".concat(n,"/vod").concat(v?"/v2":"","/").concat(e,".m3u8?").concat(D({live:!1,videoAccessToken:d,isVP9Available:r,playSessionId:o,includeUnavailableVariants:!0,includeMultigroupVideo:c,allowAudioOnly:null!==(f=null==s?void 0:s.allowAudioOnly)&&void 0!==f&&f})),[2,{accessTokenLoadTime:u,videoAccessToken:d,src:m}]):[2,{src:null,accessTokenLoadTime:u}]}}))}))}function T(e,t,n,a,r,o,s){return(0,i.__awaiter)(this,void 0,void 0,(function(){var l,d;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return(d=e.vodID)?[3,2]:[4,N(e.collectionID)];case 1:d=i.sent(),i.label=2;case 2:return(l=d)?[4,I(l,t,n,a,r,o,s)]:[2,{src:null}];case 3:return[2,i.sent()]}}))}))}function D(e){var t,n,i,u,c,v,m,f,g,y=e.live,h=e.videoAccessToken,_=e.playSessionId,k=e.includeUnavailableVariants,S=void 0!==k&&k,C=e.includeMultigroupVideo,b=void 0!==C&&C,P=e.allowAudioOnly,A=void 0!==P&&P,E=(0,p.hS)(window.navigator.userAgent),I={BrowseItemTrackingId:null===(n=null===(t=r.x2.router.state.location)||void 0===t?void 0:t.state)||void 0===n?void 0:n.item_tracking_id,AppVersion:r.x2.config.buildID,ClientApp:(0,l.t4)()?"android":(0,l.D6)()?"ios":(0,l.FP)()?"mobile_web":"web"};(0,l.D6)()&&(I.SKAdNetworks=d.H$.skAdNetworks,I.SKAdVersions=d.H$.skanVersions,I.SKAdSourceApp=d.H$.sourceApp);var T={acmb:btoa(JSON.stringify(I)),raid_id:void 0,force_manifest_node:void 0,force_segment_node:void 0,force_weaver_ads:void 0,force_preroll:void 0,force_midroll:void 0,force_creative_id:void 0,allow_source:!0,allow_audio_only:!!A||void 0,fast_bread:!!y||void 0,playlist_include_framerate:!0,reassignments_supported:!0,sig:h.sig,token:h.token,player_backend:"mediaplayer",p:Math.floor(9999999*Math.random()),play_session_id:_,lang:r.x2.intl.getLanguageCode()||void 0,dt:void 0,bndl:void 0,app:void 0,os:void 0,transode_mode:void 0,parent_domains:void 0,include_unavailable:S,multigroup_video:b};if((0,o.fX)("twilight_device_type")&&(T.dt=E),y){T.raid_id=null===(u=null===(i=r.x2.router.state.location)||void 0===i?void 0:i.state)||void 0===u?void 0:u.raid_id;var D=a.parse(window.location.search);T.force_manifest_node=null===(c=D.force_manifest_node)||void 0===c?void 0:c.toString(),T.force_segment_node=null===(v=D.force_segment_node)||void 0===v?void 0:v.toString(),"true"===D.force_weaver_ads&&(T.force_weaver_ads=D.force_weaver_ads,T.force_preroll=null===(m=D.force_preroll)||void 0===m?void 0:m.toString(),T.force_midroll=null===(f=D.force_midroll)||void 0===f?void 0:f.toString(),T.force_creative_id=null===(g=D.force_creative_id)||void 0===g?void 0:g.toString())}return T.transcode_mode="cbr_v1",(0,s.W)()&&(T.parent_domains=["twitchplayer"]),a.stringify(T)}function N(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var t,n,a;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,r.x2.apollo.client.query({query:h(),variables:{id:e}})];case 1:return t=i.sent(),n=t.data.collection,[2,(a=n&&n.items.edges[0])&&a.node.id];case 2:return i.sent(),[2];case 3:return[2]}}))}))}function w(e,t){return(0,i.__awaiter)(this,void 0,Promise,(function(){var n,a,o,s,l,d,c,p,v,f,y;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return[4,r.x2.apollo.client.query({query:g(),variables:{platform:(0,_.R)(),slug:e}})];case 1:return n=i.sent(),a=n.data.clip,o=(0,u.JF)(null==a?void 0:a.assets),s=o.sourceAsset,l=o.portraitAsset,(d=t?null!==(p=null==l?void 0:l.videoQualities)&&void 0!==p?p:null==s?void 0:s.videoQualities:null!==(v=null==s?void 0:s.videoQualities)&&void 0!==v?v:null==l?void 0:l.videoQualities)&&(null===(f=null==a?void 0:a.playbackAccessToken)||void 0===f?void 0:f.value)&&(null===(y=a.playbackAccessToken)||void 0===y?void 0:y.signature)?(c={version:1,token:{value:a.playbackAccessToken.value,signature:a.playbackAccessToken.signature},assets:d.map((function(e){return{frameRate:e.frameRate,name:(0,m.u5)(e),sourceURL:e.sourceURL,width:e.width,height:e.height,bitrate:e.bitrate,codecs:e.codecs}}))},[2,{src:JSON.stringify(c)}]):[2,{src:""}]}}))}))}},94245:function(e,t,n){"use strict";n.d(t,{Rh:function(){return a},_h:function(){return r},ny:function(){return o}});var i=n(883474),a=function(){return i.Mv.getAssignment("confessions-part-two-live","boolean",!1)},r=function(){return i.Mv.getAssignment("confessions-part-two-vod","boolean",!1)},o=function(){return i.Mv.getAssignment("my-boo-embed","boolean",!1)}},553485:function(e,t,n){"use strict";n.d(t,{M:function(){return d},X:function(){return l}});var i=n(331635),a=n(883474),r=n(411749),o=n(889554),s=n.n(o),l=function(e,t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){return(0,i.__generator)(this,(function(n){return[2,u({live:!0,login:e,playerType:t})]}))}))},d=function(e,t){return(0,i.__awaiter)(void 0,void 0,void 0,(function(){return(0,i.__generator)(this,(function(n){return[2,u({live:!1,vodID:e,playerType:t})]}))}))};function u(e){return(0,i.__awaiter)(this,void 0,Promise,(function(){var t,n,o,l,d,u;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,a.x2.apollo.client.query({query:s(),fetchPolicy:"no-cache",variables:{isLive:e.live,login:e.live&&e.login||"",isVod:!e.live,vodID:!e.live&&e.vodID||"",playerType:e.playerType,platform:(0,r.R)()}})];case 1:return t=i.sent(),n=null===(d=null==t?void 0:t.data)||void 0===d?void 0:d.streamPlaybackAccessToken,o=null===(u=null==t?void 0:t.data)||void 0===u?void 0:u.videoPlaybackAccessToken,e.live&&n?[2,{token:n.value,sig:n.signature,authorization:n.authorization,mobile_restricted:!1}]:!e.live&&o?[2,{token:o.value,sig:o.signature,mobile_restricted:!1}]:[3,3];case 2:return l=i.sent(),a.x2.logger.warn("Received an error while fetching PlaybackAccessToken from GQL",l),[3,3];case 3:return[2]}}))}))}},216743:function(e,t,n){"use strict";n.d(t,{Mx:function(){return s},X5:function(){return o},e3:function(){return m},ic:function(){return d},jN:function(){return l}});var i=n(883474),a=n(331337),r={};var o=u(p),s=u(v),l=c(p),d=c(v);function u(e){return function(t,n){var o=e(t,n),s=r[o],l=n===a.C.Site||n===a.C.SiteMini;if(o.startsWith("live")&&l){var d=i.x2.vat.getCachedToken({type:"live",channel:t});if(d)return d}if(s)try{var u=JSON.parse(s.token);return Date.now()>=1e3*u.expires?void delete r[o]:s}catch(e){return void delete r[o]}}}function c(e){return function(t,n,i){r[e(t,n)]=i}}function p(e,t){return"live-".concat(t,"-").concat(e)}function v(e,t){return"vod-".concat(t,"-").concat(e)}function m(){var e;r=e||{}}},336001:function(e,t,n){"use strict";n.d(t,{l:function(){return c},P:function(){return f}});var i=n(331635),a=n(876531),r=n(411749),o=n(553485),s=n(216743),l=u("live"),d=u("vod");function u(e){var t=this;return function(n,a,r){return(0,i.__awaiter)(t,void 0,Promise,(function(){var t,o,s;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return window.__vat&&window.__vat.contentType===e&&window.__vat.playerType===a&&window.__vat.id===n&&window.__vat.platform===r?[4,window.__vat.request]:[3,5];case 1:if(!(t=i.sent()).ok||t.bodyUsed)return[3,5];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,t.json()];case 3:return o=i.sent(),[2,{mobile_restricted:!1,sig:(s="live"===e?o.data.streamPlaybackAccessToken:o.data.videoPlaybackAccessToken).signature,token:s.value,authorization:s.authorization}];case 4:return i.sent(),[2];case 5:return[2]}}))}))}}function c(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(t){return e.channelLogin?[2,p(e.channelLogin,e.playerType,e.refreshAccessToken)]:e.vodID?[2,v(e.vodID,e.playerType,e.refreshAccessToken)]:[2]}))}))}var p=m({get:s.X5,set:s.jN},l,o.X),v=m({get:s.Mx,set:s.ic},d,o.M);function m(e,t,n){var a=this;return function(o,s,l){return(0,i.__awaiter)(a,void 0,void 0,(function(){var a,d,u,c;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return(a=e.get(o,s))&&!l?[2,a]:(d=(0,r.R)(),[4,t(o,s,d)]);case 1:return(u=i.sent())&&!l?(e.set(o,s,u),[2,u]):[4,n(o,s,d)];case 2:return(c=i.sent())?(e.set(o,s,c),[2,c]):[2]}}))}))}}var f=function(e){var t;if(null===(t=e.authorization)||void 0===t?void 0:t.isForbidden){var n=e.authorization.forbiddenReasonCode;return n===a.Xaf.UNAUTHORIZED||n===a.Xaf.CHANNEL_RESTRICTED_BANNED_USER}return!1}},455600:function(e,t,n){"use strict";n.d(t,{x:function(){return s}});var i=n(474848),a=n(883474),r=n(435287),o=n(673066),s=function(e){var t=e.children;return(0,i.jsx)(r.rj,{iconProps:{type:o.W.Empty},text:(0,a.hw)("An error occurred. Please try again.","CoreVideoPlayerErrorBoundary"),children:t})}},477540:function(e,t,n){"use strict";n.d(t,{Nb:function(){return u}});var i=n(331635),a=n(296540),r=n(868238),o=n(514105),s=n(641896),l=n(947153),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleSeekCompleted=function(){var e=t.props.mediaPlayerInstance;if(e){var n=e.getPosition();t.props.onSeekComplete(n)}},t}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.playerEvents.addEventListener(l.a.SEEK_COMPLETED,this.handleSeekCompleted)},t.prototype.render=function(){return null},t}(a.Component),u=(0,r.Zz)((0,s.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}})),(0,o.X)())(d)},504349:function(e,t,n){"use strict";n.d(t,{Sf:function(){return m}});var i=n(331635),a=n(474848),r=n(959340),o=n(246942),s=n.n(o),l=(n(296540),n(868238)),d=n(345942),u=n(911906),c=n(334963),p=n(339563),v=n(894320),m=(0,l.Zz)((0,d.In)((function(e){return{active:e.active}})),(0,u.cj)((function(e){var t=(0,v.wk)({playerPublicPropsContext:e}),n=t.forceControlVisibility,i=t.forceMouseVisibilityOverPlayer;return{forceControlVisibilityShowing:n===p.Ie.Showing,forceMouseVisibilityOverPlayer:!!i}})),(0,c.AP)((function(e){return{isPlaying:e.isPlaying}})))((function(e){var t=e.active,n=e.forceControlVisibilityShowing,o=e.forceMouseVisibilityOverPlayer,l=e.isPlaying,d=e.layoutProps,u=e.children;return(0,a.jsx)(r.P,(0,i.__assign)({className:s()("video-player__default-player",{"video-player__inactive":!t&&l&&!n&&!o})},d,{children:u}))}))},435287:function(e,t,n){"use strict";n.d(t,{rj:function(){return D}});var i=n(331635),a=n(474848),r=n(312663),o=n(914421),s=n(588702),l=n(959340),d=n(434848),u=n(371439),c=n(246942),p=n.n(c),v=n(296540),m=n(868238),f=n(883474),g=n(621790),y=n(641896),h=n(911906),_=n(731820),k=n(894320),S=n(947322),C=n(305528),b=n(673066),P=function(e){var t=null,n=e.isSmall?64:80,i=e.type===b.W.TwitchLogo;switch(e.type){case b.W.Icon:var r=e.icon;t=(0,a.jsx)(r,{fillColor:"inherit",size:"100%"});break;case b.W.TwitchLogo:var o=e.svg;t=(0,a.jsx)(o,{fillColor:"inherit",width:"100%",height:"100%"});break;case b.W.Avatar:t=(0,a.jsx)(S.e,{src:e.src,alt:e.alt,size:n,userLogin:e.login});break;case b.W.Placeholder:t=(0,a.jsx)(C.Or,{height:n,width:n,overlay:!0});case b.W.Empty:}var s=80;return e.isSmall&&(s=i?40:64),(0,a.jsx)(l.P,{height:"".concat(s,"px"),children:t})},A=n(308104),E=n(810509),I=n(536330),T=n(889933);var D=(0,m.Zz)((0,h.cj)((function(e){return{mini:(0,k.wk)({playerPublicPropsContext:e}).mini}})),(0,_.c0)((function(e){return{videoContainer:e.videoContainer}})),(0,y.dd)((function(e){return{error:e.error}})))((function(e){var t,n=function(e){var t=(0,v.useState)(((0,I.P)(e.videoContainer).width||0)<580),n=t[0],i=t[1],a=(0,T.G)((function(e){return e.pageRootRef}));return{isSmall:n,isMwebFullPageGate:null!=(null==a?void 0:a.current),onResize:function(e){i(e<580)}}}({videoContainer:e.videoContainer}),c=n.onResize,m=n.isSmall,y=n.isMwebFullPageGate,h=function(e,t){return(0,a.jsx)(r.N,{fontSize:m&&!y?o.Z4.Size6:o.Z4.Size4,bold:!0,lineHeight:s.aK.Heading,color:o.Q1.Overlay,className:"content-overlay-gate__allow-pointers",children:e},"".concat(e,"-").concat(t))};return(0,a.jsxs)(A._,{children:[(0,a.jsx)(g.$,{onResize:c}),(0,a.jsx)(E.FT,{className:"content-overlay-gate",type:E.NL.Fullscreen,transparency:E.xL.Transparency0,children:e.mini?(0,a.jsxs)(a.Fragment,{children:[e.error?(0,a.jsx)(d.m,{height:60,width:60}):(0,a.jsx)(u.X,{size:80}),(0,a.jsx)(l.P,{padding:{top:1},children:(0,a.jsx)(r.N,{fontSize:o.Z4.Size4,bold:!0,lineHeight:s.aK.Heading,color:o.Q1.Overlay,children:e.error?(0,f.hw)("Error #{error}",{error:e.error.toString()},"ContentOverlayGate"):(0,f.hw)("Content Restricted","ContentOverlayGate")})})]}):(0,a.jsxs)(l.P,{className:p()("content-overlay-gate__content",{"content-overlay-gate__content--full":m}),display:o.nl.Flex,flexDirection:o.bo.Column,alignItems:o.k2.Center,"data-a-target":"player-overlay-content-gate",padding:m?{x:1}:void 0,position:o.yX.Relative,role:"dialog","aria-labelledby":"content-overlay-gate-text",children:[(0,a.jsx)(P,(0,i.__assign)({},e.iconProps,{isSmall:m&&!y})),(t=e.text,(0,a.jsx)(l.P,{margin:{top:2},textAlign:o.nO.Center,children:"string"==typeof t?h(t,0):t.map(h)})),e.children&&(0,a.jsx)(l.P,{margin:{top:m?2:3},className:"content-overlay-gate__allow-pointers",width:"100%",display:"flex",justifyContent:"center",children:e.children(m,y)})]})})]})}))},668727:function(e,t,n){"use strict";n.d(t,{p:function(){return l}});var i=n(474848),a=n(959340),r=n(564368),o=n(889933),s=n(571288),l=function(e){var t=e.buttonVariant,n=void 0===t?"secondary":t,l=(0,o.G)((function(e){return e.pageRootRef}));return(null==l?void 0:l.current)?(0,i.jsx)(a.P,{display:"flex",justifyContent:"center",margin:{top:5},width:"100%",children:(0,i.jsx)(r.$n,{variant:n,size:"large",linkTo:"/",fullWidth:!0,children:(0,s.bw)()})}):null}},308104:function(e,t,n){"use strict";n.d(t,{_:function(){return c},p:function(){return u}});var i=n(474848),a=n(959340),r=n(914421),o=n(296540),s=n(440961),l=n(276426),d=n(889933),u=function(){var e=(0,o.useRef)(null),t=(0,d.G)((function(e){return e.setPageRootRef}));return(0,o.useEffect)((function(){return t(e),function(){t(null)}}),[t]),(0,i.jsx)(a.P,{ref:e,zIndex:r.Py.Above})},c=function(e){var t=e.children,n=(0,d.G)((function(e){return e.pageRootRef}));return t?(null==n?void 0:n.current)?(0,s.createPortal)((0,i.jsx)(p,{children:t}),n.current):t:null},p=function(e){var t=e.children,n=(0,d.G)((function(e){return e.pageRootRef}));return v({container:n}),(0,i.jsx)(a.P,{height:"100%",width:"100%",attachTop:!0,attachLeft:!0,position:"absolute",style:{pointerEvents:"auto"},children:t})},v=function(e){var t=e.container;(0,o.useEffect)((function(){(null==t?void 0:t.current)&&(0,l.b)(t.current)}),[t])}},889933:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var i=(0,n(25006).vt)()((function(e){return{pageRootRef:null,setPageRootRef:function(t){return e({pageRootRef:t})}}}))},673066:function(e,t,n){"use strict";var i;n.d(t,{W:function(){return i}}),function(e){e.Empty="Empty",e.Icon="Icon",e.Avatar="Avatar",e.Placeholder="Placeholder",e.TwitchLogo="TwitchLogo"}(i||(i={}))},810509:function(e,t,n){"use strict";n.d(t,{FT:function(){return c},NL:function(){return a},xL:function(){return i}});var i,a,r=n(331635),o=n(474848),s=n(914421),l=n(959340),d=n(246942),u=n.n(d);n(296540);!function(e){e[e.Transparency0=0]="Transparency0",e[e.Transparency1=1]="Transparency1",e[e.Transparency3=3]="Transparency3",e[e.Transparency5=5]="Transparency5",e[e.Transparency6=6]="Transparency6",e[e.Transparency10=10]="Transparency10"}(i||(i={})),function(e){e.Center="center",e.Fullscreen="fullscreen",e.Sidebar="sidebar"}(a||(a={}));var c=function(e){var t,n,d=u()("player-overlay-background",(0,r.__assign)({},[i.Transparency0,i.Transparency1,i.Transparency3,i.Transparency5,i.Transparency6].reduce((function(t,n){var i;return(0,r.__assign)((0,r.__assign)({},t),((i={})["player-overlay-background--darkness-".concat(n)]=e.transparency===n,i))}),{})),e.className),c={};switch(e.type){case a.Fullscreen:c={flexDirection:s.bo.Column,justifyContent:s.A9.Center,alignItems:s.k2.Center,color:s.Q1.Overlay,attachLeft:!0,display:s.nl.Flex};break;case a.Center:c={padding:2,width:null!==(t=e.customWidth)&&void 0!==t?t:"37rem"};break;case a.Sidebar:c={padding:2,width:null!==(n=e.customWidth)&&void 0!==n?n:"32rem"}}return(0,o.jsx)(l.P,(0,r.__assign)({className:d,position:s.yX.Absolute,attachTop:!0,attachRight:!0,attachBottom:!0},c,{children:e.children}))}},571288:function(e,t,n){"use strict";n.d(t,{$u:function(){return f},Bf:function(){return y},Ef:function(){return l},Kj:function(){return h},Ll:function(){return u},N0:function(){return g},Ng:function(){return m},W9:function(){return p},bw:function(){return v},lg:function(){return k},pV:function(){return _},s4:function(){return d},zN:function(){return c}});var i=n(474848),a=n(70931),r=n(883474),o=n(323570),s=n(166012),l=function(){return(0,r.hw)("Just one second...","ContentClassificationGateOverlay")},d=function(e){return(0,r.hw)("{channel}'s content is intended for certain audiences",{channel:e},"ContentClassificationGateOverlay")},u=function(e){return(0,r.hw)("It may contain: {labelList}",{labelList:(0,r.ki)(e,{style:"short",type:"unit"})},"ContentClassificationGateOverlay")},c=function(){return(0,r.hw)("This content may not be appropriate for you to watch.","ContentClassificationGateOverlay")},p=function(e){return(0,r.hw)("Manage the types of content that you see in your content preference settings.",{"x:link":function(t){return(0,i.jsx)(a.Cb,{targetBlank:!e||(0,o.W)(),linkTo:{pathname:e?(0,s.VV)("/settings/content-preferences"):"https://help.twitch.tv/s/article/how-to-customize-content#ContentDisplayPreferences",state:{medium:"content_warning_overlay",content:"manage_settings_button"}},children:t})}},"ContentClassificationGateOverlay")},v=function(){return(0,r.hw)("Go Home","ContentClassificationGateOverlay")},m=function(){return(0,r.hw)("Contact Customer Support","ContentClassificationGateOverlay")},f=function(){return(0,r.hw)("Start Watching","ContentClassificationGateOverlay")},g=function(e,t){return(0,r.hw)("You must log in or create an account to continue.",{"x:loginLink":function(t){return(0,i.jsx)(a.Cb,{onClick:e,children:t})},"x:signupLink":function(e){return(0,i.jsx)(a.Cb,{onClick:t,children:e})}},"ContentClassificationGateOverlay")},y=function(){return(0,r.hw)("Due to your age and/or region, you cannot access this content.","ContentClassificationGateOverlay")},h=function(){return(0,r.hw)("Due to local law, you must verify your age before accessing this content.","ContentClassificationGateOverlay")},_=function(){return(0,r.hw)("Verify Your Age","ContentClassificationGateOverlay")},k=function(){return(0,r.hw)("This content is intended for certain audiences","ContentClassificationGateMiniOverlay")}},696894:function(e,t,n){"use strict";n.d(t,{MA:function(){return x},QH:function(){return r},YU:function(){return R},aX:function(){return D},bb:function(){return o},gw:function(){return s},l1:function(){return l},lK:function(){return L},nZ:function(){return C},p$:function(){return N},pi:function(){return T},wv:function(){return w},yi:function(){return d}});var i=n(288480),a=n(975387),r=3e3;function o(e){var t=e.activationConfig.slot.match(/\d+/)||[];return parseInt(t[0],10)}function s(e){var t,n=((t={})[i.Z1.Overlay]=[],t[i.Z1.Component]=[],t[i.Z1.Panel]=[],t[i.Z1.Hidden]=[],t);return e.length?(e.slice().sort((function(e,t){return o(e)-o(t)})).forEach((function(e){var t=e.activationConfig.anchor;Object.keys(i.Z1).some((function(e){return i.Z1[e]===t}))&&n[t].push(e)})),n):n}function l(e){return e.activationConfig.anchor===i.Z1.Overlay}function d(e){return e.activationConfig.anchor===i.Z1.Component}var u=150,c=175,p=75,v=75,m=1,f=30,g=70,y=100,h=75+m+m,_=1e4;function k(e,t,n,i,a){var r={height:t,width:n},o={height:Math.max(t,u),width:Math.max(n,c)},s={height:e?o.height:r.height,width:e?o.width:r.width},l=s.height+f;return{offset:Math.floor(0-l/2),canRender:o.height<=i&&o.height>p&&(o.width<=a&&o.width>=v),extensionSize:r,popoverContentSize:s}}var S={offset:0,shouldShow:!1,extensionSize:{height:0,width:0},popoverContentSize:{height:0,width:0},zoom:1};function C(e,t,n,a){if(void 0===t.videoHeight||void 0===t.videoWidth||null===n)return S;var r=2*(a?y:g)+2*m+f,o=t.videoHeight-r,s=t.videoWidth-h;if(n.activationConfig.anchor===i.Z1.Overlay){var l=k(e,u=Math.min(270,o),c=Math.min(260,s),o,s);return{offset:l.offset,shouldShow:l.canRender,extensionSize:E=l.extensionSize,popoverContentSize:l.popoverContentSize,zoom:1}}if(d(n)&&void 0!==n.extension.views.component){var u,c,p=n.extension.views.component,v=p.aspectRatioX,C=p.aspectRatioY,b=p.targetHeight,P=p.autoScale,A=p.scalePixels;(c=(u=o*(b/_))*v/C)>s&&(u=(c=s)*C/v);var E,I=k(e,u,c,o,s);return{offset:I.offset,shouldShow:I.canRender,extensionSize:E=I.extensionSize,popoverContentSize:I.popoverContentSize,zoom:P&&A>0?E.width/A:1}}return S}var b=142,P=80,A=59,E=.25,I={shouldShow:!1,height:0,xOffset:0,zoom:1};function T(e,t){if(!e.videoHeight)return I;var n=t?y:g,i=e.videoHeight-2*n,a=e.videoHeight*E,r=Math.min(a,b);return ri?I:{shouldShow:!0,height:r,xOffset:r*A/b-A,zoom:r/b}}function D(e){var t={identityLinkedStatus:a.Gy.UNLINKED,role:a.Xh.VIEWER};try{var n=JSON.parse(atob(e.split(".")[1]));return{identityLinkedStatus:n&&n.user_id?a.Gy.LINKED:a.Gy.UNLINKED,role:n&&n.role===a.Xh.BROADCASTER?a.Xh.BROADCASTER:a.Xh.VIEWER}}catch(e){return t}}function N(e){return D(e.extension.token).role===a.Xh.BROADCASTER}var w=function(e){return"".concat(e.id,"-").concat(e.extension.version)},R=function(e,t){return t[w(e)]||{}},x=function(e,t){var n=t[w(e)],a=e.extension.state===i.HY.Released,r=n&&n.unreleasedAccepted;return!(!a&&!r)},L=function(e){var t=e.extension,n=t.id,i=t.version;return"https://twitch.tv/ext/".concat(n,"-").concat(i)}},762227:function(e,t,n){"use strict";n.d(t,{q:function(){return wa}});var i=n(331635),a=n(474848),r=n(67813),o=n(723319),s=n(959340),l=n(914421),d=n(298830),u=n(296540),c=n(868238),p=n(883474),v=n(733016),m=n(757245),f=n(564139),g=n(963708),y=n(882197),h=n(726817),_=n(86011),k=n(324602),S=n(973373),C=n(656910),b=n(554264),P=n(246942),A=n.n(P),E=n(839719),I=n(879028),T=n(621790),D=n(844023),N=n(276337),w=n(571921),R=n(641896),x=n(911906),L=n(129721),F=n(731820),M=n(334963),V=n(249448),O=n(894320),U=n(536330),B=n(521022),j=n(498690),q=n.n(j),G=n(515514),H=n(876531),K="https://static-cdn.jtvnw.net/ttv-static/404_boxart-285x380.jpg";function z(e){var t=e.node;return t&&t.moments&&t.moments.edges&&t.moments.edges}function W(e){return e.description||""}function Q(e){var t=z(e);return t&&t.length||0}function Z(e,t,n){if(e.type===H.cD1.GAME_CHANGE){var i=e.durationMilliseconds/1e3,a=e.positionMilliseconds/1e3;if(0===i)return"";if(t){var r=Math.round(a+i-n),o=(0,G.a3)(r);return(0,p.hw)("{time} left",{time:o},"ChapterSelectButton")}return(0,G.a3)(i)}return e.subDescription||""}function Y(e){return e.thumbnailURL?e.thumbnailURL:e.details.game&&e.details.game&&e.details.game.boxArtURL?e.details.game.boxArtURL:K}var X="chapter-select-popover",$=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={currentTime:0,open:!1,submenu:null,submenuTitle:null,playerHeight:(0,U.P)(t.props.videoContainer).height},t.toggleMenu=function(){t.setState((function(e){return{open:!e.open}}))},t.closeMenu=function(){t.setState({open:!1,submenu:null,submenuTitle:null})},t.closeSubmenu=function(){t.setState({submenu:null,submenuTitle:null})},t.selectChapter=function(e){var n=t.edges();if(n){var i=n[e],a=z(i);a&&a.length?t.setState({submenu:a,submenuTitle:W(i.node)}):(t.props.seek(i.node.positionMilliseconds/1e3),t.closeMenu())}},t.setCurrentTime=function(e){t.setState({currentTime:e})},t.recalculatePlayerHeight=function(){t.setState({playerHeight:(0,U.P)(t.props.videoContainer).height})},t}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=this.edges();return e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(T.$,{onResize:this.recalculatePlayerHeight}),(0,a.jsxs)(E.V,{onClickOut:this.closeMenu,children:[this.renderBalloon(e),(0,a.jsx)(B.g,{buttonIcon:g.u,label:(0,p.hw)("Chapter Select","VideoPlayerChapterSelectButton>"),onClick:this.toggleMenu,tooltipPlacement:"top-end",disabled:this.props.error})]})]}):null},t.prototype.edges=function(){var e,t=this.state.submenu||(e=this.props.data)&&e.video&&e.video.moments&&e.video.moments.edges;return t&&t.length?t:null},t.prototype.renderBalloon=function(e){var t=this,n=A()("chapter-select-button__chapters"),r=e.map((function(n,a){return(0,u.createElement)(I.$,(0,i.__assign)({},function(e,t,n){var i=function(e,t,n){return e.node&&t&&t.node?n>=e.node.positionMilliseconds/1e3&&n=e.node.positionMilliseconds/1e3}(e,t,n);return{active:i,count:Q(e),description:Z(e.node,i,n),imageURL:Y(e.node),text:W(e.node)}}(n,e[a+1],t.state.currentTime),{index:a,key:(r=n.node,r.positionMilliseconds/1e3),onClick:t.selectChapter}));var r}));return(0,a.jsx)(y.e,{theme:"dark",children:(0,a.jsx)(s.P,{className:n,position:l.yX.Absolute,children:(0,a.jsxs)(h.A,{direction:_.j.TopLeft,maxHeight:"calc(".concat(this.state.playerHeight,"px - 10rem)"),offsetY:"5rem",popoverId:X,size:k.$V.Medium,show:this.state.open,children:[this.renderBalloonHeader(),(0,a.jsx)(D.Vq,{children:(0,a.jsxs)(S.e,{popoverId:X,children:[(0,a.jsx)(w.j,{onTimeChanged:this.setCurrentTime}),r]})})]})})})},t.prototype.renderBalloonHeader=function(){if(!this.state.submenu||!this.state.submenuTitle)return null;var e=(0,p.hw)("Back","ChapterSelectButton");return(0,a.jsx)(C.D,{popoverId:X,title:this.state.submenuTitle,buttonLeftPrimary:{"aria-label":e,icon:b.K,onClick:this.closeSubmenu,title:e},buttonRightPrimary:{onClick:this.closeMenu,"aria-label":(0,p.hw)("Close","ChapterSelectButton")}})},t}(u.Component);var J=(0,c.Zz)((0,F.c0)((function(e){return{videoContainer:e.videoContainer}})),(0,R.dd)((function(e){return{error:!!e.error}})),(0,x.cj)((function(e){return{vodID:(0,V.hq)(e.content),content:e.content,includePrivateVODs:(0,O.wk)({playerPublicPropsContext:e}).includePrivateVODs||!1}})),(0,L.o1)(),(0,N._v)(q(),{skip:function(e){return!e.vodID},options:function(e){return{variables:{videoID:e.vodID,includePrivate:e.includePrivateVODs||!1}}}}),(0,M.AP)((function(e){return{seek:e.seek}})))($);var ee=n(538424),te=n(514105),ne=n(724422),ie=n(477540),ae=n(285289),re=n(665736),oe=n(947153),se=function(e){var t=e.playerEvents,n=(0,u.useContext)(M.wL).isPlaying,i=(0,u.useContext)(R.$g).mediaPlayerInstance,a=(0,u.useState)(0),r=a[0],o=a[1];(0,u.useEffect)((function(){var e;n&&r<=0&&o(null!==(e=null==i?void 0:i.getDuration())&&void 0!==e?e:0)}),[n,r,i]);var s=(0,u.useCallback)((function(e){e>0&&o(e)}),[]);return(0,u.useEffect)((function(){return t.addEventListener(oe.a.DURATION_CHANGED,s),function(){t.removeEventListener(oe.a.DURATION_CHANGED,s)}}),[s,t]),r},le=n(156894),de=n(349673),ue=(0,c.Zz)((0,R.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}})),(0,te.X)())((function(e){var t=function(e){var t=se(e),n=(0,u.useState)(0),i=n[0],a=n[1],r=(0,u.useState)(!1),o=r[0],s=r[1],l=(0,u.useCallback)((function(e){a(e)}),[]),d=(0,u.useCallback)((function(e){a(e)}),[]),c=(0,u.useCallback)((function(e){s(e)}),[]),p=(0,u.useCallback)((function(t){var n;null===(n=e.mediaPlayerInstance)||void 0===n||n.seekTo(t)}),[e.mediaPlayerInstance]);return{clipLength:t,thumbLocation:Math.min(Math.max(i,e.startOffset),e.endOffset),handleThumbLocationChanged:p,isHovering:o,handleMouseOverChange:c,handleSeekComplete:l,handleTimeChanged:d}}(e),n=t.clipLength,i=t.thumbLocation,r=t.handleThumbLocationChanged,o=t.isHovering,l=t.handleMouseOverChange,d=t.handleSeekComplete,c=t.handleTimeChanged,p=[{type:de.b.Fixed,id:"selected-segment",start:e.startOffset,end:e.endOffset,color:ne.K["color-yellow"]}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(w.j,{onTimeChanged:c}),(0,a.jsx)(ie.Nb,{onSeekComplete:d}),(0,a.jsxs)(s.P,{display:"flex",flexDirection:"column",alignItems:"stretch",children:[(0,a.jsx)(re.l,{currentTimeInSeconds:i,durationInSeconds:n,show:o}),(0,a.jsx)(ae.e,{currentTimeInSeconds:i,durationInSeconds:n}),(0,a.jsx)(le.y,{seekbarMin:0,seekbarMax:n,thumbLocation:i,segments:p,onThumbLocationChange:r,minAllowedThumbLocation:e.startOffset,maxAllowedThumbLocation:e.endOffset,alwaysShowThumb:!0,onMouseOverChange:l})]})]})}));var ce=n(174485),pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={thumbLocation:0},t.handleTimeChanged=function(e){t.setState({thumbLocation:e})},t.handleSeekComplete=function(e){t.setState({thumbLocation:e})},t.handleThumbLocationChanged=function(e){var n=t.props.mediaPlayerInstance;n&&n.seekTo(e+t.props.startOffset)},t}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.startOffset,n=e.endOffset,i=Math.min(Math.max(this.state.thumbLocation,t),n);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(w.j,{onTimeChanged:this.handleTimeChanged}),(0,a.jsx)(ie.Nb,{onSeekComplete:this.handleSeekComplete}),(0,a.jsx)(ce.P,{onThumbLocationChanged:this.handleThumbLocationChanged,thumbLocation:i-t,clipLength:n-t})]})},t}(u.Component),ve=(0,c.Zz)((0,R.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}})),(0,te.X)())(pe);var me=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={thumbLocation:0},t.handleTimeChanged=function(e){t.setState({thumbLocation:e})},t.handleThumbLocationChanged=function(e){var n=t.props.mediaPlayerInstance;n&&n.seekTo(e),t.setState({thumbLocation:e})},t}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=this.props.clipLength,t=this.state.thumbLocation;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(w.j,{onTimeChanged:this.handleTimeChanged}),(0,a.jsx)(ce.P,{onThumbLocationChanged:this.handleThumbLocationChanged,thumbLocation:t,clipLength:e})]})},t}(u.Component),fe=(0,R.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}}))(me);var ge=(0,c.Zz)((0,x.cj)((function(e){var t=(0,O.Rh)({playerPublicPropsContext:e});return{clipContent:(0,V.Jn)(t)?t:null}})),(0,te.X)())((function(e){var t=function(e){var t=se(e),n=e.clipContent&&(0,V.N1)(e.clipContent);return{editingSegment:null==n?void 0:n[0],isPostEdit:!(!e.clipContent||!(0,V.J8)(e.clipContent)),clipLength:t}}(e),n=t.editingSegment,r=t.isPostEdit,o=t.clipLength;return e.clipContent?n?r?(0,a.jsx)(ve,(0,i.__assign)({},n)):(0,a.jsx)(ue,(0,i.__assign)({},n)):o?(0,a.jsx)(fe,{clipLength:o}):null:null}));var ye=n(371705),he=n(331337),_e=n(644704),ke=(0,c.Zz)((0,F.c0)((function(e){return{toggleClipSharing:e.toggleClipSharing}})),(0,x.cj)((function(e){return{isClipEmbed:(0,_e.O)(e)===he.C.ClipsEmbed}})))((function(e){var t=e.isClipEmbed,n=e.toggleClipSharing;return t?(0,a.jsx)(B.g,{onClick:n,buttonIcon:ye.V,tooltipPlacement:"top-end",label:(0,p.hw)("Share","ClipShareButton")}):null}));var Se=n(635999),Ce=n(420398),be=n(132005),Pe=n(706411),Ae=n.n(Pe),Ee=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(){var e=t.props,n=e.captionsEnabled;(0,e.setClosedCaptionsEnabled)(!n)},t}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){Ae().bind("c",this.onClick)},t.prototype.componentWillUnmount=function(){Ae().unbind("c")},t.prototype.render=function(){return this.props.captionsAvailable?(0,a.jsx)(B.g,{tooltipPlacement:"top-end",label:(0,p.hw)("Captions (c)","ClosedCaptionsButtonComponent"),buttonIcon:this.props.captionsEnabled?Ce.w:be.D,onClick:this.onClick}):null},t}(u.Component),Ie=(0,c.Zz)((0,F.c0)((function(e){var t=e.captions,n=e.setClosedCaptionsEnabled;return{captionsAvailable:t.available,captionsEnabled:t.enabled,setClosedCaptionsEnabled:n}})),(0,L.o1)())(Ee);var Te=n(508952),De=n(29896),Ne=n(494280),we=n(654195),Re=n(806677),xe=function(e){var t,n=e.content,i=e.mediaPlayerInstance,a=u.useRef(null),r=n?(0,V.hd)(n):null;r!==(0,Re.Z)(r)&&(a.current=null);var o=null==i?void 0:i.getSessionData(),s=null!==(t=o&&o["BROADCAST-ID"])&&void 0!==t?t:null;return s&&(a.current=s),a.current},Le=n(233936),Fe=n(212276),Me=n(573527),Ve=n(539062),Oe=n.n(Ve),Ue=n(110285),Be=n(216042),je=n(792486),qe=n(445373),Ge=function(e){var t=e.onSkipToLive,n=e.content,i=e.isPausedOutsideDVRGap;return(0,V.MV)(n)||i?(0,a.jsx)(s.P,{display:"flex",padding:{left:1},alignItems:"center",children:(0,a.jsx)(Be.S,{display:"flex",children:(0,a.jsx)(je.M,{onClick:t,role:"button","aria-label":(0,p.hw)("Skip to Live","DVRLiveDot"),children:(0,a.jsx)(qe.T,{})})})}):null},He=n(15111),Ke=n(682620),ze=n(119611),We=n(552462),Qe=n(548015),Ze=function(e){var t=e.alwaysShowThumb,n=e.vodLength,i=e.seekbarMin,r=e.seekbarMax,o=e.thumbAriaAttributes,l=e.thumbLocation,d=e.minAllowedThumbLocation,c=e.maxAllowedThumbLocation,p=e.onThumbLocationChange,v=e.onMouseOverChange,m=e.onThumbDragStart,f=e.onMouseOverLocationChange,g=e.segments,y=e.isPausedOutsideDVRGap,h=(0,u.useState)(null),_=h[0],k=h[1],S=(0,u.useState)(!1),C=S[0],b=S[1],P=(0,u.useRef)(!1),A=(0,we.sL)(),E=A.playbackID,I=A.content,T=A.setPlayerContent,D=null!==_,N=(0,a.jsx)(We._,{ariaAttributes:o,show:C||D||t}),w=null!==_?_:l,R=(0,u.useCallback)((function(){if(I&&(0,V.lp)(I)){var e=(0,V.tK)(I);e&&((0,He.a)({playbackID:E,currOffset:w,uptime:r}),T(e))}}),[E,w,r,I,T]);if(!I||!(0,V.lp)(I))return null;var x=(0,Qe.Y)(g,{seekbarMin:i,thumbLocation:w});return(0,a.jsxs)(s.P,{display:"flex",alignItems:"center",children:[(0,a.jsx)(s.P,{flexGrow:1,children:(0,a.jsx)(ze.P,{onDragStart:function(){null==m||m()},onDragChange:function(e){k(e)},onDragEnd:function(e){D&&(n<=e&&(null==I?void 0:I.type)===Fe.FC.VOD?(P.current=!0,R(),setTimeout((function(){P.current=!1}),200)):null==p||p(e),k(null))},onClick:function(e){D||P.current||null==p||p(e)},onMouseEnter:function(){b(!0),null==v||v(!0)},onMouseLeave:function(){b(!1),null==v||v(!1)},onMouseMove:function(e){null==f||f(e)},seekbarMin:i,seekbarMax:r,allowedMin:d,allowedMax:c,children:(0,a.jsx)(Ke.j,{min:i,max:r,thumbLocation:w,thumb:N,segments:x})})}),(0,a.jsx)(Ge,{content:I,onSkipToLive:R,isPausedOutsideDVRGap:y})]})},Ye=n(663953),Xe=n(552400),$e=n(97774),Je=n(312663),et=n(705980),tt=n(250740);function nt(){return(0,p.hw)("LIVE","DVRSeekbarTimeLabels")}var it=function(e){var t=e.currentTimeInSeconds,n=e.durationInSeconds,i=e.isPausedOutsideDVRGap,r=(0,we.sL)(),o=r.playbackID,d=r.content,c=r.setPlayerContent,v=u.useContext(M.wL).play,m=(0,tt.X)(t);if(!d||!(0,V.lp)(d))return null;var f=function(){(0,He.a)({playbackID:o,currOffset:t,uptime:n})},g=function(){if(d.type===Fe.FC.Live)return f(),void v();var e=(0,V.tK)(d);e&&(f(),c(e))},y=(0,a.jsx)(Ye.qd,{label:nt()});return(d.type===Fe.FC.VOD||i)&&(y=(0,a.jsx)(Xe.m,{label:(0,p.hw)("Skip to Live","DVRSeekbarTimeLabels"),options:{placement:"top"},children:(0,a.jsxs)(s.P,{padding:{x:.5},display:"flex",background:"float",alignItems:"center",borderRadius:$e.Z.Medium,tabIndex:0,cursor:"pointer",onKeyUp:function(e){"Enter"===e.key&&g()},onClick:g,children:[(0,a.jsx)(Je.N,{bold:!0,children:nt()})," ",(0,a.jsx)(et.E,{size:18})]})})),(0,a.jsxs)(s.P,{display:l.nl.Flex,justifyContent:l.A9.Between,style:{userSelect:"none"},children:[(0,a.jsx)(Je.N,{color:l.Q1.Overlay,children:m}),y]})},at=n(479970),rt=function(e){var t=(0,u.useState)(0),n=t[0],l=t[1],d=(0,u.useState)(!1),c=d[0],p=d[1],v=(0,u.useRef)(),m=(0,we.sL)(),f=m.content,g=m.playbackID,y=(0,u.useContext)(M.wL),h=y.dvrSeek,_=y.isPlaying,k=y.userTriggeredPause,S=y.userTriggeredPlay,C=(0,u.useContext)(R.$g).mediaPlayerInstance,b=xe({content:f,mediaPlayerInstance:C});(0,u.useEffect)((function(){return clearTimeout(v.current)}));var P=(0,i.__spreadArray)([{type:de.b.FillToThumb,id:"watched-segment",color:ne.K["color-twitch-purple-10"]}],e.mutedSegments.map((function(e,t){var n=e.duration,i=e.offset;return{type:de.b.Fixed,id:"muted-segment-".concat(t),start:i,end:i+n,color:"rgba(212, 73, 73, 0.5)"}})),!0),A=e.contentType===Fe.FC.Live?e.liveDuration:e.vodLength,E=(0,u.useRef)(void 0);(0,u.useEffect)((function(){f&&(0,V.rX)(f)&&!_&&k&&!E.current&&(E.current=e.thumbLocation)}),[_,k,f,e.thumbLocation]),(0,u.useEffect)((function(){_&&E.current&&(S&&(h(E.current,A),(0,He.G)({broadcastID:b,currOffset:A,pauseTriggered:!0,playbackID:g,uptime:A,targetOffset:E.current,vodID:f?(0,V.dB)(f):null})),E.current=void 0)}),[b,f,h,_,g,A,S]);var I=(null==f?void 0:f.type)===Fe.FC.Live&&_,T=(null==f?void 0:f.type)===Fe.FC.Live&&!_,D=T&&(null==E?void 0:E.current)&&E.current+(0,M.e8)()>e.liveDuration,N=T&&(null==E?void 0:E.current)&&E.current+(0,M.e8)()(0,gt.subMinutes)(e,10)})),t.bufferEvents=t.bufferEvents.slice(-3)},t.shouldShowNotification=function(){return t.props.isLive&&t.props.isLowLatencyCapable&&t.props.isLowLatencyEnabled&&!t.props.disableSettingsMenuButton&&t.bufferEvents.length>=3&&kt()<=3&&(!(e=p.IG.getOptional(_t))||(0,gt.subDays)(new Date,7)>=new Date(e));var e},t}return(0,i.__extends)(t,e),t.prototype.componentDidUpdate=function(e){e.isPlaying&&this.props.isBuffering&&this.handleBuffering()},t.prototype.render=function(){return this.state.shouldShow?(0,a.jsxs)(s.P,{padding:1,display:l.nl.Flex,alignItems:l.k2.Start,background:l.VS.Overlay,className:"low-latency-notification",children:[(0,a.jsx)(Je.N,{children:(0,p.hw)("Is video buffering? Use the Low Latency toggle under the Advanced menu in Settings to disable low latency mode","LowLatencyNotification")}),(0,a.jsx)(s.P,{flexShrink:0,children:(0,a.jsx)(vt.a2,{"aria-label":(0,p.hw)("Close low latency reminder","LowLatencyNotification"),overlay:!0,icon:mt.g,onClick:this.handleClose,size:ft.f.Small})})]}):null},t}(u.Component);var Ct=(0,c.Zz)((0,x.cj)((function(e){return{isLive:(0,V.DG)(e.content),disableSettingsMenuButton:(0,O.wk)({playerPublicPropsContext:e}).disableSettingsMenuButton}})),(0,R.dd)((function(e){return{isBuffering:(0,yt.TN)(e),isLowLatencyCapable:(0,yt.RO)(e),isLowLatencyEnabled:e.isLiveLowLatencyEnabled,isPlaying:(0,yt.F4)(e)}})))(St),bt=n(305528),Pt=n(739604),At=n(170937),Et=(0,Pt.U)({name:"VideoPlayer_PlayPauseButton",category:"broadcast"}).Available,It=function(e){if(e.showPlaceholder)return(0,a.jsx)(bt.Or,{width:30,height:30});var t=(0,At.en)(e.buttonState),n=(0,At.TO)(e.buttonState)||"",i=e.buttonState===At.Ke.Playing,r=i?e.onPause:e.onPlay;return(0,a.jsx)(Et,{children:(0,a.jsx)(B.g,{"data-a-target":"player-play-pause-button","data-a-player-state":i?"playing":"paused",buttonIcon:t,label:n,onClick:r,tooltipPlacement:"top-start",disabled:e.disabled})})},Tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.play=function(){t.props.play({userTriggered:!0})},t.pause=function(){t.props.pause({userTriggered:!0})},t}return(0,i.__extends)(t,e),t.prototype.render=function(){return(0,a.jsx)(It,{showPlaceholder:this.props.isPlayerCoreLoading,buttonState:(0,At.Iz)(this.props),onPlay:this.play,onPause:this.pause,disabled:this.props.error})},t}(u.Component),Dt=(0,At.BZ)(Tt),Nt=n(26538),wt=n(562099),Rt=n(913847),xt=function(e){var t=e.quality,n=e.indicateSourceQuality,i=(0,wt.ei)(t),r=(0,wt.IW)(t.codecs,i)&&wt.dD.includes(i)?i:null,o=(0,Rt.xc)(t,n);return r&&(o="".concat(o," ").concat(r)),(0,a.jsx)(Nt.a,{type:Nt.y.Subtle,label:o})},Lt=function(e){function t(t){var n=e.call(this,t)||this;return n.handleQualityChanged=function(){var e=n.props,t=e.mediaPlayerInstance,a=e.availableQualities,r=e.unavailableQualities;if(t){var o=t.getQuality(),s=(0,wt.m)(o,(0,i.__spreadArray)((0,i.__spreadArray)([],a,!0),r,!0));clearTimeout(n.timeout),n.setState({shouldRenderQuality:!0,quality:null!=o?o:null,indicateSourceQuality:s}),n.timeout=setTimeout((function(){n.setState({shouldRenderQuality:!1})}),5e3)}},n.state={shouldRenderQuality:!1,quality:null,indicateSourceQuality:!1},n}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.playerEvents.addEventListener(oe.a.QUALITY_CHANGED,this.handleQualityChanged)},t.prototype.render=function(){var e=this.state,t=e.shouldRenderQuality,n=e.quality,i=e.indicateSourceQuality,s=this.props,l=s.speed,d=s.isLiveContent,u=t&&!!n||1!==l&&!d,c=null;return s.disableSettingsBanner?null:(t&&n?c=(0,a.jsx)(xt,{quality:n,indicateSourceQuality:i}):1===l||d||(c=(0,a.jsx)(Nt.a,{type:Nt.y.Subtle,label:"".concat(l,"x")})),(0,a.jsx)(r.e,{type:o.ES.SlideOverRight,show:u,children:c}))},t.prototype.componentWillUnmount=function(){clearTimeout(this.timeout)},t}(u.Component),Ft=(0,c.Zz)((0,R.dd)((function(e){var t=e.mediaPlayerInstance,n=e.speed,i=e.availableQualities,a=e.unavailableQualities;return{mediaPlayerInstance:t,speed:n,availableQualities:i,unavailableQualities:a}})),(0,x.cj)((function(e){var t=e.content,n=e.behaviors;return{isLiveContent:(0,V.DG)(t),disableSettingsBanner:null==n?void 0:n.disableSettingsBanner}})),(0,te.X)())(Lt);var Mt,Vt=n(472571),Ot=n(424131),Ut=n(843004),Bt=n(588702),jt=n(48935),qt=n(337051),Gt=n(415044),Ht=n(213912),Kt=n(973448),zt=n(231743);!function(e){e.MiniPlayerToggle="mini-player-toggle",e.VideoStatsToggle="video-stats-toggle",e.AdStatsToggle="ad-stats-toggle"}(Mt||(Mt={}));var Wt=function(e){function t(t){var n,i=e.call(this,t)||this;i.toggleLowLatencyMode=function(){(0,zt.K)(i.props)},i.toggleMiniPlayer=function(){var e=!i.state.isMiniPlayerEnabled;i.props.disableUserPreferencePersistence||p.IG.set(Kt.U.PERSISTENCE_ENABLED,e),i.props.togglePersistentPlayer(),i.setState({isMiniPlayerEnabled:e})},i.isVideoStatsEnabled=function(){return i.props.statsOverlay===F.Uz.Video},i.toggleVideoStats=function(){var e=i.isVideoStatsEnabled()?F.Uz.None:F.Uz.Video;i.props.setStatsOverlay(e),i.props.hideKeyboardShortcuts()},i.isAdStatsEnabled=function(){return i.props.statsOverlay===F.Uz.Ad},i.toggleAdStats=function(){var e=i.isAdStatsEnabled()?F.Uz.None:F.Uz.Ad;i.props.setStatsOverlay(e),i.props.hideKeyboardShortcuts()};var a=null!==(n=p.IG.getOptional(Kt.U.PERSISTENCE_ENABLED))&&void 0!==n?n:void 0;return i.state={isMiniPlayerEnabled:void 0===a||!!a},i}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=this.renderLowLatencyToggle(),t=(0,p.hw)("Mini Player","SettingsMenuSubmenuAdvanced"),n=(0,p.hw)("Video Stats","SettingsMenuSubmenuAdvanced"),i=(0,p.hw)("Ad Stats","SettingsMenuSubmenuAdvanced");return(0,a.jsxs)(a.Fragment,{children:[e,this.props.showMiniToggleSettings&&(0,a.jsx)(qt.G,{addRole:!0,autoFocus:!0,label:t,type:qt.M.Toggle,onChange:this.toggleMiniPlayer,checked:this.state.isMiniPlayerEnabled,"data-test-selector":Mt.MiniPlayerToggle,"data-a-target":"player-settings-submenu-advanced-toggle-mini"}),(0,a.jsx)(qt.G,{addRole:!0,autoFocus:!0,"data-a-target":"player-settings-submenu-advanced-video-stats",label:n,type:qt.M.Toggle,onChange:this.toggleVideoStats,checked:this.isVideoStatsEnabled(),"data-test-selector":Mt.VideoStatsToggle}),(0,a.jsx)(qt.G,{addRole:!0,"data-a-target":"player-settings-submenu-advanced-ad-stats",label:i,type:qt.M.Toggle,onChange:this.toggleAdStats,checked:this.isAdStatsEnabled(),"data-test-selector":Mt.AdStatsToggle})]})},t.prototype.renderLowLatencyToggle=function(){var e=this.props,t=e.isLowLatencyCapable,n=e.isLiveLowLatencyEnabled;if(!t)return null;var i=(0,p.hw)("Low Latency","SettingsMenuSubmenuAdvanced");return(0,a.jsx)(qt.G,{addRole:!0,label:i,type:qt.M.Toggle,onChange:this.toggleLowLatencyMode,checked:n})},t}(u.Component);var Qt=(0,c.Zz)((0,L.o1)(),(0,R.dd)((function(e){return{isLowLatencyCapable:(0,yt.RO)(e),isLiveLowLatencyEnabled:e.isLiveLowLatencyEnabled,mediaPlayerInstance:e.mediaPlayerInstance,updatePlayerContext:e.updateContext}})),(0,x.cj)((function(e){var t=(0,O.wk)({playerPublicPropsContext:e}),n=t.disableUserPreferencePersistence,i=t.showMiniToggleSettings;return{disableUserPreferencePersistence:n,showMiniToggleSettings:i}})),(0,F.c0)((function(e){var t=e.hideKeyboardShortcuts,n=e.setStatsOverlay,i=e.statsOverlay;return{hideKeyboardShortcuts:t,setStatsOverlay:n,statsOverlay:i}})),(0,Gt.Ng)(null,(function(e){return(0,c.zH)({togglePersistentPlayer:Ht.he},e)})))(Wt);var Zt=n(368972),Yt=n(469655);function Xt(e){return en(e)||e.isStaff||$t(e)}function $t(e){return e.sessionUser&&e.sessionUser.id&&e.sessionUser.id===tn(e)}function Jt(e){return e.sessionUser&&e.sessionUser.id&&e.sessionUser.id===function(e){return e.data&&e.data.clip&&e.data.clip.curator&&e.data.clip.curator.id}(e)}function en(e){return!!(e.data&&e.data.currentUser&&e.data.currentUser.roles&&e.data.currentUser.roles.isSiteAdmin)}function tn(e){return e.data&&e.data.clip&&e.data.clip.broadcaster&&e.data.clip.broadcaster.id}var nn,an=n(12109),rn=n(368770),on=n(783826),sn=n(481391),ln=n.n(sn),dn=(0,N._v)(ln(),{options:function(e){var t;return{variables:{slug:null!==(t=e.clipSlug)&&void 0!==t?t:"",isCommunityMomentsFeatureEnabled:(0,an.fX)(on.g)}}},skip:function(e){return!e.clipSlug}});function un(e){return{sessionUser:(0,rn.wz)(e),isLoggedIn:(0,rn.M3)(e),isStaff:(0,rn.Xl)(e)}}function cn(){return function(e){return(0,c.Zz)((0,x.cj)(pn),(0,Gt.Ng)(un),dn)(e)}}function pn(e){var t=e.content;return{clipSlug:(0,V.Qc)(t),isEditing:(0,V.JN)(t)}}!function(e){e.DeleteButton="delete-button",e.DeleteAllButton="delete-all-button"}(nn||(nn={}));var vn=Te.x.wrap((function(){return Promise.all([n.e(7205),n.e(43368),n.e(83985)]).then(n.bind(n,68760))}),"ClipsModalDelete"),mn=Te.x.wrap((function(){return Promise.all([n.e(7205),n.e(43368),n.e(83985)]).then(n.bind(n,68760))}),"ClipsModalDeleteAll"),fn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.delete=function(){t.openModerationModal(vn)},t.deleteAll=function(){t.openModerationModal(mn)},t}return(0,i.__extends)(t,e),t.prototype.render=function(){var e,t=(0,p.hw)("Delete","SettingsMenuSubmenuClipsModeration"),n=(0,p.hw)("Delete all clips from video","SettingsMenuSubmenuClipsModeration");return Xt(this.props)&&(e=(0,a.jsx)(Zt.i,{addRole:!0,"data-test-selector":nn.DeleteAllButton,label:n,onClick:this.deleteAll})),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Zt.i,{addRole:!0,autoFocus:!0,"data-test-selector":nn.DeleteButton,label:t,onClick:this.delete}),e]})},t.prototype.openModerationModal=function(e){this.props.showModal(e,{slug:this.props.clipSlug,onClose:this.props.closeModal})},t}(u.Component);var gn=(0,c.Zz)(cn(),(0,Gt.Ng)(null,(function(e){return(0,c.zH)({showModal:Yt.to,closeModal:Yt.Oo},e)})))(fn),yn=n(684990),hn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.showSubMenu=function(){t.props.setActiveMenu("settings-menu__advanced")},t}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=(0,p.hw)("Advanced","SettingsMenuItemAdvanced");return(0,a.jsx)(Zt.i,{addRole:!0,"data-a-target":"player-settings-menu-item-advanced",label:e,actionIcon:yn.W1,onClick:this.showSubMenu})},t}(u.Component),_n=(0,L.o1)()(hn),kn=n(153296),Sn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(){t.props.setClosedCaptionsSettingsShowing(!0),t.props.setActiveMenu("settings-menu__none")},t}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=(0,kn.U)(this.props.captionsEnabled);return(0,a.jsx)(Zt.i,{addRole:!0,onClick:this.handleClick,actionIcon:yn.W1,children:(0,a.jsxs)(s.P,{display:"flex",flexDirection:"column",children:[e,(0,a.jsxs)(s.P,{display:"flex",alignItems:"center",gap:1,children:[this.props.captionsAvailable?(0,a.jsx)(Ce.w,{}):(0,a.jsx)(be.D,{}),(0,a.jsx)(Je.N,{fontSize:l.Z4.Size5,children:this.props.captionsAvailable?(0,p.hw)("Captions available","SettingsMenuItemCCOptions"):(0,p.hw)("Not available for this content","SettingsMenuItemCCOptions")})]})]})})},t}(u.Component);var Cn,bn=(0,c.Zz)((0,F.c0)((function(e){var t=e.captions,n=e.setClosedCaptionsSettingsShowing;return{captionsAvailable:t.available,captionsEnabled:t.enabled,setClosedCaptionsSettingsShowing:n}})))(Sn),Pn=n(392395),An=n(407590),En=n(433989),In=n(42820),Tn=n(746821),Dn=n(183198),Nn=n(637765),wn=n(907251),Rn=n(744883),xn=n(224300),Ln=n(165495);!function(e){e.On="on",e.Off="off"}(Cn||(Cn={}));var Fn=(0,Ln.yg)()((function(e){var t,n=e.closeSettingsMenu,i=e.data,r=null===(t=null==i?void 0:i.user)||void 0===t?void 0:t.id,o=(0,wn.$)().setHappeningNowSettings,d=(0,Rn.L)(),c=(0,Gt.wA)(),v=(0,Gt.d4)(rn.M3),m=(0,Gt.d4)(Dn.GQ),f=u.useContext(F._t).isFullscreen,g=(0,En.H)(),y=(0,Nn.r)(xn.FI,!1),h=y[0],_=y[1],k=(0,p.hw)("Events will still appear when chat is hidden, including polls, predictions, pinned chats, and Hype Trains.","SettingsMenuChatHappeningNow"),S=(0,p.hw)("Always Show Events","SettingsMenuChatHappeningNow");u.useEffect((function(){return function(){h||p.IG.set(xn.FI,!0)}}),[h,_]);var C=!v||d,b=u.useCallback((function(){if(!v)return f&&g.disable(),n(),void c((0,Tn.iD)(In.W.HappeningNowSettings));var e=!d;o(e);var t=e?Cn.On:Cn.Off,i=f?"full_screen":m?"theater_mode":"default";p.E5.track("client_happening_now_status_toggle",{channel_id:r||null,player_size_mode:i,status:t})}),[r,n,c,g,d,f,m,v,o]);return(0,a.jsxs)(s.P,{display:l.nl.Flex,alignItems:l.k2.Center,padding:.5,cursor:l.bs.Pointer,children:[(0,a.jsxs)(s.P,{onClick:b,display:l.nl.Flex,alignItems:l.k2.Center,margin:{right:.5},width:"100%",role:"menuitemcheckbox",tabIndex:0,children:[(0,a.jsx)(s.P,{margin:{right:.5},children:(0,a.jsx)(Je.N,{children:S})}),(0,a.jsx)(s.P,{height:"2rem",margin:{right:.5},role:"tooltip","aria-label":k,tabIndex:0,children:(0,a.jsx)(Xe.m,{label:k,maxWidth:"190px",options:{placement:"top"},children:(0,a.jsx)(Pn.h,{fillColor:"alt-2"})})}),!h&&(0,a.jsx)(Nt.a,{label:(0,p.hw)("NEW","SettingsMenuChatHappeningNow"),type:"new"})]}),(0,a.jsx)(An.l,{label:S,checked:C,onChange:b})]})})),Mn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.showSubMenu=function(){return t.props.setActiveMenu("settings-menu__clips-moderation")},t}return(0,i.__extends)(t,e),t.prototype.render=function(){if(!this.shouldShow())return null;var e=(0,p.hw)("Moderation","SettingsMenuItemClipsModeration");return(0,a.jsx)(Zt.i,{addRole:!0,label:e,actionIcon:yn.W1,onClick:this.showSubMenu})},t.prototype.shouldShow=function(){return!this.props.isEditing&&!!this.props.clipSlug&&(Xt(e=this.props)||Jt(e));var e},t}(u.Component),Vn=cn()(Mn),On=n(358741),Un=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.openModal=function(){var e,n,i,a=t.props.clipSlug,r=tn(t.props);a&&r&&t.props.showModal(On.Z,{onClose:t.props.closeModal,reportContext:{contentType:H.Cah.CLIP_REPORT,contentID:a,targetUserID:r,contentMetadata:{momentID:null===(i=null===(n=null===(e=t.props.data)||void 0===e?void 0:e.clip)||void 0===n?void 0:n.communityMoment)||void 0===i?void 0:i.id},trackingContext:"settings_menu_clips_report"}})},t}return(0,i.__extends)(t,e),t.prototype.render=function(){if(!this.shouldShow())return null;var e=(0,p.hw)("Report Clip","SettingsMenuItemClipsReport");return(0,a.jsx)(Zt.i,{label:e,onClick:this.openModal})},t.prototype.shouldShow=function(){return!!(!this.props.isEditing&&this.props.clipSlug&&tn(this.props)&&(e=this.props,e.isStaff||en(e)||e.isLoggedIn&&!Jt(e)&&!$t(e)));var e},t}(u.Component);var Bn=(0,c.Zz)(cn(),(0,Gt.Ng)(null,(function(e){return(0,c.zH)({showModal:Yt.to,closeModal:Yt.Oo},e)})))(Un),jn=n(14668),qn=function(e){var t=e.closeSettingsMenu;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Zt.i,{addRole:!0,autoFocus:!0,label:(0,p.hw)("Close","SettingsMenuCloseButton"),figure:{icon:mt.g},onClick:t}),(0,a.jsx)(jn.m,{})]})},Gn=n(696258),Hn=n(584074),Kn=n(782426),zn=function(e){function t(t){var n=e.call(this,t)||this;return n.shouldShow=function(){var e=n.props.content,t=n.props.getFullyFormedUrl(e);return((0,V.wy)(e)||(0,V.P3)(e))&&t!==Kn.Kk},n.getCurrentTime=function(){var e=n.props.mediaPlayerInstance;return e?Math.floor(e.getPosition()):0},n.updateCurrentTime=function(){var e=n.getCurrentTime();n.state.currentTime!==e&&n.setState({currentTime:e})},n.copyURLDisabled=function(){return n.setState({copyURLDisabled:!1})},n.handleClick=function(){var e=n.props.mediaPlayerInstance,t=n.props.content;e&&((0,V.wy)(t)||(0,V.P3)(t))&&(t=(0,i.__assign)((0,i.__assign)({},t),{videoOffset:Math.floor(e.getPosition())}));var a=n.props.getFullyFormedUrl(t);(0,Gn.e)(a),n.setState({copyURLDisabled:!0}),n.timeout=setTimeout(n.copyURLDisabled,2e3)},n.state={copyURLDisabled:!1,currentTime:n.getCurrentTime()},n}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.playerEvents.addEventListener(oe.a.TIME_UPDATE,this.updateCurrentTime)},t.prototype.componentWillUnmount=function(){clearTimeout(this.timeout)},t.prototype.render=function(){if(!this.shouldShow())return null;var e=(0,p.hw)("Copy Video URL at {timestamp}",{timestamp:(0,G.a3)(this.state.currentTime,G.wg.ClockHMS)},"SettingsMenuItemCopyVideoURLComponent"),t=(0,p.hw)("Copied!","SettingsMenuItemCopyVideoURLComponent");return(0,a.jsx)(Zt.i,{addRole:!0,disabled:this.state.copyURLDisabled,label:this.state.copyURLDisabled?t:e,onClick:this.handleClick})},t}(u.Component);var Wn=(0,c.Zz)((0,x.cj)((function(e){return{content:e.content}})),(0,R.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}})),(0,te.X)(),(0,Hn.e)())(zn),Qn=function(e){var t=e.closeSettingsMenu,n=(0,u.useContext)(x.kl).content,i=(0,u.useContext)(F._t),r=i.isDVRSeekbarVisible,o=i.toggleDVRSeekbarVisibility;if(!(0,V.lp)(n))return null;var s=(0,p.hw)("Hide Seek Bar","SettingsMenuItemDVRHideSeekbar"),l=(0,p.hw)("Show Seek Bar","SettingsMenuItemDVRHideSeekbar");return(0,a.jsx)(Zt.i,{addRole:!0,onClick:function(){o(),t()},children:r?s:l})},Zn=function(){var e=(0,u.useContext)(F._t),t=e.setStatsOverlay,n=e.showKeyboardShortcuts,i=(0,u.useCallback)((function(){t(F.Uz.None),n()}),[t,n]);return(0,u.useMemo)((function(){return(0,a.jsx)(Zt.i,{addRole:!0,label:(0,p.hw)("View Keyboard Shortcuts","SettingsMenuItemKeyboardShortcuts"),onClick:i})}),[i])},Yn=n(702190),Xn=480,$n=853,Jn=[he.C.Imdb],ei=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.shouldShow=function(){var e=t.props,n=e.playerType,i=e.isClipContent;return!(n===he.C.AmazonVse||i)},t.handleClick=function(){var e=t.props,n=e.mediaPlayerInstance,i=e.pause,a=e.playerType,r=e.volume,o=e.muted,s=e.content,l=e.quality;i(),t.props.setActiveMenu("settings-menu__none");var d={player:Jn.includes(a)?a:he.C.Popout,volume:r,muted:o,enableExtensions:!0,parent:"twitch.tv",quality:l};((0,V.wy)(s)||(0,V.P3)(s))&&(d.t=(0,Yn.W)(Math.floor(n&&n.getPosition()||0)));var u=(0,Kn.kG)(s,d);window.open(u,"_blank","width=".concat($n,",height=").concat(Xn,",toolbar=no,menubar=no,scrollbars=no,location=no,status=no"))},t}return(0,i.__extends)(t,e),t.prototype.render=function(){return this.shouldShow()?(0,a.jsx)(Zt.i,{addRole:!0,label:(0,p.hw)("Popout Player","SettingsMenuItemPopoutPlayer"),onClick:this.handleClick}):null},t}(u.Component);var ti=(0,c.Zz)((0,x.cj)((function(e){return{content:e.content,playerType:(0,_e.O)(e),isClipContent:(0,V.Jn)(e.content)}})),(0,R.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance,quality:e.quality}})),(0,M.AP)((function(e){return{muted:e.muted,pause:e.pause,volume:e.volume}})))(ei),ni=n(476863),ii=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.shouldShow=function(){return t.props.qualityOptionsLength>0&&!t.props.forceQuality},t.showSubMenu=function(){return t.props.setActiveMenu("settings-menu__quality")},t}return(0,i.__extends)(t,e),t.prototype.render=function(){if(!this.shouldShow())return null;var e=(0,p.hw)("Quality","SettingsMenuItemQuality");return(0,a.jsx)(Zt.i,{addRole:!0,autoFocus:!0,"data-a-target":"player-settings-menu-item-quality",actionIcon:yn.W1,onClick:this.showSubMenu,children:(0,a.jsxs)(s.P,{display:"flex",children:[e,(0,a.jsx)(s.P,{margin:{left:"auto"},children:(0,a.jsx)(ni.x,{quality:this.props.selectedQuality,indicateSourceQuality:this.props.indicateSourceQuality})})]})})},t}(u.Component),ai=(0,c.Zz)((0,R.dd)((function(e){var t=(0,wt.uU)(e),n=(0,i.__spreadArray)((0,i.__spreadArray)([],e.availableQualities,!0),e.unavailableQualities,!0);return{indicateSourceQuality:(0,wt.m)(t,n),qualityOptionsLength:n.length,selectedQuality:t}})),(0,x.cj)((function(e){return{forceQuality:(0,O.wk)({playerPublicPropsContext:e}).forceQuality}})))(ii);var ri=n(473327),oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.shouldShow=function(){return!t.props.isClipContent},t.showSubMenu=function(){return t.props.setActiveMenu("settings-menu__report")},t}return(0,i.__extends)(t,e),t.prototype.render=function(){return this.shouldShow()?(0,a.jsx)(Zt.i,{addRole:!0,"data-a-target":"player-settings-menu-item-report",label:(0,ri.Qw)(),actionIcon:yn.W1,onClick:this.showSubMenu}):null},t}(u.Component),si=(0,x.cj)((function(e){var t=e.content;return{isClipContent:(0,V.Jn)(t)}}))(oi);var li=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.showSubMenu=function(){return t.props.setActiveMenu("settings-menu__speed")},t}return(0,i.__extends)(t,e),t.prototype.render=function(){if(!this.props.shouldShow)return null;var e=(0,p.hw)("Speed","SettingsMenuItemSpeed");return(0,a.jsx)(Zt.i,{addRole:!0,autoFocus:!0,"data-a-target":"player-settings-menu-item-speed",label:e,actionIcon:yn.W1,value:"".concat(this.props.speed,"x"),onClick:this.showSubMenu})},t}(u.Component),di=(0,c.Zz)((0,x.cj)((function(e){var t=(0,O.Rh)({playerPublicPropsContext:e});return{shouldShow:(0,V.pk)(t)}})),(0,R.dd)((function(e){return{speed:e.speed}})))(li);var ui=n(22444),ci=function(e){var t=e.closeSettingsMenu,n=e.isOffline,i=e.setActiveMenu;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(qn,{closeSettingsMenu:t}),(0,a.jsx)(ai,{setActiveMenu:i}),(0,a.jsx)(di,{setActiveMenu:i}),(0,a.jsx)(Bn,{}),(0,a.jsx)(Vn,{setActiveMenu:i}),(0,a.jsx)(bn,{setActiveMenu:i}),(0,a.jsx)(_n,{setActiveMenu:i}),(0,a.jsx)(si,{setActiveMenu:i}),(0,a.jsx)(ui.m,{setActiveMenu:i}),(0,a.jsx)(Qn,{closeSettingsMenu:t}),(0,a.jsx)(ti,{setActiveMenu:i}),(0,a.jsx)(Fn,{closeSettingsMenu:t}),(0,a.jsx)(Wn,{}),!n&&(0,a.jsx)(Zn,{})]})},pi=n(579038),vi=n(906719),mi=n(358302),fi=n(873556),gi=function(e){var t=u.useState(!1),n=t[0],i=t[1],r=function(t){e.disabled||("Enter"===t.key?e.onClose():"mouseup"===t.type?i(!0):"click"===t.type&&(e.selected||e.onChange(),n&&(i(!1),e.onClose())))};return(0,a.jsx)("div",{onKeyDown:r,onMouseUp:r,onClick:r,children:e.children})},yi=function(e){var t=e.setActiveMenu,n=(0,mi.kw)(),i=n.selectedQuality,r=n.allQualities,o=n.unavailableQualities,l=n.setQuality,d=hi(),u=(0,fi.m)({unavailableQualities:o});return(0,a.jsxs)(a.Fragment,{children:[!!u&&(0,a.jsx)(s.P,{margin:{bottom:1},children:(0,a.jsx)(pi.D,{type:vi._.Info,message:{title:u.title,description:u.message,link:"LOGGED_OUT"===u.id?{children:(0,Rt.z7)(),onClick:d}:{children:u.linkText,linkTo:u.linkTo,targetBlank:!0}}})}),r.map((function(e,n){var o=(0,wt.m)(e,r);return(0,a.jsx)(gi,{onClose:function(){return t("settings-menu__none")},onChange:function(){return!(0,wt.MC)(e)&&l(e)},selected:e.group===i,disabled:(0,wt.MC)(e),children:(0,a.jsx)("div",{style:{display:"flex"},children:(0,a.jsx)(qt.G,{disabled:(0,wt.MC)(e),addRole:!0,autoFocus:0===n,"data-a-target":"player-settings-submenu-quality-option",type:qt.M.Radio,label:(0,a.jsx)(ni.x,{quality:e,indicateSourceQuality:o}),checked:e.group===i,readOnly:!0,name:"player-settings-submenu-quality-option"})})},e.group)}))]})},hi=function(){var e=(0,Gt.wA)();return(0,u.useCallback)((function(){e((0,Tn.iD)(In.W.SettingsMenuSubmenuQuality))}),[e])},_i=n(160526),ki=n(564368),Si=n(891975),Ci=n(818233),bi=function(e){var t=e.setActiveMenu,n=(0,u.useRef)(null),i=(0,u.useRef)(),r=(0,Ci.a)(),o=r.recentlySubmitted,d=r.currentlySelectedIssue,c=r.setCurrentlySelectedIssue,p=r.submitReport;return(0,Si.S)((function(){var e;null===(e=n.current)||void 0===e||e.focus()})),(0,u.useEffect)((function(){return function(){clearTimeout(i.current)}}),[]),(0,a.jsxs)(a.Fragment,{children:[!o&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.P,{margin:1,children:(0,ri.QT)()}),(0,a.jsx)(s.P,{margin:1,children:(0,a.jsxs)(_i.l,{onChange:function(e){return c(e.currentTarget.value)},defaultValue:"",ref:n,children:[(0,a.jsx)("option",{value:"",disabled:!0,children:(0,ri.ni)()}),ri.lt.map((function(e){return(0,a.jsx)("option",{value:e.value,children:e.text()},e.value)}))]})}),(0,a.jsx)(s.P,{display:l.nl.Flex,justifyContent:l.A9.End,margin:1,children:(0,a.jsx)(ki.$n,{variant:ki.VQ.Primary,onClick:function(){p(),i.current=setTimeout((function(){return t("settings-menu__none")}),2e3)},disabled:!d,children:(0,ri.KP)()})})]}),o&&(0,ri.WY)()]})},Pi=n(852747),Ai=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.logger=p.x2.logger.withCategory("SettingsMenuSubmenuSpeedComponent"),t.closeMenu=function(){return t.props.setActiveMenu("settings-menu__none")},t.setSpeed=function(e){t.props.mediaPlayerInstance?(0,Pi.qr)(e,t.props):t.logger.warn("no media player loaded")},t}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.speed,n=(0,p.hw)("1x (Normal)","SettingsMenuSubmenuSpeed");return(0,a.jsx)(a.Fragment,{children:Pi.Fy.map((function(i,r){var o=t===i,s=1===i?n:"".concat(i,"x");return(0,a.jsx)(gi,{onClose:e.closeMenu,onChange:function(){return e.setSpeed(i)},selected:o,children:(0,a.jsx)(qt.G,{addRole:!0,autoFocus:0===r,"data-a-target":"player-settings-submenu-speed-option",type:qt.M.Radio,name:"playback-speed",label:s,checked:o})},i)}))})},t}(u.Component),Ei=(0,c.Zz)((0,x.cj)((function(e){return{disableUserPreferencePersistence:(0,O.wk)({playerPublicPropsContext:e}).disableUserPreferencePersistence}})),(0,R.dd)((function(e){var t=e.mediaPlayerInstance,n=e.speed;return{mediaPlayerInstance:t,speed:n}})),(0,L.o1)())(Ai);var Ii,Ti=n(374978),Di=function(e){var t=e.activeMenu,n=e.closeSettingsMenu,i=e.isOffline,r=e.setActiveMenu,o=null;switch(t){case"settings-menu__main":o=(0,a.jsx)(ci,{closeSettingsMenu:n,isOffline:i,setActiveMenu:r});break;case"settings-menu__advanced":o=(0,a.jsx)(Qt,{setActiveMenu:r});break;case"settings-menu__clips-moderation":o=(0,a.jsx)(gn,{setActiveMenu:r});break;case"settings-menu__quality":o=(0,a.jsx)(yi,{setActiveMenu:r});break;case"settings-menu__report":o=(0,a.jsx)(bi,{setActiveMenu:r});break;case"settings-menu__speed":o=(0,a.jsx)(Ei,{setActiveMenu:r});break;case"settings-menu__staff":o=(0,a.jsx)(Ti.E,{});break;default:o=null}return o?(0,a.jsx)("div",{"data-a-target":"player-settings-menu",children:o}):null},Ni=n(903689);function wi(e){switch(e){case"settings-menu__advanced":return(0,p.hw)("Advanced","SettingsMenuSubmenuAdvanced");case"settings-menu__clips-moderation":return(0,p.hw)("Moderation","SettingsMenuSubmenuClipsModeration");case"settings-menu__quality":return(0,p.hw)("Video Quality","SettingsMenuSubmenuQuality");case"settings-menu__report":return(0,p.hw)("Report Playback Issue","SettingsMenuSubmenuReportPlaybackIssue");case"settings-menu__speed":return(0,p.hw)("Speed","SettingsMenuSubmenuSpeed");case"settings-menu__staff":return(0,p.hw)("Staff","SettingsMenuSubmenuStaff");default:return(0,p.hw)("Video Player Settings","SettingsMenuButtonComponent")}}!function(e){e.MainMenuButton="main-menu"}(Ii||(Ii={}));var Ri=function(e){var t=e.activeMenu,n=(0,p.hw)("Back to Video Player Settings","SettingsMenuSubmenuAdvanced");return(0,a.jsxs)(s.P,{display:"settings-menu__main"===t||"settings-menu__none"===t?l.nl.Hide:void 0,children:[(0,a.jsx)(Zt.i,{addRole:!0,children:n,figure:{icon:yn.fj},onClick:function(){return e.setActiveMenu("settings-menu__main")},"data-test-selector":Ii.MainMenuButton,role:"button"}),(0,a.jsx)(s.P,{id:"active-settings-menu-header",role:"heading",children:(0,a.jsx)(Ni.x,{children:wi(t)})}),(0,a.jsx)(jn.m,{})]})},xi=(0,Pt.U)({name:"VideoPlayer_SettingsMenuButton",category:"broadcast"}).Available,Li=(0,c.Zz)((0,x.cj)((function(e){return{forceQuality:(0,O.wk)({playerPublicPropsContext:e}).forceQuality,content:e.content,disableSettingsMenuButton:(0,O.wk)({playerPublicPropsContext:e}).disableSettingsMenuButton}})),(0,M.AP)((function(e){return{isPlaying:e.isPlaying}})),(0,F.c0)((function(e){var t=e.videoContainer,n=e.requestedQuality,i=e.setIsMenuShowing;return{videoContainer:t,qualityIsChanging:n,setIsMenuShowing:i}})),(0,L.o1)())((function(e){var t=e.content,n=e.disableSettingsMenuButton,r=e.forceQuality,o=e.isOffline,d=e.isPlaying,c=e.qualityIsChanging,v=e.setIsMenuShowing,m=e.videoContainer,f=(0,u.useRef)(!0),g=(0,u.useState)({activeMenu:"settings-menu__none"}),h=g[0],_=h.activeMenu,S=h.maxMenuHeight,C=g[1],b=(0,Vt.p)(),P=b.dialogProps,E=b.setAnchorRef,I=b.close,D=b.toggle,N=(0,u.useCallback)((function(e){C((function(t){return(0,i.__assign)((0,i.__assign)({},t),{activeMenu:e})}))}),[]),w=(0,u.useCallback)((function(){I(),C((function(e){return(0,i.__assign)((0,i.__assign)({},e),{activeMenu:"settings-menu__none"})}))}),[I]),R=(0,u.useCallback)((function(){var e=Fi(m);e&&C((function(t){return(0,i.__assign)((0,i.__assign)({},t),{maxMenuHeight:e})}))}),[m]),x=(0,u.useCallback)((function(){D(),C((function(e){var t="settings-menu__none"===e.activeMenu?"settings-menu__main":"settings-menu__none";return"settings-menu__none"===t?(0,i.__assign)((0,i.__assign)({},e),{activeMenu:t}):(0,i.__assign)((0,i.__assign)({},e),{activeMenu:t,maxMenuHeight:Fi(m)})}))}),[D,m]),L=(0,u.useCallback)((function(){if("settings-menu__none"===_)return null;var e=wi(_);return"settings-menu__main"===_?e:(0,p.hw)("{submenuLabel} submenu",{submenuLabel:e},"SettingsMenuButtonComponent")}),[_]);if((0,u.useEffect)((function(){f.current?f.current=!1:v("settings-menu__none"!==_)}),[_,v]),n)return null;var F=c&&d&&!r&&!(0,V.Jn)(t);return(0,a.jsxs)(xi,{children:[(0,a.jsxs)(s.P,{children:[(0,a.jsx)(y.e,{theme:"dark",children:(0,a.jsxs)(Ot.n,(0,i.__assign)({},P,{"aria-labelledby":"active-settings-menu-header",role:"menu",onRequestClose:w,show:"settings-menu__none"!==_,size:k.$V.Medium,maxHeight:S?"".concat(S,"px"):void 0,options:{placement:"top-end",modifiers:[{name:"offset",options:{offset:[40,5]}},{name:"flip",enabled:!1}]},children:[(0,a.jsx)(s.P,{display:l.nl.HideAccessible,"aria-live":"polite",children:(0,a.jsx)(Ut.L,{type:Bt.M2.Span,children:L()})}),(0,a.jsx)(Ri,{activeMenu:_,setActiveMenu:N}),(0,a.jsx)(Di,{activeMenu:_,closeSettingsMenu:w,isOffline:o,setActiveMenu:N})]}))}),(0,a.jsx)(s.P,{className:A()(F&&"settings-menu-button-component__animate"),children:(0,a.jsx)(B.g,{"data-a-target":"player-settings-button",tooltipPlacement:"top-end",label:(0,p.hw)("Settings","SettingsMenuButtonComponent"),buttonIcon:jt.f,anchorRef:E,onClick:x})})]}),"settings-menu__none"!==_&&(0,a.jsx)(T.$,{onResize:R})]})}));function Fi(e){var t=(0,U.P)(e).height;return t?.8*t:void 0}var Mi=n(156619),Vi=n(576571),Oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toggleTheatreMode=function(){t.props.theatreModeEnabled?t.props.disableTheatreMode():t.props.enableTheatreMode()},t}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.isFullscreen,n=e.shouldDisableTheatreMode,i=e.theatreModeEnabled;if(n||t)return null;var r=(0,p.hw)("Exit Theatre Mode (alt+t)","TheatreModeButtonComponent"),o=(0,p.hw)("Theatre Mode (alt+t)","TheatreModeButtonComponent");return(0,a.jsx)(B.g,{tooltipPlacement:"top-end",label:i?r:o,buttonIcon:i?Mi.x:Vi.T,onClick:this.toggleTheatreMode})},t}(u.Component);var Ui=(0,c.Zz)((0,Gt.Ng)((function(e){return{theatreModeEnabled:e.ui.theatreModeEnabled}}),(function(e){return(0,i.__assign)({enableTheatreMode:function(){e((0,Ht._H)())}},(0,c.zH)({disableTheatreMode:Ht.lq},e))})),(0,x.cj)((function(e){return{shouldDisableTheatreMode:(0,O.wk)({playerPublicPropsContext:e}).disableTheatreMode}})),(0,F.c0)((function(e){return{isFullscreen:e.isFullscreen}})),(0,L.o1)())(Oi),Bi=n(301462),ji=n(486489),qi=n(984705),Gi=n(134889),Hi=n(606130),Ki=n(163419),zi={"stream-manager-video-orientation-button":{id:"stream-manager-video-orientation-button",showOnPageLoad:!0,endDate:new Date("2027-01-01")},skipped:{id:"",endDate:new Date("2027-01-01")}},Wi=function(e){var t,n=e.ftueID,r=void 0===n?"skipped":n,o=(0,Vt.p)(),s=o.dialogProps,l=o.setAnchorRef,d=(0,u.useContext)(R.$g),c=d.videoOrientation,v=d.mediaPlayerInstance,m=d.updateVideoOrientation,f=(0,u.useContext)(F._t),g=f.setIsMenuShowing,y=f.isMenuShowing,h=(0,Gi.M)(null!==(t=zi[r])&&void 0!==t?t:zi.skipped),_=!!h.currentStep;(0,u.useEffect)((function(){!_||y?h.seen&&g(!1):g(!0)}),[_,h.seen,g,y]);var k=null==c?void 0:c.pendingChange;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(B.g,{anchorRef:l,buttonIcon:k?Zi:"portrait"===(null==c?void 0:c.current)?qi.H:Hi.h,onClick:function(){var e="portrait"===(null==c?void 0:c.current)?"landscape":"portrait";(0,Ki.FQ)(e,v,m),h.markAsSeen(),p.x2.tracking.trackUiInteraction({interaction:"click",cell_name:"switch_video_orientation",cell_detail:e})},label:"portrait"===(null==c?void 0:c.current)?(0,p.hw)("Switch to Horizontal View","VideoOrientationButton"):(0,p.hw)("Switch to Vertical View","VideoOrientationButton"),disabled:k}),(0,a.jsx)(h.FTUE,{children:(0,a.jsx)(Bi.W,(0,i.__assign)({},s,{newPill:!0,title:(0,p.hw)("See Vertical Video","VideoOrientationButton"),description:(0,p.hw)("Click to see how your stream looks in vertical on mobile.","VideoOrientationButton"),dismissButtonProps:{"aria-label":(0,p.hw)("Dismiss new feature dialog","VideoOrientationButtonAccessibility"),onClick:h.markAsSeen},options:{placement:"top"},show:!!h.currentStep&&!h.seen&&!h.skipped,maxWidth:"30rem",transitionType:"none",disableReturnFocusAfterClose:!0}))})]})},Qi=function(){var e=(0,u.useContext)(x.kl).behaviors,t=(0,u.useContext)(R.$g).videoOrientation,n=(0,u.useContext)(Le.jK).videoAdMetadata;return(null==e?void 0:e.multiformatOrientationButton)?(0,Me.cz)(n)?null:(null==t?void 0:t.multiformat)?(0,a.jsx)(Wi,{ftueID:e.multiformatOrientationButtonFTUEID}):null:null},Zi=function(){return(0,a.jsx)(s.P,{display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:(0,a.jsx)(ji.k,{delay:0,size:"small"})})},Yi=n(631139),Xi=n(945005),$i=n(973421),Ji=n.n($i),ea=n(938230),ta=n(308966),na=n(198437),ia=n(317391),aa=n.n(ia);var ra=(0,c.Zz)((0,x.cj)((function(e){return{content:(0,O.Rh)({playerPublicPropsContext:e}),shouldEnableViewCount:(0,O.wk)({playerPublicPropsContext:e}).enableViewCount}})))((function(e){var t,n,i,r,o,l,d,u,c=e.content,v=e.shouldEnableViewCount,m=(0,V.DG)(c)?null==c?void 0:c.channelLogin:"",f=(0,De.IT)(aa(),{variables:{login:m||""},skip:!m||!v}).data,g=null!==(n=null===(t=null==f?void 0:f.user)||void 0===t?void 0:t.id)&&void 0!==n?n:null;return(0,ea.C)({query:aa(),variables:{login:m||""},topic:g?(0,na.RW)(g):"",skip:!g||!v,type:ta.PD.ViewCount,mutator:function(e,t){return t.user&&t.user.stream?Ji()(t,(function(e){return e.user.stream.viewersCount}),(function(){return e.viewers})):t}}),v&&null!==(null===(r=null===(i=null==f?void 0:f.user)||void 0===i?void 0:i.stream)||void 0===r?void 0:r.viewersCount)&&void 0!==(null===(l=null===(o=null==f?void 0:f.user)||void 0===o?void 0:o.stream)||void 0===l?void 0:l.viewersCount)?(0,a.jsx)(s.P,{color:"overlay",background:"overlay",display:"flex",borderRadius:$e.Z.Large,padding:.5,margin:{x:.5},children:(0,a.jsx)(Yi.r,{label:(0,p.hw)("Viewers","VideoPlayerOverlayViewCount"),value:(0,p.ZV)(null===(u=null===(d=null==f?void 0:f.user)||void 0===d?void 0:d.stream)||void 0===u?void 0:u.viewersCount),icon:Xi.H,tooltipProps:{options:{placement:"top"}}})}):null})),oa=n(199837),sa=n(459487),la=n(481926),da=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onBufferUpdate=function(){var e=t.props.mediaPlayerInstance;if(e){var n=e.getBufferDuration();t.props.onBufferUpdate(n)}},t}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.playerEvents.addEventListener(oe.a.BUFFER_UPDATE,this.onBufferUpdate)},t.prototype.render=function(){return null},t}(u.Component),ua=(0,c.Zz)((0,R.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}})),(0,te.X)())(da);var ca=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onDurationChange=function(){var e=t.props.mediaPlayerInstance;e&&t.props.onDurationChange(e.getDuration())},t}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.playerEvents.addEventListener(oe.a.DURATION_CHANGED,this.onDurationChange)},t.prototype.render=function(){return null},t}(u.Component),pa=(0,c.Zz)((0,R.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}})),(0,te.X)())(ca);var va=function(e){function t(t){var n=e.call(this,t)||this;return n.isDragging=!1,n.previousContentType=n.props.contentType,n.previousDurationVodID=n.props.vodID,n.previousDurationClipSlug=n.props.clipSlug,n.handleThumbDragStart=function(){n.isDragging=!0,n.setState({bufferDuration:0})},n.handleThumbLocationChange=function(e){var t=n.props.mediaPlayerInstance;n.isDragging=!1,t&&(0===e&&(e=.01),t.seekTo(e),n.setState({thumbLocation:e}))},n.handleSeekComplete=function(e){var t,i=n.props.mediaPlayerInstance;(null==i?void 0:i.isPaused())&&n.setState({thumbLocation:e}),n.state.ended&&e<=n.state.vodLength&&(n.setState({ended:!1}),null===(t=n.props.mediaPlayerInstance)||void 0===t||t.play())},n.handleTimeChanged=function(e){var t=n.props,i=t.mediaPlayerInstance,a=t.pause,r=t.updateContext;if(e>n.state.vodLength&&n.state.vodLength!==(null==i?void 0:i.getDuration())&&(a(),r({playerState:sa.p.ENDED}),n.setState({ended:!0})),!i||n.isDragging)n.setState({thumbLocation:e});else{var o=i.getBufferDuration();n.setState({bufferDuration:o,thumbLocation:e})}},n.handleBufferUpdate=function(e){n.isDragging||n.setState({bufferDuration:e})},n.handleDurationChange=function(e){(n.props.isDVR||0===n.state.vodLength||n.props.contentType!==n.previousContentType||n.props.vodID!==n.previousDurationVodID||n.props.clipSlug!==n.previousDurationClipSlug)&&(n.setState({vodLength:e}),n.previousContentType=n.props.contentType,n.previousDurationVodID=n.props.vodID,n.previousDurationClipSlug=n.props.clipSlug)},n.state={bufferDuration:0,thumbLocation:0,vodLength:t.mediaPlayerInstance&&t.mediaPlayerInstance.getDuration()||0,ended:!1},n}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.data,n=e.editingSegments,i=e.isAdShowing,r=this.state,o=r.thumbLocation,s=r.bufferDuration,l=r.vodLength;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ie.Nb,{onSeekComplete:this.handleSeekComplete}),(0,a.jsx)(w.j,{onTimeChanged:this.handleTimeChanged}),(0,a.jsx)(ua,{onBufferUpdate:this.handleBufferUpdate}),(0,a.jsx)(pa,{onDurationChange:this.handleDurationChange}),t&&!t.loading&&!t.error&&t.video&&!i&&(0,a.jsx)(la.H,{thumbLocation:o,bufferDuration:s,vodLength:l,mutedSegments:ma(t),onThumbDragStart:this.handleThumbDragStart,onThumbLocationChanged:this.handleThumbLocationChange,editingSegments:n})]})},t}(u.Component);function ma(e){return e.video&&e.video.muteInfo&&e.video.muteInfo.mutedSegmentConnection&&e.video.muteInfo.mutedSegmentConnection.nodes||[]}var fa=(0,c.Zz)((0,R.dd)((function(e){var t=e.mediaPlayerInstance,n=e.updateContext;return{mediaPlayerInstance:t,updateContext:n}})),(0,M.AP)((function(e){var t=e.pause,n=e.isPlaying;return{pause:t,isPlaying:n}})),(0,x.cj)((function(e){return{contentType:e.content.type,vodID:(0,V.hq)(e.content)||null,clipSlug:(0,V.Qc)(e.content)||null,editingSegments:(0,V.N1)(e.content),includePrivateVODs:(0,O.wk)({playerPublicPropsContext:e}).includePrivateVODs||!1,isDVR:(0,V.lp)(e.content)}})),(0,Le.VX)((function(e){return{isAdShowing:(0,Me.cz)(e.videoAdMetadata)}})),(0,oa.h)(),(0,N._v)(Oe(),{options:function(e){var t=e.vodID,n=e.collectionVodID;return{variables:{vodID:null!=t?t:n,includePrivate:e.includePrivateVODs}}},skip:function(e){var t=e.vodID,n=e.collectionVodID;return e.isDVR||!(t||n)}}))(va);var ga,ya=n(25437),ha=n(71062),_a=n(148223),ka=n(368600),Sa=n(345942),Ca=n(68873);!function(e){e[e.SETTLED=0]="SETTLED",e[e.REQUESTED=1]="REQUESTED"}(ga||(ga={}));var ba=(0,Pt.U)({name:"VideoPlayer_VolumeSlider",category:"broadcast"}).Available,Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.popperRef=u.createRef(),t.state={volumeFocused:!1,requestedVolume:null,volumeState:ga.SETTLED,showVolumeTooltip:!1,hasVolumeButtonBeenActivated:!1},t.rangeID="player-volume-slider-".concat((0,_a.aq)()),t.throttledVolumeChange=(0,ha.n)((function(e){var n=t.props,i=n.setVolume,a=n.setMuted,r=n.muted,o={persist:!0,userTriggered:!0};i(e,o),r&&0!==e&&a(!1,o),0===e&&a(!0,o)}),30,{leading:!0,trailing:!0}),t.calcDom=function(){if(t.rangeRef){t.remInPx=parseFloat(getComputedStyle(document.documentElement).fontSize);var e=t.rangeRef.getBoundingClientRect();t.rangeWidth=e.width}},t.setVolumeTooltipDisplayTimer=function(){clearTimeout(t.tooltipTimeoutRef),t.tooltipTimeoutRef=setTimeout((function(){t.setState((function(e){return e.showVolumeTooltip?{showVolumeTooltip:!1}:null}))}),2e3)},t.setVolumeFocused=function(){t.setState((function(e){return e.volumeFocused?null:{volumeFocused:!0}}))},t.setVolumeUnfocused=function(){t.setState((function(e){return e.volumeFocused?{volumeFocused:!1}:null}))},t.setRangeInputFocused=function(){t.setState((function(e){return e.showVolumeTooltip?null:{showVolumeTooltip:!0}}))},t.setRangeInputUnfocused=function(){t.setState((function(e){return e.showVolumeTooltip?{showVolumeTooltip:!1}:null}))},t.getTooltipValues=function(e){var n=e.volume,i=e.muted?0:n||0,a=1.6*t.remInPx;return{tooltipValue:i,tooltipLeftOffset:a/2+i*(t.rangeWidth-a)}},t.getRangeValue=function(e){var n=e.muted,i=e.volume;if(n)return"0";var a=null!=i?i:Ca.R6,r=t.state.volumeState===ga.REQUESTED?t.state.requestedVolume:a;return"".concat(r)},t.handleRangeInputChange=function(e){var n=+e.currentTarget.value;t.setState((function(e){return e.requestedVolume===n?null:{requestedVolume:n,volumeState:ga.REQUESTED,showVolumeTooltip:!0}}),(function(){t.throttledVolumeChange(n)})),t.setVolumeTooltipDisplayTimer(),t.props.enablePlayerActiveTimeout()},t.handleMuteButtonClick=function(){var e=t.props,n=e.muted,i=e.volume,a=e.setVolume,r=e.setMuted,o={persist:!0,userTriggered:!0};t.setState((function(){return{hasVolumeButtonBeenActivated:!0}})),n&&0===i&&a(Ca.mw,o),n&&void 0===i&&a(Ca.R6,o),r(!n,o)},t.setRangeRef=function(e){return t.rangeRef=e},t}return(0,i.__extends)(t,e),t.prototype.componentWillUnmount=function(){clearTimeout(this.tooltipTimeoutRef),this.throttledVolumeChange.flush()},t.prototype.componentDidUpdate=function(){var e,t,n;null===(n=null===(t=null===(e=this.popperRef)||void 0===e?void 0:e.current)||void 0===t?void 0:t.update)||void 0===n||n.call(t),this.props.volume===this.state.requestedVolume&&this.state.volumeState!==ga.SETTLED&&this.setState((function(e){return e.volumeState===ga.SETTLED?null:{volumeState:ga.SETTLED}}))},t.prototype.render=function(){var e,t,n=this.props,i=n.audioBlocked,d=n.isPlayerCoreLoading,u=n.disableControls,c=n.muted,v=n.playerControlsShowing,m=n.showInitialMutedOnVolumeButton,f=n.userEverUnmuted,g=(0,Ca.en)(this.props),y=(0,Ca.TO)(this.props),h=this.getRangeValue(this.props),_=this.getTooltipValues(this.props),k=!!c&&m&&!f&&!this.state.hasVolumeButtonBeenActivated,S=(k||i)&&v&&m;if(d)return(0,a.jsx)(bt.Or,{height:30,width:14.5});var C=this.state.volumeFocused,b=!ka.j.os.isIOS()&&!this.props.disableVolumeSlider,P=Math.floor(100*Number(h)),A=this.state.showVolumeTooltip&&C&&v;return(0,a.jsx)(ba,{children:(0,a.jsx)("div",{onMouseEnter:this.setVolumeFocused,onMouseLeave:this.setVolumeUnfocused,onFocus:this.setVolumeFocused,children:(0,a.jsxs)(s.P,{display:l.nl.Flex,alignItems:l.k2.Center,children:[(0,a.jsx)(s.P,{borderRadius:$e.Z.Large,className:S?"volume-slider__button-container":void 0,children:(0,a.jsx)(B.g,{"data-a-target":"player-mute-unmute-button",label:S?(0,p.hw)("Tap to unmute","VolumeSlider"):y,buttonIcon:g,onClick:this.handleMuteButtonClick,disabled:u||this.props.error,suppressTooltip:!S&&k,showTooltip:k&&m&&v,tooltipModifiers:S?[{name:"flip",options:{allowedAutoPlacements:["top"],rootBoundary:null===(e=this.props.chromecastButtonRef)||void 0===e?void 0:e.current,boundary:null===(t=this.props.ref)||void 0===t?void 0:t.current}}]:void 0})}),b&&(0,a.jsx)(r.e,{alwaysRenderChild:!0,show:C,type:o.ES.Fade,duration:o.Cf.Short,className:"volume-slider__slider-container",onEnterComplete:this.calcDom,children:(0,a.jsx)(s.P,{display:l.nl.Flex,alignItems:l.k2.Center,fullHeight:!0,onMouseLeave:this.setRangeInputUnfocused,children:(0,a.jsxs)(s.P,{display:l.nl.Flex,flexDirection:l.bo.Column,alignItems:l.k2.Stretch,height:"100%",children:[(0,a.jsx)(s.P,{position:l.yX.Relative,display:l.nl.Flex,style:{insetInlineStart:"".concat(_.tooltipLeftOffset,"px")},children:(0,a.jsx)(Xe.m,{show:A,label:(0,p.ZV)(_.tooltipValue,"percent"),popperRef:this.popperRef,options:{placement:"top",modifiers:[{name:"flip",options:{allowedAutoPlacements:["top"]}}]},display:l.nl.Inline})}),(0,a.jsxs)(s.P,{display:l.nl.Flex,flexDirection:l.bo.Column,justifyContent:l.A9.Center,height:"100%",children:[(0,a.jsx)(Be.S,{display:l.nl.HideAccessible,children:(0,a.jsx)("label",{htmlFor:this.rangeID,children:(0,p.hw)("Volume","VolumeSliderComponent")})}),(0,a.jsx)(ya.Q,{ref:this.setRangeRef,"data-a-target":"player-volume-slider","data-a-visible":C,fill:!0,min:0,max:1,step:.01,onChange:this.handleRangeInputChange,value:h,disabled:u||this.props.error,id:this.rangeID,overlay:!0,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":P,"aria-valuetext":"".concat(P,"%"),onFocus:this.setRangeInputFocused,onBlur:this.setRangeInputUnfocused})]})]})})})]})})})},t}(u.Component),Aa=(0,c.Zz)((0,x.cj)((function(e){var t=(0,O.wk)({playerPublicPropsContext:e}),n=t.disableAudio,i=t.disableVolumeSlider,a=t.showInitialMutedOnVolumeButton;return{disableControls:!!n,disableVolumeSlider:!!i,showInitialMutedOnVolumeButton:null!=a&&a}})),(0,M.AP)((function(e){var t=e.muted,n=e.volume,i=e.setMuted,a=e.setVolume;return{muted:t,volume:n,setMuted:i,setVolume:a}})),(0,R.dd)((function(e){var t=e.audioBlocked,n=e.isPlayerCoreLoading,i=e.error,a=e.userEverUnmuted;return{audioBlocked:t,isPlayerCoreLoading:n,error:!!i,userEverUnmuted:a}})),(0,Sa.In)((function(e){return{enablePlayerActiveTimeout:e.enablePlayerActiveTimeout}})),(0,L.o1)())(Pa);var Ea=n(186396),Ia=n(732574),Ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleClick=function(){var e=(0,V.L$)(t.props.content,{tt_content:"twitch_logo",tt_medium:"embed"},t.props.mediaPlayerInstance);window.open(e),t.props.pause()},t}return(0,i.__extends)(t,e),t.prototype.render=function(){return this.props.showExternalBranding?(0,a.jsx)(Xe.m,{label:this.getTooltipLabel(this.props.content),options:{placement:"top-end"},children:(0,a.jsx)(Ea.M2,{"aria-label":this.getTooltipLabel(this.props.content),onClick:this.handleClick,variant:Ea.sK.Text,overlay:!0,children:(0,a.jsx)(s.P,{display:l.nl.Flex,margin:{x:.5},children:(0,a.jsx)(Ia.g,{width:60,height:18})})})}):null},t.prototype.getTooltipLabel=function(e){return e.type===Fe.FC.Clip?(0,p.hw)("View clip page","WatchOnTwitchButton"):(0,p.hw)("Watch on Twitch","WatchOnTwitchButton")},t}(u.Component);var Da=(0,c.Zz)((0,x.cj)((function(e){return{content:(0,O.Rh)({playerPublicPropsContext:e}),showExternalBranding:(0,O.wk)({playerPublicPropsContext:e}).showExternalBranding}})),(0,R.dd)((function(e){return{mediaPlayerInstance:e.mediaPlayerInstance}})),(0,M.AP)((function(e){return{pause:e.pause}})))(Ta),Na=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.tooltipPlacementRef=u.createRef(),t.chromecastButtonRef=u.createRef(),t}return(0,i.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.shouldShow,n=e.isOffline,i=e.isAccessibilityLandmark,u=void 0===i||i,c=e.shouldDisplayPlayPauseAsOverlay,m=void 0!==c&&c,g=e.shouldPushVolumeToRight,y=void 0!==g&&g,h=e.hideDVRSeekbar,_=void 0!==h&&h;return(0,a.jsx)(r.e,{type:o.ES.Fade,show:t,alwaysRenderChild:!0,preventChildAriaHidden:!0,children:(0,a.jsxs)(s.P,{"data-a-target":"player-controls",className:"player-controls","data-a-visible":t,position:l.yX.Absolute,display:l.nl.Flex,flexDirection:l.bo.Column,alignItems:l.k2.Stretch,overflow:t?l.nE.Visible:l.nE.Hidden,attachBottom:!0,fullWidth:!0,dir:"ltr",children:[(0,a.jsx)(s.P,{padding:{x:2},children:(0,a.jsxs)(v.t,{name:"PlayerControlsOverlay-SeekBar",children:[(0,a.jsx)(ge,{}),(0,a.jsx)(fa,{}),!_&&(0,a.jsx)(st,{})]})}),(0,a.jsx)(f.u,{section:"global",id:"channel-player",icon:d.A,label:(0,p.hw)("Player Controls","SkipToTargetVideoPlayer"),enabled:!!u,children:(0,a.jsx)(s.P,{display:l.nl.Flex,margin:{left:1,bottom:1,right:1},children:(0,a.jsxs)(v.t,{name:"PlayerControlsOverlay-Controls",children:[!n&&(0,a.jsxs)(s.P,{flexGrow:1,display:l.nl.Flex,alignItems:l.k2.Center,justifyContent:l.A9.Start,className:"player-controls__left-control-group",children:[(0,a.jsx)(ra,{}),(0,a.jsx)(pt,{}),(0,a.jsx)(J,{}),!m&&(0,a.jsx)(Dt,{}),!y&&(0,a.jsx)(Aa,{playerControlsShowing:t})]}),(0,a.jsxs)(s.P,{flexGrow:1,display:l.nl.Flex,alignItems:l.k2.Center,justifyContent:l.A9.End,className:"player-controls__right-control-group",children:[(0,a.jsx)(Ft,{}),(0,a.jsx)(Se.oz,{}),y&&(0,a.jsx)(Aa,{playerControlsShowing:t,ref:this.tooltipPlacementRef,chromecastButtonRef:this.chromecastButtonRef}),(0,a.jsx)(Qi,{}),(0,a.jsx)(Li,{isOffline:n}),(0,a.jsx)(Ie,{}),(0,a.jsx)(ke,{}),(0,a.jsx)("div",{ref:this.chromecastButtonRef,children:(0,a.jsx)(ee.G,{})}),(0,a.jsx)(s.P,{position:l.yX.Absolute,attachBottom:!0,attachRight:!0,margin:{bottom:5,right:5},children:(0,a.jsx)(Ct,{})}),(0,a.jsx)(Ui,{}),!n&&(0,a.jsx)(dt.Ah,{}),(0,a.jsx)(Da,{})]})]})})})]})})},t}(u.Component),wa=(0,c.Zz)((0,m.X)({name:"PlayerControlsOverlay"}))(Na)},538424:function(e,t,n){"use strict";n.d(t,{G:function(){return p}});var i=n(474848),a=n(106462),r=n(552400),o=(n(296540),n(868238)),s=n(883474),l=n(699511),d=n(911906),u=n(894320),c=function(e){var t=e.isCastingAvailable,n=e.isConnected,o=e.isConnecting,l=e.disableCasting,d=e.startCast,u=e.stopCast,c=e.showTooltip,p=void 0===c||c;if(l||!t)return null;var v=n||o,m=v?(0,s.hw)("Stop Casting","ChromeCastButton"):(0,s.hw)("Start Casting","ChromeCastButton"),f=n?a.W.Connected:o?a.W.Connecting:a.W.Available,g=(0,i.jsx)(a.G,{"aria-label":m,onClick:function(){s.x2.tracking.trackUiInteraction({screen_name:"theater_mode",item_name:"chromecast_button"}),v?u():d()},status:f,overlay:!0});return p?(0,i.jsx)(r.m,{label:m,options:{placement:"top-end"},children:g}):g};var p=(0,o.Zz)((0,l.vM)((function(e){return{castingState:e.castingState,startCast:e.startCast,stopCast:e.stopCast}})),(0,d.cj)((function(e){return{disableCasting:!!(0,u.wk)({playerPublicPropsContext:e}).disableCasting}})))((function(e){var t=e.castingState,n=e.disableCasting,a=e.startCast,r=e.stopCast;return(0,i.jsx)(c,{isCastingAvailable:"unavailable"!==t,isConnected:"connected"===t,isConnecting:"connecting"===t,disableCasting:n,startCast:a,stopCast:r})}))},874219:function(e,t,n){"use strict";n.d(t,{W:function(){return r}});var i=n(910889),a=n(198437);function r(e,t,n){(0,i.s)({topic:(0,a.dl)(null!=e?e:""),onMessage:function(e){e.target_user_id===t&&n&&n()},skip:!e||!t}),(0,i.s)({topic:(0,a.CH)(null!=e?e:""),onMessage:function(e){e.channel_id===t&&n&&n()},skip:!e||!t})}},15111:function(e,t,n){"use strict";n.d(t,{G:function(){return a},a:function(){return r}});var i=n(883474);function a(e){i.E5.track("dvr_seek",{broadcast_id:e.broadcastID||"",dvr_current_seconds_offset:e.currOffset,pause_triggered:e.pauseTriggered,playback_id:e.playbackID,stream_runtime_in_seconds:e.uptime,target_offset:e.targetOffset,vod_id:e.vodID||""})}function r(e){i.E5.track("dvr_skip_to_live",{dvr_current_seconds_offset:e.currOffset,playback_id:e.playbackID,stream_runtime_in_seconds:e.uptime})}},753142:function(e,t,n){"use strict";n.d(t,{Ah:function(){return k}});var i=n(331635),a=n(474848),r=n(296540),o=n(868238),s=n(453595),l=n(514105),d=n(911906),u=n(129721),c=n(731820),p=n(947153),v=n(894320),m=n(171833),f=n(658593),g=n(883474),y=n(521022),h=function(e){var t=e.isFullscreen?m.R:f.L,n=e.isFullscreen?e.onExitFullscreen:e.onEnterFullscreen,i=e.isFullscreen?(0,g.hw)("Exit Fullscreen (f)","FullscreenButtonPresentation"):(0,g.hw)("Fullscreen (f)","FullscreenButtonPresentation");return(0,a.jsx)(y.g,{"data-a-target":"player-fullscreen-button",buttonIcon:t,label:i,onClick:n,disabled:!e.canFullscreen,tooltipPlacement:"top-end"})},_=function(e){function t(t){var n=e.call(this,t)||this;return n.canFullscreen=function(){var e;if(n.props.fullscreen.supported())return!0;var t=null===(e=n.props.videoContainer)||void 0===e?void 0:e.getElementsByTagName("video"),i=t&&t[0]?t[0]:null;return n.props.fullscreen.videoSupported(i)},n.onEnterFullscreen=function(){var e,t;null===(t=(e=n.props).onEnterFullscreen)||void 0===t||t.call(e),n.props.enterFullscreen()},n.onExitFullscreen=function(){var e,t;null===(t=(e=n.props).onExitFullscreen)||void 0===t||t.call(e),n.props.exitFullscreen()},n.onInitialized=function(){n.state.canFullscreen||n.setState({canFullscreen:n.canFullscreen()})},n.state={canFullscreen:n.canFullscreen()},n}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){this.props.playerEvents.addEventListener(p.a.INITIALIZED,this.onInitialized)},t.prototype.render=function(){return this.props.fullscreenDisabled?null:(0,a.jsx)(h,{canFullscreen:this.state.canFullscreen,isFullscreen:this.props.isFullscreen,onEnterFullscreen:this.onEnterFullscreen,onExitFullscreen:this.onExitFullscreen})},t}(r.Component);var k=(0,o.Zz)((0,c.c0)((function(e){return{enterFullscreen:e.enterFullscreen,exitFullscreen:e.exitFullscreen,isFullscreen:e.isFullscreen,videoContainer:e.videoContainer}})),(0,d.cj)((function(e){return{fullscreenDisabled:(0,v.wk)({playerPublicPropsContext:e}).disableFullscreen}})),(0,l.X)(),(0,s.W)(),(0,u.o1)())(_)},170937:function(e,t,n){"use strict";n.d(t,{BZ:function(){return k},Iz:function(){return S},Ke:function(){return i},TO:function(){return b},en:function(){return C}});var i,a=n(213879),r=n(509534),o=n(588280),s=n(868238),l=n(883474),d=n(233936),u=n(641896),c=n(911906),p=n(334963),v=n(573527),m=n(249448),f=n(920953);function g(e){return{isVideoAdShowing:(0,v.cz)(e.videoAdMetadata)}}function y(e){return{isPlaying:e.isPlaying,play:e.play,pause:e.pause}}function h(e){return{isEnded:(0,f.pl)(e),isPlayerCoreLoading:e.isPlayerCoreLoading,error:!!e.error}}function _(e){var t=e.content;return{isClip:(0,m.Jn)(t)}}function k(e){return(0,s.Zz)((0,d.VX)(g),(0,p.AP)(y),(0,u.dd)(h),(0,c.cj)(_))(e)}function S(e){return e.isPlaying?i.Playing:function(e){return e.isClip&&!e.isPlaying&&e.isEnded&&!e.isVideoAdShowing}(e)?i.AwaitingReplay:i.Paused}function C(e){switch(e){case i.AwaitingReplay:return a.$;case i.Playing:return r.i;case i.Paused:default:return o.i}}function b(e,t){switch(e){case i.Playing:return t?(0,l.hw)("Pause","SkylinePlayPauseButtonPresentation"):(0,l.hw)("Pause (space/k)","PlayPauseButtonPresentation");case i.Paused:return t?(0,l.hw)("Play","SkylinePlayPauseButtonPresentation"):(0,l.hw)("Play (space/k)","PlayPauseButtonPresentation");case i.AwaitingReplay:return t?(0,l.hw)("Replay","SkylinePlayPauseButtonPresentation"):(0,l.hw)("Replay (space/k)","PlayPauseButtonPresentation");default:return}}!function(e){e[e.AwaitingReplay=0]="AwaitingReplay",e[e.Paused=1]="Paused",e[e.Playing=2]="Playing"}(i||(i={}))},231743:function(e,t,n){"use strict";n.d(t,{K:function(){return o}});var i=n(883474),a=n(973448),r=n(920953);function o(e){var t=e.disableUserPreferencePersistence,n=e.isLiveLowLatencyEnabled,o=e.mediaPlayerInstance,s=e.updatePlayerContext,l=!n;t||i.IG.set(a.U.LOW_LATENCY_MODE,l),(0,r.GY)({isLiveLowLatencyEnabled:n,mediaPlayerInstance:o,updateContext:s},l)}},153296:function(e,t,n){"use strict";n.d(t,{U:function(){return a}});var i=n(883474),a=function(e){return e?(0,i.hw)("Closed Captions (Enabled)","SettingsMenuItemCCOptions"):(0,i.hw)("Closed Captions (Disabled)","SettingsMenuItemCCOptions")}},476863:function(e,t,n){"use strict";n.d(t,{x:function(){return m}});var i=n(474848),a=n(959340),r=n(883474),o=n(605840),s=n(562099),l=n(246942),d=n.n(l),u="badgeText--4a1dA",c="disabled--euZY9",p=function(e){var t,n=e.quality,a=e.disabled,r=(0,s.ei)(n);return(0,s.IW)(n.codecs,r)&&s.dD.includes(r)?(0,i.jsx)("sup",{className:d()(u,(t={},t[c]=a,t)),children:r}):null},v=n(913847),m=function(e){var t=e.quality,n=e.indicateSourceQuality;return t.group===o.s9?(0,v.PC)():t.group===o.ep?(0,v.vk)():(0,i.jsxs)(a.P,{display:"flex",gap:.5,children:[(0,v.zk)(t.name),(0,i.jsx)(p,{quality:t,disabled:(0,s.MC)(t)}),n&&(0,i.jsx)("span",{children:(0,r.hw)("(Source)","SettingsMenuSubmenuQuality")})]})}},873556:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var i=n(331635),a=n(113024);function r(e){return function(e){if(0===e.length)return null;var t=e.sort((function(e,t){var n=a.vb.indexOf(a.oq[e]),i=a.vb.indexOf(a.oq[t]);return(-1===n?999:n)-(-1===i?999:i)}))[0];return(a.oq[t]||a.DZ.generic)()}(e.unavailableQualities.flatMap((function(e){return(0,i.__spreadArray)((0,i.__spreadArray)([],e.filterReasons,!0),e.authReasons,!0)})))}},913847:function(e,t,n){"use strict";n.d(t,{PC:function(){return s},vk:function(){return l},xc:function(){return r},z7:function(){return d},zk:function(){return o}});var i=n(883474),a=n(605840);function r(e,t){return e.group===a.s9?s():t?(0,i.hw)("{resolution} (Source)",{resolution:o(e.name)},"SettingsMenuSubmenuQuality"):e.name}function o(e){return e.split("(source)")[0].trim()}var s=function(){return(0,i.hw)("Auto","SettingsMenuSubmenuQuality")},l=function(){return(0,i.hw)("Audio Only","SettingsMenuSubmenuQuality")},d=function(){return(0,i.hw)("Log In","SettingsMenuSubmenuQuality")}},22444:function(e,t,n){"use strict";n.d(t,{m:function(){return v}});var i=n(331635),a=n(474848),r=n(368972),o=n(296540),s=n(415044),l=n(883474),d=n(713534),u=n(368770),c=n(684990),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.shouldShow=function(){return t.props.isStaff||l.x2.config.buildType===d.n.Dev},t.showSubMenu=function(){return t.props.setActiveMenu("settings-menu__staff")},t}return(0,i.__extends)(t,e),t.prototype.render=function(){if(!this.shouldShow())return null;var e=(0,l.hw)("Staff","SettingsMenuItemStaff");return(0,a.jsx)(r.i,{addRole:!0,label:e,actionIcon:c.W1,onClick:this.showSubMenu})},t}(o.Component);var v=(0,s.Ng)((function(e){return{isStaff:(0,u.Xl)(e)}}))(p)},374978:function(e,t,n){"use strict";n.d(t,{E:function(){return l}});var i=n(474848),a=(n(296540),n(415044)),r=n(868238),o=n(757245),s=n(508952).x.wrap((function(){return n.e(62421).then(n.bind(n,514223))}),"SettingsMenuSubmenuStaffContainer",{failSilently:!0,placeholder:null});var l=(0,r.Zz)((0,o.X)({name:"SettingsMenuSubmenuStaff"}),(0,a.Ng)((function(e){return{firstPageLoaded:e.session.firstPageLoaded}})))((function(e){return e.firstPageLoaded?(0,i.jsx)(s,{}):null}))},68873:function(e,t,n){"use strict";n.d(t,{R6:function(){return s},TO:function(){return u},en:function(){return d},mw:function(){return l}});var i=n(163347),a=n(59542),r=n(267178),o=n(883474),s=.5,l=.1;function d(e){var t=e.muted,n=e.volume;return t||0===n?i.N:n&&n>.5?a.c:r.g}function u(e){var t=e.muted,n=e.volume;return t||0===n?(0,o.hw)("Unmute (m)","VolumeSliderComponent"):(0,o.hw)("Mute (m)","VolumeSliderComponent")}},110285:function(e,t,n){"use strict";n.d(t,{h:function(){return a}});var i=n(296540);function a(e,t){void 0===t&&(t=1e3);var n=(0,i.useState)(r(o(e))),a=n[0],s=n[1];return(0,i.useEffect)((function(){s(r(o(e)));var n=setInterval((function(){s(r(o(e)))}),t);return function(){return clearInterval(n)}}),[e,t]),Math.round(a/1e3)}function r(e){return o(new Date)-e}function o(e){return new Date(e.toUTCString()).getTime()}},445865:function(e,t,n){"use strict";n.d(t,{f:function(){return a}});var i=n(415044),a=function(){return(0,i.d4)((function(e){var t;return null===(t=e.session.user)||void 0===t?void 0:t.id}))}},404981:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AdFormatTracking_RecordAdEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RecordAdEventInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"recordAdEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},837033:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"HappeningNowSettings"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isChatHappeningNowEnabled"},arguments:[],directives:[]}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},942802:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetHappeningNowSettings"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SetChatHappeningNowSettingsInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setChatHappeningNowSettings"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isChatHappeningNowEnabled"},arguments:[],directives:[]}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},843920:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ShareClipRenderStatus"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"contentClipsManagerClip"},directives:[]}]}}]}}]},a={};function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(n(66806).definitions.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)})));var o={};i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),o[e.name.value]=t}})),e.exports=i},66806:function(e,t,n){var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"contentClipsManagerClip"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Clip"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isAutoCurated"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"embedURL"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"language"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isFeatured"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"clipAssetFragment"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"curator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profileImageURL"},arguments:[{kind:"Argument",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"70"}}],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"boxArtURL"},arguments:[{kind:"Argument",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"52"}},{kind:"Argument",name:{kind:"Name",value:"height"},value:{kind:"IntValue",value:"72"}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"broadcast"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"broadcaster"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"primaryColorHex"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPartner"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profileImageURL"},arguments:[{kind:"Argument",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"70"}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"followers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewersCount"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"lastBroadcast"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startedAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"self"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isEditor"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"thumbnailURL"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isFeatured"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPublished"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"duration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"durationSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"champBadge"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"playbackAccessToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"params"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"platform"},value:{kind:"StringValue",value:"web",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"playerType"},value:{kind:"StringValue",value:"clips-download",block:!1}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"signature"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"video"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcastType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"videoOffsetSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"videoQualities"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceURL"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"isViewerEditRestricted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"suggestedCropping"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"portraitClipCropping"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"rawMediaRelativeOffset"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rawMediaKey"},arguments:[],directives:[]}]}}]},a={};function r(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}i.definitions=i.definitions.concat(r(n(690217).definitions)),i.definitions=i.definitions.concat(r(n(753155).definitions)),e.exports=i},514492:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"incrementClipViewCount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateClipViewCountInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateClipViewCount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clip"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},798747:function(e){var t={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VideoPlayer_CollectionManager_Video"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Video"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VideoPlayer_CollectionManager_Collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"200"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VideoPlayer_CollectionManager_Video"},directives:[]}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoPlayer_CollectionManager"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"collectionID"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VideoPlayer_CollectionManager_Collection"},directives:[]}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},163061:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ComscoreStreamingQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"channel"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isLive"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isVodOrCollection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vodID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isClip"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clipSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"channel"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isLive"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"broadcastSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"video"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"vodID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isVodOrCollection"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcastType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"lengthSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"clip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"clipSlug"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isClip"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcaster"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"durationSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},264102:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoPlayerMediaSessionManager"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"channel"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isLive"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isVodOrCollection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vodID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isClip"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clipSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"channel"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isLive"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profileImageURL"},arguments:[{kind:"Argument",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"150"}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcastSettings"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isLive"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"video"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"vodID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isVodOrCollection"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profileImageURL"},arguments:[{kind:"Argument",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"150"}}],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"clip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"clipSlug"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isClip"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcaster"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profileImageURL"},arguments:[{kind:"Argument",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"150"}}],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},563599:function(e){var t={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"NielsenContentMetadataVideo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Video"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"NielsenContentMetadata"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"login"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vodID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isCollectionContent"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isLiveContent"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isVODContent"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"login"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isLiveContent"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcastSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"video"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"vodID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isVODContent"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"NielsenContentMetadataVideo"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"collectionID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isCollectionContent"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"NielsenContentMetadataVideo"},directives:[]}]}}]}}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},548655:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoPlayerPixelAnalyticsUrls"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"login"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"allowAmazon"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"allowComscore"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"allowGoogle"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"allowNielsen"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"channel"},name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"login"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adProperties"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"trackingPixels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"consent"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"allowAmazon"},value:{kind:"Variable",name:{kind:"Name",value:"allowAmazon"}}},{kind:"ObjectField",name:{kind:"Name",value:"allowComscore"},value:{kind:"Variable",name:{kind:"Name",value:"allowComscore"}}},{kind:"ObjectField",name:{kind:"Name",value:"allowGoogle"},value:{kind:"Variable",name:{kind:"Name",value:"allowGoogle"}}},{kind:"ObjectField",name:{kind:"Name",value:"allowNielsen"},value:{kind:"Variable",name:{kind:"Name",value:"allowNielsen"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"origin"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"service"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"timeOffsetSeconds"},arguments:[],directives:[]}]}}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},793299:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"queryUserViewedVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"videoId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"video"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"videoId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"self"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewingHistory"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]}]}}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},571696:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateUserViewedVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateUserViewedVideoInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateUserViewedVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"video"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},368859:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoPlayerStreamMetadata"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"channel"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"channel"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEncrypted"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},574751:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"StreamRefetchManager"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"channel"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"channel"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEncrypted"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},735319:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"StreamTagsTrackingChannel"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"channel"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"channel"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"streamTagsTrackingTags"},directives:[]}]}}]}}]}}]},a={};function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(n(186835).definitions.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)})));var o={};i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),o[e.name.value]=t}})),e.exports=i},186835:function(e,t,n){var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"streamTagsTrackingTags"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Stream"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"freeformTags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"freeformTagFragment"},directives:[]}]}}]}}]},a={};i.definitions=i.definitions.concat(n(181227).definitions.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))),e.exports=i},868531:function(e,t,n){var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AdRequestBroadcaster"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adProperties"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"adServerDefault"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasPrerollsDisabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasPostrollsDisabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasVodAdsEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vodArchiveMidrolls"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"self"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"subscriptionBenefit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"product"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasAdFree"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"roles"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isAffiliate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPartner"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"broadcastSettings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isMature"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcasterSoftware"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestGame"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestTag"},directives:[]}]}}]}}]}}]},a={};function r(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}i.definitions=i.definitions.concat(r(n(326983).definitions)),i.definitions=i.definitions.concat(r(n(416003).definitions)),e.exports=i},11433:function(e){e.exports={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AdRequestContentLabel"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContentClassificationLabel"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEnabled"},arguments:[],directives:[]}]}}]}},80368:function(e){e.exports={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AdRequestCurrentUser"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasTurbo"},arguments:[],directives:[]}]}}]}},326983:function(e,t,n){var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AdRequestGame"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Game"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tags"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tagType"},value:{kind:"EnumValue",value:"CONTENT"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestTag"},directives:[]}]}}]}}]},a={};i.definitions=i.definitions.concat(n(416003).definitions.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))),e.exports=i},655059:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AdRequestHandling"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"login"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vodID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isLive"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isVOD"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isCollection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestCurrentUser"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"login"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isLive"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestBroadcaster"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"video"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"vodID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isVOD"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestVOD"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"collectionID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isCollection"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestVOD"},directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestBroadcaster"},directives:[]}]}}]}}]}}]},a={};function r(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}function o(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){o(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){o(e,t)})),e.definitions&&e.definitions.forEach((function(e){o(e,t)}))}i.definitions=i.definitions.concat(r(n(868531).definitions)),i.definitions=i.definitions.concat(r(n(728390).definitions)),i.definitions=i.definitions.concat(r(n(80368).definitions));var s={};i.definitions.forEach((function(e){if(e.name){var t=new Set;o(e,t),s[e.name.value]=t}})),e.exports=i},416003:function(e){e.exports={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AdRequestTag"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Tag"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tagName"},arguments:[],directives:[]}]}}]}},728390:function(e,t,n){var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"AdRequestVOD"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Video"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lengthSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcastType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestGame"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestBroadcaster"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contentTags"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestTag"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contentClassificationLabels"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AdRequestContentLabel"},directives:[]}]}}]}}]},a={};function r(e){return e.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)}))}i.definitions=i.definitions.concat(r(n(868531).definitions)),i.definitions=i.definitions.concat(r(n(11433).definitions)),i.definitions=i.definitions.concat(r(n(326983).definitions)),i.definitions=i.definitions.concat(r(n(416003).definitions)),e.exports=i},194442:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VODMidrollManager"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vodID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"collectionID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isVOD"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isCollection"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"video"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"vodID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isVOD"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcastType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VODMidrollManagerBroadcaster"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"collectionID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isCollection"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Video"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcastType"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VODMidrollManagerBroadcaster"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VODMidrollManagerBroadcaster"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adProperties"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VODMidrollManagerAdProperties"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VODMidrollManagerAdProperties"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AdProperties"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasVodAdsEnabled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vodArchiveMidrolls"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vodArchiveMidrollsBreakLength"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"vodArchiveMidrollsFrequency"},arguments:[],directives:[]}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},687866:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoAdRequestDecline"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"context"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AdRequestContext"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"adContext"},arguments:[{kind:"Argument",name:{kind:"Name",value:"context"},value:{kind:"Variable",name:{kind:"Name",value:"context"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"radToken"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"declineState"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reason"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"shouldDecline"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},478540:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ClientSideAdEventHandling_RecordAdEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RecordAdEventInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"recordAdEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"error"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},709870:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoPlayer_VideoSourceManager"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UserByAttribute"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userByAttribute"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},989706:function(e){e.exports={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"contentClassificationLabelPoliciesFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContentClassificationLabelPolicyProperties"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"signPostProperties"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"signPost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contentClassificationLabels"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contentGateProperties"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contentGate"},arguments:[],directives:[]}]}}]}}]}},52335:function(e,t,n){var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"broadcasterInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"contentClassificationLabelFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ContentClassificationLabel"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"localizedName"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"gameTrackingFields"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Game"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ContentClassificationContext"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"login"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"clipSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vodID"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isStream"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isVOD"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isClip"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"login"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isStream"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"gameTrackingFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contentClassificationLabels"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"contentClassificationLabelFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contentClassificationLabelPolicyProperties"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"contentClassificationLabelPoliciesFields"},directives:[]}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"broadcasterInfo"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"video"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"vodID"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isVOD"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcastType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"gameTrackingFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"broadcasterInfo"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contentClassificationLabels"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"contentClassificationLabelFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contentClassificationLabelPolicyProperties"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"contentClassificationLabelPoliciesFields"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"clip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"clipSlug"}}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isClip"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcaster"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"broadcasterInfo"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"gameTrackingFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contentClassificationLabels"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"contentClassificationLabelFields"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"contentClassificationLabelPolicyProperties"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"contentClassificationLabelPoliciesFields"},directives:[]}]}}]}}]}}]},a={};function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(n(989706).definitions.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)})));var o={};i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),o[e.name.value]=t}})),e.exports=i},87291:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ContentClassificationContextStreamPubsub"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"channelID"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"channelID"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contentClassificationLabelPolicyProperties"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"contentClassificationLabelPoliciesFields"},directives:[]}]}}]}}]}}]}}]},a={};function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(n(989706).definitions.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)})));var o={};i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),o[e.name.value]=t}})),e.exports=i},465403:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ExtensionsUIContext_ChannelID"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"channelLogin"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"channelLogin"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},334609:function(e,t,n){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoAccessToken_Clip"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"platform"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"playbackAccessToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"params"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"platform"},value:{kind:"Variable",name:{kind:"Name",value:"platform"}}},{kind:"ObjectField",name:{kind:"Name",value:"playerType"},value:{kind:"StringValue",value:"clips-viewing",block:!1}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"signature"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"videoQualities"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"videoAccessToken_ClipQuality"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"assets"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"clipAssetFragment"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"videoAccessToken_ClipQuality"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ClipVideoQuality"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"frameRate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"quality"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sourceURL"},arguments:[],directives:[]}]}}]},a={};function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}i.definitions=i.definitions.concat(n(690217).definitions.filter((function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!a[t]&&(a[t]=!0,!0)})));var o={};i.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),o[e.name.value]=t}})),e.exports=i},686499:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoAccessToken_Collection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"collection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cursor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Video"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},889554:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PlaybackAccessToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"login"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isLive"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vodID"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isVod"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"playerType"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"platform"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"streamPlaybackAccessToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"channelName"},value:{kind:"Variable",name:{kind:"Name",value:"login"}}},{kind:"Argument",name:{kind:"Name",value:"params"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"platform"},value:{kind:"Variable",name:{kind:"Name",value:"platform"}}},{kind:"ObjectField",name:{kind:"Name",value:"playerBackend"},value:{kind:"StringValue",value:"mediaplayer",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"playerType"},value:{kind:"Variable",name:{kind:"Name",value:"playerType"}}}]}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isLive"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"signature"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"authorization"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isForbidden"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"forbiddenReasonCode"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"videoPlaybackAccessToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"vodID"}}},{kind:"Argument",name:{kind:"Name",value:"params"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"platform"},value:{kind:"Variable",name:{kind:"Name",value:"platform"}}},{kind:"ObjectField",name:{kind:"Name",value:"playerBackend"},value:{kind:"StringValue",value:"mediaplayer",block:!1}},{kind:"ObjectField",name:{kind:"Name",value:"playerType"},value:{kind:"Variable",name:{kind:"Name",value:"playerType"}}}]}}],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isVod"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"signature"},arguments:[],directives:[]}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},498690:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoPlayer_ChapterSelectButtonVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"videoID"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includePrivate"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"video"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"videoID"}}},{kind:"Argument",name:{kind:"Name",value:"options"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"includePrivate"},value:{kind:"Variable",name:{kind:"Name",value:"includePrivate"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"moments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"momentRequestType"},value:{kind:"EnumValue",value:"VIDEO_CHAPTER_MARKERS"}},{kind:"Argument",name:{kind:"Name",value:"types"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"GAME_CHANGE"},{kind:"EnumValue",value:"HEARTHSTONE_VCA"},{kind:"EnumValue",value:"OVERWATCH_VCA"},{kind:"EnumValue",value:"PUBG_VCA"}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VideoPlayerVideoMomentEdge"},directives:[]}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VideoPlayerVideoMomentEdge"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VideoMomentEdge"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"moments"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VideoPlayerVideoMomentConnection"},directives:[]}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"VideoPlayerVideoMoment"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VideoPlayerVideoMomentConnection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VideoMomentEdge"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VideoPlayerVideoMoment"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VideoPlayerVideoMoment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VideoMoment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"durationMilliseconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"positionMilliseconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"subDescription"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnailURL"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"details"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VideoPlayerGameChangeDetails"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"video"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lengthSeconds"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VideoPlayerGameChangeDetails"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"GameChangeMomentDetails"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"game"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"boxArtURL"},arguments:[{kind:"Argument",name:{kind:"Name",value:"width"},value:{kind:"IntValue",value:"40"}},{kind:"Argument",name:{kind:"Name",value:"height"},value:{kind:"IntValue",value:"53"}}],directives:[]}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},824565:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"LiveStreamTime"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"login"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"login"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},481391:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoPlayerSettingsWithClipMetadata"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isCommunityMomentsFeatureEnabled"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clip"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"broadcaster"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"curator"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"communityMoment"},arguments:[],directives:[{kind:"Directive",name:{kind:"Name",value:"include"},arguments:[{kind:"Argument",name:{kind:"Name",value:"if"},value:{kind:"Variable",name:{kind:"Name",value:"isCommunityMomentsFeatureEnabled"}}}]}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"currentUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"roles"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isSiteAdmin"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},317391:function(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoPlayer_ViewCount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"login"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"login"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"stream"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewersCount"},arguments:[],directives:[]}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t},539062:function(e){var t={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"VideoMutedSegment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"VideoMutedSegment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"duration"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"offset"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"VideoPlayer_VODSeekbar"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"vodID"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includePrivate"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"video"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"vodID"}}},{kind:"Argument",name:{kind:"Name",value:"options"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"includePrivate"},value:{kind:"Variable",name:{kind:"Name",value:"includePrivate"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lengthSeconds"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"muteInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mutedSegmentConnection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VideoMutedSegment"},directives:[]}]}}]}}]}}]}}]}}]};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){n(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){n(e,t)})),e.definitions&&e.definitions.forEach((function(e){n(e,t)}))}var i={};t.definitions.forEach((function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}})),e.exports=t}}]);