(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4e766319"],{"0335":function(t,e,n){(function(e){var r,i="undefined"!==typeof e?e:"undefined"!==typeof window?window:{},o=n(1);"undefined"!==typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o)),t.exports=r}).call(this,n("c8ba"))},"0630":function(t,e){function n(t,e){var n,r=null;try{n=JSON.parse(t,e)}catch(i){r=i}return[r,n]}t.exports=n},"07d6":function(t,e,n){},1:function(t,e){},"1eba":function(t,e){t.exports=r;var n=Object.prototype.hasOwnProperty;function r(){for(var t={},e=0;e=0&&t<=100}function o(){var t=100,e=3,n=0,o=100,s=0,a=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!i(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!==typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!i(t))throw new Error("RegionAnchorX must be between 0 and 100.");o=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!i(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(t){if(!i(t))throw new Error("ViewportAnchorY must be between 0 and 100.");a=t}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(t){if(!i(t))throw new Error("ViewportAnchorX must be between 0 and 100.");s=t}},scroll:{enumerable:!0,get:function(){return l},set:function(t){var e=r(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");l=e}}})}t.exports=o},"4dab":function(t,e){var n=function(t){return t.replace(/^\s+|\s+$/g,"")},r=function(t){return"[object Array]"===Object.prototype.toString.call(t)};t.exports=function(t){if(!t)return{};for(var e={},i=n(t).split("\n"),o=0;o * Copyright Brightcove, Inc. * Available under Apache License Version 2.0 * * * Includes vtt.js * Available under Apache License Version 2.0 * */ function r(t){return t&&"object"===typeof t&&"default"in t?t["default"]:t}var i=r(n("ecdc")),o=r(n("0335")),s=r(n("1f90")),a=r(n("0630")),l=r(n("eaf9")),c=r(n("edcb")),u="6.12.1",h=i.navigator&&i.navigator.userAgent||"",p=/AppleWebKit\/([\d.]+)/i.exec(h),d=p?parseFloat(p.pop()):null,f=/iPad/i.test(h),v=/iPhone/i.test(h)&&!f,y=/iPod/i.test(h),g=v||f||y,m=function(){var t=h.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),_=/Android/i.test(h),b=function(){var t=h.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),T=_&&/webkit/i.test(h)&&b<2.3,C=_&&b<5&&d<537,k=/Firefox/i.test(h),w=/Edge/i.test(h),E=!w&&(/Chrome/i.test(h)||/CriOS/i.test(h)),S=function(){var t=h.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),x=/MSIE\s8\.0/.test(h),j=function(){var t=/MSIE\s(\d+)\.\d/.exec(h),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(h)&&/rv:11.0/.test(h)&&(e=11),e}(),A=/Safari/i.test(h)&&!E&&!_&&!w,P=(A||g)&&!E,O=nt()&&("ontouchstart"in i||i.navigator.maxTouchPoints||i.DocumentTouch&&i.document instanceof i.DocumentTouch),M=nt()&&"backgroundSize"in i.document.createElement("video").style,N=(Object.freeze||Object)({IS_IPAD:f,IS_IPHONE:v,IS_IPOD:y,IS_IOS:g,IOS_VERSION:m,IS_ANDROID:_,ANDROID_VERSION:b,IS_OLD_ANDROID:T,IS_NATIVE_ANDROID:C,IS_FIREFOX:k,IS_EDGE:w,IS_CHROME:E,CHROME_VERSION:S,IS_IE8:x,IE_VERSION:j,IS_SAFARI:A,IS_ANY_SAFARI:P,TOUCH_ENABLED:O,BACKGROUND_SIZE_SUPPORTED:M}),I="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},L=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},R=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e},B=function(t,e){return t.raw=e,t},F=Object.prototype.toString,H=function(t){return U(t)?Object.keys(t):[]};function V(t,e){H(t).forEach((function(n){return e(t[n],n)}))}function z(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return H(t).reduce((function(n,r){return e(n,t[r],r)}),n)}function W(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:!!j&&j<11,r=X.levels[q],o=new RegExp("^("+r+")$");if("log"!==t&&e.unshift(t.toUpperCase()+":"),K&&K.push([].concat(e)),e.unshift("VIDEOJS:"),i.console){var s=i.console[t];s||"debug"!==t||(s=i.console.info||i.console.log),s&&r&&o.test(t)&&(n&&(e=e.map((function(t){if(U(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(e){return String(t)}return String(t)})).join(" ")),s.apply?s[Array.isArray(e)?"apply":"call"](i.console,e):s(e))}};X=function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=o.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(G.warn(s(Q,t,n)),i.setAttribute(t,n)):"textContent"===t?at(i,n):i[t]=n})),Object.getOwnPropertyNames(n).forEach((function(t){i.setAttribute(t,n[t])})),r&&St(i,r),i}function at(t,e){return"undefined"===typeof t.textContent?t.innerText=e:t.textContent=e,t}function lt(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function ct(t,e){return tt(e),t.classList?t.classList.contains(e):et(e).test(t.className)}function ut(t,e){return t.classList?t.classList.add(e):ct(t,e)||(t.className=(t.className+" "+e).trim()),t}function ht(t,e){return t.classList?t.classList.remove(e):(tt(e),t.className=t.className.split(/\s+/).filter((function(t){return t!==e})).join(" ")),t}function pt(t,e,n){var r=ct(t,e);if("function"===typeof n&&(n=n(t,e)),"boolean"!==typeof n&&(n=!r),n!==r)return n?ut(t,e):ht(t,e),t}function dt(t,e){Object.getOwnPropertyNames(e).forEach((function(n){var r=e[n];null===r||"undefined"===typeof r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)}))}function ft(t){var e={},n=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&t.attributes.length>0)for(var r=t.attributes,i=r.length-1;i>=0;i--){var o=r[i].name,s=r[i].value;"boolean"!==typeof t[o]&&-1===n.indexOf(","+o+",")||(s=null!==s),e[o]=s}return e}function vt(t,e){return t.getAttribute(e)}function yt(t,e,n){t.setAttribute(e,n)}function gt(t,e){t.removeAttribute(e)}function mt(){o.body.focus(),o.onselectstart=function(){return!1}}function _t(){o.onselectstart=function(){return!0}}function bt(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),n.height||(n.height=parseFloat(J(t,"height"))),n.width||(n.width=parseFloat(J(t,"width"))),n}}function Tt(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var n=o.documentElement,r=o.body,s=n.clientLeft||r.clientLeft||0,a=i.pageXOffset||r.scrollLeft,l=e.left+a-s,c=n.clientTop||r.clientTop||0,u=i.pageYOffset||r.scrollTop,h=e.top+u-c;return{left:Math.round(l),top:Math.round(h)}}function Ct(t,e){var n={},r=Tt(t),i=t.offsetWidth,o=t.offsetHeight,s=r.top,a=r.left,l=e.pageY,c=e.pageX;return e.changedTouches&&(c=e.changedTouches[0].pageX,l=e.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(s-l+o)/o)),n.x=Math.max(0,Math.min(1,(c-a)/i)),n}function kt(t){return U(t)&&3===t.nodeType}function wt(t){while(t.firstChild)t.removeChild(t.firstChild);return t}function Et(t){return"function"===typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"===typeof t&&(t=t()),rt(t)||kt(t)?t:"string"===typeof t&&/\S/.test(t)?o.createTextNode(t):void 0})).filter((function(t){return t}))}function St(t,e){return Et(e).forEach((function(e){return t.appendChild(e)})),t}function xt(t,e){return St(wt(t),e)}function jt(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||(9===j||0===t.button&&1===t.buttons))}var At=ot("querySelector"),Pt=ot("querySelectorAll"),Ot=(Object.freeze||Object)({isReal:nt,isEl:rt,isInFrame:it,createEl:st,textContent:at,prependTo:lt,hasClass:ct,addClass:ut,removeClass:ht,toggleClass:pt,setAttributes:dt,getAttributes:ft,getAttribute:vt,setAttribute:yt,removeAttribute:gt,blockTextSelection:mt,unblockTextSelection:_t,getBoundingClientRect:bt,findPosition:Tt,getPointerPosition:Ct,isTextNode:kt,emptyEl:wt,normalizeContent:Et,appendContent:St,insertContent:xt,isSingleLeftClick:jt,$:At,$$:Pt}),Mt=1;function Nt(){return Mt++}var It={},Dt="vdata"+(new Date).getTime();function Lt(t){var e=t[Dt];return e||(e=t[Dt]=Nt()),It[e]||(It[e]={}),It[e]}function Rt(t){var e=t[Dt];return!!e&&!!Object.getOwnPropertyNames(It[e]).length}function Bt(t){var e=t[Dt];if(e){delete It[e];try{delete t[Dt]}catch(n){t.removeAttribute?t.removeAttribute(Dt):t[Dt]=null}}}function Ft(t,e){var n=Lt(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Bt(t)}function Ht(t,e,n,r){n.forEach((function(n){t(e,n,r)}))}function Vt(t){function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||i.event;for(var s in t={},r)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&r.preventDefault||(t[s]=r[s]));if(t.target||(t.target=t.srcElement||o),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var a=o.documentElement,l=o.body;t.pageX=t.clientX+(a&&a.scrollLeft||l&&l.scrollLeft||0)-(a&&a.clientLeft||l&&l.clientLeft||0),t.pageY=t.clientY+(a&&a.scrollTop||l&&l.scrollTop||0)-(a&&a.clientTop||l&&l.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}var zt=!1;(function(){try{var t=Object.defineProperty({},"passive",{get:function(){zt=!0}});i.addEventListener("test",null,t),i.removeEventListener("test",null,t)}catch(e){}})();var Wt=["touchstart","touchmove"];function Ut(t,e,n){if(Array.isArray(e))return Ht(Ut,t,e,n);var r=Lt(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=Nt()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(e,n){if(!r.disabled){e=Vt(e);var i=r.handlers[e.type];if(i)for(var o=i.slice(0),s=0,a=o.length;s-1&&(i={passive:!0}),t.addEventListener(e,r.dispatcher,i)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function $t(t,e,n){if(Rt(t)){var r=Lt(t);if(r.handlers){if(Array.isArray(e))return Ht($t,t,e,n);var i=function(t,e){r.handlers[e]=[],Ft(t,e)};if(void 0!==e){var o=r.handlers[e];if(o)if(n){if(n.guid)for(var s=0;s0)for(var i=0,s=t.length;i0)for(var a=0,l=e.length;a0)for(var c=0,u=n.length;c0)for(var h=0,p=r.length;h=e&&(t.apply(void 0,arguments),n=r)};return r},re=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i,o=void 0;return function(){var i=this,s=arguments,a=function(){o=null,a=null,n||t.apply(i,s)};!o&&n&&t.apply(i,s),r.clearTimeout(o),o=r.setTimeout(a,e)}},ie=function(){};ie.prototype.allowedEvents_={},ie.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},Ut(this,t,e),this.addEventListener=n},ie.prototype.addEventListener=ie.prototype.on,ie.prototype.off=function(t,e){$t(this,t,e)},ie.prototype.removeEventListener=ie.prototype.off,ie.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},qt(this,t,e),this.addEventListener=n},ie.prototype.trigger=function(t){var e=t.type||t;"string"===typeof t&&(t={type:e}),t=Vt(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),Xt(this,t)},ie.prototype.dispatchEvent=ie.prototype.trigger;var oe=function(t){return t instanceof ie||!!t.eventBusEl_&&["on","one","off","trigger"].every((function(e){return"function"===typeof t[e]}))},se=function(t){return"string"===typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},ae=function(t){if(!t.nodeName&&!oe(t))throw new Error("Invalid target; must be a DOM node or evented object.")},le=function(t){if(!se(t))throw new Error("Invalid event type; must be a non-empty string or array.")},ce=function(t){if("function"!==typeof t)throw new Error("Invalid listener; must be a function.")},ue=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,e.length>=3&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),ae(r),le(i),ce(o),o=ee(t,o),{isTargetingSelf:n,target:r,type:i,listener:o}},he=function(t,e,n,r){ae(t),t.nodeName?Kt[e](t,n,r):t[e](n,r)},pe={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=st("span",{className:"vjs-event-bus"});return W(t,pe),t.on("dispose",(function(){t.off(),i.setTimeout((function(){t.eventBusEl_=null}),0)})),t}var fe={state:{},setState:function(t){var e=this;"function"===typeof t&&(t=t());var n=void 0;return V(t,(function(t,r){e.state[r]!==t&&(n=n||{},n[r]={from:e.state[r],to:t}),e.state[r]=t})),n&&oe(this)&&this.trigger({changes:n,type:"statechanged"}),n}};function ve(t,e){return W(t,fe),t.state=W({},t.state,e),"function"===typeof t.handleStateChanged&&oe(t)&&t.on("statechanged",t.handleStateChanged),t}function ye(t){return"string"!==typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function ge(t,e){return ye(t)===ye(e)}function me(){for(var t={},e=arguments.length,n=Array(e),r=0;r=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Bt(this.el_),this.el_=null),this.player_=null},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return G.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=me(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,n){return st(t,e,n)},t.prototype.localize=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],s=r&&r.split("-")[0],a=i&&i[s],l=n;return o&&o[t]?l=o[t]:a&&a[t]&&(l=a[t]),e&&(l=l.replace(/\{(\d+)\}/g,(function(t,n){var r=e[n-1],i=r;return"undefined"===typeof r&&(i=t),i}))),l},t.prototype.contentEl=function(){return this.contentEl_||this.el_},t.prototype.id=function(){return this.id_},t.prototype.name=function(){return this.name_},t.prototype.children=function(){return this.children_},t.prototype.getChildById=function(t){return this.childIndex_[t]},t.prototype.getChild=function(t){if(t)return t=ye(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=void 0,o=void 0;if("string"===typeof e){o=ye(e);var s=n.componentClass||o;n.name=o;var a=t.getComponent(s);if(!a)throw new Error("Component "+s+" does not exist");if("function"!==typeof a)return null;i=new a(this.player_||this,n)}else i=e;if(this.children_.splice(r,0,i),"function"===typeof i.id&&(this.childIndex_[i.id()]=i),o=o||i.name&&ye(i.name()),o&&(this.childNameIndex_[o]=i),"function"===typeof i.el&&i.el()){var l=this.contentEl().children,c=l[r]||null;this.contentEl().insertBefore(i.el(),c)}return i},t.prototype.removeChild=function(t){if("string"===typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,n=this.options_.children;if(n){var r=this.options_,i=function(t){var n=t.name,i=t.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=e.options_.playerOptions;var o=e.addChild(n,i);o&&(e[n]=o)}},o=void 0,s=t.getComponent("Tech");o=Array.isArray(n)?n:Object.keys(n),o.concat(Object.keys(this.options_).filter((function(t){return!o.some((function(e){return"string"===typeof e?t===e:t===e.name}))}))).map((function(t){var r=void 0,i=void 0;return"string"===typeof t?(r=t,i=n[r]||e.options_[r]||{}):(r=t.name,i=t),{name:r,opts:i}})).filter((function(e){var n=t.getComponent(e.opts.componentClass||ye(e.name));return n&&!s.isTech(n)})).forEach(i)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},t.prototype.$=function(t,e){return At(t,e||this.contentEl())},t.prototype.$$=function(t,e){return Pt(t,e||this.contentEl())},t.prototype.hasClass=function(t){return ct(this.el_,t)},t.prototype.addClass=function(t){ut(this.el_,t)},t.prototype.removeClass=function(t){ht(this.el_,t)},t.prototype.toggleClass=function(t,e){pt(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return vt(this.el_,t)},t.prototype.setAttribute=function(t,e){yt(this.el_,t,e)},t.prototype.removeAttribute=function(t){gt(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,n){if(void 0!==e)return null!==e&&e===e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+ye(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"===typeof i.getComputedStyle){var n=i.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(e=parseFloat(e),0===e){var r="offset"+ye(t);e=this.el_[r]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,n=10,r=200,i=void 0;this.on("touchstart",(function(n){1===n.touches.length&&(e={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=(new Date).getTime(),i=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)i=!1;else if(e){var r=t.touches[0].pageX-e.pageX,o=t.touches[0].pageY-e.pageY,s=Math.sqrt(r*r+o*o);s>n&&(i=!1)}}));var o=function(){i=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",(function(n){if(e=null,!0===i){var o=(new Date).getTime()-t;o0&&c.map((function(t){return l[t]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,n},t.getComponent=function(e){if(e)return e=ye(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();function be(t,e,n){if("number"!==typeof e||e<0||e>n)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}function Te(t,e,n,r){return be(t,r,n.length-1),n[r][e]}function Ce(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:Te.bind(null,"start",0,t),end:Te.bind(null,"end",1,t)}}function ke(t,e){return Array.isArray(t)?Ce(t):void 0===t||void 0===e?Ce():Ce([[t,e]])}function we(t,e){var n=0,r=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=ke(0,0));for(var o=0;oe&&(i=e),n+=i-r;return n/e}_e.prototype.supportsRaf_="function"===typeof i.requestAnimationFrame&&"function"===typeof i.cancelAnimationFrame,_e.registerComponent("Component",_e);for(var Ee={},Se=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],xe=Se[0],je=void 0,Ae=0;Ae0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;D(this,e);var s=R(this,t.call(this));if(!i&&(i=s,x))for(var a in i=o.createElement("custom"),e.prototype)"constructor"!==a&&(i[a]=e.prototype[a]);i.tracks_=[],Object.defineProperty(i,"length",{get:function(){return this.tracks_.length}});for(var l=0;l0&&void 0!==arguments[0]?arguments[0]:[];D(this,e);for(var s=void 0,a=i.length-1;a>=0;a--)if(i[a].enabled){Ue(i,i[a]);break}if(x){for(var l in s=o.createElement("custom"),ze.prototype)"constructor"!==l&&(s[l]=ze.prototype[l]);for(var c in e.prototype)"constructor"!==c&&(s[c]=e.prototype[c])}return n=R(this,t.call(this,i,s)),s=n,s.changing_=!1,r=s,R(n,r)}return L(e,t),e.prototype.addTrack=function(e){var n=this;e.enabled&&Ue(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",(function(){n.changing_||(n.changing_=!0,Ue(n,e),n.changing_=!1,n.trigger("change"))}))},e}(ze),Xe=function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];D(this,e);for(var s=void 0,a=i.length-1;a>=0;a--)if(i[a].selected){Xe(i,i[a]);break}if(x){for(var l in s=o.createElement("custom"),ze.prototype)"constructor"!==l&&(s[l]=ze.prototype[l]);for(var c in e.prototype)"constructor"!==c&&(s[c]=e.prototype[c])}return n=R(this,t.call(this,i,s)),s=n,s.changing_=!1,Object.defineProperty(s,"selectedIndex",{get:function(){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];D(this,e);var s=void 0;if(x){for(var a in s=o.createElement("custom"),ze.prototype)"constructor"!==a&&(s[a]=ze.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l])}return n=R(this,t.call(this,i,s)),s=n,r=s,R(n,r)}return L(e,t),e.prototype.addTrack=function(e){t.prototype.addTrack.call(this,e),e.addEventListener("modechange",ee(this,(function(){this.trigger("change")})));var n=["metadata","chapters"];-1===n.indexOf(e.kind)&&e.addEventListener("modechange",ee(this,(function(){this.trigger("selectedlanguagechange")})))},e}(ze),Ye=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];D(this,t);var n=this;if(x)for(var r in n=o.createElement("custom"),t.prototype)"constructor"!==r&&(n[r]=t.prototype[r]);n.trackElements_=[],Object.defineProperty(n,"length",{get:function(){return this.trackElements_.length}});for(var i=0,s=e.length;i0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var i=R(this,t.call(this)),s=i;if(x)for(var a in s=o.createElement("custom"),e.prototype)"constructor"!==a&&(s[a]=e.prototype[a]);var l={id:r.id||"vjs_track_"+Nt(),kind:r.kind||"",label:r.label||"",language:r.language||""},c=function(t){Object.defineProperty(s,t,{get:function(){return l[t]},set:function(){}})};for(var u in l)c(u);return n=s,R(i,n)}return L(e,t),e}(ie),nn=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=o.createElement("a");n.href=t;var r=""===n.host&&"file:"!==n.protocol,s=void 0;r&&(s=o.createElement("div"),s.innerHTML='',n=s.firstChild,s.setAttribute("style","display:none; position:absolute;"),o.body.appendChild(s));for(var a={},l=0;lx',t=e.firstChild.href}return t},on=function(t){if("string"===typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,n=e.exec(t);if(n)return n.pop().toLowerCase()}return""},sn=function(t){var e=i.location,n=nn(t),r=":"===n.protocol?e.protocol:n.protocol,o=r+n.host!==e.protocol+e.host;return o},an=(Object.freeze||Object)({parseUrl:nn,getAbsoluteURL:rn,getFileExtension:on,isCrossOrigin:sn}),ln=function(t,e){var n=new i.WebVTT.Parser(i,i.vttjs,i.WebVTT.StringDecoder()),r=[];n.oncue=function(t){e.addCue(t)},n.onparsingerror=function(t){r.push(t)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),r.length>0&&(i.console&&i.console.groupCollapsed&&i.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach((function(t){return G.error(t)})),i.console&&i.console.groupEnd&&i.console.groupEnd()),n.flush()},cn=function(t,e){var n={uri:t},r=sn(t);r&&(n.cors=r),l(n,ee(this,(function(t,n,r){if(t)return G.error(t,n);if(e.loaded_=!0,"function"!==typeof i.WebVTT){if(e.tech_){var o=function(){return ln(r,e)};e.tech_.on("vttjsloaded",o),e.tech_.on("vttjserror",(function(){G.error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",o)}))}}else ln(r,e)})))},un=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(D(this,e),!i.tech)throw new Error("A tech was not provided.");var o=me(i,{kind:Ze[i.kind]||"subtitles",language:i.language||i.srclang||""}),s=tn[o.mode]||"disabled",a=o["default"];"metadata"!==o.kind&&"chapters"!==o.kind||(s="hidden");var l=(n=R(this,t.call(this,o)),n);if(l.tech_=o.tech,x)for(var c in e.prototype)"constructor"!==c&&(l[c]=e.prototype[c]);l.cues_=[],l.activeCues_=[];var u=new Ge(l.cues_),h=new Ge(l.activeCues_),p=!1,d=ee(l,(function(){this.activeCues=this.activeCues,p&&(this.trigger("cuechange"),p=!1)}));return"disabled"!==s&&l.tech_.ready((function(){l.tech_.on("timeupdate",d)}),!0),Object.defineProperty(l,"default",{get:function(){return a},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(t){var e=this;tn[t]&&(s=t,"showing"===s&&this.tech_.ready((function(){e.tech_.on("timeupdate",d)}),!0),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?u:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return h;for(var t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n=t||i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t)&&e.push(i)}if(p=!1,e.length!==this.activeCues_.length)p=!0;else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var o=me(i,{kind:Qe[i.kind]||""}),s=(n=R(this,t.call(this,o)),n),a=!1;if(x)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return a},set:function(t){"boolean"===typeof t&&t!==a&&(a=t,this.trigger("enabledchange"))}}),o.enabled&&(s.enabled=o.enabled),s.loaded_=!0,r=s,R(n,r)}return L(e,t),e}(en),pn=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var o=me(i,{kind:Je[i.kind]||""}),s=(n=R(this,t.call(this,o)),n),a=!1;if(x)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){return a},set:function(t){"boolean"===typeof t&&t!==a&&(a=t,this.trigger("selectedchange"))}}),o.selected&&(s.selected=o.selected),r=s,R(n,r)}return L(e,t),e}(en),dn=0,fn=1,vn=2,yn=3,gn=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};D(this,e);var r=R(this,t.call(this)),i=void 0,s=r;if(x)for(var a in s=o.createElement("custom"),e.prototype)"constructor"!==a&&(s[a]=e.prototype[a]);var l,c=new un(n);return s.kind=c.kind,s.src=c.src,s.srclang=c.language,s.label=c.label,s["default"]=c["default"],Object.defineProperty(s,"readyState",{get:function(){return i}}),Object.defineProperty(s,"track",{get:function(){return c}}),i=dn,c.addEventListener("loadeddata",(function(){i=vn,s.trigger({type:"load",target:s})})),x?(l=s,R(r,l)):r}return L(e,t),e}(ie);gn.prototype.allowedEvents_={load:"load"},gn.NONE=dn,gn.LOADING=fn,gn.LOADED=vn,gn.ERROR=yn;var mn={audio:{ListClass:$e,TrackClass:hn,capitalName:"Audio"},video:{ListClass:qe,TrackClass:pn,capitalName:"Video"},text:{ListClass:Ke,TrackClass:un,capitalName:"Text"}};Object.keys(mn).forEach((function(t){mn[t].getterName=t+"Tracks",mn[t].privateName=t+"Tracks_"}));var _n={remoteText:{ListClass:Ke,TrackClass:un,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ye,TrackClass:gn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},bn=me(mn,_n);function Tn(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var s=new bn.text.TrackClass(i);return o.addTrack(s),s}_n.names=Object.keys(_n),mn.names=Object.keys(mn),bn.names=[].concat(_n.names).concat(mn.names);var Cn=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};D(this,e),n.reportTouchActivity=!1;var i=R(this,t.call(this,null,n,r));return i.hasStarted_=!1,i.on("playing",(function(){this.hasStarted_=!0})),i.on("loadstart",(function(){this.hasStarted_=!1})),bn.names.forEach((function(t){var e=bn[t];n&&n[e.getterName]&&(i[e.privateName]=n[e.getterName])})),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===n["native"+t+"Tracks"]&&(i["featuresNative"+t+"Tracks"]=!1)})),!1===n.nativeCaptions||!1===n.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.autoRemoteTextTracks_=new bn.text.ListClass,i.initTrackListeners(),n.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}return L(e,t),e.prototype.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",(function(){return e.setTimeout((function(){return e.triggerSourceset(t)}),1)})),this.trigger({src:t,type:"sourceset"})},e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ee(this,(function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()})),500)},e.prototype.onDurationChange=function(t){this.duration_=this.duration()},e.prototype.buffered=function(){return ke(0,0)},e.prototype.bufferedPercent=function(){return we(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(mn.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;t=[].concat(t),t.forEach((function(t){var n=e[t+"Tracks"]()||[],r=n.length;while(r--){var i=n[r];"text"===t&&e.removeRemoteTextTrack(i),n.removeTrack(i)}}))},e.prototype.cleanupAutoTextTracks=function(){var t=this.autoRemoteTextTracks_||[],e=t.length;while(e--){var n=t[e];this.removeRemoteTextTrack(n)}},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new Oe(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?ke(0,0):ke()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;mn.names.forEach((function(e){var n=mn[e],r=function(){t.trigger(e+"trackchange")},i=t[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),t.on("dispose",(function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)}))}))},e.prototype.addWebVttScript_=function(){var t=this;if(!i.WebVTT)if(o.body.contains(this.el())){if(!this.options_["vtt.js"]&&$(c)&&Object.keys(c).length>0)return void this.trigger("vttjsloaded");var e=o.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){e.onload=null,e.onerror=null})),i.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),n=this.remoteTextTracks(),r=function(t){return e.addTrack(t.track)},i=function(t){return e.removeTrack(t.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},s=function(){o();for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(e);return!0!==n&&!1!==n&&(G.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready((function(){return t.autoRemoteTextTracks_.addTrack(r.track)})),r},e.prototype.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},e.prototype.getVideoPlaybackQuality=function(){return{}},e.prototype.setPoster=function(){},e.prototype.playsinline=function(){},e.prototype.setPlaysinline=function(){},e.prototype.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,n){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,n){if(e.techs_||(e.techs_={}),!e.isTech(n))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=ye(t),e.techs_[t]=n,"Tech"!==t&&e.defaultTechOrder_.push(t),n},e.getTech=function(t){if(t)return t=ye(t),e.techs_&&e.techs_[t]?e.techs_[t]:i&&i.videojs&&i.videojs[t]?(G.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),i.videojs[t]):void 0},e}(_e);bn.names.forEach((function(t){var e=bn[t];Cn.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}})),Cn.prototype.featuresVolumeControl=!0,Cn.prototype.featuresMuteControl=!0,Cn.prototype.featuresFullscreenResize=!1,Cn.prototype.featuresPlaybackRate=!1,Cn.prototype.featuresProgressEvents=!1,Cn.prototype.featuresSourceset=!1,Cn.prototype.featuresTimeupdateEvents=!1,Cn.prototype.featuresNativeTextTracks=!1,Cn.withSourceHandlers=function(t){t.registerSourceHandler=function(e,n){var r=t.sourceHandlers;r||(r=t.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,e)},t.canPlayType=function(e){for(var n=t.sourceHandlers||[],r=void 0,i=0;i3&&void 0!==arguments[3]?arguments[3]:null,i="call"+ye(n),o=t.reduce(Dn(i),r),s=o===En,a=s?null:e[n](o);return Ln(t,n,a,s),a}var Mn={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},Nn={setCurrentTime:1},In={play:1,pause:1};function Dn(t){return function(e,n){return e===En?En:n[t]?n[t](e):e}}function Ln(t,e,n,r){for(var i=t.length-1;i>=0;i--){var o=t[i];o[e]&&o[e](r,n)}}function Rn(t){wn[t.id()]=null}function Bn(t,e){var n=wn[t.id()],r=null;if(void 0===n||null===n)return r=e(t),wn[t.id()]=[[e,r]],r;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],r=arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=e[0],a=e.slice(1);if("string"===typeof s)Fn(t,kn[s],n,r,i,o);else if(s){var l=Bn(r,s);if(!l.setSource)return i.push(l),Fn(t,a,n,r,i,o);l.setSource(W({},t),(function(e,s){if(e)return Fn(t,a,n,r,i,o);i.push(l),Fn(s,t.type===s.type?a:kn[s.type],n,r,i,o)}))}else a.length?Fn(t,a,n,r,i,o):o?n(t,i):Fn(t,kn["*"],n,r,i,!0)}var Hn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},Vn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=on(t),n=Hn[e.toLowerCase()];return n||""},zn=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var n=t.cache_.sources.filter((function(t){return t.src===e}));if(n.length)return n[0].type;for(var r=t.$$("source"),i=0;i0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=W({innerHTML:'',className:this.buildCSSClass(),tabIndex:0},n),"button"===e&&G.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),r=W({role:"button"},r),this.tabIndex_=n.tabIndex;var i=t.prototype.createEl.call(this,e,n,r);return this.createControlTextEl(i),i},e.prototype.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=st("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.prototype.controlText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===t)return this.controlText_||"Need Text";var n=this.localize(t);this.controlText_=t,at(this.controlTextEl_,n),this.nonIconControl||e.setAttribute("title",n)},e.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},e.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},e.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},e.prototype.handleClick=function(t){},e.prototype.handleFocus=function(t){Ut(o,"keydown",ee(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.trigger("click")):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e.prototype.handleBlur=function(t){$t(o,"keydown",ee(this,this.handleKeyPress))},e}(_e);_e.registerComponent("ClickableComponent",Xn);var qn=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.update(),n.on("posterchange",ee(i,i.update)),i}return L(e,t),e.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var t=st("div",{className:"vjs-poster",tabIndex:-1});return M||(this.fallbackImg_=st("img"),t.appendChild(this.fallbackImg_)),t},e.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},e.prototype.setSrc=function(t){if(this.fallbackImg_)this.fallbackImg_.src=t;else{var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e}},e.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?Ie(this.player_.play()):this.player_.pause())},e}(Xn);_e.registerComponent("PosterImage",qn);var Kn="#222",Yn="#ccc",Gn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Jn(t,e){var n=void 0;if(4===t.length)n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");n=t.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+e+")"}function Qn(t,e,n){try{t.style[e]=n}catch(r){return}}var Zn=function(t){function e(n,r,i){D(this,e);var o=R(this,t.call(this,n,r,i));return n.on("loadstart",ee(o,o.toggleDisplay)),n.on("texttrackchange",ee(o,o.updateDisplay)),n.on("loadstart",ee(o,o.preselectTrack)),n.ready(ee(o,(function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",ee(this,this.updateDisplay));for(var t=this.options_.playerOptions.tracks||[],e=0;e1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",e=W({innerHTML:'',className:this.buildCSSClass()},e),n=W({type:"button"},n);var r=_e.prototype.createEl.call(this,t,e,n);return this.createControlTextEl(r),r},e.prototype.addChild=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.constructor.name;return G.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),_e.prototype.addChild.call(this,t,e)},e.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},e.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},e.prototype.handleKeyPress=function(e){32!==e.which&&13!==e.which&&t.prototype.handleKeyPress.call(this,e)},e}(Xn);_e.registerComponent("Button",er);var nr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return L(e,t),e.prototype.buildCSSClass=function(){return"vjs-big-play-button"},e.prototype.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY)Ie(e);else{var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var i=function(){return r.focus()};Ne(e)?e.then(i,(function(){})):this.setTimeout(i,1)}else this.player_.focus()}},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(er);nr.prototype.controlText_="Play Video",_e.registerComponent("BigPlayButton",nr);var rr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.controlText(r&&r.controlText||i.localize("Close")),i}return L(e,t),e.prototype.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},e}(er);_e.registerComponent("CloseButton",rr);var ir=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.on(n,"play",i.handlePlay),i.on(n,"pause",i.handlePause),i.on(n,"ended",i.handleEnded),i}return L(e,t),e.prototype.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(er);ir.prototype.controlText_="Play",_e.registerComponent("PlayToggle",ir);var or=function(t,e){t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=r=n="-"),i=i>0||s>0?i+":":"",r=((i||o>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,i+r+n},sr=or;function ar(t){sr=t}function lr(){sr=or}var cr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return sr(t,e)},ur=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.throttledUpdateContent=ne(ee(i,i.updateContent),25),i.on(n,"timeupdate",i.throttledUpdateContent),i}return L(e,t),e.prototype.createEl=function(e){var n=this.buildCSSClass(),r=t.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control",innerHTML:''+this.localize(this.labelText_)+" "});return this.contentEl_=st("span",{className:n+"-display"},{"aria-live":"off"}),this.updateTextNode_(),r.appendChild(this.contentEl_),r},e.prototype.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},e.prototype.updateTextNode_=function(){if(this.contentEl_){while(this.contentEl_.firstChild)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=o.createTextNode(this.formattedTime_||this.formatTime_(0)),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(t){return cr(t)},e.prototype.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},e.prototype.updateContent=function(t){},e}(_e);ur.prototype.labelText_="Time",ur.prototype.controlText_="Time",_e.registerComponent("TimeDisplay",ur);var hr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.on(n,"ended",i.handleEnded),i}return L(e,t),e.prototype.buildCSSClass=function(){return"vjs-current-time"},e.prototype.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(ur);hr.prototype.labelText_="Current Time",hr.prototype.controlText_="Current Time",_e.registerComponent("CurrentTimeDisplay",hr);var pr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.on(n,"durationchange",i.updateContent),i.on(n,"loadedmetadata",i.throttledUpdateContent),i}return L(e,t),e.prototype.buildCSSClass=function(){return"vjs-duration"},e.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},e}(ur);pr.prototype.labelText_="Duration",pr.prototype.controlText_="Duration",_e.registerComponent("DurationDisplay",pr);var dr=function(t){function e(){return D(this,e),R(this,t.apply(this,arguments))}return L(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"
/
"})},e}(_e);_e.registerComponent("TimeDivider",dr);var fr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.on(n,"durationchange",i.throttledUpdateContent),i.on(n,"ended",i.handleEnded),i}return L(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(e){return"-"+t.prototype.formatTime_.call(this,e)},e.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},e}(ur);fr.prototype.labelText_="Remaining Time",fr.prototype.controlText_="Remaining Time",_e.registerComponent("RemainingTimeDisplay",fr);var vr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}return L(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=st("div",{className:"vjs-live-display",innerHTML:''+this.localize("Stream Type")+" "+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(_e);_e.registerComponent("LiveDisplay",vr);var yr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return L(e,t),e.prototype.enabled=function(){return this.enabled_},e.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},e.prototype.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},e.prototype.createEl=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.className=n.className+" vjs-slider",n=W({tabIndex:0},n),r=W({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),t.prototype.createEl.call(this,e,n,r)},e.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||E||t.preventDefault(),mt(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},e.prototype.handleMouseMove=function(t){},e.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;_t(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},e.prototype.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!==typeof t||t!==t||t<0||t===1/0)&&(t=0);var n=(100*t).toFixed(2)+"%",r=e.el().style;return this.vertical()?r.height=n:r.width=n,t}}},e.prototype.calculateDistance=function(t){var e=Ct(this.el_,t);return this.vertical()?e.y:e.x},e.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.prototype.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}(_e);_e.registerComponent("Slider",yr);var gr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.partEls_=[],i.on(n,"progress",i.update),i}return L(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:''+this.localize("Loaded")+": 0%"})},e.prototype.dispose=function(){this.partEls_=null,t.prototype.dispose.call(this)},e.prototype.update=function(t){var e=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),i=this.partEls_,o=function(t,e){var n=t/e||0;return 100*(n>=1?1:n)+"%"};this.el_.style.width=o(r,n);for(var s=0;se.length;u--)this.el_.removeChild(i[u-1]);i.length=e.length},e}(_e);_e.registerComponent("LoadProgressBar",gr);var mr=function(t){function e(){return D(this,e),R(this,t.apply(this,arguments))}return L(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,n){var r=bt(this.el_),i=bt(this.player_.el()),o=t.width*e;if(i&&r){var s=t.left-i.left+o,a=t.width-o+(i.right-t.right),l=r.width/2;sr.width&&(l=r.width),this.el_.style.right="-"+l+"px",at(this.el_,n)}},e}(_e);_e.registerComponent("TimeTooltip",mr);var _r=function(t){function e(){return D(this,e),R(this,t.apply(this,arguments))}return L(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:''+this.localize("Progress")+": 0%"})},e.prototype.update=function(t,e){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),i=cr(r,n.player_.duration()),o=n.getChild("timeTooltip");o&&o.update(t,e,i)}))},e}(_e);_r.prototype.options_={children:[]},j&&!(j>8)||g||_||_r.prototype.options_.children.push("timeTooltip"),_e.registerComponent("PlayProgressBar",_r);var br=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.update=ne(ee(i,i.update),25),i}return L(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.prototype.update=function(t,e){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame((function(){var r=n.player_.duration(),i=cr(e*r,r);n.el_.style.left=t.width*e+"px",n.getChild("timeTooltip").update(t,e,i)}))},e}(_e);br.prototype.options_={children:["timeTooltip"]},_e.registerComponent("MouseTimeDisplay",br);var Tr=5,Cr=30,kr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.setEventHandlers_(),i}return L(e,t),e.prototype.setEventHandlers_=function(){var t=this;this.update=ne(ee(this,this.update),Cr),this.on(this.player_,"timeupdate",this.update),this.on(this.player_,"ended",this.handleEnded),this.updateInterval=null,this.on(this.player_,["playing"],(function(){t.clearInterval(t.updateInterval),t.updateInterval=t.setInterval((function(){t.requestAnimationFrame((function(){t.update()}))}),Cr)})),this.on(this.player_,["ended","pause","waiting"],(function(){t.clearInterval(t.updateInterval)})),this.on(this.player_,["timeupdate","ended"],this.update)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update_=function(t,e){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[cr(t,n),cr(n,n)],"{1} of {2}")),this.bar.update(bt(this.el_),e)},e.prototype.update=function(e){var n=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},e.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return t>=1?1:t},e.prototype.handleMouseDown=function(e){jt(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},e.prototype.handleMouseMove=function(t){if(jt(t)){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)}},e.prototype.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},e.prototype.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying&&Ie(this.player_.play())},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+Tr)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-Tr)},e.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e}(yr);kr.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},j&&!(j>8)||g||_||kr.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),kr.prototype.playerEvent="timeupdate",_e.registerComponent("SeekBar",kr);var wr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.handleMouseMove=ne(ee(i,i.handleMouseMove),25),i.throttledHandleMouseSeek=ne(ee(i,i.handleMouseSeek),25),i.enable(),i}return L(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var n=e.getChild("mouseTimeDisplay"),r=e.el(),i=bt(r),o=Ct(r,t).x;o>1?o=1:o<0&&(o=0),n&&n.update(i,o)}},e.prototype.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},e.prototype.enabled=function(){return this.enabled_},e.prototype.disable=function(){this.children().forEach((function(t){return t.disable&&t.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},e.prototype.enable=function(){this.children().forEach((function(t){return t.enable&&t.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(_e);wr.prototype.options_={children:["seekBar"]},_e.registerComponent("ProgressControl",wr);var Er=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.on(n,"fullscreenchange",i.handleFullscreenChange),!1===o[Ee.fullscreenEnabled]&&i.disable(),i}return L(e,t),e.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(er);Er.prototype.controlText_="Fullscreen",_e.registerComponent("FullscreenToggle",Er);var Sr=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))},xr=function(t){function e(){return D(this,e),R(this,t.apply(this,arguments))}return L(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:''})},e}(_e);_e.registerComponent("VolumeLevel",xr);var jr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.on("slideractive",i.updateLastVolume_),i.on(n,"volumechange",i.updateARIAAttributes),n.ready((function(){return i.updateARIAAttributes()})),i}return L(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},e.prototype.handleMouseDown=function(e){jt(e)&&t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){jt(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},e.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",(function(){0===t.player_.volume()&&t.player_.lastVolume_(e)}))},e}(yr);jr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},jr.prototype.playerEvent="volumechange",_e.registerComponent("VolumeBar",jr);var Ar=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),r.vertical=r.vertical||!1,("undefined"===typeof r.volumeBar||$(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var i=R(this,t.call(this,n,r));return Sr(i,n),i.throttledHandleMouseMove=ne(ee(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],(function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")})),i.on(i.volumeBar,["blur","sliderinactive"],(function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")})),i}return L(e,t),e.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(_e);Ar.prototype.options_={children:["volumeBar"]},_e.registerComponent("VolumeControl",Ar);var Pr=function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))},Or=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return Pr(i,n),i.on(n,["loadstart","volumechange"],i.update),i}return L(e,t),e.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){var e=this.player_.volume(),n=this.player_.lastVolume_();if(0===e){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},e.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;g&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var n=0;n<4;n++)ht(this.el_,"vjs-vol-"+n);ut(this.el_,"vjs-vol-"+e)},e.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume(),e=t?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(er);Or.prototype.controlText_="Mute",_e.registerComponent("MuteToggle",Or);var Mr=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),"undefined"!==typeof r.inline?r.inline=r.inline:r.inline=!0,("undefined"===typeof r.volumeControl||$(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var i=R(this,t.call(this,n,r));return i.on(n,["loadstart"],i.volumePanelState_),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i}return L(e,t),e.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},e.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},e.prototype.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(_e);Mr.prototype.options_={children:["muteToggle","volumeControl"]},_e.registerComponent("VolumePanel",Mr);var Nr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return r&&(i.menuButton_=r.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}return L(e,t),e.prototype.addItem=function(t){this.addChild(t),t.on("click",ee(this,(function(e){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==t.name()&&this.menuButton_.focus())})))},e.prototype.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=st(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),Ut(n,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),n},e.prototype.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.prototype.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.children().slice(),n=e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className);n&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(_e);_e.registerComponent("Menu",Nr);var Ir=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e);var i=R(this,t.call(this,n,r));i.menuButton_=new er(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var o=er.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+o,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on("keydown",i.handleSubmenuKeyPress),i}return L(e,t),e.prototype.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},e.prototype.createMenu=function(){var t=new Nr(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=st("li",{className:"vjs-menu-title",innerHTML:ye(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),lt(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,e)},e.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",ee(this,(function(t){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},e.prototype.focus=function(){this.menuButton_.focus()},e.prototype.blur=function(){this.menuButton_.blur()},e.prototype.handleFocus=function(){Ut(o,"keydown",ee(this,this.handleKeyPress))},e.prototype.handleBlur=function(){$t(o,"keydown",ee(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus())):38!==t.which&&40!==t.which||this.buttonPressed_||(this.pressButton(),t.preventDefault())},e.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.prototype.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),g&&it())return;this.menu.focus()}},e.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(_e);_e.registerComponent("MenuButton",Ir);var Dr=function(t){function e(n,r){D(this,e);var i=r.tracks,o=R(this,t.call(this,n,r));if(o.items.length<=1&&o.hide(),!i)return R(o);var s=ee(o,o.update);return i.addEventListener("removetrack",s),i.addEventListener("addtrack",s),o.player_.on("ready",s),o.player_.on("dispose",(function(){i.removeEventListener("removetrack",s),i.removeEventListener("addtrack",s)})),o}return L(e,t),e}(Ir);_e.registerComponent("TrackButton",Dr);var Lr=function(t){function e(n,r){D(this,e);var i=R(this,t.call(this,n,r));return i.selectable=r.selectable,i.isSelected_=r.selected||!1,i.multiSelectable=r.multiSelectable,i.selected(i.isSelected_),i.selectable?i.multiSelectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitemradio"):i.el_.setAttribute("role","menuitem"),i}return L(e,t),e.prototype.createEl=function(e,n,r){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",W({className:"vjs-menu-item",innerHTML:''+this.localize(this.options_.label)+"",tabIndex:-1},n),r)},e.prototype.handleClick=function(t){this.selected(!0)},e.prototype.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},e}(Xn);_e.registerComponent("MenuItem",Lr);var Rr=function(t){function e(n,r){D(this,e);var s=r.track,a=n.textTracks();r.label=s.label||s.language||"Unknown",r.selected="showing"===s.mode;var l=R(this,t.call(this,n,r));l.track=s;var c=function(){for(var t=arguments.length,e=Array(t),n=0;n-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},e.prototype.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},e.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e.prototype.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}(Lr);_e.registerComponent("TextTrackMenuItem",Rr);var Br=function(t){function e(n,r){return D(this,e),r.track={player:n,kind:r.kind,kinds:r.kinds,default:!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0,r.multiSelectable=!1,R(this,t.call(this,n,r))}return L(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r-1&&"showing"===o.mode){n=!1;break}}n!==this.isSelected_&&this.selected(n)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(Rr);_e.registerComponent("OffTextTrackMenuItem",Br);var Fr=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return D(this,e),r.tracks=n.textTracks(),R(this,t.call(this,n,r))}return L(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Rr,n=void 0;this.label_&&(n=this.label_+" off"),t.push(new Br(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i-1){var s=new e(this.player_,{track:o,selectable:!0,multiSelectable:!1});s.addClass("vjs-"+o.kind+"-menu-item"),t.push(s)}}return t},e}(Dr);_e.registerComponent("TextTrackButton",Fr);var Hr=function(t){function e(n,r){D(this,e);var i=r.track,o=r.cue,s=n.currentTime();r.selectable=!0,r.multiSelectable=!1,r.label=o.text,r.selected=o.startTime<=s&&s=0;e--){var n=t[e];if(n.kind===this.kind_)return n}},e.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(ye(this.kind_))},e.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},e.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n