liveplayer.js
Version:
H5直播/点播播放器,使用简单,功能强大, 免费使用
1 lines • 1.35 MB
JavaScript
!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){function n(e,t){Ke(e).forEach((function(n){return t(e[n],n)}))}function i(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];return Object.assign?Object.assign.apply(Object,[e].concat(i)):(i.forEach((function(t){t&&n(t,(function(t,n){e[n]=t}))})),e)}function r(e){return!!e&&"object"==typeof e}function a(e){return r(e)&&"[object Object]"===Xe.call(e)&&e.constructor===Object}function o(t,n){if(!t||!n)return"";if("function"==typeof e.getComputedStyle){var i=e.getComputedStyle(t);return i?i.getPropertyValue(n)||i[n]:""}return""}function s(e){return"string"==typeof e&&/\S/.test(e)}function u(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function l(){return t===e.document}function c(e){return r(e)&&1===e.nodeType}function d(){try{return e.parent!==e.self}catch(e){return!0}}function f(e){return function(n,i){if(!s(n))return t[e](null);s(i)&&(i=t.querySelector(i));var r=c(i)?i:t;return r[e]&&r[e](n)}}function h(e,n,i,r){void 0===e&&(e="div"),void 0===n&&(n={}),void 0===i&&(i={});var a=t.createElement(e);return Object.getOwnPropertyNames(n).forEach((function(e){var t=n[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(We.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+e+" to "+t+"."),a.setAttribute(e,t)):"textContent"===e?p(a,t):a[e]=t})),Object.getOwnPropertyNames(i).forEach((function(e){a.setAttribute(e,i[e])})),r&&P(a,r),a}function p(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function m(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function v(e,t){return u(t),e.classList?e.classList.contains(t):function(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}(t).test(e.className)}function g(e,t){return e?(e.classList?e.classList.add(t):v(e,t)||(e.className=(e.className+" "+t).trim()),e):e}function y(e,t){return e?(e.classList?e.classList.remove(t):(u(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e):e}function _(e,t,n){var i=v(e,t);return"function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!i),n===i||(n?g(e,t):y(e,t)),e}function b(e,t){Object.getOwnPropertyNames(t).forEach((function(n){var i=t[n];null==i||!1===i?e.removeAttribute(n):e.setAttribute(n,!0===i?"":i)}))}function T(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var n=e.attributes,i=n.length-1;i>=0;i--){var r=n[i].name,a=n[i].value;"boolean"!=typeof e[r]&&-1===",autoplay,stretch,fluent,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+r+",")||(a=null!==a),t[r]=a}return t}function S(e,t){return e.getAttribute(t)}function w(e,t,n){e.setAttribute(t,n)}function k(e,t){e.removeAttribute(t)}function E(){t.body.focus(),t.onselectstart=function(){return!1}}function A(){t.onselectstart=function(){return!0}}function C(e){if(e&&e.getBoundingClientRect&&e.parentNode){var t=e.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(e){void 0!==t[e]&&(n[e]=t[e])})),n.height||(n.height=parseFloat(o(e,"height"))),n.width||(n.width=parseFloat(o(e,"width"))),n}}function O(n){var i;if(n.getBoundingClientRect&&n.parentNode&&(i=n.getBoundingClientRect()),!i)return{left:0,top:0};var r=t.documentElement,a=t.body,o=r.clientLeft||a.clientLeft||0,s=e.pageXOffset||a.scrollLeft,u=i.left+s-o,l=r.clientTop||a.clientTop||0,c=e.pageYOffset||a.scrollTop,d=i.top+c-l;return{left:Math.round(u),top:Math.round(d)}}function j(e,t){var n={},i=O(e),r=e.offsetWidth,a=e.offsetHeight,o=i.top,s=i.left,u=t.pageY,l=t.pageX;return t.changedTouches&&(l=t.changedTouches[0].pageX,u=t.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(o-u+a)/a)),n.x=Math.max(0,Math.min(1,(l-s)/r)),n}function L(e){return r(e)&&3===e.nodeType}function x(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function I(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),c(e)||L(e)?e:"string"==typeof e&&/\S/.test(e)?t.createTextNode(e):void 0})).filter((function(e){return e}))}function P(e,t){return I(t).forEach((function(t){return e.appendChild(t)})),e}function R(e,t){return P(x(e),t)}function M(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}function D(){return et++}function U(e,t){if(Qe.has(e)){var n=Qe.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&Qe.delete(e)}}function B(e,t,n,i){n.forEach((function(n){e(t,n,i)}))}function N(n){function i(){return!0}function r(){return!1}if(!n||!n.isPropagationStopped){var a=n||e.event;for(var o in n={},a)"layerX"!==o&&"layerY"!==o&&"keyLocation"!==o&&"webkitMovementX"!==o&&"webkitMovementY"!==o&&("returnValue"===o&&a.preventDefault||(n[o]=a[o]));if(n.target||(n.target=n.srcElement||t),n.relatedTarget||(n.relatedTarget=n.fromElement===n.target?n.toElement:n.fromElement),n.preventDefault=function(){a.preventDefault&&a.preventDefault(),n.returnValue=!1,a.returnValue=!1,n.defaultPrevented=!0},n.defaultPrevented=!1,n.stopPropagation=function(){a.stopPropagation&&a.stopPropagation(),n.cancelBubble=!0,a.cancelBubble=!0,n.isPropagationStopped=i},n.isPropagationStopped=r,n.stopImmediatePropagation=function(){a.stopImmediatePropagation&&a.stopImmediatePropagation(),n.isImmediatePropagationStopped=i,n.stopPropagation()},n.isImmediatePropagationStopped=r,null!==n.clientX&&void 0!==n.clientX){var s=t.documentElement,u=t.body;n.pageX=n.clientX+(s&&s.scrollLeft||u&&u.scrollLeft||0)-(s&&s.clientLeft||u&&u.clientLeft||0),n.pageY=n.clientY+(s&&s.scrollTop||u&&u.scrollTop||0)-(s&&s.clientTop||u&&u.clientTop||0)}n.which=n.charCode||n.keyCode,null!==n.button&&void 0!==n.button&&(n.button=1&n.button?0:4&n.button?1:2&n.button?2:0)}return n}function F(e,t,n){if(Array.isArray(t))return B(F,e,t,n);Qe.has(e)||Qe.set(e,{});var i=Qe.get(e);if(i.handlers||(i.handlers={}),i.handlers[t]||(i.handlers[t]=[]),n.guid||(n.guid=D()),i.handlers[t].push(n),i.dispatcher||(i.disabled=!1,i.dispatcher=function(t,n){if(!i.disabled){t=N(t);var r=i.handlers[t.type];if(r)for(var a=r.slice(0),o=0,s=a.length;o<s&&!t.isImmediatePropagationStopped();o++)try{a[o].call(e,t,n)}catch(e){We.error(e)}}}),1===i.handlers[t].length)if(e.addEventListener){var r=!1;tt&&it.indexOf(t)>-1&&(r={passive:!0}),e.addEventListener(t,i.dispatcher,r)}else e.attachEvent&&e.attachEvent("on"+t,i.dispatcher)}function V(e,t,n){if(Qe.has(e)){var i=Qe.get(e);if(i.handlers){if(Array.isArray(t))return B(V,e,t,n);var r=function(e,t){i.handlers[t]=[],U(e,t)};if(void 0!==t){var a=i.handlers[t];if(a){if(!n)return void r(e,t);if(n.guid)for(var o=0;o<a.length;o++)a[o].guid===n.guid&&a.splice(o--,1);U(e,t)}}else for(var s in i.handlers)Object.prototype.hasOwnProperty.call(i.handlers||{},s)&&r(e,s)}}}function H(e,t,n){var i=Qe.has(e)?Qe.get(e):{},r=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=N(t),i.dispatcher&&i.dispatcher.call(e,t,n),r&&!t.isPropagationStopped()&&!0===t.bubbles)H.call(null,r,t,n);else if(!r&&!t.defaultPrevented&&t.target&&t.target[t.type]){Qe.has(t.target)||Qe.set(t.target,{});var a=Qe.get(t.target);t.target[t.type]&&(a.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),a.disabled=!1)}return!t.defaultPrevented}function q(e,t,n){if(Array.isArray(t))return B(q,e,t,n);var i=function i(){V(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||D(),F(e,t,i)}function z(e,t,n){var i=function i(){V(e,t,i),n.apply(this,arguments)};i.guid=n.guid=n.guid||D(),F(e,t,i)}function G(t,n){n&&(nt=n),e.setTimeout(ot,t)}function W(t,n){void 0===n&&(n={});var r=n.eventBusKey;if(r){if(!t[r].nodeName)throw new Error('The eventBusKey "'+r+'" does not refer to an element.');t.eventBusEl_=t[r]}else t.eventBusEl_=h("span",{className:"vjs-event-bus"});return i(t,Tt),t.eventedCallbacks&&t.eventedCallbacks.forEach((function(e){e()})),t.on("dispose",(function(){t.off(),e.setTimeout((function(){t.eventBusEl_=null}),0)})),t}function $(e,t){return i(e,St),e.state=i({},e.state,t),"function"==typeof e.handleStateChanged&&pt(e)&&e.on("statechanged",e.handleStateChanged),e}function X(){for(var e={},t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return i.forEach((function(t){t&&n(t,(function(t,n){a(t)?(a(e[n])||(e[n]={}),e[n]=X(e[n],t)):e[n]=t}))})),e}function K(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Y(e,t){return(Y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(){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}}function Z(e,t,n){return(Z=J()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&Y(r,n.prototype),r}).apply(null,arguments)}function Q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ee(e,t,n,i){return function(e,t,n){if("number"!=typeof t||t<0||t>n)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,i,n.length-1),n[i][t]}function te(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:ee.bind(null,"start",0,e),end:ee.bind(null,"end",1,e)}}function ne(e,t){return Array.isArray(e)?te(e):void 0===e||void 0===t?te():te([[e,t]])}function ie(e,t){var n,i,r=0;if(!t)return 0;e&&e.length||(e=ne(0,0));for(var a=0;a<e.length;a++)n=e.start(a),(i=e.end(a))>t&&(i=t),r+=i-n;return r/t}function re(e){if(e instanceof re)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:r(e)&&("number"==typeof e.code&&(this.code=e.code),i(this,e)),this.message||(this.message=re.defaultMessages[this.code]||"")}function ae(e){return null!=e&&"function"==typeof e.then}function oe(e){ae(e)&&e.then(null,(function(e){}))}function se(e,t){return e(t={exports:{}},t.exports),t.exports}function ue(e,t,n){var i=e;return On(t)?(n=t,"string"==typeof e&&(i={uri:e})):i=$i(t,{uri:e}),i.callback=n,i}function le(e,t,n){return ce(t=ue(e,t,n))}function ce(e){function t(){var e=void 0;if(e=o.response?o.response:o.responseText||function(e){if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;return""!==e.responseType||t?null:e.responseXML}(o),m)try{e=JSON.parse(e)}catch(e){}return e}function n(e){return clearTimeout(l),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,a(e,v)}function i(){if(!u){var n;clearTimeout(l),n=e.useXDR&&void 0===o.status?200:1223===o.status?204:o.status;var i=v,r=null;return 0!==n?(i={body:t(),statusCode:n,method:d,headers:{},url:c,rawRequest:o},o.getAllResponseHeaders&&(i.headers=Wi(o.getAllResponseHeaders()))):r=new Error("Internal XMLHttpRequest Error"),a(r,i,i.body)}}if(void 0===e.callback)throw new Error("callback argument missing");var r=!1,a=function(t,n,i){r||(r=!0,e.callback(t,n,i))},o=e.xhr||null;o||(o=e.cors||e.useXDR?new le.XDomainRequest:new le.XMLHttpRequest);var s,u,l,c=o.url=e.uri||e.url,d=o.method=e.method||"GET",f=e.body||e.data,h=o.headers=e.headers||{},p=!!e.sync,m=!1,v={body:void 0,headers:{},statusCode:0,method:d,url:c,rawRequest:o};if("json"in e&&!1!==e.json&&(m=!0,h.accept||h.Accept||(h.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(h["content-type"]||h["Content-Type"]||(h["Content-Type"]="application/json"),f=JSON.stringify(!0===e.json?f:e.json))),o.onreadystatechange=function(){4===o.readyState&&setTimeout(i,0)},o.onload=i,o.onerror=n,o.onprogress=function(){},o.onabort=function(){u=!0},o.ontimeout=n,o.open(d,c,!p,e.username,e.password),p||(o.withCredentials=!!e.withCredentials),!p&&e.timeout>0&&(l=setTimeout((function(){if(!u){u=!0,o.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",n(e)}}),e.timeout)),o.setRequestHeader)for(s in h)h.hasOwnProperty(s)&&o.setRequestHeader(s,h[s]);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(f||null),o}function de(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function fe(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}function he(){this.values=ar(null)}function pe(e,t,n,i){var r=i?e.split(i):[e];for(var a in r)if("string"==typeof r[a]){var o=r[a].split(n);if(2===o.length)t(o[0],o[1])}}function me(e,t,n){function i(){var t=fe(e);if(null===t)throw new de(de.Errors.BadTimeStamp,"Malformed timestamp: "+a);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function r(){e=e.replace(/^\s+/,"")}var a=e;if(r(),t.startTime=i(),r(),"--\x3e"!==e.substr(0,3))throw new de(de.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+a);e=e.substr(3),r(),t.endTime=i(),r(),function(e,t){var i=new he;pe(e,(function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];i.integer(e,o),i.percent(e,o)&&i.set("snapToLines",!1),i.alt(e,o,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start","middle","end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start","middle","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","middle","end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical",""),t.line=i.get("line","auto"),t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align","middle"),t.position=i.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=i.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}function ve(e,t){function n(e){return or[e]}for(var i,r=e.document.createElement("div"),a=r,o=[];null!==(i=function(){if(!t)return null;var e=t.match(/^([^<]*)(<[^>]*>?)?/);return function(e){return t=t.substr(e.length),e}(e[1]?e[1]:e[2])}());)if("<"!==i[0])a.appendChild(e.document.createTextNode(function(e){for(;l=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(l[0],n);return e}(i)));else{if("/"===i[1]){o.length&&o[o.length-1]===i.substr(2).replace(">","")&&(o.pop(),a=a.parentNode);continue}var s,u=fe(i.substr(1,i.length-2));if(u){s=e.document.createProcessingInstruction("timestamp",u),a.appendChild(s);continue}var l=i.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!l)continue;if(!(s=function(t,n){var i=sr[t];if(!i)return null;var r=e.document.createElement(i);r.localName=i;var a=ur[t];return a&&n&&(r[a]=n.trim()),r}(l[1],l[3])))continue;if(!function(e,t){return!lr[t.localName]||lr[t.localName]===e.localName}(a,s))continue;l[2]&&(s.className=l[2].substr(1).replace("."," ")),o.push(l[1]),a.appendChild(s),a=s}return r}function ge(e){for(var t=0;t<cr.length;t++){var n=cr[t];if(e>=n[0]&&e<=n[1])return!0}return!1}function ye(e){function t(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function n(e){if(!e||!e.length)return null;var i=e.pop(),r=i.textContent||i.innerText;if(r){var a=r.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):r}return"ruby"===i.tagName?n(e):i.childNodes?(t(e,i),n(e)):void 0}var i=[],r="";if(!e||!e.childNodes)return"ltr";for(t(i,e);r=n(i);)for(var a=0;a<r.length;a++)if(ge(r.charCodeAt(a)))return"rtl";return"ltr"}function _e(){}function be(e,t,n){_e.call(this),this.cue=t,this.cueDiv=ve(e,t.text);var i={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(i,this.cueDiv),this.div=e.document.createElement("div"),i={direction:ye(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(i),this.div.appendChild(this.cueDiv);var r=0;switch(t.positionAlign){case"start":r=t.position;break;case"middle":r=t.position-t.size/2;break;case"end":r=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function Te(e){var t,n,i,r;if(e.div){n=e.div.offsetHeight,i=e.div.offsetWidth,r=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||r,this.height=e.height||n,this.bottom=e.bottom||r+(e.height||n),this.width=e.width||i,this.lineHeight=void 0!==t?t:e.lineHeight}function Se(e,t,n,i){var r=new Te(t),a=t.cue,o=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,i=0,r=0;r<n.length&&n[r]!==t;r++)"showing"===n[r].mode&&i++;return-1*++i}(a),s=[];if(a.snapToLines){var u;switch(a.vertical){case"":s=["+y","-y"],u="height";break;case"rl":s=["+x","-x"],u="width";break;case"lr":s=["-x","+x"],u="width"}var l=r.lineHeight,c=l*Math.round(o),d=n[u]+l,f=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/l)*l),o<0&&(c+=""===a.vertical?n.height:n.width,s=s.reverse()),r.move(f,c)}else{var h=r.lineHeight/n.height*100;switch(a.lineAlign){case"middle":o-=h/2;break;case"end":o-=h}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],r=new Te(t)}var p=function(e,t){for(var r,a=new Te(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(i);)e.move(t[s]);if(e.within(n))return e;var u=e.intersectPercentage(n);o>u&&(r=new Te(e),o=u),e=new Te(a)}return r||a}(r,s);t.move(p.toCSSCompatValues(n))}function we(){}function ke(e){return"string"==typeof e&&!!pr[e.toLowerCase()]&&e.toLowerCase()}function Ee(e,t,n){this.hasBeenReset=!1;var i="",r=!1,a=e,o=t,s=n,u=null,l="",c=!0,d="auto",f="start",h=50,p="middle",m=50,v="middle";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return i},set:function(e){i=""+e}},pauseOnExit:{enumerable:!0,get:function(){return r},set:function(e){r=!!e}},startTime:{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");a=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");o=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return s},set:function(e){s=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(e){u=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return"string"==typeof e&&!!hr[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");l=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(e){c=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return d},set:function(e){if("number"!=typeof e&&e!==fr)throw new SyntaxError("An invalid number or illegal string was specified.");d=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=ke(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");f=t,this.hasBeenReset=!0}},position:{enumerable:!0,get:function(){return h},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");h=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return p},set:function(e){var t=ke(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 v},set:function(e){var t=ke(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");v=t,this.hasBeenReset=!0}}}),this.displayState=void 0}function Ae(e){return"number"==typeof e&&e>=0&&e<=100}function Ce(e,t,n){e.setTimeout((function(){return function e(t,n,r,a,o,s){void 0===t&&(t={}),void 0===n&&(n=[]),void 0===o&&(o=[]),void 0===s&&(s=!1);var u=n,l=u[0],c=u.slice(1);if("string"==typeof l)e(t,br[l],r,a,o,s);else if(l){var d=function(e,t){var n=Tr[e.id()],i=null;if(null==n)return i=t(e),Tr[e.id()]=[[t,i]],i;for(var r=0;r<n.length;r++){var a=n[r],o=a[0],s=a[1];o===t&&(i=s)}return null===i&&(i=t(e),n.push([t,i])),i}(a,l);if(!d.setSource)return o.push(d),e(t,c,r,a,o,s);d.setSource(i({},t),(function(n,i){if(n)return e(t,c,r,a,o,s);o.push(d),e(i,t.type===i.type?c:br[i.type],r,a,o,s)}))}else c.length?e(t,c,r,a,o,s):s?r(t,o):e(t,br["*"],r,a,o,!0)}(t,br[t.type],n,e)}),1)}function Oe(e,t,n,i){void 0===i&&(i=null);var r="call"+kt(n),a=e.reduce(je(r),i),o=a===Sr,s=o?null:t[n](a);return function(e,t,n,i){for(var r=e.length-1;r>=0;r--){var a=e[r];a[t]&&a[t](i,n)}}(e,n,s,o),s}function je(e){return function(t,n){return t===Sr?Sr:n[e]?n[e](t):t}}function Le(e){if(!e.type){var t=Cr(e.src);t&&(e.type=t)}return e}function xe(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function Ie(e,t,n){try{e.style[t]=n}catch(e){return}}function Pe(e,t){return void 0===t&&(t=e),Nr(e,t)}function Re(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}function Me(e,t,n){var i=Me.getPlayer(e);if(i)return t&&We.warn('Player "'+e+'" is already initialised. Options will not be applied.'),n&&i.ready(n),i;var a="string"==typeof e?Ye("#"+yo(e)):e;if(!c(a))throw new TypeError("The element or ID supplied is not valid. (videojs)");a.ownerDocument.defaultView&&a.ownerDocument.body.contains(a)||We.warn("The element supplied is not included in the DOM"),t=t||{},Me.hooks("beforesetup").forEach((function(e){var n=e(a,X(t));r(n)&&!Array.isArray(n)?t=X(t,n):We.error("please return an object in beforesetup hooks")}));var o=Et.getComponent("Player");return i=new o(a,t,n),Me.hooks("setup").forEach((function(e){return e(i)})),i}function De(){return(De=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Ue(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Be(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(t){for(var n=e.atob(t),i=new Uint8Array(n.length),r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i}function Fe(e,t){return function(n){var i=this;if(!t)return new Td(e);if(Td&&!n){var r=Ve(t.toString().replace(/^function.+?{/,"").slice(0,-1));return this[gd]=new Td(r),function(e,t){if(e&&t){var n=e.terminate;e.objURL=t,e.terminate=function(){e.objURL&&bd.revokeObjectURL(e.objURL),n.call(e)}}}(this[gd],r),this[gd]}var a={postMessage:function(e){i.onmessage&&setTimeout((function(){i.onmessage({data:e,target:a})}))}};t.call(a),this.postMessage=function(e){setTimeout((function(){a.onmessage({data:e,target:i})}))},this.isThisThread=!0}}function Ve(e){try{return bd.createObjectURL(new Blob([e],{type:yd}))}catch(n){var t=new _d;return t.append(e),bd.createObjectURL(t.getBlob(type))}}function He(){}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var qe="7.6.3",ze=[],Ge=function(t,n){return function(i,r,a){var o=n.levels[r],s=new RegExp("^("+o+")$");if("log"!==i&&a.unshift(i.toUpperCase()+":"),a.unshift(t+":"),ze&&ze.push([].concat(a)),e.console){var u=e.console[i];u||"debug"!==i||(u=e.console.info||e.console.log),u&&o&&s.test(i)&&u[Array.isArray(a)?"apply":"call"](e.console,a)}}},We=function e(t){var n,i="info",r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n("log",i,t)};return n=Ge(t,r),r.createLogger=function(n){return e(t+": "+n)},r.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:i},r.level=function(e){if("string"==typeof e){if(!r.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');i=e}return i},(r.history=function(){return ze?[].concat(ze):[]}).filter=function(e){return(ze||[]).filter((function(t){return new RegExp(".*"+e+".*").test(t[0])}))},r.history.clear=function(){ze&&(ze.length=0)},r.history.disable=function(){null!==ze&&(ze.length=0,ze=null)},r.history.enable=function(){null===ze&&(ze=[])},r.error=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("error",i,t)},r.warn=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("warn",i,t)},r.debug=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n("debug",i,t)},r}("VIDEOJS"),$e=We.createLogger,Xe=Object.prototype.toString,Ke=function(e){return r(e)?Object.keys(e):[]},Ye=f("querySelector"),Je=f("querySelectorAll"),Ze=Object.freeze({isReal:l,isEl:c,isInFrame:d,createEl:h,textContent:p,prependTo:m,hasClass:v,addClass:g,removeClass:y,toggleClass:_,setAttributes:b,getAttributes:T,getAttribute:S,setAttribute:w,removeAttribute:k,blockTextSelection:E,unblockTextSelection:A,getBoundingClientRect:C,findPosition:O,getPointerPosition:j,isTextNode:L,emptyEl:x,normalizeContent:I,appendContent:P,insertContent:R,isSingleLeftClick:M,$:Ye,$$:Je}),Qe=new WeakMap,et=1,tt=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){tt=!0}});e.addEventListener("test",null,t),e.removeEventListener("test",null,t)}catch(e){}}();var nt,it=["touchstart","touchmove"],rt=Object.freeze({fixEvent:N,on:F,off:V,trigger:H,one:q,any:z}),at=!1,ot=function(){if(l()&&!1!==nt.options.autoSetup){var e=Array.prototype.slice.call(t.getElementsByTagName("video")),n=Array.prototype.slice.call(t.getElementsByTagName("audio")),i=Array.prototype.slice.call(t.getElementsByTagName("video-js")),r=e.concat(n,i);if(r&&r.length>0)for(var a=0,o=r.length;a<o;a++){var s=r[a];if(!s||!s.getAttribute){G(1);break}if(void 0===s.player)null!==s.getAttribute("data-setup")&&nt(s)}else at||G(1)}};l()&&"complete"===t.readyState?at=!0:q(e,"load",(function(){at=!0}));var st,ut=function(e){var n=t.createElement("style");return n.className=e,n},lt=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t},ct=30,dt=function(e,t,n){t.guid||(t.guid=D());var i=t.bind(e);return i.guid=n?n+"_"+t.guid:t.guid,i},ft=function(t,n){var i=e.performance.now();return function(){var r=e.performance.now();r-i>=n&&(t.apply(void 0,arguments),i=r)}},ht=function(){};ht.prototype.allowedEvents_={},ht.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},F(this,e,t),this.addEventListener=n},ht.prototype.addEventListener=ht.prototype.on,ht.prototype.off=function(e,t){V(this,e,t)},ht.prototype.removeEventListener=ht.prototype.off,ht.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},q(this,e,t),this.addEventListener=n},ht.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},z(this,e,t),this.addEventListener=n},ht.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=N(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),H(this,e)},ht.prototype.dispatchEvent=ht.prototype.trigger,ht.prototype.queueTrigger=function(t){var n=this;st||(st=new Map);var i=t.type||t,r=st.get(this);r||(r=new Map,st.set(this,r));var a=r.get(i);r.delete(i),e.clearTimeout(a);var o=e.setTimeout((function(){0===r.size&&(r=null,st.delete(n)),n.trigger(t)}),0);r.set(i,o)};var pt=function(e){return e instanceof ht||!!e.eventBusEl_&&["on","one","off","trigger"].every((function(t){return"function"==typeof e[t]}))},mt=function(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length},vt=function(e){if(!e.nodeName&&!pt(e))throw new Error("Invalid target; must be a DOM node or evented object.")},gt=function(e){if(!mt(e))throw new Error("Invalid event type; must be a non-empty string or array.")},yt=function(e){if("function"!=typeof e)throw new Error("Invalid listener; must be a function.")},_t=function(e,t){var n,i,r,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return a?(n=e.eventBusEl_,t.length>=3&&t.shift(),i=t[0],r=t[1]):(n=t[0],i=t[1],r=t[2]),vt(n),gt(i),yt(r),{isTargetingSelf:a,target:n,type:i,listener:r=dt(e,r)}},bt=function(e,t,n,i){vt(e),e.nodeName?rt[t](e,n,i):e[t](n,i)},Tt={on:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=_t(this,n),a=r.isTargetingSelf,o=r.target,s=r.type,u=r.listener;if(bt(o,"on",s,u),!a){var l=function(){return e.off(o,s,u)};l.guid=u.guid;var c=function(){return e.off("dispose",l)};c.guid=u.guid,bt(this,"on","dispose",l),bt(o,"on","dispose",c)}},one:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=_t(this,n),a=r.isTargetingSelf,o=r.target,s=r.type,u=r.listener;if(a)bt(o,"one",s,u);else{var l=function t(){e.off(o,s,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];u.apply(null,i)};l.guid=u.guid,bt(o,"one",s,l)}},any:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=_t(this,n),a=r.isTargetingSelf,o=r.target,s=r.type,u=r.listener;if(a)bt(o,"any",s,u);else{var l=function t(){e.off(o,s,t);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];u.apply(null,i)};l.guid=u.guid,bt(o,"any",s,l)}},off:function(e,t,n){if(!e||mt(e))V(this.eventBusEl_,e,t);else{var i=e,r=t;vt(i),gt(r),yt(n),n=dt(this,n),this.off("dispose",n),i.nodeName?(V(i,r,n),V(i,"dispose",n)):pt(i)&&(i.off(r,n),i.off("dispose",n))}},trigger:function(e,t){return H(this.eventBusEl_,e,t)}},St={state:{},setState:function(e){var t,i=this;return"function"==typeof e&&(e=e()),n(e,(function(e,n){i.state[n]!==e&&((t=t||{})[n]={from:i.state[n],to:e}),i.state[n]=e})),t&&pt(this)&&this.trigger({changes:t,type:"statechanged"}),t}},wt=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toLowerCase()}))},kt=function(e){return"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))},Et=function(){function t(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.parentComponent_=null,this.options_=X({},this.options_),t=this.options_=X(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+D()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&W(this,{eventBusKey:this.el_?"el_":null}),$(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var n=t.prototype;return n.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=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_),Qe.has(this.el_)&&Qe.delete(this.el_),this.el_=null),this.player_=null},n.player=function(){return this.player_},n.options=function(e){return e?(this.options_=X(this.options_,e),this.options_):this.options_},n.el=function(){return this.el_},n.createEl=function(e,t,n){return h(e,t,n)},n.localize=function(e,t,n){void 0===n&&(n=e);var i=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),a=r&&r[i],o=i&&i.split("-")[0],s=r&&r[o],u=n;return a&&a[e]?u=a[e]:s&&s[e]&&(u=s[e]),t&&(u=u.replace(/\{(\d+)\}/g,(function(e,n){var i=t[n-1],r=i;return void 0===i&&(r=e),r}))),u},n.contentEl=function(){return this.contentEl_||this.el_},n.id=function(){return this.id_},n.name=function(){return this.name_},n.children=function(){return this.children_},n.getChildById=function(e){return this.childIndex_[e]},n.getChild=function(e){if(e)return this.childNameIndex_[e]},n.addChild=function(e,n,i){var r,a;if(void 0===n&&(n={}),void 0===i&&(i=this.children_.length),"string"==typeof e){a=kt(e);var o=n.componentClass||a;n.name=a;var s=t.getComponent(o);if(!s)throw new Error("Component "+o+" does not exist");if("function"!=typeof s)return null;r=new s(this.player_||this,n)}else r=e;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(i,0,r),r.parentComponent_=this,"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(a=a||r.name&&kt(r.name()))&&(this.childNameIndex_[a]=r,this.childNameIndex_[wt(a)]=r),"function"==typeof r.el&&r.el()){var u=this.contentEl().children[i]||null;this.contentEl().insertBefore(r.el(),u)}return r},n.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(t){e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[kt(e.name())]=null,this.childNameIndex_[wt(e.name())]=null;var i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},n.initChildren=function(){var e=this,n=this.options_.children;if(n){var i,r=this.options_,a=t.getComponent("Tech");(i=Array.isArray(n)?n:Object.keys(n)).concat(Object.keys(this.options_).filter((function(e){return!i.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(t){var i,r;return"string"==typeof t?r=n[i=t]||e.options_[i]||{}:(i=t.name,r=t),{name:i,opts:r}})).filter((function(e){var n=t.getComponent(e.opts.componentClass||kt(e.name));return n&&!a.isTech(n)})).forEach((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 a=e.addChild(n,i);a&&(e[n]=a)}}))}},n.buildCSSClass=function(){return""},n.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))},n.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)},n.$=function(e,t){return Ye(e,t||this.contentEl())},n.$$=function(e,t){return Je(e,t||this.contentEl())},n.hasClass=function(e){return v(this.el_,e)},n.addClass=function(e){g(this.el_,e)},n.removeClass=function(e){y(this.el_,e)},n.toggleClass=function(e,t){_(this.el_,e,t)},n.show=function(){this.removeClass("vjs-hidden")},n.hide=function(){this.addClass("vjs-hidden")},n.lockShowing=function(){this.addClass("vjs-lock-showing")},n.unlockShowing=function(){this.removeClass("vjs-lock-showing")},n.getAttribute=function(e){return S(this.el_,e)},n.setAttribute=function(e,t){w(this.el_,e,t)},n.removeAttribute=function(e){k(this.el_,e)},n.width=function(e,t){return this.dimension("width",e,t)},n.height=function(e,t){return this.dimension("height",e,t)},n.dimensions=function(e,t){this.width(e,!0),this.height(t)},n.dimension=function(e,t,n){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(n||this.trigger("componentresize"));if(!this.el_)return 0;var i=this.el_.style[e],r=i.indexOf("px");return-1!==r?parseInt(i.slice(0,r),10):parseInt(this.el_["offset"+kt(e)],10)},n.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=o(this.el_,e),0===(t=parseFloat(t))||isNaN(t)){var n="offset"+kt(e);t=this.el_[n]}return t},n.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.currentWidth=function(){return this.currentDimension("width")},n.currentHeight=function(){return this.currentDimension("height")},n.focus=function(){this.el_.focus()},n.blur=function(){this.el_.blur()},n.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},n.handleKeyPress=function(e){this.handleKeyDown(e)},n.emitTapEvents=function(){var t,n=0,i=null;this.on("touchstart",(function(r){1===r.touches.length&&(i={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},n=e.performance.now(),t=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)t=!1;else if(i){var n=e.touches[0].pageX-i.pageX,r=e.touches[0].pageY-i.pageY;Math.sqrt(n*n+r*r)>10&&(t=!1)}}));var r=function(){t=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",(function(r){i=null,!0===t&&e.performance.now()-n<200&&(r.preventDefault(),this.trigger("tap"))}))},n.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e,t=dt(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){t(),this.clearInterval(e),e=this.setInterval(t,250)}));var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},n.setTimeout=function(t,n){var i,r=this;return t=dt(this,t),this.clearTimersOnDispose_(),i=e.setTimeout((function(){r.setTimeoutIds_.has(i)&&r.setTimeoutIds_.delete(i),t()}),n),this.setTimeoutIds_.add(i),i},n.clearTimeout=function(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_.delete(t),e.clearTimeout(t)),t},n.setInterval=function(t,n){t=dt(this,t),this.clearTimersOnDispose_();var i=e.setInterval(t,n);return this.setIntervalIds_.add(i),i},n.clearInterval=function(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_.delete(t),e.clearInterval(t)),t},n.requestAnimationFrame=function(t){var n,i=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),t=dt(this,t),n=e.requestAnimationFrame((function(){i.rafIds_.has(n)&&i.rafIds_.delete(n),t()})),this.rafIds_.add(n),n):this.setTimeout(t,1e3/60)},n.cancelAnimationFrame=function(t){return this.supportsRaf_?(this.rafIds_.has(t)&&(this.rafIds_.delete(t),e.cancelAnimationFrame(t)),t):this.clearTimeout(t)},n.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(t){var n=t[0],i=t[1];e[n].forEach(e[i],e)})),e.clearingTimersOnDispose_=!1})))},t.registerComponent=function(e,n){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var i=t.getComponent("Tech"),r=i&&i.isTech(n),a=t===n||t.prototype.isPrototypeOf(n.prototype);if(r||!a)throw new Error('Illegal component, "'+e+'"; '+(r?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");e=kt(e),t.components_||(t.components_={});var o=t.getComponent("Player");if("Player"===e&&o&&o.players){var s=o.players,u=Object.keys(s);if(s&&u.length>0&&u.map((function(e){return s[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,t.components_[wt(e)]=n,n},t.getComponent=function(e){if(e&&t.components_)return t.components_[e]},t}();Et.prototype.supportsRaf_="function"==typeof e.requestAnimationFrame&&"function"==typeof e.cancelAnimationFrame,Et.registerComponent("Component",Et);for(var At,Ct=e.navigator&&e.navigator.userAgent||"",Ot=/AppleWebKit\/([\d.]+)/i.exec(Ct),jt=Ot?parseFloat(Ot.pop()):null,Lt=/iPad/i.test(Ct),xt=/iPhone/i.test(Ct)&&!Lt,It=/iPod/i.test(Ct),Pt=xt||Lt||It,Rt=function(){var e=Ct.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null}(),Mt=/Android/i.test(Ct),Dt=function(){var e=Ct.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),Ut=Mt&&Dt<5&&jt<537,Bt=/Firefox/i.test(Ct),Nt=/Edge/i.test(Ct),Ft=!Nt&&(/Chrome/i.test(Ct)||/CriOS/i.test(Ct)),Vt=function(){var e=Ct.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null}(),Ht=function(){var e=/MSIE\s(\d+)\.\d/.exec(Ct),t=e&&parseFloat(e[1]);return!t&&/Trident\/7.0/i.test(Ct)&&/rv:11.0/.test(Ct)&&(t=11),t}(),qt=/Safari/i.test(Ct)&&!Ft&&!Mt&&!Nt,zt=(qt||Pt)&&!Ft,Gt=/Windows/i.test(Ct),Wt=(l()&&("ontouchstart"in e||e.navigator.maxTouchPoints||e.DocumentTouch&&e.document instanceof e.DocumentTouch)),$t=Object.freeze({IS_IPAD:Lt,IS_IPHONE:xt,IS_IPOD:It,IS_IOS:Pt,IOS_VERSION:Rt,IS_ANDROID:Mt,ANDROID_VERSION:Dt,IS_NATIVE_ANDROID:Ut,IS_FIREFOX:Bt,IS_EDGE:Nt,IS_CHROME:Ft,CHROME_VERSION:Vt,IE_VERSION:Ht,IS_SAFARI:qt,IS_ANY_SAFARI:zt,IS_WINDOWS:Gt,TOUCH_ENABLED:Wt}),Xt={prefixed:!0},Kt=[["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"]],Yt=Kt[0],Jt=0;Jt<Kt.length;Jt++)if(Kt[Jt][1]in t){At=Kt[Jt];break}if(At){for(var Zt=0;Zt<At.length;Zt++)Xt[Yt[Zt]]=At[Zt];Xt.prefixed=At[0]!==Yt[0]}re.prototype.code=0,re.prototype.message="",re.prototype.status=null,re.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],re.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Qt=0;Qt<re.errorTypes.length;Qt++)re[re.errorTypes[Qt]]=Qt,re.prototype[re.errorTypes[Qt]]=Qt;var en=function(e,t){var n,i=null;try{n=JSON.parse(e,t)}catch(e){i=e}return[i,n]},tn=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,n,i){return e[n]&&(t[n]=e[n]),t}),{cues:e.cues&&Array.prototype.map.call(e.cues,(function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}}))})},nn=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,(function(e){return e.track}));return Array.prototype.map.call(t,(function(e){var t=tn(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===n.indexOf(e)})).map(tn))},rn=function(e,t){return e.forEach((function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return n.addCue(e)}))})),t.textTracks()},an=se((function(e,t){function n(e){if(e&&"object"==typeof e){var t=e.which||e.keyCode||e.charCode;t&&(e=t)}if("number"==typeof e)return o[e];var n,a=String(e);return(n=i[a.toLowerCase()])?n:(n=r[a.toLowerCase()])||(1===a.length?a.charCodeAt(0):void 0)}n.isEventKey=function(e,t){if(e&&"object"==typeof e){var n=e.which||e.keyCode||e.charCode;if(null==n)return!1;if("string"==typeof t){var a;if(a=i[t.toLowerCase()])return a===n;if(a=r[t.toLowerCase()])return a===n}else if("number"==typeof t)return t===n;return!1}};var i=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(a=97;a<123;a++)i[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)i[a-48]=a;for(a=1;a<13;a++)i["f"+a]=a+111;for(a=0;a<10;a++)i["numpad "+a]=a+96;var o=t.names=t.title={};for(a in i)o[i[a]]=a;for(var s in r)i[s]=r[s]})),on=(an.code,an.codes,an.aliases,an.names,an.title,"vjs-modal-dialog"),sn=function(n){function i(e,t){var i;return(i=n.call(this,e,t)||this).opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=h("div",{className:on+"-content"},{role:"document"}),i.descEl_=h("p",{className:on+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),p(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}K(i,n);var r=i.prototype;return r.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},r.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,n.prototype.dispose.call(this)},r.buildCSSClass=function(){return on+" vjs-hidden "+n.prototype.buildCSSClass.call(this)},r.label=function(){return this.localize(this.options_.label||"Modal Window")},r.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},r.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},r.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},r.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},r.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,n=this.getChild("closeButton");if(t&&!n){var i=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=i,this.on(n,"close",this.close)}!t&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},r.fill=function(){this.fillWith(this.content())},r.fillWith=function(e){var t=this.contentEl(),n=t.parentNode,i=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),R(t,e),this.trigger("modalfill"),i?n.insertBefore(t,i):n.appendChild(t);var r=this.getChild("closeButton");r&&n.appendChild(r.el_)},r.empty=function(){this.trigger("beforemodalempty"),x(this.contentEl()),this.trigger("modalempty")},r.content=function(e){return void 0!==e&&(this.content_=e),this.content_},r.conditionalFocus_=function(){var e=t.acti