!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("global/window"),require("global/document")):"function"==typeof define&&define.amd?define(["global/window","global/document"],t):(e=e||self).videojs=t(e.window,e.document)}(this,function(e,t){e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var i="7.6.3",r=[],n=function(t,i){return function(n,a,s){var o=i.levels[a],l=new RegExp("^("+o+")$");if("log"!==n&&s.unshift(n.toUpperCase()+":"),s.unshift(t+":"),r&&r.push([].concat(s)),e.console){var u=e.console[n];u||"debug"!==n||(u=e.console.info||e.console.log),u&&o&&l.test(n)&&u[Array.isArray(s)?"apply":"call"](e.console,s)}}};var a=function e(t){var i,a="info",s=function(){for(var e=arguments.length,t=new Array(e),r=0;r1?t-1:0),r=1;r0)for(var r=e.attributes,n=r.length-1;n>=0;n--){var a=r[n].name,s=r[n].value;"boolean"!=typeof e[a]&&-1===i.indexOf(","+a+",")||(s=null!==s),t[a]=s}return t}function R(e,t){return e.getAttribute(t)}function P(e,t,i){e.setAttribute(t,i)}function D(e,t){e.removeAttribute(t)}function I(){t.body.focus(),t.onselectstart=function(){return!1}}function x(){t.onselectstart=function(){return!0}}function O(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(function(e){void 0!==t[e]&&(i[e]=t[e])}),i.height||(i.height=parseFloat(f(e,"height"))),i.width||(i.width=parseFloat(f(e,"width"))),i}}function M(i){var r;if(i.getBoundingClientRect&&i.parentNode&&(r=i.getBoundingClientRect()),!r)return{left:0,top:0};var n=t.documentElement,a=t.body,s=n.clientLeft||a.clientLeft||0,o=e.pageXOffset||a.scrollLeft,l=r.left+o-s,u=n.clientTop||a.clientTop||0,c=e.pageYOffset||a.scrollTop,d=r.top+c-u;return{left:Math.round(l),top:Math.round(d)}}function U(e,t){var i={},r=M(e),n=e.offsetWidth,a=e.offsetHeight,s=r.top,o=r.left,l=t.pageY,u=t.pageX;return t.changedTouches&&(u=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-l+a)/a)),i.x=Math.max(0,Math.min(1,(u-o)/n)),i}function B(e){return d(e)&&3===e.nodeType}function N(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function F(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),v(e)||B(e)?e:"string"==typeof e&&/\S/.test(e)?t.createTextNode(e):void 0}).filter(function(e){return e})}function j(e,t){return F(t).forEach(function(t){return e.appendChild(t)}),e}function G(e,t){return j(N(e),t)}function V(e){return void 0===e.button&&void 0===e.buttons||(0===e.button&&void 0===e.buttons||("mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons))}var H=_("querySelector"),K=_("querySelectorAll"),q=Object.freeze({isReal:g,isEl:v,isInFrame:y,createEl:b,textContent:T,prependTo:S,hasClass:E,addClass:k,removeClass:w,toggleClass:C,setAttributes:L,getAttributes:A,getAttribute:R,setAttribute:P,removeAttribute:D,blockTextSelection:I,unblockTextSelection:x,getBoundingClientRect:O,findPosition:M,getPointerPosition:U,isTextNode:B,emptyEl:N,normalizeContent:F,appendContent:j,insertContent:G,isSingleLeftClick:V,$:H,$$:K}),W=new WeakMap,z=1;function Y(){return z++}function X(e,t){if(W.has(e)){var i=W.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&W.delete(e)}}function $(e,t,i,r){i.forEach(function(i){e(t,i,r)})}function Q(i){function r(){return!0}function n(){return!1}if(!i||!i.isPropagationStopped){var a=i||e.event;for(var s in i={},a)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"!==s&&"path"!==s||!a.preventDefault)&&(i[s]=a[s]);if(i.target||(i.target=i.srcElement||t),i.relatedTarget||(i.relatedTarget=i.fromElement===i.target?i.toElement:i.fromElement),i.preventDefault=function(){a.preventDefault&&a.preventDefault(),i.returnValue=!1,a.returnValue=!1,i.defaultPrevented=!0},i.defaultPrevented=!1,i.stopPropagation=function(){a.stopPropagation&&a.stopPropagation(),i.cancelBubble=!0,a.cancelBubble=!0,i.isPropagationStopped=r},i.isPropagationStopped=n,i.stopImmediatePropagation=function(){a.stopImmediatePropagation&&a.stopImmediatePropagation(),i.isImmediatePropagationStopped=r,i.stopPropagation()},i.isImmediatePropagationStopped=n,null!==i.clientX&&void 0!==i.clientX){var o=t.documentElement,l=t.body;i.pageX=i.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0),i.pageY=i.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.clientTop||0)}i.which=i.charCode||i.keyCode,null!==i.button&&void 0!==i.button&&(i.button=1&i.button?0:4&i.button?1:2&i.button?2:0)}return i}var J=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){J=!0}});e.addEventListener("test",null,t),e.removeEventListener("test",null,t)}catch(e){}}();var Z=["touchstart","touchmove"];function ee(e,t,i){if(Array.isArray(t))return $(ee,e,t,i);W.has(e)||W.set(e,{});var r=W.get(e);if(r.handlers||(r.handlers={}),r.handlers[t]||(r.handlers[t]=[]),i.guid||(i.guid=Y()),r.handlers[t].push(i),r.dispatcher||(r.disabled=!1,r.dispatcher=function(t,i){if(!r.disabled){t=Q(t);var n=r.handlers[t.type];if(n)for(var s=n.slice(0),o=0,l=s.length;o-1&&(n={passive:!0}),e.addEventListener(t,r.dispatcher,n)}else e.attachEvent&&e.attachEvent("on"+t,r.dispatcher)}function te(e,t,i){if(W.has(e)){var r=W.get(e);if(r.handlers){if(Array.isArray(t))return $(te,e,t,i);var n=function(e,t){r.handlers[t]=[],X(e,t)};if(void 0!==t){var a=r.handlers[t];if(a)if(i){if(i.guid)for(var s=0;s0)for(var a=0,s=n.length;a=i&&(t.apply(void 0,arguments),r=n)}},ge=function(t,i,r,n){var a;void 0===n&&(n=e);var s=function(){var e=this,s=arguments,o=function(){a=null,o=null,r||t.apply(e,s)};!a&&r&&t.apply(e,s),n.clearTimeout(a),a=n.setTimeout(o,i)};return s.cancel=function(){n.clearTimeout(a),a=null},s},ve=function(){};ve.prototype.allowedEvents_={},ve.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},ee(this,e,t),this.addEventListener=i},ve.prototype.addEventListener=ve.prototype.on,ve.prototype.off=function(e,t){te(this,e,t)},ve.prototype.removeEventListener=ve.prototype.off,ve.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},re(this,e,t),this.addEventListener=i},ve.prototype.any=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},ne(this,e,t),this.addEventListener=i},ve.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=Q(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ie(this,e)},ve.prototype.dispatchEvent=ve.prototype.trigger,ve.prototype.queueTrigger=function(t){var i=this;ce||(ce=new Map);var r=t.type||t,n=ce.get(this);n||(n=new Map,ce.set(this,n));var a=n.get(r);n.delete(r),e.clearTimeout(a);var s=e.setTimeout(function(){0===n.size&&(n=null,ce.delete(i)),i.trigger(t)},0);n.set(r,s)};var ye=function(e){return e instanceof ve||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},_e=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},be=function(e){if(!e.nodeName&&!ye(e))throw new Error("Invalid target; must be a DOM node or evented object.")},Te=function(e){if(!_e(e))throw new Error("Invalid event type; must be a non-empty string or array.")},Se=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},Ee=function(e,t){var i,r,n,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(i=e.eventBusEl_,t.length>=3&&t.shift(),r=t[0],n=t[1]):(i=t[0],r=t[1],n=t[2]),be(i),Te(r),Se(n),{isTargetingSelf:a,target:i,type:r,listener:n=pe(e,n)}},ke=function(e,t,i,r){be(e),e.nodeName?se[t](e,i,r):e[t](i,r)},we={on:function(){for(var e=this,t=arguments.length,i=new Array(t),r=0;r=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),W.has(this.el_)&&W.delete(this.el_),this.el_=null),this.player_=null},i.player=function(){return this.player_},i.options=function(e){return e?(this.options_=De(this.options_,e),this.options_):this.options_},i.el=function(){return this.el_},i.createEl=function(e,t,i){return b(e,t,i)},i.localize=function(e,t,i){void 0===i&&(i=e);var r=this.player_.language&&this.player_.language(),n=this.player_.languages&&this.player_.languages(),a=n&&n[r],s=r&&r.split("-")[0],o=n&&n[s],l=i;return a&&a[e]?l=a[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,function(e,i){var r=t[i-1],n=r;return void 0===r&&(n=e),n})),l},i.contentEl=function(){return this.contentEl_||this.el_},i.id=function(){return this.id_},i.name=function(){return this.name_},i.children=function(){return this.children_},i.getChildById=function(e){return this.childIndex_[e]},i.getChild=function(e){if(e)return this.childNameIndex_[e]},i.addChild=function(e,i,r){var n,a;if(void 0===i&&(i={}),void 0===r&&(r=this.children_.length),"string"==typeof e){a=Pe(e);var s=i.componentClass||a;i.name=a;var o=t.getComponent(s);if(!o)throw new Error("Component "+s+" does not exist");if("function"!=typeof o)return null;n=new o(this.player_||this,i)}else n=e;if(n.parentComponent_&&n.parentComponent_.removeChild(n),this.children_.splice(r,0,n),n.parentComponent_=this,"function"==typeof n.id&&(this.childIndex_[n.id()]=n),(a=a||n.name&&Pe(n.name()))&&(this.childNameIndex_[a]=n,this.childNameIndex_[Re(a)]=n),"function"==typeof n.el&&n.el()){var l=this.contentEl().children[r]||null;this.contentEl().insertBefore(n.el(),l)}return n},i.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Pe(e.name())]=null,this.childNameIndex_[Re(e.name())]=null;var r=e.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},i.initChildren=function(){var e=this,i=this.options_.children;if(i){var r,n=this.options_,a=t.getComponent("Tech");(r=Array.isArray(i)?i:Object.keys(i)).concat(Object.keys(this.options_).filter(function(e){return!r.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(t){var r,n;return"string"==typeof t?n=i[r=t]||e.options_[r]||{}:(r=t.name,n=t),{name:r,opts:n}}).filter(function(e){var i=t.getComponent(e.opts.componentClass||Pe(e.name));return i&&!a.isTech(i)}).forEach(function(t){var i=t.name,r=t.opts;if(void 0!==n[i]&&(r=n[i]),!1!==r){!0===r&&(r={}),r.playerOptions=e.options_.playerOptions;var a=e.addChild(i,r);a&&(e[i]=a)}})}},i.buildCSSClass=function(){return""},i.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},i.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},i.$=function(e,t){return H(e,t||this.contentEl())},i.$$=function(e,t){return K(e,t||this.contentEl())},i.hasClass=function(e){return E(this.el_,e)},i.addClass=function(e){k(this.el_,e)},i.removeClass=function(e){w(this.el_,e)},i.toggleClass=function(e,t){C(this.el_,e,t)},i.show=function(){this.removeClass("vjs-hidden")},i.hide=function(){this.addClass("vjs-hidden")},i.lockShowing=function(){this.addClass("vjs-lock-showing")},i.unlockShowing=function(){this.removeClass("vjs-lock-showing")},i.getAttribute=function(e){return R(this.el_,e)},i.setAttribute=function(e,t){P(this.el_,e,t)},i.removeAttribute=function(e){D(this.el_,e)},i.width=function(e,t){return this.dimension("width",e,t)},i.height=function(e,t){return this.dimension("height",e,t)},i.dimensions=function(e,t){this.width(e,!0),this.height(t)},i.dimension=function(e,t,i){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[e],n=r.indexOf("px");return-1!==n?parseInt(r.slice(0,n),10):parseInt(this.el_["offset"+Pe(e)],10)},i.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=f(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var i="offset"+Pe(e);t=this.el_[i]}return t},i.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},i.currentWidth=function(){return this.currentDimension("width")},i.currentHeight=function(){return this.currentDimension("height")},i.focus=function(){this.el_.focus()},i.blur=function(){this.el_.blur()},i.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},i.handleKeyPress=function(e){this.handleKeyDown(e)},i.emitTapEvents=function(){var t,i=0,r=null;this.on("touchstart",function(n){1===n.touches.length&&(r={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},i=e.performance.now(),t=!0)}),this.on("touchmove",function(e){if(e.touches.length>1)t=!1;else if(r){var i=e.touches[0].pageX-r.pageX,n=e.touches[0].pageY-r.pageY;Math.sqrt(i*i+n*n)>10&&(t=!1)}});var n=function(){t=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",function(n){(r=null,!0===t)&&(e.performance.now()-i<200&&(n.preventDefault(),this.trigger("tap")))})},i.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=pe(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var i=function(i){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",i),this.on("touchcancel",i)}},i.setTimeout=function(t,i){var r,n=this;return t=pe(this,t),this.clearTimersOnDispose_(),r=e.setTimeout(function(){n.setTimeoutIds_.has(r)&&n.setTimeoutIds_.delete(r),t()},i),this.setTimeoutIds_.add(r),r},i.clearTimeout=function(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_.delete(t),e.clearTimeout(t)),t},i.setInterval=function(t,i){t=pe(this,t),this.clearTimersOnDispose_();var r=e.setInterval(t,i);return this.setIntervalIds_.add(r),r},i.clearInterval=function(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_.delete(t),e.clearInterval(t)),t},i.requestAnimationFrame=function(t){var i,r=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),t=pe(this,t),i=e.requestAnimationFrame(function(){r.rafIds_.has(i)&&r.rafIds_.delete(i),t()}),this.rafIds_.add(i),i):this.setTimeout(t,1e3/60)},i.cancelAnimationFrame=function(t){return this.supportsRaf_?(this.rafIds_.has(t)&&(this.rafIds_.delete(t),e.cancelAnimationFrame(t)),t):this.clearTimeout(t)},i.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(t){var i=t[0],r=t[1];e[i].forEach(e[r],e)}),e.clearingTimersOnDispose_=!1}))},t.registerComponent=function(e,i){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var r,n=t.getComponent("Tech"),a=n&&n.isTech(i),s=t===i||t.prototype.isPrototypeOf(i.prototype);if(a||!s)throw r=a?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+r+".");e=Pe(e),t.components_||(t.components_={});var o=t.getComponent("Player");if("Player"===e&&o&&o.players){var l=o.players,u=Object.keys(l);if(l&&u.length>0&&u.map(function(e){return l[e]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=i,t.components_[Re(e)]=i,i},t.getComponent=function(e){if(e&&t.components_)return t.components_[e]},t}();function xe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Oe(e,t){return(Oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Me(e,t,i){return(Me=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,i){var r=[null];r.push.apply(r,t);var n=new(Function.bind.apply(e,r));return i&&Oe(n,i.prototype),n}).apply(null,arguments)}function Ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Ie.prototype.supportsRaf_="function"==typeof e.requestAnimationFrame&&"function"==typeof e.cancelAnimationFrame,Ie.registerComponent("Component",Ie);var Be,Ne=e.navigator&&e.navigator.userAgent||"",Fe=/AppleWebKit\/([\d.]+)/i.exec(Ne),je=Fe?parseFloat(Fe.pop()):null,Ge=/iPad/i.test(Ne),Ve=/iPhone/i.test(Ne)&&!Ge,He=/iPod/i.test(Ne),Ke=Ve||Ge||He,qe=(Be=Ne.match(/OS (\d+)_/i))&&Be[1]?Be[1]:null,We=/Android/i.test(Ne),ze=function(){var e=Ne.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),Ye=We&&ze<5&&je<537,Xe=/Firefox/i.test(Ne),$e=/Edge/i.test(Ne),Qe=!$e&&(/Chrome/i.test(Ne)||/CriOS/i.test(Ne)),Je=function(){var e=Ne.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Ze=function(){var e=/MSIE\s(\d+)\.\d/.exec(Ne),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(Ne)&&/rv:11.0/.test(Ne)&&(t=11),t}(),et=/Safari/i.test(Ne)&&!Qe&&!We&&!$e,tt=(et||Ke)&&!Qe,it=/Windows/i.test(Ne),rt=g()&&("ontouchstart"in e||e.navigator.maxTouchPoints||e.DocumentTouch&&e.document instanceof e.DocumentTouch),nt=Object.freeze({IS_IPAD:Ge,IS_IPHONE:Ve,IS_IPOD:He,IS_IOS:Ke,IOS_VERSION:qe,IS_ANDROID:We,ANDROID_VERSION:ze,IS_NATIVE_ANDROID:Ye,IS_FIREFOX:Xe,IS_EDGE:$e,IS_CHROME:Qe,CHROME_VERSION:Je,IE_VERSION:Ze,IS_SAFARI:et,IS_ANY_SAFARI:tt,IS_WINDOWS:it,TOUCH_ENABLED:rt});function at(e,t,i,r){return function(e,t,i){if("number"!=typeof t||t<0||t>i)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+i+").")}(e,r,i.length-1),i[r][t]}function st(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:at.bind(null,"start",0,e),end:at.bind(null,"end",1,e)}}function ot(e,t){return Array.isArray(e)?st(e):void 0===e||void 0===t?st():st([[e,t]])}function lt(e,t){var i,r,n=0;if(!t)return 0;e&&e.length||(e=ot(0,0));for(var a=0;at&&(r=t),n+=r-i;return n/t}for(var ut,ct={prefixed:!0},dt=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],ht=dt[0],ft=0;ft=0;r--)if(t[r].enabled){Rt(t,t[r]);break}return(i=e.call(this,t)||this).changing_=!1,i}xe(t,e);var i=t.prototype;return i.addTrack=function(t){var i=this;t.enabled&&Rt(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){i.changing_||(i.changing_=!0,Rt(i,t),i.changing_=!1,i.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},i.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(Lt),Dt=function(e,t){for(var i=0;i=0;r--)if(t[r].selected){Dt(t,t[r]);break}return(i=e.call(this,t)||this).changing_=!1,Object.defineProperty(Ue(i),"selectedIndex",{get:function(){for(var e=0;e',n=a.firstChild,a.setAttribute("style","display:none; position:absolute;"),t.body.appendChild(a));for(var o={},l=0;lx',e=i.firstChild.href}return e},Ht=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""},Kt=function(t){var i=e.location,r=Gt(t);return(":"===r.protocol?i.protocol:r.protocol)+r.host!==i.protocol+i.host},qt=Object.freeze({parseUrl:Gt,getAbsoluteURL:Vt,getFileExtension:Ht,isCrossOrigin:Kt}),Wt=function(e){var t=zt.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},zt=Object.prototype.toString;var Yt,Xt=Array.prototype.slice,$t=Object.prototype.toString,Qt=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==$t.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var i,r=Xt.call(arguments,1),n=Math.max(0,t.length-r.length),a=[],s=0;s=0&&"[object Function]"===Jt.call(e.callee)),i};if(!Object.keys){var ei=Object.prototype.hasOwnProperty,ti=Object.prototype.toString,ii=Zt,ri=Object.prototype.propertyIsEnumerable,ni=!ri.call({toString:null},"toString"),ai=ri.call(function(){},"prototype"),si=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],oi=function(e){var t=e.constructor;return t&&t.prototype===e},li={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},ui=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!li["$"+e]&&ei.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{oi(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();Yt=function(e){var t=null!==e&&"object"==typeof e,i="[object Function]"===ti.call(e),r=ii(e),n=t&&"[object String]"===ti.call(e),a=[];if(!t&&!i&&!r)throw new TypeError("Object.keys called on a non-object");var s=ai&&i;if(n&&e.length>0&&!ei.call(e,0))for(var o=0;o0)for(var l=0;l2?arguments[2]:{},r=mi(t);gi&&(r=yi.call(r,Object.getOwnPropertySymbols(t)));for(var n=0;n1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');var i="$ "+e;if(!(i in Ai))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===Ai[i]&&!t)throw new TypeError("intrinsic "+e+" exists, but is not available. Please file an issue!");return Ai[i]},Pi=Qt.call(Function.call,Object.prototype.hasOwnProperty),Di=Ri("%TypeError%"),Ii=Ri("%SyntaxError%"),xi={"Property Descriptor":function(e,t){if("Object"!==e.Type(t))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(Pi(t,r)&&!i[r])return!1;var n=Pi(t,"[[Value]]"),a=Pi(t,"[[Get]]")||Pi(t,"[[Set]]");if(n&&a)throw new Di("Property Descriptors may not be both accessor and data descriptors");return!0}},Oi=function(e,t,i,r){var n=xi[t];if("function"!=typeof n)throw new Ii("unknown record type: "+t);if(!n(e,r))throw new Di(i+" must be a "+t);console.log(n(e,r),r)},Mi=Number.isNaN||function(e){return e!=e},Ui=Number.isNaN||function(e){return e!=e},Bi=Number.isFinite||function(e){return"number"==typeof e&&!Ui(e)&&e!==1/0&&e!==-1/0},Ni=function(e){return e>=0?1:-1},Fi=Function.prototype.toString,ji=/^\s*class\b/,Gi=function(e){try{var t=Fi.call(e);return ji.test(t)}catch(e){return!1}},Vi=Object.prototype.toString,Hi="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,Ki=function(e){if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(Hi)return function(e){try{return!Gi(e)&&(Fi.call(e),!0)}catch(e){return!1}}(e);if(Gi(e))return!1;var t=Vi.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t},qi=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e},Wi=Object.prototype.toString,zi=function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===Wi.call(e)?String:Number)===String||t===Number){var i,r,n=t===String?["toString","valueOf"]:["valueOf","toString"];for(r=0;r1?zi(e,arguments[1]):zi(e)},ToBoolean:function(e){return!!e},ToNumber:function(e){return+e},ToInteger:function(e){var t=this.ToNumber(e);return Mi(t)?0:0!==t&&Bi(t)?Ni(t)*Math.floor(Math.abs(t)):t},ToInt32:function(e){return this.ToNumber(e)>>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);return Mi(t)||0===t||!Bi(t)?0:function(e,t){var i=e%t;return Math.floor(i>=0?i:i+t)}(Ni(t)*Math.floor(Math.abs(t)),65536)},ToString:function(e){return $i(e)},ToObject:function(e){return this.CheckObjectCoercible(e),Yi(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new Xi(t||"Cannot call method on "+e);return e},IsCallable:Ki,SameValue:function(e,t){return e===t?0!==e||1/e==1/t:Mi(e)&&Mi(t)},Type:function(e){return null===e?"Null":void 0===e?"Undefined":"function"==typeof e||"object"==typeof e?"Object":"number"==typeof e?"Number":"boolean"==typeof e?"Boolean":"string"==typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var i in e)if(Pi(e,i)&&!t[i])return!1;var r=Pi(e,"[[Value]]"),n=Pi(e,"[[Get]]")||Pi(e,"[[Set]]");if(r&&n)throw new Xi("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return void 0!==e&&(Oi(this,"Property Descriptor","Desc",e),!(!Pi(e,"[[Get]]")&&!Pi(e,"[[Set]]")))},IsDataDescriptor:function(e){return void 0!==e&&(Oi(this,"Property Descriptor","Desc",e),!(!Pi(e,"[[Value]]")&&!Pi(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return void 0!==e&&(Oi(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if(void 0===e)return e;if(Oi(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new Xi("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new Xi("ToPropertyDescriptor requires an object");var t={};if(Pi(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),Pi(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),Pi(e,"value")&&(t["[[Value]]"]=e.value),Pi(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),Pi(e,"get")){var i=e.get;if(void 0!==i&&!this.IsCallable(i))throw new TypeError("getter must be a function");t["[[Get]]"]=i}if(Pi(e,"set")){var r=e.set;if(void 0!==r&&!this.IsCallable(r))throw new Xi("setter must be a function");t["[[Set]]"]=r}if((Pi(t,"[[Get]]")||Pi(t,"[[Set]]"))&&(Pi(t,"[[Value]]")||Pi(t,"[[Writable]]")))throw new Xi("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}},Ji=Qt.call(Function.call,String.prototype.replace),Zi=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,er=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/,tr=function(){var e=Qi.ToString(Qi.CheckObjectCoercible(this));return Ji(Ji(e,Zi,""),er,"")},ir=function(){return String.prototype.trim&&"​"==="​".trim()?String.prototype.trim:tr},rr=Qt.call(Function.call,ir());Ei(rr,{getPolyfill:ir,implementation:tr,shim:function(){var e=ir();return Ei(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}});var nr=rr,ar=Object.prototype.toString,sr=Object.prototype.hasOwnProperty,or=function(e,t,i){if(!Ki(t))throw new TypeError("iterator must be a function");var r;arguments.length>=3&&(r=i),"[object Array]"===ar.call(e)?function(e,t,i){for(var r=0,n=e.length;r0&&(l=setTimeout(function(){if(!s){s=!0,o.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",r(e)}},e.timeout)),o.setRequestHeader)for(a in h)h.hasOwnProperty(a)&&o.setRequestHeader(a,h[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(o.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(o),o.send(d||null),o}fr.XMLHttpRequest=e.XMLHttpRequest||function(){},fr.XDomainRequest="withCredentials"in new fr.XMLHttpRequest?fr.XMLHttpRequest:e.XDomainRequest,function(e,t){for(var i=0;i0&&(e.console&&e.console.groupCollapsed&&e.console.groupCollapsed("Text Track parsing errors for "+i.src),n.forEach(function(e){return a.error(e)}),e.console&&e.console.groupEnd&&e.console.groupEnd()),r.flush()},gr=function(t,i){var r={uri:t},n=Kt(t);n&&(r.cors=n),dr(r,pe(this,function(t,r,n){if(t)return a.error(t,r);i.loaded_=!0,"function"!=typeof e.WebVTT?i.tech_&&i.tech_.any(["vttjsloaded","vttjserror"],function(e){if("vttjserror"!==e.type)return mr(n,i);a.error("vttjs failed to load, stopping trying to process "+i.src)}):mr(n,i)}))},vr=function(t){function i(e){var i;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var r=De(e,{kind:Nt[e.kind]||"subtitles",language:e.language||e.srclang||""}),n=Ft[r.mode]||"disabled",a=r.default;"metadata"!==r.kind&&"chapters"!==r.kind||(n="hidden"),(i=t.call(this,r)||this).tech_=r.tech,i.cues_=[],i.activeCues_=[];var s=new Mt(i.cues_),o=new Mt(i.activeCues_),l=!1,u=pe(Ue(i),function(){this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1)});return"disabled"!==n&&i.tech_.ready(function(){i.tech_.on("timeupdate",u)},!0),Object.defineProperties(Ue(i),{default:{get:function(){return a},set:function(){}},mode:{get:function(){return n},set:function(e){var t=this;Ft[e]&&("disabled"!==(n=e)?this.tech_.ready(function(){t.tech_.on("timeupdate",u)},!0):this.tech_.off("timeupdate",u),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?s:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var e=this.tech_.currentTime(),t=[],i=0,r=this.cues.length;i=e?t.push(n):n.startTime===n.endTime&&n.startTime<=e&&n.startTime+.5>=e&&t.push(n)}if(l=!1,t.length!==this.activeCues_.length)l=!0;else for(var a=0;a59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function Rr(){this.values=Cr(null)}function Pr(e,t,i,r){var n=r?e.split(r):[e];for(var a in n)if("string"==typeof n[a]){var s=n[a].split(i);if(2===s.length)t(s[0],s[1])}}function Dr(e,t,i){var r=e;function n(){var t=Ar(e);if(null===t)throw new Lr(Lr.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=n(),a(),"--\x3e"!==e.substr(0,3))throw new Lr(Lr.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),a(),t.endTime=n(),a(),function(e,t){var r=new Rr;Pr(e,function(e,t){switch(e){case"region":for(var n=i.length-1;n>=0;n--)if(i[n].id===t){r.set(e,i[n].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),s=a[0];r.integer(e,s),r.percent(e,s)&&r.set("snapToLines",!1),r.alt(e,s,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","middle","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","middle","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","middle","end","left","right"])}},/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line","auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align","middle"),t.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}Lr.prototype=Cr(Error.prototype),Lr.prototype.constructor=Lr,Lr.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Rr.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var r=0;r=0&&t<=100)&&(this.set(e,t),!0)}};var Ir={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},xr={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Or={v:"title",lang:"lang"},Mr={rt:"ruby"};function Ur(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function r(e){return Ir[e]}function n(e){for(;f=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(f[0],r);return e}function a(e,t){return!Mr[t.localName]||Mr[t.localName]===e.localName}function s(t,i){var r=xr[t];if(!r)return null;var n=e.document.createElement(r);n.localName=r;var a=Or[t];return a&&i&&(n[a]=i.trim()),n}for(var o,l=e.document.createElement("div"),u=l,c=[];null!==(o=i());)if("<"!==o[0])u.appendChild(e.document.createTextNode(n(o)));else{if("/"===o[1]){c.length&&c[c.length-1]===o.substr(2).replace(">","")&&(c.pop(),u=u.parentNode);continue}var d,h=Ar(o.substr(1,o.length-2));if(h){d=e.document.createProcessingInstruction("timestamp",h),u.appendChild(d);continue}var f=o.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=s(f[1],f[3])))continue;if(!a(u,d))continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),c.push(f[1]),u.appendChild(d),u=d}return l}var Br=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Nr(e){for(var t=0;t=i[0]&&e<=i[1])return!0}return!1}function Fr(){}function jr(e,t,i){Fr.call(this),this.cue=t,this.cueDiv=Ur(e,t.text);var r={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(r,this.cueDiv),this.div=e.document.createElement("div"),r={direction:function(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function n(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var a=i.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):i}return"ruby"===t.tagName?n(e):t.childNodes?(r(e,t),n(e)):void 0}for(r(t,e);i=n(t);)for(var a=0;a=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,r=0,n=0;nd&&(c=c<0?-1:1,c*=Math.ceil(d/u)*u),s<0&&(c+=""===a.vertical?i.height:i.width,o=o.reverse()),n.move(h,c)}else{var f=n.lineHeight/i.height*100;switch(a.lineAlign){case"middle":s-=f/2;break;case"end":s-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(s,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(s,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(s,"%")})}o=["+y","-x","+x","-y"],n=new Gr(t)}var p=function(e,t){for(var n,a=new Gr(e),s=1,o=0;ol&&(n=new Gr(e),s=l),e=new Gr(a)}return n||a}(n,o);t.move(p.toCSSCompatValues(i))}function Hr(){}Fr.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},Fr.prototype.formatStyle=function(e,t){return 0===e?0:e+t},jr.prototype=Cr(Fr.prototype),jr.prototype.constructor=jr,Gr.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},Gr.prototype.overlaps=function(e){return this.lefte.left&&this.tope.top},Gr.prototype.overlapsAny=function(e){for(var t=0;t=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},Gr.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.lefte.right;case"+y":return this.tope.bottom}},Gr.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},Gr.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},Gr.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||i}},Hr.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Hr.convertCueToDOMTree=function(e,t){return e&&t?Ur(e,t):null};Hr.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",i.appendChild(r),function(e){for(var t=0;t100)throw new Error("Position must be between 0 and 100.");f=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=Yr(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");p=t,this.hasBeenReset=!0}},size:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");m=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){var t=Yr(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");g=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Xr.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var $r=Xr,Qr={"":!0,up:!0};function Jr(e){return"number"==typeof e&&e>=0&&e<=100}var Zr=function(){var e=100,t=3,i=0,r=100,n=0,a=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Jr(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!Jr(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return i},set:function(e){if(!Jr(e))throw new Error("RegionAnchorY must be between 0 and 100.");i=e}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(e){if(!Jr(e))throw new Error("ViewportAnchorY must be between 0 and 100.");a=e}},viewportAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Jr(e))throw new Error("ViewportAnchorX must be between 0 and 100.");n=e}},scroll:{enumerable:!0,get:function(){return s},set:function(e){var t=function(e){return"string"==typeof e&&!!Qr[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");s=t}}})},en=Et(function(t){var i=t.exports={WebVTT:Kr,VTTCue:$r,VTTRegion:Zr};e.vttjs=i,e.WebVTT=i.WebVTT;var r=i.VTTCue,n=i.VTTRegion,a=e.VTTCue,s=e.VTTRegion;i.shim=function(){e.VTTCue=r,e.VTTRegion=n},i.restore=function(){e.VTTCue=a,e.VTTRegion=s},e.VTTCue||i.shim()});en.WebVTT,en.VTTCue,en.VTTRegion;var tn=function(i){function r(e,t){var r;return void 0===e&&(e={}),void 0===t&&(t=function(){}),e.reportTouchActivity=!1,(r=i.call(this,null,e,t)||this).hasStarted_=!1,r.on("playing",function(){this.hasStarted_=!0}),r.on("loadstart",function(){this.hasStarted_=!1}),wr.names.forEach(function(t){var i=wr[t];e&&e[i.getterName]&&(r[i.privateName]=e[i.getterName])}),r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===e["native"+t+"Tracks"]&&(r["featuresNative"+t+"Tracks"]=!1)}),!1===e.nativeCaptions||!1===e.nativeTextTracks?r.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(r.featuresNativeTextTracks=!0),r.featuresNativeTextTracks||r.emulateTextTracks(),r.autoRemoteTextTracks_=new wr.text.ListClass,r.initTrackListeners(),e.nativeControlsForTouch||r.emitTapEvents(),r.constructor&&(r.name_=r.constructor.name||"Unknown Tech"),r}xe(r,i);var n=r.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",function(){return t.setTimeout(function(){return t.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},n.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(pe(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()}),500)},n.onDurationChange=function(e){this.duration_=this.duration()},n.buffered=function(){return ot(0,0)},n.bufferedPercent=function(){return lt(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks(Er.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),i.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach(function(e){for(var i=t[e+"Tracks"]()||[],r=i.length;r--;){var n=i[r];"text"===e&&t.removeRemoteTextTrack(n),i.removeTrack(n)}})},n.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var i=e[t];this.removeRemoteTextTrack(i)}},n.reset=function(){},n.error=function(e){return void 0!==e&&(this.error_=new mt(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?ot(0,0):ot()},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;Er.names.forEach(function(t){var i=Er[t],r=function(){e.trigger(t+"trackchange")},n=e[i.getterName]();n.addEventListener("removetrack",r),n.addEventListener("addtrack",r),e.on("dispose",function(){n.removeEventListener("removetrack",r),n.removeEventListener("addtrack",r)})})},n.addWebVttScript_=function(){var i=this;if(!e.WebVTT)if(t.body.contains(this.el())){if(!this.options_["vtt.js"]&&h(en)&&Object.keys(en).length>0)return void this.trigger("vttjsloaded");var r=t.createElement("script");r.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",r.onload=function(){i.trigger("vttjsloaded")},r.onerror=function(){i.trigger("vttjserror")},this.on("dispose",function(){r.onload=null,r.onerror=null}),e.WebVTT=!0,this.el().parentNode.appendChild(r)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){var e=this,t=this.textTracks(),i=this.remoteTextTracks(),r=function(e){return t.addTrack(e.track)},n=function(e){return t.removeTrack(e.track)};i.on("addtrack",r),i.on("removetrack",n),this.addWebVttScript_();var a=function(){return e.trigger("texttrackchange")},s=function(){a();for(var e=0;e=0;n--){var a=e[n];a[t]&&a[t](r,i)}}(e,i,o,s),o}var ln={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1,volume:1},un={setCurrentTime:1,setVolume:1},cn={play:1,pause:1};function dn(e){return function(t,i){return t===an?an:i[e]?i[e](t):t}}var hn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},fn=function(e){void 0===e&&(e="");var t=Ht(e);return hn[t.toLowerCase()]||""};function pn(e){if(!e.type){var t=fn(e.src);t&&(e.type=t)}return e}var mn=function(e){function t(t,i,r){var n,a=De({createEl:!1},i);if(n=e.call(this,t,a,r)||this,i.playerOptions.sources&&0!==i.playerOptions.sources.length)t.src(i.playerOptions.sources);else for(var s=0,o=i.playerOptions.techOrder;s