/*!CK:4275752076!*//*1459454979,*/

if (self.CavalryLogger) { CavalryLogger.start_js(["ndkYl"]); }

__d("VideoPlayerInitializationEvent",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={PLAYER_INITIALIZATION:"player_initialization",PLAYER_ALLOCATED:"player_allocated",REQUESTED_PLAYING:"requested_playing",STARTED_PLAYING:"started_playing",PLAYER_SENT_REQUEST:"player_sent",PLAYER_RECEIVED_FIRST_BYTE:"player_received_first_byte",BUFFER_READY:"buffer_ready",METADATA_READY:"metadata_ready"};},null);
__d("VideoPlayerLoggerSource",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={ADS:"ads",ANIMATED_IMAGE_SHARE:"animated_image_share",BROADCAST_REQUEST_ATTACHMENT:"broadcast_request_attachment",EMBEDDED:"embedded",EMBEDDED_VIDEO:"embedded_video",EMBEDDED_VIDEO_PREVIEW:"embedded_video_preview",EMBEDDED_PAGE_PLUGIN:"embedded_page_plugin",HTML5:"html5",INLINE:"inline",CHAINED:"chained",CHAINED_SUGGESTION:"chained_suggestion",CHANNEL:"channel",INSIGHTS:"insights",LOOKBACK:"lookback",MEDIA_COLLAGE:"media_collage",MESSAGING:"messaging",MISC:"misc",MOBILE:"mobile",PAGES_FINCH_MAIN_VIDEO:"pages_finch_main_video",PAGES_FINCH_THUMBNAIL_VIDEO:"pages_finch_thumbnail_video",PAGES_FINCH_TRAILER:"pages_finch_trailer",PAGES_VIDEO_SET:"pages_video_set",PERMALINK:"permalink",PROFILE_VIDEO:"profile_video",PROFILE_VIDEO_THUMB:"profile_video_thumb",REPORT_FLOW:"report_flow",REVIEW:"review",SNOWLIFT:"snowlift",SRT_REVIEW:"srt_review",TRAILER_OG_ATTACHMENT:"trailer_og_attachment",TRAILER_TIMELINE_COLLECTIONS:"trailer_timeline_collections",TRAILER_TIMELINE_UNIT:"trailer_timeline_unit",VIDEO_COPYRIGHT_PREVIEW:"video_copyright_preview",VIDEO_HOME_INLINE:"video_home_inline",VIDEO_TV:"video_tv",VIDEOHUB_PLAYLIST:"videohub_playlist",VIDEOHUB_FEATURED:"videohub_featured",SLIDESHOW:"slideshow",LIVE_MAP:"live_map"};},null);
__d("VideoPlayerVersions",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={HTML5:"html5",SILVERCITY:"silvercity",PLEASANTVILLE:"pleasantville",OLD_API_PSR:"old_api_psr",OLD_API_EXO:"old_api_exo",OLD_API_EXO_NEW_LIB:"old_api_exo_new_lib",OLD_API_EXO_DEPRECATED:"old_api_exo_deprecated",LEGACY:"legacy",REFACTORED:"refactored",FNF:"fnf",MBASIC:"mbasic",UNKNOWN:"unknown"};},null);
__d('forwardEvent',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j,event){return i.addListener(event,function(){for(var k=arguments.length,l=Array(k),m=0;m<k;m++)l[m]=arguments[m];return j.emit.apply(j,[event].concat(l));});}f.exports=h;},null);
__d("HTMLMediaElementReadyStates",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4};f.exports=h;},null);
__d('getHTMLMediaElementMutedState',['HTMLMediaElementReadyStates'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){if(i.readyState>=c('HTMLMediaElementReadyStates').HAVE_METADATA){return i.muted;}else return i.hasAttribute('muted')||i.muted;}f.exports=h;},null);
__d('HVideoPlayerMixin',['EventListener','VideoPlayerLoggerEvent','VideoPlayerHTML5Experiments','getHTMLMediaElementMutedState','performanceAbsoluteNow'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=-1;function i(k,event){var l=event.timeStamp;if(l){var m=l.toString().length-Date.now().toString().length;if(m!==0)l=Math.round(l/Math.pow(10,m));k.time_ms=l;}else k.time_ms=Date.now();return k;}var j={initLogger:function(k,l){var m=this.getSubscriptions();this._loggedEvents={};this._logFunction=k;this._useEventTime=l;var n=this.getVideoElement();this._lastStartTimePosition=h;this._muted=c('getHTMLMediaElementMutedState')(n);this._pausedPosition=h;this._seeking=false;this._seekSourceTimePosition=h;this._volume=n.volume;this._lastPlayedTime=h;if(n.readyState>=n.HAVE_FUTURE_DATA){this._logReadyToPlay();}else m.addSubscriptions(c('EventListener').listen(n,'canplay',this._logReadyToPlay.bind(this)));m.addSubscriptions(c('EventListener').listen(n,'pause',this._onPause.bind(this)),c('EventListener').listen(n,'playing',this._onPlaying.bind(this)),c('EventListener').listen(n,'seeked',this._onSeeked.bind(this)),c('EventListener').listen(n,'seeking',this._onSeeking.bind(this)),c('EventListener').listen(n,'play',this._onPlay.bind(this)),c('EventListener').listen(n,'timeupdate',this._onTimeUpdate.bind(this)),c('EventListener').listen(n,'volumechange',this._onVolumeChange.bind(this)));},_onPlay:function(){this._pendingPlayRequest=true;},_logOnce:function(event,k){if(this._loggedEvents[event])return;this._logEvent(event,k);},_logEvent:function(event,k){this._loggedEvents[event]=true;var l=k?k:{};l.video_id=this.getVideoID();if(!l.hasOwnProperty('video_time_position'))l.video_time_position=this.getVideoElement().currentTime.toFixed(2);if(!l.time_ms)l.time_ms=c('VideoPlayerHTML5Experiments').useMonotonicallyIncreasingTimers?c('performanceAbsoluteNow')():Date.now();l.time=Math.round(l.time_ms/1000);if(this.getAdClientToken){var m=this.getAdClientToken();if(m)l.ad_client_token=m;}if(this.getChainData){var n=this.getChainData();if(n){l.video_chaining_depth_level=n.video_chaining_depth_level;l.video_chaining_session_id=n.video_chaining_session_id;}}if(this.getPlayerFormat)l.player_format=this.getPlayerFormat();if(this.getPlayerOrigin)l.player_origin=this.getPlayerOrigin();this._logFunction(event,l);},_logReadyToPlay:function(){this._logOnce(c('VideoPlayerLoggerEvent').READY_TO_PLAY);},_onPause:function(k){var l=this.getVideoElement();if(this._pendingPlayRequest){var m={debug_reason:this.getLastPlayReason()};this._pendingPlayRequest=false;this._logEvent(c('VideoPlayerLoggerEvent').CANCELLED_REQUESTED_PLAYING,m);return;}var event=l.ended?c('VideoPlayerLoggerEvent').FINISHED_PLAYING:c('VideoPlayerLoggerEvent').PAUSED;if(l.currentTime)this._lastPlayedTime=l.currentTime.toFixed(2);var n=this._lastPlayedTime,o=k.lastPauseReason;if(event===c('VideoPlayerLoggerEvent').FINISHED_PLAYING){n=Math.max(n,l.duration);}else if(this.preventPauseLoggingInMixin===true){return;}else if(this.preventPauseLoggingInMixin===false)o=o||'unloaded';this._logEvent(event,this._amendEventTime({video_last_start_time_position:this._lastStartTimePosition===h?this._lastPlayedTime:this._lastStartTimePosition,video_time_position:n,debug_reason:o},k));this._lastStartTimePosition=h;},addWatchTimeData:function(k){if(this._lastStartTimePosition!=h&&this._lastPlayedTime!=h){k.video_last_start_time_position=this._lastStartTimePosition;k.video_time_position=this._lastPlayedTime;this._lastStartTimePosition=h;}return k;},getLastPlayReason:function(){return null;},getVideoPlayReason:function(){return null;},_onPlaying:function(k){var l=this.getLastPlayReason();this._pendingPlayRequest=false;var event=this._loggedEvents[c('VideoPlayerLoggerEvent').STARTED_PLAYING]?c('VideoPlayerLoggerEvent').UNPAUSED:c('VideoPlayerLoggerEvent').STARTED_PLAYING,m={debug_reason:l,video_play_reason:this.getVideoPlayReason()};this._logEvent(event,this._amendEventTime(m,k));this._lastStartTimePosition=this.getVideoElement().currentTime.toFixed(2);this._lastPlayedTime=this.getVideoElement().currentTime.toFixed(2);},_onSeeked:function(k){var l={video_seek_source_time_position:this._seekSourceTimePosition};if(this._lastStartTimePosition!==h){l.video_last_start_time_position=this._lastStartTimePosition;}else l.video_last_start_time_position=this._seekSourceTimePosition;this._logEvent(c('VideoPlayerLoggerEvent').SCRUBBED,this._amendEventTime(l,k));var m=this.getVideoElement();if(m.paused){this._lastStartTimePosition=h;}else this._lastStartTimePosition=m.currentTime;this._seekSourceTimePosition=h;this._seeking=false;},_onSeeking:function(){if(!this._seeking){this._seekSourceTimePosition=this.getVideoElement().currentTime.toFixed(2);this._seeking=true;}},_onTimeUpdate:function(){var k=this.getVideoElement();if(!k.paused)this._lastPlayedTime=k.currentTime.toFixed(2);},_onVolumeChange:function(k){var l=this.getVideoElement(),m={},event=null;if(l.muted!==this._muted&&l.volume===this._volume&&l.volume>0){event=l.muted?c('VideoPlayerLoggerEvent').MUTED:c('VideoPlayerLoggerEvent').UNMUTED;}else{event=l.volume>this._volume?c('VideoPlayerLoggerEvent').VOLUME_INCREASE:c('VideoPlayerLoggerEvent').VOLUME_DECREASE;m.current_volume=Math.round(l.volume*100);}this._logEvent(event,this._amendEventTime(m,k));this._muted=l.muted;this._volume=l.volume;},_amendEventTime:function(k,event){if(c('VideoPlayerHTML5Experiments').useMonotonicallyIncreasingTimers)return k;if(this._useEventTime)return i(k,event);return k;}};f.exports=j;},null);
__d('VideoPlayerLoggerErrorStates',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports={PLAYBACK_FAILURE:'playback_failure',PLAYER_FAILURE:'player_failure'};},null);
__d('VideoPlayerLoggerErrors',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports={ENTERED_FALLBACK:'entered_fallback',ERROR_CALLING_FLASH:'error_calling_flash'};},null);
__d('VideoPlayerLoggerFallbackReasons',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports={TIMEOUT:'timeout',FLASH_ERROR:'flash_error',FLASH_UNAVAILABLE:'flash_unavailable'};},null);
__d('VideoPlayerLoggerPlayerStates',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports={STARTED:'started',UNPAUSED:'unpaused'};},null);
__d('VideoPlayerLogger',['Banzai','ErrorUtils','TimeSpentImmediateActiveSecondsLogger','VideoPlayerHTML5Experiments','VideoPlayerLoggerEvent','VideoPlayerLoggerErrors','VideoPlayerLoggerErrorStates','VideoPlayerLoggerFallbackReasons','VideoPlayerLoggerSource','VideoPlayerInitializationEvent','VideoPlayerLoggerPlayerStates','ex','performanceAbsoluteNow'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h='video_player';function i(){return c('VideoPlayerHTML5Experiments').useMonotonicallyIncreasingTimers?c('performanceAbsoluteNow')():Date.now();}function j(k,l){'use strict';this.$VideoPlayerLogger1=k;this.$VideoPlayerLogger2=null;this.$VideoPlayerLogger3={};this.$VideoPlayerLogger4=l;this.$VideoPlayerLogger5=0;this.$VideoPlayerLogger6();}j.prototype.updateSource=function(k){'use strict';this.$VideoPlayerLogger1=k;};j.prototype.logEvent=function(event,k){'use strict';k=babelHelpers['extends']({},k,this.$VideoPlayerLogger4);k.initial_event=!this.$VideoPlayerLogger3.hasOwnProperty(event);if(!k.hasOwnProperty('time_ms'))k.time_ms=i();if(!k.hasOwnProperty('time'))k.time=Math.round(k.time_ms/1000);k.is_stalling=this.$VideoPlayerLogger7>0;if(this.$VideoPlayerLogger2)Object.assign(k,this.$VideoPlayerLogger2);switch(event){case c('VideoPlayerInitializationEvent').PLAYER_INITIALIZATION:this.$VideoPlayerLogger8=k.time_ms;break;case c('VideoPlayerInitializationEvent').REQUESTED_PLAYING:case c('VideoPlayerInitializationEvent').STARTED_PLAYING:case c('VideoPlayerInitializationEvent').PLAYER_ALLOCATED:case c('VideoPlayerInitializationEvent').PLAYER_SENT_REQUEST:case c('VideoPlayerInitializationEvent').PLAYER_RECEIVED_FIRST_BYTE:case c('VideoPlayerInitializationEvent').BUFFER_READY:case c('VideoPlayerInitializationEvent').METADATA_READY:if(!k.initial_event)break;k.elapsed_time_since_init=Date.now()-this.$VideoPlayerLogger8;break;}switch(event){case c('VideoPlayerLoggerEvent').REQUESTED_PLAYING:this.$VideoPlayerLogger6();this.$VideoPlayerLogger9();if(this.$VideoPlayerLogger3[c('VideoPlayerLoggerEvent').STARTED_PLAYING]){k.state=c('VideoPlayerLoggerPlayerStates').UNPAUSED;}else k.state=c('VideoPlayerLoggerPlayerStates').STARTED;break;case c('VideoPlayerLoggerEvent').STARTED_PLAYING:case c('VideoPlayerLoggerEvent').UNPAUSED:case c('VideoPlayerLoggerEvent').FINISHED_PLAYING:case c('VideoPlayerLoggerEvent').CANCELLED_REQUESTED_PLAYING:case c('VideoPlayerLoggerEvent').ERROR:case c('VideoPlayerLoggerEvent').PAUSED:if(event===c('VideoPlayerLoggerEvent').ERROR&&k.state!==c('VideoPlayerLoggerErrorStates').PLAYBACK_FAILURE)break;if(event===c('VideoPlayerLoggerEvent').CANCELLED_REQUESTED_PLAYING)if(this.$VideoPlayerLogger3[c('VideoPlayerLoggerEvent').STARTED_PLAYING]){k.state=c('VideoPlayerLoggerPlayerStates').UNPAUSED;}else k.state=c('VideoPlayerLoggerPlayerStates').STARTED;this.$VideoPlayerLogger10();this.$VideoPlayerLogger11(k);this.$VideoPlayerLogger6();break;}var l={logData:k,event:event,scriptPath:this.$VideoPlayerLogger12,source:this.$VideoPlayerLogger1};if(!event)c('ErrorUtils').reportError(new Error(c('ex')('VideoPlayerLogger: Missing event name')),false);this.$VideoPlayerLogger3[event]=true;if(this.$VideoPlayerLogger1===c('VideoPlayerLoggerSource').ANIMATED_IMAGE_SHARE)return;if(k.ad_client_token){c('Banzai').post(h,l,c('Banzai').VITAL);}else c('Banzai').post(h,l);if(event===c('VideoPlayerLoggerEvent').FINISHED_PLAYING||event===c('VideoPlayerLoggerEvent').PAUSED){var m=k.time_ms||i(),n=k.video_time_position-k.video_last_start_time_position;if(n>=0)c('TimeSpentImmediateActiveSecondsLogger').maybeReportActiveInterval('video',m-Math.floor(n*1000),m);}};j.prototype.setScriptPath=function(k){'use strict';this.$VideoPlayerLogger12=k;};j.prototype.setFTData=function(k){'use strict';this.$VideoPlayerLogger2=k;};j.prototype.startBuffering=function(k){'use strict';this.$VideoPlayerLogger9(k);};j.prototype.endBuffering=function(){'use strict';this.$VideoPlayerLogger10();};j.prototype.$VideoPlayerLogger9=function(k){'use strict';if(this.$VideoPlayerLogger7<=0){this.$VideoPlayerLogger7=Date.now();if(this.$VideoPlayerLogger3[c('VideoPlayerLoggerEvent').STARTED_PLAYING]&&k!==undefined)this.$VideoPlayerLogger13=k;}};j.prototype.$VideoPlayerLogger10=function(){'use strict';if(this.$VideoPlayerLogger7>0){var k=Date.now()-this.$VideoPlayerLogger7;if(this.$VideoPlayerLogger13!==null)this.$VideoPlayerLogger14=k;this.$VideoPlayerLogger15=this.$VideoPlayerLogger15+k;this.$VideoPlayerLogger5=this.$VideoPlayerLogger5+k;this.$VideoPlayerLogger16++;this.$VideoPlayerLogger7=0;}};j.prototype.getCurrentStallTime=function(){'use strict';return this.$VideoPlayerLogger5;};j.prototype.$VideoPlayerLogger11=function(k){'use strict';k.stall_time=Math.max(0,this.$VideoPlayerLogger15);k.stall_count=this.$VideoPlayerLogger16;if(this.$VideoPlayerLogger14){k.first_stall_time=this.$VideoPlayerLogger14;k.first_stall_start_position=this.$VideoPlayerLogger13;}};j.prototype.$VideoPlayerLogger6=function(){'use strict';this.$VideoPlayerLogger15=0;this.$VideoPlayerLogger7=0;this.$VideoPlayerLogger16=0;this.$VideoPlayerLogger13=null;this.$VideoPlayerLogger14=0;};Object.assign(j,{Sources:c('VideoPlayerLoggerSource'),Errors:c('VideoPlayerLoggerErrors'),FallbackReasons:c('VideoPlayerLoggerFallbackReasons'),ErrorStates:c('VideoPlayerLoggerErrorStates'),PlayerStates:c('VideoPlayerLoggerPlayerStates')});f.exports=j;},null);
__d('dispatchEvent',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){var k;if(typeof b.Event==='function'){k=new b.Event(j);}else{k=b.document.createEvent('Event');k.initEvent(j,true,true);}i.dispatchEvent(k);}f.exports=h;},null);
__d('VideoPlayerApiEvents',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=['buffered','buffering','beginPlayback','updateStatus','logEvent','pausePlayback','clickVideo','clickForTracking','finishPlayback','unmuteVideo','muteVideo','changeVolume','turnOffAutoplay','updateBuffer','updateMetadata','qualityChange','updateViewportBegin','updateViewportEnd','error','loadedSubtitles','toggleSubtitles','toggleFullscreen','seekEnd'];f.exports=h;},null);
__d('AbstractVideoPlayerApi',['invariant','EventEmitter','VideoPlayerApiEvents','arrayContains'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();i=babelHelpers.inherits(k,c('EventEmitter'));j=i&&i.prototype;function k(){'use strict';j.constructor.call(this);}k.prototype.addListener=function(){'use strict';for(var l=arguments.length,m=Array(l),n=0;n<l;n++)m[n]=arguments[n];return j.addListener.apply(this,m);};k.prototype.emit=function(){'use strict';for(var l=arguments.length,m=Array(l),n=0;n<l;n++)m[n]=arguments[n];return j.emit.apply(this,m);};k.prototype.setRelativeSphericalOrientation=function(l,m){'use strict';};k.isImplementationUnavailable=function(){'use strict';return true;};f.exports=k;},null);
__d("VideoConfig",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){Object.assign(this,i);}f.exports=h;},null);
__d("VideoData",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){"use strict";this.$VideoData1=i;}h.prototype.hasHD=function(){"use strict";return !!this.$VideoData1.hd_src;};h.prototype.getEncodingTag=function(){"use strict";return this.$VideoData1.encoding_tag;};h.prototype.getVideoID=function(){"use strict";return this.$VideoData1.video_id;};h.prototype.getRotation=function(){"use strict";return this.$VideoData1.rotation;};h.prototype.hasSubtitles=function(){"use strict";return !!this.$VideoData1.subtitles_src;};h.prototype.hasDashManifest=function(){"use strict";return !!this.$VideoData1.dash_manifest;};h.prototype.getDashManifest=function(){"use strict";return this.$VideoData1.dash_manifest;};h.prototype.getDashPrefetchedRepresentationIDs=function(){"use strict";return this.$VideoData1.dash_prefetched_representation_ids;};h.prototype.getSubtitlesSrc=function(){"use strict";return this.$VideoData1.subtitles_src;};h.prototype.getPlayableSrcSD=function(){"use strict";if(this.$VideoData1.sd_src_no_ratelimit)return this.$VideoData1.sd_src_no_ratelimit;return this.$VideoData1.sd_src;};h.prototype.getPlayableSrcHD=function(){"use strict";if(this.$VideoData1.hd_src_no_ratelimit)return this.$VideoData1.hd_src_no_ratelimit;return this.$VideoData1.hd_src;};h.prototype.getPlayableSrcRateLimitedSD=function(){"use strict";return this.$VideoData1.sd_src;};h.prototype.getPlayableSrcRateLimitedHD=function(){"use strict";return this.$VideoData1.hd_src;};h.prototype.getLiveManifestUrl=function(){"use strict";return this.isLiveStream()&&this.$VideoData1.sd_src;};h.prototype.hasRateLimit=function(){"use strict";return !!this.$VideoData1.sd_src_no_ratelimit;};h.prototype.getStreamType=function(){"use strict";return this.$VideoData1.stream_type;};h.prototype.isLiveStream=function(){"use strict";return this.$VideoData1.is_live_stream;};h.prototype.liveRoutingToken=function(){"use strict";return this.$VideoData1.live_routing_token;};h.prototype.getHDTag=function(){"use strict";return this.$VideoData1.hd_tag;};h.prototype.getSDTag=function(){"use strict";return this.$VideoData1.sd_tag;};h.prototype.getProjection=function(){"use strict";return this.$VideoData1.projection;};f.exports=h;},null);
__d('MediaBufferingDetector',['Event','EventEmitter','SubscriptionsHandler','setInterval','clearInterval','performanceNow'],function a(b,c,d,e,f,g){var h,i;if(c.__markCompiled)c.__markCompiled();h=babelHelpers.inherits(j,c('EventEmitter'));i=h&&h.prototype;function j(k){'use strict';i.constructor.call(this);this.$MediaBufferingDetector1=k;this.$MediaBufferingDetector2=new (c('SubscriptionsHandler'))();if(!this.$MediaBufferingDetector1.paused)this.$MediaBufferingDetector7();this.$MediaBufferingDetector2.addSubscriptions(c('Event').listen(this.$MediaBufferingDetector1,'playing',function(){return this.$MediaBufferingDetector8();}.bind(this)),c('Event').listen(this.$MediaBufferingDetector1,'pause',function(){return this.$MediaBufferingDetector9();}.bind(this)),c('Event').listen(this.$MediaBufferingDetector1,'ended',function(){return this.$MediaBufferingDetector10();}.bind(this)),c('Event').listen(this.$MediaBufferingDetector1,'timeupdate',function(){return this.$MediaBufferingDetector11();}.bind(this)));}j.prototype.$MediaBufferingDetector12=function(){'use strict';var k=c('performanceNow')(),l=this.$MediaBufferingDetector1.currentTime,m=k-this.$MediaBufferingDetector5,n=l-this.$MediaBufferingDetector6,o=n*1000,p=m-o;if(m*.2<Math.abs(p)){this.$MediaBufferingDetector13();}else this.$MediaBufferingDetector14();this.$MediaBufferingDetector15();};j.prototype.$MediaBufferingDetector15=function(){'use strict';this.$MediaBufferingDetector5=c('performanceNow')();this.$MediaBufferingDetector6=this.$MediaBufferingDetector1.currentTime;};j.prototype.$MediaBufferingDetector7=function(){'use strict';if(this.$MediaBufferingDetector4)return;this.$MediaBufferingDetector15();this.$MediaBufferingDetector4=c('setInterval')(function(){return this.$MediaBufferingDetector12();}.bind(this),500);};j.prototype.$MediaBufferingDetector16=function(){'use strict';c('clearInterval')(this.$MediaBufferingDetector4);this.$MediaBufferingDetector4=null;};j.prototype.$MediaBufferingDetector13=function(){'use strict';if(this.$MediaBufferingDetector3)return;this.$MediaBufferingDetector3=true;this.emit('bufferingStart');};j.prototype.$MediaBufferingDetector14=function(){'use strict';if(!this.$MediaBufferingDetector3)return;this.$MediaBufferingDetector3=false;this.emit('bufferingEnd');};j.prototype.$MediaBufferingDetector8=function(){'use strict';this.$MediaBufferingDetector14();this.$MediaBufferingDetector7();};j.prototype.$MediaBufferingDetector9=function(){'use strict';this.$MediaBufferingDetector14();this.$MediaBufferingDetector16();};j.prototype.$MediaBufferingDetector10=function(){'use strict';this.$MediaBufferingDetector14();this.$MediaBufferingDetector16();};j.prototype.$MediaBufferingDetector11=function(){'use strict';if(!this.$MediaBufferingDetector1.paused){this.$MediaBufferingDetector14();this.$MediaBufferingDetector16();this.$MediaBufferingDetector7();}};j.prototype.destroy=function(){'use strict';this.$MediaBufferingDetector16();this.$MediaBufferingDetector2.release();};f.exports=j;},null);
__d('VideoMimeTypes',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(o,p,q){return o+'; codecs="'+p+', '+q+'"';}var i='mp4a.40.2';function j(o){return 'avc1.42E0'+o.toString(16).toUpperCase();}function k(o){return 'avc1.4D40'+o.toString(16).toUpperCase();}function l(o){return 'avc1.6400'+o.toString(16).toUpperCase();}var m='video/mp4',n={h264baseline:h(m,j(30),i),h264main30avc:h(m,k(30),i),h264main31avc:h(m,k(31),i),h264high50avc:h(m,l(50),i),h264high51avc:h(m,l(51),i)};f.exports=n;},null);
__d('canVideoPlayType',['DOM'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=null;function i(j){h=h||c('DOM').create('video');if(!('canPlayType' in h))return '';return h.canPlayType(j);}f.exports=i;},null);
__d('onCanPlayHTMLMediaElement',['invariant','EventListener','HTMLMediaElementReadyStates','setImmediate'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(k){return k>=c('HTMLMediaElementReadyStates').HAVE_FUTURE_DATA;}function j(k,l){!(k instanceof window.HTMLMediaElement)?h(0):void 0;if(i(k.readyState))c('setImmediate')(l);return c('EventListener').listen(k,'canplay',l);}j.once=function(k,l){var m=j(k,function(){if(!m)return;m.remove();m=null;for(var n=arguments.length,o=Array(n),p=0;p<n;p++)o[p]=arguments[p];l.apply(this,o);}.bind(this));};f.exports=j;},null);
__d('onLoadedMetadataHTMLMediaElement',['EventListener','HTMLMediaElementReadyStates','setImmediate'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(j){return j>=c('HTMLMediaElementReadyStates').HAVE_METADATA;}function i(j,k){if(h(j.readyState))c('setImmediate')(k);return c('EventListener').listen(j,'loadedmetadata',k);}i.once=function(j,k){var l=i(j,function(){l.remove();for(var m=arguments.length,n=Array(m),o=0;o<m;o++)n[o]=arguments[o];k.apply(this,n);}.bind(this));};f.exports=i;},null);
__d('seekHTMLMediaElementTo',['EventListener','onLoadedMetadataHTMLMediaElement','setImmediate'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j,k){if(i.currentTime==j)return k&&c('setImmediate')(k);try{i.currentTime=j;}catch(l){}if(i.currentTime){var m=c('EventListener').listen(i,'seeked',function(){m.remove();k&&k();});}else c('onLoadedMetadataHTMLMediaElement')(i,function(){i.currentTime=j;var n=c('EventListener').listen(i,'seeked',function(){n.remove();k&&k();});});}f.exports=h;},null);
__d('supportsHTML5Video',['DOM','memoize'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports=c('memoize')(function(){return !!c('DOM').create('video').canPlayType;});},null);
__d('VideoPlayerHTML5Api',['cx','AbstractVideoPlayerApi','Arbiter','Bootloader','CSS','DOM','DOMDimensions','EventListener','HVideoPlayerMixin','MediaBufferingDetector','Run','SubscriptionsHandler','VideoData','VideoMimeTypes','VideoFrameBuffer','VideoPlayerHTML5Experiments','VideoPlayerAbortLoadingExperiment','VideoPlayerLoggerEvent','VideoPlayerReason','VideoPlayerVersions','canVideoPlayType','dispatchEvent','classWithMixins','forwardEvent','getHTMLMediaElementMutedState','mixin','onCanPlayHTMLMediaElement','seekHTMLMediaElementTo','setImmediate','supportsHTML5Video'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();function k(o){switch(o){case 1:return 'The fetching process for the media resource was aborted by the '+'user agent at the users request.';case 2:return 'A network error of some description caused the user agent to '+'stop fetching the media resource, after the resource was '+'established to be usable.';case 3:return 'An error of some description occurred while decoding the '+'media resource, after the resource was established to be usable.';case 4:return 'The media resource indicated by the src attribute was not '+'suitable.';}}function l(o){switch(o){case 1:return 'MEDIA_ERR_ABORTED';case 2:return 'MEDIA_ERR_NETWORK';case 3:return 'MEDIA_ERR_DECODE';case 4:return 'MEDIA_ERR_SRC_NOT_SUPPORTED';default:return 'Error code '+o+' is unknown';}}var m=-1;i=babelHelpers.inherits(n,c('classWithMixins')(c('AbstractVideoPlayerApi'),c('mixin')(c('HVideoPlayerMixin'))));j=i&&i.prototype;function n(o,p){'use strict';j.constructor.call(this);this.$VideoPlayerHTML5Api1=o;this.$VideoPlayerHTML5Api2=this.$VideoPlayerHTML5Api1.id;var q=c('DOMDimensions').getElementDimensions(this.$VideoPlayerHTML5Api1);this.$VideoPlayerHTML5Api3=q.width;this.$VideoPlayerHTML5Api4=q.height;if(p){this.$VideoPlayerHTML5Api5=p;}else this.$VideoPlayerHTML5Api5=JSON.parse(this.$VideoPlayerHTML5Api1.getAttribute('data-config'));this.$VideoPlayerHTML5Api6={};this.$VideoPlayerHTML5Api7=new (c('MediaBufferingDetector'))(this.$VideoPlayerHTML5Api1);this.$VideoPlayerHTML5Api7.addListener('bufferingStart',function(){return this.$VideoPlayerHTML5Api8();}.bind(this));this.$VideoPlayerHTML5Api7.addListener('bufferingEnd',function(){return this.$VideoPlayerHTML5Api9();}.bind(this));this.$VideoPlayerHTML5Api10=m;this.$VideoPlayerHTML5Api11=c('getHTMLMediaElementMutedState')(this.$VideoPlayerHTML5Api1);this.$VideoPlayerHTML5Api12=this.$VideoPlayerHTML5Api1.volume;this.$VideoPlayerHTML5Api13=false;this.$VideoPlayerHTML5Api14=m;this.$VideoPlayerHTML5Api15=null;this.$VideoPlayerHTML5Api16=false;this.$VideoPlayerHTML5Api17=false;this.$VideoPlayerHTML5Api18=this.$VideoPlayerHTML5Api1.getAttribute('preload')=='auto';if(this.$VideoPlayerHTML5Api5.lazyPreload)if(this.$VideoPlayerHTML5Api5.onafterloadRegister){c('Run').onAfterLoad(function(){return (this.$VideoPlayerHTML5Api1.setAttribute('preload',this.$VideoPlayerHTML5Api5.lazyPreload));}.bind(this));}else this.$VideoPlayerHTML5Api1.setAttribute('preload',this.$VideoPlayerHTML5Api5.lazyPreload);this.$VideoPlayerHTML5Api19=this.$VideoPlayerHTML5Api5.disableNativeControls;this.$VideoPlayerHTML5Api20=this.$VideoPlayerHTML5Api1.controls;this.$VideoPlayerHTML5Api21=this.$VideoPlayerHTML5Api5.subtitlesActive;this.$VideoPlayerHTML5Api22();this.preventPauseLoggingInMixin=false;this.$VideoPlayerHTML5Api23=new (c('SubscriptionsHandler'))();this.$VideoPlayerHTML5Api24();this.$VideoPlayerHTML5Api25=this.$VideoPlayerHTML5Api5.useRateLimited;this.$VideoPlayerHTML5Api26=this.$VideoPlayerHTML5Api5.defaultHD;this.$VideoPlayerHTML5Api27=this.$VideoPlayerHTML5Api5.autoFullscreenHD;this.switchVideo(0);this.initLogger(this.$VideoPlayerHTML5Api28.bind(this),this.$VideoPlayerHTML5Api5.useEventTime);this.$VideoPlayerHTML5Api29();if(this.$VideoPlayerHTML5Api5.VideoPlayerHTML5Spherical)this.$VideoPlayerHTML5Api30();}n.prototype.getAdClientToken=function(){'use strict';this.$VideoPlayerHTML5Api5.ad_client_token;};n.prototype.$VideoPlayerHTML5Api8=function(){'use strict';this.emit('buffering');};n.prototype.$VideoPlayerHTML5Api9=function(){'use strict';this.emit('buffered');};n.prototype.getVideoID=function(){'use strict';if(this.$VideoPlayerHTML5Api31)return this.$VideoPlayerHTML5Api31.getVideoID();return this.$VideoPlayerHTML5Api5.video_id;};n.prototype.getDOMElement=function(){'use strict';return this.$VideoPlayerHTML5Api1;};n.prototype.getVideoElement=function(){'use strict';return this.$VideoPlayerHTML5Api1;};n.prototype.getSubscriptions=function(){'use strict';return this.$VideoPlayerHTML5Api23;};n.onImplementationReady=function(o,p){'use strict';c('setImmediate')(p);};n.prototype.destroy=function(){'use strict';this.$VideoPlayerHTML5Api32();if(this.$VideoPlayerHTML5Api33)c('DOM').remove(this.$VideoPlayerHTML5Api33);};n.prototype.getVideoInfo=function(){'use strict';if(!this.$VideoPlayerHTML5Api31)return null;return {isHD:this.$VideoPlayerHTML5Api26,streamType:this.$VideoPlayerHTML5Api31.getStreamType(),hasHD:this.hasHD(),areSubtitlesActive:this.areSubtitlesActive(),isMuted:this.isMuted(),isPlaying:this.$VideoPlayerHTML5Api34,playbackDuration:this.getPlaybackDuration(),volume:this.getVolume(),resourceUrl:this.$VideoPlayerHTML5Api35?'DASH manifest':this.$VideoPlayerHTML5Api36(),hasSubtitles:this.$VideoPlayerHTML5Api31.hasSubtitles(),hasUnlimitedSrc:this.$VideoPlayerHTML5Api31.hasRateLimit(),useUnlimitedSrc:!this.$VideoPlayerHTML5Api25,projection:this.$VideoPlayerHTML5Api37(),tagSD:this.$VideoPlayerHTML5Api31.getSDTag(),tagHD:this.$VideoPlayerHTML5Api31.getHDTag(),isLiveStream:this.$VideoPlayerHTML5Api31.isLiveStream()};};n.isImplementationUnavailable=function(o){'use strict';if(o){var p=c('canVideoPlayType')(c('VideoMimeTypes').h264main30avc);if(c('VideoPlayerHTML5Experiments').relaxedCanPlay)return p!=='probably'&&p!=='maybe';return p!=='probably';}return !c('supportsHTML5Video')();};n.prototype.pause=function(o){'use strict';this.$VideoPlayerHTML5Api15=o;if(o==='unloaded'&&!this.$VideoPlayerHTML5Api38()){this.$VideoPlayerHTML5Api28(c('VideoPlayerLoggerEvent').PAUSED,this.addWatchTimeData({reason:'unloaded'}));this.preventPauseLoggingInMixin=true;}this.$VideoPlayerHTML5Api39();if(this.$VideoPlayerHTML5Api35){this.$VideoPlayerHTML5Api35.pause();}else this.$VideoPlayerHTML5Api1.pause();};n.prototype.preload=function(){'use strict';if(!this.$VideoPlayerHTML5Api18){if(this.$VideoPlayerHTML5Api40)this.$VideoPlayerHTML5Api41();this.$VideoPlayerHTML5Api18=true;this.$VideoPlayerHTML5Api1.setAttribute('preload','auto');}};n.prototype.play=function(o){'use strict';if(!this.$VideoPlayerHTML5Api42)this.$VideoPlayerHTML5Api42=o;this.$VideoPlayerHTML5Api43=o;if(!this.$VideoPlayerHTML5Api38()){this.$VideoPlayerHTML5Api44();return;}this.$VideoPlayerHTML5Api16=true;if(this.$VideoPlayerHTML5Api40){c('dispatchEvent')(this.$VideoPlayerHTML5Api1,'play');this.$VideoPlayerHTML5Api41();this.$VideoPlayerHTML5Api17=true;return;}this.$VideoPlayerHTML5Api45();};n.prototype.$VideoPlayerHTML5Api39=function(){'use strict';if(this.$VideoPlayerHTML5Api17&&this.$VideoPlayerHTML5Api1.paused)c('dispatchEvent')(this.$VideoPlayerHTML5Api1,'pause');this.$VideoPlayerHTML5Api46();};n.prototype.$VideoPlayerHTML5Api46=function(){'use strict';this.$VideoPlayerHTML5Api16=false;this.$VideoPlayerHTML5Api17=false;};n.prototype.$VideoPlayerHTML5Api47=function(){'use strict';this.$VideoPlayerHTML5Api1.setAttribute('preload','auto');this.$VideoPlayerHTML5Api18=true;this.$VideoPlayerHTML5Api1.load();this.$VideoPlayerHTML5Api1.muted=this.$VideoPlayerHTML5Api11;};n.prototype.seek=function(o){'use strict';this.$VideoPlayerHTML5Api1.currentTime=o;};n.prototype.removeRotation=function(){'use strict';c('CSS').removeClass(this.$VideoPlayerHTML5Api1,"_56jr");c('CSS').removeClass(this.$VideoPlayerHTML5Api1,"_56js");c('CSS').removeClass(this.$VideoPlayerHTML5Api1,"_56jt");this.$VideoPlayerHTML5Api1.style.marginLeft='';this.$VideoPlayerHTML5Api1.style.marginTop='';this.$VideoPlayerHTML5Api1.style.width='';this.$VideoPlayerHTML5Api1.style.height='';};n.prototype.applyRotation=function(o){'use strict';if(!o)return;c('CSS').conditionClass(this.$VideoPlayerHTML5Api1,"_56jr",o==90);c('CSS').conditionClass(this.$VideoPlayerHTML5Api1,"_56js",o==180);c('CSS').conditionClass(this.$VideoPlayerHTML5Api1,"_56jt",o==270);if(o==180)return;var p=this.$VideoPlayerHTML5Api4,q=this.$VideoPlayerHTML5Api3,r=(p-q)/2,s=(q-p)/2;this.$VideoPlayerHTML5Api1.style.marginLeft=s+'px';this.$VideoPlayerHTML5Api1.style.marginTop=r+'px';this.$VideoPlayerHTML5Api1.style.height=q+'px';this.$VideoPlayerHTML5Api1.style.width=p+'px';};n.prototype.switchVideo=function(o){'use strict';if(!this.$VideoPlayerHTML5Api5.videoData||this.$VideoPlayerHTML5Api5.videoData.length<=o)return;this.$VideoPlayerHTML5Api31=new (c('VideoData'))(this.$VideoPlayerHTML5Api5.videoData[o]);if((this.$VideoPlayerHTML5Api31.hasDashManifest()||this.$VideoPlayerHTML5Api31.isLiveStream())&&this.$VideoPlayerHTML5Api5.VideoPlayerHTML5Shaka&&this.$VideoPlayerHTML5Api5.VideoPlayerHTML5Shaka.isSupported()){this.$VideoPlayerHTML5Api7.destroy();var p,q;if(this.$VideoPlayerHTML5Api31.isLiveStream()){q=this.$VideoPlayerHTML5Api31.getLiveManifestUrl();}else p=this.$VideoPlayerHTML5Api31.getDashManifest();this.$VideoPlayerHTML5Api35=new this.$VideoPlayerHTML5Api5.VideoPlayerHTML5Shaka(this.$VideoPlayerHTML5Api1,this.$VideoPlayerHTML5Api31.getDashPrefetchedRepresentationIDs(),{playHighQualityTrack:this.$VideoPlayerHTML5Api26,width:this.$VideoPlayerHTML5Api3,height:this.$VideoPlayerHTML5Api4,manifest:p,manifestUrl:q});this.$VideoPlayerHTML5Api35.addListener('bufferingStart',function(){return this.$VideoPlayerHTML5Api8();}.bind(this));this.$VideoPlayerHTML5Api35.addListener('bufferingEnd',function(){return this.$VideoPlayerHTML5Api9();}.bind(this));this.$VideoPlayerHTML5Api35.addListener('tracksChanged',function(){return this.emit('qualityChange');}.bind(this));this.$VideoPlayerHTML5Api35.addListener('adaptation',function(){return this.emit('qualityChange');}.bind(this));this.$VideoPlayerHTML5Api35.addListener('error',function(r){return this.$VideoPlayerHTML5Api48(r);}.bind(this));this.$VideoPlayerHTML5Api49.remove();}else this.$VideoPlayerHTML5Api1.src=this.$VideoPlayerHTML5Api36();this.$VideoPlayerHTML5Api50&&this.$VideoPlayerHTML5Api50.removeSubtitles();if(this.$VideoPlayerHTML5Api31.hasSubtitles())c('Bootloader').loadModules(["VideoPlayerHTML5Subtitles"],function(r){if(!this.$VideoPlayerHTML5Api50){this.$VideoPlayerHTML5Api50=new r(this.$VideoPlayerHTML5Api1);this.$VideoPlayerHTML5Api50.setOnSubtitlesReady(function(){return this.$VideoPlayerHTML5Api51();}.bind(this));}this.$VideoPlayerHTML5Api50.loadSubtitles(this.$VideoPlayerHTML5Api31.getSubtitlesSrc());}.bind(this));this.removeRotation();this.applyRotation(this.$VideoPlayerHTML5Api31.getRotation());};n.prototype.switchToStreamType=function(o){'use strict';};n.prototype.replaceVideoDataFromURL=function(o){'use strict';};n.prototype.unmute=function(){'use strict';if(this.$VideoPlayerHTML5Api40){this.$VideoPlayerHTML5Api40.mutedState=false;this.$VideoPlayerHTML5Api11=false;this.emit('unmuteVideo');return;}this.$VideoPlayerHTML5Api1.muted=false;};n.prototype.mute=function(){'use strict';if(this.$VideoPlayerHTML5Api40){this.$VideoPlayerHTML5Api40.mutedState=true;this.$VideoPlayerHTML5Api11=true;this.emit('muteVideo');return;}this.$VideoPlayerHTML5Api1.muted=true;};n.prototype.setRotation=function(o){'use strict';this.removeRotation();this.applyRotation(o);};n.prototype.setDimensions=function(o,p){'use strict';this.removeRotation();this.$VideoPlayerHTML5Api3=o;this.$VideoPlayerHTML5Api4=p;this.applyRotation(this.$VideoPlayerHTML5Api31.getRotation());if(this.$VideoPlayerHTML5Api52)this.$VideoPlayerHTML5Api52.updateDimensions(o,p);if(this.$VideoPlayerHTML5Api53)this.$VideoPlayerHTML5Api53.setDimensions(o,p);if(this.$VideoPlayerHTML5Api35)this.$VideoPlayerHTML5Api35.setDimensions(o,p);};n.prototype.$VideoPlayerHTML5Api54=function(){'use strict';this.$VideoPlayerHTML5Api1.controls=!this.$VideoPlayerHTML5Api19;};n.prototype.$VideoPlayerHTML5Api22=function(){'use strict';this.$VideoPlayerHTML5Api1.controls=this.$VideoPlayerHTML5Api20&&!this.$VideoPlayerHTML5Api19;};n.prototype.$VideoPlayerHTML5Api24=function(){'use strict';this.$VideoPlayerHTML5Api49=c('EventListener').listen(this.$VideoPlayerHTML5Api1,'error',this.$VideoPlayerHTML5Api55.bind(this));this.$VideoPlayerHTML5Api23.addSubscriptions(this.$VideoPlayerHTML5Api49,c('EventListener').listen(this.$VideoPlayerHTML5Api1,'playing',this.$VideoPlayerHTML5Api56.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'play',this.$VideoPlayerHTML5Api44.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'ended',this.$VideoPlayerHTML5Api57.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'waiting',this.$VideoPlayerHTML5Api58.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'pause',this.$VideoPlayerHTML5Api59.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'volumechange',this.$VideoPlayerHTML5Api60.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'mousedown',this.$VideoPlayerHTML5Api61.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'mouseup',this.$VideoPlayerHTML5Api62.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'timeupdate',this.$VideoPlayerHTML5Api63.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'click',this.$VideoPlayerHTML5Api64.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'loadedmetadata',this.$VideoPlayerHTML5Api65.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'progress',this.$VideoPlayerHTML5Api66.bind(this)),c('EventListener').listen(this.$VideoPlayerHTML5Api1,'seeked',this.$VideoPlayerHTML5Api67.bind(this)),c('EventListener').capture(this.$VideoPlayerHTML5Api1.parentNode,'pause',this.$VideoPlayerHTML5Api68.bind(this)));if(this.$VideoPlayerHTML5Api53)this.$VideoPlayerHTML5Api23.addSubscriptions(this.$VideoPlayerHTML5Api53.getSubscriptions());};n.prototype.$VideoPlayerHTML5Api68=function(o){'use strict';if(o.target!==this.$VideoPlayerHTML5Api1)return;if(!this.$VideoPlayerHTML5Api1.ended){if(this.$VideoPlayerHTML5Api15==='unloaded'){this.preventPauseLoggingInMixin=false;o.preventDefault();o.stopPropagation();}o.lastPauseReason=this.$VideoPlayerHTML5Api15;}};n.prototype.$VideoPlayerHTML5Api66=function(){'use strict';var o=this.$VideoPlayerHTML5Api1.buffered,p=0,q=0,r=o.length;while(r-->0){var s=o.end(r),t=o.start(r);if(t<=this.$VideoPlayerHTML5Api1.currentTime){q=t;p=s-t;break;}}this.$VideoPlayerHTML5Api29();this.$VideoPlayerHTML5Api69('flash/updateBuffer',{duration:p,offset:q});};n.prototype.$VideoPlayerHTML5Api29=function(){'use strict';clearTimeout(this.$VideoPlayerHTML5Api70);if(this.$VideoPlayerHTML5Api1.networkState===this.$VideoPlayerHTML5Api1.NETWORK_LOADING)this.$VideoPlayerHTML5Api70=setTimeout(function(){return this.$VideoPlayerHTML5Api71();}.bind(this),n.networkTimeout);};n.prototype.$VideoPlayerHTML5Api71=function(){'use strict';var o=this.$VideoPlayerHTML5Api1.buffered,p=0;for(var q=0;q<o.length;q++){var r=o.start(q),s=o.end(q);p+=s-r;}this.$VideoPlayerHTML5Api28(c('VideoPlayerLoggerEvent').NETWORK_TIMEOUT,{buffered:p});};n.prototype.$VideoPlayerHTML5Api63=function(){'use strict';var o;if(this.$VideoPlayerHTML5Api40){o=this.$VideoPlayerHTML5Api40.currentTime;}else o=this.$VideoPlayerHTML5Api1.currentTime;this.$VideoPlayerHTML5Api69('flash/updateStatus',{position:+o.toFixed(3)});};n.prototype.$VideoPlayerHTML5Api64=function(o){'use strict';if(o.button!==0)return;this.emit('clickVideo');o.preventDefault();};n.prototype.$VideoPlayerHTML5Api38=function(){'use strict';return this.$VideoPlayerHTML5Api1.paused;};n.prototype.$VideoPlayerHTML5Api72=function(){'use strict';var o=this.$VideoPlayerHTML5Api1.buffered;return o.length&&o.start(0)===0&&o.end(0)===this.$VideoPlayerHTML5Api1.duration;};n.prototype.$VideoPlayerHTML5Api58=function(){'use strict';if(!this.$VideoPlayerHTML5Api72()){this.$VideoPlayerHTML5Api73=true;this.$VideoPlayerHTML5Api69('flash/buffering');}};n.prototype.setVolume=function(o){'use strict';this.$VideoPlayerHTML5Api1.volume=o;};n.prototype.$VideoPlayerHTML5Api60=function(){'use strict';if(this.$VideoPlayerHTML5Api1.muted!==this.$VideoPlayerHTML5Api11&&this.$VideoPlayerHTML5Api1.volume===this.$VideoPlayerHTML5Api12&&this.$VideoPlayerHTML5Api1.volume>0){this.$VideoPlayerHTML5Api11=this.$VideoPlayerHTML5Api1.muted;this.$VideoPlayerHTML5Api12=this.$VideoPlayerHTML5Api1.volume;if(!this.$VideoPlayerHTML5Api1.muted){this.$VideoPlayerHTML5Api69('flash/unmuteVideo');}else this.$VideoPlayerHTML5Api69('flash/muteVideo');}else{this.$VideoPlayerHTML5Api11=this.$VideoPlayerHTML5Api1.muted;this.$VideoPlayerHTML5Api12=this.$VideoPlayerHTML5Api1.volume;this.$VideoPlayerHTML5Api69('flash/changeVolume',{volume:this.$VideoPlayerHTML5Api1.volume});}if(!this.$VideoPlayerHTML5Api1.muted)this.$VideoPlayerHTML5Api69('flash/turnOffAutoplay',{reason:'unmuted'});};n.prototype.$VideoPlayerHTML5Api61=function(o){'use strict';if(o.button===0)this.$VideoPlayerHTML5Api13=true;};n.prototype.$VideoPlayerHTML5Api62=function(o){'use strict';if(o.button===0)this.$VideoPlayerHTML5Api13=false;};n.prototype.$VideoPlayerHTML5Api56=function(o){'use strict';if(this.$VideoPlayerHTML5Api73){this.$VideoPlayerHTML5Api73=false;this.$VideoPlayerHTML5Api69('flash/buffered');}};n.prototype.$VideoPlayerHTML5Api44=function(){'use strict';this.$VideoPlayerHTML5Api34=true;this.$VideoPlayerHTML5Api54();this.$VideoPlayerHTML5Api69('flash/beginPlayback',{position:+this.$VideoPlayerHTML5Api1.currentTime.toFixed(2),reason:this.$VideoPlayerHTML5Api43});this.$VideoPlayerHTML5Api29();};n.prototype.$VideoPlayerHTML5Api59=function(o){'use strict';if(this.$VideoPlayerHTML5Api1.ended){this.$VideoPlayerHTML5Api34=false;return;}if(this.$VideoPlayerHTML5Api1.seeking&&this.$VideoPlayerHTML5Api15===c('VideoPlayerReason').SEEK)return;if(this.$VideoPlayerHTML5Api13)return;if(this.$VideoPlayerHTML5Api15===c('VideoPlayerReason').SEEK){this.$VideoPlayerHTML5Api15=null;return;}if(this.$VideoPlayerHTML5Api15===null||this.$VideoPlayerHTML5Api15===c('VideoPlayerReason').USER)this.$VideoPlayerHTML5Api69('flash/turnOffAutoplay',{reason:'manually_paused'});this.$VideoPlayerHTML5Api15=null;this.$VideoPlayerHTML5Api34=false;this.$VideoPlayerHTML5Api22();this.$VideoPlayerHTML5Api69('flash/pausePlayback',{position:this.$VideoPlayerHTML5Api1.currentTime.toFixed(2)});};n.prototype.$VideoPlayerHTML5Api57=function(){'use strict';if(this.$VideoPlayerHTML5Api40)return;this.$VideoPlayerHTML5Api22();this.$VideoPlayerHTML5Api34=false;this.$VideoPlayerHTML5Api69('flash/finishPlayback');this.setRelativeSphericalOrientation(0,0);};n.prototype.$VideoPlayerHTML5Api67=function(){'use strict';this.emit('seekEnd',{position:+this.$VideoPlayerHTML5Api1.currentTime.toFixed(3)});};n.prototype.setRelativeSphericalOrientation=function(o,p){'use strict';this.$VideoPlayerHTML5Api53&&this.$VideoPlayerHTML5Api53.setRelativeSphericalOrientation(o,p);};n.prototype.$VideoPlayerHTML5Api65=function(){'use strict';this.$VideoPlayerHTML5Api69('flash/updateMetadata');};n.prototype.$VideoPlayerHTML5Api48=function(o){'use strict';this.emit('error',babelHelpers['extends']({},o,{isPlayback:this.$VideoPlayerHTML5Api16}));};n.prototype.$VideoPlayerHTML5Api55=function(){'use strict';if(this.$VideoPlayerHTML5Api40)return;if(!this.$VideoPlayerHTML5Api1.error)return;this.emit('error',{error:l(this.$VideoPlayerHTML5Api1.error.code),isPlayback:this.$VideoPlayerHTML5Api16,message:k(this.$VideoPlayerHTML5Api1.error.code)});};n.prototype.$VideoPlayerHTML5Api28=function(event,o){'use strict';if(event===c('VideoPlayerLoggerEvent').STARTED_PLAYING&&this.$VideoPlayerHTML5Api35)o.longest_init_response_time=this.$VideoPlayerHTML5Api35.getLongestInitResponseTime();o.player_version=c('VideoPlayerVersions').PLEASANTVILLE;o.projection=this.$VideoPlayerHTML5Api37();this.$VideoPlayerHTML5Api69('flash/logEvent',{logData:babelHelpers['extends']({event:event},o)});};n.prototype.$VideoPlayerHTML5Api69=function(event,o){'use strict';c('Arbiter').inform(event,babelHelpers['extends']({divID:this.$VideoPlayerHTML5Api2},o));this.emit(event.substr('flash/'.length),o);};n.prototype.getLastPlayReason=function(){'use strict';return this.$VideoPlayerHTML5Api43;};n.prototype.getVideoPlayReason=function(){'use strict';return this.$VideoPlayerHTML5Api42;};n.prototype.isMuted=function(){'use strict';return this.$VideoPlayerHTML5Api11;};n.prototype.getPlaybackDuration=function(){'use strict';if(this.$VideoPlayerHTML5Api40)return this.$VideoPlayerHTML5Api40.playbackDuration;return this.$VideoPlayerHTML5Api1.duration||0;};n.prototype.getVolume=function(){'use strict';return this.$VideoPlayerHTML5Api1.volume;};n.prototype.hasHD=function(){'use strict';if(!this.$VideoPlayerHTML5Api31)return false;if(this.$VideoPlayerHTML5Api35)return this.$VideoPlayerHTML5Api35.hasSelectableVideoTracks();return this.$VideoPlayerHTML5Api31.hasHD();};n.prototype.isHD=function(){'use strict';return this.$VideoPlayerHTML5Api26;};n.prototype.$VideoPlayerHTML5Api36=function(){'use strict';if(this.$VideoPlayerHTML5Api26&&this.$VideoPlayerHTML5Api31.hasHD()){return this.$VideoPlayerHTML5Api74();}else return this.$VideoPlayerHTML5Api75();};n.prototype.$VideoPlayerHTML5Api74=function(){'use strict';if(this.$VideoPlayerHTML5Api25){return this.$VideoPlayerHTML5Api31.getPlayableSrcRateLimitedHD();}else return this.$VideoPlayerHTML5Api31.getPlayableSrcHD();};n.prototype.$VideoPlayerHTML5Api75=function(){'use strict';if(this.$VideoPlayerHTML5Api25){return this.$VideoPlayerHTML5Api31.getPlayableSrcRateLimitedSD();}else return this.$VideoPlayerHTML5Api31.getPlayableSrcSD();};n.prototype.toggleSubtitles=function(){'use strict';this.$VideoPlayerHTML5Api21=!this.$VideoPlayerHTML5Api21;if(this.$VideoPlayerHTML5Api21){this.$VideoPlayerHTML5Api50&&this.$VideoPlayerHTML5Api50.showSubtitles();}else this.$VideoPlayerHTML5Api50&&this.$VideoPlayerHTML5Api50.hideSubtitles();this.emit('toggleSubtitles');};n.prototype.shiftSubtitles=function(o){'use strict';this.$VideoPlayerHTML5Api50&&this.$VideoPlayerHTML5Api50.shiftSubtitles(o,this.$VideoPlayerHTML5Api21);};n.prototype.hasSubtitles=function(){'use strict';return this.$VideoPlayerHTML5Api31.hasSubtitles();};n.prototype.areSubtitlesActive=function(){'use strict';return this.$VideoPlayerHTML5Api21;};n.prototype.areHLSActive=function(){'use strict';};n.prototype.isRTMP=function(){'use strict';};n.prototype.$VideoPlayerHTML5Api51=function(){'use strict';if(this.$VideoPlayerHTML5Api21)this.$VideoPlayerHTML5Api50&&this.$VideoPlayerHTML5Api50.showSubtitles();this.emit('loadedSubtitles');};n.prototype.$VideoPlayerHTML5Api76=function(){'use strict';if(this.$VideoPlayerHTML5Api53){this.$VideoPlayerHTML5Api53.freeze();return;}if(!this.$VideoPlayerHTML5Api52){var o=c('DOMDimensions').getElementDimensions(this.$VideoPlayerHTML5Api1),p=c('DOM').create('canvas',{width:o.width,height:o.height,className:"_3t5i"});c('DOM').insertAfter(this.$VideoPlayerHTML5Api1,p);this.$VideoPlayerHTML5Api52=new (c('VideoFrameBuffer'))(p,this.$VideoPlayerHTML5Api1);}c('CSS').show(this.$VideoPlayerHTML5Api52.getDOMNode());this.$VideoPlayerHTML5Api52.updateFrameBuffer();c('CSS').hide(this.$VideoPlayerHTML5Api1);};n.prototype.$VideoPlayerHTML5Api32=function(){'use strict';if(this.$VideoPlayerHTML5Api53){this.$VideoPlayerHTML5Api53.unfreeze();return;}if(!this.$VideoPlayerHTML5Api52)return;c('CSS').hide(this.$VideoPlayerHTML5Api52.getDOMNode());c('CSS').show(this.$VideoPlayerHTML5Api1);};n.prototype.$VideoPlayerHTML5Api41=function(){'use strict';if(!this.$VideoPlayerHTML5Api40)return;if(this.$VideoPlayerHTML5Api77)return;this.$VideoPlayerHTML5Api77=true;if(this.$VideoPlayerHTML5Api35){this.$VideoPlayerHTML5Api35.reload(this.$VideoPlayerHTML5Api40.currentTime);}else{this.$VideoPlayerHTML5Api1.src=this.$VideoPlayerHTML5Api36();this.$VideoPlayerHTML5Api1.preload=this.$VideoPlayerHTML5Api40.preload;}c('seekHTMLMediaElementTo')(this.$VideoPlayerHTML5Api1,this.$VideoPlayerHTML5Api40.currentTime,function(){this.$VideoPlayerHTML5Api32();if(this.$VideoPlayerHTML5Api40){this.$VideoPlayerHTML5Api1.muted=this.$VideoPlayerHTML5Api40.mutedState;this.$VideoPlayerHTML5Api40=null;}this.$VideoPlayerHTML5Api77=false;c('onCanPlayHTMLMediaElement').once(this.$VideoPlayerHTML5Api1,function(){return this.$VideoPlayerHTML5Api45();}.bind(this));}.bind(this));};n.prototype.abortLoading=function(){'use strict';if(this.$VideoPlayerHTML5Api40)return;this.$VideoPlayerHTML5Api76();var o=this.$VideoPlayerHTML5Api1.currentTime,p=this.isMuted(),q=this.$VideoPlayerHTML5Api1.duration,r=this.$VideoPlayerHTML5Api1.paused,s=this.$VideoPlayerHTML5Api1.preload;this.$VideoPlayerHTML5Api18=false;this.$VideoPlayerHTML5Api40={mutedState:p,currentTime:o,playbackDuration:q,preload:s};if(r&&this.$VideoPlayerHTML5Api34)c('dispatchEvent')(this.$VideoPlayerHTML5Api1,'pause');if(this.$VideoPlayerHTML5Api35){this.$VideoPlayerHTML5Api35.unload();return;}this.$VideoPlayerHTML5Api1.preload='none';this.$VideoPlayerHTML5Api1.src='';if(!c('VideoPlayerAbortLoadingExperiment').withoutLoad)this.$VideoPlayerHTML5Api1.load();};n.prototype.toggleHD=function(){'use strict';if(!this.$VideoPlayerHTML5Api31)return;this.$VideoPlayerHTML5Api28(c('VideoPlayerLoggerEvent').PAUSED,this.addWatchTimeData({reason:'toggle_hd'}));this.$VideoPlayerHTML5Api28(c('VideoPlayerLoggerEvent').REQUESTED_PLAYING,{reason:c('VideoPlayerReason').USER});this.$VideoPlayerHTML5Api26=!this.$VideoPlayerHTML5Api26;if(this.$VideoPlayerHTML5Api35){if(this.$VideoPlayerHTML5Api26){this.$VideoPlayerHTML5Api35.selectHighestQualityTrack();}else this.$VideoPlayerHTML5Api35.selectLowestQualityTrack();this.emit('qualityChange');return;}var o=this.$VideoPlayerHTML5Api1.currentTime;this.$VideoPlayerHTML5Api1.src=this.$VideoPlayerHTML5Api36();c('onCanPlayHTMLMediaElement').once(this.$VideoPlayerHTML5Api1,function(){this.$VideoPlayerHTML5Api1.currentTime=o;this.$VideoPlayerHTML5Api45();this.emit('qualityChange');}.bind(this));this.$VideoPlayerHTML5Api16=true;this.$VideoPlayerHTML5Api47();};n.prototype.$VideoPlayerHTML5Api30=function(){'use strict';var o={projectionType:this.$VideoPlayerHTML5Api37(),fieldOfView:this.$VideoPlayerHTML5Api5.sphericalFieldOfView,videoID:this.getVideoID(),expansionCoef:1.01};if(this.$VideoPlayerHTML5Api5.sphericalConfig)Object.assign(o,this.$VideoPlayerHTML5Api5.sphericalConfig);try{this.$VideoPlayerHTML5Api53=new this.$VideoPlayerHTML5Api5.VideoPlayerHTML5Spherical(this.$VideoPlayerHTML5Api1,o);}catch(p){c('setImmediate')(function(){return this.emit('error',{error:'SPHERICAL_SETUP_FAILED',message:p.message});}.bind(this));}if(this.$VideoPlayerHTML5Api53){this.$VideoPlayerHTML5Api53.addListener('DOM/click',function(q){return this.$VideoPlayerHTML5Api64(q);}.bind(this));['updateViewportBegin','updateViewportEnd','error'].forEach(c('forwardEvent').bind(null,this.$VideoPlayerHTML5Api53,this));if(!this.$VideoPlayerHTML5Api35)this.$VideoPlayerHTML5Api1.src=this.$VideoPlayerHTML5Api36();}};n.getPlayerVersion=function(){'use strict';return 'pleasantville';};n.prototype.$VideoPlayerHTML5Api37=function(){'use strict';return this.$VideoPlayerHTML5Api31.getProjection();};n.prototype.$VideoPlayerHTML5Api45=function(){'use strict';if(this.$VideoPlayerHTML5Api16){if(this.$VideoPlayerHTML5Api17)var o=c('EventListener').capture(this.$VideoPlayerHTML5Api1.parentNode,'play',function(p){Event.kill(p);o.remove();});if(this.$VideoPlayerHTML5Api35){this.$VideoPlayerHTML5Api35.play();}else this.$VideoPlayerHTML5Api1.play();}this.$VideoPlayerHTML5Api46();};n.getStreamTypeFromConfig=function(o){'use strict';var p=new (c('VideoData'))(o.videoData[0]);return p.getStreamType();};n.getIsPlayingLiveFromConfig=function(o){'use strict';var p=new (c('VideoData'))(o.videoData[0]);return p.isLiveStream();};n.networkTimeout=5000;f.exports=n;},null);
__d('VideoPlayerVolumeSettings',['WebStorage'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(){'use strict';this.$VideoPlayerVolumeSettings1=1;this.$VideoPlayerVolumeSettings2=1;}h.prototype.getVolume=function(){'use strict';var j=c('WebStorage').getLocalStorage();if(j){var k=j.getItem('videoPlayerControllerVolume');if(k===null||isNaN(+k))return 1;return +k;}return this.$VideoPlayerVolumeSettings1;};h.prototype.saveVolume=function(j){'use strict';var k=c('WebStorage').getLocalStorage();if(k)return k.setItem('videoPlayerControllerVolume',j);this.$VideoPlayerVolumeSettings1=j;};h.prototype.getLastVolumeBeforeMute=function(){'use strict';var j=c('WebStorage').getLocalStorage();if(j){var k=j.getItem('videoPlayerControllerLastVolumeBeforeMute');if(k===null||isNaN(+k))return 1;return +k;}return this.$VideoPlayerVolumeSettings2;};h.prototype.saveLastVolumeBeforeMute=function(j){'use strict';var k=c('WebStorage').getLocalStorage();if(k)return k.setItem('videoPlayerControllerLastVolumeBeforeMute',j);this.$VideoPlayerVolumeSettings2=j;};var i=new h();f.exports=i;},null);
__d('VideoPlayerController',['cx','invariant','Promise','Arbiter','Banzai','CSS','DOM','DOMDimensions','DOMQuery','EventEmitter','Flash','FullScreen','getFullScreenElement','JSLogger','JSResource','Map','VideoPlayerReason','Run','ScriptPath','SubscriptionsHandler','VideoChannelLogger','VideoChannelViewChainLengthManager','VideoHomeLogger','VideoMimeTypes','VideoPlayerApiEvents','VideoPlayerExperiments','VideoPlayerHTML5Experiments','VideoPlayerInitializationEvent','VideoPlayerLogger','VideoPlayerLoggerErrors','VideoPlayerLoggerErrorStates','VideoPlayerLoggerEvent','VideoPlayerLoggerSource','VideoPlayerResizeSettings','VideosRenderingInstrumentation','VideoPlayerVolumeSettings','Visibility','XVideoDataController','arrayContains','canVideoPlayType','collectDataAttributes','destroyOnUnload','emptyFunction','enumerate','forwardEvent','getElementPosition','getViewportDimensions','logVideosClickTracking','mapObject','performanceAbsoluteNow'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();var l=5,m=1;function n(){return c('VideoPlayerHTML5Experiments').useMonotonicallyIncreasingTimers?c('performanceAbsoluteNow')():Date.now();}j=babelHelpers.inherits(o,c('EventEmitter'));k=j&&j.prototype;function o(p,q){var r=p.video_ids,s=p.video_urls,t=p.chaining_token,u=p.video_channel_id,v=p.source,w=p.ad_client_token,x=p.should_autoplay,y=p.player_version,z=p.autoplay_setting,aa=p.additional_logdata_getter,ba=p.apiModule,ca=p.apiConfig,da=p.useInlineFallback,ea=p.accessToken,fa=p.projection,ga=p.playerOrigin,ha=q.root_element,ia=q.container_element,ja=q.video_element;'use strict';k.constructor.call(this);if(x===undefined)throw new Error('Must pass should_autoplay to '+this.constructor.name+'!');this.$VideoPlayerController1=new (c('Map'))();this.$VideoPlayerController2=fa;this.$VideoPlayerController3=0;this.$VideoPlayerController4=ea;this.$VideoPlayerController5=x;this.$VideoPlayerController6=z;this.$VideoPlayerController7=w;this.$VideoPlayerController8=ja;this.$VideoPlayerController9=ha;this.$VideoPlayerController10=ia;this.$VideoPlayerController11=false;this.$VideoPlayerController12=y;this.$VideoPlayerController13=r;this.$VideoPlayerController14=s;this.$VideoPlayerController15=t;this.$VideoPlayerController16=u;this.$VideoPlayerController17=aa||{get:c('emptyFunction')};this.$VideoPlayerController18=ga;this.$VideoPlayerController19=ba;this.$VideoPlayerController20=ca;this.$VideoPlayerController21=this.$VideoPlayerController19.getStreamTypeFromConfig(this.$VideoPlayerController20);this.$VideoPlayerController22=this.$VideoPlayerController19.getIsPlayingLiveFromConfig(this.$VideoPlayerController20);this.$VideoPlayerController23=da;this.$VideoPlayerController24=0;this.$VideoPlayerController25=null;this.$VideoPlayerController26=v;this.$VideoPlayerController27=new (c('VideoPlayerLogger'))(v);if(this.$VideoPlayerController26===c('VideoPlayerLoggerSource').CHANNEL)this.setIsInChannel(true);this.collectFeedTrackingData();this.$VideoPlayerController27.setScriptPath(c('ScriptPath').getScriptPath());var ka=c('VideosRenderingInstrumentation').retrieveRenderTime(this.$VideoPlayerController9);this.$VideoPlayerController28=n()-ka;this.$VideoPlayerController29='loading';this.logEvent(c('VideoPlayerInitializationEvent').PLAYER_INITIALIZATION,{time_ms:ka});this.$VideoPlayerController30=false;if(this.$VideoPlayerController19.isImplementationUnavailable(this.$VideoPlayerController23)){if(this.$VideoPlayerController23){this.$VideoPlayerController31();}else{this.$VideoPlayerController32();return;}}else this.$VideoPlayerController33();c('Banzai').subscribe(c('Banzai').SHUTDOWN,function(){this.pause('unloaded');}.bind(this));if(this.$VideoPlayerController5)if(c('Visibility').isHidden()){c('Visibility').once(c('Visibility').VISIBLE,function(){this.play(c('VideoPlayerReason').AUTOPLAY);}.bind(this));}else this.play(c('VideoPlayerReason').AUTOPLAY);this.$VideoPlayerController34=0;this.$VideoPlayerController35=false;this.$VideoPlayerController36=new (c('SubscriptionsHandler'))();this.$VideoPlayerController36.addSubscriptions(c('Arbiter').subscribe('layer_shown',function(la,ma){if(ma.type==='DialogX'||ma.type==='PhotoSnowlift'){this.$VideoPlayerController34=this.$VideoPlayerController34+1;if(this.$VideoPlayerController34>0)if(this.isState('playing')&&!this.getIsInChannel()){this.pause(c('VideoPlayerReason').PAGE_VISIBILITY);this.$VideoPlayerController35=true;}}}.bind(this)),c('Arbiter').subscribe('layer_hidden',function(la,ma){if(ma.type==='DialogX'||ma.type==='PhotoSnowlift'){this.$VideoPlayerController34=this.$VideoPlayerController34-1;if(this.$VideoPlayerController34===0)if(this.$VideoPlayerController35&&!this.getIsInChannel()){this.play(c('VideoPlayerReason').PAGE_VISIBILITY);this.$VideoPlayerController35=false;}}}.bind(this)),c('Arbiter').subscribe(c('JSLogger').DUMP_EVENT,function(la,ma){return this.$VideoPlayerController37(la,ma);}.bind(this)));c('destroyOnUnload')(function(){return this.$VideoPlayerController36.release();}.bind(this));c('Run').onLeave(function(){return this.pause('unloaded');}.bind(this));this.abortLoading();}o.prototype.$VideoPlayerController38=function(){'use strict';var p=c('DOMQuery').scry(this.getVideoNode(),'[data-fallback-markup="1"]');if(!p.length)return c('Promise').reject();c('DOM').replace(this.getVideoNode(),p[0]);this.$VideoPlayerController8=p[0];return c('JSResource')('VideoPlayerFlashApi').load();};o.prototype.$VideoPlayerController31=function(){'use strict';this.logEvent('switched_implementation',{error_user_info:this.getDebugInfo()});this.$VideoPlayerController38().then(function(p){if(p.isImplementationUnavailable()){return c('Promise').reject();}else return c('Promise').resolve(p);}).done(function(p){this.$VideoPlayerController19=p;this.$VideoPlayerController33();}.bind(this),function(p){return this.$VideoPlayerController32();}.bind(this));};o.prototype.collectFeedTrackingData=function(){'use strict';this.$VideoPlayerController27.setFTData(c('collectDataAttributes')(this.getRootNode(),['ft']));};o.prototype.$VideoPlayerController37=function(p,q){'use strict';q.video_player_debug_info=q.video_player_debug_info||{};q.video_player_debug_info[this.getVideoID()]=this.getDebugInfo();};o.prototype.setRelativeSphericalOrientation=function(p,q){'use strict';this.getVideoAPI().setRelativeSphericalOrientation(p,q);};o.prototype.setAdditionalLogDataGetter=function(p){'use strict';this.$VideoPlayerController17=p;};o.prototype.$VideoPlayerController33=function(){'use strict';this.$VideoPlayerController19.onImplementationReady(this.getVideoNode(),function(){return this.onApiReady();}.bind(this));};o.prototype.isImplementationUnavailable=function(){'use strict';return this.$VideoPlayerController19.isImplementationUnavailable(this.$VideoPlayerController23)&&!this.$VideoPlayerController23;};o.prototype.getIsInChannel=function(){'use strict';return this.$VideoPlayerController39;};o.prototype.setIsInChannel=function(p){'use strict';if(c('VideoPlayerLoggerSource').CHANNEL!==this.$VideoPlayerController26){if(p){this.$VideoPlayerController27.updateSource(c('VideoPlayerLoggerSource').CHANNEL);}else this.$VideoPlayerController27.updateSource(this.$VideoPlayerController26);this.logEvent(c('VideoPlayerLoggerEvent').PLAYER_FORMAT_CHANGED);}this.$VideoPlayerController39=p;};o.prototype.$VideoPlayerController32=function(){'use strict';var p={error:c('VideoPlayerLoggerErrors').ERROR_CALLING_FLASH,state:c('VideoPlayerLoggerErrorStates').PLAYER_FAILURE,error_description:'Implementation unavailable',error_user_info:this.getDebugInfo()};this.logEvent(c('VideoPlayerLoggerEvent').ERROR,p);this.$VideoPlayerController5=false;};o.prototype.$VideoPlayerController40=function(p,q,r){'use strict';var s={error:p,error_description:q,error_user_info:this.getDebugInfo(),state:r?c('VideoPlayerLoggerErrorStates').PLAYBACK_FAILURE:c('VideoPlayerLoggerErrorStates').PLAYER_FAILURE};this.logEvent(c('VideoPlayerLoggerEvent').ERROR,s);if(r&&this.$VideoPlayerController30)this.$VideoPlayerController30=false;};o.prototype.setRotation=function(p){'use strict';this.getVideoAPI().setRotation(p);};o.prototype.setDimensions=function(p,q){'use strict';this.$VideoPlayerController10.style.width=p+'px';this.$VideoPlayerController10.style.height=q+'px';this.$VideoPlayerController8.style.width=p+'px';this.$VideoPlayerController8.style.height=q+'px';if(this.isState('loading')){this.$VideoPlayerController41={width:p,height:q};}else if(this.getVideoAPI().setDimensions){if(this.isPlayerVersion('silvercity')&&(this.$VideoPlayerController42||c('VideoPlayerResizeSettings').disable_flash_set_dimensions))return;this.getVideoAPI().setDimensions(p,q);}};o.prototype.handleFlashApiFactoryError=function(p,q){'use strict';this.$VideoPlayerController40(c('VideoPlayerLoggerErrors').ERROR_CALLING_FLASH,p.message,q);};o.prototype.isPlayRequestPending=function(){'use strict';return this.$VideoPlayerController30;};o.prototype.play=function(p){'use strict';this.$VideoPlayerController43();if(!this.$VideoPlayerController44)this.$VideoPlayerController44=p;if(!this.$VideoPlayerController30){this.$VideoPlayerController25=this.$VideoPlayerController45();var q=this.$VideoPlayerController46({debug_reason:p});this.logEvent(c('VideoPlayerLoggerEvent').REQUESTED_PLAYING,q);}this.emit('playRequested');this.sendPlayRequest(p);};o.prototype.sendPlayRequest=function(p){'use strict';if(this.isState('fallback')){this.emit('fallbackPlay');return;}this.$VideoPlayerController30=true;if(this.isState('loading')){this.$VideoPlayerController47={reason:p};}else{if(!this.getVideoAPI().isMuted()&&this.$VideoPlayerController48)this.logEvent(c('VideoPlayerLoggerEvent').UNMUTED);this.$VideoPlayerController48=false;if(c('VideoPlayerExperiments').universalVolume&&(p===c('VideoPlayerReason').AUTOPLAY||p===c('VideoPlayerReason').USER)){var q=c('VideoPlayerVolumeSettings').getVolume();if(q!==0){this.setVolume(q);}else{this.setVolume(c('VideoPlayerVolumeSettings').getLastVolumeBeforeMute());if(!this.getVideoAPI().isMuted())this.mute();}}this.getVideoAPI().play(p);}};o.prototype.getOriginalPlayReason=function(){'use strict';return this.$VideoPlayerController44;};o.prototype.reset=function(){'use strict';if(this.isState('loading')||this.isState('fallback'))return;this.resetPositions();this.$VideoPlayerController49();if(this.$VideoPlayerController50&&this.$VideoPlayerController50.destroy)this.$VideoPlayerController50.destroy();this.$VideoPlayerController50=null;this.setState('loading');this.$VideoPlayerController33();};o.prototype.detachRootNode=function(){'use strict';c('DOM').remove(this.$VideoPlayerController9);if(this.isState('fallback')||this.isState('loading'))return;this.setState('loading');this.$VideoPlayerController19.onImplementationReady(this.getVideoNode(),function(){return this.$VideoPlayerController51();}.bind(this));};o.prototype.getVideoAPI=function(){'use strict';return this.$VideoPlayerController50;};o.prototype.getVideoNode=function(){'use strict';return this.$VideoPlayerController8;};o.prototype.getRootNode=function(){'use strict';return this.$VideoPlayerController9;};o.prototype.$VideoPlayerController51=function(){'use strict';this.setState('ready');this.logEvent(c('VideoPlayerInitializationEvent').PLAYER_ALLOCATED);this.$VideoPlayerController48=!this.getVideoAPI().isMuted();this.$VideoPlayerController52=this.getVideoAPI().areSubtitlesActive();if(this.$VideoPlayerController47){this.sendPlayRequest(this.$VideoPlayerController47.reason);this.$VideoPlayerController47=null;}if(this.$VideoPlayerController41){this.setDimensions(this.$VideoPlayerController41.width,this.$VideoPlayerController41.height);this.$VideoPlayerController41=null;}if(this.$VideoPlayerController53){this.getVideoAPI().unmute();this.$VideoPlayerController53=null;}};o.prototype.onApiReady=function(p){'use strict';this.$VideoPlayerController50=new this.$VideoPlayerController19(this.getVideoNode(),this.$VideoPlayerController20);this.logEvent(c('VideoPlayerInitializationEvent').PLAYER_ALLOCATED);this.$VideoPlayerController54();this.$VideoPlayerController51();var q={is_auto_played:this.isAutoplayable()};if(p)q.init_delay=p;this.logEvent(c('VideoPlayerLoggerEvent').PLAYER_LOADED,q);};o.prototype.resetPositions=function(){'use strict';this.$VideoPlayerController24=0;};o.prototype.getCurrentTimePosition=function(){'use strict';return this.$VideoPlayerController24;};o.prototype.$VideoPlayerController43=function(){'use strict';if(!this.$VideoPlayerController55){var p=this.getOption('VideoWithClickToChannelView','isChannelEligible');c('VideoChannelViewChainLengthManager').registerChainingInfos(this.getVideoID(),this.$VideoPlayerController15);this.$VideoPlayerController55=c('VideoChannelViewChainLengthManager').getLoggingData();}this.$VideoPlayerController56=c('VideoChannelLogger').getPlayerLoggingData();};o.prototype.$VideoPlayerController57=function(p){'use strict';this.$VideoPlayerController30=false;var q=p.position;if(q!==undefined)this.$VideoPlayerController24=q;this.setState('playing');if(this.areHLSActive()){this.$VideoPlayerController58();}else if(this.isRTMP())this.$VideoPlayerController59();};o.prototype.$VideoPlayerController60=function(p){'use strict';var q=p.position;if(q!==undefined)this.$VideoPlayerController24=q;};o.prototype.$VideoPlayerController61=function(p){'use strict';var event=p.event;delete p.event;this.logEvent(event,p);};o.prototype.$VideoPlayerController62=function(){'use strict';if(!this.isState('finished'))this.setState('paused');};o.prototype.$VideoPlayerController63=function(p){'use strict';var q=p.position;if(q!==undefined)this.$VideoPlayerController24=q;};o.prototype.$VideoPlayerController64=function(){'use strict';this.setState('finished');this.$VideoPlayerController35=false;};o.prototype.getVideosCount=function(){'use strict';return this.$VideoPlayerController13.length;};o.prototype.$VideoPlayerController65=function(){'use strict';var p=this.getVideosCount();return (this.$VideoPlayerController3+1)%p;};o.prototype.getVolume=function(){'use strict';return this.getVideoAPI().getVolume();};o.prototype.$VideoPlayerController66=function(){'use strict';var p=this.isFullscreen();c('CSS').conditionClass(this.$VideoPlayerController10,"_1hwh",p);c('CSS').conditionClass(this.$VideoPlayerController10,"_52fb",p);if(!p&&this.$VideoPlayerController67){this.$VideoPlayerController67.unsubscribe();this.$VideoPlayerController67=null;}if(this.$VideoPlayerController42!=p){this.logEvent(p?c('VideoPlayerLoggerEvent').ENTERED_FS:c('VideoPlayerLoggerEvent').EXITED_FS);var q=c('DOMDimensions').getElementDimensions(this.$VideoPlayerController10);if(!this.isPlayerVersion('silvercity'))this.$VideoPlayerController50.setDimensions(q.width,q.height);this.emit('toggleFullscreen');}this.$VideoPlayerController42=p;};o.prototype.isFullscreen=function(){'use strict';return c('FullScreen').isFullScreen()&&this.$VideoPlayerController10===c('getFullScreenElement')();};o.prototype.toggleFullscreen=function(){'use strict';if(c('FullScreen').toggleFullScreen(this.$VideoPlayerController10)){c('CSS').addClass(this.$VideoPlayerController10,"_1hwh");this.$VideoPlayerController67=c('FullScreen').subscribe('changed',this.$VideoPlayerController66.bind(this));}};o.prototype.$VideoPlayerController68=function(){'use strict';var p=this.getVideosCount();return (this.$VideoPlayerController3-1+p)%p;};o.prototype.$VideoPlayerController69=function(p){'use strict';this.logEvent(c('VideoPlayerLoggerEvent').CAROUSEL_CHANGE,{source_index:this.$VideoPlayerController3,target_index:p});this.getVideoAPI().switchVideo(p);this.$VideoPlayerController3=p;this.emit('switchVideo');};o.prototype.unmute=function(){'use strict';if(!this.isState('loading')){this.getVideoAPI().unmute();c('VideoPlayerVolumeSettings').saveVolume(c('VideoPlayerVolumeSettings').getLastVolumeBeforeMute());if(this.$VideoPlayerController52&&this.getVideoAPI().areSubtitlesActive())this.getVideoAPI().toggleSubtitles();}else this.$VideoPlayerController53=true;};o.prototype.isMuted=function(){'use strict';return this.getVideoAPI().isMuted();};o.prototype.mute=function(){'use strict';if(this.$VideoPlayerController52&&!this.getVideoAPI().areSubtitlesActive())this.getVideoAPI().toggleSubtitles();this.getVideoAPI().mute();c('VideoPlayerVolumeSettings').saveVolume(0);};o.prototype.getPlaybackDuration=function(){'use strict';return this.getVideoAPI().getPlaybackDuration();};o.prototype.nextVideo=function(){'use strict';this.$VideoPlayerController69(this.$VideoPlayerController65());};o.prototype.previousVideo=function(){'use strict';this.$VideoPlayerController69(this.$VideoPlayerController68());};o.prototype.getVideoIndex=function(){'use strict';return this.$VideoPlayerController3;};o.prototype.getVideoID=function(){'use strict';return this.$VideoPlayerController13[this.getVideoIndex()];};o.prototype.getVideoChannelID=function(){'use strict';return this.$VideoPlayerController16;};o.prototype.getVideoURL=function(){'use strict';return this.$VideoPlayerController14[this.getVideoIndex()];};o.prototype.$VideoPlayerController54=function(){'use strict';var p=this.$VideoPlayerController50;this.$VideoPlayerController70=new (c('SubscriptionsHandler'))();var q=[['buffered',function(){return this.setBuffering(false);}.bind(this)],['buffering',function(){return this.setBuffering(true);}.bind(this)],['beginPlayback',function(r){return this.$VideoPlayerController57(r);}.bind(this)],['updateStatus',function(r){return this.$VideoPlayerController60(r);}.bind(this)],['logEvent',function(r){return this.$VideoPlayerController61(r.logData);}.bind(this)],['muteVideo',function(){return this.$VideoPlayerController71();}.bind(this)],['unmuteVideo',function(){return this.$VideoPlayerController72();}.bind(this)],['changeVolume',function(){return this.$VideoPlayerController73();}.bind(this)],['pausePlayback',function(){return this.$VideoPlayerController62();}.bind(this)],['seekEnd',function(r){return this.$VideoPlayerController63(r);}.bind(this)],['clickForTracking',function(){return c('logVideosClickTracking')(this.getVideoNode());}.bind(this)],['error',function(r){return (this.$VideoPlayerController40(r.error,r.message,r.isPlayback));}.bind(this)],['finishPlayback',function(){return this.$VideoPlayerController64();}.bind(this)]];this.$VideoPlayerController70.addSubscriptions.apply(this.$VideoPlayerController70,q.map(function(r){return p.addListener.apply(p,r);}).concat(c('VideoPlayerApiEvents').map(c('forwardEvent').bind(null,p,this))));};o.prototype.$VideoPlayerController49=function(){'use strict';if(this.$VideoPlayerController70)this.$VideoPlayerController70.release();};o.prototype.seek=function(p){'use strict';this.emit('seek',{time:p});this.getVideoAPI().seek(p);};o.prototype.pause=function(p){'use strict';if(this.isState('loading')){this.$VideoPlayerController47=null;}else if(this.isState('playing')){this.getVideoAPI().pause(p);}else if(this.$VideoPlayerController30)this.getVideoAPI().pause(p);this.$VideoPlayerController30=false;this.$VideoPlayerController35=false;};o.prototype.isPlayerVersion=function(p){'use strict';return this.getPlayerVersion()===p;};o.prototype.isAutoplayable=function(){'use strict';return this.$VideoPlayerController5;};o.prototype.isBuffering=function(){'use strict';return this.$VideoPlayerController11;};o.prototype.setBuffering=function(p){'use strict';if(p!==this.$VideoPlayerController11){this.$VideoPlayerController11=p;if(this.$VideoPlayerController11){this.$VideoPlayerController27.startBuffering(this.getCurrentTimePosition());}else this.$VideoPlayerController27.endBuffering();}};o.prototype.setVolume=function(p){'use strict';c('VideoPlayerVolumeSettings').saveVolume(p);this.getVideoAPI().setVolume(p);};o.prototype.getDOMPosition=function(){'use strict';return c('getElementPosition')(this.getRootNode());};o.prototype.clickVideo=function(){'use strict';this.emit('clickVideo');this.$VideoPlayerController74=true;};o.prototype.hasSeenClick=function(){'use strict';return !!this.$VideoPlayerController74;};o.prototype.isAd=function(){'use strict';return !!this.$VideoPlayerController7;};o.prototype.getAdClientToken=function(){'use strict';return this.$VideoPlayerController7;};o.prototype.$VideoPlayerController75=function(){'use strict';var p=c('Flash').getVersion();if(p)p=p.join('.');var q=this.getVideoInfo()||{};return Object.assign(babelHelpers['extends']({ad_client_token:this.$VideoPlayerController7,access_token:this.$VideoPlayerController4,autoplay_eligible:this.isAutoplayable(),autoplay_setting:this.$VideoPlayerController6,projection:this.$VideoPlayerController2,player_version:this.getPlayerVersion(),flash_version:p,video_id:this.getVideoID(),player_state:this.$VideoPlayerController29,player_origin:this.$VideoPlayerController18,streaming_format:q.streamType||this.$VideoPlayerController21,video_time_position:this.getCurrentTimePosition(),playback_is_live_streaming:this.$VideoPlayerController22,video_channel_id:this.$VideoPlayerController16,fbcdn_pop:this.$VideoPlayerController25},c('VideoHomeLogger').getPlayerLoggingData(),this.$VideoPlayerController56,this.$VideoPlayerController55),this.$VideoPlayerController17.get());};o.prototype.$VideoPlayerController45=function(){'use strict';var p=this.getVideoInfo();if(!p)return null;var q=p.resourceUrl,r=/scontent-([a-z]+)\./.exec(q);if(!r)return null;return r[1];};o.prototype.getVideoInfo=function(){'use strict';if(this.isState('loading')||this.isState('fallback'))return null;return this.getVideoAPI().getVideoInfo();};o.prototype.getDebugInfo=function(){'use strict';var p=this.getVideoInfo(),q={initializationTime:this.$VideoPlayerController28,version:this.getPlayerVersion(),stallTime:this.$VideoPlayerController27.getCurrentStallTime(),state:this.$VideoPlayerController29,canPlayType:c('mapObject')(c('VideoMimeTypes'),c('canVideoPlayType'))},r={videoID:this.getVideoID()};if(!p)return {player:q,currentVideo:r};return {currentVideo:babelHelpers['extends']({},r,{streamType:p.streamType,isLiveStream:p.isLiveStream,isHD:p.isHD,hasHD:p.hasHD,resourceUrl:p.resourceUrl,hasSubtitles:p.hasSubtitles,hasRateLimit:!!p.hasUnlimitedSrc,isRateLimited:p.hasUnlimitedSrc&&!p.useUnlimitedSrc,tagHD:p.tagHD,tagSD:p.tagSD,projection:p.projection}),player:q};};o.prototype.hasSubtitles=function(){'use strict';return this.getVideoAPI().hasSubtitles();};o.prototype.areSubtitlesActive=function(){'use strict';return this.getVideoAPI().areSubtitlesActive();};o.prototype.areHLSActive=function(){'use strict';return this.getVideoAPI().areHLSActive();};o.prototype.isRTMP=function(){'use strict';return this.getVideoAPI().isRTMP();};o.prototype.toggleSubtitles=function(){'use strict';this.getVideoAPI().toggleSubtitles();if(this.areSubtitlesActive()){this.logEvent(c('VideoPlayerLoggerEvent').TOGGLE_SUBTITLE_ON);}else this.logEvent(c('VideoPlayerLoggerEvent').TOGGLE_SUBTITLE_OFF);this.$VideoPlayerController52=false;};o.prototype.shiftSubtitles=function(p){'use strict';this.getVideoAPI().shiftSubtitles(p);};o.prototype.isHD=function(){'use strict';return this.getVideoAPI().isHD();};o.prototype.hasHD=function(){'use strict';return this.getVideoAPI().hasHD();};o.prototype.toggleHD=function(){'use strict';this.getVideoAPI().toggleHD();};o.prototype.switchToStreamType=function(p){'use strict';this.getVideoAPI().switchToStreamType(p);};o.prototype.$VideoPlayerController59=function(){'use strict';this.getVideoAPI().replaceVideoDataFromURL(c('XVideoDataController').getURIBuilder().setString('video_id',this.getVideoID()).setInt('scrubbing_preference',l).getURI().toString());};o.prototype.$VideoPlayerController58=function(){'use strict';this.getVideoAPI().replaceVideoDataFromURL(c('XVideoDataController').getURIBuilder().setString('video_id',this.getVideoID()).setInt('scrubbing_preference',m).getURI().toString());};o.prototype.$VideoPlayerController46=function(p){'use strict';var q=this.getVideoInfo();if(q!=null)return Object.assign({resource_url:q.resourceUrl,liveStream:q.isLiveStream,hd:q.isHD},p);return p;};o.prototype.$VideoPlayerController76=function(){'use strict';var p=this.getDOMPosition(),q=c('getViewportDimensions')().height,r=null;if(p.y<=0){r=p.y;}else if(p.y+p.height<q){r=0;}else r=p.y+p.height-q;return r;};o.prototype.logEvent=function(event,p){'use strict';var q=Object.assign(this.$VideoPlayerController75(),p),r=this.getOriginalPlayReason();if(r&&event!==c('VideoPlayerLoggerEvent').DISPLAYED)q.video_play_reason=r;if(event===c('VideoPlayerLoggerEvent').FINISHED_PLAYING)q.viewport_distance=this.$VideoPlayerController76();this.$VideoPlayerController27.logEvent(event,q);};o.prototype.setState=function(p){'use strict';if(this.isState('fallback'))return;this.$VideoPlayerController29=p;if(this.$VideoPlayerController29==='fallback'){c('CSS').addClass(this.getRootNode(),"_3-n5");this.$VideoPlayerController49();}this.emit('stateChange');};o.prototype.isState=function(p){'use strict';return this.$VideoPlayerController29===p;};o.prototype.abortLoading=function(){'use strict';if(this.isState('loading')||this.isState('fallback'))return;this.getVideoAPI().abortLoading();};o.prototype.preload=function(){'use strict';if(this.isState('loading')||this.isState('fallback'))return;this.getVideoAPI().preload();};o.prototype.getPlayerVersion=function(){'use strict';if(this.$VideoPlayerController19.getPlayerVersion){return this.$VideoPlayerController19.getPlayerVersion();}else this.$VideoPlayerController12;};o.prototype.$VideoPlayerController71=function(){'use strict';this.emit('mute');};o.prototype.$VideoPlayerController72=function(){'use strict';this.$VideoPlayerController48=false;this.emit('unmute');};o.prototype.$VideoPlayerController73=function(){'use strict';var p=this.getVolume();this.emit('volume',{level:p});};o.prototype.registerOption=function(p,q,r,s){'use strict';if(!this.$VideoPlayerController1.has(p))this.$VideoPlayerController1.set(p,new (c('Map'))());if(this.$VideoPlayerController1.get(p).has(q))throw new Error('An option can only be registered once for each component');this.$VideoPlayerController1.get(p).set(q,{getter:r,setter:s});this.emit('optionsChange');};o.prototype.getComponents=function(){'use strict';return this.$VideoPlayerController1.keys();};o.prototype.getOptions=function(p){'use strict';if(this.$VideoPlayerController1.has(p))return this.$VideoPlayerController1.get(p).keys();return c('enumerate')([]);};o.prototype.hasOption=function(p,q){'use strict';if(!this.$VideoPlayerController1.has(p))return false;if(!this.$VideoPlayerController1.get(p).has(q))return false;return true;};o.prototype.getOption=function(p,q){'use strict';if(!this.hasOption(p,q))return undefined;return this.$VideoPlayerController1.get(p).get(q).getter();};o.prototype.setOption=function(p,q,r){'use strict';if(!this.$VideoPlayerController1.has(p))throw new Error('Component not registered');if(!this.$VideoPlayerController1.get(p).has(q))throw new Error('Option not registered');var s=this.$VideoPlayerController1.get(p).get(q).setter;if(s)return s(r);throw new Error('Read-only option');};o.playerStates=['finished','loading','paused','playing','ready','fallback'];f.exports=o;},null);