芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/video-react/dist/video-react.full.min.js
(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):(e=e||self,t(e["video-react"]={},e.React,e.ReactDOM))})(this,function(e,t,a){'use strict';function n(e,t){for(var a,n=0;n
o?"0"+o:o)+":",n=10>n?"0"+n:n,r+o+n}function k(e){return!!(e.props&&e.props.isVideoChild)||"source"===e.type||"track"===e.type}function T(t,a,n,o){void 0===o&&(o=1);var l=j.Children.toArray(a),d=n.order,s=i(n,["order"]);return l.filter(function(t){return!t.props.disabled}).concat(t.filter(function(e){return!vt(l,function(t){return gt(t,e)})})).map(function(a){var n=vt(t,function(e){return gt(e,a)}),o=n?n.props:{},l=r({},s,o,a.props),i=j.cloneElement(a,l,a.props.children);return i}).sort(function(e,t){return(e.props.order||o)-(t.props.order||o)})}function N(e,t){console.warn("WARNING: "+e+" will be deprecated soon! Please use "+t+" instead.")}function S(e,t){var a=arguments,n=!1;return function(){n||(e.apply(void 0,a),n=!0,setTimeout(function(){n=!1},t))}}function A(e){var a,t=Math.round;if(e.getBoundingClientRect&&e.parentNode&&(a=e.getBoundingClientRect()),!a)return{left:0,top:0};var n=document,o=n.body,r=n.documentElement,l=r.clientLeft||o.clientLeft||0,i=window.pageXOffset||o.scrollLeft,d=a.left+i-l,s=r.clientTop||o.clientTop||0,c=window.pageYOffset||o.scrollTop,p=a.top+c-s;return{left:t(d),top:t(p)}}function M(e,t){var a=Math.max,n=Math.min,o={},r=A(e),l=e.offsetWidth,i=e.offsetHeight,d=r.top,s=r.left,c=t.pageY,p=t.pageX;return t.changedTouches&&(p=t.changedTouches[0].pageX,c=t.changedTouches[0].pageY),o.y=a(0,n(1,(d-c+i)/i)),o.x=a(0,n(1,(p-s)/l)),o}function D(e){var t=a.findDOMNode(e);t&&t.focus&&t.focus()}function w(e,t){for(var a=e.className.split(" "),n=0;n
n&&(r=n),l.width=t(r,n);for(var d=[],s=0;s
n;n++)a["_"+e(n)]=n;var o=Object.getOwnPropertyNames(a).map(function(e){return a[e]});if("0123456789"!==o.join(""))return!1;var r={};return["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"].forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e){for(var t,a,n=p(e),o=1;o
e&&(a=0),1
e&&(e=0),this.video.volume=e}},{key:"videoWidth",get:function(){return this.video.videoWidth}},{key:"videoHeight",get:function(){return this.video.videoHeight}}]),t}(t.Component);ft.propTypes=Et,ft.displayName="Video";var Ct={manager:Qe.object,className:Qe.string},Pt=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.timer=null,t.manager.subscribeToOperationStateChange(n.handleStateChange.bind(d(n))),n.state={hidden:!0,operation:{}},n}l(t,e);var a=t.prototype;return a.handleStateChange=function(e,t){var a=this;e.count!==t.count&&"shortcut"===e.operation.source&&(this.timer&&(clearTimeout(this.timer),this.timer=null),this.setState({hidden:!1,count:e.count,operation:e.operation}),this.timer=setTimeout(function(){a.setState({hidden:!0}),a.timer=null},500))},a.render=function(){if("shortcut"!==this.state.operation.source)return null;var e=this.state.hidden?{display:"none"}:null;return j.createElement("div",{className:et({"video-react-bezel":!0,"video-react-bezel-animation":0==this.state.count%2,"video-react-bezel-animation-alt":1==this.state.count%2},this.props.className),style:e,role:"status","aria-label":this.state.operation.action},j.createElement("div",{className:et("video-react-bezel-icon","video-react-bezel-icon-"+this.state.operation.action)}))},t}(t.Component);Pt.propTypes=Ct,Pt.displayName="Bezel";var kt={clickable:Qe.bool,dblclickable:Qe.bool,manager:Qe.object,actions:Qe.object,player:Qe.object,shortcuts:Qe.array},Tt=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.defaultShortcuts=[{keyCode:32,handle:n.togglePlay},{keyCode:75,handle:n.togglePlay},{keyCode:70,handle:n.toggleFullscreen},{keyCode:37,handle:function(e,t){e.hasStarted&&t.replay(5,{action:"replay-5",source:"shortcut"})}},{keyCode:74,handle:function(e,t){e.hasStarted&&t.replay(10,{action:"replay-10",source:"shortcut"})}},{keyCode:39,handle:function(e,t){e.hasStarted&&t.forward(5,{action:"forward-5",source:"shortcut"})}},{keyCode:76,handle:function(e,t){e.hasStarted&&t.forward(10,{action:"forward-10",source:"shortcut"})}},{keyCode:36,handle:function(e,t){e.hasStarted&&t.seek(0)}},{keyCode:35,handle:function(e,t){e.hasStarted&&t.seek(e.duration)}},{keyCode:38,handle:function(e,t){var a=e.volume+.05;1
a&&(a=0);var n=0
=a?a=.25:1>=a?a=.5:1.25>=a?a=1:1.5>=a?a=1.25:2>=a&&(a=1.5),t.changeRate(a,{action:"fast-rewind",source:"shortcut"})}}],n.shortcuts=[].concat(n.defaultShortcuts),n.mergeShortcuts=n.mergeShortcuts.bind(d(n)),n.handleKeyPress=n.handleKeyPress.bind(d(n)),n.handleClick=n.handleClick.bind(d(n)),n.handleDoubleClick=n.handleDoubleClick.bind(d(n)),n}l(t,e);var a=t.prototype;return a.componentDidMount=function(){this.mergeShortcuts(),document.addEventListener("keydown",this.handleKeyPress),document.addEventListener("click",this.handleClick),document.addEventListener("dblclick",this.handleDoubleClick)},a.componentDidUpdate=function(e){e.shortcuts!==this.props.shortcuts&&this.mergeShortcuts()},a.componentWillUnmount=function(){document.removeEventListener("keydown",this.handleKeyPress),document.removeEventListener("click",this.handleClick),document.removeEventListener("dblclick",this.handleDoubleClick)},a.mergeShortcuts=function(){var e=function(e){var t=e.keyCode,a=void 0===t?0:t,n=e.ctrl,o=e.shift,r=e.alt;return a+":"+(void 0!==n&&n)+":"+(void 0!==o&&o)+":"+(void 0!==r&&r)},t=this.defaultShortcuts.reduce(function(t,a){var n;return Object.assign(t,(n={},n[e(a)]=a,n))},{}),a=(this.props.shortcuts||[]).reduce(function(t,a){var n=a.keyCode,o=a.handle;if(n&&"function"==typeof o){var r;return Object.assign(t,(r={},r[e(a)]=a,r))}return t},t),n=function(e){var t=0;return["ctrl","shift","alt"].forEach(function(a){e[a]&&t++}),t};this.shortcuts=Object.keys(a).map(function(e){return a[e]}).sort(function(e,t){return n(t)-n(e)})},a.togglePlay=function(e,t){e.paused?t.play({action:"play",source:"shortcut"}):t.pause({action:"pause",source:"shortcut"})},a.toggleFullscreen=function(e,t){t.toggleFullscreen(e)},a.handleKeyPress=function(t){var e=this.props,a=e.player,n=e.actions;if(a.isActive&&!(document.activeElement&&(w(document.activeElement,"video-react-control")||w(document.activeElement,"video-react-menu-button-active")||w(document.activeElement,"video-react-big-play-button")))){var o=t.keyCode||t.which,r=t.ctrlKey||t.metaKey,l=t.shiftKey,i=t.altKey,d=this.shortcuts.filter(function(e){return!!(e.keyCode&&0==e.keyCode-o)&&(void 0===e.ctrl||e.ctrl===r)&&(void 0===e.shift||e.shift===l)&&(void 0===e.alt||e.alt===i)})[0];d&&(d.handle(a,n),t.preventDefault())}},a.canBeClicked=function(t,a){return!!(t.isActive&&"VIDEO"===a.target.nodeName&&4===t.readyState)},a.handleClick=function(t){var e=this.props,a=e.player,n=e.actions,o=e.clickable;this.canBeClicked(a,t)&&o&&this.togglePlay(a,n)},a.handleDoubleClick=function(t){var e=this.props,a=e.player,n=e.actions,o=e.dblclickable;this.canBeClicked(a,t)&&o&&this.toggleFullscreen(a,n)},a.render=function(){return null},t}(t.Component);Tt.propTypes=kt,Tt.defaultProps={clickable:!0,dblclickable:!0},Tt.displayName="Shortcut";var Nt={className:Qe.string,onMouseDown:Qe.func,onMouseMove:Qe.func,stepForward:Qe.func,stepBack:Qe.func,sliderActive:Qe.func,sliderInactive:Qe.func,onMouseUp:Qe.func,onFocus:Qe.func,onBlur:Qe.func,onClick:Qe.func,getPercent:Qe.func,vertical:Qe.bool,children:Qe.node,label:Qe.string,valuenow:Qe.string,valuetext:Qe.string},St=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.handleMouseDown=n.handleMouseDown.bind(d(n)),n.handleMouseMove=n.handleMouseMove.bind(d(n)),n.handleMouseUp=n.handleMouseUp.bind(d(n)),n.handleFocus=n.handleFocus.bind(d(n)),n.handleBlur=n.handleBlur.bind(d(n)),n.handleClick=n.handleClick.bind(d(n)),n.handleKeyPress=n.handleKeyPress.bind(d(n)),n.stepForward=n.stepForward.bind(d(n)),n.stepBack=n.stepBack.bind(d(n)),n.calculateDistance=n.calculateDistance.bind(d(n)),n.getProgress=n.getProgress.bind(d(n)),n.renderChildren=n.renderChildren.bind(d(n)),n.state={active:!1},n}l(t,e);var n=t.prototype;return n.componentWillUnmount=function(){document.removeEventListener("mousemove",this.handleMouseMove,!0),document.removeEventListener("mouseup",this.handleMouseUp,!0),document.removeEventListener("touchmove",this.handleMouseMove,!0),document.removeEventListener("touchend",this.handleMouseUp,!0),document.removeEventListener("keydown",this.handleKeyPress,!0)},n.getProgress=function(){var e=this.props.getPercent;if(!e)return 0;var t=e();return("number"!=typeof t||0>t||t===1/0)&&(t=0),t},n.handleMouseDown=function(e){var t=this.props.onMouseDown;document.addEventListener("mousemove",this.handleMouseMove,!0),document.addEventListener("mouseup",this.handleMouseUp,!0),document.addEventListener("touchmove",this.handleMouseMove,!0),document.addEventListener("touchend",this.handleMouseUp,!0),this.setState({active:!0}),this.props.sliderActive&&this.props.sliderActive(e),this.handleMouseMove(e),t&&t(e)},n.handleMouseMove=function(e){var t=this.props.onMouseMove;t&&t(e)},n.handleMouseUp=function(e){var t=this.props.onMouseUp;document.removeEventListener("mousemove",this.handleMouseMove,!0),document.removeEventListener("mouseup",this.handleMouseUp,!0),document.removeEventListener("touchmove",this.handleMouseMove,!0),document.removeEventListener("touchend",this.handleMouseUp,!0),this.setState({active:!1}),this.props.sliderInactive&&this.props.sliderInactive(e),t&&t(e)},n.handleFocus=function(t){document.addEventListener("keydown",this.handleKeyPress,!0),this.props.onFocus&&this.props.onFocus(t)},n.handleBlur=function(t){document.removeEventListener("keydown",this.handleKeyPress,!0),this.props.onBlur&&this.props.onBlur(t)},n.handleClick=function(e){e.preventDefault(),this.props.onClick&&this.props.onClick(e)},n.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),e.stopPropagation(),this.stepBack()):(38===e.which||39===e.which)&&(e.preventDefault(),e.stopPropagation(),this.stepForward())},n.stepForward=function(){this.props.stepForward&&this.props.stepForward()},n.stepBack=function(){this.props.stepBack&&this.props.stepBack()},n.calculateDistance=function(e){var t=a.findDOMNode(this),n=M(t,e);return this.props.vertical?n.y:n.x},n.renderChildren=function(){var e=this.getProgress(),t=(100*e).toFixed(2)+"%";return j.Children.map(this.props.children,function(a){return j.cloneElement(a,{progress:e,percentage:t})})},n.render=function(){var e=this.props,t=e.vertical,a=e.label,n=e.valuenow,o=e.valuetext;return j.createElement("div",{className:et(this.props.className,{"video-react-slider-vertical":t,"video-react-slider-horizontal":!t,"video-react-sliding":this.state.active},"video-react-slider"),tabIndex:"0",role:"slider",onMouseDown:this.handleMouseDown,onTouchStart:this.handleMouseDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,"aria-label":a||"","aria-valuenow":n||"","aria-valuetext":o||"","aria-valuemin":0,"aria-valuemax":100},this.renderChildren())},t}(t.Component);St.propTypes=Nt,St.displayName="Slider";var At={currentTime:Qe.number,duration:Qe.number,percentage:Qe.string,className:Qe.string};R.propTypes=At,R.displayName="PlayProgressBar";var Mt={duration:Qe.number,buffered:Qe.object,className:Qe.string};F.propTypes=Mt,F.displayName="LoadProgressBar",L.propTypes={duration:Qe.number,mouseTime:Qe.object,className:Qe.string},L.displayName="MouseTimeDisplay";var Dt={player:Qe.object,mouseTime:Qe.object,actions:Qe.object,className:Qe.string},wt=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.getPercent=n.getPercent.bind(d(n)),n.getNewTime=n.getNewTime.bind(d(n)),n.stepForward=n.stepForward.bind(d(n)),n.stepBack=n.stepBack.bind(d(n)),n.handleMouseDown=n.handleMouseDown.bind(d(n)),n.handleMouseMove=n.handleMouseMove.bind(d(n)),n.handleMouseUp=n.handleMouseUp.bind(d(n)),n}l(t,e);var a=t.prototype;return a.componentDidMount=function(){},a.componentDidUpdate=function(){},a.getPercent=function(){var e=this.props.player,t=e.currentTime,a=e.seekingTime,n=e.duration,o=(a||t)/n;return 1<=o?1:o},a.getNewTime=function(e){var t=this.props.player.duration,a=this.slider.calculateDistance(e),n=a*t;return n===t?n-.1:n},a.handleMouseDown=function(){},a.handleMouseUp=function(e){var t=this.props.actions,a=this.getNewTime(e);t.seek(a),t.handleEndSeeking(a)},a.handleMouseMove=function(e){var t=this.props.actions,a=this.getNewTime(e);t.handleSeekingTime(a)},a.stepForward=function(){var e=this.props.actions;e.forward(5)},a.stepBack=function(){var e=this.props.actions;e.replay(5)},a.render=function(){var e=this,t=this.props,a=t.player,n=a.currentTime,o=a.seekingTime,r=a.duration,l=a.buffered,i=t.mouseTime,d=o||n;return j.createElement(St,{ref:function(t){e.slider=t},label:"video progress bar",className:et("video-react-progress-holder",this.props.className),valuenow:(100*this.getPercent()).toFixed(2),valuetext:P(d,r),onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,getPercent:this.getPercent,stepForward:this.stepForward,stepBack:this.stepBack},j.createElement(F,{buffered:l,currentTime:d,duration:r}),j.createElement(L,{duration:r,mouseTime:i}),j.createElement(R,{currentTime:d,duration:r}))},t}(t.Component);wt.propTypes=Dt,wt.displayName="SeekBar";var Rt={player:Qe.object,className:Qe.string},Ft=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.state={mouseTime:{time:null,position:0}},n.handleMouseMoveThrottle=n.handleMouseMove.bind(d(n)),n}l(t,e);var n=t.prototype;return n.handleMouseMove=function(e){if(e.pageX){var t=this.props.player.duration,n=a.findDOMNode(this.seekBar),o=M(n,e).x*t,r=e.pageX-A(n).left;this.setState({mouseTime:{time:o,position:r}})}},n.render=function(){var e=this,t=this.props.className;return j.createElement("div",{onMouseMove:this.handleMouseMoveThrottle,className:et("video-react-progress-control video-react-control",t)},j.createElement(wt,r({mouseTime:this.state.mouseTime,ref:function(t){e.seekBar=t}},this.props)))},t}(t.Component);Ft.propTypes=Rt,Ft.displayName="ProgressControl";var Lt={actions:Qe.object,player:Qe.object,className:Qe.string},It=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.handleClick=n.handleClick.bind(d(n)),n}l(t,e);var a=t.prototype;return a.handleClick=function(){var e=this.props,t=e.actions,a=e.player;a.paused?t.play():t.pause()},a.render=function(){var e=this,t=this.props,a=t.player,n=t.className,o=a.paused?"Play":"Pause";return j.createElement("button",{ref:function(t){e.button=t},className:et(n,{"video-react-play-control":!0,"video-react-control":!0,"video-react-button":!0,"video-react-paused":a.paused,"video-react-playing":!a.paused}),type:"button",tabIndex:"0",onClick:this.handleClick},j.createElement("span",{className:"video-react-control-text"},o))},t}(t.Component);It.propTypes=Lt,It.displayName="PlayToggle";var xt={actions:Qe.object,className:Qe.string,seconds:Qe.oneOf([5,10,30])},Ot={seconds:10},_t=function(e){var a=function(t){function a(e,a){var n;return n=t.call(this,e,a)||this,n.handleClick=n.handleClick.bind(d(n)),n}l(a,t);var n=a.prototype;return n.handleClick=function(){var t=this.props,a=t.actions,n=t.seconds;"forward"===e?a.forward(n):a.replay(n)},n.render=function(){var t=this,a=this.props,n=a.seconds,o=a.className,r=["video-react-control","video-react-button","video-react-icon"];return r.push("video-react-icon-"+e+"-"+n,"video-react-"+e+"-control"),o&&r.push(o),j.createElement("button",{ref:function(e){t.button=e},className:r.join(" "),type:"button",onClick:this.handleClick},j.createElement("span",{className:"video-react-control-text"},e+" "+n+" seconds"))},a}(t.Component);return a.propTypes=xt,a.defaultProps=Ot,a},Bt=_t("forward");Bt.displayName="ForwardControl";var Ut=_t("replay");Ut.displayName="ReplayControl";var jt={actions:Qe.object,player:Qe.object,className:Qe.string},Ht=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.handleClick=n.handleClick.bind(d(n)),n}l(t,e);var a=t.prototype;return a.handleClick=function(){var e=this.props,t=e.player,a=e.actions;a.toggleFullscreen(t)},a.render=function(){var e=this,t=this.props,a=t.player,n=t.className;return j.createElement("button",{className:et(n,{"video-react-icon-fullscreen-exit":a.isFullscreen,"video-react-icon-fullscreen":!a.isFullscreen},"video-react-fullscreen-control video-react-control video-react-button video-react-icon"),ref:function(t){e.button=t},type:"button",tabIndex:"0",onClick:this.handleClick},j.createElement("span",{className:"video-react-control-text"},"Non-Fullscreen"))},t}(t.Component);Ht.propTypes=jt,Ht.displayName="FullscreenToggle";var Kt={player:Qe.object,className:Qe.string};I.propTypes=Kt,I.displayName="RemainingTimeDisplay";var Gt={player:Qe.object,className:Qe.string};x.propTypes=Gt,x.displayName="CurrentTimeDisplay";var Vt={player:Qe.object,className:Qe.string};O.propTypes=Vt,O.displayName="DurationDisplay";var zt={separator:Qe.string,className:Qe.string};_.propTypes=zt,_.displayName="TimeDivider";var Wt={tagName:Qe.string,onClick:Qe.func.isRequired,onFocus:Qe.func,onBlur:Qe.func,className:Qe.string},Yt=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.handleClick=n.handleClick.bind(d(n)),n.handleFocus=n.handleFocus.bind(d(n)),n.handleBlur=n.handleBlur.bind(d(n)),n.handleKeypress=n.handleKeypress.bind(d(n)),n}l(t,e);var a=t.prototype;return a.handleKeypress=function(e){(32===e.which||13===e.which)&&(e.preventDefault(),this.handleClick(e))},a.handleClick=function(e){var t=this.props.onClick;t(e)},a.handleFocus=function(t){document.addEventListener("keydown",this.handleKeypress),this.props.onFocus&&this.props.onFocus(t)},a.handleBlur=function(t){document.removeEventListener("keydown",this.handleKeypress),this.props.onBlur&&this.props.onBlur(t)},a.render=function(){var e=this.props.tagName,t=r({},this.props);return delete t.tagName,delete t.className,j.createElement(e,r({className:et(this.props.className),role:"button",tabIndex:"0",onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur},t))},t}(t.Component);Yt.propTypes=Wt,Yt.defaultProps={tagName:"div"},Yt.displayName="ClickableComponent";var $t={player:Qe.object,children:Qe.any},qt=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.handleClick=n.handleClick.bind(d(n)),n}l(t,e);var a=t.prototype;return a.handleClick=function(e){e.preventDefault()},a.render=function(){var e=this.props.children;return j.createElement("div",{className:"video-react-menu",onClick:this.handleClick},j.createElement("div",{className:"video-react-menu-content"},e))},t}(t.Component);qt.propTypes=$t,qt.displayName="Popup";var Xt={inline:Qe.bool,onClick:Qe.func.isRequired,onFocus:Qe.func,onBlur:Qe.func,className:Qe.string};B.propTypes=Xt,B.defaultProps={inline:!0},B.displayName="PopupButton";var Zt={percentage:Qe.string,vertical:Qe.bool,className:Qe.string};U.propTypes=Zt,U.defaultProps={percentage:"100%",vertical:!1},U.displayName="VolumeLevel";var Jt={actions:Qe.object,player:Qe.object,className:Qe.string,onFocus:Qe.func,onBlur:Qe.func},Qt=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.state={percentage:"0%"},n.handleMouseMove=n.handleMouseMove.bind(d(n)),n.handlePercentageChange=n.handlePercentageChange.bind(d(n)),n.checkMuted=n.checkMuted.bind(d(n)),n.getPercent=n.getPercent.bind(d(n)),n.stepForward=n.stepForward.bind(d(n)),n.stepBack=n.stepBack.bind(d(n)),n.handleFocus=n.handleFocus.bind(d(n)),n.handleBlur=n.handleBlur.bind(d(n)),n.handleClick=n.handleClick.bind(d(n)),n}l(t,e);var a=t.prototype;return a.componentDidMount=function(){},a.getPercent=function(){var e=this.props.player;return e.muted?0:e.volume},a.checkMuted=function(){var e=this.props,t=e.player,a=e.actions;t.muted&&a.mute(!1)},a.handleMouseMove=function(e){var t=this.props.actions;this.checkMuted();var a=this.slider.calculateDistance(e);t.changeVolume(a)},a.stepForward=function(){var e=this.props,t=e.player,a=e.actions;this.checkMuted(),a.changeVolume(t.volume+.1)},a.stepBack=function(){var e=this.props,t=e.player,a=e.actions;this.checkMuted(),a.changeVolume(t.volume-.1)},a.handleFocus=function(t){this.props.onFocus&&this.props.onFocus(t)},a.handleBlur=function(t){this.props.onBlur&&this.props.onBlur(t)},a.handlePercentageChange=function(e){e!==this.state.percentage&&this.setState({percentage:e})},a.handleClick=function(e){e.stopPropagation()},a.render=function(){var e=this,t=this.props,a=t.player,n=t.className,o=(100*a.volume).toFixed(2);return j.createElement(St,r({ref:function(t){e.slider=t},label:"volume level",valuenow:o,valuetext:o+"%",onMouseMove:this.handleMouseMove,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,sliderActive:this.handleFocus,sliderInactive:this.handleBlur,getPercent:this.getPercent,onPercentageChange:this.handlePercentageChange,stepForward:this.stepForward,stepBack:this.stepBack},this.props,{className:et(n,"video-react-volume-bar video-react-slider-bar")}),j.createElement(U,this.props))},t}(t.Component);Qt.propTypes=Jt,Qt.displayName="VolumeBar";var ea={player:Qe.object,actions:Qe.object,vertical:Qe.bool,className:Qe.string,alwaysShowVolume:Qe.bool},ta=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.state={active:!1},n.handleClick=n.handleClick.bind(d(n)),n.handleFocus=n.handleFocus.bind(d(n)),n.handleBlur=n.handleBlur.bind(d(n)),n}l(t,e);var a=t.prototype;return a.handleClick=function(){var e=this.props,t=e.player,a=e.actions;a.mute(!t.muted)},a.handleFocus=function(){this.setState({active:!0})},a.handleBlur=function(){this.setState({active:!1})},a.render=function(){var e=this.props,t=e.vertical,a=e.player,n=e.className,o=this.volumeLevel;return j.createElement(B,{className:et(n,{"video-react-volume-menu-button-vertical":t,"video-react-volume-menu-button-horizontal":!t,"video-react-vol-muted":a.muted,"video-react-vol-0":0===o&&!a.muted,"video-react-vol-1":1===o,"video-react-vol-2":2===o,"video-react-vol-3":3===o,"video-react-slider-active":this.props.alwaysShowVolume||this.state.active,"video-react-lock-showing":this.props.alwaysShowVolume||this.state.active},"video-react-volume-menu-button"),onClick:this.handleClick,inline:!t},j.createElement(Qt,r({onFocus:this.handleFocus,onBlur:this.handleBlur},this.props)))},o(t,[{key:"volumeLevel",get:function(){var e=this.props.player,t=e.volume,a=e.muted,n=3;return 0===t||a?n=0:.33>t?n=1:.67>t&&(n=2),n}}]),t}(t.Component);ta.propTypes=ea,ta.defaultProps={vertical:!1},ta.displayName="VolumeMenuButton";var aa={children:Qe.any},na=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.handleClick=n.handleClick.bind(d(n)),n}l(t,e);var a=t.prototype;return a.handleClick=function(e){e.preventDefault()},a.render=function(){return j.createElement("div",{className:"video-react-menu video-react-lock-showing",role:"presentation",onClick:this.handleClick},j.createElement("ul",{className:"video-react-menu-content"},this.props.children))},t}(t.Component);na.propTypes=aa,na.displayName="Menu";var oa={item:Qe.object,index:Qe.number,activateIndex:Qe.number,onSelectItem:Qe.func},ra=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.handleClick=n.handleClick.bind(d(n)),n}l(t,e);var a=t.prototype;return a.handleClick=function(){var e=this.props,t=e.index,a=e.onSelectItem;a(t)},a.render=function(){var e=this.props,t=e.item,a=e.index,n=e.activateIndex;return j.createElement("li",{className:et({"video-react-menu-item":!0,"video-react-selected":a===n}),role:"menuitem",onClick:this.handleClick},t.label,j.createElement("span",{className:"video-react-control-text"}))},t}(t.Component);ra.propTypes=oa,ra.displayName="MenuItem";var la={inline:Qe.bool,items:Qe.array,className:Qe.string,onSelectItem:Qe.func,children:Qe.any,selectedIndex:Qe.number},ia=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.state={active:!1,activateIndex:t.selectedIndex||0},n.commitSelection=n.commitSelection.bind(d(n)),n.activateMenuItem=n.activateMenuItem.bind(d(n)),n.handleClick=n.handleClick.bind(d(n)),n.renderMenu=n.renderMenu.bind(d(n)),n.handleFocus=n.handleFocus.bind(d(n)),n.handleBlur=n.handleBlur.bind(d(n)),n.handleUpArrow=n.handleUpArrow.bind(d(n)),n.handleDownArrow=n.handleDownArrow.bind(d(n)),n.handleEscape=n.handleEscape.bind(d(n)),n.handleReturn=n.handleReturn.bind(d(n)),n.handleTab=n.handleTab.bind(d(n)),n.handleKeyPress=n.handleKeyPress.bind(d(n)),n.handleSelectItem=n.handleSelectItem.bind(d(n)),n.handleIndexChange=n.handleIndexChange.bind(d(n)),n}l(t,e);var a=t.prototype;return a.componentDidUpdate=function(e){e.selectedIndex!==this.props.selectedIndex&&this.activateMenuItem(this.props.selectedIndex)},a.commitSelection=function(e){this.setState({activateIndex:e,active:!1}),this.handleIndexChange(e)},a.activateMenuItem=function(e){this.setState({activateIndex:e}),this.handleIndexChange(e)},a.handleIndexChange=function(e){var t=this.props.onSelectItem;t(e)},a.handleClick=function(){this.setState(function(e){return{active:!e.active}})},a.handleFocus=function(){document.addEventListener("keydown",this.handleKeyPress)},a.handleBlur=function(){this.setState({active:!1}),document.removeEventListener("keydown",this.handleKeyPress)},a.handleUpArrow=function(t){var e=this.props.items;if(this.state.active){t.preventDefault();var a=this.state.activateIndex-1;0>a&&(a=e.length?e.length-1:0),this.activateMenuItem(a)}},a.handleDownArrow=function(t){var e=this.props.items;if(this.state.active){t.preventDefault();var a=this.state.activateIndex+1;a>=e.length&&(a=0),this.activateMenuItem(a)}},a.handleTab=function(t){this.state.active&&(t.preventDefault(),this.commitSelection(this.state.activateIndex))},a.handleReturn=function(t){t.preventDefault(),this.state.active?this.commitSelection(this.state.activateIndex):this.setState({active:!0})},a.handleEscape=function(){this.setState({active:!1,activateIndex:0})},a.handleKeyPress=function(e){27===e.which?this.handleEscape(e):9===e.which?this.handleTab(e):13===e.which?this.handleReturn(e):38===e.which?this.handleUpArrow(e):40===e.which&&this.handleDownArrow(e)},a.handleSelectItem=function(e){this.commitSelection(e)},a.renderMenu=function(){var e=this;if(!this.state.active)return null;var t=this.props.items;return j.createElement(na,null,t.map(function(t,a){return j.createElement(ra,{item:t,index:a,onSelectItem:e.handleSelectItem,activateIndex:e.state.activateIndex,key:"item-"+a++})}))},a.render=function(){var e=this,t=this.props,a=t.inline,n=t.className;return j.createElement(Yt,{className:et(n,{"video-react-menu-button-inline":!!a,"video-react-menu-button-popup":!a,"video-react-menu-button-active":this.state.active},"video-react-control video-react-button video-react-menu-button"),role:"button",tabIndex:"0",ref:function(t){e.menuButton=t},onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur},this.props.children,this.renderMenu())},t}(t.Component);ia.propTypes=la,ia.displayName="MenuButton";var da={player:Qe.object,actions:Qe.object,rates:Qe.array,className:Qe.string},sa=function(e){function t(t,a){var n;return n=e.call(this,t,a)||this,n.handleSelectItem=n.handleSelectItem.bind(d(n)),n}l(t,e);var a=t.prototype;return a.handleSelectItem=function(e){var t=this.props,a=t.rates,n=t.actions;0<=e&&e