text: /*!CK:2276177129!*//*1442197911,*/
  
  if (self.CavalryLogger) { CavalryLogger.start_js(["WNek9"]); }
  
  __d('MountedContextMenu.react',['ContextualLayer.react','DOMQuery','Event','Focus','LayerHideOnEscape','PopoverMenu.react','PopoverMenuInterface','React','ReactDOM','ReactElement','ReactLayeredComponentMixin','SubscriptionsHandler','cx','isNode'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){if(c.__markCompiled)c.__markCompiled();'use strict';var v=Object.prototype.hasOwnProperty,w=o.PropTypes;function x(z,aa,ba,ca,da){var ea=ba.getContent().getBoundingClientRect(),fa=ba.getContext().getBoundingClientRect(),ga=z-fa.left,ha=aa-fa.top;switch(da){case 'left':ga-=ea.width;break;case 'center':ga-=fa.width*.5;break;case 'right':ga-=fa.width-ea.width;break;default:throw new Error('invalid alignment');}switch(ca){case 'above':break;case 'left':ga+=ea.width;ha-=ea.height*.5;break;case 'right':ga-=ea.width;ha-=ea.height*.5;break;case 'below':ha-=fa.height;break;default:throw new Error('invalid position');}return {offsetX:ga,offsetY:ha};}var y=o.createClass({displayName:'MountedContextMenu',mixins:[r],propTypes:{disableFocusOutline:w.bool,menu:function(z,aa,ba){if(!v.call(z,aa))return new Error(ba+'.'+aa+' is required');var ca=z[aa],da=ca&&ca.type;if(!(da&&da.prototype instanceof n))return new Error(aa+' must implement PopoverMenuInterface');},mountedTriggerElem:function(z,aa,ba){if(!v.call(z,aa)){return new Error(ba+'.'+aa+' is required');}else if(!u(z[aa]))return new Error(ba+'.'+aa+' must be a raw DOM node');}},getDefaultProps:function(){return {disableFocusOutline:false};},getInitialState:function(){return {shown:false,lastOpenedX:0,lastOpenedY:0,offsetX:0,offsetY:0};},_getTriggerDOMNode:function(){return this.props.mountedTriggerElem;},_getMenuDOMNode:function(){var z=this.refs.popover.getMenu();return z&&z.getRoot();},_getLayer:function(){return this.refs.menuLayer.layer;},renderLayers:function(){var z=this.props.menu,aa=z.props.onItemClick,ba=this;z=q.cloneAndReplaceProps(z,babelHelpers._extends({},z.props,{onItemClick:function(){ba.hide();return aa&&aa.apply(this,arguments);}}));return {menu:o.createElement(h,{alignment:'right',behaviors:[l],contextRef:(function(){return this._getTriggerDOMNode();}).bind(this),offsetX:this.state.offsetX,offsetY:this.state.offsetY,position:'below',ref:'menuLayer',shown:this.state.shown},o.createElement(m,{alignh:'left',menu:z,position:'below',ref:'popover'},o.createElement('div',{className:"_4345",ref:'fakeTrigger'})))};},render:function(){if(this.props.mountedTriggerElem)return null;},_updatePosition:function(z,aa){var ba=this._getLayer(),ca=ba.getOrientation(),da=ca.getPosition(),ea=ca.getAlignment(),fa=x(z,aa,ba,da,ea),ga=fa.offsetX,ha=fa.offsetY;ba.setOffsetX(ga).setOffsetY(ha);this.setState({offsetX:ga,offsetY:ha});},_onContextMenu:function(z){var aa=z.clientX,ba=z.clientY;z.preventDefault();z.stopPropagation();this.showAt(aa,ba);},_onMousedownAnywhere:function(z){var aa=this._getMenuDOMNode(),ba=aa&&i.contains(aa,z.target),ca=z.button===0;if(!(ba&&ca))this.hide();},_onRealTriggerFocus:function(){if(this.props.disableFocusOutline)k.setWithoutOutline(this._getTriggerDOMNode());},_onFakeTriggerFocus:function(){var z=this._getTriggerDOMNode();if(this.props.disableFocusOutline){k.setWithoutOutline(z);}else k.set(z);if(this.state.shown)this.hide();},_onWindowBlur:function(){this.hide();},componentDidMount:function(){var z=this._getTriggerDOMNode(),aa=p.findDOMNode(this.refs.fakeTrigger),ba=this._getLayer(),ca=this.refs.popover;this._subscriberHandler=new s();this._subscriberHandler.addSubscriptions(j.listen(z,'contextmenu',this._onContextMenu),j.listen(document.body,'mousedown',this._onMousedownAnywhere),j.listen(z,'focus',this._onRealTriggerFocus),j.listen(aa,'focus',this._onFakeTriggerFocus),j.listen(window,'blur',this._onWindowBlur),ba.subscribe('show',(function(){var da=this.state.lastOpenedX,ea=this.state.lastOpenedY;this._updatePosition(da,ea);ca.showPopover();}).bind(this)),ba.subscribe('hide',function(){ca.hidePopover();}));},componentWillUnmount:function(){this._subscriberHandler&&this._subscriberHandler.release();},show:function(){this.setState({shown:true});},showAt:function(z,aa){this.setState({lastOpenedX:z,lastOpenedY:aa});this.show();},hide:function(){this.setState({shown:false});}});f.exports=y;},null);
  __d('VideoPlayerHTML5ContextMenu.react',['ContextualLayer.react','DOMQuery','Event','Focus','FullScreen','Keys','LayerAutoFocus','LayerHideOnEscape','MountedContextMenu.react','React','ReactDOM','ReactLayeredComponentMixin','ReactXUIMenu','SubscriptionsHandler','cx','fbt','isNode'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x){if(c.__markCompiled)c.__markCompiled();'use strict';var y=Object.prototype.hasOwnProperty,z=t.Item,aa=q.PropTypes,ba=.35,ca=6,da=60,ea=q.createClass({displayName:'VideoPlayerHTML5ContextMenu',mixins:[s],propTypes:{videoElem:function(fa,ga,ha){if(!y.call(fa,ga)){return new Error(ha+'.'+ga+' is required');}else if(!x(fa[ga]))return new Error(ha+'.'+ga+' must be a raw DOM node');},paused:aa.bool,muted:aa.bool,permalinkURL:aa.string,onTogglePause:aa.func.isRequired,onToggleMute:aa.func.isRequired},getInitialState:function(){return {permalinkVisible:false,fullscreened:false,screenWidth:screen.width,screenHeight:screen.height};},componentDidMount:function(){var fa=this.refs.permalinkLayer.layer;this._subscriberHandler=new u();this._subscriberHandler.addSubscriptions(l.subscribe('changed',this._onFullScreenChanged),fa.subscribe('hide',this._onHidePermalinkOverlay),fa.subscribe('show',this._onShowPermalinkOverlay));},componentWillUnmount:function(){this._subscriberHandler&&this._subscriberHandler.release();},_onFullScreenChanged:function(){var fa=l.getFullScreenElement(),ga=this.props.videoElem,ha=!!(l.isFullScreen()&&fa&&ga&&i.contains(fa,ga));this.setState({fullscreened:ha});},_renderTogglePauseLabel:function(){if(this.props.paused){return w._("Play");}else return w._("Pause");},_renderToggleMuteLabel:function(){if(this.props.muted){return w._("Unmute");}else return w._("Mute");},_onTogglePause:function(){this.props.onTogglePause&&this.props.onTogglePause();},_onToggleMute:function(){this.props.onToggleMute&&this.props.onToggleMute();},_onShowPermalinkOverlay:function(){k.set(r.findDOMNode(this.refs.permalinkText));this.setState({permalinkVisible:true});},_onHidePermalinkOverlay:function(){this.setState({permalinkVisible:false});},_onPermalinkTextFocus:function(){r.findDOMNode(this.refs.permalinkText).select();},_onPermalinkTextKeyDown:function(fa){if(j.getKeyCode(fa)==m.ESC)this.setState({permalinkVisible:false});},_onPermalinkTextMouseUp:function(fa){fa.preventDefault();},_getVideoDimensions:function(){var fa,ga;if(this.state.fullscreened){fa=this.state.screenWidth;ga=this.state.screenHeight;}else{var ha=this.props.videoElem.getBoundingClientRect();fa=ha.width;ga=ha.height;}return {width:fa,height:ga};},_renderPermalinkLayerContent:function(fa){var ga=this.props.permalinkURL;if(ga){var ha={width:fa+'px'};return (q.createElement('div',{className:"_26oo",style:ha},q.createElement('input',{className:"_26op autofocus",onFocus:this._onPermalinkTextFocus,onKeyDown:this._onPermalinkTextKeyDown,onMouseUp:this._onPermalinkTextMouseUp,readOnly:true,ref:'permalinkText',type:'text',value:ga}),q.createElement('button',{className:"_26oq",onClick:this._onHidePermalinkOverlay},w._("Close"))));}},renderLayers:function(){var fa=this.props.permalinkURL&&this.state.permalinkVisible,ga=0,ha=0,ia=null;if(fa){var ja=this._getVideoDimensions(),ka=ja.width,la=ja.height,ma=ka*ba;ga=ka/2-ma/2;ha=-la+ca;if(this.state.fullscreened)ha+=da;ia=this._renderPermalinkLayerContent(ma);}return {permalinkOverlay:q.createElement(h,{alignment:'left',behaviors:[o,n],contextRef:(function(){return this.props.videoElem;}).bind(this),offsetX:ga,offsetY:ha,position:'below',ref:'permalinkLayer',shown:fa},ia)};},_renderPermalinkCopyOption:function(){if(this.props.permalinkURL)return (q.createElement(z,{onclick:this._onShowPermalinkOverlay,ref:'permalinkMenuItem'},w._("Get video URL")));},render:function(){var fa=q.createElement(t,null,this._renderPermalinkCopyOption(),q.createElement(z,{onclick:this._onTogglePause},this._renderTogglePauseLabel()),q.createElement(z,{onclick:this._onToggleMute},this._renderToggleMuteLabel()));return (q.createElement(p,{mountedTriggerElem:this.props.videoElem,menu:fa,ref:'menu'}));}});f.exports=ea;},null);
  __d('VideoContextMenu',['EventListener','URI','React','VideoPlayerHTML5ContextMenu.react','VideoPlayerReason'],function a(b,c,d,e,f,g,h,i,j,k,l){if(c.__markCompiled)c.__markCompiled();function m(n,o){'use strict';this.$VideoContextMenu1=n;this.$VideoContextMenu2=o;this.$VideoContextMenu3=null;if(this.$VideoContextMenu2.permalinkURL)this.$VideoContextMenu3=new i(this.$VideoContextMenu2.permalinkURL).getQualifiedURI().toString();var p=['muteVideo','unmuteVideo','changeVolume','beginPlayback','pausePlayback','finishPlayback'];p.forEach((function(q){return (n.addListener(q,(function(){return this.$VideoContextMenu4();}).bind(this)));}).bind(this));h.listen(this.$VideoContextMenu1.getVideoNode(),'contextmenu',this.$VideoContextMenu5.bind(this));}m.prototype.$VideoContextMenu4=function(){'use strict';if(this.$VideoContextMenu6)this.$VideoContextMenu7();};m.prototype.$VideoContextMenu7=function(){'use strict';var n=this.$VideoContextMenu1.getVideoNode();this.$VideoContextMenu6=j.render(j.createElement(k,{videoElem:n,paused:!this.$VideoContextMenu1.isState('playing'),muted:this.$VideoContextMenu1.isMuted(),permalinkURL:this.$VideoContextMenu3,onTogglePause:this.$VideoContextMenu8.bind(this,l.USER),onToggleMute:this.$VideoContextMenu9.bind(this)}),n);};m.prototype.$VideoContextMenu9=function(){'use strict';if(this.$VideoContextMenu1.isMuted()){this.$VideoContextMenu1.unmute();}else this.$VideoContextMenu1.mute();};m.prototype.$VideoContextMenu8=function(n){'use strict';if(!this.$VideoContextMenu1.isState('playing')){this.$VideoContextMenu1.play(n);}else this.$VideoContextMenu1.pause(n);};m.prototype.$VideoContextMenu5=function(n){'use strict';if(!this.$VideoContextMenu6){n.preventDefault();this.$VideoContextMenu7();}};f.exports=m;},null);