if (self.CavalryLogger) { CavalryLogger.start_js(["oEyJQ"]); } __d("KeyframeAnimation",["invariant","CSS","ReactTransitionEvents","UserAgent","nullthrows","queryThenMutateDOM","uniqueID"],(function(a,b,c,d,e,f,g){__p&&__p();var h="KeyframeAnimation-",i="animation-";a=function(){"use strict";__p&&__p();function a(c){__p&&__p();this.$3=c;this.$8=!0;this.$5=new Map();this.$5.set("animation-name",h+b("uniqueID")());this.$4=new Map();if(!a.$1){c=document.createElement("style");b("nullthrows")(document.head).appendChild(c);c=b("nullthrows")(c.sheet);c instanceof CSSStyleSheet||g(0,920);a.$1=c;a.$2=new Map()}this.$9=b("UserAgent").isEngine("WebKit")?"-webkit-":""}var c=a.prototype;c.defineKeyframes=function(a){__p&&__p();a=Object.entries(a);for(var b=0;b=0&&d<=100||g(0,921);var e="";for(var c=Object.entries(c).sort(),f=Array.isArray(c),h=0,c=f?c:c[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var i;if(f){if(h>=c.length)break;i=c[h++]}else{h=c.next();if(h.done)break;i=h.value}i=i;var j=i[0];i=i[1];e+=j+": "+i+";"}this.$4.set(d,e)}return this};c.defineKeyframe=function(a,b){__p&&__p();a=parseFloat(a,10);a>=0&&a<=100||g(0,921);var c="";for(var b=Object.entries(b).sort(),d=Array.isArray(b),e=0,b=d?b:b[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var f;if(d){if(e>=b.length)break;f=b[e++]}else{e=b.next();if(e.done)break;f=e.value}f=f;var h=f[0];f=f[1];(h.substring(0,i.length)===i||h==="transform")&&(h=this.$9+h);c+=h+": "+f+";"}this.$4.set(a,c);return this};c.setDirection=function(a){this.$5.set("animation-direction",a);return this};c.setDuration=function(a){this.$5.set("animation-duration",a+"s");return this};c.setTimingFunction=function(a){this.$5.set("animation-timing-function",a);return this};c.setIterationCount=function(a){this.$5.set("animation-iteration-count",a+"");return this};c.setFillMode=function(a){this.$5.set("animation-fill-mode",a);return this};c.setAnimationDelay=function(a){this.$5.set("animation-delay",a+"s");return this};c.setFinishedCallback=function(a){this.$6=a;return this};c.setMemoize=function(a){this.$8=a;return this};c.start=function(){__p&&__p();var c=this;this.$5.has("animation-duration")||g(0,922);if(this.$7){this.restartAnimation();return}var d=this.$3,e=this.$10(),f=this.$11(e),h;if(this.$8&&a.$2.has(f)){var i=b("nullthrows")(a.$2.get(f));this.$5.set("animation-name",i);h=i}else a.$1.insertRule(e,a.$1.cssRules.length),h=b("nullthrows")(this.$5.get("animation-name")),this.$8&&a.$2.set(f,h);i=this.$12(h);(!this.$8||!a.$2.has(i))&&(a.$1.insertRule(i,a.$1.cssRules.length),this.$8&&a.$2.set(i,h));b("queryThenMutateDOM")(function(){},function(){c.$13(),b("CSS").addClass(d,h)})};c.restartAnimation=function(){var a=this.$3;b("CSS").removeClass(a,b("nullthrows")(this.$5.get("animation-name")));a.offsetWidth;this.$7=!1;b("CSS").addClass(a,b("nullthrows")(this.$5.get("animation-name")))};c.$13=function(){b("ReactTransitionEvents").addEndEventListener(this.$3,this.$14.bind(this))};c.$12=function(a){__p&&__p();var b="";b+="."+a+" {";for(var a=this.$5,c=Array.isArray(a),d=0,a=c?a:a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var e;if(c){if(d>=a.length)break;e=a[d++]}else{d=a.next();if(d.done)break;e=d.value}e=e;var f=e[0];e=e[1];b+=f+": "+e+";"}b+="}";return b};c.$10=function(){__p&&__p();var a=this.$5.get("animation-name"),c;b("UserAgent").isEngine("WebKit")?c="@-webkit-keyframes":c="@keyframes";c=c+" "+a+" {";for(var a=this.$4,d=Array.isArray(a),e=0,a=d?a:a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var f;if(d){if(e>=a.length)break;f=a[e++]}else{e=a.next();if(e.done)break;f=e.value}f=f;var g=f[0];f=f[1];c+=g+"% {"+f+"}"}return c+"}"};c.$14=function(){this.$7||(this.$6&&this.$6(this.$3),this.$7=!0)};c.$11=function(a){return a.substring(a.indexOf("{")+1).toLowerCase().replace(/\s+/g,"")};return a}();e.exports=a}),null); __d("CSSAnimationBuilder",["KeyframeAnimation"],(function(a,b,c,d,e,f){a={keyframeAnimation:function(a){return new(b("KeyframeAnimation"))(a)}};e.exports=a}),null); __d("AbstractVideoFullscreenControl.react",["cx","AbstractButton.react","React","joinClasses"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f2)return null;if(a.length===2){if(a[1].length===0)return null;var d=a[1];while(d.length<3)d+="0";d=Number(d);if(isNaN(d)||d<0||d>=b("DateConsts").MS_PER_SEC)return null;c+=d/b("DateConsts").MS_PER_SEC}d=a[0].split(":");if(d.length>3)return null;for(var a=0;a=60)return null;c+=e*Math.pow(60,d.length-a-1)}return c},convertTimestampToFormattedString:function(a){__p&&__p();a=Math.round(a*b("DateConsts").MS_PER_SEC)/b("DateConsts").MS_PER_SEC;var c=Math.floor(a/b("DateConsts").SEC_PER_HOUR);a=a-c*b("DateConsts").SEC_PER_HOUR;var d=Math.floor(a/b("DateConsts").SEC_PER_MIN),e=Math.floor(a-d*b("DateConsts").SEC_PER_MIN);a=Math.round(a*b("DateConsts").MS_PER_SEC);var f=("0"+c).slice(-2);d=("0"+d).slice(-2);e=("0"+e).slice(-2);a=("00"+a).slice(-3);var g="";c>0&&(g+=f+":");return g+=d+":"+e+"."+a},getMaxPossibleAdBreaks:function(a,c){a=Math.ceil(a)*b("DateConsts").MS_PER_SEC;if(a=e)return[];var f=b("VideoInstreamAdsConstants").AD_INSERTION_START_TIME_OFFSET_MS/b("DateConsts").MS_PER_SEC,g=c-b("VideoInstreamAdsConstants").AD_INSERTION_END_TIME_OFFSET_MS/b("DateConsts").MS_PER_SEC,i=b("VideoInstreamAdsConstants").AD_INSERTION_INTERVAL_MS/b("DateConsts").MS_PER_SEC;if(a.length===0||!d)return[{start:f,end:g}];var j=[];a.forEach(function(b,c){__p&&__p();if(c===0){var d=b.timeOffset-i;d>=f&&j.push({start:f,end:d})}if(c-1>=0){d=a[c-1].timeOffset+i;var e=b.timeOffset-i;d<=e&&j.push({start:d,end:e})}if(c===a.length-1){d=b.timeOffset+i;d<=g&&j.push({start:d,end:g})}});return j},isInEligibleTimeSegments:function(a,b,c,d){if(a===null||a===void 0)return!1;c=h.getEligibleTimeSegments(c,b,d);for(var b=0;b=c[b].start&&a<=c[b].end)return!0;return!1},isAdBreakViolatingInsertionRules:function(a,c,d,e){__p&&__p();var f=a[c];if(f.timeOffset*b("DateConsts").MS_PER_SEC=f.timeOffset)continue;if((f.timeOffset-a[d].timeOffset)*b("DateConsts").MS_PER_SEC1;else return!1};d.getPositionRatio=function(a,b){a=a-b.x;a=a/b.width;return Math.min(Math.max(0,a),1)};d.onDragNubUpdate=function(a){this.setState({scrubRatio:this.getPositionRatio(a,this.state.barCoords)})};d.onDragNubRelease=function(a){__p&&__p();var c=this.props.playbackDuration;if(!c)return;var d=this.state.awaitingUpdate;c=this.state.scrubRatio*c;this.props.onScrubEnd&&(this.props.onScrubEnd(c),d=!0);var e=this.props.videoClipInfo;e&&e.start_time_in_ms!==null&&(c<=e.start_time_in_ms/b("DateConsts").MS_PER_SEC&&this.setState({shouldIgnoreClipStartTS:!0}));this.setState({nubEngaged:!1,awaitingUpdate:d});a.preventDefault();a.stopPropagation()};d.renderNub=function(){var a=b("React").createElement("div",{ref:"nub",className:"_2yua _4sxb"+(this.props.showVideoSliderWarningTooltip?" _83lq":""),onMouseEnter:this.onMouseEnterScrubberNub,onMouseLeave:this.onMouseLeaveScrubberNub});return this.props.showVideoSliderWarningTooltip?b("React").createElement(b("Tooltip.react"),{className:"_83lm _4sxb",tooltip:"Rewinding, pausing or skipping ahead in the video will be seen by all viewers."},a):a};d.getPlayedRatio=function(a,b){if(this.state.nubEngaged||this.state.awaitingUpdate)return this.state.scrubRatio;if(!a||!b)return 0;b=b/a;return this.getRangeLimitedRatio(b)};d.getBufferedRatio=function(){var a=this.props.playbackDuration,b=this.props.bufferedPosition;if(!a||!b)return 0;b=b/a;return this.getRangeLimitedRatio(b)};d.getRangeLimitedRatio=function(a){return isNaN(a)||a<0||a>1?0:a};d.getNumberOfSprites=function(){return this.$6?this.$6.size:0};d.getAdBreakIndicators=function(){__p&&__p();if(!this.props.playbackDuration||!this.props.adBreaks)return null;var a=[];for(var c=0;cf)continue;e={left:e/f*100+"%"};f=[];this.props.adBreaksDisableReasons&&(f=this.props.adBreaksDisableReasons[c]);var g="[FB Only] The ad break is disabled for "+f.join(", ")+".";a.push(b("React").createElement("div",{key:"ad_break_indicator_"+c,style:e,className:(f.length===0?"_1p4l":"")+(f.length>0?" _1p4m":"")+(d.getIsAdBreakAutoInserted()&&f.length===0?" _1p4n":"")+(d.getIsAdBreakAutoInserted()&&f.length>0?" _1p4o":"")},f.length>0?b("React").createElement(b("Tooltip.react"),{tooltip:g},"X"):null))}return b("React").createElement("div",null,a)};d.getInsertedAdBreaks=function(){__p&&__p();var a=this;if(!this.props.playbackDuration||!this.props.insertedAdBreaks)return null;var c=[];this.props.insertedAdBreaks.map(function(d,e){d=d.timeOffset;var f=a.props.playbackDuration;d={left:"calc("+d/f*100+"% - 2px)"};c.push(b("React").createElement("div",{key:"inserted_ad_break"+e,style:d,className:(a.props.isAdBreakInsertionWithoutGapRule?"":"_1p4q")+(a.props.isAdBreakInsertionWithoutGapRule?" _1p4r":"")+(a.props.isAdBreakDisabled?" _1p4s":"")},a.props.isAdBreakInsertionWithoutGapRule?null:e+1))});return b("React").createElement("div",null,c)};d.getEligibleAdBreaksTimeSegments=function(){__p&&__p();var a=this;if(!this.props.playbackDuration||!this.props.insertedAdBreaks)return null;if(this.props.isAdBreakInsertionWithoutGapRule&&this.props.insertedAdBreaks&&this.props.insertedAdBreaks.length>=b("VideoInstreamAdsConstants").AD_INSERTION_MAXIMUM_NUMBER_OF_AD_BREAKS)return null;var c=0;this.state.awaitingUpdate?c=this.$9:c=this.props.playbackPosition;var d=this.props.playbackDuration,e=b("VideoInstreamUtils").getEligibleTimeSegments(this.props.insertedAdBreaks,d,!this.props.isAdBreakInsertionWithoutGapRule);this.state.nubEngaged?this.$9=this.state.timecodeTimestamp:this.$9=c;var f=[];e.forEach(function(c,e){var g=(c.end-c.start)/d*100,h=a.$9>=c.start&&a.$9<=c.end;c={left:"calc("+c.start/d*100+"% - 2px)",width:g+"%"};f.push(b("React").createElement("span",{key:"time_segment"+e,className:"_1p4t"+(h?" _1p4u":""),style:c}))});return b("React").createElement("div",{className:"_1p50"},f)};d.getPollTimeSegments=function(){__p&&__p();var a=this,c;if(!this.props.playbackDuration)return null;var d;if(!this.props.showPollCard)return null;this.state.awaitingUpdate?d=this.$9:d=this.props.playbackPosition;var e=this.props.playbackDuration;c=(c=this.props.pollTimestamps)!=null?c:[];this.state.nubEngaged?this.$9=this.state.timecodeTimestamp:this.$9=d;var f=[];c.forEach(function(c,d){var h={left:"calc("+c/e*100+"%)"},i=a.$9>=c;f.push(b("React").createElement(b("ClickableArea.react"),{key:d,onClick:function(d){d.stopPropagation(),d.persist(),a.props.onScrubEnd(c),b("Arbiter").inform("PollIconClicked")}},b("React").createElement("span",{key:"poll_segment"+d,className:"_80r-",style:h},b("React").createElement(b("Image.react"),{className:"_80rd",src:i?g("936893"):g("936896")}))));f.push(b("React").createElement("span",{key:"time_segment"+d,className:"_80re",style:h}))});return b("React").createElement("div",{className:"_80rf"},f)};d.onMouseEnter=function(a){if(this.props.alwaysShowThumbnail)return;a=b("getElementPosition")(b("ReactDOM").findDOMNode(this.refs.bar));this.setState({mouseOver:!0,barCoords:a})};d.onMouseLeave=function(a){var c=this;if(this.props.alwaysShowThumbnail)return;b("ReactDOM").findDOMNode(this.refs.bar).blur();b("ReactDOM").unstable_batchedUpdates(function(){c.setState({mouseOver:!1}),c.state.nubEngaged||c.setState({scrubberPreviewSpriteIndex:0,scrubberPreviewBackgroundPosition:{x:0,y:0}})});this.$8=null;this.$7=null};d.onMouseEnterOnThumbnailOrTimecode=function(a){if(this.state.nubEngaged||this.props.alwaysShowThumbnail)return;this.props.hasScrubberPreview?a=this.refs.previewThumbnailContainer:a=this.refs.timecode;a=b("ReactDOM").findDOMNode(a);a.style.visibility="hidden"};d.onMouseLeaveOnThumbnailOrTimecode=function(a){if(this.state.nubEngaged||this.props.alwaysShowThumbnail)return;this.props.hasScrubberPreview?a=this.refs.previewThumbnailContainer:a=this.refs.timecode;a=b("ReactDOM").findDOMNode(a);a.style.visibility="visible"};d.onKeyDown=function(a){__p&&__p();var c=this.props.playbackDuration,d=this.props.playbackPosition;if(!c||!d)return;d=d;if(a.keyCode===b("Keys").RIGHT){a.preventDefault();a.stopPropagation();if(this.props.isLiveVideo&&this.props.onLiveRewindSeekForward){this.props.onLiveRewindSeekForward();return}d+=5;d>=c&&(d=c-.01)}else if(a.keyCode===b("Keys").LEFT){a.preventDefault();a.stopPropagation();if(this.props.isLiveVideo&&this.props.onLiveRewindSeekBack){this.props.onLiveRewindSeekBack();return}d-=5;d<0&&(d=0)}else if(a.keyCode===b("Keys").HOME){a.preventDefault();a.stopPropagation();if(this.props.isLiveVideo&&this.props.onLiveRewindToBeginning){this.props.onLiveRewindToBeginning();return}d=0}else if(a.keyCode===b("Keys").END){a.preventDefault();a.stopPropagation();if(this.props.isLiveVideo&&this.props.onLiveRewindToLive){this.props.onLiveRewindToLive();return}d=c-.01}else return;this.props.onScrubEnd&&this.props.onScrubEnd(d)};d.canShowHeatmap=function(){return this.props.interestLevels!=null&&this.props.isPlaying!=null&&this.props.controlsHidden!=null&&this.props.drawer!=null};d.render=function(){__p&&__p();var a=b("joinClasses")(this.props.className,"_2yu5"+(this.state.nubEngaged?" _2yu6":"")),c=(this.props.hasScrubberPreview?"_3iit":"")+(this.props.hasScrubberPreview?"":" _3iiu"),d={width:this.getPlayedRatio(this.props.playbackDuration,this.props.playbackPosition)*100+"%"},e={width:this.getBufferedRatio()*100+"%"},f=this.props.videoClipInfo,g="0%";if(f){var h=this.getRangeLimitedRatio(f.start_time_in_ms/b("DateConsts").MS_PER_SEC/this.props.playbackDuration);g=h*100+"%";this.state.shouldIgnoreClipStartTS||(d={width:this.getRangeLimitedRatio(this.getPlayedRatio(this.props.playbackDuration,this.props.playbackPosition)-h)*100+"%",marginLeft:g},e={width:this.getRangeLimitedRatio(this.getBufferedRatio()-h)*100+"%",marginLeft:g})}h={left:this.state.timecodeRatio*100+"%",display:this.state.hoverNub?"none":"block"};var j={},k={},l=null,m=null,n=null;if(this.state.mouseOver||this.state.nubEngaged||this.props.alwaysShowThumbnail){n=b("React").createElement(b("VideoPlaybackTimer.react"),{className:c,isInScrubberPreview:!0,onMouseEnter:this.onMouseEnterOnThumbnailOrTimecode.bind(this),onMouseLeave:this.onMouseLeaveOnThumbnailOrTimecode.bind(this),playbackPosTimestamp:0,ref:"timecode",remainingTimestamp:this.state.timecodeTimestamp,style:h});if(this.props.hasScrubberPreview&&this.state.previewThumbnailInformation){c=this.state.previewThumbnailInformation.previewScrubberWidth;h=this.state.previewThumbnailInformation.previewScrubberHeight;var o=100,p=100;this.getNumberOfSprites()!==this.state.scrubberPreviewSpriteIndex?(o*=this.state.previewThumbnailInformation.imagesPerRow,p*=this.state.previewThumbnailInformation.imagesPerColumn):this.state.lastSpriteDimension.numRow&&(o*=this.state.lastSpriteDimension.numRow,p*=this.state.lastSpriteDimension.numColumn);var q=this.state.previewThumbnailInformation.stereoMode;q==="left-right"?(c/=2,o*=2):q==="top-bottom"&&(h/=2,p*=2);q=1;this.props.isFullscreen?q=1.5:this.props.isInTahoe&&(q=1.2);if(this.state.previewThumbnailInformation.useScrubberVideo&&this.state.previewThumbnailInformation.scrubberVideoURI!==null)j={width:c*q+"px",height:h*q+"px"},m=b("React").createElement("video",{muted:"true",preload:"auto",ref:"previewThumbnailVideo",src:this.state.previewThumbnailInformation.scrubberVideoURI,style:j});else if(this.$6){var r="";if(this.state.scrubberPreviewSpriteIndex){var s=this.$6.get(this.state.scrubberPreviewSpriteIndex);s&&(r="url("+s+")")}var t;o>100?t=o+"% "+p+"%":r="";j={width:c*q+"px",height:h*q+"px",backgroundImage:r,backgroundPosition:"-"+this.state.scrubberPreviewBackgroundPosition.x*q+"px -"+this.state.scrubberPreviewBackgroundPosition.y*q+"px",backgroundSize:t};m=b("React").createElement("div",{className:"_3iiw",ref:"previewThumbnail",style:j})}k={left:this.state.previewRatio*100+"%",display:this.props.alwaysShowThumbnail?"block":void 0};l=b("React").createElement("div",{onMouseEnter:this.onMouseEnterOnThumbnailOrTimecode.bind(this),onMouseLeave:this.onMouseLeaveOnThumbnailOrTimecode.bind(this),className:"_3iiv",ref:"previewThumbnailContainer",style:k},m,n)}}s=null;this.props.pointsOfInterest.length>0&&(s=b("React").createElement(b("VideoScrubberPointOfInterestBar.react"),{tabIndex:this.props.tabIndex,playbackDuration:this.props.playbackDuration,onPointOfInterestSelect:this.props.onPointOfInterestSelect,currentPointOfInterest:this.props.currentPointOfInterest,pointsOfInterest:this.props.pointsOfInterest,showPointOfInterestTimestamps:this.props.showPointOfInterestTimestamps}));o=null;p=this.getAdBreakIndicators();c=null;if(this.canShowHeatmap()){h=this.props.hasScrubberPreview?l:n;r=null;h!=null&&(r=this.refs[h.ref]);c=b("React").createElement("div",{className:"_27ew"},b("React").createElement("div",{className:"_5h19",style:d},this.renderNub()),b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("LiveHeatmap.react").__setRef("VideoScrubber.react"),bootloadPlaceholder:b("React").createElement("div",null),controlsHidden:this.props.controlsHidden,drawer:this.props.drawer,interestLevels:this.props.interestLevels,isPlaying:this.props.isPlaying,playedRatio:this.getPlayedRatio(this.props.playbackDuration,this.props.playbackPosition),bufferedRatio:this.getBufferedRatio(),nubEngaged:this.state.nubEngaged,scrubberPreviewElement:r,ref:"bar",tabIndex:this.props.tabIndex,"aria-label":i._("Change Position")}),h,p)}q=this.props.playbackDuration>500?10:1;j=Math.round(this.getPlayedRatio(this.props.playbackDuration,this.props.playbackPosition)*100*q)/q;k=j+"%";m=this.props.isFullscreen||this.props.isInTahoe;r=b("React").createElement("div",{className:a,onKeyDown:this.onKeyDown.bind(this),onMouseDown:this.onDragNubBeginClick.bind(this),onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),onTouchStart:this.onDragNubBeginTouch.bind(this)},c?c:b("React").createElement("div",{tabIndex:this.props.tabIndex,role:"slider","aria-orientation":"horizontal","aria-valuemin":"0","aria-valuemax":this.props.playbackDuration,"aria-valuenow":this.props.playbackPosition,"aria-valuetext":k,"aria-label":i._("Change Position"),className:"_2yu7",ref:"bar"},b("React").createElement("div",{className:"_2yu8",style:e}),b("React").createElement("div",{style:d,className:(this.props.isLiveVideo?"":"_2yu9")+(this.props.isLiveVideo&&!this.props.isLiveRewound?" _1p51":"")+(this.props.isLiveRewound?" _1p52":"")},this.renderNub()),f?b("React").createElement("div",{className:"_355j",style:{width:g}},b("React").createElement(b("ProfileTile.react"),{id:f.sharer_id,size:m?32:24,imageProps:{className:"_355k"},tileProps:{className:"_355n",style:{marginTop:m?-16:-10}}})):null,this.props.hasScrubberPreview?l:n,p,this.getInsertedAdBreaks(),this.getEligibleAdBreaksTimeSegments(),this.getPollTimeSegments()));return b("React").createElement("div",null,o,r,s)};return c}(b("React").Component);c.propTypes={alwaysShowThumbnail:a.bool,annotatedMomentsOfInterest:a.object,bufferedPosition:a.number.isRequired,hasScrubberPreview:a.bool,isFullscreen:a.bool,onAnnotatedMomentOfInterestSelect:a.func,onScrubBegin:a.func.isRequired,onPointOfInterestSelect:a.func,onScrubEnd:a.func.isRequired,playbackDuration:a.number.isRequired,playbackPosition:a.number.isRequired,pointsOfInterest:a.array,previewThumbnailInformation:a.object,scrubberPreviewSprites:a.object,showPointOfInterestTimestamps:a.bool,tabIndex:a.string.isRequired};c.defaultProps={alwaysShowThumbnail:!1,annotatedMomentsOfInterest:{},hasScrubberPreview:!1,pointsOfInterest:[],onAnnotatedMomentOfInterestSelect:b("emptyFunction"),onPointOfInterestSelect:b("emptyFunction"),onScrubBegin:b("emptyFunction"),onScrubEnd:b("emptyFunction"),showPointOfInterestTimestamps:!1,showVideoSliderWarningTooltip:!1};e.exports=c}),null); __d("VideoSidepaneToggleControl.react",["ix","cx","fbt","AbstractButton.react","Image.react","React","TooltipData","fbglyph"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();a=b("React").PropTypes;c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f0:null)?this.props.drawer&&this.props.drawer.setHeight(55):this.props.drawer&&this.props.drawer.setHeight(35)};d.isHidden=function(){return this.props.hidden};d.isTransparent=function(){return this.props.transparent};d.render=function(){__p&&__p();var a=b("VideoPlayerExperiments").inlineSoundVisible,c="_1c7d"+(this.isHidden()?" _1c7e":"")+(this.isTransparent()&&!a?" _2oy-":""),d="_2w_u"+(this.props.showSidePaneToggle?" _vr5":"")+(this.props.useDarkTheme?" _vr6":"")+"",e="_1c7f _1c7g"+(this.isTransparent()&&a?" _2oy-":""),f="_1c7f _2pvx"+(this.isTransparent()&&a?" _2oy-":""),g="_1c7f _1c7h"+(this.isTransparent()&&a?" _2oy-":""),j="_1c7f _w7o"+(this.isTransparent()&&(!this.props.isInline||this.props.isFullscreen||!this.props.isPlaying)?" _2oy-":""),k="_2w_w",l=!1;this.props.isLive&&this.props.isInTahoe&&(l=!0);l="_1otk _3t1r _4ubd"+(l?" _w7y":"");var m="_3t1r _4ubd _3t1s"+(this.props.isCommentAttachment?"":" hidden_elem"),n=null;if(!(this.props.isLive||this.props.isFBWasLive)&&!this.props.hideRemainingTime&&!this.props.isInWatchAndScroll){var o=this.props.playbackPosition-this.props.playbackDuration;n=b("React").createElement(b("VideoPlaybackTimer.react"),{className:"_5qsr"+(this.props.displayMilliseconds?" _w7-":""),isEmbedded:this.props.isEmbedded,playbackPosTimestamp:this.props.playbackPosition,playbackDurationTimestamp:this.props.playbackDuration,remainingTimestamp:o,displayElapsedTime:this.props.displayElapsedTime,displayMilliseconds:this.props.displayMilliseconds,displayBothTimes:!1})}o=null;var p=null,q=null,r=null,s;this.props.isInTahoe&&this.props.isLive&&!this.props.isFullscreen&&(s=b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("VideoQuietModeControl.react").__setRef("VideoControls.react"),bootloadPlaceholder:b("React").createElement("span",null),videoID:this.props.videoID}));(!this.props.isLive||this.props.hasHD)&&(!this.props.hideSettings&&!this.props.isInWatchAndScroll&&(b("VideoPlayerExperiments").redesign&&(q=b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("VideoSettingsControl.react").__setRef("VideoControls.react"),bootloadPlaceholder:b("React").createElement("span",null),disabled:this.props.isCasting,hasHD:this.props.hasHD,hasSubtitles:this.props.hasSubtitles,isHD:this.props.isHD,isInline:this.props.isInline,isLive:this.props.isLive,isSphericalVideo:this.props.isSphericalVideo,areSubtitlesActive:this.props.areSubtitlesActive,areSubtitlesAutogenerated:this.props.areSubtitlesAutogenerated,onSettingsClick:this.props.onSettingsClick,onToggleHD:this.props.onToggleHD,onToggleSubtitles:this.props.onToggleSubtitles,tabIndex:"0",availableQualities:this.props.availableQualities,selectedQuality:this.props.selectedQuality,preferredQuality:this.props.preferredQuality,canAutoSelectVideoQuality:this.props.canAutoSelectVideoQuality,onSelectQuality:this.props.onSelectQuality,showQualitySelector:this.props.showQualitySelector,qualitySelectorMinStreams:this.props.qualitySelectorMinStreams,streamingFormat:this.props.streamingFormat,videoID:this.props.videoID}))));this.props.isLive&&(b("VideoPlayerExperiments").hlsButton&&(r=b("React").createElement(b("BootloadedComponent.react"),{bootloadPlaceholder:b("React").createElement("span",null),bootloadLoader:b("JSResource")("VideoToHLSControl.react").__setRef("VideoControls.react"),areHLSActive:this.props.areHLSActive,onToggleHLS:this.props.onToggleHLS,tabIndex:"0"})));var t=this.props.gamesVideoCreatorClipping&&(this.props.isInTahoe||this.props.isInline||this.props.gamesVideoClipButtonEnabled)&&this.props.gamesDefaultClipLengthInSec?b("React").createElement(b("VideoClipButton.react"),{onClipVideo:this.props.onClipVideo,defaultLengthInSec:this.props.gamesDefaultClipLengthInSec}):null,u=null;if(this.props.allowFullscreen)if(this.props.doesFullscreenEnterTahoe&&(this.props.isInline||this.props.isInWatchAndScroll)){var v=b("React").createElement(b("Image.react"),{className:"_rwt",src:i("407577")}),w=h._("Click to enlarge");u=b("React").createElement(b("AbstractButton.react"),babelHelpers["extends"]({},b("TooltipData").propsFor(w,"above"),{className:"_zbd _400z _1vek",image:v,label:w,labelIsHidden:!0,onClick:this.props.onEnterTahoe,tabIndex:"0"}))}else{v=this.props.isFullscreen?h._("Click to exit fullscreen"):h._("Click to enter fullscreen");u=b("React").createElement(b("VideoFullscreenControl.react"),babelHelpers["extends"]({},b("TooltipData").propsFor(v,"above"),{disabled:this.props.isCasting&&!this.props.isFullscreen,isFullscreen:this.props.isFullscreen,onToggleFullscreen:this.props.onToggleFullscreen,tabIndex:"0"}))}w=null;this.props.hasWatchAndScroll&&!this.props.isFullscreen&&!this.props.isInWatchAndScroll&&(w=b("React").createElement(b("BootloadedComponent.react"),{bootloadPlaceholder:b("React").createElement("span",null),bootloadLoader:b("JSResource")("VideoWatchAndScrollControl.react").__setRef("VideoControls.react"),disabled:this.props.isCasting,onEnterWatchAndScroll:this.props.onEnterWatchAndScroll,isSlidingWNSEligible:this.props.isSlidingWNSEligible,onWNSNUXClose:this.props.onWNSNUXClose,showWNSNUX:this.props.showWNSNUX}));v=null;this.props.allowCasting&&this.props.hasFoundReceiver&&(v=b("React").createElement(b("BootloadedComponent.react"),{bootloadPlaceholder:b("React").createElement("span",null),bootloadLoader:b("JSResource")("VideoCastingControl.react").__setRef("VideoControls.react"),hasFoundReceiver:this.props.hasFoundReceiver,isCasting:this.props.isCasting,isCastingSupported:this.props.isCastingSupported,onStartCast:this.props.onStartCast,onStopCast:this.props.onStopCast}));var x=null;if(b("VideoPlayerExperiments").embeddedPlayerEnhancements)x=this.props.permalinkURL?b("React").createElement(b("VideoFBIconControl.react"),{permalinkURL:this.props.permalinkURL,playbackPosTimestamp:this.props.playbackPosition}):null;else{var y=null,z=this.props.isWatchIconEligible?i("909284"):i("390910");this.props.permalinkURL&&(y=b("React").createElement(b("Image.react"),{className:"_rwt",src:z}),x=b("React").createElement(b("AbstractButton.react"),{className:"_zbd",href:this.props.permalinkURL,image:y,label:h._("Open in a new tab"),labelIsHidden:!0,ref:"button",tabIndex:"0",target:"_blank",type:"button"}))}z=null;y=null;var A=null,B=null,C=null;if((this.props.isLive||this.props.isFBWasLive)&&this.props.showPlayButtonForLive&&!this.props.isLiveRewindEnabled)y=b("React").createElement(b("VideoPlaybackControl.react"),{finishedPlaying:this.props.finishedPlaying,isPlaying:this.props.isPlaying,onPause:this.props.onPause,onPlay:this.props.onPlay,useDarkTheme:this.props.useDarkTheme,tabIndex:"0"});else if(!(this.props.isLive||this.props.isFBWasLive)&&!this.props.hidePlaybackControl){y=b("React").createElement(b("VideoPlaybackControl.react"),{finishedPlaying:this.props.finishedPlaying,isPlaying:this.props.isPlaying,onPause:this.props.onPause,onPlay:this.props.onPlay,useDarkTheme:this.props.useDarkTheme,tabIndex:"0"});if(this.props.showPlaybackRateControl&&this.props.onSetVideoPlaybackRate){var D=h._("Playback Rate");A=b("React").createElement(b("VideoPlaybackRateControl.react"),babelHelpers["extends"]({},b("TooltipData").propsFor(D,"above"),{isEmbedded:this.props.isEmbedded,tabIndex:"0",onSelectPlaybackRate:this.props.onSetVideoPlaybackRate}))}if(!this.props.hidePlaybackScrubber){D=!this.props.finishedPlaying&&(this.props.vpcID!==void 0?this.state.pollCardsActiveForVPC[(D=this.props.vpcID)!=null?D:""]!==null?((D=this.state.pollCardsActiveForVPC[(D=this.props.vpcID)!=null?D:""])!=null?D:b("immutable").List()).size===0:!0:!1);z=b("React").createElement(b("VideoScrubber.react"),{adBreaks:this.props.adBreaks,adBreaksDisableReasons:this.props.adBreaksDisableReasons,annotatedMomentsOfInterest:this.props.annotatedMomentsOfInterest,bufferedPosition:this.props.bufferedPosition,controlsHidden:this.props.hidden,hasScrubberPreview:this.props.hasScrubberPreview,interestLevels:this.props.interestLevels,drawer:this.props.drawer,insertedAdBreaks:this.props.insertedAdBreaks,isAdBreakDisabled:this.props.isAdBreakDisabled,isAdBreakInsertionWithoutGapRule:this.props.isAdBreakInsertionWithoutGapRule,isFullscreen:this.props.isFullscreen,isPlaying:this.props.isPlaying,onScrubBegin:this.props.onScrubBegin,onScrubEnd:this.props.onScrubEnd,playbackDuration:this.props.playbackDuration,playbackPosition:this.props.playbackPosition,pollTimestamps:this.props.pollTimestamps,showPollCard:D,onAnnotatedMomentOfInterestSelect:this.props.onAnnotatedMomentOfInterestSelect,previewThumbnailInformation:this.props.previewThumbnailInformation,scrubberPreviewSprites:this.props.scrubberPreviewSprites,onPointOfInterestSelect:this.props.onPointOfInterestSelect,currentPointOfInterest:this.props.currentPointOfInterest,pointsOfInterest:this.props.pointsOfInterest,showPointOfInterestTimestamps:this.props.showPointOfInterestTimestamps,showVideoSliderWarningTooltip:this.props.showVideoSliderWarningTooltip,tabIndex:"0",isInTahoe:this.props.isInTahoe,videoClipInfo:this.props.videoClipInfo})}}D=null;this.props.showSidePaneToggle&&(D=b("React").createElement(b("VideoSidepaneToggleControl.react"),{isSidePaneOpen:this.props.isSidePaneOpen,onSidePaneToggle:this.props.onSidePaneToggle,tabIndex:"0"}));var E=null;this.props.hideGradient||(E=b("React").createElement("div",{className:"_w80"+(this.isTransparent()?" _2oy-":"")}));var F=b("React").createElement(b("VideoVolumeControl.react"),{isAudioBlocked:this.props.isAudioBlocked,isMuted:this.props.isMuted,onToggleMuted:this.props.onToggleMuted,onVolumeChange:this.props.onVolumeChange,volume:this.props.volume,tabIndex:"0",showSpatialAudioNUX:this.props.showSpatialAudioNUX,useDarkTheme:this.props.useDarkTheme}),G,H,I,J,K,L,M,N,O=this.props,P=O.onLiveRewindToBeginning,Q=O.onLiveRewindSeekBack,R=O.onLiveRewindSeekForward;O=O.onLiveRewindToLive;if(this.props.isLiveRewindEnabled&&!this.props.isEmbedded){if(this.props.liveRelativePlaybackPosition!=null){var S=this.props.liveRelativePlaybackPosition>this.props.playbackDuration?this.props.playbackDuration:this.props.liveRelativePlaybackPosition;M=this.props.isInWatchAndScroll?null:b("React").createElement(b("VideoPlaybackTimer.react"),{className:"_3ek9 _5qsr"+(this.props.displayMilliseconds?" _w7-":""),displayElapsedTime:!0,displayMilliseconds:this.props.displayMilliseconds,isEmbedded:this.props.isEmbedded,isLiveVideo:!0,playbackPosTimestamp:S,playbackDurationTimestamp:this.props.isFBWasLive?this.props.playbackDuration:void 0,displayBothTimes:this.props.isFBWasLive,remainingTimestamp:-1*(this.props.playbackDuration-S)});L=b("React").createElement(b("VideoScrubber.react"),{adBreaks:this.props.adBreaks,adBreaksDisableReasons:this.props.adBreaksDisableReasons,bufferedPosition:this.props.bufferedPosition,className:"_3ek9",controlsHidden:this.props.hidden,currentPointOfInterest:this.props.currentPointOfInterest,drawer:this.props.drawer,hasScrubberPreview:this.props.hasScrubberPreview,interestLevels:this.props.interestLevels,insertedAdBreaks:this.props.insertedAdBreaks,isAdBreakDisabled:this.props.isAdBreakDisabled,isAdBreakInsertionWithoutGapRule:this.props.isAdBreakInsertionWithoutGapRule,isFullscreen:this.props.isFullscreen,isInTahoe:this.props.isInTahoe,isLiveRewound:this.props.isLiveRewound,isLiveVideo:!0,isPlaying:this.props.isPlaying,playbackDuration:this.props.playbackDuration,playbackPosition:this.props.isLiveRewound?S:this.props.playbackDuration,pointsOfInterest:this.props.pointsOfInterest,previewThumbnailInformation:this.props.previewThumbnailInformation,scrubberPreviewSprites:this.props.scrubberPreviewSprites,showPointOfInterestTimestamps:this.props.showPointOfInterestTimestamps,tabIndex:"0",onLiveRewindToBeginning:this.props.onLiveRewindToBeginning,onLiveRewindSeekBack:this.props.onLiveRewindSeekBack,onLiveRewindSeekForward:this.props.onLiveRewindSeekForward,onLiveRewindToLive:this.props.onLiveRewindToLive,onPointOfInterestSelect:this.props.onPointOfInterestSelect,onScrubBegin:this.props.onScrubBegin,onScrubEnd:this.props.onScrubEnd});new(b("LiveVideoRewindTypedLogger"))().setEvent("render_rewind_controls").setVideoID(this.props.videoID).log()}G=P&&!this.props.isInWatchAndScroll&&!this.props.isInline?b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("VideoLiveRewindControl.react").__setRef("VideoControls.react"),bootloadPlaceholder:b("React").createElement("span",null),asset:i("465766"),tooltip:h._("Go to beginning"),onButtonClick:P}):null;N=this.props.isFBWasLive&&O&&!this.props.isInWatchAndScroll&&!this.props.isInline?b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("VideoLiveRewindControl.react").__setRef("VideoControls.react"),bootloadPlaceholder:b("React").createElement("span",null),asset:i("465765"),tooltip:h._("Go to end"),onButtonClick:O}):null;H=Q&&!this.props.isInWatchAndScroll?b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("VideoLiveRewindControl.react").__setRef("VideoControls.react"),bootloadPlaceholder:b("React").createElement("span",null),asset:i("465767"),tooltip:h._("Skip back"),onButtonClick:Q}):null;S=this.props.isLiveRewound?h._("Skip ahead"):void 0;I=R&&!this.props.isInWatchAndScroll&&!this.props.isInline?b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("VideoLiveRewindControl.react").__setRef("VideoControls.react"),bootloadPlaceholder:b("React").createElement("span",null),asset:i("465768"),disabled:!this.props.isLiveRewound,tooltip:S,onButtonClick:R}):null;P=this.props.isLiveRewound?i("467224"):i("467223");Q=this.props.isLiveRewound?h._("Live view"):void 0;J=O?b("React").createElement(b("BootloadedComponent.react"),{bootloadLoader:b("JSResource")("VideoLiveRewindControl.react").__setRef("VideoControls.react"),bootloadPlaceholder:b("React").createElement("span",null),asset:P,tooltip:Q,onButtonClick:O}):null;K=this.props.isInWatchAndScroll?null:b("React").createElement(b("VideoPlaybackControl.react"),{finishedPlaying:this.props.finishedPlaying,isLiveVideo:!0,isPlaying:this.props.isPlaying,onPause:this.props.onPause,onPlay:this.props.onPlay,useDarkTheme:this.props.useDarkTheme,tabIndex:"0"})}S=null;if(this.props.useTwoRows){R=b("React").createElement(b("VideoVolumeControl.react"),{isAudioBlocked:this.props.isAudioBlocked,isMuted:this.props.isMuted,onToggleMuted:this.props.onToggleMuted,onVolumeChange:this.props.onVolumeChange,volume:this.props.volume,isHorizontal:!0,tabIndex:"0"});S=b("React").createElement("div",{className:m},b("React").createElement("div",{className:k},b("React").createElement("div",{className:c},b("React").createElement("div",{className:e}),b("React").createElement("div",{className:f},z),b("React").createElement("div",{className:g},n))),b("React").createElement("div",{className:k},b("React").createElement("div",{className:c},b("React").createElement("div",{className:e},y,A,R),b("React").createElement("div",{className:f}),b("React").createElement("div",{className:g},p,r,o,q,w,v,u,x,t))))}P=null;if(b("VideoPlayerExperiments").embeddedPlayerEnhancements&&this.props.isEmbedded){Q=b("joinClasses")(c,b("VideoPlayerExperiments").embeddedPlayerEnhancements?"_w83":"");O=b("joinClasses")(c,"_w86");P=b("React").createElement("div",{className:Q},b("React").createElement("div",{className:k},b("React").createElement("div",{className:O},b("React").createElement("div",{className:e},y,A),b("React").createElement("div",{className:f},z),b("React").createElement("div",{className:g},n)),b("React").createElement("div",{className:c},b("React").createElement("div",{className:e}),b("React").createElement("div",{className:f}),b("React").createElement("div",{className:g},a||F,p,r,o,s,q,w,v,D,u,x,t),b("React").createElement("div",{className:j},!a||F))))}else P=!this.props.useTwoRows||!this.props.isCommentAttachment?b("React").createElement("div",{className:l},b("React").createElement("div",{className:k},b("React").createElement("div",{className:c},b("React").createElement("div",{className:e},C,y,A,B,G,H,K,I,this.props.isFBWasLive?N:J,M),b("React").createElement("div",{className:f},z,L),b("React").createElement("div",{className:g},n,a||F,p,r,o,s,q,w,v,D,u,x,t),b("React").createElement("div",{className:j},!a||F)))):null;return b("React").createElement("div",{className:d},E,P,S)};return c}(b("React").Component);c.propTypes={adBreaks:a.array,adBreaksDisableReasons:a.array,allowFullscreen:a.bool,areHLSActive:a.bool,areSubtitlesActive:a.bool,areSubtitlesAutogenerated:a.bool,availableQualities:a.array,canAutoSelectVideoQuality:a.bool,displayElapsedTime:a.bool,displayMilliseconds:a.bool,annotatedMomentsOfInterest:a.object,finishedPlaying:a.bool,hasHD:a.bool,hasScrubberPreview:a.bool,hasSubtitles:a.bool,hasWatchAndScroll:a.bool,hidden:a.bool,hideGradient:a.bool,hidePlaybackControl:a.bool,hidePlaybackScrubber:a.bool,hideRemainingTime:a.bool,hideSettings:a.bool,isAudioBlocked:a.bool,isCommentAttachment:a.bool,isEmbedded:a.bool,isFullscreen:a.bool,isHD:a.bool,isInline:a.bool,isInWatchAndScroll:a.bool,isLive:a.bool,isLiveRewindEnabled:a.bool,isMuted:a.bool,isPlaying:a.bool,isSidePaneOpen:a.bool,isSlidingWNSEligible:a.bool,isSphericalVideo:a.bool,onEnterWatchAndScroll:a.func,onLiveRewindSeekBack:a.func,onLiveRewindSeekForward:a.func,onLiveRewindToBeginning:a.func,onLiveRewindToLive:a.func,onPause:a.func,onPlay:a.func,onPointOfInterestSelect:a.func,onSeek:a.func,onSelectQuality:a.func,onSetVideoPlaybackRate:a.func,onToggleFullscreen:a.func,onToggleHD:a.func,onToggleHLS:a.func,onToggleMuted:a.func,onToggleSubtitles:a.func,onVolumeChange:a.func,permalinkURL:a.string,playbackDuration:a.number,playbackPosition:a.number,pointsOfInterest:a.array,preferredQuality:a.string,previewThumbnailInformation:a.object,qualitySelectorMinStreams:a.number,scrubberPreviewSprites:a.object,selectedQuality:a.string,showPointOfInterestTimestamps:a.bool,showQualitySelector:a.bool,showSidePaneToggle:a.bool,showWNSNUX:a.bool,streamingFormat:a.string,transparent:a.bool,useDarkTheme:a.bool,useTwoRows:a.bool,volume:a.number,videoClipInfo:a.object,isWatchIconEligible:a.bool};c.defaultProps={allowCasting:!1,bufferedPosition:0,displayElapsedTime:!1,displayMilliseconds:!1,hasFoundReceiver:!1,hidden:!1,hideGradient:!1,hidePlaybackControl:!1,hidePlaybackScrubber:!1,hideRemainingTime:!1,hideSettings:!1,isAudioBlocked:!1,isCasting:!1,isCastingSupported:!1,isCommentAttachment:!1,isMuted:!1,isPlaying:!1,isSphericalVideo:!1,isWatchIconEligible:!1,onSidePaneToggle:function(){},onStartCast:function(){},onStopCast:function(){},playbackDuration:0,playbackPosition:0,showPlaybackRateControl:!1,showSidePaneToggle:!1,showWNSNUX:!1,transparent:!1,useDarkTheme:!1,useTwoRows:!1,volume:0};e.exports=b("FluxContainer").create(c)}),null); __d("VideoControls",["csx","cx","Arbiter","AsyncRequest","Bootloader","ClippingApi","CSS","DeferredComponent.react","EventListener","FullScreen","LiveRewindUtils","LiveVideoPlayerActions","Parent","React","ReactDOM","SubscriptionsHandler","VideoChannelViewVariables","VideoPlayerExperiments","VideoPlayerUIComponentDrawer","VideoWatchAndScrollController","XBasicFBNuxGenShouldShowController","cancelAnimationFrame","containsNode","destroyOnUnload","getActiveElement","gkx","logVideosClickTracking","promiseDone","requestAnimationFrame","shouldWNSRenderToRHC","throttle"],(function(a,b,c,d,e,f,g,h){__p&&__p();var i=b("VideoChannelViewVariables").channelRedesign,j=new Set(["embedded","embedded_video","embedded_video_preview","embedded_page_plugin","embedded_video_from_ufi"]),k=200,l=4936,m=b("VideoPlayerExperiments").persistentWNSEnabled;a=function(){"use strict";__p&&__p();function a(a,c,d){__p&&__p();var e=this,f;this.$14=function(){e.$10=!1,e.scheduleRenderReactComponent()};this.$15=a;this.$86=c;this.$9=0;this.$79=0;this.$78=0;this.$27=0;this.$113=!1;this.$87=!1;this.$45=d.hideOnEvents.autoplay;this.$46=d.hideOnEvents.finish;this.$39=d.hideOnEvents.pause;this.$95=d.unhideOnHover;this.$40=d.hidePlaybackControl;this.$41=d.isWatchIconEligible;this.$42=d.hidePlaybackScrubber;this.$96=d.showPlaybackRateControl;this.$100=d.showVideoSliderWarningTooltip;this.$43=d.hideRemainingTime;this.$44=d.hideSettings;this.$110=d.useTwoRows;this.$52=d.isCommentAttachment;this.$80=d.pointsOfInterestConfig||{};this.$17=d.displayElapsedTime||!1;this.$18=d.displayMilliseconds||!1;this.$19=d.displayDurationLimit;this.$20=d.displayTimeOffset;this.$1=d.adBreaks;this.$2=d.adBreaksDisableReasons;this.$99=d.showSpatialAudioNUX;this.$82=(f=d.pollTimestamps)!=null?f:[];this.$64=!1;this.$94=d.shouldShowWNSNUX;this.$10=!1;this.$34=!1;this.$47=d.insertedAdBreaks;this.$48=d.isAdBreakDisabled;this.$49=d.isAdBreakInsertionWithoutGapRule;this.$59=d.isLiveRewindEnabled||this.$15.isFBWasLive();this.$60=this.$15.isFBWasLive();this.$71=null;this.$97=d.showPlayButtonForLive;this.$111=d.videoClipInfo;this.$93=!!d.videoClipInfo;this.$12=null;this.$73=d.mutedSegments;f=a.isHtml5Player();this.$36=d.showButtons.watchandscroll&&f;this.$3=d.showButtons.casting;this.$4=d.showButtons.fullscreen&&!!b("FullScreen").isSupported();this.$76=d.permalinkURL;this.$57=d.isLive;this.$58=d.isGamingVideo;this.$65=d.isSphericalVideo;this.$28=d.forceVisible||!1;this.$38=d.hideGradient||!1;this.$109=d.useDarkTheme||!1;this.$50=!1;this.$53=!1;this.$37=!1;this.$63=!1;this.$98=d.showQualitySelector;this.$83=d.qualitySelectorMinStreams;this.$69=this.liveRewindToBeginning.bind(this);this.$67=this.liveRewindSeekBack.bind(this);this.$68=this.liveRewindSeekForward.bind(this);this.$70=this.liveRewindToLive.bind(this);this.$13=this.clipVideo.bind(this);this.$24=this.enterWatchAndScroll.bind(this);this.$23=this.enterTahoe.bind(this);this.$77=this.play.bind(this);this.$75=this.pause.bind(this);this.$88=this.scrubBegin.bind(this);this.$89=this.scrubEnd.bind(this);this.$101=this.startCasting.bind(this);this.$102=this.stopCasting.bind(this);this.$104=this.toggleFullscreen.bind(this);this.$105=this.toggleHD.bind(this);this.$106=this.toggleHLS.bind(this);this.$107=this.toggleMuted.bind(this);this.$108=this.toggleSubtitles.bind(this);this.$11=this.changeVolume.bind(this);this.$92=this.setVideoPlaybackRate.bind(this);this.$91=this.setPreferredVideoQuality.bind(this);this.$22=this.$15.registerDrawer(b("VideoPlayerUIComponentDrawer").priorities.EmbeddedControls,36);this.$74=d.needsInitialVideoInfoUpdate;this.$16=this.$15.getSource();this.$29=d.gamesVideoClipButtonEnabled;this.$30=!!d.gamesVideoCreatorClippingGK&&!j.has(this.$16);this.$31=d.gamesDefaultClipLengthInSec;this.$6=d.annotatedMomentsOfInterest||{};m||b("destroyOnUnload")(function(){b("ReactDOM").unmountComponentAtNode(c)});a=this.$15.getRootNode();b("EventListener").listen(this.$86,"focusin",function(){e.$26=!0,e.scheduleRenderReactComponent()});b("EventListener").listen(this.$86,"focusout",function(){b("containsNode")(e.$86,b("getActiveElement")())||(e.$26=!1,e.scheduleRenderReactComponent())});b("EventListener").listen(a,"click",function(a){if(e.$26&&a.detail){a=b("getActiveElement")();a&&a.blur()}});b("EventListener").listen(a,"mouseleave",function(){e.$72=!1,e.scheduleRenderReactComponent()});b("EventListener").listen(a,"mouseenter",function(){e.$72=!0,e.scheduleRenderReactComponent()});this.$15.registerOption("VideoControls","acquireForceHideLock",function(){e.$27++;return{release:function(){e.$27--,e.scheduleRenderReactComponent()}}});this.$15.registerOption("VideoControls","hideOnFinish",function(){return e.$46},function(a){e.$46=a});this.$15.registerOption("VideoControls","hideOnPause",function(){return e.$39},function(a){e.$39=a});this.$15.registerOption("VideoControls","unhideOnHover",function(){return e.$95},function(a){e.$95=a});this.$15.registerOption("VideoControls","available",function(){return!0});this.$15.registerOption("VideoControls","areControlsVisible",this.areControlsVisible.bind(this));["mousemove","mousedown","keydown"].forEach(function(a){b("EventListener").listen(e.$15.getRootNode(),a,b("throttle")(e.flashControls.bind(e),200))});this.$103=new(b("SubscriptionsHandler"))();this.scheduleRenderReactComponent();f=["changeVolume","loadedSubtitles","muteVideo","pausePlayback","stateChange","toggleFullscreen","toggleSubtitles","updateMetadata","unmuteVideo","qualityChange","casting/receiverStateChange","casting/supportStateChange","casting/castingStateChange","casting/playStateChange"];f.forEach(function(a){return e.$103.addSubscriptions(e.$15.addListener(a,function(){return e.scheduleRenderReactComponentWithVideoInfoUpdate()}))});this.$103.addSubscriptions(this.$15.addListener("pauseRequested",function(a){e.$114(a)}),this.$15.addListener("playRequested",function(a){e.$115(a)}),this.$15.addListener("beginPlayback",function(){return e.$116()}),this.$15.addListener("updateStatus",function(a){if(e.$59){var c=e.$15.getSeekableRanges();c&&(e.$66=b("LiveRewindUtils").getRelativePosition(a.position,c))}e.$79=a.position;e.$20&&(e.$79-=e.$20);e.scheduleRenderReactComponent()}),this.$15.addListener("casting/updateStatus",function(a){if(e.$59){var c=e.$15.getSeekableRanges();c&&(e.$66=b("LiveRewindUtils").getRelativePosition(a.position,c))}e.$79=a.position;e.scheduleRenderReactComponent()}),this.$15.addListener("seekRangeChanged",function(a){if(e.$59){a=e.$15.getSeekableRanges();a&&(e.$78=b("LiveRewindUtils").getTotalDuration(a))}}),this.$15.addListener("updateBuffer",function(a){e.$9=a.duration+a.offset,e.scheduleRenderReactComponent()}),this.$15.addListener("optionsChange",function(a){e.$117()}),this.$15.addListener("resumeAutoplay",function(a){e.$118(),e.scheduleRenderReactComponentWithVideoInfoUpdate()}),this.$15.addListener("turnOffAutoplay",function(a){e.$51=!1}),this.$15.addListener("LivePlayer/isRewoundChanged",function(a){a=e.$15.getOption("LivePlayer","isRewound");e.$60!==a&&(e.$60=a,e.scheduleRenderReactComponent())}),this.$15.addListener("blockAudio",function(a){a||(e.$50=!0)}),this.$15.addListener("unblockAudio",function(a){a||(e.$50=!1)}));this.$94&&this.$103.addSubscriptions(this.$15.addListener("VideoWithStallRecovery/bufferingStateOn",function(){e.$34||e.$119(l)}),this.$15.addListener("VideoWithStallRecovery/bufferingStateOff",function(){e.$10=!1}));this.$103.addSubscriptions(this.$15.addListener("finishPlayback",function(){e.scheduleRenderReactComponent(!0)}));this.$118();this.$120()}var c=a.prototype;c.$120=function(){this.$90=this.$15.getOption("VideoScrubberPreviewComponent","scrubberPreviewSprites"),this.$33=this.$15.getOption("VideoScrubberPreviewComponent","hasPreviewThumbnails"),this.$81=this.$15.getOption("VideoScrubberPreviewComponent","previewThumbnailInformation")};c.$118=function(){this.$51=this.$15.getOption("FeedAutoplay","isAutoplaying")};c.$117=function(){this.$118(),this.$120()};c.$114=function(a){var c=this;this.scheduleRenderReactComponentWithVideoInfoUpdate();this.$57&&this.$59&&a==="user_initiated"&&(!this.$60&&this.$71===null&&(this.$71=window.setTimeout(function(){c.$71=null,b("LiveVideoPlayerActions").setIsRewound(c.$15,!0)},k)))};c.$115=function(a){this.$57&&this.$59&&a==="user_initiated"&&this.$71!==null&&(window.clearTimeout(this.$71),this.$71=null)};c.$116=function(){this.flashControls(),this.$62=!0,this.scheduleRenderReactComponentWithVideoInfoUpdate()};c.$119=function(a){var c=this;a=b("XBasicFBNuxGenShouldShowController").getURIBuilder().setInt("nux_id",a).getURI();new(b("AsyncRequest"))().setURI(a).setMethod("GET").setReadOnly(!0).setHandler(function(a){a=a.getPayload();c.$10=a.should_show_nux}).send()};c.updateConfig_DEPRECATED=function(a,b){this.$76=a.permalinkURL||null,this.$3=a.showButtons?a.showButtons.casting:!1,this.$57=!!a.isLive,this.$1=a.adBreaks||null,this.scheduleRenderReactComponent()};c.updateAdBreaksConfig=function(a){this.$47=a.insertedAdBreaks,this.$48=a.isAdBreakDisabled,this.$49=a.isAdBreakInsertionWithoutGapRule,this.$28=!a.isPreviewingAdBreak,this.scheduleRenderReactComponent()};c.updateTwoRowsConfig=function(a){this.$110=a.useTwoRows,this.$52=a.isCommentAttachment,this.scheduleRenderReactComponent()};c.flashControls=function(){var a=this;this.$84||(this.$84=!0,this.scheduleRenderReactComponent());window.clearTimeout(this.$25);this.$25=window.setTimeout(function(){a.$84=!1,a.scheduleRenderReactComponent()},3e3)};c.areControlsVisible=function(){__p&&__p();var a=this;if(!this.areControlsEnabled())return!1;if(this.$28||this.$10||this.$63)return!0;if(this.$15.isState("playing")){if(this.$93){this.$12||(this.$12=window.setTimeout(function(){a.$93=!1},5e3));return!0}else if(this.$45&&this.$51)return!1;return this.$26||this.$72&&this.$84}else if(this.$15.isState("finished")){var b=this.$15.getSource()==="tahoe";return this.$15.isFullscreen()||b||!this.$46}else if(this.$15.isState("paused"))return this.$15.isFullscreen()||!this.$39||this.$95&&(this.$26||this.$72&&this.$84);return!1};c.areControlsEnabled=function(){var a=this.$15.getSource()==="tahoe";return this.$27>0||this.$15.isState("loading")||this.$15.isState("fallback")||this.$15.getOption("SottoPaywall","enable")||this.$15.isState("finished")&&this.$46&&!this.$15.isFullscreen()&&!a?!1:!0};c.scheduleRenderReactComponentWithVideoInfoUpdate=function(){this.$74=!0,this.scheduleRenderReactComponent(!0)};c.shouldRenderComponent=function(){__p&&__p();if(this.$15.isState("loading")||this.$15.isState("fallback"))return!1;if(this.areControlsVisible()){this.$37=!1;return!0}if(!this.$37){this.$37=!0;return!0}return!1};c.scheduleRenderReactComponent=function(a){a===void 0&&(a=!1);if(!a&&!this.shouldRenderComponent())return;b("cancelAnimationFrame")(this.$85);this.$85=b("requestAnimationFrame")(this.renderReactComponent.bind(this))};c.renderReactComponent=function(){__p&&__p();var a=this;if(b("VideoPlayerExperiments").delayVideoControlRenderForApiReady&&this.$15.getState()==="loading"&&!this.$87){this.$87=!0;this.$15.runOnApiReady(function(){a.scheduleRenderReactComponent()});return}this.$74&&this.$121();this.$53=!1;if(this.$73)for(var c=this.$73,e=Array.isArray(c),f=0,c=e?c:c[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var g;if(e){if(f>=c.length)break;g=c[f++]}else{f=c.next();if(f.done)break;g=f.value}g=g;this.$79>=g.mute_start_time_in_sec&&this.$79<=g.mute_end_time_in_sec&&(this.$53=!0)}g=this.areControlsVisible();this.$113!==g&&(this.$15.emit("VideoControls/visibilityUpdate",{areControlsVisible:g}),g?this.$22.reserve():this.$22.release(),this.$15.isState("destroyed")||b("CSS").conditionClass(this.$15.getRootNode(),"_302m",!g));this.$113=g;f=this.$15.getAvailableVideoQualities();e=this.$15.getPreferredVideoQuality();c=this.$15.getSelectedVideoQuality();var h=this.$15.canAutoSelectVideoQuality(),k=this.$15.getStreamingFormat(),l=null;this.$15.hasOption("LiveHeatmap","interestLevels")&&(l=this.$15.getOption("LiveHeatmap","interestLevels"));var m=this.$64;this.$64=b("VideoPlayerExperiments").slidingWNSv3&&this.$36&&b("VideoWatchAndScrollController").isSlidingEnabled(this.$15);m!==this.$64&&this.$15.logEvent(this.$64?"watch_and_scroll_icon_highlighted":"watch_and_scroll_icon_unhighlighted");m=this.$15.getSource()==="tahoe";var n=this.$15.getSource()==="watch_scroll",o=this.$15.isFBIsLiveTemplated()||this.$15.isFBWasLive();o=this.$59&&o&&(this.$15.isFBWasLive()||this.$15.getState()!=="finished");b("ReactDOM").render(b("React").createElement(b("DeferredComponent.react"),{deferredPlaceholder:b("React").createElement("span",null),deferredComponent:function(a){return d(["VideoControls.react"],a)},allowCasting:this.$3,allowFullscreen:this.$4,annotatedMomentsOfInterest:this.$6,areSubtitlesActive:this.$7,areSubtitlesAutogenerated:this.$8,areHLSActive:this.$5,bufferedPosition:this.$9,finishedPlaying:this.$15.isState("finished"),hasFoundReceiver:this.hasFoundReceiver(),hasHD:this.$32,hasSubtitles:this.$35,hasWatchAndScroll:this.$36&&!this.getIsInChannel(),hidden:!this.areControlsEnabled(),hideGradient:this.$38,isAudioBlocked:this.$50||this.$53&&b("gkx")("797757"),isCasting:this.isCasting(),isCastingSupported:this.isCastingSupported(),isCommentAttachment:this.$52,isEmbedded:j.has(this.$16),isFullscreen:this.$54,isHD:this.$55,isInline:this.$56,isInTahoe:m,isInWatchAndScroll:n,isLive:this.$57,isLiveRewindEnabled:o,isLiveRewound:this.$60,isFBWasLive:this.$15.isFBWasLive(),isSphericalVideo:this.$65,isMuted:this.$61,isPlaying:this.$62,isSidePaneOpen:this.getIsInChannel()&&!!b("Parent").bySelector(this.$86,"._57bj"),isSlidingWNSEligible:this.$64,interestLevels:l,liveRelativePlaybackPosition:this.$66,drawer:this.$22,onAnnotatedMomentOfInterestSelect:function(b){a.$15.seek(b)},onEnterWatchAndScroll:this.$24,onEnterTahoe:this.$23,doesFullscreenEnterTahoe:this.$21,onLiveRewindToBeginning:this.$69,onLiveRewindSeekBack:this.$67,onLiveRewindSeekForward:this.$68,onLiveRewindToLive:this.$70,onWNSNUXClose:this.$14,onClipVideo:this.$13,onPause:this.$75,onPlay:this.$77,onScrubBegin:this.$88,onScrubEnd:this.$89,onSetVideoPlaybackRate:this.$92,onSettingsClick:function(){a.$63=!a.$63},onSidePaneToggle:function(){b("Arbiter").inform("VideoChannelView/sidePaneToggle",{})},onStartCast:this.$101,onStopCast:this.$102,onToggleFullscreen:this.$104,onToggleHD:this.$105,onToggleHLS:this.$106,onToggleMuted:this.$107,onToggleSubtitles:this.$108,onVolumeChange:this.$11,permalinkURL:this.$76,playbackDuration:this.$78,playbackPosition:this.$79,transparent:!g,hidePlaybackControl:this.$40,isWatchIconEligible:this.$41,hidePlaybackScrubber:this.$42,showPlaybackRateControl:this.$96,showPlayButtonForLive:this.$97,showVideoSliderWarningTooltip:this.$100,hideRemainingTime:this.$43,hideSettings:this.$44,useTwoRows:this.$110,volume:this.$112,scrubberPreviewSprites:this.$90,hasScrubberPreview:this.$33&&!n,previewThumbnailInformation:this.$81,availableQualities:f,selectedQuality:c,preferredQuality:e,canAutoSelectVideoQuality:h,onSelectQuality:this.$91,showQualitySelector:this.$98,qualitySelectorMinStreams:this.$83,streamingFormat:k,showSpatialAudioNUX:this.$99,onPointOfInterestSelect:this.$80.onPointOfInterestSelect,currentPointOfInterest:this.$80.currentPointOfInterest,pointsOfInterest:this.$80.pointsOfInterest,showPointOfInterestTimestamps:this.$80.showPointOfInterestTimestamps,displayElapsedTime:this.$17,displayMilliseconds:this.$18,adBreaks:this.$1,pollTimestamps:this.$82.filter(function(b){return b<=a.$78}),vpcID:this.$15.getVideoPlayerID(),adBreaksDisableReasons:this.$2,showSidePaneToggle:this.getIsInChannel()&&!this.$54&&i,showWNSNUX:this.$10&&this.areControlsEnabled()&&this.$94,insertedAdBreaks:this.$47,isAdBreakDisabled:this.$48,isAdBreakInsertionWithoutGapRule:this.$49,useDarkTheme:this.$109,videoID:this.$15.getVideoID(),videoClipInfo:this.$111?this.$111:void 0,gamesVideoClipButtonEnabled:this.$29,gamesVideoCreatorClipping:this.$30,gamesDefaultClipLengthInSec:this.$31}),this.$86);this.$10&&this.areControlsEnabled()&&this.$94&&(this.$34=!0)};c.$121=function(){__p&&__p();var a=this.$15.getVideoInfo_DEPRECATED();if(a){this.$7=a.areSubtitlesActive;this.$8=a.areSubtitlesAutogenerated;this.$35=a.hasSubtitles;this.$32=a.hasHD;this.$55=a.isHD;this.$61=a.isMuted;this.$62=a.isPlaying||this.isCastPlaying();if(this.$59){var c=this.$15.getSeekableRanges();c&&(this.$78=b("LiveRewindUtils").getTotalDuration(c))}else this.$19!==null&&this.$19!==void 0?this.$78=Math.min(a.playbackDuration,this.$19):this.$78=a.playbackDuration;this.$112=a.volume;c=this.$15.getOption("CommercialBreakVideoAdOverlay","videoController");c?this.$54=c.isFullscreen():this.$54=this.$15.isFullscreen();this.$56=this.$15.getSource()==="inline"||this.$15.getSource()==="discover"||this.$15.getPlayerOrigin()==="video_home"&&this.$15.getSource()==="permalink"||this.$15.getSource()==="continue_watching_recommendation"||this.$15.getSource()==="games_video_home_hero"&&this.$15.getPlayerOrigin()==="games_video_hub";this.$57=a.isLiveStream;this.$5=a.areHLSActive;this.$74=!1;this.$21=this.$15.listeners("enterTahoe").length!==0}};c.toggleHD=function(){this.$15.toggleHD()};c.setPreferredVideoQuality=function(a){a?this.$15.setPreferredVideoQuality(a):this.$15.unsetPreferredVideoQuality()};c.toggleHLS=function(){this.$15.switchToStreamType("hls")};c.clipVideo=function(a){a=b("gkx")("815986")&&this.$59;a&&this.$15.pause("user_initiated");b("promiseDone")(b("ClippingApi").clipVideo(this.$15.getVideoID(),this.$15.getCurrentTimePosition(),this.$86,a).then())};c.enterWatchAndScroll=function(){b("shouldWNSRenderToRHC")()?this.$15.emit("crossfadeWatchAndScroll"):this.$15.emit("enterWatchAndScroll")};c.enterTahoe=function(){var a=this;this.$15.getSource()==="watch_scroll"?(this.$15.logEvent("watch_and_scroll_channel_entered"),b("Bootloader").loadModules(["TahoeController","URI"],function(c,d){var e=new d(a.$15.getVideoURL());d=babelHelpers["extends"]({},d.getRequestURI().getQueryData(),{ref:"tahoe"});b("VideoWatchAndScrollController").onEnterTahoe();c.openFromVideoPlayer(a.$15,e.setQueryData(d),a.$15.getVideoChannelID(),"wns")},"VideoControls")):this.$15.emit("enterTahoe")};c.scrubBegin=function(){this.isCasting()||this.$15.pause("seek_initiated")};c.scrubEnd=function(a){__p&&__p();if(this.$59){var c=this.$15.getSeekableRanges();if(c){var d=this.$66;this.$66=a;a=b("LiveRewindUtils").getAbsolutePosition(a,c);c=b("LiveRewindUtils").getLiveHeadTimestamp(c);c=c-a<1;b("LiveVideoPlayerActions").setIsRewound(this.$15,!c);b("LiveRewindUtils").logLiveRewindEvent("scrubber",this.$15,d,null,null,a)}}this.$20&&(a+=this.$20);this.$15.seek(a,"user_initiated");this.$79=a;c=this.$62||this.$15.isState("finished")&&!this.$46;!this.isCasting()&&c&&this.$15.play("seek_initiated")};c.toggleMuted=function(){this.$15.isMuted()?(b("logVideosClickTracking")(this.$15.getVideoNode()),this.$15.unmute()):this.$15.mute()};c.toggleFullscreen=function(){this.$15.isFullscreen()||b("logVideosClickTracking")(this.$15.getVideoNode()),this.$15.toggleFullscreen()};c.toggleSubtitles=function(){this.$15.toggleSubtitles(),this.scheduleRenderReactComponent()};c.changeVolume=function(a){this.$15.setVolume(a)};c.liveRewindToBeginning=function(){b("LiveRewindUtils").goToBeginning(this.$15)};c.liveRewindSeekBack=function(){b("LiveRewindUtils").seekBack(this.$15)};c.liveRewindSeekForward=function(){b("LiveRewindUtils").seekForward(this.$15)};c.liveRewindToLive=function(){b("LiveRewindUtils").goToLive(this.$15)};c.play=function(){b("logVideosClickTracking")(this.$15.getVideoNode()),this.isCasting()?this.$15.setOption("casting","isPlaying",!0):this.$15.play("user_initiated"),this.$57&&this.$59&&b("LiveRewindUtils").logLiveRewindEvent("play",this.$15,this.$66,null,this.$66,null)};c.pause=function(){this.isCasting()?this.$15.setOption("casting","isPlaying",!1):this.$15.pause("user_initiated"),this.$57&&this.$59&&(b("LiveVideoPlayerActions").setIsRewound(this.$15,!0),b("LiveRewindUtils").logLiveRewindEvent("pause",this.$15,this.$66,null,this.$66,null))};c.setVideoPlaybackRate=function(a){this.$15.setPlaybackRate(a)};c.startCasting=function(){this.$15.setOption("casting","isCasting",!0)};c.stopCasting=function(){this.$15.setOption("casting","isCasting",!1)};c.isCastPlaying=function(){return this.$15.getOption("casting","isPlaying")};c.hasFoundReceiver=function(){return this.$15.getOption("casting","hasFoundReceiver")};c.isCasting=function(){return this.$15.getOption("casting","isCasting")};c.isCastingSupported=function(){return this.$15.getOption("casting","isSupported")};c.updatePointsOfInterestConfig=function(a){Object.assign(this.$80,a),this.scheduleRenderReactComponent()};c.updateDisplayElapsedTime=function(a){this.$17=a,this.scheduleRenderReactComponent()};c.updateDisplayTimeRangeConfig=function(a){this.$19=a.displayDurationLimit,this.$20=a.displayTimeOffset,this.scheduleRenderReactComponentWithVideoInfoUpdate()};c.getIsInChannel=function(){return this.$15.getIsInChannel()};c.unregister=function(){b("cancelAnimationFrame")(this.$85),this.$103.release()};return a}();e.exports=a}),null);