/*

 Video.js 6.10.1 <http://videojs.com/>
 Copyright Brightcove, Inc. <https://www.brightcove.com/>
 Available under Apache License Version 2.0
 <https://github.com/videojs/video.js/blob/master/LICENSE>

 Includes vtt.js <https://github.com/mozilla/vtt.js>
 Available under Apache License Version 2.0
 <https://github.com/mozilla/vtt.js/blob/master/LICENSE>
*/
var $jscomp={scope:{},getGlobal:function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global?global:e}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(e){return"jscomp_symbol_"+e+$jscomp.symbolCounter_++};
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};$jscomp.makeIterator=function(e){$jscomp.initSymbolIterator();if(e[$jscomp.global.Symbol.iterator])return e[$jscomp.global.Symbol.iterator]();var h=0;return{next:function(){return h==e.length?{done:!0}:{done:!1,value:e[h++]}}}};
$jscomp.arrayFromIterator=function(e){for(var h,k=[];!(h=e.next()).done;)k.push(h.value);return k};$jscomp.arrayFromIterable=function(e){return e instanceof Array?e:$jscomp.arrayFromIterator($jscomp.makeIterator(e))};
$jscomp.inherits=function(e,h){function k(){}k.prototype=h.prototype;e.prototype=new k;e.prototype.constructor=e;for(var l in h)if($jscomp.global.Object.defineProperties){var q=$jscomp.global.Object.getOwnPropertyDescriptor(h,l);q&&$jscomp.global.Object.defineProperty(e,l,q)}else e[l]=h[l]};$jscomp.array=$jscomp.array||{};$jscomp.array.done_=function(){return{done:!0,value:void 0}};
$jscomp.array.arrayIterator_=function(e,h){e instanceof String&&(e=String(e));var k=0;$jscomp.initSymbol();$jscomp.initSymbolIterator();var l={},q=(l.next=function(){if(k<e.length){var l=k++;return{value:h(l,e[l]),done:!1}}q.next=$jscomp.array.done_;return $jscomp.array.done_()},l[Symbol.iterator]=function(){return q},l);return q};
$jscomp.array.findInternal_=function(e,h,k){e instanceof String&&(e=String(e));for(var l=e.length,q=0;q<l;q++){var A=e[q];if(h.call(k,A,q,e))return{i:q,v:A}}return{i:-1,v:void 0}};
$jscomp.array.from=function(e,h,k){h=void 0===h?function(e){return e}:h;var l=[];$jscomp.initSymbol();$jscomp.initSymbolIterator();if(e[Symbol.iterator]){$jscomp.initSymbol();$jscomp.initSymbolIterator();e=e[Symbol.iterator]();for(var q;!(q=e.next()).done;)l.push(h.call(k,q.value))}else{q=e.length;for(var A=0;A<q;A++)l.push(h.call(k,e[A]))}return l};$jscomp.array.of=function(e){for(var h=[],k=0;k<arguments.length;++k)h[k-0]=arguments[k];return $jscomp.array.from(h)};
$jscomp.array.entries=function(){return $jscomp.array.arrayIterator_(this,function(e,h){return[e,h]})};$jscomp.array.entries$install=function(){Array.prototype.entries||(Array.prototype.entries=$jscomp.array.entries)};$jscomp.array.keys=function(){return $jscomp.array.arrayIterator_(this,function(e){return e})};$jscomp.array.keys$install=function(){Array.prototype.keys||(Array.prototype.keys=$jscomp.array.keys)};$jscomp.array.values=function(){return $jscomp.array.arrayIterator_(this,function(e,h){return h})};
$jscomp.array.values$install=function(){Array.prototype.values||(Array.prototype.values=$jscomp.array.values)};$jscomp.array.copyWithin=function(e,h,k){var l=this.length;e=Number(e);h=Number(h);k=Number(null!=k?k:l);if(e<h)for(k=Math.min(k,l);h<k;)h in this?this[e++]=this[h++]:(delete this[e++],h++);else for(k=Math.min(k,l+h-e),e+=k-h;k>h;)--k in this?this[--e]=this[k]:delete this[e];return this};$jscomp.array.copyWithin$install=function(){Array.prototype.copyWithin||(Array.prototype.copyWithin=$jscomp.array.copyWithin)};
$jscomp.array.fill=function(e,h,k){null!=k&&e.length||(k=this.length||0);k=Number(k);for(h=Number((void 0===h?0:h)||0);h<k;h++)this[h]=e;return this};$jscomp.array.fill$install=function(){Array.prototype.fill||(Array.prototype.fill=$jscomp.array.fill)};$jscomp.array.find=function(e,h){return $jscomp.array.findInternal_(this,e,h).v};$jscomp.array.find$install=function(){Array.prototype.find||(Array.prototype.find=$jscomp.array.find)};
$jscomp.array.findIndex=function(e,h){return $jscomp.array.findInternal_(this,e,h).i};$jscomp.array.findIndex$install=function(){Array.prototype.findIndex||(Array.prototype.findIndex=$jscomp.array.findIndex)};$jscomp.Map=function(e){e=void 0===e?[]:e;this.data_={};this.head_=$jscomp.Map.createHead_();this.size=0;if(e){e=$jscomp.makeIterator(e);for(var h=e.next();!h.done;h=e.next())h=h.value,this.set(h[0],h[1])}};
$jscomp.Map.checkBrowserConformance_=function(){var e=$jscomp.global.Map;if(!e||!e.prototype.entries||!Object.seal)return!1;try{var h=Object.seal({x:4}),k=new e($jscomp.makeIterator([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),q=l.next();if(q.done||q.value[0]!=h||"s"!=q.value[1])return!1;q=l.next();return q.done||4!=q.value[0].x||"t"!=q.value[1]||!l.next().done?!1:!0}catch(A){return!1}};
$jscomp.Map.createHead_=function(){var e={};return e.previous=e.next=e.head=e};$jscomp.Map.getId_=function(e){if(!(e instanceof Object))return String(e);$jscomp.Map.key_ in e||e instanceof Object&&Object.isExtensible&&Object.isExtensible(e)&&$jscomp.Map.defineProperty_(e,$jscomp.Map.key_,++$jscomp.Map.index_);return $jscomp.Map.key_ in e?e[$jscomp.Map.key_]:" "+e};
$jscomp.Map.prototype.set=function(e,h){var k=this.maybeGetEntry_(e),l=k.id,q=k.list,k=k.entry;q||(q=this.data_[l]=[]);k?k.value=h:(k={next:this.head_,previous:this.head_.previous,head:this.head_,key:e,value:h},q.push(k),this.head_.previous.next=k,this.head_.previous=k,this.size++);return this};
$jscomp.Map.prototype["delete"]=function(e){var h=this.maybeGetEntry_(e);e=h.id;var k=h.list,l=h.index;return(h=h.entry)&&k?(k.splice(l,1),k.length||delete this.data_[e],h.previous.next=h.next,h.next.previous=h.previous,h.head=null,this.size--,!0):!1};$jscomp.Map.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=$jscomp.Map.createHead_();this.size=0};$jscomp.Map.prototype.has=function(e){return!!this.maybeGetEntry_(e).entry};
$jscomp.Map.prototype.get=function(e){return(e=this.maybeGetEntry_(e).entry)&&e.value};$jscomp.Map.prototype.maybeGetEntry_=function(e){var h=$jscomp.Map.getId_(e),k=this.data_[h];if(k)for(var l=0;l<k.length;l++){var q=k[l];if(e!==e&&q.key!==q.key||e===q.key)return{id:h,list:k,index:l,entry:q}}return{id:h,list:k,index:-1,entry:void 0}};$jscomp.Map.prototype.entries=function(){return this.iter_(function(e){return[e.key,e.value]})};$jscomp.Map.prototype.keys=function(){return this.iter_(function(e){return e.key})};
$jscomp.Map.prototype.values=function(){return this.iter_(function(e){return e.value})};$jscomp.Map.prototype.forEach=function(e,h){for(var k=$jscomp.makeIterator(this.entries()),l=k.next();!l.done;l=k.next())l=l.value,e.call(h,l[1],l[0],this)};
$jscomp.Map.prototype.iter_=function(e){var h=this,k=this.head_;$jscomp.initSymbol();$jscomp.initSymbolIterator();var l={};return l.next=function(){if(k){for(;k.head!=h.head_;)k=k.previous;for(;k.next!=k.head;)return k=k.next,{done:!1,value:e(k)};k=null}return{done:!0,value:void 0}},l[Symbol.iterator]=function(){return this},l};$jscomp.Map.index_=0;$jscomp.Map.defineProperty_=Object.defineProperty?function(e,h,k){Object.defineProperty(e,h,{value:String(k)})}:function(e,h,k){e[h]=String(k)};
$jscomp.Map.Entry_=function(){};$jscomp.Map.ASSUME_NO_NATIVE=!1;$jscomp.Map$install=function(){$jscomp.initSymbol();$jscomp.initSymbolIterator();!$jscomp.Map.ASSUME_NO_NATIVE&&$jscomp.Map.checkBrowserConformance_()?$jscomp.Map=$jscomp.global.Map:($jscomp.initSymbol(),$jscomp.initSymbolIterator(),$jscomp.Map.prototype[Symbol.iterator]=$jscomp.Map.prototype.entries,$jscomp.initSymbol(),$jscomp.Map.key_=Symbol("map-id-key"));$jscomp.Map$install=function(){}};$jscomp.math=$jscomp.math||{};
$jscomp.math.clz32=function(e){e=Number(e)>>>0;if(0===e)return 32;var h=0;0===(e&4294901760)&&(e<<=16,h+=16);0===(e&4278190080)&&(e<<=8,h+=8);0===(e&4026531840)&&(e<<=4,h+=4);0===(e&3221225472)&&(e<<=2,h+=2);0===(e&2147483648)&&h++;return h};$jscomp.math.imul=function(e,h){e=Number(e);h=Number(h);var k=e&65535,l=h&65535;return k*l+((e>>>16&65535)*l+k*(h>>>16&65535)<<16>>>0)|0};$jscomp.math.sign=function(e){e=Number(e);return 0===e||isNaN(e)?e:0<e?1:-1};
$jscomp.math.log10=function(e){return Math.log(e)/Math.LN10};$jscomp.math.log2=function(e){return Math.log(e)/Math.LN2};$jscomp.math.log1p=function(e){e=Number(e);if(.25>e&&-.25<e){for(var h=e,k=1,l=e,q=0,A=1;q!=l;)h*=e,A*=-1,l=(q=l)+A*h/++k;return l}return Math.log(1+e)};$jscomp.math.expm1=function(e){e=Number(e);if(.25>e&&-.25<e){for(var h=e,k=1,l=e,q=0;q!=l;)h*=e/++k,l=(q=l)+h;return l}return Math.exp(e)-1};$jscomp.math.cosh=function(e){e=Number(e);return(Math.exp(e)+Math.exp(-e))/2};
$jscomp.math.sinh=function(e){e=Number(e);return 0===e?e:(Math.exp(e)-Math.exp(-e))/2};$jscomp.math.tanh=function(e){e=Number(e);if(0===e)return e;var h=Math.exp(2*-Math.abs(e)),h=(1-h)/(1+h);return 0>e?-h:h};$jscomp.math.acosh=function(e){e=Number(e);return Math.log(e+Math.sqrt(e*e-1))};$jscomp.math.asinh=function(e){e=Number(e);if(0===e)return e;var h=Math.log(Math.abs(e)+Math.sqrt(e*e+1));return 0>e?-h:h};
$jscomp.math.atanh=function(e){e=Number(e);return($jscomp.math.log1p(e)-$jscomp.math.log1p(-e))/2};
$jscomp.math.hypot=function(e,h,k){for(var l=[],q=2;q<arguments.length;++q)l[q-2]=arguments[q];e=Number(e);h=Number(h);for(var A=Math.max(Math.abs(e),Math.abs(h)),M=$jscomp.makeIterator(l),q=M.next();!q.done;q=M.next())A=Math.max(A,Math.abs(q.value));if(1E100<A||1E-100>A){e/=A;h/=A;M=e*e+h*h;l=$jscomp.makeIterator(l);for(q=l.next();!q.done;q=l.next())q=q.value,q=Number(q)/A,M+=q*q;return Math.sqrt(M)*A}A=e*e+h*h;l=$jscomp.makeIterator(l);for(q=l.next();!q.done;q=l.next())q=q.value,q=Number(q),A+=
q*q;return Math.sqrt(A)};$jscomp.math.trunc=function(e){e=Number(e);if(isNaN(e)||Infinity===e||-Infinity===e||0===e)return e;var h=Math.floor(Math.abs(e));return 0>e?-h:h};$jscomp.math.cbrt=function(e){if(0===e)return e;e=Number(e);var h=Math.pow(Math.abs(e),1/3);return 0>e?-h:h};$jscomp.number=$jscomp.number||{};$jscomp.number.isFinite=function(e){return"number"!==typeof e?!1:!isNaN(e)&&Infinity!==e&&-Infinity!==e};
$jscomp.number.isInteger=function(e){return $jscomp.number.isFinite(e)?e===Math.floor(e):!1};$jscomp.number.isNaN=function(e){return"number"===typeof e&&isNaN(e)};$jscomp.number.isSafeInteger=function(e){return $jscomp.number.isInteger(e)&&Math.abs(e)<=$jscomp.number.MAX_SAFE_INTEGER};$jscomp.number.EPSILON=Math.pow(2,-52);$jscomp.number.MAX_SAFE_INTEGER=9007199254740991;$jscomp.number.MIN_SAFE_INTEGER=-9007199254740991;$jscomp.object=$jscomp.object||{};
$jscomp.object.assign=function(e,h){for(var k=[],l=1;l<arguments.length;++l)k[l-1]=arguments[l];k=$jscomp.makeIterator(k);for(l=k.next();!l.done;l=k.next())if(l=l.value)for(var q in l)Object.prototype.hasOwnProperty.call(l,q)&&(e[q]=l[q]);return e};$jscomp.object.is=function(e,h){return e===h?0!==e||1/e===1/h:e!==e&&h!==h};$jscomp.Set=function(e){e=void 0===e?[]:e;this.map_=new $jscomp.Map;if(e){e=$jscomp.makeIterator(e);for(var h=e.next();!h.done;h=e.next())this.add(h.value)}this.size=this.map_.size};
$jscomp.Set.checkBrowserConformance_=function(){var e=$jscomp.global.Set;if(!e||!e.prototype.entries||!Object.seal)return!1;var h=Object.seal({x:4}),e=new e($jscomp.makeIterator([h]));if(e.has(h)||1!=e.size||e.add(h)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var e=e.entries(),k=e.next();if(k.done||k.value[0]!=h||k.value[1]!=h)return!1;k=e.next();return k.done||k.value[0]==h||4!=k.value[0].x||k.value[1]!=k.value[0]?!1:e.next().done};
$jscomp.Set.prototype.add=function(e){this.map_.set(e,e);this.size=this.map_.size;return this};$jscomp.Set.prototype["delete"]=function(e){e=this.map_["delete"](e);this.size=this.map_.size;return e};$jscomp.Set.prototype.clear=function(){this.map_.clear();this.size=0};$jscomp.Set.prototype.has=function(e){return this.map_.has(e)};$jscomp.Set.prototype.entries=function(){return this.map_.entries()};$jscomp.Set.prototype.values=function(){return this.map_.values()};
$jscomp.Set.prototype.forEach=function(e,h){var k=this;this.map_.forEach(function(l){return e.call(h,l,l,k)})};$jscomp.Set.ASSUME_NO_NATIVE=!1;$jscomp.Set$install=function(){!$jscomp.Set.ASSUME_NO_NATIVE&&$jscomp.Set.checkBrowserConformance_()?$jscomp.Set=$jscomp.global.Set:($jscomp.Map$install(),$jscomp.initSymbol(),$jscomp.initSymbolIterator(),$jscomp.Set.prototype[Symbol.iterator]=$jscomp.Set.prototype.values);$jscomp.Set$install=function(){}};$jscomp.string=$jscomp.string||{};
$jscomp.string.noRegExp_=function(e,h){if(e instanceof RegExp)throw new TypeError("First argument to String.prototype."+h+" must not be a regular expression");};
$jscomp.string.fromCodePoint=function(e){for(var h=[],k=0;k<arguments.length;++k)h[k-0]=arguments[k];for(var k="",h=$jscomp.makeIterator(h),l=h.next();!l.done;l=h.next()){l=l.value;l=+l;if(0>l||1114111<l||l!==Math.floor(l))throw new RangeError("invalid_code_point "+l);65535>=l?k+=String.fromCharCode(l):(l-=65536,k+=String.fromCharCode(l>>>10&1023|55296),k+=String.fromCharCode(l&1023|56320))}return k};
$jscomp.string.repeat=function(e){var h=this.toString();if(0>e||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var k="";e;)if(e&1&&(k+=h),e>>>=1)h+=h;return k};$jscomp.string.repeat$install=function(){String.prototype.repeat||(String.prototype.repeat=$jscomp.string.repeat)};
$jscomp.string.codePointAt=function(e){var h=this.toString(),k=h.length;e=Number(e)||0;if(0<=e&&e<k){e|=0;var l=h.charCodeAt(e);if(55296>l||56319<l||e+1===k)return l;e=h.charCodeAt(e+1);return 56320>e||57343<e?l:1024*(l-55296)+e+9216}};$jscomp.string.codePointAt$install=function(){String.prototype.codePointAt||(String.prototype.codePointAt=$jscomp.string.codePointAt)};
$jscomp.string.includes=function(e,h){h=void 0===h?0:h;$jscomp.string.noRegExp_(e,"includes");return-1!==this.toString().indexOf(e,h)};$jscomp.string.includes$install=function(){String.prototype.includes||(String.prototype.includes=$jscomp.string.includes)};
$jscomp.string.startsWith=function(e,h){h=void 0===h?0:h;$jscomp.string.noRegExp_(e,"startsWith");var k=this.toString();e+="";for(var l=k.length,q=e.length,A=Math.max(0,Math.min(h|0,k.length)),M=0;M<q&&A<l;)if(k[A++]!=e[M++])return!1;return M>=q};$jscomp.string.startsWith$install=function(){String.prototype.startsWith||(String.prototype.startsWith=$jscomp.string.startsWith)};
$jscomp.string.endsWith=function(e,h){$jscomp.string.noRegExp_(e,"endsWith");var k=this.toString();e+="";void 0===h&&(h=k.length);for(var l=Math.max(0,Math.min(h|0,k.length)),q=e.length;0<q&&0<l;)if(k[--l]!=e[--q])return!1;return 0>=q};$jscomp.string.endsWith$install=function(){String.prototype.endsWith||(String.prototype.endsWith=$jscomp.string.endsWith)};
(function(e,h){"object"===typeof exports&&"undefined"!==typeof module?module.exports=h():"function"===typeof define&&define.amd?define(h):e.videojs=h()})(this,function(){function e(d,c){return c={exports:{}},d(c,c.exports),c.exports}function h(d,c){qc(d).forEach(function(a){return c(d[a],a)})}function k(d,c){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;return qc(d).reduce(function(b,a){return c(b,d[a],a)},a)}function l(d){for(var c=arguments.length,a=Array(1<c?c-1:0),b=1;b<c;b++)a[b-
1]=arguments[b];if(Object.assign)return Object.assign.apply(Object,[d].concat(a));a.forEach(function(b){b&&h(b,function(b,a){d[a]=b})});return d}function q(d){return!!d&&"object"===("undefined"===typeof d?"undefined":pa(d))}function A(d){return q(d)&&"[object Object]"===ge.call(d)&&d.constructor===Object}function M(d,c){if(!d||!c)return"";if("function"===typeof n.getComputedStyle){var a=n.getComputedStyle(d);return a?a[c]:""}return d.currentStyle[c]||""}function rc(d){if(/\s/.test(d))throw Error("class has illegal whitespace characters");
}function ca(){return t===n.document&&"undefined"!==typeof t.createElement}function Ca(d){return q(d)&&1===d.nodeType}function sc(){try{return n.parent!==n.self}catch(d){return!0}}function tc(d){return function(c,a){if("string"!==typeof c||!/\S/.test(c))return t[d](null);"string"===typeof a&&/\S/.test(a)&&(a=t.querySelector(a));var b=Ca(a)?a:t;return b[d]&&b[d](c)}}function G(){var d=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:
{},a=arguments[3],b=t.createElement(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"div");Object.getOwnPropertyNames(d).forEach(function(a){var c=d[a];-1!==a.indexOf("aria-")||"role"===a||"type"===a?(z.warn(ob(he,a,c)),b.setAttribute(a,c)):"textContent"===a?Da(b,c):b[a]=c});Object.getOwnPropertyNames(c).forEach(function(a){b.setAttribute(a,c[a])});a&&pb(b,a);return b}function Da(d,c){"undefined"===typeof d.textContent?d.innerText=c:d.textContent=c;return d}function Ua(d,c){c.firstChild?c.insertBefore(d,
c.firstChild):c.appendChild(d)}function qa(d,c){rc(c);return d.classList?d.classList.contains(c):(new RegExp("(^|\\s)"+c+"($|\\s)")).test(d.className)}function ia(d,c){d.classList?d.classList.add(c):qa(d,c)||(d.className=(d.className+" "+c).trim());return d}function Ea(d,c){d.classList?d.classList.remove(c):(rc(c),d.className=d.className.split(/\s+/).filter(function(a){return a!==c}).join(" "));return d}function uc(d,c,a){var b=qa(d,c);"function"===typeof a&&(a=a(d,c));"boolean"!==typeof a&&(a=!b);
if(a!==b)return a?ia(d,c):Ea(d,c),d}function vc(d,c){Object.getOwnPropertyNames(c).forEach(function(a){var b=c[a];null===b||"undefined"===typeof b||!1===b?d.removeAttribute(a):d.setAttribute(a,!0===b?"":b)})}function X(d){var c={};if(d&&d.attributes&&0<d.attributes.length)for(var a=d.attributes,b=a.length-1;0<=b;b--){var g=a[b].name,f=a[b].value;if("boolean"===typeof d[g]||-1!==",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+g+","))f=null!==f?!0:!1;c[g]=f}return c}function wc(){t.body.focus();
t.onselectstart=function(){return!1}}function xc(){t.onselectstart=function(){return!0}}function Fa(d){if(d&&d.getBoundingClientRect&&d.parentNode){var c=d.getBoundingClientRect(),a={};"bottom height left right top width".split(" ").forEach(function(b){void 0!==c[b]&&(a[b]=c[b])});a.height||(a.height=parseFloat(M(d,"height")));a.width||(a.width=parseFloat(M(d,"width")));return a}}function yc(d){var c=void 0;d.getBoundingClientRect&&d.parentNode&&(c=d.getBoundingClientRect());if(!c)return{left:0,top:0};
d=t.documentElement;var a=t.body;return{left:Math.round(c.left+(n.pageXOffset||a.scrollLeft)-(d.clientLeft||a.clientLeft||0)),top:Math.round(c.top+(n.pageYOffset||a.scrollTop)-(d.clientTop||a.clientTop||0))}}function qb(d,c){var a={},b=yc(d),g=d.offsetWidth,f=d.offsetHeight,m=b.top,b=b.left,W=c.pageY,e=c.pageX;c.changedTouches&&(e=c.changedTouches[0].pageX,W=c.changedTouches[0].pageY);a.y=Math.max(0,Math.min(1,(m-W+f)/f));a.x=Math.max(0,Math.min(1,(e-b)/g));return a}function zc(d){return q(d)&&3===
d.nodeType}function sb(d){for(;d.firstChild;)d.removeChild(d.firstChild);return d}function Ac(d){"function"===typeof d&&(d=d());return(Array.isArray(d)?d:[d]).map(function(c){"function"===typeof c&&(c=c());if(Ca(c)||zc(c))return c;if("string"===typeof c&&/\S/.test(c))return t.createTextNode(c)}).filter(function(c){return c})}function pb(d,c){Ac(c).forEach(function(a){return d.appendChild(a)});return d}function Bc(d,c){return pb(sb(d),c)}function ra(d){return void 0===d.button&&void 0===d.buttons||
0===d.button&&void 0===d.buttons||9===da?!0:0!==d.button||1!==d.buttons?!1:!0}function Ga(d){var c=d[ja];c||(c=d[ja]=ka++);Ha[c]||(Ha[c]={});return Ha[c]}function Cc(d){return(d=d[ja])?!!Object.getOwnPropertyNames(Ha[d]).length:!1}function Dc(d){var c=d[ja];if(c){delete Ha[c];try{delete d[ja]}catch(a){d.removeAttribute?d.removeAttribute(ja):d[ja]=null}}}function Ec(d,c){var a=Ga(d);0===a.handlers[c].length&&(delete a.handlers[c],d.removeEventListener?d.removeEventListener(c,a.dispatcher,!1):d.detachEvent&&
d.detachEvent("on"+c,a.dispatcher));0>=Object.getOwnPropertyNames(a.handlers).length&&(delete a.handlers,delete a.dispatcher,delete a.disabled);0===Object.getOwnPropertyNames(a).length&&Dc(d)}function tb(d,c,a,b){a.forEach(function(a){d(c,a,b)})}function Va(d){function c(){return!0}function a(){return!1}if(!d||!d.isPropagationStopped){var b=d||n.event;d={};for(var g in b)"layerX"!==g&&"layerY"!==g&&"keyLocation"!==g&&"webkitMovementX"!==g&&"webkitMovementY"!==g&&("returnValue"===g&&b.preventDefault||
(d[g]=b[g]));d.target||(d.target=d.srcElement||t);d.relatedTarget||(d.relatedTarget=d.fromElement===d.target?d.toElement:d.fromElement);d.preventDefault=function(){b.preventDefault&&b.preventDefault();d.returnValue=!1;b.returnValue=!1;d.defaultPrevented=!0};d.defaultPrevented=!1;d.stopPropagation=function(){b.stopPropagation&&b.stopPropagation();d.cancelBubble=!0;b.cancelBubble=!0;d.isPropagationStopped=c};d.isPropagationStopped=a;d.stopImmediatePropagation=function(){b.stopImmediatePropagation&&
b.stopImmediatePropagation();d.isImmediatePropagationStopped=c;d.stopPropagation()};d.isImmediatePropagationStopped=a;if(null!==d.clientX&&void 0!==d.clientX){g=t.documentElement;var f=t.body;d.pageX=d.clientX+(g&&g.scrollLeft||f&&f.scrollLeft||0)-(g&&g.clientLeft||f&&f.clientLeft||0);d.pageY=d.clientY+(g&&g.scrollTop||f&&f.scrollTop||0)-(g&&g.clientTop||f&&f.clientTop||0)}d.which=d.charCode||d.keyCode;null!==d.button&&void 0!==d.button&&(d.button=d.button&1?0:d.button&4?1:d.button&2?2:0)}return d}
function U(d,c,a){if(Array.isArray(c))return tb(U,d,c,a);var b=Ga(d);b.handlers||(b.handlers={});b.handlers[c]||(b.handlers[c]=[]);a.guid||(a.guid=ka++);b.handlers[c].push(a);b.dispatcher||(b.disabled=!1,b.dispatcher=function(a,c){if(!b.disabled){a=Va(a);var m=b.handlers[a.type];if(m)for(var m=m.slice(0),W=0,e=m.length;W<e&&!a.isImmediatePropagationStopped();W++)try{m[W].call(d,a,c)}catch(h){z.error(h)}}});1===b.handlers[c].length&&(d.addEventListener?(a=!1,Fc&&-1<ie.indexOf(c)&&(a={passive:!0}),
d.addEventListener(c,b.dispatcher,a)):d.attachEvent&&d.attachEvent("on"+c,b.dispatcher))}function O(d,c,a){if(Cc(d)){var b=Ga(d);if(b.handlers){if(Array.isArray(c))return tb(O,d,c,a);if(void 0===c)for(var g in b.handlers)Object.prototype.hasOwnProperty.call(b.handlers||{},g)&&(c=d,a=g,b.handlers[a]=[],Ec(c,a));else if(g=b.handlers[c]){if(!a)b.handlers[c]=[];else if(a.guid)for(b=0;b<g.length;b++)g[b].guid===a.guid&&g.splice(b--,1);Ec(d,c)}}}}function sa(d,c,a){var b=Cc(d)?Ga(d):{},g=d.parentNode||
d.ownerDocument;"string"===typeof c?c={type:c,target:d}:c.target||(c.target=d);c=Va(c);b.dispatcher&&b.dispatcher.call(d,c,a);if(g&&!c.isPropagationStopped()&&!0===c.bubbles)sa.call(null,g,c,a);else if(!g&&!c.defaultPrevented&&(d=Ga(c.target),c.target[c.type])){d.disabled=!0;if("function"===typeof c.target[c.type])c.target[c.type]();d.disabled=!1}return!c.defaultPrevented}function Ia(d,c,a){if(Array.isArray(c))return tb(Ia,d,c,a);var b=function f(){O(d,c,f);a.apply(this,arguments)};b.guid=a.guid=
a.guid||ka++;U(d,c,b)}function ub(d,c){c&&(vb=c);n.setTimeout(je,d)}function wb(d){var c=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).eventBusKey;if(c){if(!d[c].nodeName)throw Error('The eventBusKey "'+c+'" does not refer to an element.');d.eventBusEl_=d[c]}else d.eventBusEl_=G("span",{className:"vjs-event-bus"});l(d,ke);d.on("dispose",function(){d.off();n.setTimeout(function(){d.eventBusEl_=null},0)});return d}function Gc(d,c){l(d,le);d.state=l({},d.state,c);if("function"===typeof d.handleStateChanged&&
Wa(d))d.on("statechanged",d.handleStateChanged);return d}function D(d){return"string"!==typeof d?d:d.charAt(0).toUpperCase()+d.slice(1)}function me(d,c){return D(d)===D(c)}function C(){for(var d={},c=arguments.length,a=Array(c),b=0;b<c;b++)a[b]=arguments[b];a.forEach(function(b){b&&h(b,function(b,a){A(b)?(A(d[a])||(d[a]={}),d[a]=C(d[a],b)):d[a]=b})});return d}function Hc(d,c,a,b){var g=a.length-1;if("number"!==typeof b||0>b||b>g)throw Error("Failed to execute '"+d+"' on 'TimeRanges': The index provided ("+
b+") is non-numeric or out of bounds (0-"+g+").");return a[b][c]}function xb(d){return void 0===d||0===d.length?{length:0,start:function(){throw Error("This TimeRanges object is empty");},end:function(){throw Error("This TimeRanges object is empty");}}:{length:d.length,start:Hc.bind(null,"start",0,d),end:Hc.bind(null,"end",1,d)}}function la(d,c){return Array.isArray(d)?xb(d):void 0===d||void 0===c?xb():xb([[d,c]])}function Ic(d,c){var a=0,b=void 0,g=void 0;if(!c)return 0;d&&d.length||(d=la(0,0));
for(var f=0;f<d.length;f++)b=d.start(f),g=d.end(f),g>c&&(g=c),a+=g-b;return a/c}function K(d){if(d instanceof K)return d;"number"===typeof d?this.code=d:"string"===typeof d?this.message=d:q(d)&&("number"===typeof d.code&&(this.code=d.code),l(this,d));this.message||(this.message=K.defaultMessages[this.code]||"")}function Jc(d){return void 0!==d&&null!==d&&"function"===typeof d.then}function yb(d){Jc(d)&&d.then(null,function(c){})}function ne(d){for(var c in d)if(d.hasOwnProperty(c))return!1;return!0}
function Kc(d,c,a){var b=d;Lc(c)?(a=c,"string"===typeof d&&(b={uri:d})):b=oe(c,{uri:d});b.callback=a;return b}function Y(d,c,a){c=Kc(d,c,a);return Mc(c)}function Mc(d){function c(a){clearTimeout(n);a instanceof Error||(a=Error(""+(a||"Unknown XMLHttpRequest Error")));a.statusCode=0;var c=p;b||(b=!0,d.callback(a,c,void 0))}function a(){if(!m){var a;clearTimeout(n);a=d.useXDR&&void 0===g.status?200:1223===g.status?204:g.status;var c=p,f=null;if(0!==a){c=void 0;g.response?c=g.response:(c=g.responseText)||
("document"===g.responseType?c=g.responseXML:(c=g.responseXML&&"parsererror"===g.responseXML.documentElement.nodeName,c=""!==g.responseType||c?null:g.responseXML));if(l)try{c=JSON.parse(c)}catch(h){}c={body:c,statusCode:a,method:e,headers:{},url:W,rawRequest:g};g.getAllResponseHeaders&&(c.headers=pe(g.getAllResponseHeaders()))}else f=Error("Internal XMLHttpRequest Error");a=c.body;b||(b=!0,d.callback(f,c,a))}}if("undefined"===typeof d.callback)throw Error("callback argument missing");var b=!1,g=d.xhr||
null;g||(g=d.cors||d.useXDR?new Y.XDomainRequest:new Y.XMLHttpRequest);var f,m,W=g.url=d.uri||d.url,e=g.method=d.method||"GET",h=d.body||d.data,E=g.headers=d.headers||{},k=!!d.sync,l=!1,n,p={body:void 0,headers:{},statusCode:0,method:e,url:W,rawRequest:g};"json"in d&&!1!==d.json&&(l=!0,E.accept||E.Accept||(E.Accept="application/json"),"GET"!==e&&"HEAD"!==e&&(E["content-type"]||E["Content-Type"]||(E["Content-Type"]="application/json"),h=JSON.stringify(!0===d.json?h:d.json)));g.onreadystatechange=function(){4===
g.readyState&&setTimeout(a,0)};g.onload=a;g.onerror=c;g.onprogress=function(){};g.onabort=function(){m=!0};g.ontimeout=c;g.open(e,W,!k,d.username,d.password);k||(g.withCredentials=!!d.withCredentials);!k&&0<d.timeout&&(n=setTimeout(function(){if(!m){m=!0;g.abort("timeout");var b=Error("XMLHttpRequest timeout");b.code="ETIMEDOUT";c(b)}},d.timeout));if(g.setRequestHeader)for(f in E)E.hasOwnProperty(f)&&g.setRequestHeader(f,E[f]);else if(d.headers&&!ne(d.headers))throw Error("Headers cannot be set on an XDomainRequest object");
"responseType"in d&&(g.responseType=d.responseType);"beforeSend"in d&&"function"===typeof d.beforeSend&&d.beforeSend(g);g.send(h||null);return g}function qe(){}function P(d,c){this.name="ParsingError";this.code=d.code;this.message=c||d.message}function zb(d){d=d.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);if(!d)return null;if(d[3]){var c=d[3].replace(":","");return 3600*(d[1]|0)+60*(d[2]|0)+(c|0)+(d[4]|0)/1E3}return 59<d[1]?3600*(d[1]|0)+60*(d[2]|0)+0+(d[4]|0)/1E3:0+60*(d[1]|0)+(d[2]|0)+(d[4]|0)/1E3}
function Ja(){this.values=Ab(null)}function Ka(d,c,a,b){d=b?d.split(b):[d];for(var g in d)"string"===typeof d[g]&&(b=d[g].split(a),2===b.length&&c(b[0],b[1]))}function re(d,c,a){function b(){var b=zb(d);if(null===b)throw new P(P.Errors.BadTimeStamp,"Malformed timestamp: "+f);d=d.replace(/^[^\sa-zA-Z-]+/,"");return b}function g(){d=d.replace(/^\s+/,"")}var f=d;g();c.startTime=b();g();if("--\x3e"!==d.substr(0,3))throw new P(P.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+
f);d=d.substr(3);g();c.endTime=b();g();(function(b,c){var g=new Ja;Ka(b,function(b,c){switch(b){case "region":for(var d=a.length-1;0<=d;d--)if(a[d].id===c){g.set(b,a[d].region);break}break;case "vertical":g.alt(b,c,["rl","lr"]);break;case "line":var d=c.split(","),f=d[0];g.integer(b,f);g.percent(b,f)?g.set("snapToLines",!1):null;g.alt(b,f,["auto"]);2===d.length&&g.alt("lineAlign",d[1],["start","middle","end"]);break;case "position":d=c.split(",");g.percent(b,d[0]);2===d.length&&g.alt("positionAlign",
d[1],["start","middle","end"]);break;case "size":g.percent(b,c);break;case "align":g.alt(b,c,["start","middle","end","left","right"])}},/:/,/\s/);c.region=g.get("region",null);c.vertical=g.get("vertical","");c.line=g.get("line","auto");c.lineAlign=g.get("lineAlign","start");c.snapToLines=g.get("snapToLines",!0);c.size=g.get("size",100);c.align=g.get("align","middle");c.position=g.get("position",{start:0,left:0,middle:50,end:100,right:100},c.align);c.positionAlign=g.get("positionAlign",{start:"start",
left:"start",middle:"middle",end:"end",right:"end"},c.align)})(d,c)}function Nc(d,c){function a(){if(!c)return null;var b=c.match(/^([^<]*)(<[^>]*>?)?/),b=b[1]?b[1]:b[2];c=c.substr(b.length);return b}function b(b){return se[b]}function g(a){for(;k=a.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)a=a.replace(k[0],b);return a}function f(b,a){var c=te[b];if(!c)return null;var g=d.document.createElement(c);g.localName=c;(c=ue[b])&&a&&(g[c]=a.trim());return g}for(var m=d.document.createElement("div"),e=m,h,ea=[];null!==
(h=a());)if("<"===h[0])if("/"===h[1])ea.length&&ea[ea.length-1]===h.substr(2).replace(">","")&&(ea.pop(),e=e.parentNode);else{var E=zb(h.substr(1,h.length-2));if(E)h=d.document.createProcessingInstruction("timestamp",E),e.appendChild(h);else{var k=h.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);k&&(!(h=f(k[1],k[3]))||Oc[h.localName]&&Oc[h.localName]!==e.localName||(k[2]&&(h.className=k[2].substr(1).replace("."," ")),ea.push(k[1]),e.appendChild(h),e=h))}}else e.appendChild(d.document.createTextNode(g(h)));
return m}function ve(d){for(var c=0;c<Pc.length;c++){var a=Pc[c];if(d>=a[0]&&d<=a[1])return!0}return!1}function we(d){function c(b,a){for(var c=a.childNodes.length-1;0<=c;c--)b.push(a.childNodes[c])}function a(b){if(!b||!b.length)return null;var g=b.pop(),d=g.textContent||g.innerText;if(d)return(g=d.match(/^.*(\n|\r)/))?(b.length=0,g[0]):d;if("ruby"===g.tagName)return a(b);if(g.childNodes)return c(b,g),a(b)}var b=[],g="";if(!d||!d.childNodes)return"ltr";for(c(b,d);g=a(b);)for(var f=0;f<g.length;f++)if(d=
g.charCodeAt(f),ve(d))return"rtl";return"ltr"}function Bb(){}function Xa(d,c,a){var b=/MSIE\s8\.0/.test(navigator.userAgent),g="rgba(255, 255, 255, 1)",f="rgba(0, 0, 0, 0.8)";b&&(g="rgb(255, 255, 255)",f="rgb(0, 0, 0)");this.cue=c;this.cueDiv=Nc(d,c.text);g={color:g,backgroundColor:f,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};b||(g.writingMode=""===c.vertical?"horizontal-tb":"lr"===c.vertical?"vertical-lr":"vertical-rl",g.unicodeBidi="plaintext");this.applyStyles(g,this.cueDiv);
this.div=d.document.createElement("div");g={textAlign:"middle"===c.align?"center":c.align,font:a.font,whiteSpace:"pre-line",position:"absolute"};b||(g.direction=we(this.cueDiv),g.writingMode=""===c.vertical?"horizontal-tb":"lr"===c.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext");this.applyStyles(g);this.div.appendChild(this.cueDiv);d=0;switch(c.positionAlign){case "start":d=c.position;break;case "middle":d=c.position-c.size/2;break;case "end":d=c.position-c.size}""===c.vertical?
this.applyStyles({left:this.formatStyle(d,"%"),width:this.formatStyle(c.size,"%")}):this.applyStyles({top:this.formatStyle(d,"%"),height:this.formatStyle(c.size,"%")});this.move=function(b){this.applyStyles({top:this.formatStyle(b.top,"px"),bottom:this.formatStyle(b.bottom,"px"),left:this.formatStyle(b.left,"px"),right:this.formatStyle(b.right,"px"),height:this.formatStyle(b.height,"px"),width:this.formatStyle(b.width,"px")})}}function L(d){var c=/MSIE\s8\.0/.test(navigator.userAgent),a,b,g,f;if(d.div){b=
d.div.offsetHeight;g=d.div.offsetWidth;f=d.div.offsetTop;var m=(m=d.div.childNodes)&&(m=m[0])&&m.getClientRects&&m.getClientRects();d=d.div.getBoundingClientRect();a=m?Math.max(m[0]&&m[0].height||0,d.height/m.length):0}this.left=d.left;this.right=d.right;this.top=d.top||f;this.height=d.height||b;this.bottom=d.bottom||f+(d.height||b);this.width=d.width||g;this.lineHeight=void 0!==a?a:d.lineHeight;c&&!this.lineHeight&&(this.lineHeight=13)}function ta(){}function Cb(d){return"string"!==typeof d?!1:xe[d.toLowerCase()]?
d.toLowerCase():!1}function N(d){for(var c=1;c<arguments.length;c++){var a=arguments[c],b;for(b in a)d[b]=a[b]}return d}function Qc(d,c,a){var b=this,g=/MSIE\s8\.0/.test(navigator.userAgent),f={};g?b=document.createElement("custom"):f.enumerable=!0;b.hasBeenReset=!1;var m="",e=!1,h=d,ea=c,E=a,k=null,l="",n=!0,p="auto",q="start",r=50,t="middle",v=50,u="middle";Object.defineProperty(b,"id",N({},f,{get:function(){return m},set:function(b){m=""+b}}));Object.defineProperty(b,"pauseOnExit",N({},f,{get:function(){return e},
set:function(b){e=!!b}}));Object.defineProperty(b,"startTime",N({},f,{get:function(){return h},set:function(b){if("number"!==typeof b)throw new TypeError("Start time must be set to a number.");h=b;this.hasBeenReset=!0}}));Object.defineProperty(b,"endTime",N({},f,{get:function(){return ea},set:function(b){if("number"!==typeof b)throw new TypeError("End time must be set to a number.");ea=b;this.hasBeenReset=!0}}));Object.defineProperty(b,"text",N({},f,{get:function(){return E},set:function(b){E=""+
b;this.hasBeenReset=!0}}));Object.defineProperty(b,"region",N({},f,{get:function(){return k},set:function(b){k=b;this.hasBeenReset=!0}}));Object.defineProperty(b,"vertical",N({},f,{get:function(){return l},set:function(b){b="string"!==typeof b?!1:ye[b.toLowerCase()]?b.toLowerCase():!1;if(!1===b)throw new SyntaxError("An invalid or illegal string was specified.");l=b;this.hasBeenReset=!0}}));Object.defineProperty(b,"snapToLines",N({},f,{get:function(){return n},set:function(b){n=!!b;this.hasBeenReset=
!0}}));Object.defineProperty(b,"line",N({},f,{get:function(){return p},set:function(b){if("number"!==typeof b&&"auto"!==b)throw new SyntaxError("An invalid number or illegal string was specified.");p=b;this.hasBeenReset=!0}}));Object.defineProperty(b,"lineAlign",N({},f,{get:function(){return q},set:function(b){b=Cb(b);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");q=b;this.hasBeenReset=!0}}));Object.defineProperty(b,"position",N({},f,{get:function(){return r},set:function(b){if(0>
b||100<b)throw Error("Position must be between 0 and 100.");r=b;this.hasBeenReset=!0}}));Object.defineProperty(b,"positionAlign",N({},f,{get:function(){return t},set:function(b){b=Cb(b);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");t=b;this.hasBeenReset=!0}}));Object.defineProperty(b,"size",N({},f,{get:function(){return v},set:function(b){if(0>b||100<b)throw Error("Size must be between 0 and 100.");v=b;this.hasBeenReset=!0}}));Object.defineProperty(b,"align",N({},f,{get:function(){return u},
set:function(b){b=Cb(b);if(!b)throw new SyntaxError("An invalid or illegal string was specified.");u=b;this.hasBeenReset=!0}}));b.displayState=void 0;if(g)return b}function La(d){return"number"===typeof d&&0<=d&&100>=d}function ze(d,c,a,b){var g=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},f=d.textTracks();g.kind=c;a&&(g.label=a);b&&(g.language=b);g.tech=d;g=new Q.text.TrackClass(g);f.addTrack(g);return g}function Ae(d,c,a){d.setTimeout(function(){return ua(c,ma[c.type],a,d)},1)}function Be(d,
c){d.forEach(function(a){return a.setTech&&a.setTech(c)})}function Rc(d,c,a){for(var b=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,g="call"+D(a),g=d.reduce(Db(g),b),g=(b=g===Ma)?null:c[a](g),f=d.length-1;0<=f;f--){var m=d[f];if(m[a])m[a](b,g)}return g}function Db(d){return function(c,a){return c===Ma?Ma:a[d]?a[d](c):c}}function Ce(d,c){var a=Eb[d.id()],b=null;if(void 0===a||null===a)return b=c(d),Eb[d.id()]=[[c,b]],b;for(var g=0;g<a.length;g++){var f=a[g],m=f[1];f[0]===c&&(b=m)}null===
b&&(b=c(d),a.push([c,b]));return b}function ua(){var d=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],a=arguments[2],b=arguments[3],g=4<arguments.length&&void 0!==arguments[4]?arguments[4]:[],f=5<arguments.length&&void 0!==arguments[5]?arguments[5]:!1,m=c[0],e=c.slice(1);if("string"===typeof m)ua(d,ma[m],a,b,g,f);else if(m){var h=Ce(b,m);h.setSource(l({},d),function(c,m){if(c)return ua(d,e,a,b,g,f);g.push(h);ua(m,d.type===m.type?
e:ma[m.type],a,b,g,f)})}else e.length?ua(d,e,a,b,g,f):f?a(d,g):ua(d,ma["*"],a,b,g,!0)}function Sc(d){var c=Tc(d.src);!d.type&&c&&(d.type=c);return d}function Fb(d,c){return"rgba("+parseInt(d[1]+d[1],16)+","+parseInt(d[2]+d[2],16)+","+parseInt(d[3]+d[3],16)+","+c+")"}function Uc(d,c){c&&(d=c(d));if(d&&"none"!==d)return d}function v(d,c,a){var b=v.getPlayer(d);if(b)return c&&z.warn('Player "'+d+'" is already initialised. Options will not be applied.'),a&&b.ready(a),b;var g="string"===typeof d?fa("#"+
Vc(d)):d;if(!Ca(g))throw new TypeError("The element or ID supplied is not valid. (videojs)");t.body.contains(g)||z.warn("The element supplied is not included in the DOM");c=c||{};v.hooks("beforesetup").forEach(function(b){b=b(g,C(c));!q(b)||Array.isArray(b)?z.error("please return an object in beforesetup hooks"):c=C(c,b)});b=new (p.getComponent("Player"))(g,c,a);v.hooks("setup").forEach(function(a){return a(b)});return b}var Ya="undefined"!==typeof window?window:"undefined"!==typeof global?global:
"undefined"!==typeof self?self:{},n="undefined"!==typeof window?window:"undefined"!==typeof Ya?Ya:"undefined"!==typeof self?self:{},Wc={},Xc=(Object.freeze||Object)({"default":Wc}),De=Xc&&Wc||Xc,Yc="undefined"!==typeof Ya?Ya:"undefined"!==typeof window?window:{},Za;"undefined"!==typeof document?Za=document:(Za=Yc["__GLOBAL_DOCUMENT_CACHE@4"])||(Za=Yc["__GLOBAL_DOCUMENT_CACHE@4"]=De);var t=Za,I=n.navigator&&n.navigator.userAgent||"",Zc=/AppleWebKit\/([\d.]+)/i.exec(I),Ee=Zc?parseFloat(Zc.pop()):null,
Gb=/iPad/i.test(I),Hb=/iPhone/i.test(I)&&!Gb,$c=/iPod/i.test(I),na=Hb||Gb||$c,Fe=function(){var d=I.match(/OS (\d+)_/i);return d&&d[1]?d[1]:null}(),ga=/Android/i.test(I),$a=function(){var d=I.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!d)return null;var c=d[1]&&parseFloat(d[1]),a=d[2]&&parseFloat(d[2]);return c&&a?parseFloat(d[1]+"."+d[2]):c?c:null}(),ad=ga&&/webkit/i.test(I)&&2.3>$a,bd=ga&&5>$a&&537>Ee,cd=/Firefox/i.test(I),Ib=/Edge/i.test(I),Na=!Ib&&/Chrome/i.test(I),dd=function(){var d=
I.match(/Chrome\/(\d+)/);return d&&d[1]?parseFloat(d[1]):null}(),F=/MSIE\s8\.0/.test(I),da=function(){var d=/MSIE\s(\d+)\.\d/.exec(I),d=d&&parseFloat(d[1]);!d&&/Trident\/7.0/i.test(I)&&/rv:11.0/.test(I)&&(d=11);return d}(),ed=/Safari/i.test(I)&&!Na&&!ga&&!Ib,fd=ed||na,ab=ca()&&("ontouchstart"in n||n.DocumentTouch&&n.document instanceof n.DocumentTouch),gd=ca()&&"backgroundSize"in n.document.createElement("video").style,Ge=(Object.freeze||Object)({IS_IPAD:Gb,IS_IPHONE:Hb,IS_IPOD:$c,IS_IOS:na,IOS_VERSION:Fe,
IS_ANDROID:ga,ANDROID_VERSION:$a,IS_OLD_ANDROID:ad,IS_NATIVE_ANDROID:bd,IS_FIREFOX:cd,IS_EDGE:Ib,IS_CHROME:Na,CHROME_VERSION:dd,IS_IE8:F,IE_VERSION:da,IS_SAFARI:ed,IS_ANY_SAFARI:fd,TOUCH_ENABLED:ab,BACKGROUND_SIZE_SUPPORTED:gd});$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbolIterator();var pa="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(d){return typeof d}:function(d){$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbol();return d&&"function"===typeof Symbol&&
d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},w=function(d,c){if(!(d instanceof c))throw new TypeError("Cannot call a class as a function");},x=function(d,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);d.prototype=Object.create(c&&c.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(d,c):d.__proto__=c)},r=function(d,c){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return!c||"object"!==typeof c&&"function"!==typeof c?d:c},Jb=function(d,c){d.raw=c;return d},ge=Object.prototype.toString,qc=function(d){return q(d)?Object.keys(d):[]},R=void 0,bb="info",V=[],cb=function(d,c){var a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:!!da&&11>da,b=R.levels[bb],g=new RegExp("^("+b+")$");"log"!==d&&c.unshift(d.toUpperCase()+":");V&&V.push([].concat(c));c.unshift("VIDEOJS:");if(n.console){var f=n.console[d];f||"debug"!==d||(f=n.console.info||n.console.log);if(f&&b&&
g.test(d))if(a&&(c=c.map(function(b){if(q(b)||Array.isArray(b))try{return JSON.stringify(b)}catch(a){}return String(b)}).join(" ")),f.apply)f[Array.isArray(c)?"apply":"call"](n.console,c);else f(c)}},R=function(){for(var d=arguments.length,c=Array(d),a=0;a<d;a++)c[a]=arguments[a];cb("log",c)};R.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:bb};R.level=function(d){if("string"===typeof d){if(!R.levels.hasOwnProperty(d))throw Error('"'+
d+'" in not a valid log level');bb=d}return bb};R.history=function(){return V?[].concat(V):[]};R.history.clear=function(){V&&(V.length=0)};R.history.disable=function(){null!==V&&(V.length=0,V=null)};R.history.enable=function(){null===V&&(V=[])};R.error=function(){for(var d=arguments.length,c=Array(d),a=0;a<d;a++)c[a]=arguments[a];return cb("error",c)};R.warn=function(){for(var d=arguments.length,c=Array(d),a=0;a<d;a++)c[a]=arguments[a];return cb("warn",c)};R.debug=function(){for(var d=arguments.length,
c=Array(d),a=0;a<d;a++)c[a]=arguments[a];return cb("debug",c)};var z=R,ob=function(d){for(var c="",a=0;a<arguments.length;a++)c+=d[a].replace(/\n\r?\s*/g,"")+(arguments[a+1]||"");return c},he=Jb(["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set ",
" to ","."]),fa=tc("querySelector"),hd=tc("querySelectorAll"),id=(Object.freeze||Object)({isReal:ca,isEl:Ca,isInFrame:sc,createEl:G,textContent:Da,prependTo:Ua,hasClass:qa,addClass:ia,removeClass:Ea,toggleClass:uc,setAttributes:vc,getAttributes:X,getAttribute:function(d,c){return d.getAttribute(c)},setAttribute:function(d,c,a){d.setAttribute(c,a)},removeAttribute:function(d,c){d.removeAttribute(c)},blockTextSelection:wc,unblockTextSelection:xc,getBoundingClientRect:Fa,findPosition:yc,getPointerPosition:qb,
isTextNode:zc,emptyEl:sb,normalizeContent:Ac,appendContent:pb,insertContent:Bc,isSingleLeftClick:ra,$:fa,$$:hd}),ka=1,Ha={},ja="vdata"+(new Date).getTime(),Fc=!1;(function(){try{var d=Object.defineProperty({},"passive",{get:function(){Fc=!0}});n.addEventListener("test",null,d);n.removeEventListener("test",null,d)}catch(c){}})();var ie=["touchstart","touchmove"],He=(Object.freeze||Object)({fixEvent:Va,on:U,off:O,trigger:sa,one:Ia}),Kb=!1,vb=void 0,je=function(){if(ca()&&!1!==vb.options.autoSetup){var d=
t.getElementsByTagName("video"),c=t.getElementsByTagName("audio"),a=t.getElementsByTagName("video-js"),b=[];if(d&&0<d.length)for(var g=0,f=d.length;g<f;g++)b.push(d[g]);if(c&&0<c.length)for(d=0,g=c.length;d<g;d++)b.push(c[d]);if(a&&0<a.length)for(c=0,d=a.length;c<d;c++)b.push(a[c]);if(b&&0<b.length)for(a=0,c=b.length;a<c;a++)if((d=b[a])&&d.getAttribute)void 0===d.player&&null!==d.getAttribute("data-setup")&&vb(d);else{ub(1);break}else Kb||ub(1)}};ca()&&"complete"===t.readyState?Kb=!0:Ia(n,"load",
function(){Kb=!0});var jd=function(d){var c=t.createElement("style");c.className=d;return c},kd=function(d,c){d.styleSheet?d.styleSheet.cssText=c:d.textContent=c},y=function(d,c,a){c.guid||(c.guid=ka++);var b=function(){return c.apply(d,arguments)};b.guid=a?a+"_"+c.guid:c.guid;return b},va=function(d,c){var a=Date.now();return function(){var b=Date.now();b-a>=c&&(d.apply(void 0,arguments),a=b)}},Ie=function(d,c,a){var b=3<arguments.length&&void 0!==arguments[3]?arguments[3]:n,g=void 0;return function(){var f=
this,m=arguments,e=function(){e=g=null;a||d.apply(f,m)};!g&&a&&d.apply(f,m);b.clearTimeout(g);g=b.setTimeout(e,c)}},J=function(){};J.prototype.allowedEvents_={};J.prototype.on=function(d,c){var a=this.addEventListener;this.addEventListener=function(){};U(this,d,c);this.addEventListener=a};J.prototype.addEventListener=J.prototype.on;J.prototype.off=function(d,c){O(this,d,c)};J.prototype.removeEventListener=J.prototype.off;J.prototype.one=function(d,c){var a=this.addEventListener;this.addEventListener=
function(){};Ia(this,d,c);this.addEventListener=a};J.prototype.trigger=function(d){var c=d.type||d;"string"===typeof d&&(d={type:c});d=Va(d);if(this.allowedEvents_[c]&&this["on"+c])this["on"+c](d);sa(this,d)};J.prototype.dispatchEvent=J.prototype.trigger;var Wa=function(d){return d instanceof J||!!d.eventBusEl_&&["on","one","off","trigger"].every(function(c){return"function"===typeof d[c]})},ld=function(d){return"string"===typeof d&&/\S/.test(d)||Array.isArray(d)&&!!d.length},Lb=function(d){if(!d.nodeName&&
!Wa(d))throw Error("Invalid target; must be a DOM node or evented object.");},md=function(d){if(!ld(d))throw Error("Invalid event type; must be a non-empty string or array.");},nd=function(d){if("function"!==typeof d)throw Error("Invalid listener; must be a function.");},od=function(d,c){var a=3>c.length||c[0]===d||c[0]===d.eventBusEl_,b=void 0,g=void 0,f=void 0;a?(b=d.eventBusEl_,3<=c.length&&c.shift(),g=c[0],f=c[1]):(b=c[0],g=c[1],f=c[2]);Lb(b);md(g);nd(f);f=y(d,f);return{isTargetingSelf:a,target:b,
type:g,listener:f}},Oa=function(d,c,a,b){Lb(d);if(d.nodeName)He[c](d,a,b);else d[c](a,b)},ke={on:function(){for(var d=this,c=arguments.length,a=Array(c),b=0;b<c;b++)a[b]=arguments[b];var c=od(this,a),a=c.isTargetingSelf,g=c.target,f=c.type,m=c.listener;Oa(g,"on",f,m);if(!a){var e=function(){return d.off(g,f,m)};e.guid=m.guid;c=function(){return d.off("dispose",e)};c.guid=m.guid;Oa(this,"on","dispose",e);Oa(g,"on","dispose",c)}},one:function(){for(var d=this,c=arguments.length,a=Array(c),b=0;b<c;b++)a[b]=
arguments[b];var c=od(this,a),g=c.target,f=c.type,m=c.listener;c.isTargetingSelf?Oa(g,"one",f,m):(c=function rb(){for(var b=arguments.length,a=Array(b),c=0;c<b;c++)a[c]=arguments[c];d.off(g,f,rb);m.apply(null,a)},c.guid=m.guid,Oa(g,"one",f,c))},off:function(d,c,a){!d||ld(d)?O(this.eventBusEl_,d,c):(Lb(d),md(c),nd(a),a=y(this,a),this.off("dispose",a),d.nodeName?(O(d,c,a),O(d,"dispose",a)):Wa(d)&&(d.off(c,a),d.off("dispose",a)))},trigger:function(d,c){return sa(this.eventBusEl_,d,c)}},le={state:{},
setState:function(d){var c=this;"function"===typeof d&&(d=d());var a=void 0;h(d,function(b,g){c.state[g]!==b&&(a=a||{},a[g]={from:c.state[g],to:b});c.state[g]=b});a&&Wa(this)&&this.trigger({changes:a,type:"statechanged"});return a}},p=function(){function d(c,a,b){w(this,d);this.player_=!c&&this.play?c=this:c;this.options_=C({},this.options_);a=this.options_=C(this.options_,a);this.id_=a.id||a.el&&a.el.id;this.id_||(this.id_=(c&&c.id&&c.id()||"no_player")+"_component_"+ka++);this.name_=a.name||null;
a.el?this.el_=a.el:!1!==a.createEl&&(this.el_=this.createEl());!1!==a.evented&&wb(this,{eventBusKey:this.el_?"el_":null});Gc(this,this.constructor.defaultState);this.children_=[];this.childIndex_={};this.childNameIndex_={};!1!==a.initChildren&&this.initChildren();this.ready(b);!1!==a.reportTouchActivity&&this.enableTouchActivity()}d.prototype.dispose=function(){this.trigger({type:"dispose",bubbles:!1});if(this.children_)for(var c=this.children_.length-1;0<=c;c--)this.children_[c].dispose&&this.children_[c].dispose();
this.childNameIndex_=this.childIndex_=this.children_=null;this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Dc(this.el_),this.el_=null);this.player_=null};d.prototype.player=function(){return this.player_};d.prototype.options=function(c){z.warn("this.options() has been deprecated and will be moved to the constructor in 6.0");return c?this.options_=C(this.options_,c):this.options_};d.prototype.el=function(){return this.el_};d.prototype.createEl=function(c,a,b){return G(c,a,
b)};d.prototype.localize=function(c,a){var b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:c,g=this.player_.language&&this.player_.language(),d=this.player_.languages&&this.player_.languages(),m=d&&d[g],g=g&&g.split("-")[0],d=d&&d[g];m&&m[c]?b=m[c]:d&&d[c]&&(b=d[c]);a&&(b=b.replace(/\{(\d+)\}/g,function(b,c){var g=a[c-1],d=g;"undefined"===typeof g&&(d=b);return d}));return b};d.prototype.contentEl=function(){return this.contentEl_||this.el_};d.prototype.id=function(){return this.id_};d.prototype.name=
function(){return this.name_};d.prototype.children=function(){return this.children_};d.prototype.getChildById=function(c){return this.childIndex_[c]};d.prototype.getChild=function(c){if(c)return c=D(c),this.childNameIndex_[c]};d.prototype.addChild=function(c){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.children_.length,g=void 0,f=void 0;if("string"===typeof c){f=D(c);g=a.componentClass||f;a.name=f;var m=d.getComponent(g);
if(!m)throw Error("Component "+g+" does not exist");if("function"!==typeof m)return null;g=new m(this.player_||this,a)}else g=c;this.children_.splice(b,0,g);"function"===typeof g.id&&(this.childIndex_[g.id()]=g);(f=f||g.name&&D(g.name()))&&(this.childNameIndex_[f]=g);"function"===typeof g.el&&g.el()&&(a=this.contentEl().children[b]||null,this.contentEl().insertBefore(g.el(),a));return g};d.prototype.removeChild=function(c){"string"===typeof c&&(c=this.getChild(c));if(c&&this.children_){for(var a=
!1,b=this.children_.length-1;0<=b;b--)if(this.children_[b]===c){a=!0;this.children_.splice(b,1);break}a&&(this.childIndex_[c.id()]=null,this.childNameIndex_[c.name()]=null,(a=c.el())&&a.parentNode===this.contentEl()&&this.contentEl().removeChild(c.el()))}};d.prototype.initChildren=function(){var c=this,a=this.options_.children;if(a){var b=this.options_,g=void 0,f=d.getComponent("Tech"),g=Array.isArray(a)?a:Object.keys(a);g.concat(Object.keys(this.options_).filter(function(b){return!g.some(function(a){return"string"===
typeof a?b===a:b===a.name})})).map(function(b){var g=void 0,d=void 0;"string"===typeof b?(g=b,d=a[g]||c.options_[g]||{}):(g=b.name,d=b);return{name:g,opts:d}}).filter(function(b){return(b=d.getComponent(b.opts.componentClass||D(b.name)))&&!f.isTech(b)}).forEach(function(a){var g=a.name;a=a.opts;void 0!==b[g]&&(a=b[g]);!1!==a&&(!0===a&&(a={}),a.playerOptions=c.options_.playerOptions,(a=c.addChild(g,a))&&(c[g]=a))})}};d.prototype.buildCSSClass=function(){return""};d.prototype.ready=function(c){var a=
1<arguments.length&&void 0!==arguments[1]?arguments[1]:!1;c&&(this.isReady_?a?c.call(this):this.setTimeout(c,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(c)))};d.prototype.triggerReady=function(){this.isReady_=!0;this.setTimeout(function(){var c=this.readyQueue_;this.readyQueue_=[];c&&0<c.length&&c.forEach(function(a){a.call(this)},this);this.trigger("ready")},1)};d.prototype.$=function(c,a){return fa(c,a||this.contentEl())};d.prototype.$$=function(c,a){return hd(c,a||this.contentEl())};
d.prototype.hasClass=function(c){return qa(this.el_,c)};d.prototype.addClass=function(c){ia(this.el_,c)};d.prototype.removeClass=function(c){Ea(this.el_,c)};d.prototype.toggleClass=function(c,a){uc(this.el_,c,a)};d.prototype.show=function(){this.removeClass("vjs-hidden")};d.prototype.hide=function(){this.addClass("vjs-hidden")};d.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")};d.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")};d.prototype.getAttribute=function(c){return this.el_.getAttribute(c)};
d.prototype.setAttribute=function(c,a){this.el_.setAttribute(c,a)};d.prototype.removeAttribute=function(c){this.el_.removeAttribute(c)};d.prototype.width=function(c,a){return this.dimension("width",c,a)};d.prototype.height=function(c,a){return this.dimension("height",c,a)};d.prototype.dimensions=function(c,a){this.width(c,!0);this.height(a)};d.prototype.dimension=function(c,a,b){if(void 0!==a){if(null===a||a!==a)a=0;-1!==(""+a).indexOf("%")||-1!==(""+a).indexOf("px")?this.el_.style[c]=a:this.el_.style[c]=
"auto"===a?"":a+"px";b||this.trigger("componentresize")}else{if(!this.el_)return 0;a=this.el_.style[c];b=a.indexOf("px");return-1!==b?parseInt(a.slice(0,b),10):parseInt(this.el_["offset"+D(c)],10)}};d.prototype.currentDimension=function(c){var a=0;if("width"!==c&&"height"!==c)throw Error("currentDimension only accepts width or height value");"function"===typeof n.getComputedStyle&&(a=n.getComputedStyle(this.el_),a=a.getPropertyValue(c)||a[c]);a=parseFloat(a);0===a&&(c="offset"+D(c),a=this.el_[c]);
return a};d.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}};d.prototype.currentWidth=function(){return this.currentDimension("width")};d.prototype.currentHeight=function(){return this.currentDimension("height")};d.prototype.focus=function(){this.el_.focus()};d.prototype.blur=function(){this.el_.blur()};d.prototype.emitTapEvents=function(){var c=0,a=null,b=void 0;this.on("touchstart",function(g){1===g.touches.length&&(a={pageX:g.touches[0].pageX,
pageY:g.touches[0].pageY},c=(new Date).getTime(),b=!0)});this.on("touchmove",function(c){if(1<c.touches.length)b=!1;else if(a){var g=c.touches[0].pageX-a.pageX;c=c.touches[0].pageY-a.pageY;10<Math.sqrt(g*g+c*c)&&(b=!1)}});var g=function(){b=!1};this.on("touchleave",g);this.on("touchcancel",g);this.on("touchend",function(g){a=null;!0===b&&200>(new Date).getTime()-c&&(g.preventDefault(),this.trigger("tap"))})};d.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var c=
y(this.player(),this.player().reportUserActivity),a=void 0;this.on("touchstart",function(){c();this.clearInterval(a);a=this.setInterval(c,250)});var b=function(b){c();this.clearInterval(a)};this.on("touchmove",c);this.on("touchend",b);this.on("touchcancel",b)}};d.prototype.setTimeout=function(c,a){var b=this;c=y(this,c);var g=n.setTimeout(c,a),d=function(){return b.clearTimeout(g)};d.guid="vjs-timeout-"+g;this.on("dispose",d);return g};d.prototype.clearTimeout=function(c){n.clearTimeout(c);var a=
function(){};a.guid="vjs-timeout-"+c;this.off("dispose",a);return c};d.prototype.setInterval=function(c,a){var b=this;c=y(this,c);var g=n.setInterval(c,a),d=function(){return b.clearInterval(g)};d.guid="vjs-interval-"+g;this.on("dispose",d);return g};d.prototype.clearInterval=function(c){n.clearInterval(c);var a=function(){};a.guid="vjs-interval-"+c;this.off("dispose",a);return c};d.prototype.requestAnimationFrame=function(c){var a=this;if(this.supportsRaf_){c=y(this,c);var b=n.requestAnimationFrame(c);
c=function(){return a.cancelAnimationFrame(b)};c.guid="vjs-raf-"+b;this.on("dispose",c);return b}return this.setTimeout(c,1E3/60)};d.prototype.cancelAnimationFrame=function(c){if(this.supportsRaf_){n.cancelAnimationFrame(c);var a=function(){};a.guid="vjs-raf-"+c;this.off("dispose",a);return c}return this.clearTimeout(c)};d.registerComponent=function(c,a){if("string"!==typeof c||!c)throw Error('Illegal component name, "'+c+'"; must be a non-empty string.');var b=d.getComponent("Tech"),b=b&&b.isTech(a),
g=d===a||d.prototype.isPrototypeOf(a.prototype);if(b||!g)throw Error('Illegal component, "'+c+'"; '+(b?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");c=D(c);d.components_||(d.components_={});b=d.getComponent("Player");if("Player"===c&&b&&b.players){var f=b.players,b=Object.keys(f);if(f&&0<b.length&&b.map(function(b){return f[b]}).every(Boolean))throw Error("Can not register Player component after player has been created.");}return d.components_[c]=a};d.getComponent=
function(c){if(c&&(c=D(c),d.components_&&d.components_[c]))return d.components_[c]};return d}();p.prototype.supportsRaf_="function"===typeof n.requestAnimationFrame&&"function"===typeof n.cancelAnimationFrame;p.registerComponent("Component",p);for(var ha={},db=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled webkitfullscreenchange webkitfullscreenerror".split(" "),
"webkitRequestFullScreen webkitCancelFullScreen webkitCurrentFullScreenElement webkitCancelFullScreen webkitfullscreenchange webkitfullscreenerror".split(" "),"mozRequestFullScreen mozCancelFullScreen mozFullScreenElement mozFullScreenEnabled mozfullscreenchange mozfullscreenerror".split(" "),"msRequestFullscreen msExitFullscreen msFullscreenElement msFullscreenEnabled MSFullscreenChange MSFullscreenError".split(" ")],Je=db[0],eb=void 0,fb=0;fb<db.length;fb++)if(db[fb][1]in t){eb=db[fb];break}if(eb)for(var gb=
0;gb<eb.length;gb++)ha[Je[gb]]=eb[gb];K.prototype.code=0;K.prototype.message="";K.prototype.status=null;K.errorTypes="MEDIA_ERR_CUSTOM MEDIA_ERR_ABORTED MEDIA_ERR_NETWORK MEDIA_ERR_DECODE MEDIA_ERR_SRC_NOT_SUPPORTED MEDIA_ERR_ENCRYPTED".split(" ");K.defaultMessages={1:"\u5f71\u7247\u5df2\u88ab\u7d42\u6b62\uff0c\u7121\u6cd5\u64ad\u653e",2:"\u7db2\u8def\u932f\u8aa4\uff0c\u8acb\u91cd\u65b0\u8f09\u5165",3:"\u5f71\u7247\u64ad\u653e\u5931\u6557\uff0c\u8acb\u91cd\u65b0\u8f09\u5165\uff0c\u5efa\u8b70\u4f7f\u7528\u6700\u65b0\u7684\u700f\u89bd\u5668\u6216Chrome\u700f\u89bd\u5668",
4:"\u5f71\u7247\u7121\u6cd5\u8f09\u5165\uff0c\u8acb\u91cd\u65b0\u8f09\u5165",5:"\u5f71\u7247\u88ab\u52a0\u5bc6\uff0c\u7121\u6cd5\u64ad\u653e"};for(var wa=0;wa<K.errorTypes.length;wa++)K[K.errorTypes[wa]]=wa,K.prototype[K.errorTypes[wa]]=wa;var Mb=function(d){return"kind label language id inBandMetadataTrackDispatchType mode src".split(" ").reduce(function(c,a,b){d[a]&&(c[a]=d[a]);return c},{cues:d.cues&&Array.prototype.map.call(d.cues,function(c){return{startTime:c.startTime,endTime:c.endTime,text:c.text,
id:c.id}})})},pd={textTracksToJson:function(d){var c=d.$$("track"),a=Array.prototype.map.call(c,function(b){return b.track});return Array.prototype.map.call(c,function(b){var a=Mb(b.track);b.src&&(a.src=b.src);return a}).concat(Array.prototype.filter.call(d.textTracks(),function(b){return-1===a.indexOf(b)}).map(Mb))},jsonToTextTracks:function(d,c){d.forEach(function(a){var b=c.addRemoteTextTrack(a).track;!a.src&&a.cues&&a.cues.forEach(function(a){return b.addCue(a)})});return c.textTracks()},trackToJson_:Mb},
xa=function(d){function c(a,b){w(this,c);var g=r(this,d.call(this,a,b));g.opened_=g.hasBeenOpened_=g.hasBeenFilled_=!1;g.closeable(!g.options_.uncloseable);g.content(g.options_.content);g.contentEl_=G("div",{className:"vjs-modal-dialog-content"},{role:"document"});g.descEl_=G("p",{className:"vjs-modal-dialog-description vjs-control-text",id:g.el().getAttribute("aria-describedby")});Da(g.descEl_,g.description());g.el_.appendChild(g.descEl_);g.el_.appendChild(g.contentEl_);return g}x(c,d);c.prototype.createEl=
function(){return d.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})};c.prototype.dispose=function(){this.previouslyActiveEl_=this.descEl_=this.contentEl_=null;d.prototype.dispose.call(this)};c.prototype.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+d.prototype.buildCSSClass.call(this)};c.prototype.handleKeyPress=function(a){27===a.which&&this.closeable()&&
this.close()};c.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")};c.prototype.description=function(){var a=this.options_.description||this.localize("This is a modal window.");this.closeable()&&(a+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button."));return a};c.prototype.open=function(){if(!this.opened_){var a=this.player();this.trigger("beforemodalopen");this.opened_=!0;(this.options_.fillAlways||!this.hasBeenOpened_&&
!this.hasBeenFilled_)&&this.fill();this.wasPlaying_=!a.paused();this.options_.pauseOnOpen&&this.wasPlaying_&&a.pause();if(this.closeable())this.on(this.el_.ownerDocument,"keydown",y(this,this.handleKeyPress));this.hadControls_=a.controls();a.controls(!1);this.show();this.conditionalFocus_();this.el().setAttribute("aria-hidden","false");this.trigger("modalopen");this.hasBeenOpened_=!0}};c.prototype.opened=function(a){if("boolean"===typeof a)this[a?"open":"close"]();return this.opened_};c.prototype.close=
function(){if(this.opened_){var a=this.player();this.trigger("beforemodalclose");this.opened_=!1;this.closeable()&&this.off(this.el_.ownerDocument,"keydown",y(this,this.handleKeyPress));this.hadControls_&&a.controls(!0);this.hide();this.el().setAttribute("aria-hidden","true");this.trigger("modalclose");this.conditionalBlur_();this.options_.temporary&&this.dispose()}};c.prototype.closeable=function(a){if("boolean"===typeof a){a=this.closeable_=!!a;var b=this.getChild("closeButton");if(a&&!b){var c=
this.contentEl_;this.contentEl_=this.el_;b=this.addChild("closeButton",{controlText:"Close Modal Dialog"});this.contentEl_=c;this.on(b,"close",this.close)}!a&&b&&(this.off(b,"close",this.close),this.removeChild(b),b.dispose())}return this.closeable_};c.prototype.fill=function(){this.fillWith(this.content())};c.prototype.fillWith=function(a){var b=this.contentEl(),c=b.parentNode,d=b.nextSibling;this.trigger("beforemodalfill");this.hasBeenFilled_=!0;c.removeChild(b);this.empty();Bc(b,a);this.trigger("modalfill");
d?c.insertBefore(b,d):c.appendChild(b);(a=this.getChild("closeButton"))&&c.appendChild(a.el_)};c.prototype.empty=function(){this.trigger("beforemodalempty");sb(this.contentEl());this.trigger("modalempty")};c.prototype.content=function(a){"undefined"!==typeof a&&(this.content_=a);return this.content_};c.prototype.conditionalFocus_=function(){var a=t.activeElement,b=this.player_.el_;this.previouslyActiveEl_=null;if(b.contains(a)||b===a)this.previouslyActiveEl_=a,this.focus(),this.on(t,"keydown",this.handleKeyDown)};
c.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null);this.off(t,"keydown",this.handleKeyDown)};c.prototype.handleKeyDown=function(a){if(9===a.which){for(var b=this.focusableEls_(),c=this.el_.querySelector(":focus"),d=void 0,m=0;m<b.length;m++)if(c===b[m]){d=m;break}t.activeElement===this.el_&&(d=0);a.shiftKey&&0===d?(b[b.length-1].focus(),a.preventDefault()):a.shiftKey||d!==b.length-1||(b[0].focus(),a.preventDefault())}};
c.prototype.focusableEls_=function(){var a=this.el_.querySelectorAll("*");return Array.prototype.filter.call(a,function(b){return(b instanceof n.HTMLAnchorElement||b instanceof n.HTMLAreaElement)&&b.hasAttribute("href")||(b instanceof n.HTMLInputElement||b instanceof n.HTMLSelectElement||b instanceof n.HTMLTextAreaElement||b instanceof n.HTMLButtonElement)&&!b.hasAttribute("disabled")||b instanceof n.HTMLIFrameElement||b instanceof n.HTMLObjectElement||b instanceof n.HTMLEmbedElement||b.hasAttribute("tabindex")&&
-1!==b.getAttribute("tabindex")||b.hasAttribute("contenteditable")})};return c}(p);xa.prototype.options_={pauseOnOpen:!0,temporary:!0};p.registerComponent("ModalDialog",xa);var S=function(d){function c(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],b,g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;w(this,c);var f=r(this,d.call(this));if(!g&&(g=f,F)){var g=t.createElement("custom"),m;for(m in c.prototype)"constructor"!==m&&(g[m]=c.prototype[m])}g.tracks_=[];Object.defineProperty(g,
"length",{get:function(){return this.tracks_.length}});for(m=0;m<a.length;m++)g.addTrack(a[m]);return b=g,r(f,b)}x(c,d);c.prototype.addTrack=function(a){var b=this.tracks_.length;""+b in this||Object.defineProperty(this,b,{get:function(){return this.tracks_[b]}});-1===this.tracks_.indexOf(a)&&(this.tracks_.push(a),this.trigger({track:a,type:"addtrack"}))};c.prototype.removeTrack=function(a){for(var b=void 0,c=0,d=this.length;c<d;c++)if(this[c]===a){b=this[c];b.off&&b.off();this.tracks_.splice(c,1);
break}b&&this.trigger({track:b,type:"removetrack"})};c.prototype.getTrackById=function(a){for(var b=null,c=0,d=this.length;c<d;c++){var m=this[c];if(m.id===a){b=m;break}}return b};return c}(J);S.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var Ke in S.prototype.allowedEvents_)S.prototype["on"+Ke]=null;var Nb=function(d,c){for(var a=0;a<d.length;a++)Object.keys(d[a]).length&&c.id!==d[a].id&&(d[a].enabled=!1)},Le=function(d){function c(){var a,b,g=0<arguments.length&&
void 0!==arguments[0]?arguments[0]:[];w(this,c);for(var f=void 0,m=g.length-1;0<=m;m--)if(g[m].enabled){Nb(g,g[m]);break}if(F){var f=t.createElement("custom"),e;for(e in S.prototype)"constructor"!==e&&(f[e]=S.prototype[e]);for(var h in c.prototype)"constructor"!==h&&(f[h]=c.prototype[h])}f=(a=r(this,d.call(this,g,f)),a);f.changing_=!1;return b=f,r(a,b)}x(c,d);c.prototype.addTrack=function(a){var b=this;a.enabled&&Nb(this,a);d.prototype.addTrack.call(this,a);a.addEventListener&&a.addEventListener("enabledchange",
function(){b.changing_||(b.changing_=!0,Nb(b,a),b.changing_=!1,b.trigger("change"))})};return c}(S),Ob=function(d,c){for(var a=0;a<d.length;a++)Object.keys(d[a]).length&&c.id!==d[a].id&&(d[a].selected=!1)},Me=function(d){function c(){var a,b,g=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];w(this,c);for(var f=void 0,m=g.length-1;0<=m;m--)if(g[m].selected){Ob(g,g[m]);break}if(F){var f=t.createElement("custom"),e;for(e in S.prototype)"constructor"!==e&&(f[e]=S.prototype[e]);for(var h in c.prototype)"constructor"!==
h&&(f[h]=c.prototype[h])}f=(a=r(this,d.call(this,g,f)),a);f.changing_=!1;Object.defineProperty(f,"selectedIndex",{get:function(){for(var b=0;b<this.length;b++)if(this[b].selected)return b;return-1},set:function(){}});return b=f,r(a,b)}x(c,d);c.prototype.addTrack=function(a){var b=this;a.selected&&Ob(this,a);d.prototype.addTrack.call(this,a);a.addEventListener&&a.addEventListener("selectedchange",function(){b.changing_||(b.changing_=!0,Ob(b,a),b.changing_=!1,b.trigger("change"))})};return c}(S),qd=
function(d){function c(){var a,b,g=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];w(this,c);var f=void 0;if(F){var f=t.createElement("custom"),m;for(m in S.prototype)"constructor"!==m&&(f[m]=S.prototype[m]);for(var e in c.prototype)"constructor"!==e&&(f[e]=c.prototype[e])}f=(a=r(this,d.call(this,g,f)),a);return b=f,r(a,b)}x(c,d);c.prototype.addTrack=function(a){d.prototype.addTrack.call(this,a);a.addEventListener("modechange",y(this,function(){this.trigger("change")}));-1===["metadata",
"chapters"].indexOf(a.kind)&&a.addEventListener("modechange",y(this,function(){this.trigger("selectedlanguagechange")}))};return c}(S),Ne=function(){function d(){var c=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];w(this,d);var a=this;if(F){var a=t.createElement("custom"),b;for(b in d.prototype)"constructor"!==b&&(a[b]=d.prototype[b])}a.trackElements_=[];Object.defineProperty(a,"length",{get:function(){return this.trackElements_.length}});b=0;for(var g=c.length;b<g;b++)a.addTrackElement_(c[b]);
if(F)return a}d.prototype.addTrackElement_=function(c){var a=this.trackElements_.length;""+a in this||Object.defineProperty(this,a,{get:function(){return this.trackElements_[a]}});-1===this.trackElements_.indexOf(c)&&this.trackElements_.push(c)};d.prototype.getTrackElementByTrack_=function(c){for(var a=void 0,b=0,g=this.trackElements_.length;b<g;b++)if(c===this.trackElements_[b].track){a=this.trackElements_[b];break}return a};d.prototype.removeTrackElement_=function(c){for(var a=0,b=this.trackElements_.length;a<
b;a++)if(c===this.trackElements_[a]){this.trackElements_.splice(a,1);break}};return d}(),rd=function(){function d(c){w(this,d);var a=this;if(F){var a=t.createElement("custom"),b;for(b in d.prototype)"constructor"!==b&&(a[b]=d.prototype[b])}d.prototype.setCues_.call(a,c);Object.defineProperty(a,"length",{get:function(){return this.length_}});if(F)return a}d.prototype.setCues_=function(c){var a=this.length||0,b=0,g=c.length;this.cues_=c;this.length_=c.length;c=function(b){""+b in this||Object.defineProperty(this,
""+b,{get:function(){return this.cues_[b]}})};if(a<g)for(b=a;b<g;b++)c.call(this,b)};d.prototype.getCueById=function(c){for(var a=null,b=0,g=this.length;b<g;b++){var d=this[b];if(d.id===c){a=d;break}}return a};return d}(),Oe={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Pe={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Qe={subtitles:"subtitles",
captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},sd={disabled:"disabled",hidden:"hidden",showing:"showing"},Pb=function(d){function c(){var a,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};w(this,c);var g=r(this,d.call(this)),f=g;if(F){var f=t.createElement("custom"),m;for(m in c.prototype)"constructor"!==m&&(f[m]=c.prototype[m])}var e={id:b.id||"vjs_track_"+ka++,kind:b.kind||"",label:b.label||"",language:b.language||""},b=function(b){Object.defineProperty(f,
b,{get:function(){return e[b]},set:function(){}})},h;for(h in e)b(h);return a=f,r(g,a)}x(c,d);return c}(J),Qb=function(d){var c="protocol hostname port pathname search hash host".split(" "),a=t.createElement("a");a.href=d;var b=""===a.host&&"file:"!==a.protocol,g=void 0;b&&(g=t.createElement("div"),g.innerHTML='<a href="'+d+'"></a>',a=g.firstChild,g.setAttribute("style","display:none; position:absolute;"),t.body.appendChild(g));d={};for(var f=0;f<c.length;f++)d[c[f]]=a[c[f]];"http:"===d.protocol&&
(d.host=d.host.replace(/:80$/,""));"https:"===d.protocol&&(d.host=d.host.replace(/:443$/,""));d.protocol||(d.protocol=n.location.protocol);b&&t.body.removeChild(g);return d},td=function(d){if(!d.match(/^https?:\/\//)){var c=t.createElement("div");c.innerHTML='<a href="'+d+'">x</a>';d=c.firstChild.href}return d},Rb=function(d){return"string"===typeof d&&(d=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(d))?d.pop().toLowerCase():""},hb=function(d){var c=n.location;d=
Qb(d);return(":"===d.protocol?c.protocol:d.protocol)+d.host!==c.protocol+c.host},Re=(Object.freeze||Object)({parseUrl:Qb,getAbsoluteURL:td,getFileExtension:Rb,isCrossOrigin:hb}),Lc=function(d){var c=Se.call(d);return"[object Function]"===c||"function"===typeof d&&"[object RegExp]"!==c||"undefined"!==typeof window&&(d===window.setTimeout||d===window.alert||d===window.confirm||d===window.prompt)},Se=Object.prototype.toString,Sb=e(function(d,c){c=d.exports=function(a){return a.replace(/^\s*|\s*$/g,"")};
c.left=function(a){return a.replace(/^\s*/,"")};c.right=function(a){return a.replace(/\s*$/,"")}}),Ue=function(d,c,a){if(!Lc(c))throw new TypeError("iterator must be a function");3>arguments.length&&(a=this);if("[object Array]"===Te.call(d))for(var b=a,g=0,f=d.length;g<f;g++)ud.call(d,g)&&c.call(b,d[g],g,d);else if("string"===typeof d)for(b=a,g=0,f=d.length;g<f;g++)c.call(b,d.charAt(g),g,d);else for(g in b=a,d)ud.call(d,g)&&c.call(b,d[g],g,d)},Te=Object.prototype.toString,ud=Object.prototype.hasOwnProperty,
pe=function(d){if(!d)return{};var c={};Ue(Sb(d).split("\n"),function(a){var b=a.indexOf(":"),g=Sb(a.slice(0,b)).toLowerCase();a=Sb(a.slice(b+1));"undefined"===typeof c[g]?c[g]=a:"[object Array]"===Object.prototype.toString.call(c[g])?c[g].push(a):c[g]=[c[g],a]});return c},oe=function(){for(var d={},c=0;c<arguments.length;c++){var a=arguments[c],b;for(b in a)Ve.call(a,b)&&(d[b]=a[b])}return d},Ve=Object.prototype.hasOwnProperty;Y.XMLHttpRequest=n.XMLHttpRequest||qe;Y.XDomainRequest="withCredentials"in
new Y.XMLHttpRequest?Y.XMLHttpRequest:n.XDomainRequest;(function(d,c){for(var a=0;a<d.length;a++)c(d[a])})("get put post patch head delete".split(" "),function(d){Y["delete"===d?"del":d]=function(c,a,b){a=Kc(c,a,b);a.method=d.toUpperCase();return Mc(a)}});var vd=function(d,c){var a=new n.WebVTT.Parser(n,n.vttjs,n.WebVTT.StringDecoder()),b=[];a.oncue=function(b){c.addCue(b)};a.onparsingerror=function(a){b.push(a)};a.onflush=function(){c.trigger({type:"loadeddata",target:c})};a.parse(d);0<b.length&&
(n.console&&n.console.groupCollapsed&&n.console.groupCollapsed("Text Track parsing errors for "+c.src),b.forEach(function(b){return z.error(b)}),n.console&&n.console.groupEnd&&n.console.groupEnd());a.flush()},We=function(d,c){var a={uri:d},b=hb(d);b&&(a.cors=b);Y(a,y(this,function(b,a,d){if(b)return z.error(b,a);c.loaded_=!0;if("function"!==typeof n.WebVTT){if(c.tech_){var e=function(){return vd(d,c)};c.tech_.on("vttjsloaded",e);c.tech_.on("vttjserror",function(){z.error("vttjs failed to load, stopping trying to process "+
c.src);c.tech_.off("vttjsloaded",e)})}}else vd(d,c)}))},Pa=function(d){function c(){var a,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};w(this,c);if(!b.tech)throw Error("A tech was not provided.");var b=C(b,{kind:Qe[b.kind]||"subtitles",language:b.language||b.srclang||""}),g=sd[b.mode]||"disabled",f=b["default"];if("metadata"===b.kind||"chapters"===b.kind)g="hidden";var m=(a=r(this,d.call(this,b)),a);m.tech_=b.tech;if(F)for(var e in c.prototype)"constructor"!==e&&(m[e]=c.prototype[e]);
m.cues_=[];m.activeCues_=[];var h=new rd(m.cues_),k=new rd(m.activeCues_),E=!1,l=y(m,function(){this.activeCues;E&&(this.trigger("cuechange"),E=!1)});"disabled"!==g&&m.tech_.ready(function(){m.tech_.on("timeupdate",l)},!0);Object.defineProperty(m,"default",{get:function(){return f},set:function(){}});Object.defineProperty(m,"mode",{get:function(){return g},set:function(b){var a=this;sd[b]&&(g=b,"showing"===g&&this.tech_.ready(function(){a.tech_.on("timeupdate",l)},!0),this.trigger("modechange"))}});
Object.defineProperty(m,"cues",{get:function(){return this.loaded_?h:null},set:function(){}});Object.defineProperty(m,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return k;for(var b=this.tech_.currentTime(),a=[],c=0,g=this.cues.length;c<g;c++){var d=this.cues[c];d.startTime<=b&&d.endTime>=b?a.push(d):d.startTime===d.endTime&&d.startTime<=b&&d.startTime+.5>=b&&a.push(d)}E=!1;if(a.length!==this.activeCues_.length)E=!0;else for(b=0;b<a.length;b++)-1===this.activeCues_.indexOf(a[b])&&
(E=!0);this.activeCues_=a;k.setCues_(this.activeCues_);return k},set:function(){}});b.src?(m.src=b.src,We(b.src,m)):m.loaded_=!0;return r(a,m)}x(c,d);c.prototype.addCue=function(a){var b=a;if(n.vttjs&&!(a instanceof n.vttjs.VTTCue)){var b=new n.vttjs.VTTCue(a.startTime,a.endTime,a.text),c;for(c in a)c in b||(b[c]=a[c]);b.id=a.id;b.originalCue_=a}a=this.tech_.textTracks();for(c=0;c<a.length;c++)a[c]!==this&&a[c].removeCue(b);this.cues_.push(b);this.cues.setCues_(this.cues_)};c.prototype.removeCue=
function(a){for(var b=this.cues_.length;b--;){var c=this.cues_[b];if(c===a||c.originalCue_&&c.originalCue_===a){this.cues_.splice(b,1);this.cues.setCues_(this.cues_);break}}};return c}(Pb);Pa.prototype.allowedEvents_={cuechange:"cuechange"};var wd=function(d){function c(){var a,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};w(this,c);var b=C(b,{kind:Pe[b.kind]||""}),g=(a=r(this,d.call(this,b)),a),f=!1;if(F)for(var m in c.prototype)"constructor"!==m&&(g[m]=c.prototype[m]);Object.defineProperty(g,
"enabled",{get:function(){return f},set:function(b){"boolean"===typeof b&&b!==f&&(f=b,this.trigger("enabledchange"))}});b.enabled&&(g.enabled=b.enabled);g.loaded_=!0;return r(a,g)}x(c,d);return c}(Pb),xd=function(d){function c(){var a,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};w(this,c);var b=C(b,{kind:Oe[b.kind]||""}),g=(a=r(this,d.call(this,b)),a),f=!1;if(F)for(var m in c.prototype)"constructor"!==m&&(g[m]=c.prototype[m]);Object.defineProperty(g,"selected",{get:function(){return f},
set:function(b){"boolean"===typeof b&&b!==f&&(f=b,this.trigger("selectedchange"))}});b.selected&&(g.selected=b.selected);return r(a,g)}x(c,d);return c}(Pb),ya=function(d){function c(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};w(this,c);var b=r(this,d.call(this)),g=void 0,f=b;if(F){var f=t.createElement("custom"),m;for(m in c.prototype)"constructor"!==m&&(f[m]=c.prototype[m])}var e=new Pa(a);f.kind=e.kind;f.src=e.src;f.srclang=e.language;f.label=e.label;f["default"]=e["default"];
Object.defineProperty(f,"readyState",{get:function(){return g}});Object.defineProperty(f,"track",{get:function(){return e}});g=0;e.addEventListener("loadeddata",function(){g=2;f.trigger({type:"load",target:f})});if(F){var h;return h=f,r(b,h)}return b}x(c,d);return c}(J);ya.prototype.allowedEvents_={load:"load"};ya.NONE=0;ya.LOADING=1;ya.LOADED=2;ya.ERROR=3;var T={audio:{ListClass:Le,TrackClass:wd,capitalName:"Audio"},video:{ListClass:Me,TrackClass:xd,capitalName:"Video"},text:{ListClass:qd,TrackClass:Pa,
capitalName:"Text"}};Object.keys(T).forEach(function(d){T[d].getterName=d+"Tracks";T[d].privateName=d+"Tracks_"});var Qa={remoteText:{ListClass:qd,TrackClass:Pa,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Ne,TrackClass:ya,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Q=C(T,Qa);Qa.names=Object.keys(Qa);T.names=Object.keys(T);Q.names=[].concat(Qa.names).concat(T.names);var Ab=Object.create||
function(){function d(){}return function(c){if(1!==arguments.length)throw Error("Object.create shim only accepts one parameter.");d.prototype=c;return new d}}();P.prototype=Ab(Error.prototype);P.prototype.constructor=P;P.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};Ja.prototype={set:function(d,c){this.get(d)||""===c||(this.values[d]=c)},get:function(d,c,a){return a?this.has(d)?this.values[d]:c[a]:this.has(d)?this.values[d]:
c},has:function(d){return d in this.values},alt:function(d,c,a){for(var b=0;b<a.length;++b)if(c===a[b]){this.set(d,c);break}},integer:function(d,c){/^-?\d+$/.test(c)&&this.set(d,parseInt(c,10))},percent:function(d,c){return c.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(c=parseFloat(c),0<=c&&100>=c)?(this.set(d,c),!0):!1}};var se={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"\u200e","&rlm;":"\u200f","&nbsp;":"\u00a0"},te={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},ue={v:"title",lang:"lang"},
Oc={rt:"ruby"},Pc=[[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]];Bb.prototype.applyStyles=
function(d,c){c=c||this.div;for(var a in d)d.hasOwnProperty(a)&&(c.style[a]=d[a])};Bb.prototype.formatStyle=function(d,c){return 0===d?0:d+c};Xa.prototype=Ab(Bb.prototype);Xa.prototype.constructor=Xa;L.prototype.move=function(d,c){c=void 0!==c?c:this.lineHeight;switch(d){case "+x":this.left+=c;this.right+=c;break;case "-x":this.left-=c;this.right-=c;break;case "+y":this.top+=c;this.bottom+=c;break;case "-y":this.top-=c,this.bottom-=c}};L.prototype.overlaps=function(d){return this.left<d.right&&this.right>
d.left&&this.top<d.bottom&&this.bottom>d.top};L.prototype.overlapsAny=function(d){for(var c=0;c<d.length;c++)if(this.overlaps(d[c]))return!0;return!1};L.prototype.within=function(d){return this.top>=d.top&&this.bottom<=d.bottom&&this.left>=d.left&&this.right<=d.right};L.prototype.overlapsOppositeAxis=function(d,c){switch(c){case "+x":return this.left<d.left;case "-x":return this.right>d.right;case "+y":return this.top<d.top;case "-y":return this.bottom>d.bottom}};L.prototype.intersectPercentage=function(d){return Math.max(0,
Math.min(this.right,d.right)-Math.max(this.left,d.left))*Math.max(0,Math.min(this.bottom,d.bottom)-Math.max(this.top,d.top))/(this.height*this.width)};L.prototype.toCSSCompatValues=function(d){return{top:this.top-d.top,bottom:d.bottom-this.bottom,left:this.left-d.left,right:d.right-this.right,height:this.height,width:this.width}};L.getSimpleBoxPosition=function(d){var c=d.div?d.div.offsetHeight:d.tagName?d.offsetHeight:0,a=d.div?d.div.offsetWidth:d.tagName?d.offsetWidth:0,b=d.div?d.div.offsetTop:
d.tagName?d.offsetTop:0;d=d.div?d.div.getBoundingClientRect():d.tagName?d.getBoundingClientRect():d;return{left:d.left,right:d.right,top:d.top||b,height:d.height||c,bottom:d.bottom||b+(d.height||c),width:d.width||a}};ta.StringDecoder=function(){return{decode:function(d){if(!d)return"";if("string"!==typeof d)throw Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(d))}}};ta.convertCueToDOMTree=function(d,c){return d&&c?Nc(d,c):null};ta.processCues=function(d,c,a){if(!d||
!c||!a)return null;for(;a.firstChild;)a.removeChild(a.firstChild);var b=d.document.createElement("div");b.style.position="absolute";b.style.left="0";b.style.right="0";b.style.top="0";b.style.bottom="0";b.style.margin="1.5%";a.appendChild(b);if(function(b){for(var a=0;a<b.length;a++)if(b[a].hasBeenReset||!b[a].displayState)return!0;return!1}(c)){var g=[],f=L.getSimpleBoxPosition(b),m={font:Math.round(5*f.height)/100+"px sans-serif"};(function(){for(var a,e,h=0;h<c.length;h++){e=c[h];a=new Xa(d,e,m);
b.appendChild(a.div);var k=a,l=f,n=g,p=new L(k),q=k.cue,r;if("number"===typeof q.line&&(q.snapToLines||0<=q.line&&100>=q.line))r=q.line;else if(q.track&&q.track.textTrackList&&q.track.textTrackList.mediaElement){var t=q.track;r=t.textTrackList;for(var v=0,u=0;u<r.length&&r[u]!==t;u++)"showing"===r[u].mode&&v++;r=-1*++v}else r=-1;t=[];if(q.snapToLines){var w=void 0;switch(q.vertical){case "":t=["+y","-y"];w="height";break;case "rl":t=["+x","-x"];w="width";break;case "lr":t=["-x","+x"],w="width"}var v=
p.lineHeight,u=v*Math.round(r),w=l[w]+v,x=t[0];Math.abs(u)>w&&(u=0>u?-1:1,u=u*Math.ceil(w/v)*v);0>r&&(u+=""===q.vertical?l.height:l.width,t=t.reverse());p.move(x,u)}else{p=p.lineHeight/l.height*100;switch(q.lineAlign){case "middle":r-=p/2;break;case "end":r-=p}switch(q.vertical){case "":k.applyStyles({top:k.formatStyle(r,"%")});break;case "rl":k.applyStyles({left:k.formatStyle(r,"%")});break;case "lr":k.applyStyles({right:k.formatStyle(r,"%")})}t=["+y","-x","+x","-y"];p=new L(k)}q=void 0;a:{q=t;t=
void 0;r=new L(p);v=1;for(u=0;u<q.length;u++){for(;p.overlapsOppositeAxis(l,q[u])||p.within(l)&&p.overlapsAny(n);)p.move(q[u]);if(p.within(l)){q=p;break a}w=p.intersectPercentage(l);v>w&&(t=new L(p),v=w);p=new L(r)}q=t||r}k.move(q.toCSSCompatValues(l));e.displayState=a.div;g.push(L.getSimpleBoxPosition(a))}})()}else for(a=0;a<c.length;a++)b.appendChild(c[a].displayState)};ta.Parser=function(d,c,a){a||(a=c,c={});c||(c={});this.window=d;this.vttjs=c;this.state="INITIAL";this.buffer="";this.decoder=
a||new TextDecoder("utf8");this.regionList=[]};ta.Parser.prototype={reportOrThrowError:function(d){if(d instanceof P)this.onparsingerror&&this.onparsingerror(d);else throw d;},parse:function(d){function c(){for(var b=f.buffer,a=0;a<b.length&&"\r"!==b[a]&&"\n"!==b[a];)++a;var c=b.substr(0,a);"\r"===b[a]&&++a;"\n"===b[a]&&++a;f.buffer=b.substr(a);return c}function a(b){var a=new Ja;Ka(b,function(b,c){switch(b){case "id":a.set(b,c);break;case "width":a.percent(b,c);break;case "lines":a.integer(b,c);
break;case "regionanchor":case "viewportanchor":var g=c.split(",");if(2!==g.length)break;var d=new Ja;d.percent("x",g[0]);d.percent("y",g[1]);if(!d.has("x")||!d.has("y"))break;a.set(b+"X",d.get("x"));a.set(b+"Y",d.get("y"));break;case "scroll":a.alt(b,c,["up"])}},/=/,/\s/);a.has("id")&&(b=new (f.vttjs.VTTRegion||f.window.VTTRegion),b.width=a.get("width",100),b.lines=a.get("lines",3),b.regionAnchorX=a.get("regionanchorX",0),b.regionAnchorY=a.get("regionanchorY",100),b.viewportAnchorX=a.get("viewportanchorX",
0),b.viewportAnchorY=a.get("viewportanchorY",100),b.scroll=a.get("scroll",""),f.onregion&&f.onregion(b),f.regionList.push({id:a.get("id"),region:b}))}function b(b){var a=new Ja;Ka(b,function(b,c){switch(b){case "MPEGT":a.integer(b+"S",c);break;case "LOCA":a.set(b+"L",zb(c))}},/[^\d]:/,/,/);f.ontimestampmap&&f.ontimestampmap({MPEGTS:a.get("MPEGTS"),LOCAL:a.get("LOCAL")})}function g(c){c.match(/X-TIMESTAMP-MAP/)?Ka(c,function(a,c){switch(a){case "X-TIMESTAMP-MAP":b(c)}},/=/):Ka(c,function(b,c){switch(b){case "Region":a(c)}},
/:/)}var f=this;d&&(f.buffer+=f.decoder.decode(d,{stream:!0}));try{var m;if("INITIAL"===f.state){if(!/\r\n|\n/.test(f.buffer))return this;m=c();var e=m.match(/^WEBVTT([ \t].*)?$/);if(!e||!e[0])throw new P(P.Errors.BadSignature);f.state="HEADER"}for(d=!1;f.buffer;){if(!/\r\n|\n/.test(f.buffer))return this;d?d=!1:m=c();switch(f.state){case "HEADER":/:/.test(m)?g(m):m||(f.state="ID");continue;case "NOTE":m||(f.state="ID");continue;case "ID":if(/^NOTE($|[ \t])/.test(m)){f.state="NOTE";break}if(!m)continue;
f.cue=new (f.vttjs.VTTCue||f.window.VTTCue)(0,0,"");f.state="CUE";if(-1===m.indexOf("--\x3e")){f.cue.id=m;continue}case "CUE":try{re(m,f.cue,f.regionList)}catch(h){f.reportOrThrowError(h);f.cue=null;f.state="BADCUE";continue}f.state="CUETEXT";continue;case "CUETEXT":var k=-1!==m.indexOf("--\x3e");if(!m||k&&(d=!0)){f.oncue&&f.oncue(f.cue);f.cue=null;f.state="ID";continue}f.cue.text&&(f.cue.text+="\n");f.cue.text+=m;continue;case "BADCUE":m||(f.state="ID")}}}catch(h){f.reportOrThrowError(h);if("CUETEXT"===
f.state&&f.cue&&f.oncue)f.oncue(f.cue);f.cue=null;f.state="INITIAL"===f.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{this.buffer+=this.decoder.decode();if(this.cue||"HEADER"===this.state)this.buffer+="\n\n",this.parse();if("INITIAL"===this.state)throw new P(P.Errors.BadSignature);}catch(d){this.reportOrThrowError(d)}this.onflush&&this.onflush();return this}};var ye={"":!0,lr:!0,rl:!0},xe={start:!0,middle:!0,end:!0,left:!0,right:!0};Qc.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,
this.text)};var Xe={"":!0,up:!0},Ye=function(){var d=100,c=3,a=0,b=100,g=0,f=100,m="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return d},set:function(b){if(!La(b))throw Error("Width must be between 0 and 100.");d=b}},lines:{enumerable:!0,get:function(){return c},set:function(b){if("number"!==typeof b)throw new TypeError("Lines must be set to a number.");c=b}},regionAnchorY:{enumerable:!0,get:function(){return b},set:function(a){if(!La(a))throw Error("RegionAnchorX must be between 0 and 100.");
b=a}},regionAnchorX:{enumerable:!0,get:function(){return a},set:function(b){if(!La(b))throw Error("RegionAnchorY must be between 0 and 100.");a=b}},viewportAnchorY:{enumerable:!0,get:function(){return f},set:function(b){if(!La(b))throw Error("ViewportAnchorY must be between 0 and 100.");f=b}},viewportAnchorX:{enumerable:!0,get:function(){return g},set:function(b){if(!La(b))throw Error("ViewportAnchorX must be between 0 and 100.");g=b}},scroll:{enumerable:!0,get:function(){return m},set:function(b){b=
"string"!==typeof b?!1:Xe[b.toLowerCase()]?b.toLowerCase():!1;if(!1===b)throw new SyntaxError("An invalid or illegal string was specified.");m=b}}})},yd=e(function(d){d=d.exports={WebVTT:ta,VTTCue:Qc,VTTRegion:Ye};n.vttjs=d;n.WebVTT=d.WebVTT;var c=d.VTTCue,a=d.VTTRegion,b=n.VTTCue,g=n.VTTRegion;d.shim=function(){n.VTTCue=c;n.VTTRegion=a};d.restore=function(){n.VTTCue=b;n.VTTRegion=g};n.VTTCue||d.shim()}),B=function(d){function c(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},b=
1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){};w(this,c);a.reportTouchActivity=!1;var g=r(this,d.call(this,null,a,b));g.hasStarted_=!1;g.on("playing",function(){this.hasStarted_=!0});g.on("loadstart",function(){this.hasStarted_=!1});Q.names.forEach(function(b){b=Q[b];a&&a[b.getterName]&&(g[b.privateName]=a[b.getterName])});g.featuresProgressEvents||g.manualProgressOn();g.featuresTimeupdateEvents||g.manualTimeUpdatesOn();["Text","Audio","Video"].forEach(function(b){!1===a["native"+
b+"Tracks"]&&(g["featuresNative"+b+"Tracks"]=!1)});if(!1===a.nativeCaptions||!1===a.nativeTextTracks)g.featuresNativeTextTracks=!1;else if(!0===a.nativeCaptions||!0===a.nativeTextTracks)g.featuresNativeTextTracks=!0;g.featuresNativeTextTracks||g.emulateTextTracks();g.autoRemoteTextTracks_=new Q.text.ListClass;g.initTrackListeners();a.nativeControlsForTouch||g.emitTapEvents();g.constructor&&(g.name_=g.constructor.name||"Unknown Tech");return g}x(c,d);c.prototype.triggerSourceset=function(a){var b=
this;if(!this.isReady_)this.one("ready",function(){return b.setTimeout(function(){return b.triggerSourceset(a)},1)});this.trigger({src:a,type:"sourceset"})};c.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange);this.manualProgress=!0;this.one("ready",this.trackProgress)};c.prototype.manualProgressOff=function(){this.manualProgress=!1;this.stopTrackingProgress();this.off("durationchange",this.onDurationChange)};c.prototype.trackProgress=function(a){this.stopTrackingProgress();
this.progressInterval=this.setInterval(y(this,function(){var b=this.bufferedPercent();this.bufferedPercent_!==b&&this.trigger("progress");this.bufferedPercent_=b;1===b&&this.stopTrackingProgress()}),500)};c.prototype.onDurationChange=function(a){this.duration_=this.duration()};c.prototype.buffered=function(){return la(0,0)};c.prototype.bufferedPercent=function(){return Ic(this.buffered(),this.duration_)};c.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)};c.prototype.manualTimeUpdatesOn=
function(){this.manualTimeUpdates=!0;this.on("play",this.trackCurrentTime);this.on("pause",this.stopTrackingCurrentTime)};c.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1;this.stopTrackingCurrentTime();this.off("play",this.trackCurrentTime);this.off("pause",this.stopTrackingCurrentTime)};c.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime();this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,
manuallyTriggered:!0})},250)};c.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval);this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})};c.prototype.dispose=function(){this.clearTracks(T.names);this.manualProgress&&this.manualProgressOff();this.manualTimeUpdates&&this.manualTimeUpdatesOff();d.prototype.dispose.call(this)};c.prototype.clearTracks=function(a){var b=this;a=[].concat(a);a.forEach(function(a){for(var c=b[a+"Tracks"]()||[],d=c.length;d--;){var e=
c[d];"text"===a&&b.removeRemoteTextTrack(e);c.removeTrack(e)}})};c.prototype.cleanupAutoTextTracks=function(){for(var a=this.autoRemoteTextTracks_||[],b=a.length;b--;)this.removeRemoteTextTrack(a[b])};c.prototype.reset=function(){};c.prototype.error=function(a){void 0!==a&&(this.error_=new K(a),this.trigger("error"));return this.error_};c.prototype.played=function(){return this.hasStarted_?la(0,0):la()};c.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",
target:this,manuallyTriggered:!0})};c.prototype.initTrackListeners=function(){var a=this;T.names.forEach(function(b){var c=function(){a.trigger(b+"trackchange")},d=a[T[b].getterName]();d.addEventListener("removetrack",c);d.addEventListener("addtrack",c);a.on("dispose",function(){d.removeEventListener("removetrack",c);d.removeEventListener("addtrack",c)})})};c.prototype.addWebVttScript_=function(){var a=this;if(!n.WebVTT)if(t.body.contains(this.el()))if(!this.options_["vtt.js"]&&A(yd)&&0<Object.keys(yd).length)this.trigger("vttjsloaded");
else{var b=t.createElement("script");b.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js";b.onload=function(){a.trigger("vttjsloaded")};b.onerror=function(){a.trigger("vttjserror")};this.on("dispose",function(){b.onload=null;b.onerror=null});n.WebVTT=!0;this.el().parentNode.appendChild(b)}else this.ready(this.addWebVttScript_)};c.prototype.emulateTextTracks=function(){var a=this,b=this.textTracks(),c=this.remoteTextTracks(),d=function(a){return b.addTrack(a.track)},e=function(a){return b.removeTrack(a.track)};
c.on("addtrack",d);c.on("removetrack",e);this.addWebVttScript_();var h=function(){return a.trigger("texttrackchange")},k=function(){h();for(var a=0;a<b.length;a++){var c=b[a];c.removeEventListener("cuechange",h);"showing"===c.mode&&c.addEventListener("cuechange",h)}};k();b.addEventListener("change",k);b.addEventListener("addtrack",k);b.addEventListener("removetrack",k);this.on("dispose",function(){c.off("addtrack",d);c.off("removetrack",e);b.removeEventListener("change",k);b.removeEventListener("addtrack",
k);b.removeEventListener("removetrack",k);for(var a=0;a<b.length;a++)b[a].removeEventListener("cuechange",h)})};c.prototype.addTextTrack=function(a,b,c){if(!a)throw Error("TextTrack kind is required but was not provided");return ze(this,a,b,c)};c.prototype.createRemoteTextTrack=function(a){a=C(a,{tech:this});return new Qa.remoteTextEl.TrackClass(a)};c.prototype.addRemoteTextTrack=function(){var a=this,b=arguments[1],c=this.createRemoteTextTrack(0<arguments.length&&void 0!==arguments[0]?arguments[0]:
{});!0!==b&&!1!==b&&(z.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),b=!0);this.remoteTextTrackEls().addTrackElement_(c);this.remoteTextTracks().addTrack(c.track);!0!==b&&this.ready(function(){return a.autoRemoteTextTracks_.addTrack(c.track)});return c};c.prototype.removeRemoteTextTrack=function(a){var b=this.remoteTextTrackEls().getTrackElementByTrack_(a);this.remoteTextTrackEls().removeTrackElement_(b);
this.remoteTextTracks().removeTrack(a);this.autoRemoteTextTracks_.removeTrack(a)};c.prototype.getVideoPlaybackQuality=function(){return{}};c.prototype.setPoster=function(){};c.prototype.playsinline=function(){};c.prototype.setPlaysinline=function(){};c.prototype.canPlayType=function(){return""};c.canPlayType=function(){return""};c.canPlaySource=function(a,b){return c.canPlayType(a.type)};c.isTech=function(a){return a.prototype instanceof c||a instanceof c||a===c};c.registerTech=function(a,b){c.techs_||
(c.techs_={});if(!c.isTech(b))throw Error("Tech "+a+" must be a Tech");if(!c.canPlayType)throw Error("Techs must have a static canPlayType method on them");if(!c.canPlaySource)throw Error("Techs must have a static canPlaySource method on them");a=D(a);c.techs_[a]=b;"Tech"!==a&&c.defaultTechOrder_.push(a);return b};c.getTech=function(a){if(a){a=D(a);if(c.techs_&&c.techs_[a])return c.techs_[a];if(n&&n.videojs&&n.videojs[a])return z.warn("The "+a+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),
n.videojs[a]}};return c}(p);Q.names.forEach(function(d){var c=Q[d];B.prototype[c.getterName]=function(){this[c.privateName]=this[c.privateName]||new c.ListClass;return this[c.privateName]}});B.prototype.featuresVolumeControl=!0;B.prototype.featuresFullscreenResize=!1;B.prototype.featuresPlaybackRate=!1;B.prototype.featuresProgressEvents=!1;B.prototype.featuresSourceset=!1;B.prototype.featuresTimeupdateEvents=!1;B.prototype.featuresNativeTextTracks=!1;B.withSourceHandlers=function(d){d.registerSourceHandler=
function(c,a){var b=d.sourceHandlers;b||(b=d.sourceHandlers=[]);void 0===a&&(a=b.length);b.splice(a,0,c)};d.canPlayType=function(c){for(var a=d.sourceHandlers||[],b=void 0,g=0;g<a.length;g++)if(b=a[g].canPlayType(c))return b;return""};d.selectSourceHandler=function(c,a){for(var b=d.sourceHandlers||[],g=void 0,f=0;f<b.length;f++)if(g=b[f].canHandleSource(c,a))return b[f];return null};d.canPlaySource=function(c,a){var b=d.selectSourceHandler(c,a);return b?b.canHandleSource(c,a):""};["seekable","seeking",
"duration"].forEach(function(c){var a=this[c];"function"===typeof a&&(this[c]=function(){return this.sourceHandler_&&this.sourceHandler_[c]?this.sourceHandler_[c].apply(this.sourceHandler_,arguments):a.apply(this,arguments)})},d.prototype);d.prototype.setSource=function(c){var a=d.selectSourceHandler(c,this.options_);a||(d.nativeSourceHandler?a=d.nativeSourceHandler:z.error("No source hander found for the current source."));this.disposeSourceHandler();this.off("dispose",this.disposeSourceHandler);
a!==d.nativeSourceHandler&&(this.currentSource_=c);this.sourceHandler_=a.handleSource(c,this,this.options_);this.on("dispose",this.disposeSourceHandler)};d.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null);this.cleanupAutoTextTracks();this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};p.registerComponent("Tech",B);B.registerTech("Tech",B);B.defaultTechOrder_=[];var ma=
{},Eb={},Ma={},Ze={buffered:1,currentTime:1,duration:1,seekable:1,played:1,paused:1},$e={setCurrentTime:1},zd={play:1,pause:1},af={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",mp3:"audio/mpeg",aac:"audio/aac",oga:"audio/ogg",m3u8:"application/x-mpegURL"},Tc=function(){var d=Rb(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"");return af[d.toLowerCase()]||""},bf=function(d,c){if(!c)return"";if(d.cache_.source.src===c&&d.cache_.source.type)return d.cache_.source.type;
var a=d.cache_.sources.filter(function(b){return b.src===c});if(a.length)return a[0].type;for(var a=d.$$("source"),b=0;b<a.length;b++){var g=a[b];if(g.type&&g.src&&g.src===c)return g.type}return Tc(c)},cf=function c(a){if(Array.isArray(a)){var b=[];a.forEach(function(a){a=c(a);Array.isArray(a)?b=b.concat(a):q(a)&&b.push(a)});a=b}else a="string"===typeof a&&a.trim()?[Sc({src:a})]:q(a)&&"string"===typeof a.src&&a.src&&a.src.trim()?[Sc(a)]:[];return a},df=function(c){function a(b,g,f){w(this,a);var e=
C({createEl:!1},g);f=r(this,c.call(this,b,e,f));if(g.playerOptions.sources&&0!==g.playerOptions.sources.length)b.src(g.playerOptions.sources);else for(e=0,g=g.playerOptions.techOrder;e<g.length;e++){var h=D(g[e]),k=B.getTech(h);h||(k=p.getComponent(h));if(k&&k.isSupported()){b.loadTech_(h);break}}return f}x(a,c);return a}(p);p.registerComponent("MediaLoader",df);var ib=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.emitTapEvents();f.enable();return f}x(a,c);a.prototype.createEl=
function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"div",a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},f=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},a=l({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},a);"button"===b&&z.error("Creating a ClickableComponent with an HTML element of "+b+" is not supported; use a Button instead.");f=l({role:"button"},f);this.tabIndex_=a.tabIndex;b=c.prototype.createEl.call(this,
b,a,f);this.createControlTextEl(b);return b};a.prototype.dispose=function(){this.controlTextEl_=null;c.prototype.dispose.call(this)};a.prototype.createControlTextEl=function(b){this.controlTextEl_=G("span",{className:"vjs-control-text"},{"aria-live":"polite"});b&&b.appendChild(this.controlTextEl_);this.controlText(this.controlText_,b);return this.controlTextEl_};a.prototype.controlText=function(b){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===b)return this.controlText_||
"Need Text";var c=this.localize(b);this.controlText_=b;Da(this.controlTextEl_,c);this.nonIconControl||a.setAttribute("title",c)};a.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+c.prototype.buildCSSClass.call(this)};a.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),
this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))};a.prototype.disable=function(){this.enabled_=!1;this.addClass("vjs-disabled");this.el_.setAttribute("aria-disabled","true");"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex");this.off(["tap","click"],this.handleClick);this.off("focus",this.handleFocus);this.off("blur",this.handleBlur)};a.prototype.handleClick=function(b){};a.prototype.handleFocus=function(b){U(t,"keydown",y(this,this.handleKeyPress))};a.prototype.handleKeyPress=
function(b){32===b.which||13===b.which?(b.preventDefault(),this.trigger("click")):c.prototype.handleKeyPress&&c.prototype.handleKeyPress.call(this,b)};a.prototype.handleBlur=function(b){O(t,"keydown",y(this,this.handleKeyPress))};return a}(p);p.registerComponent("ClickableComponent",ib);var ef=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.update();b.on("posterchange",y(f,f.update));return f}x(a,c);a.prototype.dispose=function(){this.player().off("posterchange",this.update);
c.prototype.dispose.call(this)};a.prototype.createEl=function(){var b=G("div",{className:"vjs-poster",tabIndex:-1});gd||(this.fallbackImg_=G("img"),b.appendChild(this.fallbackImg_));return b};a.prototype.update=function(b){b=this.player().poster();this.setSrc(b);b?this.show():this.hide()};a.prototype.setSrc=function(b){if(this.fallbackImg_)this.fallbackImg_.src=b;else{var a="";b&&(a='url("'+b+'")');this.el_.style.backgroundImage=a}};a.prototype.handleClick=function(b){this.player_.controls()&&(this.player_.paused()?
this.player_.play():this.player_.pause())};return a}(ib);p.registerComponent("PosterImage",ef);var ff={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},gf=function(c){function a(b,
g,f){w(this,a);g=r(this,c.call(this,b,g,f));b.on("loadstart",y(g,g.toggleDisplay));b.on("texttrackchange",y(g,g.updateDisplay));b.on("loadstart",y(g,g.preselectTrack));b.ready(y(g,function(){if(b.tech_&&b.tech_.featuresNativeTextTracks)this.hide();else{b.on("fullscreenchange",y(this,this.updateDisplay));for(var a=this.options_.playerOptions.tracks||[],c=0;c<a.length;c++)this.player_.addRemoteTextTrack(a[c],!0);this.preselectTrack()}}));return g}x(a,c);a.prototype.preselectTrack=function(){for(var b=
{captions:1,subtitles:1},a=this.player_.textTracks(),c=this.player_.cache_.selectedLanguage,e=void 0,h=void 0,k=void 0,l=0;l<a.length;l++){var n=a[l];c&&c.enabled&&c.language===n.language?n.kind===c.kind?k=n:k||(k=n):c&&!c.enabled?h=e=k=null:n["default"]&&("descriptions"!==n.kind||e?n.kind in b&&!h&&(h=n):e=n)}k?k.mode="showing":h?h.mode="showing":e&&(e.mode="showing")};a.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()};a.prototype.createEl=
function(){return c.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})};a.prototype.clearDisplay=function(){"function"===typeof n.WebVTT&&n.WebVTT.processCues(n,[],this.el_)};a.prototype.updateDisplay=function(){var b=this.player_.textTracks();this.clearDisplay();for(var a=null,c=null,e=b.length;e--;){var h=b[e];"showing"===h.mode&&("descriptions"===h.kind?a=h:c=h)}c?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live",
"off"),this.updateForTrack(c)):a&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(a))};a.prototype.updateForTrack=function(b){if("function"===typeof n.WebVTT&&b.activeCues){for(var a=[],c=0;c<b.activeCues.length;c++)a.push(b.activeCues[c]);n.WebVTT.processCues(n,a,this.el_);if(this.player_.textTrackSettings)for(b=this.player_.textTrackSettings.getValues(),c=a.length;c--;){var e=a[c];if(e){e=e.displayState;b.color&&(e.firstChild.style.color=
b.color);if(b.textOpacity){var h=Fb(b.color||"#fff",b.textOpacity);try{e.firstChild.style.color=h}catch(k){}}b.backgroundColor&&(e.firstChild.style.backgroundColor=b.backgroundColor);if(b.backgroundOpacity){h=Fb(b.backgroundColor||"#000",b.backgroundOpacity);try{e.firstChild.style.backgroundColor=h}catch(k){}}if(b.windowColor)if(b.windowOpacity){h=Fb(b.windowColor,b.windowOpacity);try{e.style.backgroundColor=h}catch(k){}}else e.style.backgroundColor=b.windowColor;b.edgeStyle&&("dropshadow"===b.edgeStyle?
e.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===b.edgeStyle?e.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===b.edgeStyle?e.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===b.edgeStyle&&(e.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222"));b.fontPercent&&1!==b.fontPercent&&(h=n.parseFloat(e.style.fontSize),e.style.fontSize=h*b.fontPercent+
"px",e.style.height="auto",e.style.top="auto",e.style.bottom="2px");b.fontFamily&&"default"!==b.fontFamily&&("small-caps"===b.fontFamily?e.firstChild.style.fontVariant="small-caps":e.firstChild.style.fontFamily=ff[b.fontFamily])}}}};return a}(p);p.registerComponent("TextTrackDisplay",gf);var hf=function(c){function a(){w(this,a);return r(this,c.apply(this,arguments))}x(a,c);a.prototype.createEl=function(){var b=this.player_.isAudio(),b=this.localize(b?"Audio Player":"Video Player"),b=G("span",{className:"vjs-control-text",
innerHTML:this.localize("{1} is loading.",[b])}),a=c.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});a.appendChild(b);return a};return a}(p);p.registerComponent("LoadingSpinner",hf);var Z=function(c){function a(){w(this,a);return r(this,c.apply(this,arguments))}x(a,c);a.prototype.createEl=function(b){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};b="button";a=l({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',
className:this.buildCSSClass()},a);c=l({type:"button"},c);a=p.prototype.createEl.call(this,b,a,c);this.createControlTextEl(a);return a};a.prototype.addChild=function(b){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};z.warn("Adding an actionable (user controllable) child to a Button ("+this.constructor.name+") is not supported; use a ClickableComponent instead.");return p.prototype.addChild.call(this,b,a)};a.prototype.enable=function(){c.prototype.enable.call(this);this.el_.removeAttribute("disabled")};
a.prototype.disable=function(){c.prototype.disable.call(this);this.el_.setAttribute("disabled","disabled")};a.prototype.handleKeyPress=function(b){32!==b.which&&13!==b.which&&c.prototype.handleKeyPress.call(this,b)};return a}(ib);p.registerComponent("Button",Z);var Ad=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.mouseused_=!1;f.on("mousedown",f.handleMouseDown);return f}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-big-play-button"};a.prototype.handleClick=function(b){var a=
this.player_.play();if(!(this.mouseused_&&b.clientX&&b.clientY)){var c=(b=this.player_.getChild("controlBar"))&&b.getChild("playToggle");c?(b=function(){return c.focus()},Jc(a)?a.then(b,function(){}):this.setTimeout(b,1)):this.player_.focus()}};a.prototype.handleKeyPress=function(b){this.mouseused_=!1;c.prototype.handleKeyPress.call(this,b)};a.prototype.handleMouseDown=function(b){this.mouseused_=!0};return a}(Z);Ad.prototype.controlText_="Play Video";p.registerComponent("BigPlayButton",Ad);var jf=
function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.controlText(g&&g.controlText||f.localize("Close"));return f}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-close-button "+c.prototype.buildCSSClass.call(this)};a.prototype.handleClick=function(b){this.trigger({type:"close",bubbles:!1})};return a}(Z);p.registerComponent("CloseButton",jf);var Bd=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.on(b,"play",f.handlePlay);f.on(b,"pause",f.handlePause);
f.on(b,"ended",f.handleEnded);return f}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-play-control "+c.prototype.buildCSSClass.call(this)};a.prototype.handleClick=function(b){this.player_.paused()?this.player_.play():this.player_.pause()};a.prototype.handleSeeked=function(b){this.removeClass("vjs-ended");this.player_.paused()?this.handlePause(b):this.handlePlay(b)};a.prototype.handlePlay=function(b){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");
this.controlText("Pause")};a.prototype.handlePause=function(b){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.controlText("Play")};a.prototype.handleEnded=function(b){this.removeClass("vjs-playing");this.addClass("vjs-ended");this.controlText("Replay");this.one(this.player_,"seeked",this.handleSeeked)};return a}(Z);Bd.prototype.controlText_="Play";p.registerComponent("PlayToggle",Bd);var Cd=function(c,a){c=0>c?0:c;var b=Math.floor(c%60),g=Math.floor(c/60%60),f=Math.floor(c/3600),
e=Math.floor(a/60%60),h=Math.floor(a/3600);if(isNaN(c)||Infinity===c)f=g=b="-";f=0<f||0<h?f+":":"";return f+(((f||10<=e)&&10>g?"0"+g:g)+":")+(10>b?"0"+b:b)},Tb=Cd,za=function(c){return Tb(c,1<arguments.length&&void 0!==arguments[1]?arguments[1]:c)},Aa=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.throttledUpdateContent=va(y(f,f.updateContent),25);f.on(b,"timeupdate",f.throttledUpdateContent);return f}x(a,c);a.prototype.createEl=function(b){b=this.buildCSSClass();var a=c.prototype.createEl.call(this,
"div",{className:b+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text">'+this.localize(this.labelText_)+"\u00a0</span>"});this.contentEl_=G("span",{className:b+"-display"},{"aria-live":"off"});this.updateTextNode_();a.appendChild(this.contentEl_);return a};a.prototype.dispose=function(){this.textNode_=this.contentEl_=null;c.prototype.dispose.call(this)};a.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);
this.textNode_=t.createTextNode(this.formattedTime_||this.formatTime_(0));this.contentEl_.appendChild(this.textNode_)}};a.prototype.formatTime_=function(b){return za(b)};a.prototype.updateFormattedTime_=function(b){b=this.formatTime_(b);b!==this.formattedTime_&&(this.formattedTime_=b,this.requestAnimationFrame(this.updateTextNode_))};a.prototype.updateContent=function(b){};return a}(p);Aa.prototype.labelText_="Time";Aa.prototype.controlText_="Time";p.registerComponent("TimeDisplay",Aa);var Ub=function(c){function a(b,
g){w(this,a);var f=r(this,c.call(this,b,g));f.on(b,"ended",f.handleEnded);return f}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-current-time"};a.prototype.updateContent=function(b){b=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(b)};a.prototype.handleEnded=function(b){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())};return a}(Aa);Ub.prototype.labelText_="Current Time";Ub.prototype.controlText_=
"Current Time";p.registerComponent("CurrentTimeDisplay",Ub);var Vb=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.on(b,"durationchange",f.updateContent);f.on(b,"loadedmetadata",f.throttledUpdateContent);return f}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-duration"};a.prototype.updateContent=function(b){(b=this.player_.duration())&&this.duration_!==b&&(this.duration_=b,this.updateFormattedTime_(b))};return a}(Aa);Vb.prototype.labelText_="Duration";Vb.prototype.controlText_=
"Duration";p.registerComponent("DurationDisplay",Vb);var kf=function(c){function a(){w(this,a);return r(this,c.apply(this,arguments))}x(a,c);a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})};return a}(p);p.registerComponent("TimeDivider",kf);var Wb=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.on(b,"durationchange",f.throttledUpdateContent);f.on(b,"ended",f.handleEnded);
return f}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-remaining-time"};a.prototype.formatTime_=function(b){return"-"+c.prototype.formatTime_.call(this,b)};a.prototype.updateContent=function(b){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))};a.prototype.handleEnded=function(b){this.player_.duration()&&this.updateFormattedTime_(0)};return a}(Aa);Wb.prototype.labelText_=
"Remaining Time";Wb.prototype.controlText_="Remaining Time";p.registerComponent("RemainingTimeDisplay",Wb);var lf=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.updateShowing();f.on(f.player(),"durationchange",f.updateShowing);return f}x(a,c);a.prototype.createEl=function(){var b=c.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});this.contentEl_=G("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+
"\u00a0</span>"+this.localize("LIVE")},{"aria-live":"off"});b.appendChild(this.contentEl_);return b};a.prototype.dispose=function(){this.contentEl_=null;c.prototype.dispose.call(this)};a.prototype.updateShowing=function(b){Infinity===this.player().duration()?this.show():this.hide()};return a}(p);p.registerComponent("LiveDisplay",lf);var Xb=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.bar=f.getChild(f.options_.barName);f.vertical(!!f.options_.vertical);f.enable();return f}
x(a,c);a.prototype.enabled=function(){return this.enabled_};a.prototype.enable=function(){if(!this.enabled()){this.on("mousedown",this.handleMouseDown);this.on("touchstart",this.handleMouseDown);this.on("focus",this.handleFocus);this.on("blur",this.handleBlur);this.on("click",this.handleClick);this.on(this.player_,"controlsvisible",this.update);if(this.playerEvent)this.on(this.player_,this.playerEvent,this.update);this.removeClass("disabled");this.setAttribute("tabindex",0);this.enabled_=!0}};a.prototype.disable=
function(){if(this.enabled()){var b=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown);this.off("touchstart",this.handleMouseDown);this.off("focus",this.handleFocus);this.off("blur",this.handleBlur);this.off("click",this.handleClick);this.off(this.player_,"controlsvisible",this.update);this.off(b,"mousemove",this.handleMouseMove);this.off(b,"mouseup",this.handleMouseUp);this.off(b,"touchmove",this.handleMouseMove);this.off(b,"touchend",this.handleMouseUp);this.removeAttribute("tabindex");
this.addClass("disabled");this.playerEvent&&this.off(this.player_,this.playerEvent,this.update);this.enabled_=!1}};a.prototype.createEl=function(b){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},f=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};a.className+=" vjs-slider";a=l({tabIndex:0},a);f=l({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},f);return c.prototype.createEl.call(this,b,a,f)};a.prototype.handleMouseDown=function(b){var a=
this.bar.el_.ownerDocument;b.preventDefault();wc();this.addClass("vjs-sliding");this.trigger("slideractive");this.on(a,"mousemove",this.handleMouseMove);this.on(a,"mouseup",this.handleMouseUp);this.on(a,"touchmove",this.handleMouseMove);this.on(a,"touchend",this.handleMouseUp);this.handleMouseMove(b)};a.prototype.handleMouseMove=function(b){};a.prototype.handleMouseUp=function(){var b=this.bar.el_.ownerDocument;xc();this.removeClass("vjs-sliding");this.trigger("sliderinactive");this.off(b,"mousemove",
this.handleMouseMove);this.off(b,"mouseup",this.handleMouseUp);this.off(b,"touchmove",this.handleMouseMove);this.off(b,"touchend",this.handleMouseUp);this.update()};a.prototype.update=function(){if(this.el_){var b=this.getPercent(),a=this.bar;if(a){if("number"!==typeof b||b!==b||0>b||Infinity===b)b=0;var c=(100*b).toFixed(2)+"%",a=a.el().style;this.vertical()?a.height=c:a.width=c;return b}}};a.prototype.calculateDistance=function(b){b=qb(this.el_,b);return this.vertical()?b.y:b.x};a.prototype.handleFocus=
function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)};a.prototype.handleKeyPress=function(b){if(37===b.which||40===b.which)b.preventDefault(),this.stepBack();else if(38===b.which||39===b.which)b.preventDefault(),this.stepForward()};a.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)};a.prototype.handleClick=function(b){b.stopImmediatePropagation();b.preventDefault()};a.prototype.vertical=function(b){if(void 0===b)return this.vertical_||
!1;(this.vertical_=!!b)?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")};return a}(p);p.registerComponent("Slider",Xb);var mf=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.partEls_=[];f.on(b,"progress",f.update);return f}x(a,c);a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})};a.prototype.dispose=
function(){this.partEls_=null;c.prototype.dispose.call(this)};a.prototype.update=function(b){b=this.player_.buffered();var a=this.player_.duration(),c=this.player_.bufferedEnd(),e=this.partEls_,h=function(b,a){var c=b/a||0;return 100*(1<=c?1:c)+"%"};this.el_.style.width=h(c,a);for(a=0;a<b.length;a++){var k=b.start(a),l=b.end(a),n=e[a];n||(n=this.el_.appendChild(G()),e[a]=n);n.style.left=h(k,c);n.style.width=h(l-k,c)}for(c=e.length;c>b.length;c--)this.el_.removeChild(e[c-1]);e.length=b.length};return a}(p);
p.registerComponent("LoadProgressBar",mf);var nf=function(c){function a(){w(this,a);return r(this,c.apply(this,arguments))}x(a,c);a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})};a.prototype.update=function(b,a,c){var e=Fa(this.el_),h=Fa(this.player_.el()),k=b.width*a;h&&e&&(a=b.left-h.left+k,b=b.width-k+(h.right-b.right),h=e.width/2,a<h?h+=h-a:b<h&&(h=b),0>h?h=0:h>e.width&&(h=e.width),this.el_.style.right="-"+h+"px",Da(this.el_,c))};return a}(p);
p.registerComponent("TimeTooltip",nf);var Yb=function(c){function a(){w(this,a);return r(this,c.apply(this,arguments))}x(a,c);a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})};a.prototype.update=function(b,a){var c=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_);this.rafId_=this.requestAnimationFrame(function(){var e=c.player_.scrubbing()?
c.player_.getCache().currentTime:c.player_.currentTime(),e=za(e,c.player_.duration()),h=c.getChild("timeTooltip");h&&h.update(b,a,e)})};return a}(p);Yb.prototype.options_={children:[]};da&&!(8<da)||na||ga||Yb.prototype.options_.children.push("timeTooltip");p.registerComponent("PlayProgressBar",Yb);var Dd=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.update=va(y(f,f.update),25);return f}x(a,c);a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})};
a.prototype.update=function(b,a){var c=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_);this.rafId_=this.requestAnimationFrame(function(){var e=c.player_.duration(),e=za(a*e,e);c.el_.style.left=b.width*a+"px";c.getChild("timeTooltip").update(b,a,e)})};return a}(p);Dd.prototype.options_={children:["timeTooltip"]};p.registerComponent("MouseTimeDisplay",Dd);var jb=function(c){function a(b,f){w(this,a);var e=r(this,c.call(this,b,f));e.setEventHandlers_();return e}x(a,c);var b;a.prototype.setEventHandlers_=
function(){var b=this;this.update=va(y(this,this.update),30);this.on(this.player_,"timeupdate",this.update);this.on(this.player_,"ended",this.handleEnded);this.updateInterval=null;this.on(this.player_,["playing"],function(){b.clearInterval(b.updateInterval);b.updateInterval=b.setInterval(function(){b.requestAnimationFrame(function(){b.update()})},30)});this.on(this.player_,["ended","pause","waiting"],function(){b.clearInterval(b.updateInterval)});this.on(this.player_,["timeupdate","ended"],this.update)};
a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})};a.prototype.update_=function(b,a){var c=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*a).toFixed(2));this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[za(b,c),za(c,c)],"{1} of {2}"));this.bar.update(Fa(this.el_),a)};a.prototype.update=function(b){b=c.prototype.update.call(this);
this.update_(this.getCurrentTime_(),b);return b};a.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()};a.prototype.handleEnded=function(b){this.update_(this.player_.duration(),1)};a.prototype.getPercent=function(){var b=this.getCurrentTime_()/this.player_.duration();return 1<=b?1:b};a.prototype.handleMouseDown=function(b){ra(b)&&(b.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),
this.player_.pause(),c.prototype.handleMouseDown.call(this,b))};a.prototype.handleMouseMove=function(a){if(ra(a)){a=this.calculateDistance(a)*this.player_.duration();a===this.player_.duration()&&(a-=.1);b=a;var c=document.getElementsByClassName("vjs-play-progress")[0],e=this;setTimeout(function(){c.style.width=b/e.player_.duration()*100+"%"},0)}};a.prototype.enable=function(){c.prototype.enable.call(this);var b=this.getChild("mouseTimeDisplay");b&&b.show()};a.prototype.disable=function(){c.prototype.disable.call(this);
var b=this.getChild("mouseTimeDisplay");b&&b.hide()};a.prototype.handleMouseUp=function(a){this.player_.currentTime(b);c.prototype.handleMouseUp.call(this,a);a&&a.stopPropagation();this.player_.scrubbing(!1);this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0});this.videoWasPlaying&&yb(this.player_.play())};a.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)};a.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-
5)};a.prototype.handleAction=function(b){this.player_.paused()?this.player_.play():this.player_.pause()};a.prototype.handleKeyPress=function(b){32===b.which||13===b.which?(b.preventDefault(),this.handleAction(b)):c.prototype.handleKeyPress&&c.prototype.handleKeyPress.call(this,b)};return a}(Xb);jb.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};da&&!(8<da)||na||ga||jb.prototype.options_.children.splice(1,0,"mouseTimeDisplay");jb.prototype.playerEvent=
"timeupdate";p.registerComponent("SeekBar",jb);var Ed=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.handleMouseMove=va(y(f,f.handleMouseMove),25);f.throttledHandleMouseSeek=va(y(f,f.handleMouseSeek),25);f.enable();return f}x(a,c);a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})};a.prototype.handleMouseMove=function(b){var a=this.getChild("seekBar");if(a){var c=a.getChild("mouseTimeDisplay"),e=a.el(),
a=Fa(e);b=qb(e,b).x;1<b?b=1:0>b&&(b=0);c&&c.update(a,b)}};a.prototype.handleMouseSeek=function(b){var a=this.getChild("seekBar");a&&a.handleMouseMove(b)};a.prototype.enabled=function(){return this.enabled_};a.prototype.disable=function(){this.children().forEach(function(b){return b.disable&&b.disable()});this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)};a.prototype.enable=
function(){this.children().forEach(function(b){return b.enable&&b.enable()});this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)};a.prototype.handleMouseDown=function(b){var a=this.el_.ownerDocument,c=this.getChild("seekBar");c&&c.handleMouseDown(b);this.on(a,"mousemove",this.throttledHandleMouseSeek);this.on(a,"touchmove",this.throttledHandleMouseSeek);this.on(a,"mouseup",this.handleMouseUp);
this.on(a,"touchend",this.handleMouseUp)};a.prototype.handleMouseUp=function(b){var a=this.el_.ownerDocument,c=this.getChild("seekBar");c&&c.handleMouseUp(b);this.off(a,"mousemove",this.throttledHandleMouseSeek);this.off(a,"touchmove",this.throttledHandleMouseSeek);this.off(a,"mouseup",this.handleMouseUp);this.off(a,"touchend",this.handleMouseUp)};return a}(p);Ed.prototype.options_={children:["seekBar"]};p.registerComponent("ProgressControl",Ed);var Fd=function(c){function a(b,g){w(this,a);var f=
r(this,c.call(this,b,g));f.on(b,"fullscreenchange",f.handleFullscreenChange);return f}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+c.prototype.buildCSSClass.call(this)};a.prototype.handleFullscreenChange=function(b){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")};a.prototype.handleClick=function(b){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()};return a}(Z);Fd.prototype.controlText_=
"Fullscreen";p.registerComponent("FullscreenToggle",Fd);var Zb=function(c,a){a.tech_&&!a.tech_.featuresVolumeControl&&c.addClass("vjs-hidden");c.on(a,"loadstart",function(){a.tech_.featuresVolumeControl?c.removeClass("vjs-hidden"):c.addClass("vjs-hidden")})},of=function(c){function a(){w(this,a);return r(this,c.apply(this,arguments))}x(a,c);a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})};
return a}(p);p.registerComponent("VolumeLevel",of);var $b=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.on("slideractive",f.updateLastVolume_);f.on(b,"volumechange",f.updateARIAAttributes);b.ready(function(){return f.updateARIAAttributes()});return f}x(a,c);a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})};a.prototype.handleMouseDown=function(b){ra(b)&&
c.prototype.handleMouseDown.call(this,b)};a.prototype.handleMouseMove=function(b){ra(b)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(b)))};a.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)};a.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()};a.prototype.stepForward=function(){this.checkMuted();this.player_.volume(this.player_.volume()+.1)};a.prototype.stepBack=function(){this.checkMuted();this.player_.volume(this.player_.volume()-
.1)};a.prototype.updateARIAAttributes=function(b){b=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",b);this.el_.setAttribute("aria-valuetext",b+"%")};a.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())};a.prototype.updateLastVolume_=function(){var b=this,a=this.player_.volume();this.one("sliderinactive",function(){0===b.player_.volume()&&b.player_.lastVolume_(a)})};return a}(Xb);$b.prototype.options_={children:["volumeLevel"],
barName:"volumeLevel"};$b.prototype.playerEvent="volumechange";p.registerComponent("VolumeBar",$b);var Gd=function(c){function a(b){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};w(this,a);g.vertical=g.vertical||!1;if("undefined"===typeof g.volumeBar||A(g.volumeBar))g.volumeBar=g.volumeBar||{},g.volumeBar.vertical=g.vertical;var f=r(this,c.call(this,b,g));Zb(f,b);f.throttledHandleMouseMove=va(y(f,f.handleMouseMove),25);f.on("mousedown",f.handleMouseDown);f.on("touchstart",f.handleMouseDown);
f.on(f.volumeBar,["focus","slideractive"],function(){f.volumeBar.addClass("vjs-slider-active");f.addClass("vjs-slider-active");f.trigger("slideractive")});f.on(f.volumeBar,["blur","sliderinactive"],function(){f.volumeBar.removeClass("vjs-slider-active");f.removeClass("vjs-slider-active");f.trigger("sliderinactive")});return f}x(a,c);a.prototype.createEl=function(){var b="vjs-volume-horizontal";this.options_.vertical&&(b="vjs-volume-vertical");return c.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+
b})};a.prototype.handleMouseDown=function(b){b=this.el_.ownerDocument;this.on(b,"mousemove",this.throttledHandleMouseMove);this.on(b,"touchmove",this.throttledHandleMouseMove);this.on(b,"mouseup",this.handleMouseUp);this.on(b,"touchend",this.handleMouseUp)};a.prototype.handleMouseUp=function(b){b=this.el_.ownerDocument;this.off(b,"mousemove",this.throttledHandleMouseMove);this.off(b,"touchmove",this.throttledHandleMouseMove);this.off(b,"mouseup",this.handleMouseUp);this.off(b,"touchend",this.handleMouseUp)};
a.prototype.handleMouseMove=function(b){this.volumeBar.handleMouseMove(b)};return a}(p);Gd.prototype.options_={children:["volumeBar"]};p.registerComponent("VolumeControl",Gd);var Hd=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));Zb(f,b);f.on(b,["loadstart","volumechange"],f.update);return f}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-mute-control "+c.prototype.buildCSSClass.call(this)};a.prototype.handleClick=function(b){b=this.player_.volume();var a=this.player_.lastVolume_();
0===b?(this.player_.volume(.1>a?.1:a),this.player_.muted(!1)):this.player_.muted(this.player_.muted()?!1:!0)};a.prototype.update=function(b){this.updateIcon_();this.updateControlText_()};a.prototype.updateIcon_=function(){var b=this.player_.volume(),a=3;0===b||this.player_.muted()?a=0:.33>b?a=1:.67>b&&(a=2);for(b=0;4>b;b++)Ea(this.el_,"vjs-vol-"+b);ia(this.el_,"vjs-vol-"+a)};a.prototype.updateControlText_=function(){var b=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==
b&&this.controlText(b)};return a}(Z);Hd.prototype.controlText_="Mute";p.registerComponent("MuteToggle",Hd);var Id=function(c){function a(b){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};w(this,a);g.inline="undefined"!==typeof g.inline?g.inline:!0;if("undefined"===typeof g.volumeControl||A(g.volumeControl))g.volumeControl=g.volumeControl||{},g.volumeControl.vertical=!g.inline;g=r(this,c.call(this,b,g));Zb(g,b);g.on(g.volumeControl,["slideractive"],g.sliderActive_);g.on(g.volumeControl,
["sliderinactive"],g.sliderInactive_);return g}x(a,c);a.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")};a.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")};a.prototype.createEl=function(){var b="vjs-volume-panel-horizontal";this.options_.inline||(b="vjs-volume-panel-vertical");return c.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+b})};return a}(p);Id.prototype.options_={children:["muteToggle","volumeControl"]};p.registerComponent("VolumePanel",
Id);var ac=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));g&&(f.menuButton_=g.menuButton);f.focusedChild_=-1;f.on("keydown",f.handleKeyPress);return f}x(a,c);a.prototype.addItem=function(b){this.addChild(b);b.on("click",y(this,function(a){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==b.name()&&this.menuButton_.focus())}))};a.prototype.createEl=function(){this.contentEl_=G(this.options_.contentElType||"ul",{className:"vjs-menu-content"});this.contentEl_.setAttribute("role",
"menu");var b=c.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});b.appendChild(this.contentEl_);U(b,"click",function(b){b.preventDefault();b.stopImmediatePropagation()});return b};a.prototype.dispose=function(){this.contentEl_=null;c.prototype.dispose.call(this)};a.prototype.handleKeyPress=function(b){if(37===b.which||40===b.which)b.preventDefault(),this.stepForward();else if(38===b.which||39===b.which)b.preventDefault(),this.stepBack()};a.prototype.stepForward=function(){var b=
0;void 0!==this.focusedChild_&&(b=this.focusedChild_+1);this.focus(b)};a.prototype.stepBack=function(){var b=0;void 0!==this.focusedChild_&&(b=this.focusedChild_-1);this.focus(b)};a.prototype.focus=function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,a=this.children().slice();a.length&&a[0].className&&/vjs-menu-title/.test(a[0].className)&&a.shift();0<a.length&&(0>b?b=0:b>=a.length&&(b=a.length-1),this.focusedChild_=b,a[b].el_.focus())};return a}(p);p.registerComponent("Menu",
ac);var bc=function(c){function a(b){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};w(this,a);var f=r(this,c.call(this,b,g));f.menuButton_=new Z(b,g);f.menuButton_.controlText(f.controlText_);f.menuButton_.el_.setAttribute("aria-haspopup","true");g=Z.prototype.buildCSSClass();f.menuButton_.el_.className=f.buildCSSClass()+" "+g;f.menuButton_.removeClass("vjs-control");f.addChild(f.menuButton_);f.update();f.enabled_=!0;f.on(f.menuButton_,"tap",f.handleClick);f.on(f.menuButton_,"click",
f.handleClick);f.on(f.menuButton_,"focus",f.handleFocus);f.on(f.menuButton_,"blur",f.handleBlur);f.on("keydown",f.handleSubmenuKeyPress);return f}x(a,c);a.prototype.update=function(){var b=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu));this.menu=b;this.addChild(b);this.buttonPressed_=!1;this.menuButton_.el_.setAttribute("aria-expanded","false");this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()};a.prototype.createMenu=function(){var b=new ac(this.player_,
{menuButton:this});this.hideThreshold_=0;if(this.options_.title){var a=G("li",{className:"vjs-menu-title",innerHTML:D(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;b.children_.unshift(a);Ua(a,b.contentEl())}if(this.items=this.createItems())for(a=0;a<this.items.length;a++)b.addItem(this.items[a]);return b};a.prototype.createItems=function(){};a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})};a.prototype.buildWrapperCSSClass=
function(){var b="vjs-menu-button",b=!0===this.options_.inline?b+"-inline":b+"-popup",a=Z.prototype.buildCSSClass();return"vjs-menu-button "+b+" "+a+" "+c.prototype.buildCSSClass.call(this)};a.prototype.buildCSSClass=function(){var b="vjs-menu-button",b=!0===this.options_.inline?b+"-inline":b+"-popup";return"vjs-menu-button "+b+" "+c.prototype.buildCSSClass.call(this)};a.prototype.controlText=function(b){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(b,
a)};a.prototype.handleClick=function(b){this.one(this.menu.contentEl(),"mouseleave",y(this,function(b){this.unpressButton();this.el_.blur()}));this.buttonPressed_?this.unpressButton():this.pressButton()};a.prototype.focus=function(){this.menuButton_.focus()};a.prototype.blur=function(){this.menuButton_.blur()};a.prototype.handleFocus=function(){U(t,"keydown",y(this,this.handleKeyPress))};a.prototype.handleBlur=function(){O(t,"keydown",y(this,this.handleKeyPress))};a.prototype.handleKeyPress=function(b){27===
b.which||9===b.which?(this.buttonPressed_&&this.unpressButton(),9!==b.which&&(b.preventDefault(),this.menuButton_.el_.focus())):38!==b.which&&40!==b.which||this.buttonPressed_||(this.pressButton(),b.preventDefault())};a.prototype.handleSubmenuKeyPress=function(b){if(27===b.which||9===b.which)this.buttonPressed_&&this.unpressButton(),9!==b.which&&(b.preventDefault(),this.menuButton_.el_.focus())};a.prototype.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded",
"true"),na&&sc()||this.menu.focus())};a.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))};a.prototype.disable=function(){this.unpressButton();this.enabled_=!1;this.addClass("vjs-disabled");this.menuButton_.disable()};a.prototype.enable=function(){this.enabled_=!0;this.removeClass("vjs-disabled");this.menuButton_.enable()};return a}(p);p.registerComponent("MenuButton",bc);var cc=function(c){function a(b,
g){w(this,a);var f=g.tracks,e=r(this,c.call(this,b,g));1>=e.items.length&&e.hide();if(!f)return r(e);var h=y(e,e.update);f.addEventListener("removetrack",h);f.addEventListener("addtrack",h);e.player_.on("ready",h);e.player_.on("dispose",function(){f.removeEventListener("removetrack",h);f.removeEventListener("addtrack",h)});return e}x(a,c);return a}(bc);p.registerComponent("TrackButton",cc);var Ra=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g));f.selectable=g.selectable;f.isSelected_=
g.selected||!1;f.selected(f.isSelected_);f.selectable?f.el_.setAttribute("role","menuitemcheckbox"):f.el_.setAttribute("role","menuitem");return f}x(a,c);a.prototype.createEl=function(b,a,f){this.nonIconControl=!0;return c.prototype.createEl.call(this,"li",l({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},a),f)};a.prototype.handleClick=function(b){this.selected(!0)};a.prototype.selected=function(b){this.selectable&&
(b?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))};return a}(ib);p.registerComponent("MenuItem",Ra);var Sa=function(c){function a(b,g){w(this,a);var f=g.track,e=b.textTracks();g.label=f.label||f.language||"Unknown";g.selected="showing"===f.mode;var h=r(this,c.call(this,b,g));h.track=f;var k=function(){for(var b=
arguments.length,a=Array(b),c=0;c<b;c++)a[c]=arguments[c];h.handleTracksChange.apply(h,a)},l=function(){for(var b=arguments.length,a=Array(b),c=0;c<b;c++)a[c]=arguments[c];h.handleSelectedLanguageChange.apply(h,a)};b.on(["loadstart","texttrackchange"],k);e.addEventListener("change",k);e.addEventListener("selectedlanguagechange",l);h.on("dispose",function(){b.off(["loadstart","texttrackchange"],k);e.removeEventListener("change",k);e.removeEventListener("selectedlanguagechange",l)});if(void 0===e.onchange){var p=
void 0;h.on(["tap","click"],function(){if("object"!==pa(n.Event))try{p=new n.Event("change")}catch(b){}p||(p=t.createEvent("Event"),p.initEvent("change",!0,!0));e.dispatchEvent(p)})}h.handleTracksChange();return h}x(a,c);a.prototype.handleClick=function(b){var a=this.track.kind,f=this.track.kinds,e=this.player_.textTracks();f||(f=[a]);c.prototype.handleClick.call(this,b);if(e)for(b=0;b<e.length;b++)a=e[b],a===this.track&&-1<f.indexOf(a.kind)?"showing"!==a.mode&&(a.mode="showing"):"disabled"!==a.mode&&
(a.mode="disabled")};a.prototype.handleTracksChange=function(b){b="showing"===this.track.mode;b!==this.isSelected_&&this.selected(b)};a.prototype.handleSelectedLanguageChange=function(b){"showing"===this.track.mode&&(b=this.player_.cache_.selectedLanguage,b&&b.enabled&&b.language===this.track.language&&b.kind!==this.track.kind||(this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}))};a.prototype.dispose=function(){this.track=null;c.prototype.dispose.call(this)};
return a}(Ra);p.registerComponent("TextTrackMenuItem",Sa);var Jd=function(c){function a(b,g){w(this,a);g.track={player:b,kind:g.kind,kinds:g.kinds,"default":!1,mode:"disabled"};g.kinds||(g.kinds=[g.kind]);g.track.label=g.label?g.label:g.kinds.join(" and ")+" off";g.selectable=!0;return r(this,c.call(this,b,g))}x(a,c);a.prototype.handleTracksChange=function(b){b=this.player().textTracks();for(var a=!0,c=0,e=b.length;c<e;c++){var h=b[c];if(-1<this.options_.kinds.indexOf(h.kind)&&"showing"===h.mode){a=
!1;break}}a!==this.isSelected_&&this.selected(a)};a.prototype.handleSelectedLanguageChange=function(b){b=this.player().textTracks();for(var a=!0,c=0,e=b.length;c<e;c++){var h=b[c];if(-1<["captions","descriptions","subtitles"].indexOf(h.kind)&&"showing"===h.mode){a=!1;break}}a&&(this.player_.cache_.selectedLanguage={enabled:!1})};return a}(Sa);p.registerComponent("OffTextTrackMenuItem",Jd);var Ba=function(c){function a(b){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};w(this,a);g.tracks=
b.textTracks();return r(this,c.call(this,b,g))}x(a,c);a.prototype.createItems=function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Sa,c=void 0;this.label_&&(c=this.label_+" off");b.push(new Jd(this.player_,{kinds:this.kinds_,kind:this.kind_,label:c}));this.hideThreshold_+=1;c=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var e=0;e<c.length;e++){var h=c[e];if(-1<this.kinds_.indexOf(h.kind)){var k=
new a(this.player_,{track:h,selectable:!0});k.addClass("vjs-"+h.kind+"-menu-item");b.push(k)}}return b};return a}(cc);p.registerComponent("TextTrackButton",Ba);var Kd=function(c){function a(b,g){w(this,a);var f=g.track,e=g.cue,h=b.currentTime();g.selectable=!0;g.label=e.text;g.selected=e.startTime<=h&&h<e.endTime;h=r(this,c.call(this,b,g));h.track=f;h.cue=e;f.addEventListener("cuechange",y(h,h.update));return h}x(a,c);a.prototype.handleClick=function(b){c.prototype.handleClick.call(this);this.player_.currentTime(this.cue.startTime);
this.update(this.cue.startTime)};a.prototype.update=function(b){b=this.cue;var a=this.player_.currentTime();this.selected(b.startTime<=a&&a<b.endTime)};return a}(Ra);p.registerComponent("ChaptersTrackMenuItem",Kd);var dc=function(c){function a(b,g,f){w(this,a);return r(this,c.call(this,b,g,f))}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-chapters-button "+c.prototype.buildCSSClass.call(this)};a.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+c.prototype.buildWrapperCSSClass.call(this)};
a.prototype.update=function(b){this.track_&&(!b||"addtrack"!==b.type&&"removetrack"!==b.type)||this.setTrack(this.findChaptersTrack());c.prototype.update.call(this)};a.prototype.setTrack=function(b){if(this.track_!==b){this.updateHandler_||(this.updateHandler_=this.update.bind(this));if(this.track_){var a=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);a&&a.removeEventListener("load",this.updateHandler_);this.track_=null}if(this.track_=b)this.track_.mode="hidden",(b=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_))&&
b.addEventListener("load",this.updateHandler_)}};a.prototype.findChaptersTrack=function(){for(var b=this.player_.textTracks()||[],a=b.length-1;0<=a;a--){var c=b[a];if(c.kind===this.kind_)return c}};a.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(D(this.kind_))};a.prototype.createMenu=function(){this.options_.title=this.getMenuCaption();return c.prototype.createMenu.call(this)};a.prototype.createItems=function(){var b=[];if(!this.track_)return b;
var a=this.track_.cues;if(!a)return b;for(var c=0,e=a.length;c<e;c++){var h=new Kd(this.player_,{track:this.track_,cue:a[c]});b.push(h)}return b};return a}(Ba);dc.prototype.kind_="chapters";dc.prototype.controlText_="Chapters";p.registerComponent("ChaptersButton",dc);var ec=function(c){function a(b,g,f){w(this,a);g=r(this,c.call(this,b,g,f));var e=b.textTracks(),h=y(g,g.handleTracksChange);e.addEventListener("change",h);g.on("dispose",function(){e.removeEventListener("change",h)});return g}x(a,c);
a.prototype.handleTracksChange=function(b){b=this.player().textTracks();for(var a=!1,c=0,e=b.length;c<e;c++){var h=b[c];if(h.kind!==this.kind_&&"showing"===h.mode){a=!0;break}}a?this.disable():this.enable()};a.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+c.prototype.buildCSSClass.call(this)};a.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+c.prototype.buildWrapperCSSClass.call(this)};return a}(Ba);ec.prototype.kind_="descriptions";ec.prototype.controlText_=
"Descriptions";p.registerComponent("DescriptionsButton",ec);var fc=function(c){function a(b,g,f){w(this,a);return r(this,c.call(this,b,g,f))}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+c.prototype.buildCSSClass.call(this)};a.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+c.prototype.buildWrapperCSSClass.call(this)};return a}(Ba);fc.prototype.kind_="subtitles";fc.prototype.controlText_="Subtitles";p.registerComponent("SubtitlesButton",fc);var gc=
function(c){function a(b,g){w(this,a);g.track={player:b,kind:g.kind,label:g.kind+" settings",selectable:!1,"default":!1,mode:"disabled"};g.selectable=!1;g.name="CaptionSettingsMenuItem";var f=r(this,c.call(this,b,g));f.addClass("vjs-texttrack-settings");f.controlText(", opens "+g.kind+" settings dialog");return f}x(a,c);a.prototype.handleClick=function(b){this.player().getChild("textTrackSettings").open()};return a}(Sa);p.registerComponent("CaptionSettingsMenuItem",gc);var hc=function(c){function a(b,
g,f){w(this,a);return r(this,c.call(this,b,g,f))}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-captions-button "+c.prototype.buildCSSClass.call(this)};a.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+c.prototype.buildWrapperCSSClass.call(this)};a.prototype.createItems=function(){var b=[];this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(b.push(new gc(this.player_,{kind:this.kind_})),this.hideThreshold_+=
1);return c.prototype.createItems.call(this,b)};return a}(Ba);hc.prototype.kind_="captions";hc.prototype.controlText_="Captions";p.registerComponent("CaptionsButton",hc);var Ld=function(c){function a(){w(this,a);return r(this,c.apply(this,arguments))}x(a,c);a.prototype.createEl=function(b,a,f){var e='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);"captions"===this.options_.track.kind&&(e+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+
this.localize("Captions")+"</span>\n      ");return c.prototype.createEl.call(this,b,l({innerHTML:e+"</span>"},a),f)};return a}(Sa);p.registerComponent("SubsCapsMenuItem",Ld);var ic=function(c){function a(b){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};w(this,a);g=r(this,c.call(this,b,g));g.label_="subtitles";-1<["en","en-us","en-ca","fr-ca"].indexOf(g.player_.language_)&&(g.label_="captions");g.menuButton_.controlText(D(g.label_));return g}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+
c.prototype.buildCSSClass.call(this)};a.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+c.prototype.buildWrapperCSSClass.call(this)};a.prototype.createItems=function(){var b=[];this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(b.push(new gc(this.player_,{kind:this.label_})),this.hideThreshold_+=1);return b=c.prototype.createItems.call(this,b,Ld)};return a}(Ba);ic.prototype.kinds_=["captions","subtitles"];ic.prototype.controlText_=
"Subtitles";p.registerComponent("SubsCapsButton",ic);var Md=function(c){function a(b,g){w(this,a);var f=g.track,e=b.audioTracks();g.label=f.label||f.language||"Unknown";g.selected=f.enabled;var h=r(this,c.call(this,b,g));h.track=f;var k=function(){for(var b=arguments.length,a=Array(b),c=0;c<b;c++)a[c]=arguments[c];h.handleTracksChange.apply(h,a)};e.addEventListener("change",k);h.on("dispose",function(){e.removeEventListener("change",k)});return h}x(a,c);a.prototype.handleClick=function(b){var a=this.player_.audioTracks();
c.prototype.handleClick.call(this,b);for(b=0;b<a.length;b++){var f=a[b];f.enabled=f===this.track}};a.prototype.handleTracksChange=function(b){this.selected(this.track.enabled)};return a}(Ra);p.registerComponent("AudioTrackMenuItem",Md);var Nd=function(c){function a(b){var g=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};w(this,a);g.tracks=b.audioTracks();return r(this,c.call(this,b,g))}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-audio-button "+c.prototype.buildCSSClass.call(this)};
a.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+c.prototype.buildWrapperCSSClass.call(this)};a.prototype.createItems=function(){var b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var a=this.player_.audioTracks(),c=0;c<a.length;c++)b.push(new Md(this.player_,{track:a[c],selectable:!0}));return b};return a}(cc);Nd.prototype.controlText_="Audio Track";p.registerComponent("AudioTrackButton",Nd);var jc=function(c){function a(b,g){w(this,a);var f=
g.rate,e=parseFloat(f,10);g.label=f;g.selected=1===e;g.selectable=!0;var h=r(this,c.call(this,b,g));h.label=f;h.rate=e;h.on(b,"ratechange",h.update);return h}x(a,c);a.prototype.handleClick=function(b){c.prototype.handleClick.call(this);this.player().playbackRate(this.rate)};a.prototype.update=function(b){this.selected(this.player().playbackRate()===this.rate)};return a}(Ra);jc.prototype.contentElType="button";p.registerComponent("PlaybackRateMenuItem",jc);var Od=function(c){function a(b,g){w(this,
a);var f=r(this,c.call(this,b,g));f.updateVisibility();f.updateLabel();f.on(b,"loadstart",f.updateVisibility);f.on(b,"ratechange",f.updateLabel);return f}x(a,c);a.prototype.createEl=function(){var b=c.prototype.createEl.call(this);this.labelEl_=G("div",{className:"vjs-playback-rate-value",innerHTML:"1x"});b.appendChild(this.labelEl_);return b};a.prototype.dispose=function(){this.labelEl_=null;c.prototype.dispose.call(this)};a.prototype.buildCSSClass=function(){return"vjs-playback-rate "+c.prototype.buildCSSClass.call(this)};
a.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+c.prototype.buildWrapperCSSClass.call(this)};a.prototype.createMenu=function(){var b=new ac(this.player()),a=this.playbackRates();if(a)for(var c=a.length-1;0<=c;c--)b.addChild(new jc(this.player(),{rate:a[c]+"x"}));return b};a.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())};a.prototype.handleClick=function(b){b=this.player().playbackRate();for(var a=this.playbackRates(),
c=a[0],e=0;e<a.length;e++)if(a[e]>b){c=a[e];break}this.player().playbackRate(c)};a.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates};a.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length};a.prototype.updateVisibility=function(b){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")};
a.prototype.updateLabel=function(b){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")};return a}(bc);Od.prototype.controlText_="Playback Rate";p.registerComponent("PlaybackRateMenuButton",Od);var Pd=function(c){function a(){w(this,a);return r(this,c.apply(this,arguments))}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-spacer "+c.prototype.buildCSSClass.call(this)};a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})};
return a}(p);p.registerComponent("Spacer",Pd);var pf=function(c){function a(){w(this,a);return r(this,c.apply(this,arguments))}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+c.prototype.buildCSSClass.call(this)};a.prototype.createEl=function(){var b=c.prototype.createEl.call(this,{className:this.buildCSSClass()});b.innerHTML="\u00a0";return b};return a}(Pd);p.registerComponent("CustomControlSpacer",pf);var Qd=function(c){function a(){w(this,a);return r(this,c.apply(this,
arguments))}x(a,c);a.prototype.createEl=function(){return c.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})};return a}(p);Qd.prototype.options_={children:"playToggle volumePanel currentTimeDisplay timeDivider durationDisplay progressControl liveDisplay remainingTimeDisplay customControlSpacer playbackRateMenuButton chaptersButton descriptionsButton subsCapsButton audioTrackButton fullscreenToggle".split(" ")};p.registerComponent("ControlBar",Qd);var Rd=function(c){function a(b,
g){w(this,a);var f=r(this,c.call(this,b,g));f.on(b,"error",f.open);return f}x(a,c);a.prototype.buildCSSClass=function(){return"vjs-error-display "+c.prototype.buildCSSClass.call(this)};a.prototype.content=function(){var b=this.player().error(),a=v.createEl("div",{},{id:"reload-content",style:"margin-top:55px;"});a.innerHTML=b?b.message+'<br><button type="button" onclick="location.reload()" style="height:36px;margin-top:10px;border-radius:5px;border:1px solid white;">\u91cd\u65b0\u8f09\u5165</button>':
"";if(b){var c=document.getElementById("content_video_ima-ad-container");c&&(c.style.display="none",c.style.visibility="hidden")}return b?a:""};return a}(xa);Rd.prototype.options_=C(xa.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});p.registerComponent("ErrorDisplay",Rd);var Sd=["#000","Black"],Td=["#00F","Blue"],Ud=["#0FF","Cyan"],Vd=["#0F0","Green"],Wd=["#F0F","Magenta"],Xd=["#F00","Red"],Yd=["#FFF","White"],Zd=["#FF0","Yellow"],kc=["1","Opaque"],lc=["0.5","Semi-Transparent"],
$d=["0","Transparent"],oa={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Sd,Yd,Xd,Vd,Td,Zd,Wd,Ud]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[kc,lc,$d]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Yd,Sd,Xd,Vd,Td,Zd,Wd,Ud]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none",
"None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",
id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],"default":2,parser:function(c){return"1.00"===c?null:Number(c)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[kc,lc]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",
id:"captions-window-opacity-%s",label:"Transparency",options:[$d,lc,kc]}};oa.windowColor.options=oa.backgroundColor.options;var qf=function(c){function a(b,g){w(this,a);g.temporary=!1;var f=r(this,c.call(this,b,g));f.updateDisplay=y(f,f.updateDisplay);f.fill();f.hasBeenOpened_=f.hasBeenFilled_=!0;f.endDialog=G("p",{className:"vjs-control-text",textContent:f.localize("End of dialog window.")});f.el().appendChild(f.endDialog);f.setDefaults();void 0===g.persistTextTrackSettings&&(f.options_.persistTextTrackSettings=
f.options_.playerOptions.persistTextTrackSettings);f.on(f.$(".vjs-done-button"),"click",function(){f.saveSettings();f.close()});f.on(f.$(".vjs-default-button"),"click",function(){f.setDefaults();f.updateDisplay()});h(oa,function(b){f.on(f.$(b.selector),"change",f.updateDisplay)});f.options_.persistTextTrackSettings&&f.restoreSettings();return f}x(a,c);a.prototype.dispose=function(){this.endDialog=null;c.prototype.dispose.call(this)};a.prototype.createElSelect_=function(b){var a=this,c=1<arguments.length&&
void 0!==arguments[1]?arguments[1]:"",e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"label",h=oa[b],k=h.id.replace("%s",this.id_),l=[c,k].join(" ").trim();return["<"+e+' id="'+k+'" class="'+("label"===e?"vjs-label":"")+'">',this.localize(h.label),"</"+e+">",'<select aria-labelledby="'+l+'">'].concat(h.options.map(function(b){var c=k+"-"+b[1].replace(/\W+/g,"");return['<option id="'+c+'" value="'+b[0]+'" ','aria-labelledby="'+l+" "+c+'">',a.localize(b[1]),"</option>"].join("")})).concat("</select>").join("")};
a.prototype.createElFgColor_=function(){var b="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+b+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",b),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",b),"</span></fieldset>"].join("")};a.prototype.createElBgColor_=function(){var b="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+b+'">',
this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",b),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",b),"</span></fieldset>"].join("")};a.prototype.createElWinColor_=function(){var b="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+b+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",b),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",
b),"</span></fieldset>"].join("")};a.prototype.createElColors_=function(){return G("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})};a.prototype.createElFont_=function(){return G("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),'</fieldset><fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle",
"","legend"),'</fieldset><fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})};a.prototype.createElControls_=function(){var b=this.localize("restore all settings to the default values");return G("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+b+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+b+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+
"</button>"].join("")})};a.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]};a.prototype.label=function(){return this.localize("Caption Settings Dialog")};a.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")};a.prototype.buildCSSClass=function(){return c.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"};a.prototype.getValues=function(){var b=this;return k(oa,
function(a,c,e){var h=b.$(c.selector);c=Uc(h.options[h.options.selectedIndex].value,c.parser);void 0!==c&&(a[e]=c);return a},{})};a.prototype.setValues=function(b){var a=this;h(oa,function(c,e){var h=a.$(c.selector),k=b[e],l=c.parser;if(k)for(var n=0;n<h.options.length;n++)if(Uc(h.options[n].value,l)===k){h.selectedIndex=n;break}})};a.prototype.setDefaults=function(){var b=this;h(oa,function(a){var c=a.hasOwnProperty("default")?a["default"]:0;b.$(a.selector).selectedIndex=c})};a.prototype.restoreSettings=
function(){var b=void 0;try{b=JSON.parse(n.localStorage.getItem("vjs-text-track-settings"))}catch(a){z.warn(a)}b&&this.setValues(b)};a.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var b=this.getValues();try{Object.keys(b).length?n.localStorage.setItem("vjs-text-track-settings",JSON.stringify(b)):n.localStorage.removeItem("vjs-text-track-settings")}catch(a){z.warn(a)}}};a.prototype.updateDisplay=function(){var b=this.player_.getChild("textTrackDisplay");b&&b.updateDisplay()};
a.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null;this.off(t,"keydown",this.handleKeyDown);var b=this.player_.controlBar,a=b&&b.subsCapsButton,b=b&&b.captionsButton;a?a.focus():b&&b.focus()};return a}(xa);p.registerComponent("TextTrackSettings",qf);var rf=function(c){function a(b,g){w(this,a);var f=g.ResizeObserver||n.ResizeObserver;null===g.ResizeObserver&&(f=!1);var e=C({createEl:!f},g),h=r(this,c.call(this,b,e));h.ResizeObserver=g.ResizeObserver||n.ResizeObserver;h.loadListener_=
null;h.resizeObserver_=null;h.debouncedHandler_=Ie(function(){h.resizeHandler()},100,!1,b);f?(h.resizeObserver_=new h.ResizeObserver(h.debouncedHandler_),h.resizeObserver_.observe(b.el())):(h.loadListener_=function(){h.el_.contentWindow&&U(h.el_.contentWindow,"resize",h.debouncedHandler_);h.off("load",h.loadListener_)},h.on("load",h.loadListener_));return h}x(a,c);a.prototype.createEl=function(){return c.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager"})};a.prototype.resizeHandler=
function(){this.player_.trigger("playerresize")};a.prototype.dispose=function(){this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect());this.el_&&this.el_.contentWindow&&O(this.el_.contentWindow,"resize",this.debouncedHandler_);this.loadListener_&&this.off("load",this.loadListener_);this.loadListener_=this.debouncedHandler_=this.resizeObserver=this.ResizeObserver=null};return a}(p);p.registerComponent("ResizeManager",rf);var mc=
function(c){var a=c.el();if(a.hasAttribute("src"))return c.triggerSourceset(a.src),!0;var a=c.$$("source"),b=[],g="";if(!a.length)return!1;for(var f=0;f<a.length;f++){var e=a[f].src;e&&-1===b.indexOf(e)&&b.push(e)}if(!b.length)return!1;1===b.length&&(g=b[0]);c.triggerSourceset(g);return!0},ae={};F||(ae=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(c){var a=t.createElement(this.nodeName.toLowerCase());a.innerHTML=c;for(c=t.createDocumentFragment();a.childNodes.length;)c.appendChild(a.childNodes[0]);
this.innerText="";n.Element.prototype.appendChild.call(this,c);return this.innerHTML}}));var be=function(c,a){for(var b={},g=0;g<c.length&&!((b=Object.getOwnPropertyDescriptor(c[g],a))&&b.set&&b.get);g++);b.enumerable=!0;b.configurable=!0;return b},ce=function(c){var a=c.el();if(!a.resetSourceWatch_){var b={},g=be([c.el(),n.HTMLMediaElement.prototype,n.Element.prototype,ae],"innerHTML"),f=function(b){return function(){for(var g=arguments.length,f=Array(g),e=0;e<g;e++)f[e]=arguments[e];g=b.apply(a,
f);mc(c);return g}};["append","appendChild","insertAdjacentHTML"].forEach(function(c){a[c]&&(b[c]=a[c],a[c]=f(b[c]))});Object.defineProperty(a,"innerHTML",C(g,{set:f(g.set)}));a.resetSourceWatch_=function(){a.resetSourceWatch_=null;Object.keys(b).forEach(function(c){a[c]=b[c]});Object.defineProperty(a,"innerHTML",g)};c.one("sourceset",a.resetSourceWatch_)}},de={};F||(de=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?td(n.Element.prototype.getAttribute.call(this,"src")):
""},set:function(c){n.Element.prototype.setAttribute.call(this,"src",c);return c}}));var sf=function(c){if(c.featuresSourceset){var a=c.el();if(!a.resetSourceset_){var b=be([c.el(),n.HTMLMediaElement.prototype,de],"src"),g=a.setAttribute,f=a.load;Object.defineProperty(a,"src",C(b,{set:function(g){g=b.set.call(a,g);c.triggerSourceset(a.src);return g}}));a.setAttribute=function(b,f){var e=g.call(a,b,f);/src/i.test(b)&&c.triggerSourceset(a.src);return e};a.load=function(){var b=f.call(a);mc(c)||(c.triggerSourceset(""),
ce(c));return b};a.currentSrc?c.triggerSourceset(a.currentSrc):mc(c)||ce(c);a.resetSourceset_=function(){a.resetSourceset_=null;a.load=f;a.setAttribute=g;Object.defineProperty(a,"src",b);a.resetSourceWatch_&&a.resetSourceWatch_()}}}},tf=Jb(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."]),
u=function(c){function a(b,g){w(this,a);var f=r(this,c.call(this,b,g)),e=b.source,h=!1;e&&(f.el_.currentSrc!==e.src||b.tag&&3===b.tag.initNetworkState_)?f.setSource(e):f.handleLateInit_(f.el_);b.enableSourceset&&f.setupSourcesetHandling_();if(f.el_.hasChildNodes()){for(var k=f.el_.childNodes,l=k.length,e=[];l--;){var n=k[l];"track"===n.nodeName.toLowerCase()&&(f.featuresNativeTextTracks?(f.remoteTextTrackEls().addTrackElement_(n),f.remoteTextTracks().addTrack(n.track),f.textTracks().addTrack(n.track),
h||f.el_.hasAttribute("crossorigin")||!hb(n.src)||(h=!0)):e.push(n))}for(k=0;k<e.length;k++)f.el_.removeChild(e[k])}f.proxyNativeTracks_();f.featuresNativeTextTracks&&h&&z.warn(ob(tf));f.restoreMetadataTracksInIOSNativePlayer_();(ab||Hb||bd)&&!0===b.nativeControlsForTouch&&f.setControls(!0);f.proxyWebkitFullscreen_();f.triggerReady();return f}x(a,c);a.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_();a.disposeMediaElement(this.el_);this.options_=null;c.prototype.dispose.call(this)};
a.prototype.setupSourcesetHandling_=function(){sf(this)};a.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var b=this.textTracks(),a=void 0,c=function(){a=[];for(var c=0;c<b.length;c++){var f=b[c];"metadata"===f.kind&&a.push({track:f,storedMode:f.mode})}};c();b.addEventListener("change",c);this.on("dispose",function(){return b.removeEventListener("change",c)});var e=function rb(){for(var c=0;c<a.length;c++){var f=a[c];"disabled"===f.track.mode&&f.track.mode!==f.storedMode&&(f.track.mode=
f.storedMode)}b.removeEventListener("change",rb)};this.on("webkitbeginfullscreen",function(){b.removeEventListener("change",c);b.removeEventListener("change",e);b.addEventListener("change",e)});this.on("webkitendfullscreen",function(){b.removeEventListener("change",c);b.addEventListener("change",c);b.removeEventListener("change",e)})};a.prototype.proxyNativeTracks_=function(){var b=this;T.names.forEach(function(a){a=T[a];var c=b.el()[a.getterName],e=b[a.getterName]();if(b["featuresNative"+a.capitalName+
"Tracks"]&&c&&c.addEventListener){var h={change:function(b){e.trigger({type:"change",target:e,currentTarget:e,srcElement:e})},addtrack:function(b){e.addTrack(b.track)},removetrack:function(b){e.removeTrack(b.track)}},k=function(){for(var b=[],a=0;a<e.length;a++){for(var g=!1,h=0;h<c.length;h++)if(c[h]===e[a]){g=!0;break}g||b.push(e[a])}for(;b.length;)e.removeTrack(b.shift())};Object.keys(h).forEach(function(a){var g=h[a];c.addEventListener(a,g);b.on("dispose",function(b){return c.removeEventListener(a,
g)})});b.on("loadstart",k);b.on("dispose",function(a){return b.off("loadstart",k)})}})};a.prototype.createEl=function(){var b=this.options_.tag;if(!b||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(b){var c=b.cloneNode(!0);b.parentNode&&b.parentNode.insertBefore(c,b);a.disposeMediaElement(b);b=c}else b=t.createElement("video"),c=this.options_.tag&&X(this.options_.tag),c=C({},c),ab&&!0===this.options_.nativeControlsForTouch||delete c.controls,vc(b,l(c,{id:this.options_.techId,"class":"vjs-tech"}));
b.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&&b.setAttribute("preload",this.options_.preload);for(var c=["loop","muted","playsinline","autoplay"],f=0;f<c.length;f++){var e=c[f],h=this.options_[e];"undefined"!==typeof h&&(h?b.setAttribute(e,e):b.removeAttribute(e),b[e]=h)}return b};a.prototype.handleLateInit_=function(b){if(0!==b.networkState&&3!==b.networkState)if(0===b.readyState){var a=!1,c=function(){a=!0};this.on("loadstart",c);var e=function(){a||this.trigger("loadstart")};
this.on("loadedmetadata",e);this.ready(function(){this.off("loadstart",c);this.off("loadedmetadata",e);a||this.trigger("loadstart")})}else{var h=["loadstart"];h.push("loadedmetadata");2<=b.readyState&&h.push("loadeddata");3<=b.readyState&&h.push("canplay");4<=b.readyState&&h.push("canplaythrough");this.ready(function(){h.forEach(function(b){this.trigger(b)},this)})}};a.prototype.setCurrentTime=function(b){try{this.el_.currentTime=b}catch(a){z(a,"Video is not ready. (Video.js)")}};a.prototype.duration=
function(){var b=this;return Infinity===this.el_.duration&&ga&&Na&&0===this.el_.currentTime?(this.on("timeupdate",function f(){0<b.el_.currentTime&&(Infinity===b.el_.duration&&b.trigger("durationchange"),b.off("timeupdate",f))}),NaN):this.el_.duration||NaN};a.prototype.width=function(){return this.el_.offsetWidth};a.prototype.height=function(){return this.el_.offsetHeight};a.prototype.proxyWebkitFullscreen_=function(){var b=this;if("webkitDisplayingFullscreen"in this.el_){var a=function(){this.trigger("fullscreenchange",
{isFullscreen:!1})},c=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",a),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",c);this.on("dispose",function(){b.off("webkitbeginfullscreen",c);b.off("webkitendfullscreen",a)})}};a.prototype.supportsFullScreen=function(){if("function"===typeof this.el_.webkitEnterFullScreen){var b=n.navigator&&n.navigator.userAgent||"";if(/Android/.test(b)||
!/Chrome|Mac OS X 10.5/.test(b))return!0}return!1};a.prototype.enterFullScreen=function(){var b=this.el_;b.paused&&b.networkState<=b.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){b.pause();b.webkitEnterFullScreen()},0)):b.webkitEnterFullScreen()};a.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()};a.prototype.src=function(b){if(void 0===b)return this.el_.src;this.setSrc(b)};a.prototype.reset=function(){a.resetMediaElement(this.el_)};a.prototype.currentSrc=function(){return this.currentSource_?
this.currentSource_.src:this.el_.currentSrc};a.prototype.setControls=function(b){this.el_.controls=!!b};a.prototype.addTextTrack=function(b,a,f){return this.featuresNativeTextTracks?this.el_.addTextTrack(b,a,f):c.prototype.addTextTrack.call(this,b,a,f)};a.prototype.createRemoteTextTrack=function(b){if(!this.featuresNativeTextTracks)return c.prototype.createRemoteTextTrack.call(this,b);var a=t.createElement("track");b.kind&&(a.kind=b.kind);b.label&&(a.label=b.label);if(b.language||b.srclang)a.srclang=
b.language||b.srclang;b["default"]&&(a["default"]=b["default"]);b.id&&(a.id=b.id);b.src&&(a.src=b.src);return a};a.prototype.addRemoteTextTrack=function(b,a){var f=c.prototype.addRemoteTextTrack.call(this,b,a);this.featuresNativeTextTracks&&this.el().appendChild(f);return f};a.prototype.removeRemoteTextTrack=function(b){c.prototype.removeRemoteTextTrack.call(this,b);if(this.featuresNativeTextTracks)for(var a=this.$$("track"),f=a.length;f--;)b!==a[f]&&b!==a[f].track||this.el().removeChild(a[f])};a.prototype.getVideoPlaybackQuality=
function(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var b={};"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(b.droppedVideoFrames=this.el().webkitDroppedFrameCount,b.totalVideoFrames=this.el().webkitDecodedFrameCount);n.performance&&"function"===typeof n.performance.now?b.creationTime=n.performance.now():n.performance&&n.performance.timing&&"number"===typeof n.performance.timing.navigationStart&&
(b.creationTime=n.Date.now()-n.performance.timing.navigationStart);return b};return a}(B);if(ca()){u.TEST_VID=t.createElement("video");var kb=t.createElement("track");kb.kind="captions";kb.srclang="en";kb.label="English";u.TEST_VID.appendChild(kb)}u.isSupported=function(){try{u.TEST_VID.volume=.5}catch(c){return!1}return!(!u.TEST_VID||!u.TEST_VID.canPlayType)};u.canPlayType=function(c){return u.TEST_VID.canPlayType(c)};u.canPlaySource=function(c,a){return u.canPlayType(c.type)};u.canControlVolume=
function(){try{var c=u.TEST_VID.volume;u.TEST_VID.volume=c/2+.1;return c!==u.TEST_VID.volume}catch(a){return!1}};u.canControlPlaybackRate=function(){if(ga&&Na&&58>dd)return!1;try{var c=u.TEST_VID.playbackRate;u.TEST_VID.playbackRate=c/2+.1;return c!==u.TEST_VID.playbackRate}catch(a){return!1}};u.canOverrideAttributes=function(){if(F)return!1;try{var c=function(){};Object.defineProperty(t.createElement("video"),"src",{get:c,set:c});Object.defineProperty(t.createElement("audio"),"src",{get:c,set:c});
Object.defineProperty(t.createElement("video"),"innerHTML",{get:c,set:c});Object.defineProperty(t.createElement("audio"),"innerHTML",{get:c,set:c})}catch(a){return!1}return!0};u.supportsNativeTextTracks=function(){return fd};u.supportsNativeVideoTracks=function(){return!(!u.TEST_VID||!u.TEST_VID.videoTracks)};u.supportsNativeAudioTracks=function(){return!(!u.TEST_VID||!u.TEST_VID.audioTracks)};u.Events="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange resize volumechange".split(" ");
u.prototype.featuresVolumeControl=u.canControlVolume();u.prototype.featuresPlaybackRate=u.canControlPlaybackRate();u.prototype.featuresSourceset=u.canOverrideAttributes();u.prototype.movingMediaElementInDOM=!na;u.prototype.featuresFullscreenResize=!0;u.prototype.featuresProgressEvents=!0;u.prototype.featuresTimeupdateEvents=!0;u.prototype.featuresNativeTextTracks=u.supportsNativeTextTracks();u.prototype.featuresNativeVideoTracks=u.supportsNativeVideoTracks();u.prototype.featuresNativeAudioTracks=
u.supportsNativeAudioTracks();var nc=u.TEST_VID&&u.TEST_VID.constructor.prototype.canPlayType,uf=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,vf=/^video\/mp4/i;u.patchCanPlayType=function(){4<=$a&&!cd&&!Na?u.TEST_VID.constructor.prototype.canPlayType=function(c){return c&&uf.test(c)?"maybe":nc.call(this,c)}:ad&&(u.TEST_VID.constructor.prototype.canPlayType=function(c){return c&&vf.test(c)?"maybe":nc.call(this,c)})};u.unpatchCanPlayType=function(){var c=u.TEST_VID.constructor.prototype.canPlayType;
u.TEST_VID.constructor.prototype.canPlayType=nc;return c};u.patchCanPlayType();u.disposeMediaElement=function(c){if(c){for(c.parentNode&&c.parentNode.removeChild(c);c.hasChildNodes();)c.removeChild(c.firstChild);c.removeAttribute("src");if("function"===typeof c.load)try{c.load()}catch(a){}}};u.resetMediaElement=function(c){if(c){for(var a=c.querySelectorAll("source"),b=a.length;b--;)c.removeChild(a[b]);c.removeAttribute("src");if("function"===typeof c.load)try{c.load()}catch(g){}}};"muted defaultMuted autoplay controls loop playsinline".split(" ").forEach(function(c){u.prototype[c]=
function(){return this.el_[c]||this.el_.hasAttribute(c)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(c){u.prototype["set"+D(c)]=function(a){(this.el_[c]=a)?this.el_.setAttribute(c,c):this.el_.removeAttribute(c)}});"paused currentTime buffered volume poster preload error seeking seekable ended playbackRate defaultPlaybackRate played networkState readyState videoWidth videoHeight".split(" ").forEach(function(c){u.prototype[c]=function(){return this.el_[c]}});"volume src poster preload playbackRate defaultPlaybackRate".split(" ").forEach(function(c){u.prototype["set"+
D(c)]=function(a){this.el_[c]=a}});["pause","load","play"].forEach(function(c){u.prototype[c]=function(){return this.el_[c]()}});B.withSourceHandlers(u);u.nativeSourceHandler={};u.nativeSourceHandler.canPlayType=function(c){try{return u.TEST_VID.canPlayType(c)}catch(a){return""}};u.nativeSourceHandler.canHandleSource=function(c,a){if(c.type)return u.nativeSourceHandler.canPlayType(c.type);if(c.src){var b=Rb(c.src);return u.nativeSourceHandler.canPlayType("video/"+b)}return""};u.nativeSourceHandler.handleSource=
function(c,a,b){a.setSrc(c.src)};u.nativeSourceHandler.dispose=function(){};u.registerSourceHandler(u.nativeSourceHandler);B.registerTech("Html5",u);var wf=Jb(["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "],["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "]),
ee="progress abort suspend emptied stalled loadedmetadata loadeddata timeupdate resize volumechange texttrackchange".split(" "),oc={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},H=function(c){function a(b,g,f){w(this,a);b.id=b.id||g.id||"vjs_video_"+ka++;g=l(a.getTagSettings(b),g);g.initChildren=!1;g.createEl=!1;g.evented=!1;g.reportTouchActivity=!1;if(!g.language)if("function"===typeof b.closest){var e=b.closest("[lang]");e&&e.getAttribute&&(g.language=e.getAttribute("lang"))}else for(e=
b;e&&1===e.nodeType;){if(X(e).hasOwnProperty("lang")){g.language=e.getAttribute("lang");break}e=e.parentNode}f=r(this,c.call(this,null,g,f));f.isPosterFromTech_=!1;f.queuedCallbacks_=[];f.isReady_=!1;f.hasStarted_=!1;f.userActive_=!1;if(!f.options_||!f.options_.techOrder||!f.options_.techOrder.length)throw Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");f.tag=b;f.tagAttributes=b&&X(b);f.language(f.options_.language);
if(g.languages){var h={};Object.getOwnPropertyNames(g.languages).forEach(function(b){h[b.toLowerCase()]=g.languages[b]});f.languages_=h}else f.languages_=a.prototype.options_.languages;f.cache_={};f.poster_=g.poster||"";f.controls_=!!g.controls;f.cache_.lastVolume=1;b.controls=!1;b.removeAttribute("controls");f.scrubbing_=!1;f.el_=f.createEl();f.cache_.lastPlaybackRate=f.defaultPlaybackRate();wb(f,{eventBusKey:"el_"});e=C(f.options_);if(g.plugins){var k=g.plugins;Object.keys(k).forEach(function(b){if("function"===
typeof this[b])this[b](k[b]);else throw Error('plugin "'+b+'" does not exist');},f)}f.options_.playerOptions=e;f.middleware_=[];f.initChildren();f.isAudio("audio"===b.nodeName.toLowerCase());f.controls()?f.addClass("vjs-controls-enabled"):f.addClass("vjs-controls-disabled");f.el_.setAttribute("role","region");f.isAudio()?f.el_.setAttribute("aria-label",f.localize("Audio Player")):f.el_.setAttribute("aria-label",f.localize("Video Player"));f.isAudio()&&f.addClass("vjs-audio");f.flexNotSupported_()&&
f.addClass("vjs-no-flex");na||f.addClass("vjs-workinghover");a.players[f.id_]=f;f.addClass("vjs-v6");f.userActive(!0);f.reportUserActivity();f.one("play",f.listenForUserActivity_);f.on("fullscreenchange",f.handleFullscreenChange_);f.on("stageclick",f.handleStageClick_);f.changingSrc_=!1;f.playWaitingForReady_=!1;f.playOnLoadstart_=null;return f}x(a,c);a.prototype.dispose=function(){this.trigger("dispose");this.off("dispose");this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),
this.styleEl_=null);a.players[this.id_]=null;this.tag&&this.tag.player&&(this.tag.player=null);this.el_&&this.el_.player&&(this.el_.player=null);this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_="");this.playerElIngest_&&(this.playerElIngest_=null);this.tag&&(this.tag=null);Eb[this.id()]=null;c.prototype.dispose.call(this)};a.prototype.createEl=function(){var b=this.tag,a=void 0,f=this.playerElIngest_=b.parentNode&&b.parentNode.hasAttribute&&b.parentNode.hasAttribute("data-vjs-player"),
e="video-js"===this.tag.tagName.toLowerCase();f?a=this.el_=b.parentNode:e||(a=this.el_=c.prototype.createEl.call(this,"div"));var h=X(b);if(e){a=this.el_=b;for(b=this.tag=t.createElement("video");a.children.length;)b.appendChild(a.firstChild);qa(a,"video-js")||ia(a,"video-js");a.appendChild(b);f=this.playerElIngest_=a;"autoplay controls crossOrigin defaultMuted defaultPlaybackRate loop muted playbackRate src volume".split(" ").forEach(function(c){"undefined"!==typeof a[c]&&(b[c]=a[c])})}b.setAttribute("tabindex",
"-1");b.removeAttribute("width");b.removeAttribute("height");Object.getOwnPropertyNames(h).forEach(function(c){"class"===c?(a.className+=" "+h[c],e&&(b.className+=" "+h[c])):(a.setAttribute(c,h[c]),e&&b.setAttribute(c,h[c]))});b.playerId=b.id;b.id+="_html5_api";b.className="vjs-tech";b.player=a.player=this;this.addClass("vjs-paused");if(!0!==n.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=jd("vjs-styles-dimensions");var k=fa(".vjs-styles-defaults"),l=fa("head");l.insertBefore(this.styleEl_,k?k.nextSibling:
l.firstChild)}this.width(this.options_.width);this.height(this.options_.height);this.fluid(this.options_.fluid);this.aspectRatio(this.options_.aspectRatio);k=b.getElementsByTagName("a");for(l=0;l<k.length;l++){var p=k.item(l);ia(p,"vjs-hidden");p.setAttribute("hidden","hidden")}b.initNetworkState_=b.networkState;b.parentNode&&!f&&b.parentNode.insertBefore(a,b);Ua(b,a);this.children_.unshift(b);this.el_.setAttribute("lang",this.language_);return this.el_=a};a.prototype.width=function(b){return this.dimension("width",
b)};a.prototype.height=function(b){return this.dimension("height",b)};a.prototype.dimension=function(b,a){var c=b+"_";if(void 0===a)return this[c]||0;if(""===a)this[c]=void 0,this.updateStyleEl_();else{var e=parseFloat(a);isNaN(e)?z.error('Improper value "'+a+'" supplied for for '+b):(this[c]=e,this.updateStyleEl_())}};a.prototype.fluid=function(b){if(void 0===b)return!!this.fluid_;this.fluid_=!!b;b?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid");this.updateStyleEl_()};a.prototype.aspectRatio=
function(b){if(void 0===b)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(b))throw Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=b;this.fluid(!0);this.updateStyleEl_()};a.prototype.updateStyleEl_=function(){if(!0===n.VIDEOJS_NO_DYNAMIC_STYLE){var b="number"===typeof this.width_?this.width_:this.options_.width,a="number"===typeof this.height_?this.height_:this.options_.height,c=this.tech_&&this.tech_.el();c&&(0<=b&&(c.width=
b),0<=a&&(c.height=a))}else{var c=b=a=b=void 0,b=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9",b=b.split(":"),e=b[1]/b[0],b=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/e:this.videoWidth()||300,a=void 0!==this.height_?this.height_:b*e,c=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions";this.addClass(c);kd(this.styleEl_,"\n      ."+c+" {\n        width: "+
b+"px;\n        height: "+a+"px;\n      }\n\n      ."+c+".vjs-fluid {\n        padding-top: "+100*e+"%;\n      }\n    ")}};a.prototype.loadTech_=function(b,a){var c=this;this.tech_&&this.unloadTech_();var e=D(b),h=b.charAt(0).toLowerCase()+b.slice(1);"Html5"!==e&&this.tag&&(B.getTech("Html5").disposeMediaElement(this.tag),this.tag=this.tag.player=null);this.techName_=e;this.isReady_=!1;var k={source:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+
"_"+e+"_api",autoplay:this.options_.autoplay,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Q.names.forEach(function(b){b=Q[b];k[b.getterName]=c[b.privateName]});l(k,this.options_[e]);l(k,this.options_[h]);l(k,
this.options_[b.toLowerCase()]);this.tag&&(k.tag=this.tag);a&&a.src===this.cache_.src&&0<this.cache_.currentTime&&(k.startTime=this.cache_.currentTime);h=B.getTech(b);if(!h)throw Error("No Tech named '"+e+"' exists! '"+e+"' should be registered using videojs.registerTech()'");this.tech_=new h(k);this.tech_.ready(y(this,this.handleTechReady_),!0);pd.jsonToTextTracks(this.textTracksJson_||[],this.tech_);ee.forEach(function(b){c.on(c.tech_,b,c["handleTech"+D(b)+"_"])});Object.keys(oc).forEach(function(b){c.on(c.tech_,
b,function(a){if(0===c.tech_.playbackRate()&&c.tech_.seeking())c.queuedCallbacks_.push({callback:c["handleTech"+oc[b]+"_"].bind(c),event:a});else c["handleTech"+oc[b]+"_"](a)})});this.on(this.tech_,"loadstart",this.handleTechLoadStart_);this.on(this.tech_,"sourceset",this.handleTechSourceset_);this.on(this.tech_,"waiting",this.handleTechWaiting_);this.on(this.tech_,"ended",this.handleTechEnded_);this.on(this.tech_,"seeking",this.handleTechSeeking_);this.on(this.tech_,"play",this.handleTechPlay_);
this.on(this.tech_,"firstplay",this.handleTechFirstPlay_);this.on(this.tech_,"pause",this.handleTechPause_);this.on(this.tech_,"durationchange",this.handleTechDurationChange_);this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_);this.on(this.tech_,"error",this.handleTechError_);this.on(this.tech_,"loadedmetadata",this.updateStyleEl_);this.on(this.tech_,"posterchange",this.handleTechPosterChange_);this.on(this.tech_,"textdata",this.handleTechTextData_);this.on(this.tech_,"ratechange",
this.handleTechRateChange_);this.usingNativeControls(this.techGet_("controls"));this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_();this.tech_.el().parentNode===this.el()||"Html5"===e&&this.tag||Ua(this.tech_.el(),this.el());this.tag&&(this.tag=this.tag.player=null)};a.prototype.unloadTech_=function(){var b=this;Q.names.forEach(function(a){a=Q[a];b[a.privateName]=b[a.getterName]()});this.textTracksJson_=pd.textTracksToJson(this.tech_);this.isReady_=!1;this.tech_.dispose();
this.tech_=!1;this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange"));this.isPosterFromTech_=!1};a.prototype.tech=function(b){void 0===b&&z.warn(ob(wf));return this.tech_};a.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_();this.on(this.tech_,"mousedown",this.handleTechClick_);this.on(this.tech_,"touchstart",this.handleTechTouchStart_);this.on(this.tech_,"touchmove",this.handleTechTouchMove_);this.on(this.tech_,"touchend",this.handleTechTouchEnd_);this.on(this.tech_,
"tap",this.handleTechTap_)};a.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_);this.off(this.tech_,"touchstart",this.handleTechTouchStart_);this.off(this.tech_,"touchmove",this.handleTechTouchMove_);this.off(this.tech_,"touchend",this.handleTechTouchEnd_);this.off(this.tech_,"mousedown",this.handleTechClick_)};a.prototype.handleTechReady_=function(){this.triggerReady();this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume);this.handleTechPosterChange_();
this.handleTechDurationChange_();if((this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(b){z("deleting tag.poster throws in some browsers",b)}};a.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended");this.removeClass("vjs-seeking");this.error(null);this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))};a.prototype.updateSourceCaches_=function(){var b=0<arguments.length&&
void 0!==arguments[0]?arguments[0]:"",a=b,c="";"string"!==typeof a&&(a=b.src,c=b.type);this.cache_.source=this.cache_.source||{};this.cache_.sources=this.cache_.sources||[];a&&!c&&(c=bf(this,a));this.cache_.source={src:a,type:c};for(var b=this.cache_.sources.filter(function(b){return b.src&&b.src===a}),c=[],e=this.$$("source"),h=[],k=0;k<e.length;k++){var l=X(e[k]);c.push(l);l.src&&l.src===a&&h.push(l.src)}h.length&&!b.length?this.cache_.sources=c:b.length||(this.cache_.sources=[this.cache_.source]);
this.cache_.src=a};a.prototype.handleTechSourceset_=function(b){var a=this;if(!this.changingSrc_&&(this.updateSourceCaches_(b.src),!b.src))this.tech_.one(["sourceset","loadstart"],function m(b){"sourceset"!==b.type&&a.updateSourceCaches_(a.techGet_("currentSrc"));a.tech_.off(["sourceset","loadstart"],m)});this.trigger({src:b.src,type:"sourceset"})};a.prototype.hasStarted=function(b){if(void 0===b)return this.hasStarted_;b!==this.hasStarted_&&((this.hasStarted_=b)?(this.addClass("vjs-has-started"),
this.trigger("firstplay")):this.removeClass("vjs-has-started"))};a.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.hasStarted(!0);this.trigger("play")};a.prototype.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(b){return b.callback(b.event)}),this.queuedCallbacks_=[]);this.cache_.lastPlaybackRate=this.tech_.playbackRate();this.trigger("ratechange")};
a.prototype.handleTechWaiting_=function(){var b=this;this.addClass("vjs-waiting");this.trigger("waiting");this.one("timeupdate",function(){return b.removeClass("vjs-waiting")})};a.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting");this.trigger("canplay")};a.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting");this.trigger("canplaythrough")};a.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting");this.trigger("playing")};a.prototype.handleTechSeeking_=
function(){this.addClass("vjs-seeking");this.trigger("seeking")};a.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking");this.trigger("seeked")};a.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(z.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime));this.addClass("vjs-has-started");this.trigger("firstplay")};a.prototype.handleTechPause_=function(){this.removeClass("vjs-playing");this.addClass("vjs-paused");
this.trigger("pause")};a.prototype.handleTechEnded_=function(){this.addClass("vjs-ended");this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause();this.trigger("ended")};a.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))};a.prototype.handleTechClick_=function(b){ra(b)&&this.controls_&&(this.paused()?this.play():this.pause())};a.prototype.handleTechTap_=function(){this.userActive(!this.userActive())};a.prototype.handleTechTouchStart_=function(){this.userWasActive=
this.userActive()};a.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()};a.prototype.handleTechTouchEnd_=function(b){b.preventDefault()};a.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")};a.prototype.handleStageClick_=function(){this.reportUserActivity()};a.prototype.handleTechFullscreenChange_=function(b,a){a&&this.isFullscreen(a.isFullscreen);this.trigger("fullscreenchange")};
a.prototype.handleTechError_=function(){var b=this.tech_.error();this.error(b)};a.prototype.handleTechTextData_=function(){var b=null;1<arguments.length&&(b=arguments[1]);this.trigger("textdata",b)};a.prototype.getCache=function(){return this.cache_};a.prototype.techCall_=function(b,a){this.ready(function(){if(b in $e)return this.tech_[b](this.middleware_.reduce(Db(b),a));if(b in zd)return Rc(this.middleware_,this.tech_,b,a);try{if(this.tech_)this.tech_[b](a)}catch(c){throw z(c),c;}},!0)};a.prototype.techGet_=
function(b){if(this.tech_&&this.tech_.isReady_){if(b in Ze){var a=this.tech_;return this.middleware_.reduceRight(Db(b),a[b]())}if(b in zd)return Rc(this.middleware_,this.tech_,b);try{return this.tech_[b]()}catch(c){if(void 0===this.tech_[b])throw z("Video.js: "+b+" method not defined for "+this.techName_+" playback technology.",c),c;if("TypeError"===c.name)throw z("Video.js: "+b+" unavailable on "+this.techName_+" playback technology element.",c),this.tech_.isReady_=!1,c;z(c);throw c;}}};a.prototype.play=
function(){var b=this;this.playOnLoadstart_&&this.off("loadstart",this.playOnLoadstart_);if(this.isReady_)if(this.changingSrc_||!this.src()&&!this.currentSrc())this.playOnLoadstart_=function(){b.playOnLoadstart_=null;yb(b.play())},this.one("loadstart",this.playOnLoadstart_);else return this.techGet_("play");else this.playWaitingForReady_||(this.playWaitingForReady_=!0,this.ready(function(){b.playWaitingForReady_=!1;yb(b.play())}))};a.prototype.pause=function(){this.techCall_("pause")};a.prototype.paused=
function(){return!1===this.techGet_("paused")?!1:!0};a.prototype.played=function(){return this.techGet_("played")||la(0,0)};a.prototype.scrubbing=function(b){if("undefined"===typeof b)return this.scrubbing_;this.scrubbing_=!!b;b?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")};a.prototype.currentTime=function(b){if("undefined"!==typeof b)0>b&&(b=0),this.techCall_("setCurrentTime",b);else return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime};a.prototype.duration=
function(b){if(void 0===b)return void 0!==this.cache_.duration?this.cache_.duration:NaN;b=parseFloat(b);0>b&&(b=Infinity);b!==this.cache_.duration&&(this.cache_.duration=b,Infinity===b?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))};a.prototype.remainingTime=function(){return this.duration()-this.currentTime()};a.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())};a.prototype.buffered=function(){var b=
this.techGet_("buffered");b&&b.length||(b=la(0,0));return b};a.prototype.bufferedPercent=function(){return Ic(this.buffered(),this.duration())};a.prototype.bufferedEnd=function(){var b=this.buffered(),a=this.duration(),b=b.end(b.length-1);b>a&&(b=a);return b};a.prototype.volume=function(b){var a=void 0;if(void 0!==b)a=Math.max(0,Math.min(1,parseFloat(b))),this.cache_.volume=a,this.techCall_("setVolume",a),0<a&&this.lastVolume_(a);else return a=parseFloat(this.techGet_("volume")),isNaN(a)?1:a};a.prototype.muted=
function(b){if(void 0!==b)this.techCall_("setMuted",b);else return this.techGet_("muted")||!1};a.prototype.defaultMuted=function(b){return void 0!==b?this.techCall_("setDefaultMuted",b):this.techGet_("defaultMuted")||!1};a.prototype.lastVolume_=function(b){if(void 0!==b&&0!==b)this.cache_.lastVolume=b;else return this.cache_.lastVolume};a.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1};a.prototype.isFullscreen=function(b){if(void 0!==b)this.isFullscreen_=!!b;
else return!!this.isFullscreen_};a.prototype.requestFullscreen=function(){this.isFullscreen(!0);ha.requestFullscreen?(U(t,ha.fullscreenchange,y(this,function g(a){this.isFullscreen(t[ha.fullscreenElement]);!1===this.isFullscreen()&&O(t,ha.fullscreenchange,g);this.trigger("fullscreenchange")})),this.el_[ha.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))};a.prototype.exitFullscreen=function(){this.isFullscreen(!1);
if(ha.requestFullscreen)t[ha.exitFullscreen]();else this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))};a.prototype.enterFullWindow=function(){this.isFullWindow=!0;this.docOrigOverflow=t.documentElement.style.overflow;U(t,"keydown",y(this,this.fullWindowOnEscKey));t.documentElement.style.overflow="hidden";ia(t.body,"vjs-full-window");this.trigger("enterFullWindow")};a.prototype.fullWindowOnEscKey=function(b){27===b.keyCode&&(!0===
this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())};a.prototype.exitFullWindow=function(){this.isFullWindow=!1;O(t,"keydown",this.fullWindowOnEscKey);t.documentElement.style.overflow=this.docOrigOverflow;Ea(t.body,"vjs-full-window");this.trigger("exitFullWindow")};a.prototype.canPlayType=function(b){for(var a=void 0,c=0,e=this.options_.techOrder;c<e.length;c++){var a=e[c],h=B.getTech(a);h||(h=p.getComponent(a));if(!h)z.error('The "'+a+'" tech is undefined. Skipped browser support check for that tech.');
else if(h.isSupported()&&(a=h.canPlayType(b)))return a}return""};a.prototype.selectSource=function(b){var a=this,c=this.options_.techOrder.map(function(b){return[b,B.getTech(b)]}).filter(function(b){var a=b[0];if(b=b[1])return b.isSupported();z.error('The "'+a+'" tech is undefined. Skipped browser support check for that tech.');return!1}),e=function(b,a,c){var g=void 0;b.some(function(b){return a.some(function(a){if(g=c(b,a))return!0})});return g},h=void 0,h=function(b){return function(a,c){return b(c,
a)}},k=function(b,c){var f=b[0];if(b[1].canPlaySource(c,a.options_[f.toLowerCase()]))return{source:c,tech:f}};return(h=this.options_.sourceOrder?e(b,c,h(k)):e(c,b,k))||!1};a.prototype.src=function(b){var a=this;if("undefined"===typeof b)return this.cache_.src||"";var c=cf(b);c.length?(this.changingSrc_=!0,this.cache_.sources=c,this.updateSourceCaches_(c[0]),Ae(this,c[0],function(b,e){a.middleware_=e;a.cache_.sources=c;a.updateSourceCaches_(b);if(a.src_(b)){if(1<c.length)return a.src(c.slice(1));a.changingSrc_=
!1;a.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);a.triggerReady()}else Be(e,a.tech_)})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)};a.prototype.src_=function(b){var a=this,c=this.selectSource([b]);if(!c)return!0;if(!me(c.tech,this.techName_))return this.changingSrc_=!0,this.loadTech_(c.tech,c.source),this.tech_.ready(function(){a.changingSrc_=!1}),!1;this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?
this.techCall_("setSource",b):this.techCall_("src",b.src);this.changingSrc_=!1},!0);return!1};a.prototype.load=function(){this.techCall_("load")};a.prototype.reset=function(){this.loadTech_(this.options_.techOrder[0],null);this.techCall_("reset")};a.prototype.currentSources=function(){var b=this.currentSource(),a=[];0!==Object.keys(b).length&&a.push(b);return this.cache_.sources||a};a.prototype.currentSource=function(){return this.cache_.source||{}};a.prototype.currentSrc=function(){return this.currentSource()&&
this.currentSource().src||""};a.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""};a.prototype.preload=function(a){if(void 0!==a)this.techCall_("setPreload",a),this.options_.preload=a;else return this.techGet_("preload")};a.prototype.autoplay=function(a){if(void 0!==a)this.techCall_("setAutoplay",a),this.options_.autoplay=a;else return this.techGet_("autoplay",a)};a.prototype.playsinline=function(a){return void 0!==a?(this.techCall_("setPlaysinline",a),this.options_.playsinline=
a,this):this.techGet_("playsinline")};a.prototype.loop=function(a){if(void 0!==a)this.techCall_("setLoop",a),this.options_.loop=a;else return this.techGet_("loop")};a.prototype.poster=function(a){if(void 0===a)return this.poster_;a||(a="");a!==this.poster_&&(this.poster_=a,this.techCall_("setPoster",a),this.isPosterFromTech_=!1,this.trigger("posterchange"))};a.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var a=
this.tech_.poster()||"";a!==this.poster_&&(this.poster_=a,this.isPosterFromTech_=!0,this.trigger("posterchange"))}};a.prototype.controls=function(a){if(void 0===a)return!!this.controls_;a=!!a;this.controls_!==a&&(this.controls_=a,this.usingNativeControls()&&this.techCall_("setControls",a),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),
this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))};a.prototype.usingNativeControls=function(a){if(void 0===a)return!!this.usingNativeControls_;a=!!a;this.usingNativeControls_!==a&&((this.usingNativeControls_=a)?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))};a.prototype.error=function(a){if(void 0===
a)return this.error_||null;null===a?(this.error_=a,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close()):(this.error_=new K(a),this.addClass("vjs-error"),z.error("(CODE:"+this.error_.code+" "+K.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"))};a.prototype.reportUserActivity=function(a){this.userActivity_=!0};a.prototype.userActive=function(a){if(void 0===a)return this.userActive_;a=!!a;if(a!==this.userActive_)if(this.userActive_=a)this.userActivity_=
!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");else{if(this.tech_)this.tech_.one("mousemove",function(a){a.stopPropagation();a.preventDefault()});this.userActivity_=!1;this.removeClass("vjs-user-active");this.addClass("vjs-user-inactive");this.trigger("userinactive")}};a.prototype.listenForUserActivity_=function(){var a=void 0,c=void 0,f=void 0,e=y(this,this.reportUserActivity);this.on("mousedown",function(){e();this.clearInterval(a);a=this.setInterval(e,
250)});this.on("mousemove",function(a){if(a.screenX!==c||a.screenY!==f)c=a.screenX,f=a.screenY,e()});this.on("mouseup",function(c){e();this.clearInterval(a)});this.on("keydown",e);this.on("keyup",e);var h=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1;this.userActive(!0);this.clearTimeout(h);var a=this.options_.inactivityTimeout;0>=a||(h=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},a))}},250)};a.prototype.playbackRate=function(a){if(void 0!==
a)this.techCall_("setPlaybackRate",a);else return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1};a.prototype.defaultPlaybackRate=function(a){return void 0!==a?this.techCall_("setDefaultPlaybackRate",a):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1};a.prototype.isAudio=function(a){if(void 0!==a)this.isAudio_=!!a;else return!!this.isAudio_};a.prototype.addTextTrack=function(a,c,f){if(this.tech_)return this.tech_.addTextTrack(a,
c,f)};a.prototype.addRemoteTextTrack=function(a,c){if(this.tech_)return this.tech_.addRemoteTextTrack(a,c)};a.prototype.removeRemoteTextTrack=function(){var a=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).track,a=void 0===a?arguments[0]:a;if(this.tech_)return this.tech_.removeRemoteTextTrack(a)};a.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")};a.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||
0};a.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0};a.prototype.language=function(a){if(void 0===a)return this.language_;this.language_=String(a).toLowerCase()};a.prototype.languages=function(){return C(a.prototype.options_.languages,this.languages_)};a.prototype.toJSON=function(){var a=C(this.options_),c=a.tracks;a.tracks=[];for(var f=0;f<c.length;f++){var e=c[f],e=C(e);e.player=void 0;a.tracks[f]=e}return a};a.prototype.createModal=function(a,
c){var f=this;c=c||{};c.content=a||"";var e=new xa(this,c);this.addChild(e);e.on("dispose",function(){f.removeChild(e)});e.open();return e};a.getTagSettings=function(a){var c={sources:[],tracks:[]},f=X(a),e=f["data-setup"];qa(a,"vjs-fluid")&&(f.fluid=!0);if(null!==e){var h,k=null;try{h=JSON.parse(e||"{}",void 0)}catch(n){k=n}h=[k,h];e=h[0];h=h[1];e&&z.error(e);l(f,h)}l(c,f);if(a.hasChildNodes())for(a=a.childNodes,f=0,e=a.length;f<e;f++)h=a[f],k=h.nodeName.toLowerCase(),"source"===k?c.sources.push(X(h)):
"track"===k&&c.tracks.push(X(h));return c};a.prototype.flexNotSupported_=function(){var a=t.createElement("i");return!("flexBasis"in a.style||"webkitFlexBasis"in a.style||"mozFlexBasis"in a.style||"msFlexBasis"in a.style||"msFlexOrder"in a.style)};return a}(p);Q.names.forEach(function(c){var a=Q[c];H.prototype[a.getterName]=function(){if(this.tech_)return this.tech_[a.getterName]();this[a.privateName]=this[a.privateName]||new a.ListClass;return this[a.privateName]}});H.players={};var Ta=n.navigator;
H.prototype.options_={techOrder:B.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2E3,playbackRates:[],children:"mediaLoader posterImage textTrackDisplay loadingSpinner bigPlayButton controlBar errorDisplay textTrackSettings".split(" "),language:Ta&&(Ta.languages&&Ta.languages[0]||Ta.userLanguage||Ta.language)||"en",languages:{},notSupportedMessage:"\u5f71\u7247\u4f86\u6e90\u5931\u6548\uff0c\u8acb\u91cd\u65b0\u8f09\u5165"};F||H.prototype.options_.children.push("resizeManager");["ended","seeking",
"seekable","networkState","readyState"].forEach(function(c){H.prototype[c]=function(){return this.techGet_(c)}});ee.forEach(function(c){H.prototype["handleTech"+D(c)+"_"]=function(){return this.trigger(c)}});p.registerComponent("Player",H);var aa={},lb=function(c){return aa.hasOwnProperty(c)?aa[c]:void 0},mb=function(c,a,b){b=(b?"before":"")+"pluginsetup";c.trigger(b,a);c.trigger(b+":"+a.name,a)},xf=function(c,a){var b=function(){mb(this,{name:c,plugin:a,instance:null},!0);var b=a.apply(this,arguments);
this.activePlugins_=this.activePlugins_||{};this.activePlugins_[c]=!0;mb(this,{name:c,plugin:a,instance:b});return b};Object.keys(a).forEach(function(c){b[c]=a[c]});return b},fe=function(c,a){a.prototype.name=c;return function(){mb(this,{name:c,plugin:a,instance:null},!0);for(var b=arguments.length,g=Array(b),f=0;f<b;f++)g[f]=arguments[f];var e=new (Function.prototype.bind.apply(a,[null].concat([this].concat(g))));this[c]=function(){return e};mb(this,e.getEventHash());return e}},ba=function(){function c(a){w(this,
c);if(this.constructor===c)throw Error("Plugin must be sub-classed; not directly instantiated.");this.player=a;wb(this);delete this.trigger;Gc(this,this.constructor.defaultState);var b=this.name;a.activePlugins_=a.activePlugins_||{};a.activePlugins_[b]=!0;this.dispose=y(this,this.dispose);a.on("dispose",this.dispose)}c.prototype.version=function(){return this.constructor.VERSION};c.prototype.getEventHash=function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};a.name=this.name;a.plugin=
this.constructor;a.instance=this;return a};c.prototype.trigger=function(a){return sa(this.eventBusEl_,a,this.getEventHash(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}))};c.prototype.handleStateChanged=function(a){};c.prototype.dispose=function(){var a=this.name,b=this.player;this.trigger("dispose");this.off();b.off("dispose",this.dispose);b.activePlugins_[a]=!1;this.player=this.state=null;b[a]=fe(a,aa[a])};c.isBasic=function(a){a="string"===typeof a?lb(a):a;return"function"===typeof a&&
!c.prototype.isPrototypeOf(a.prototype)};c.registerPlugin=function(a,b){if("string"!==typeof a)throw Error('Illegal plugin name, "'+a+'", must be a string, was '+("undefined"===typeof a?"undefined":pa(a))+".");if(aa.hasOwnProperty(a))z.warn('A plugin named "'+a+'" already exists. You may want to avoid re-registering plugins!');else if(H.prototype.hasOwnProperty(a))throw Error('Illegal plugin name, "'+a+'", cannot share a name with an existing player method!');if("function"!==typeof b)throw Error('Illegal plugin for "'+
a+'", must be a function, was '+("undefined"===typeof b?"undefined":pa(b))+".");aa[a]=b;"plugin"!==a&&(c.isBasic(b)?H.prototype[a]=xf(a,b):H.prototype[a]=fe(a,b));return b};c.deregisterPlugin=function(a){if("plugin"===a)throw Error("Cannot de-register base plugin.");aa.hasOwnProperty(a)&&(delete aa[a],delete H.prototype[a])};c.getPlugins=function(){var a=void 0;(0<arguments.length&&void 0!==arguments[0]?arguments[0]:Object.keys(aa)).forEach(function(b){var c=lb(b);c&&(a=a||{},a[b]=c)});return a};
c.getPluginVersion=function(a){return(a=lb(a))&&a.VERSION||""};return c}();ba.getPlugin=lb;ba.BASE_PLUGIN_NAME="plugin";ba.registerPlugin("plugin",ba);H.prototype.usingPlugin=function(c){return!!this.activePlugins_&&!0===this.activePlugins_[c]};H.prototype.hasPlugin=function(c){return!!aa.hasOwnProperty(c)};var yf=function(c,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof a?"undefined":pa(a)));c.prototype=Object.create(a&&
a.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});a&&(c.super_=a)};"undefined"===typeof HTMLVideoElement&&ca()&&(t.createElement("video"),t.createElement("audio"),t.createElement("track"),t.createElement("video-js"));var Vc=function(c){return 0===c.indexOf("#")?c.slice(1):c};v.hooks_={};v.hooks=function(c,a){v.hooks_[c]=v.hooks_[c]||[];a&&(v.hooks_[c]=v.hooks_[c].concat(a));return v.hooks_[c]};v.hook=function(c,a){v.hooks(c,a)};v.hookOnce=function(c,a){v.hooks(c,[].concat(a).map(function(a){return function f(){v.removeHook(c,
f);return a.apply(void 0,arguments)}}))};v.removeHook=function(c,a){var b=v.hooks(c).indexOf(a);if(-1>=b)return!1;v.hooks_[c]=v.hooks_[c].slice();v.hooks_[c].splice(b,1);return!0};if(!0!==n.VIDEOJS_NO_DYNAMIC_STYLE&&ca()){var nb=fa(".vjs-styles-defaults");if(!nb){var nb=jd("vjs-styles-defaults"),pc=fa("head");pc&&pc.insertBefore(nb,pc.firstChild);kd(nb,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}ub(1,
v);v.VERSION="6.10.1";v.options=H.prototype.options_;v.getPlayers=function(){return H.players};v.getPlayer=function(c){var a=H.players,b=void 0;if("string"===typeof c){c=Vc(c);if(b=a[c])return b;b=fa("#"+c)}else b=c;if(Ca(b)&&(c=b.player,b=b.playerId,c||a[b]))return c||a[b]};v.getAllPlayers=function(){return Object.keys(H.players).map(function(c){return H.players[c]}).filter(Boolean)};v.players=H.players;v.getComponent=p.getComponent;v.registerComponent=function(c,a){B.isTech(a)&&z.warn("The "+c+
" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)");p.registerComponent.call(p,c,a)};v.getTech=B.getTech;v.registerTech=B.registerTech;v.use=function(c,a){ma[c]=ma[c]||[];ma[c].push(a)};!F&&Object.defineProperty?(Object.defineProperty(v,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(v.middleware,"TERMINATOR",{value:Ma,writeable:!1,enumerable:!0})):v.middleware={TERMINATOR:Ma};v.browser=Ge;v.TOUCH_ENABLED=ab;v.extend=
function(c){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},b=function(){c.apply(this,arguments)},e={};"object"===("undefined"===typeof a?"undefined":pa(a))?(a.constructor!==Object.prototype.constructor&&(b=a.constructor),e=a):"function"===typeof a&&(b=a);yf(b,c);for(var f in e)e.hasOwnProperty(f)&&(b.prototype[f]=e[f]);return b};v.mergeOptions=C;v.bind=y;v.registerPlugin=ba.registerPlugin;v.plugin=function(c,a){z.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead");
return ba.registerPlugin(c,a)};v.getPlugins=ba.getPlugins;v.getPlugin=ba.getPlugin;v.getPluginVersion=ba.getPluginVersion;v.addLanguage=function(c,a){var b;c=(""+c).toLowerCase();v.options.languages=C(v.options.languages,(b={},b[c]=a,b));return v.options.languages[c]};v.log=z;v.createTimeRange=v.createTimeRanges=la;v.formatTime=za;v.setFormatTime=function(c){Tb=c};v.resetFormatTime=function(){Tb=Cd};v.parseUrl=Qb;v.isCrossOrigin=hb;v.EventTarget=J;v.on=U;v.one=Ia;v.off=O;v.trigger=sa;v.xhr=Y;v.TextTrack=
Pa;v.AudioTrack=wd;v.VideoTrack=xd;"isEl isTextNode createEl hasClass addClass removeClass toggleClass setAttributes getAttributes emptyEl appendContent insertContent".split(" ").forEach(function(c){v[c]=function(){z.warn("videojs."+c+"() is deprecated; use videojs.dom."+c+"() instead");return id[c].apply(null,arguments)}});v.computedStyle=M;v.dom=id;v.url=Re;return v});
/*
 2018 Brightcove, Inc.
 @license Apache-2.0
*/
(function(e,k){"object"===typeof exports&&"undefined"!==typeof module?module.exports=k(require("video.js")):"function"===typeof define&&define.amd?define(["video.js"],k):e.videojsFlash=k(e.videojs)})(this,function(e){function k(b){var a=b.charAt(0).toUpperCase()+b.slice(1);r["set"+a]=function(a){return this.el_.vjs_setProperty(b,a)}}function t(b){r[b]=function(){return this.el_.vjs_getProperty(b)}}e=e&&e.hasOwnProperty("default")?e["default"]:e;for(var h="undefined"!==typeof window?window:"undefined"!==
typeof global?global:"undefined"!==typeof self?self:{},f="undefined"!==typeof window?window:"undefined"!==typeof h?h:"undefined"!==typeof self?self:{},w=function(b,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a)},x=function(b,a){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return!a||"object"!==typeof a&&"function"!==typeof a?b:a},h=e.getComponent("Tech"),m=e.dom,u=e.url,n=e.createTimeRange,l=e.mergeOptions,q=f&&f.navigator||{},c=function(b){function a(d,y){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var c=x(this,b.call(this,d,y));d.source&&c.ready(function(){this.setSource(d.source)},!0);d.startTime&&c.ready(function(){this.load();this.play();this.currentTime(d.startTime)},!0);f.videojs=f.videojs||{};f.videojs.Flash=f.videojs.Flash||
{};f.videojs.Flash.onReady=a.onReady;f.videojs.Flash.onEvent=a.onEvent;f.videojs.Flash.onError=a.onError;c.on("seeked",function(){this.lastSeekTarget_=void 0});return c}w(a,b);a.prototype.createEl=function(){var d=this.options_;d.swf||(d.swf="https://vjs.zencdn.net/swf/5.4.2/video-js.swf");var b=d.techId,c=l({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:d.autoplay,preload:d.preload,loop:d.loop,muted:d.muted},
d.flashVars),e=l({wmode:"opaque",bgcolor:"#000000"},d.params),b=l({id:b,name:b,"class":"vjs-tech"},d.attributes);this.el_=a.embed(d.swf,c,e,b);this.el_.tech=this;return this.el_};a.prototype.play=function(){this.ended()&&this.setCurrentTime(0);this.el_.vjs_play()};a.prototype.pause=function(){this.el_.vjs_pause()};a.prototype.src=function(a){return void 0===a?this.currentSrc():this.setSrc(a)};a.prototype.setSrc=function(a){var b=this;a=u.getAbsoluteURL(a);this.el_.vjs_src(a);this.autoplay()&&this.setTimeout(function(){return b.play()},
0)};a.prototype.seeking=function(){return void 0!==this.lastSeekTarget_};a.prototype.setCurrentTime=function(a){var c=this.seekable();c.length&&(a=a>c.start(0)?a:c.start(0),this.lastSeekTarget_=a=a<c.end(c.length-1)?a:c.end(c.length-1),this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",a),b.prototype.setCurrentTime.call(this))};a.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")};a.prototype.currentSrc=function(){return this.currentSource_?
this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")};a.prototype.duration=function(){if(0===this.readyState())return NaN;var a=this.el_.vjs_getProperty("duration");return 0<=a?a:Infinity};a.prototype.load=function(){this.el_.vjs_load()};a.prototype.poster=function(){this.el_.vjs_getProperty("poster")};a.prototype.setPoster=function(){};a.prototype.seekable=function(){var a=this.duration();return 0===a?n():n(0,a)};a.prototype.buffered=function(){var a=this.el_.vjs_getProperty("buffered");
return 0===a.length?n():n(a[0][0],a[0][1])};a.prototype.supportsFullScreen=function(){return!1};a.prototype.enterFullScreen=function(){return!1};a.prototype.getVideoPlaybackQuality=function(){var a=this.el_.vjs_getProperty("getVideoPlaybackQuality");f.performance&&"function"===typeof f.performance.now?a.creationTime=f.performance.now():f.performance&&f.performance.timing&&"number"===typeof f.performance.timing.navigationStart&&(a.creationTime=f.Date.now()-f.performance.timing.navigationStart);return a};
return a}(h),g="rtmpConnection rtmpStream preload defaultPlaybackRate playbackRate autoplay loop controls volume muted defaultMuted".split(" "),v="networkState readyState initialTime startOffsetTime paused ended videoWidth videoHeight".split(" "),r=c.prototype,p=0;p<g.length;p++)t(g[p]),k(g[p]);for(g=0;g<v.length;g++)t(v[g]);c.isSupported=function(){return e.browser.IS_CHROME&&!e.browser.IS_ANDROID||e.browser.IS_SAFARI&&!e.browser.IS_IOS?!0:10<=c.version()[0]};h.withSourceHandlers(c);c.nativeSourceHandler=
{};c.nativeSourceHandler.canPlayType=function(b){return b in c.formats?"maybe":""};c.nativeSourceHandler.canHandleSource=function(b,a){var d=void 0;d=b.type?b.type.replace(/;.*/,"").toLowerCase():(d=u.getFileExtension(b.src))?"video/"+d:"";return c.nativeSourceHandler.canPlayType(d)};c.nativeSourceHandler.handleSource=function(b,a,d){a.setSrc(b.src)};c.nativeSourceHandler.dispose=function(){};c.registerSourceHandler(c.nativeSourceHandler);c.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4",
"video/m4v":"MP4"};c.onReady=function(b){(b=(b=m.$("#"+b))&&b.tech)&&b.el()&&c.checkReady(b)};c.checkReady=function(b){b.el()&&(b.el().vjs_getProperty?b.triggerReady():this.setTimeout(function(){c.checkReady(b)},50))};c.onEvent=function(b,a){var d=m.$("#"+b).tech,c=Array.prototype.slice.call(arguments,2);d.setTimeout(function(){d.trigger(a,c)},1)};c.onError=function(b,a){var d=m.$("#"+b).tech;if("srcnotfound"===a)return d.error(4);"string"===typeof a?d.error("FLASH: "+a):(a.origin="flash",d.error(a))};
c.version=function(){var b="0,0,0";try{b=(new f.ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(a){try{q.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(b=(q.plugins["Shockwave Flash 2.0"]||q.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(d){}}return b.split(",")};c.embed=function(b,a,d,e){b=c.getEmbedCode(b,a,d,e);return m.createEl("div",{innerHTML:b}).childNodes[0]};c.getEmbedCode=
function(b,a,d,c){var e="",f="",g="";a&&Object.getOwnPropertyNames(a).forEach(function(b){e+=b+"="+a[b]+"&amp;"});d=l({movie:b,flashvars:e,allowScriptAccess:"always",allowNetworking:"all"},d);Object.getOwnPropertyNames(d).forEach(function(a){f+='<param name="'+a+'" value="'+d[a]+'" />'});c=l({data:b,width:"100%",height:"100%"},c);Object.getOwnPropertyNames(c).forEach(function(a){g+=a+'="'+c[a]+'" '});return'<object type="application/x-shockwave-flash" '+g+">"+f+"</object>"};(function(b){b.streamingFormats=
{"rtmp/mp4":"MP4","rtmp/flv":"FLV"};b.streamFromParts=function(a,b){return a+"&"+b};b.streamToParts=function(a){var b={connection:"",stream:""};if(!a)return b;var c=a.search(/&(?![\w-]+=)/),e=void 0;-1!==c?e=c+1:(c=e=a.lastIndexOf("/")+1,0===c&&(c=e=a.length));b.connection=a.substring(0,c);b.stream=a.substring(e,a.length);return b};b.isStreamingType=function(a){return a in b.streamingFormats};b.RTMP_RE=/^rtmp[set]?:\/\//i;b.isStreamingSrc=function(a){return b.RTMP_RE.test(a)};b.rtmpSourceHandler=
{};b.rtmpSourceHandler.canPlayType=function(a){return b.isStreamingType(a)?"maybe":""};b.rtmpSourceHandler.canHandleSource=function(a,c){var e=b.rtmpSourceHandler.canPlayType(a.type);return e?e:b.isStreamingSrc(a.src)?"maybe":""};b.rtmpSourceHandler.handleSource=function(a,c,e){a=b.streamToParts(a.src);c.setRtmpConnection(a.connection);c.setRtmpStream(a.stream)};b.registerSourceHandler(b.rtmpSourceHandler);return b})(c);h.getTech("Flash")?(e.log.warn("Not using videojs-flash as it appears to already be registered"),
e.log.warn("videojs-flash should only be used with video.js@6 and above")):e.registerTech("Flash",c);c.VERSION="2.1.2";return c});
var $jscomp={scope:{},getGlobal:function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global?global:a}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(a){return"jscomp_symbol_"+a+$jscomp.symbolCounter_++};
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};$jscomp.makeIterator=function(a){$jscomp.initSymbolIterator();if(a[$jscomp.global.Symbol.iterator])return a[$jscomp.global.Symbol.iterator]();var b=0;return{next:function(){return b==a.length?{done:!0}:{done:!1,value:a[b++]}}}};
$jscomp.arrayFromIterator=function(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c};$jscomp.arrayFromIterable=function(a){return a instanceof Array?a:$jscomp.arrayFromIterator($jscomp.makeIterator(a))};
$jscomp.inherits=function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a;for(var d in b)if($jscomp.global.Object.defineProperties){var e=$jscomp.global.Object.getOwnPropertyDescriptor(b,d);e&&$jscomp.global.Object.defineProperty(a,d,e)}else a[d]=b[d]};$jscomp.array=$jscomp.array||{};$jscomp.array.done_=function(){return{done:!0,value:void 0}};
$jscomp.array.arrayIterator_=function(a,b){a instanceof String&&(a=String(a));var c=0;$jscomp.initSymbol();$jscomp.initSymbolIterator();var d={},e=(d.next=function(){if(c<a.length){var d=c++;return{value:b(d,a[d]),done:!1}}e.next=$jscomp.array.done_;return $jscomp.array.done_()},d[Symbol.iterator]=function(){return e},d);return e};
$jscomp.array.findInternal_=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var h=a[e];if(b.call(c,h,e,a))return{i:e,v:h}}return{i:-1,v:void 0}};
$jscomp.array.from=function(a,b,c){b=void 0===b?function(a){return a}:b;var d=[];$jscomp.initSymbol();$jscomp.initSymbolIterator();if(a[Symbol.iterator]){$jscomp.initSymbol();$jscomp.initSymbolIterator();a=a[Symbol.iterator]();for(var e;!(e=a.next()).done;)d.push(b.call(c,e.value))}else{e=a.length;for(var h=0;h<e;h++)d.push(b.call(c,a[h]))}return d};$jscomp.array.of=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];return $jscomp.array.from(b)};
$jscomp.array.entries=function(){return $jscomp.array.arrayIterator_(this,function(a,b){return[a,b]})};$jscomp.array.entries$install=function(){Array.prototype.entries||(Array.prototype.entries=$jscomp.array.entries)};$jscomp.array.keys=function(){return $jscomp.array.arrayIterator_(this,function(a){return a})};$jscomp.array.keys$install=function(){Array.prototype.keys||(Array.prototype.keys=$jscomp.array.keys)};$jscomp.array.values=function(){return $jscomp.array.arrayIterator_(this,function(a,b){return b})};
$jscomp.array.values$install=function(){Array.prototype.values||(Array.prototype.values=$jscomp.array.values)};$jscomp.array.copyWithin=function(a,b,c){var d=this.length;a=Number(a);b=Number(b);c=Number(null!=c?c:d);if(a<b)for(c=Math.min(c,d);b<c;)b in this?this[a++]=this[b++]:(delete this[a++],b++);else for(c=Math.min(c,d+b-a),a+=c-b;c>b;)--c in this?this[--a]=this[c]:delete this[a];return this};$jscomp.array.copyWithin$install=function(){Array.prototype.copyWithin||(Array.prototype.copyWithin=$jscomp.array.copyWithin)};
$jscomp.array.fill=function(a,b,c){null!=c&&a.length||(c=this.length||0);c=Number(c);for(b=Number((void 0===b?0:b)||0);b<c;b++)this[b]=a;return this};$jscomp.array.fill$install=function(){Array.prototype.fill||(Array.prototype.fill=$jscomp.array.fill)};$jscomp.array.find=function(a,b){return $jscomp.array.findInternal_(this,a,b).v};$jscomp.array.find$install=function(){Array.prototype.find||(Array.prototype.find=$jscomp.array.find)};
$jscomp.array.findIndex=function(a,b){return $jscomp.array.findInternal_(this,a,b).i};$jscomp.array.findIndex$install=function(){Array.prototype.findIndex||(Array.prototype.findIndex=$jscomp.array.findIndex)};$jscomp.Map=function(a){a=void 0===a?[]:a;this.data_={};this.head_=$jscomp.Map.createHead_();this.size=0;if(a){a=$jscomp.makeIterator(a);for(var b=a.next();!b.done;b=a.next())b=b.value,this.set(b[0],b[1])}};
$jscomp.Map.checkBrowserConformance_=function(){var a=$jscomp.global.Map;if(!a||!a.prototype.entries||!Object.seal)return!1;try{var b=Object.seal({x:4}),c=new a($jscomp.makeIterator([[b,"s"]]));if("s"!=c.get(b)||1!=c.size||c.get({x:4})||c.set({x:4},"t")!=c||2!=c.size)return!1;var d=c.entries(),e=d.next();if(e.done||e.value[0]!=b||"s"!=e.value[1])return!1;e=d.next();return e.done||4!=e.value[0].x||"t"!=e.value[1]||!d.next().done?!1:!0}catch(h){return!1}};
$jscomp.Map.createHead_=function(){var a={};return a.previous=a.next=a.head=a};$jscomp.Map.getId_=function(a){if(!(a instanceof Object))return String(a);$jscomp.Map.key_ in a||a instanceof Object&&Object.isExtensible&&Object.isExtensible(a)&&$jscomp.Map.defineProperty_(a,$jscomp.Map.key_,++$jscomp.Map.index_);return $jscomp.Map.key_ in a?a[$jscomp.Map.key_]:" "+a};
$jscomp.Map.prototype.set=function(a,b){var c=this.maybeGetEntry_(a),d=c.id,e=c.list,c=c.entry;e||(e=this.data_[d]=[]);c?c.value=b:(c={next:this.head_,previous:this.head_.previous,head:this.head_,key:a,value:b},e.push(c),this.head_.previous.next=c,this.head_.previous=c,this.size++);return this};
$jscomp.Map.prototype["delete"]=function(a){var b=this.maybeGetEntry_(a);a=b.id;var c=b.list,d=b.index;return(b=b.entry)&&c?(c.splice(d,1),c.length||delete this.data_[a],b.previous.next=b.next,b.next.previous=b.previous,b.head=null,this.size--,!0):!1};$jscomp.Map.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=$jscomp.Map.createHead_();this.size=0};$jscomp.Map.prototype.has=function(a){return!!this.maybeGetEntry_(a).entry};
$jscomp.Map.prototype.get=function(a){return(a=this.maybeGetEntry_(a).entry)&&a.value};$jscomp.Map.prototype.maybeGetEntry_=function(a){var b=$jscomp.Map.getId_(a),c=this.data_[b];if(c)for(var d=0;d<c.length;d++){var e=c[d];if(a!==a&&e.key!==e.key||a===e.key)return{id:b,list:c,index:d,entry:e}}return{id:b,list:c,index:-1,entry:void 0}};$jscomp.Map.prototype.entries=function(){return this.iter_(function(a){return[a.key,a.value]})};$jscomp.Map.prototype.keys=function(){return this.iter_(function(a){return a.key})};
$jscomp.Map.prototype.values=function(){return this.iter_(function(a){return a.value})};$jscomp.Map.prototype.forEach=function(a,b){for(var c=$jscomp.makeIterator(this.entries()),d=c.next();!d.done;d=c.next())d=d.value,a.call(b,d[1],d[0],this)};
$jscomp.Map.prototype.iter_=function(a){var b=this,c=this.head_;$jscomp.initSymbol();$jscomp.initSymbolIterator();var d={};return d.next=function(){if(c){for(;c.head!=b.head_;)c=c.previous;for(;c.next!=c.head;)return c=c.next,{done:!1,value:a(c)};c=null}return{done:!0,value:void 0}},d[Symbol.iterator]=function(){return this},d};$jscomp.Map.index_=0;$jscomp.Map.defineProperty_=Object.defineProperty?function(a,b,c){Object.defineProperty(a,b,{value:String(c)})}:function(a,b,c){a[b]=String(c)};
$jscomp.Map.Entry_=function(){};$jscomp.Map.ASSUME_NO_NATIVE=!1;$jscomp.Map$install=function(){$jscomp.initSymbol();$jscomp.initSymbolIterator();!$jscomp.Map.ASSUME_NO_NATIVE&&$jscomp.Map.checkBrowserConformance_()?$jscomp.Map=$jscomp.global.Map:($jscomp.initSymbol(),$jscomp.initSymbolIterator(),$jscomp.Map.prototype[Symbol.iterator]=$jscomp.Map.prototype.entries,$jscomp.initSymbol(),$jscomp.Map.key_=Symbol("map-id-key"));$jscomp.Map$install=function(){}};$jscomp.math=$jscomp.math||{};
$jscomp.math.clz32=function(a){a=Number(a)>>>0;if(0===a)return 32;var b=0;0===(a&4294901760)&&(a<<=16,b+=16);0===(a&4278190080)&&(a<<=8,b+=8);0===(a&4026531840)&&(a<<=4,b+=4);0===(a&3221225472)&&(a<<=2,b+=2);0===(a&2147483648)&&b++;return b};$jscomp.math.imul=function(a,b){a=Number(a);b=Number(b);var c=a&65535,d=b&65535;return c*d+((a>>>16&65535)*d+c*(b>>>16&65535)<<16>>>0)|0};$jscomp.math.sign=function(a){a=Number(a);return 0===a||isNaN(a)?a:0<a?1:-1};
$jscomp.math.log10=function(a){return Math.log(a)/Math.LN10};$jscomp.math.log2=function(a){return Math.log(a)/Math.LN2};$jscomp.math.log1p=function(a){a=Number(a);if(.25>a&&-.25<a){for(var b=a,c=1,d=a,e=0,h=1;e!=d;)b*=a,h*=-1,d=(e=d)+h*b/++c;return d}return Math.log(1+a)};$jscomp.math.expm1=function(a){a=Number(a);if(.25>a&&-.25<a){for(var b=a,c=1,d=a,e=0;e!=d;)b*=a/++c,d=(e=d)+b;return d}return Math.exp(a)-1};$jscomp.math.cosh=function(a){a=Number(a);return(Math.exp(a)+Math.exp(-a))/2};
$jscomp.math.sinh=function(a){a=Number(a);return 0===a?a:(Math.exp(a)-Math.exp(-a))/2};$jscomp.math.tanh=function(a){a=Number(a);if(0===a)return a;var b=Math.exp(2*-Math.abs(a)),b=(1-b)/(1+b);return 0>a?-b:b};$jscomp.math.acosh=function(a){a=Number(a);return Math.log(a+Math.sqrt(a*a-1))};$jscomp.math.asinh=function(a){a=Number(a);if(0===a)return a;var b=Math.log(Math.abs(a)+Math.sqrt(a*a+1));return 0>a?-b:b};
$jscomp.math.atanh=function(a){a=Number(a);return($jscomp.math.log1p(a)-$jscomp.math.log1p(-a))/2};
$jscomp.math.hypot=function(a,b,c){for(var d=[],e=2;e<arguments.length;++e)d[e-2]=arguments[e];a=Number(a);b=Number(b);for(var h=Math.max(Math.abs(a),Math.abs(b)),m=$jscomp.makeIterator(d),e=m.next();!e.done;e=m.next())h=Math.max(h,Math.abs(e.value));if(1E100<h||1E-100>h){a/=h;b/=h;m=a*a+b*b;d=$jscomp.makeIterator(d);for(e=d.next();!e.done;e=d.next())e=e.value,e=Number(e)/h,m+=e*e;return Math.sqrt(m)*h}h=a*a+b*b;d=$jscomp.makeIterator(d);for(e=d.next();!e.done;e=d.next())e=e.value,e=Number(e),h+=
e*e;return Math.sqrt(h)};$jscomp.math.trunc=function(a){a=Number(a);if(isNaN(a)||Infinity===a||-Infinity===a||0===a)return a;var b=Math.floor(Math.abs(a));return 0>a?-b:b};$jscomp.math.cbrt=function(a){if(0===a)return a;a=Number(a);var b=Math.pow(Math.abs(a),1/3);return 0>a?-b:b};$jscomp.number=$jscomp.number||{};$jscomp.number.isFinite=function(a){return"number"!==typeof a?!1:!isNaN(a)&&Infinity!==a&&-Infinity!==a};
$jscomp.number.isInteger=function(a){return $jscomp.number.isFinite(a)?a===Math.floor(a):!1};$jscomp.number.isNaN=function(a){return"number"===typeof a&&isNaN(a)};$jscomp.number.isSafeInteger=function(a){return $jscomp.number.isInteger(a)&&Math.abs(a)<=$jscomp.number.MAX_SAFE_INTEGER};$jscomp.number.EPSILON=Math.pow(2,-52);$jscomp.number.MAX_SAFE_INTEGER=9007199254740991;$jscomp.number.MIN_SAFE_INTEGER=-9007199254740991;$jscomp.object=$jscomp.object||{};
$jscomp.object.assign=function(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];c=$jscomp.makeIterator(c);for(d=c.next();!d.done;d=c.next())if(d=d.value)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e]);return a};$jscomp.object.is=function(a,b){return a===b?0!==a||1/a===1/b:a!==a&&b!==b};$jscomp.Set=function(a){a=void 0===a?[]:a;this.map_=new $jscomp.Map;if(a){a=$jscomp.makeIterator(a);for(var b=a.next();!b.done;b=a.next())this.add(b.value)}this.size=this.map_.size};
$jscomp.Set.checkBrowserConformance_=function(){var a=$jscomp.global.Set;if(!a||!a.prototype.entries||!Object.seal)return!1;var b=Object.seal({x:4}),a=new a($jscomp.makeIterator([b]));if(a.has(b)||1!=a.size||a.add(b)!=a||1!=a.size||a.add({x:4})!=a||2!=a.size)return!1;var a=a.entries(),c=a.next();if(c.done||c.value[0]!=b||c.value[1]!=b)return!1;c=a.next();return c.done||c.value[0]==b||4!=c.value[0].x||c.value[1]!=c.value[0]?!1:a.next().done};
$jscomp.Set.prototype.add=function(a){this.map_.set(a,a);this.size=this.map_.size;return this};$jscomp.Set.prototype["delete"]=function(a){a=this.map_["delete"](a);this.size=this.map_.size;return a};$jscomp.Set.prototype.clear=function(){this.map_.clear();this.size=0};$jscomp.Set.prototype.has=function(a){return this.map_.has(a)};$jscomp.Set.prototype.entries=function(){return this.map_.entries()};$jscomp.Set.prototype.values=function(){return this.map_.values()};
$jscomp.Set.prototype.forEach=function(a,b){var c=this;this.map_.forEach(function(d){return a.call(b,d,d,c)})};$jscomp.Set.ASSUME_NO_NATIVE=!1;$jscomp.Set$install=function(){!$jscomp.Set.ASSUME_NO_NATIVE&&$jscomp.Set.checkBrowserConformance_()?$jscomp.Set=$jscomp.global.Set:($jscomp.Map$install(),$jscomp.initSymbol(),$jscomp.initSymbolIterator(),$jscomp.Set.prototype[Symbol.iterator]=$jscomp.Set.prototype.values);$jscomp.Set$install=function(){}};$jscomp.string=$jscomp.string||{};
$jscomp.string.noRegExp_=function(a,b){if(a instanceof RegExp)throw new TypeError("First argument to String.prototype."+b+" must not be a regular expression");};
$jscomp.string.fromCodePoint=function(a){for(var b=[],c=0;c<arguments.length;++c)b[c-0]=arguments[c];for(var c="",b=$jscomp.makeIterator(b),d=b.next();!d.done;d=b.next()){d=d.value;d=+d;if(0>d||1114111<d||d!==Math.floor(d))throw new RangeError("invalid_code_point "+d);65535>=d?c+=String.fromCharCode(d):(d-=65536,c+=String.fromCharCode(d>>>10&1023|55296),c+=String.fromCharCode(d&1023|56320))}return c};
$jscomp.string.repeat=function(a){var b=this.toString();if(0>a||1342177279<a)throw new RangeError("Invalid count value");a|=0;for(var c="";a;)if(a&1&&(c+=b),a>>>=1)b+=b;return c};$jscomp.string.repeat$install=function(){String.prototype.repeat||(String.prototype.repeat=$jscomp.string.repeat)};
$jscomp.string.codePointAt=function(a){var b=this.toString(),c=b.length;a=Number(a)||0;if(0<=a&&a<c){a|=0;var d=b.charCodeAt(a);if(55296>d||56319<d||a+1===c)return d;a=b.charCodeAt(a+1);return 56320>a||57343<a?d:1024*(d-55296)+a+9216}};$jscomp.string.codePointAt$install=function(){String.prototype.codePointAt||(String.prototype.codePointAt=$jscomp.string.codePointAt)};
$jscomp.string.includes=function(a,b){b=void 0===b?0:b;$jscomp.string.noRegExp_(a,"includes");return-1!==this.toString().indexOf(a,b)};$jscomp.string.includes$install=function(){String.prototype.includes||(String.prototype.includes=$jscomp.string.includes)};
$jscomp.string.startsWith=function(a,b){b=void 0===b?0:b;$jscomp.string.noRegExp_(a,"startsWith");var c=this.toString();a+="";for(var d=c.length,e=a.length,h=Math.max(0,Math.min(b|0,c.length)),m=0;m<e&&h<d;)if(c[h++]!=a[m++])return!1;return m>=e};$jscomp.string.startsWith$install=function(){String.prototype.startsWith||(String.prototype.startsWith=$jscomp.string.startsWith)};
$jscomp.string.endsWith=function(a,b){$jscomp.string.noRegExp_(a,"endsWith");var c=this.toString();a+="";void 0===b&&(b=c.length);for(var d=Math.max(0,Math.min(b|0,c.length)),e=a.length;0<e&&0<d;)if(c[--d]!=a[--e])return!1;return 0>=e};$jscomp.string.endsWith$install=function(){String.prototype.endsWith||(String.prototype.endsWith=$jscomp.string.endsWith)};
(function(a,b){"object"===typeof exports&&"undefined"!==typeof module?module.exports=b(require("video.js")):"function"===typeof define&&define.amd?define(["video.js"],b):a.videojsContribAds=b(a.videojs)})(this,function(a){function b(a){if("playing"===a.type)this.ads.isInAdMode()&&(this.ads.isContentResuming()?this.ads._contentEnding&&q(this,"content",a):this.ads._cancelledPlay?m(this,a):q(this,"ad",a));else if("ended"===a.type)this.ads.isInAdMode()?this.ads.isContentResuming()||q(this,"ad",a):this.ads._contentHasEnded||
q(this,"content",a);else if("loadstart"===a.type||"loadeddata"===a.type||"loadedmetadata"===a.type)"loadstart"===a.type&&!this.ads._hasThereBeenALoadStartDuringPlayerLife||"loadeddata"===a.type&&!this.ads._hasThereBeenALoadedData||"loadedmetadata"===a.type&&!this.ads._hasThereBeenALoadedMetaData||(this.ads.inAdBreak()?q(this,"ad",a):this.currentSrc()===this.ads.contentSrc&&q(this,"content",a));else if("play"===a.type){var f=this.ads._cancelledPlay&&!this.ads.isInAdMode();this.ads.inAdBreak()?q(this,
"ad",a):(this.ads.isContentResuming()||f)&&q(this,"content",a)}else this.ads.isInAdMode()&&(this.ads.isContentResuming()?q(this,"content",a):q(this,"ad",a))}function c(a){a.ads.contentSrc=a.currentSrc();a.ads._seenInitialLoadstart=!1;a.on("loadstart",function(){if(!a.ads.inAdBreak()){var f=a.currentSrc();f!==a.ads.contentSrc&&(a.ads._seenInitialLoadstart&&a.trigger({type:"contentchanged"}),a.trigger({type:"contentupdate",oldValue:a.ads.contentSrc,newValue:f}),a.ads.contentSrc=f);a.ads._seenInitialLoadstart=
!0}})}function d(l,f,g){void 0===f&&(f=!1);var b={};void 0!==g&&(b=g);b["{player.id}"]=this.options_["data-player"];b["{mediainfo.id}"]=this.mediainfo?this.mediainfo.id:"";b["{mediainfo.name}"]=this.mediainfo?this.mediainfo.name:"";b["{mediainfo.description}"]=this.mediainfo?this.mediainfo.description:"";b["{mediainfo.tags}"]=this.mediainfo?this.mediainfo.tags:"";b["{mediainfo.reference_id}"]=this.mediainfo?this.mediainfo.reference_id:"";b["{mediainfo.duration}"]=this.mediainfo?this.mediainfo.duration:
"";b["{mediainfo.ad_keys}"]=this.mediainfo?this.mediainfo.ad_keys:"";b["{player.duration}"]=this.duration();b["{timestamp}"]=(new Date).getTime();b["{document.referrer}"]=G.referrer;b["{window.location.href}"]=z.location.href;b["{random}"]=Math.floor(1E12*Math.random());A(this.mediainfo,b,"custom_fields");A(this.mediainfo,b,"customFields");for(var c in b)l=l.split(c).join(B(b[c],f));return l=l.replace(/{pageVariable\.([^}]+)}/g,function(b,l){for(var g=void 0,c=z,d=l.split("."),e=0;e<d.length;e++)e===
d.length-1?g=c[d[e]]:c=c[d[e]];c="undefined"===typeof g?"undefined":I(g);return null===g?"null":void 0===g?(a.log.warn('Page variable "'+l+'" not found'),""):"string"!==c&&"number"!==c&&"boolean"!==c?(a.log.warn('Page variable "'+l+'" is not a supported type'),""):B(String(g),f)})}function e(a){a.ads.cancelPlayTimeout||(a.ads.cancelPlayTimeout=a.setTimeout(function(){a.ads.cancelPlayTimeout=null;a.ads.isInAdMode()&&(a.paused()||a.pause(),a.ads._cancelledPlay=!0)},1))}function h(b,f){if(!0===b.ads.disableNextSnapshotRestore)b.ads.disableNextSnapshotRestore=
!1;else{var g=b.$(".vjs-tech"),c=20,d=f.suppressedTracks,e=void 0,h=function(){for(var a=0;a<d.length;a++)e=d[a],e.track.mode=e.mode},D=function(){var g=void 0;a.browser.IS_IOS&&b.ads.isLive(b)?0>f.currentTime&&(g=0<b.seekable().length?b.seekable().end(0)+f.currentTime:b.currentTime(),b.currentTime(g)):f.ended?b.currentTime(b.duration()):b.currentTime(f.currentTime);f.ended||b.play();b.ads.shouldRemoveAutoplay_&&(b.autoplay(!1),b.ads.shouldRemoveAutoplay_=!1)},k=function E(){b.off("contentcanplay",
E);b.ads.tryToResumeTimeout_&&(b.clearTimeout(b.ads.tryToResumeTimeout_),b.ads.tryToResumeTimeout_=null);g=b.el().querySelector(".vjs-tech");if(1<g.readyState||void 0===g.seekable||0<g.seekable.length)return D();if(c--)b.setTimeout(E,50);else try{D()}catch(f){a.log.warn("Failed to resume the content after an advertisement",f)}};f.nativePoster&&(g.poster=f.nativePoster);"style"in f&&g.setAttribute("style",f.style||"");b.ads.videoElementRecycled()?(b.one("contentloadedmetadata",h),a.browser.IS_IOS&&
!b.autoplay()&&(b.autoplay(!0),b.ads.shouldRemoveAutoplay_=!0),b.src({src:f.currentSrc,type:f.type}),b.one("contentcanplay",k),b.ads.tryToResumeTimeout_=b.setTimeout(k,2E3)):(h(),b.ended()||b.play())}}a=a&&a.hasOwnProperty("default")?a["default"]:a;var m=function(a,b){b.isImmediatePropagationStopped=function(){return!0};b.cancelBubble=!0;b.isPropagationStopped=function(){return!0}},q=function(a,b,g){m(a,g);a.trigger({type:b+g.type,originalEvent:g})},k="undefined"!==typeof window?window:"undefined"!==
typeof global?global:"undefined"!==typeof self?self:{},z="undefined"!==typeof window?window:"undefined"!==typeof k?k:"undefined"!==typeof self?self:{},n={},v=(Object.freeze||Object)({"default":n}),n=v&&n||v,k="undefined"!==typeof k?k:"undefined"!==typeof window?window:{};"undefined"!==typeof document?v=document:(v=k["__GLOBAL_DOCUMENT_CACHE@4"])||(v=k["__GLOBAL_DOCUMENT_CACHE@4"]=n);var G=v;$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbolIterator();var I="function"===typeof Symbol&&"symbol"===
typeof Symbol.iterator?function(a){return typeof a}:function(a){$jscomp.initSymbol();$jscomp.initSymbol();$jscomp.initSymbol();return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};(function(){function a(b){this.value=b}function b(f){function c(b,e){try{var h=f[b](e),C=h.value;C instanceof a?Promise.resolve(C.value).then(function(a){c("next",a)},function(a){c("throw",a)}):d(h.done?"return":"normal",h.value)}catch(H){d("throw",H)}}function d(a,b){switch(a){case "return":e.resolve({value:b,
done:!0});break;case "throw":e.reject(b);break;default:e.resolve({value:b,done:!1})}(e=e.next)?c(e.key,e.arg):h=null}var e,h;this._invoke=function(a,b){return new Promise(function(f,g){var l={key:a,arg:b,resolve:f,reject:g,next:null};h?h=h.next=l:(e=h=l,c(a,b))})};"function"!==typeof f["return"]&&(this["return"]=void 0)}$jscomp.initSymbol();$jscomp.initSymbol();"function"===typeof Symbol&&Symbol.asyncIterator&&($jscomp.initSymbol(),b.prototype[Symbol.asyncIterator]=function(){return this});b.prototype.next=
function(a){return this._invoke("next",a)};b.prototype["throw"]=function(a){return this._invoke("throw",a)};b.prototype["return"]=function(a){return this._invoke("return",a)};return{wrap:function(a){return function(){return new b(a.apply(this,arguments))}},await:function(b){return new a(b)}}})();var r=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");},t=function(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+
typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)},u=function(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!==typeof b&&"function"!==typeof b?a:b},B=function(a,b){return b?encodeURIComponent(a):a},A=function(a,b,g){if(a&&a[g]){a=a[g];for(var c=Object.keys(a),d=0;d<c.length;d++)b["{mediainfo."+g+
"."+c[d]+"}"]=a[c[d]]}},J={processMetadataTracks:function(a,b){for(var g=a.textTracks(),c=function(g){"metadata"===g.kind&&(a.ads.cueTextTracks.setMetadataTrackMode(g),b(a,g))},d=0;d<g.length;d++)c(g[d]);g.addEventListener("addtrack",function(a){c(a.track)})},setMetadataTrackMode:function(a){},getSupportedAdCue:function(a,b){return b},isSupportedAdCue:function(a,b){return!0},getCueId:function(a,b){return b.id},processAdTrack:function(b,f,g,c){b.ads.includedCues={};for(var d=0;d<f.length;d++){var e=
f[d],h=this.getSupportedAdCue(b,e);if(!this.isSupportedAdCue(b,e)){a.log.warn("Skipping as this is not a supported ad cue.",e);break}var k=this.getCueId(b,e),e=e.startTime;if(void 0!==k&&b.ads.includedCues[k]){a.log("Skipping ad already seen with ID "+k);break}c&&c(b,h,k,e);g(b,h,k,e);void 0!==k&&""!==k&&(b.ads.includedCues[k]=!0)}}},n=function(){function b(a){r(this,b);this.player=a}b.prototype.transitionTo=function(a){var b=this.player;this.cleanup();var c=new a(b);b.ads._state=c;b.ads.debug(this.constructor.name+
" -> "+c.constructor.name);for(var d=arguments.length,e=Array(1<d?d-1:0),l=1;l<d;l++)e[l-1]=arguments[l];c.init.apply(c,[b].concat(e))};b.prototype.init=function(){};b.prototype.cleanup=function(){};b.prototype.onPlay=function(){};b.prototype.onPlaying=function(){};b.prototype.onEnded=function(){};b.prototype.onAdsReady=function(){a.log.warn("Unexpected adsready event")};b.prototype.onAdsError=function(){};b.prototype.onAdsCanceled=function(){};b.prototype.onAdTimeout=function(){};b.prototype.onAdStarted=
function(){};b.prototype.onContentChanged=function(){};b.prototype.onContentResumed=function(){};b.prototype.onContentEnded=function(){a.log.warn("Unexpected contentended event")};b.prototype.onNoPreroll=function(){};b.prototype.onNoPostroll=function(){};b.prototype.startLinearAdMode=function(){a.log.warn("Unexpected startLinearAdMode invocation (State via "+this.constructor.name+")")};b.prototype.endLinearAdMode=function(){a.log.warn("Unexpected endLinearAdMode invocation (State via "+this.constructor.name+
")")};b.prototype.skipLinearAdMode=function(){a.log.warn("Unexpected skipLinearAdMode invocation (State via "+this.constructor.name+")")};b.prototype.isAdState=function(){throw Error("isAdState unimplemented for "+this.constructor.name);};b.prototype.isContentResuming=function(){return!1};b.prototype.inAdBreak=function(){return!1};b.prototype.handleEvent=function(a){var b=this.player;if("play"===a)this.onPlay(b);else if("adsready"===a)this.onAdsReady(b);else if("adserror"===a)this.onAdsError(b);else if("adscanceled"===
a)this.onAdsCanceled(b);else if("adtimeout"===a)this.onAdTimeout(b);else if("ads-ad-started"===a)this.onAdStarted(b);else if("contentchanged"===a)this.onContentChanged(b);else if("contentresumed"===a)this.onContentResumed(b);else if("contentended"===a)this.onContentEnded(b);else if("playing"===a)this.onPlaying(b);else if("ended"===a)this.onEnded(b);else if("nopreroll"===a)this.onNoPreroll(b);else if("nopostroll"===a)this.onNoPostroll(b)};return b}(),k=function(a){function b(g){r(this,b);g=u(this,
a.call(this,g));g.contentResuming=!1;return g}t(b,a);b.prototype.isAdState=function(){return!0};b.prototype.onPlaying=function(){this.contentResuming&&this.transitionTo(p)};b.prototype.onContentResumed=function(){this.contentResuming&&this.transitionTo(p)};b.prototype.isContentResuming=function(){return this.contentResuming};b.prototype.inAdBreak=function(){return!0===this.player.ads._inLinearAdMode};return b}(n),n=function(a){function b(){r(this,b);return u(this,a.apply(this,arguments))}t(b,a);b.prototype.isAdState=
function(){return!1};b.prototype.onContentChanged=function(a){a.ads.debug("Received contentchanged event (ContentState)");a.paused()?this.transitionTo(x):(this.transitionTo(y,!1),a.pause(),a.ads._pausedOnContentupdate=!0)};return b}(n),w={start:function(b){b.ads.debug("Starting ad break");b.ads._inLinearAdMode=!0;b.trigger("adstart");if(!b.ads.shouldPlayContentBehindAd(b)){var c=b.ads,g=void 0,g=a.browser.IS_IOS&&b.ads.isLive(b)?0<b.seekable().length?b.currentTime()-b.seekable().end(0):b.currentTime():
b.currentTime(),d=b.$(".vjs-tech"),e=b.textTracks?b.textTracks():[],h=[],g={ended:b.ended(),currentSrc:b.currentSrc(),src:b.tech_.src(),currentTime:g,type:b.currentType()};d&&(g.nativePoster=d.poster,g.style=d.getAttribute("style"));for(d=0;d<e.length;d++){var k=e[d];h.push({track:k,mode:k.mode});k.mode="disabled"}g.suppressedTracks=h;c.snapshot=g}b.ads.shouldPlayContentBehindAd(b)&&(b.ads.preAdVolume_=b.volume(),b.volume(0));b.addClass("vjs-ad-playing");b.hasClass("vjs-live")&&b.removeClass("vjs-live");
b.ads.removeNativePoster()},end:function(a){a.ads.debug("Ending ad break");a.ads.adType=null;a.ads._inLinearAdMode=!1;a.trigger("adend");a.removeClass("vjs-ad-playing");a.ads.isLive(a)&&a.addClass("vjs-live");a.ads.shouldPlayContentBehindAd(a)||h(a,a.ads.snapshot);a.ads.shouldPlayContentBehindAd(a)&&a.volume(a.ads.preAdVolume_)}},y=function(b){function c(){r(this,c);return u(this,b.apply(this,arguments))}t(c,b);c.prototype.init=function(a,b){a.addClass("vjs-ad-loading");var c=a.ads.settings.timeout;
"number"===typeof a.ads.settings.prerollTimeout&&(c=a.ads.settings.prerollTimeout);this._timeout=a.setTimeout(function(){a.trigger("adtimeout")},c);b?this.handleAdsReady():this.adsReady=!1};c.prototype.onAdsReady=function(b){b.ads.inAdBreak()||b.ads.isContentResuming()?a.log.warn("Unexpected adsready event (Preroll)"):(b.ads.debug("Received adsready event (Preroll)"),this.handleAdsReady())};c.prototype.handleAdsReady=function(){this.adsReady=!0;this.player.ads.nopreroll_?this.noPreroll():this.readyForPreroll()};
c.prototype.afterLoadStart=function(a){var b=this.player;b.ads._hasThereBeenALoadStartDuringPlayerLife?a():(b.ads.debug("Waiting for loadstart..."),b.one("loadstart",function(){b.ads.debug("Received loadstart event");a()}))};c.prototype.noPreroll=function(){var a=this;this.afterLoadStart(function(){a.player.ads.debug("Skipping prerolls due to nopreroll event (Preroll)");a.transitionTo(p)})};c.prototype.readyForPreroll=function(){var a=this.player;this.afterLoadStart(function(){a.ads.debug("Triggered readyforpreroll event (Preroll)");
a.trigger("readyforpreroll")})};c.prototype.onPlay=function(a){a.ads.debug("Received play event (Preroll)");this.inAdBreak()||this.isContentResuming()||e(this.player)};c.prototype.onAdsCanceled=function(a){var b=this;a.ads.debug("adscanceled (Preroll)");this.afterLoadStart(function(){b.transitionTo(p)})};c.prototype.onAdsError=function(b){var c=this;a.log("adserror (Preroll)");this.inAdBreak()&&b.ads.endLinearAdMode();this.afterLoadStart(function(){c.transitionTo(p)})};c.prototype.startLinearAdMode=
function(){var b=this.player;!this.adsReady||b.ads.inAdBreak()||this.isContentResuming()?a.log.warn("Unexpected startLinearAdMode invocation (Preroll)"):(b.clearTimeout(this._timeout),b.ads.adType="preroll",w.start(b))};c.prototype.onAdStarted=function(a){a.removeClass("vjs-ad-loading")};c.prototype.endLinearAdMode=function(){var a=this.player;this.inAdBreak()&&(a.removeClass("vjs-ad-loading"),w.end(a),this.contentResuming=!0)};c.prototype.skipLinearAdMode=function(){var b=this,c=this.player;c.ads.inAdBreak()||
this.isContentResuming()?a.log.warn("Unexpected skipLinearAdMode invocation"):this.afterLoadStart(function(){c.trigger("adskip");c.ads.debug("skipLinearAdMode (Preroll)");b.transitionTo(p)})};c.prototype.onAdTimeout=function(a){var b=this;this.afterLoadStart(function(){a.ads.debug("adtimeout (Preroll)");b.transitionTo(p)})};c.prototype.onNoPreroll=function(b){b.ads.inAdBreak()||this.isContentResuming()?a.log.warn("Unexpected nopreroll event (Preroll)"):this.noPreroll()};c.prototype.cleanup=function(){var b=
this.player;b.ads._hasThereBeenALoadStartDuringPlayerLife||a.log.warn("Leaving Preroll state before loadstart event can cause issues.");b.removeClass("vjs-ad-loading");b.clearTimeout(this._timeout)};return c}(k),K=function(a){function b(){r(this,b);return u(this,a.apply(this,arguments))}t(b,a);b.prototype.init=function(a){a.ads.adType="midroll";w.start(a)};b.prototype.endLinearAdMode=function(){var a=this.player;this.inAdBreak()&&(this.contentResuming=!0,w.end(a))};b.prototype.onAdsError=function(a){this.inAdBreak()&&
a.ads.endLinearAdMode()};return b}(k),L=function(b){function c(){r(this,c);return u(this,b.apply(this,arguments))}t(c,b);c.prototype.init=function(a){var b=this;a.ads._contentEnding=!0;if(a.ads.nopostroll_)a.setTimeout(function(){a.ads.debug("Triggered ended event (no postroll)");b.contentResuming=!0;a.trigger("ended")},1);else{a.addClass("vjs-ad-loading");var c=a.ads.settings.timeout;"number"===typeof a.ads.settings.postrollTimeout&&(c=a.ads.settings.postrollTimeout);this._postrollTimeout=a.setTimeout(function(){a.trigger("adtimeout")},
c)}};c.prototype.startLinearAdMode=function(){var b=this.player;b.ads.inAdBreak()||this.isContentResuming()?a.log.warn("Unexpected startLinearAdMode invocation (Postroll)"):(b.ads.adType="postroll",b.clearTimeout(this._postrollTimeout),w.start(b))};c.prototype.onAdStarted=function(a){a.removeClass("vjs-ad-loading")};c.prototype.endLinearAdMode=function(){var a=this.player;this.inAdBreak()&&(a.removeClass("vjs-ad-loading"),w.end(a),this.contentResuming=!0,a.ads.debug("Triggered ended event (endLinearAdMode)"),
a.trigger("ended"))};c.prototype.skipLinearAdMode=function(){var b=this.player;b.ads.inAdBreak()||this.isContentResuming()?a.log.warn("Unexpected skipLinearAdMode invocation"):(b.ads.debug("Postroll abort (skipLinearAdMode)"),b.trigger("adskip"),this.abort())};c.prototype.onAdTimeout=function(a){a.ads.debug("Postroll abort (adtimeout)");this.abort()};c.prototype.onAdsError=function(a){a.ads.debug("Postroll abort (adserror)");a.ads.inAdBreak()&&a.ads.endLinearAdMode();this.abort()};c.prototype.onEnded=
function(){this.isContentResuming()?this.transitionTo(F):a.log.warn("Unexpected ended event during postroll")};c.prototype.onContentChanged=function(a){this.isContentResuming()?this.transitionTo(x):this.inAdBreak()||this.transitionTo(y)};c.prototype.onNoPostroll=function(b){this.isContentResuming()||this.inAdBreak()?a.log.warn("Unexpected nopostroll event (Postroll)"):this.transitionTo(F)};c.prototype.abort=function(){var a=this.player;this.contentResuming=!0;a.removeClass("vjs-ad-loading");a.ads.debug("Triggered ended event (postroll abort)");
a.trigger("ended")};c.prototype.cleanup=function(){var a=this.player;a.clearTimeout(this._postrollTimeout);a.ads._contentEnding=!1};return c}(k),x=function(a){function b(){r(this,b);return u(this,a.apply(this,arguments))}t(b,a);b.prototype.init=function(a){this.adsReady=!1};b.prototype.onAdsReady=function(a){a.ads.debug("Received adsready event (BeforePreroll)");this.adsReady=!0};b.prototype.onPlay=function(a){a.ads.debug("Received play event (BeforePreroll)");e(a);this.transitionTo(y,this.adsReady)};
b.prototype.onAdsCanceled=function(a){a.ads.debug("adscanceled (BeforePreroll)");this.transitionTo(p)};b.prototype.onAdsError=function(){this.transitionTo(p)};b.prototype.onNoPreroll=function(){this.player.ads.debug("Skipping prerolls due to nopreroll event (BeforePreroll)");this.transitionTo(p)};b.prototype.skipLinearAdMode=function(){this.player.trigger("adskip");this.transitionTo(p)};b.prototype.onContentChanged=function(){};return b}(n),p=function(a){function b(){r(this,b);return u(this,a.apply(this,
arguments))}t(b,a);b.prototype.init=function(a){a.paused()&&(a.ads._cancelledPlay||a.ads._pausedOnContentupdate)&&a.play()};b.prototype.onAdsReady=function(a){a.ads.debug("Received adsready event (ContentPlayback)");a.ads.nopreroll_||(a.ads.debug("Triggered readyforpreroll event (ContentPlayback)"),a.trigger("readyforpreroll"))};b.prototype.onContentEnded=function(a){a.ads.debug("Received contentended event");this.transitionTo(L)};b.prototype.startLinearAdMode=function(){this.transitionTo(K)};return b}(n),
F=function(b){function c(){r(this,c);return u(this,b.apply(this,arguments))}t(c,b);c.prototype.init=function(a){a.ads._contentHasEnded=!0};c.prototype.startLinearAdMode=function(){a.log.warn("Unexpected startLinearAdMode invocation (AdsDone)")};return c}(n),M=a.getTech("Html5").Events,N={timeout:5E3,prerollTimeout:void 0,postrollTimeout:void 0,debug:!1,stitchedAds:!1},k=function(e){var f=this;e=a.mergeOptions(N,e);var g=M.concat(["firstplay","loadedalldata","playing"]);f.on(g,b);f.setTimeout(function(){f.ads._hasThereBeenALoadStartDuringPlayerLife||
""===f.src()||a.log.error("videojs-contrib-ads has not seen a loadstart event 5 seconds after being initialized, but a source is present. This indicates that videojs-contrib-ads was initialized too late. It must be initialized immediately after video.js in the same tick. As a result, some ads will not play and some media events will be incorrect. For more information, see https://github.com/videojs/videojs-contrib-ads#important-note-about-initialization")},5E3);f.on("ended",function(){f.hasClass("vjs-has-started")||
f.addClass("vjs-has-started")});f.on(["addurationchange","adcanplay"],function(){f.ads.snapshot&&f.currentSrc()===f.ads.snapshot.currentSrc||f.ads.inAdBreak()&&f.play()});f.on("nopreroll",function(){f.ads.debug("Received nopreroll event");f.ads.nopreroll_=!0});f.on("nopostroll",function(){f.ads.debug("Received nopostroll event");f.ads.nopostroll_=!0});f.on("playing",function(){f.ads._cancelledPlay=!1;f.ads._pausedOnContentupdate=!1});f.one("loadstart",function(){f.ads._hasThereBeenALoadStartDuringPlayerLife=
!0});f.on("loadeddata",function(){f.ads._hasThereBeenALoadedData=!0});f.on("loadedmetadata",function(){f.ads._hasThereBeenALoadedMetaData=!0});f.ads={settings:e,disableNextSnapshotRestore:!1,_contentEnding:!1,_contentHasEnded:!1,_hasThereBeenALoadStartDuringPlayerLife:!1,_hasThereBeenALoadedData:!1,_hasThereBeenALoadedMetaData:!1,_inLinearAdMode:!1,adType:null,VERSION:"__VERSION__",reset:function(){f.ads.disableNextSnapshotRestore=!1;f.ads._contentEnding=!1;f.ads._contentHasEnded=!1;f.ads.snapshot=
null;f.ads.adType=null;f.ads._hasThereBeenALoadedData=!1;f.ads._hasThereBeenALoadedMetaData=!1;f.ads._cancelledPlay=!1;f.ads.nopreroll_=!1;f.ads.nopostroll_=!1},startLinearAdMode:function(){f.ads._state.startLinearAdMode()},endLinearAdMode:function(){f.ads._state.endLinearAdMode()},skipLinearAdMode:function(){f.ads._state.skipLinearAdMode()},stitchedAds:function(a){void 0!==a&&(this._stitchedAds=!!a);return this._stitchedAds},videoElementRecycled:function(){if(f.ads.shouldPlayContentBehindAd(f))return!1;
if(!this.snapshot)throw Error("You cannot use videoElementRecycled while there is no snapshot.");var a=f.tech_.src()!==this.snapshot.src,b=f.currentSrc()!==this.snapshot.currentSrc;return a||b},isLive:function(b){return Infinity===b.duration()||"8"===a.browser.IOS_VERSION&&0===b.duration()?!0:!1},shouldPlayContentBehindAd:function(b){return!a.browser.IS_IOS&&!a.browser.IS_ANDROID&&Infinity===b.duration()},isInAdMode:function(){return this._state.isAdState()},isContentResuming:function(){return this._state.isContentResuming()},
isAdPlaying:function(){return this._state.inAdBreak()},inAdBreak:function(){return this._state.inAdBreak()},removeNativePoster:function(){var a=f.$(".vjs-tech");a&&a.removeAttribute("poster")},debug:function(){if(this.settings.debug){for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];1===c.length&&"string"===typeof c[0]?a.log("ADS: "+c[0]):a.log.apply(a,["ADS:"].concat(c))}}};f.ads._state=new x(f);f.ads.stitchedAds(e.stitchedAds);f.ads.cueTextTracks=J;f.ads.adMacroReplacement=d.bind(f);
c(f);f.on("contentchanged",f.ads.reset);var h=function(){var b=f.textTracks();if(!f.ads.shouldPlayContentBehindAd(f)&&f.ads.inAdBreak()&&f.tech_.featuresNativeTextTracks&&a.browser.IS_IOS&&!Array.isArray(f.textTracks()))for(var c=0;c<b.length;c++){var d=b[c];"showing"===d.mode&&(d.mode="disabled")}};f.ready(function(){f.textTracks().addEventListener("change",h)});f.on("play playing ended adsready adscanceled adskip adserror adtimeout ads-ad-started contentchanged contentresumed contentended nopreroll nopostroll".split(" "),
function(a){f.ads._state.handleEvent(a.type)});f.on("dispose",function(){f.textTracks().removeEventListener("change",h)})};(a.registerPlugin||a.plugin)("ads",k);return k});
/*
 2018 Brightcove, Inc
 @license Apache-2.0
*/
var $jscomp={scope:{},getGlobal:function(m){return"undefined"!=typeof window&&window===m?m:"undefined"!=typeof global?global:m}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(m){return"jscomp_symbol_"+m+$jscomp.symbolCounter_++};
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};$jscomp.makeIterator=function(m){$jscomp.initSymbolIterator();if(m[$jscomp.global.Symbol.iterator])return m[$jscomp.global.Symbol.iterator]();var d=0;return{next:function(){return d==m.length?{done:!0}:{done:!1,value:m[d++]}}}};
$jscomp.arrayFromIterator=function(m){for(var d,k=[];!(d=m.next()).done;)k.push(d.value);return k};$jscomp.arrayFromIterable=function(m){return m instanceof Array?m:$jscomp.arrayFromIterator($jscomp.makeIterator(m))};
$jscomp.inherits=function(m,d){function k(){}k.prototype=d.prototype;m.prototype=new k;m.prototype.constructor=m;for(var g in d)if($jscomp.global.Object.defineProperties){var b=$jscomp.global.Object.getOwnPropertyDescriptor(d,g);b&&$jscomp.global.Object.defineProperty(m,g,b)}else m[g]=d[g]};$jscomp.array=$jscomp.array||{};$jscomp.array.done_=function(){return{done:!0,value:void 0}};
$jscomp.array.arrayIterator_=function(m,d){m instanceof String&&(m=String(m));var k=0;$jscomp.initSymbol();$jscomp.initSymbolIterator();var g={},b=(g.next=function(){if(k<m.length){var h=k++;return{value:d(h,m[h]),done:!1}}b.next=$jscomp.array.done_;return $jscomp.array.done_()},g[Symbol.iterator]=function(){return b},g);return b};
$jscomp.array.findInternal_=function(m,d,k){m instanceof String&&(m=String(m));for(var g=m.length,b=0;b<g;b++){var h=m[b];if(d.call(k,h,b,m))return{i:b,v:h}}return{i:-1,v:void 0}};
$jscomp.array.from=function(m,d,k){d=void 0===d?function(b){return b}:d;var g=[];$jscomp.initSymbol();$jscomp.initSymbolIterator();if(m[Symbol.iterator]){$jscomp.initSymbol();$jscomp.initSymbolIterator();m=m[Symbol.iterator]();for(var b;!(b=m.next()).done;)g.push(d.call(k,b.value))}else{b=m.length;for(var h=0;h<b;h++)g.push(d.call(k,m[h]))}return g};$jscomp.array.of=function(m){for(var d=[],k=0;k<arguments.length;++k)d[k-0]=arguments[k];return $jscomp.array.from(d)};
$jscomp.array.entries=function(){return $jscomp.array.arrayIterator_(this,function(m,d){return[m,d]})};$jscomp.array.entries$install=function(){Array.prototype.entries||(Array.prototype.entries=$jscomp.array.entries)};$jscomp.array.keys=function(){return $jscomp.array.arrayIterator_(this,function(m){return m})};$jscomp.array.keys$install=function(){Array.prototype.keys||(Array.prototype.keys=$jscomp.array.keys)};$jscomp.array.values=function(){return $jscomp.array.arrayIterator_(this,function(m,d){return d})};
$jscomp.array.values$install=function(){Array.prototype.values||(Array.prototype.values=$jscomp.array.values)};$jscomp.array.copyWithin=function(m,d,k){var g=this.length;m=Number(m);d=Number(d);k=Number(null!=k?k:g);if(m<d)for(k=Math.min(k,g);d<k;)d in this?this[m++]=this[d++]:(delete this[m++],d++);else for(k=Math.min(k,g+d-m),m+=k-d;k>d;)--k in this?this[--m]=this[k]:delete this[m];return this};$jscomp.array.copyWithin$install=function(){Array.prototype.copyWithin||(Array.prototype.copyWithin=$jscomp.array.copyWithin)};
$jscomp.array.fill=function(m,d,k){null!=k&&m.length||(k=this.length||0);k=Number(k);for(d=Number((void 0===d?0:d)||0);d<k;d++)this[d]=m;return this};$jscomp.array.fill$install=function(){Array.prototype.fill||(Array.prototype.fill=$jscomp.array.fill)};$jscomp.array.find=function(m,d){return $jscomp.array.findInternal_(this,m,d).v};$jscomp.array.find$install=function(){Array.prototype.find||(Array.prototype.find=$jscomp.array.find)};
$jscomp.array.findIndex=function(m,d){return $jscomp.array.findInternal_(this,m,d).i};$jscomp.array.findIndex$install=function(){Array.prototype.findIndex||(Array.prototype.findIndex=$jscomp.array.findIndex)};$jscomp.Map=function(m){m=void 0===m?[]:m;this.data_={};this.head_=$jscomp.Map.createHead_();this.size=0;if(m){m=$jscomp.makeIterator(m);for(var d=m.next();!d.done;d=m.next())d=d.value,this.set(d[0],d[1])}};
$jscomp.Map.checkBrowserConformance_=function(){var m=$jscomp.global.Map;if(!m||!m.prototype.entries||!Object.seal)return!1;try{var d=Object.seal({x:4}),k=new m($jscomp.makeIterator([[d,"s"]]));if("s"!=k.get(d)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var g=k.entries(),b=g.next();if(b.done||b.value[0]!=d||"s"!=b.value[1])return!1;b=g.next();return b.done||4!=b.value[0].x||"t"!=b.value[1]||!g.next().done?!1:!0}catch(h){return!1}};
$jscomp.Map.createHead_=function(){var m={};return m.previous=m.next=m.head=m};$jscomp.Map.getId_=function(m){if(!(m instanceof Object))return String(m);$jscomp.Map.key_ in m||m instanceof Object&&Object.isExtensible&&Object.isExtensible(m)&&$jscomp.Map.defineProperty_(m,$jscomp.Map.key_,++$jscomp.Map.index_);return $jscomp.Map.key_ in m?m[$jscomp.Map.key_]:" "+m};
$jscomp.Map.prototype.set=function(m,d){var k=this.maybeGetEntry_(m),g=k.id,b=k.list,k=k.entry;b||(b=this.data_[g]=[]);k?k.value=d:(k={next:this.head_,previous:this.head_.previous,head:this.head_,key:m,value:d},b.push(k),this.head_.previous.next=k,this.head_.previous=k,this.size++);return this};
$jscomp.Map.prototype["delete"]=function(m){var d=this.maybeGetEntry_(m);m=d.id;var k=d.list,g=d.index;return(d=d.entry)&&k?(k.splice(g,1),k.length||delete this.data_[m],d.previous.next=d.next,d.next.previous=d.previous,d.head=null,this.size--,!0):!1};$jscomp.Map.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=$jscomp.Map.createHead_();this.size=0};$jscomp.Map.prototype.has=function(m){return!!this.maybeGetEntry_(m).entry};
$jscomp.Map.prototype.get=function(m){return(m=this.maybeGetEntry_(m).entry)&&m.value};$jscomp.Map.prototype.maybeGetEntry_=function(m){var d=$jscomp.Map.getId_(m),k=this.data_[d];if(k)for(var g=0;g<k.length;g++){var b=k[g];if(m!==m&&b.key!==b.key||m===b.key)return{id:d,list:k,index:g,entry:b}}return{id:d,list:k,index:-1,entry:void 0}};$jscomp.Map.prototype.entries=function(){return this.iter_(function(m){return[m.key,m.value]})};$jscomp.Map.prototype.keys=function(){return this.iter_(function(m){return m.key})};
$jscomp.Map.prototype.values=function(){return this.iter_(function(m){return m.value})};$jscomp.Map.prototype.forEach=function(m,d){for(var k=$jscomp.makeIterator(this.entries()),g=k.next();!g.done;g=k.next())g=g.value,m.call(d,g[1],g[0],this)};
$jscomp.Map.prototype.iter_=function(m){var d=this,k=this.head_;$jscomp.initSymbol();$jscomp.initSymbolIterator();var g={};return g.next=function(){if(k){for(;k.head!=d.head_;)k=k.previous;for(;k.next!=k.head;)return k=k.next,{done:!1,value:m(k)};k=null}return{done:!0,value:void 0}},g[Symbol.iterator]=function(){return this},g};$jscomp.Map.index_=0;$jscomp.Map.defineProperty_=Object.defineProperty?function(m,d,k){Object.defineProperty(m,d,{value:String(k)})}:function(m,d,k){m[d]=String(k)};
$jscomp.Map.Entry_=function(){};$jscomp.Map.ASSUME_NO_NATIVE=!1;$jscomp.Map$install=function(){$jscomp.initSymbol();$jscomp.initSymbolIterator();!$jscomp.Map.ASSUME_NO_NATIVE&&$jscomp.Map.checkBrowserConformance_()?$jscomp.Map=$jscomp.global.Map:($jscomp.initSymbol(),$jscomp.initSymbolIterator(),$jscomp.Map.prototype[Symbol.iterator]=$jscomp.Map.prototype.entries,$jscomp.initSymbol(),$jscomp.Map.key_=Symbol("map-id-key"));$jscomp.Map$install=function(){}};$jscomp.math=$jscomp.math||{};
$jscomp.math.clz32=function(m){m=Number(m)>>>0;if(0===m)return 32;var d=0;0===(m&4294901760)&&(m<<=16,d+=16);0===(m&4278190080)&&(m<<=8,d+=8);0===(m&4026531840)&&(m<<=4,d+=4);0===(m&3221225472)&&(m<<=2,d+=2);0===(m&2147483648)&&d++;return d};$jscomp.math.imul=function(m,d){m=Number(m);d=Number(d);var k=m&65535,g=d&65535;return k*g+((m>>>16&65535)*g+k*(d>>>16&65535)<<16>>>0)|0};$jscomp.math.sign=function(m){m=Number(m);return 0===m||isNaN(m)?m:0<m?1:-1};
$jscomp.math.log10=function(m){return Math.log(m)/Math.LN10};$jscomp.math.log2=function(m){return Math.log(m)/Math.LN2};$jscomp.math.log1p=function(m){m=Number(m);if(.25>m&&-.25<m){for(var d=m,k=1,g=m,b=0,h=1;b!=g;)d*=m,h*=-1,g=(b=g)+h*d/++k;return g}return Math.log(1+m)};$jscomp.math.expm1=function(m){m=Number(m);if(.25>m&&-.25<m){for(var d=m,k=1,g=m,b=0;b!=g;)d*=m/++k,g=(b=g)+d;return g}return Math.exp(m)-1};$jscomp.math.cosh=function(m){m=Number(m);return(Math.exp(m)+Math.exp(-m))/2};
$jscomp.math.sinh=function(m){m=Number(m);return 0===m?m:(Math.exp(m)-Math.exp(-m))/2};$jscomp.math.tanh=function(m){m=Number(m);if(0===m)return m;var d=Math.exp(2*-Math.abs(m)),d=(1-d)/(1+d);return 0>m?-d:d};$jscomp.math.acosh=function(m){m=Number(m);return Math.log(m+Math.sqrt(m*m-1))};$jscomp.math.asinh=function(m){m=Number(m);if(0===m)return m;var d=Math.log(Math.abs(m)+Math.sqrt(m*m+1));return 0>m?-d:d};
$jscomp.math.atanh=function(m){m=Number(m);return($jscomp.math.log1p(m)-$jscomp.math.log1p(-m))/2};
$jscomp.math.hypot=function(m,d,k){for(var g=[],b=2;b<arguments.length;++b)g[b-2]=arguments[b];m=Number(m);d=Number(d);for(var h=Math.max(Math.abs(m),Math.abs(d)),q=$jscomp.makeIterator(g),b=q.next();!b.done;b=q.next())h=Math.max(h,Math.abs(b.value));if(1E100<h||1E-100>h){m/=h;d/=h;q=m*m+d*d;g=$jscomp.makeIterator(g);for(b=g.next();!b.done;b=g.next())b=b.value,b=Number(b)/h,q+=b*b;return Math.sqrt(q)*h}h=m*m+d*d;g=$jscomp.makeIterator(g);for(b=g.next();!b.done;b=g.next())b=b.value,b=Number(b),h+=
b*b;return Math.sqrt(h)};$jscomp.math.trunc=function(m){m=Number(m);if(isNaN(m)||Infinity===m||-Infinity===m||0===m)return m;var d=Math.floor(Math.abs(m));return 0>m?-d:d};$jscomp.math.cbrt=function(m){if(0===m)return m;m=Number(m);var d=Math.pow(Math.abs(m),1/3);return 0>m?-d:d};$jscomp.number=$jscomp.number||{};$jscomp.number.isFinite=function(m){return"number"!==typeof m?!1:!isNaN(m)&&Infinity!==m&&-Infinity!==m};
$jscomp.number.isInteger=function(m){return $jscomp.number.isFinite(m)?m===Math.floor(m):!1};$jscomp.number.isNaN=function(m){return"number"===typeof m&&isNaN(m)};$jscomp.number.isSafeInteger=function(m){return $jscomp.number.isInteger(m)&&Math.abs(m)<=$jscomp.number.MAX_SAFE_INTEGER};$jscomp.number.EPSILON=Math.pow(2,-52);$jscomp.number.MAX_SAFE_INTEGER=9007199254740991;$jscomp.number.MIN_SAFE_INTEGER=-9007199254740991;$jscomp.object=$jscomp.object||{};
$jscomp.object.assign=function(m,d){for(var k=[],g=1;g<arguments.length;++g)k[g-1]=arguments[g];k=$jscomp.makeIterator(k);for(g=k.next();!g.done;g=k.next())if(g=g.value)for(var b in g)Object.prototype.hasOwnProperty.call(g,b)&&(m[b]=g[b]);return m};$jscomp.object.is=function(m,d){return m===d?0!==m||1/m===1/d:m!==m&&d!==d};$jscomp.Set=function(m){m=void 0===m?[]:m;this.map_=new $jscomp.Map;if(m){m=$jscomp.makeIterator(m);for(var d=m.next();!d.done;d=m.next())this.add(d.value)}this.size=this.map_.size};
$jscomp.Set.checkBrowserConformance_=function(){var m=$jscomp.global.Set;if(!m||!m.prototype.entries||!Object.seal)return!1;var d=Object.seal({x:4}),m=new m($jscomp.makeIterator([d]));if(m.has(d)||1!=m.size||m.add(d)!=m||1!=m.size||m.add({x:4})!=m||2!=m.size)return!1;var m=m.entries(),k=m.next();if(k.done||k.value[0]!=d||k.value[1]!=d)return!1;k=m.next();return k.done||k.value[0]==d||4!=k.value[0].x||k.value[1]!=k.value[0]?!1:m.next().done};
$jscomp.Set.prototype.add=function(m){this.map_.set(m,m);this.size=this.map_.size;return this};$jscomp.Set.prototype["delete"]=function(m){m=this.map_["delete"](m);this.size=this.map_.size;return m};$jscomp.Set.prototype.clear=function(){this.map_.clear();this.size=0};$jscomp.Set.prototype.has=function(m){return this.map_.has(m)};$jscomp.Set.prototype.entries=function(){return this.map_.entries()};$jscomp.Set.prototype.values=function(){return this.map_.values()};
$jscomp.Set.prototype.forEach=function(m,d){var k=this;this.map_.forEach(function(g){return m.call(d,g,g,k)})};$jscomp.Set.ASSUME_NO_NATIVE=!1;$jscomp.Set$install=function(){!$jscomp.Set.ASSUME_NO_NATIVE&&$jscomp.Set.checkBrowserConformance_()?$jscomp.Set=$jscomp.global.Set:($jscomp.Map$install(),$jscomp.initSymbol(),$jscomp.initSymbolIterator(),$jscomp.Set.prototype[Symbol.iterator]=$jscomp.Set.prototype.values);$jscomp.Set$install=function(){}};$jscomp.string=$jscomp.string||{};
$jscomp.string.noRegExp_=function(m,d){if(m instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");};
$jscomp.string.fromCodePoint=function(m){for(var d=[],k=0;k<arguments.length;++k)d[k-0]=arguments[k];for(var k="",d=$jscomp.makeIterator(d),g=d.next();!g.done;g=d.next()){g=g.value;g=+g;if(0>g||1114111<g||g!==Math.floor(g))throw new RangeError("invalid_code_point "+g);65535>=g?k+=String.fromCharCode(g):(g-=65536,k+=String.fromCharCode(g>>>10&1023|55296),k+=String.fromCharCode(g&1023|56320))}return k};
$jscomp.string.repeat=function(m){var d=this.toString();if(0>m||1342177279<m)throw new RangeError("Invalid count value");m|=0;for(var k="";m;)if(m&1&&(k+=d),m>>>=1)d+=d;return k};$jscomp.string.repeat$install=function(){String.prototype.repeat||(String.prototype.repeat=$jscomp.string.repeat)};
$jscomp.string.codePointAt=function(m){var d=this.toString(),k=d.length;m=Number(m)||0;if(0<=m&&m<k){m|=0;var g=d.charCodeAt(m);if(55296>g||56319<g||m+1===k)return g;m=d.charCodeAt(m+1);return 56320>m||57343<m?g:1024*(g-55296)+m+9216}};$jscomp.string.codePointAt$install=function(){String.prototype.codePointAt||(String.prototype.codePointAt=$jscomp.string.codePointAt)};
$jscomp.string.includes=function(m,d){d=void 0===d?0:d;$jscomp.string.noRegExp_(m,"includes");return-1!==this.toString().indexOf(m,d)};$jscomp.string.includes$install=function(){String.prototype.includes||(String.prototype.includes=$jscomp.string.includes)};
$jscomp.string.startsWith=function(m,d){d=void 0===d?0:d;$jscomp.string.noRegExp_(m,"startsWith");var k=this.toString();m+="";for(var g=k.length,b=m.length,h=Math.max(0,Math.min(d|0,k.length)),q=0;q<b&&h<g;)if(k[h++]!=m[q++])return!1;return q>=b};$jscomp.string.startsWith$install=function(){String.prototype.startsWith||(String.prototype.startsWith=$jscomp.string.startsWith)};
$jscomp.string.endsWith=function(m,d){$jscomp.string.noRegExp_(m,"endsWith");var k=this.toString();m+="";void 0===d&&(d=k.length);for(var g=Math.max(0,Math.min(d|0,k.length)),b=m.length;0<b&&0<g;)if(k[--g]!=m[--b])return!1;return 0>=b};$jscomp.string.endsWith$install=function(){String.prototype.endsWith||(String.prototype.endsWith=$jscomp.string.endsWith)};
(function(m){"object"===typeof exports&&"undefined"!==typeof module?module.exports=m():"function"===typeof define&&define.amd?define([],m):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).videojsContribHls=m()})(function(){return function d(k,g,b){function h(n,c){if(!g[n]){if(!k[n]){var f="function"==typeof require&&require;if(!c&&f)return f(n,!0);if(q)return q(n,!0);f=Error("Cannot find module '"+n+"'");throw f.code="MODULE_NOT_FOUND",f;
}f=g[n]={exports:{}};k[n][0].call(f.exports,function(a){var c=k[n][1][a];return h(c?c:a)},f,f.exports,d,k,g,b)}return g[n].exports}for(var q="function"==typeof require&&require,r=0;r<b.length;r++)h(b[r]);return h}({1:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=function(){return function(b,d){if(Array.isArray(b))return b;$jscomp.initSymbol();$jscomp.initSymbolIterator();if(Symbol.iterator in Object(b)){var c=[],f=!0,a=!1,l=void 0;try{$jscomp.initSymbol();$jscomp.initSymbolIterator();
for(var v=b[Symbol.iterator](),p;!(f=(p=v.next()).done)&&(c.push(p.value),!d||c.length!==d);f=!0);}catch(t){a=!0,l=t}finally{try{if(!f&&v["return"])v["return"]()}finally{if(a)throw l;}}return c}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),h=(d=d("global/window"))&&d.__esModule?d:{"default":d},q=function(b,d){for(var c=b.cues,f=0;f<c.length;f++){var a=c[f];if(d>=a.adStartTime&&d<=a.adEndTime)return a}return null};g["default"]={updateAdCues:function(d,n){var c=2>=
arguments.length||void 0===arguments[2]?0:arguments[2];if(d.segments)for(var f=void 0,a=0;a<d.segments.length;a++){var l=d.segments[a];f||(f=q(n,c+l.duration/2));if(f){if("cueIn"in l){f.endTime=c;f.adEndTime=c;c+=l.duration;f=null;continue}if(c<f.endTime){c+=l.duration;continue}f.endTime+=l.duration}else if("cueOut"in l&&(f=new h["default"].VTTCue(c,c+l.duration,l.cueOut),f.adStartTime=c,f.adEndTime=c+parseFloat(l.cueOut),n.addCue(f)),"cueOutCont"in l){var v=void 0,p=void 0,v=l.cueOutCont.split("/").map(parseFloat),
f=b(v,2),v=f[0],p=f[1],f=new h["default"].VTTCue(c,c+l.duration,"");f.adStartTime=c-v;f.adEndTime=f.adStartTime+p;n.addCue(f)}c+=l.duration}},findAdCue:q};k.exports=g["default"]},{"global/window":32}],2:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=function(b,d){var c=b.toString(16);return"00".substring(0,2-c.length)+c+(d%2?" ":"")},h=function(b){return 32<=b&&126>b?String.fromCharCode(b):"."},q={hexDump:function(d){d=Array.prototype.slice.call(d);for(var n="",c=void 0,f=
void 0,a=0;a<d.length/16;a++)c=d.slice(16*a,16*a+16).map(b).join(""),f=d.slice(16*a,16*a+16).map(h).join(""),n+=c+" "+f+"\n";return n},tagDump:function(b){return q.hexDump(b.bytes)},textRanges:function(b){for(var d="",c=void 0,c=0;c<b.length;c++){var f;f=b;var a=c;f=f.start(a)+"-"+f.end(a);d+=f+" "}return d},createTransferableMessage:function(b){var d={};Object.keys(b).forEach(function(c){var f=b[c];ArrayBuffer.isView(f)?d[c]={bytes:f.buffer,byteOffset:f.byteOffset,byteLength:f.byteLength}:d[c]=f});
return d},initSegmentId:function(b){var d=b.byterange||{length:Infinity,offset:0};return[d.length,d.offset,b.resolvedUri].join()}};g["default"]=q;k.exports=g["default"]},{}],3:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});g["default"]={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1};k.exports=g["default"]},{}],4:[function(d,k,g){Object.defineProperty(g,
"__esModule",{value:!0});var b=d("global/window"),h=b&&b.__esModule?b:{"default":b},q=d("aes-decrypter"),r=d("./bin-utils"),n=function(c){c.onmessage=function(c){var a=c.data;c=new Uint8Array(a.encrypted.bytes,a.encrypted.byteOffset,a.encrypted.byteLength);var l=new Uint32Array(a.key.bytes,a.key.byteOffset,a.key.byteLength/4),b=new Uint32Array(a.iv.bytes,a.iv.byteOffset,a.iv.byteLength/4);new q.Decrypter(c,l,b,function(c,f){h["default"].postMessage((0,r.createTransferableMessage)({source:a.source,
decrypted:f}),[f.buffer])})}};g["default"]=function(c){return new n(c)};k.exports=g["default"]},{"./bin-utils":2,"aes-decrypter":25,"global/window":32}],5:[function(d,k,g){(function(b){function h(e){return e&&e.__esModule?e:{"default":e}}function q(e,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?
Object.setPrototypeOf(e,a):e.__proto__=a)}Object.defineProperty(g,"__esModule",{value:!0});var r=function(){function e(a,c){for(var f=0;f<c.length;f++){var l=c[f];l.enumerable=l.enumerable||!1;l.configurable=!0;"value"in l&&(l.writable=!0);Object.defineProperty(a,l.key,l)}}return function(a,c,f){c&&e(a.prototype,c);f&&e(a,f);return a}}(),n=function(e,a,c){var f=!0;for(;f;)if(null===e&&(e=Function.prototype),f=Object.getOwnPropertyDescriptor(e,a),void 0===f){e=Object.getPrototypeOf(e);if(null===e)break;
f=!0}else{if("value"in f)return f.value;a=f.get;return void 0===a?void 0:a.call(c)}},c=d("./playlist-loader"),f=h(c),a=d("./playlist.js"),c=d("./segment-loader"),l=h(c),c=d("./vtt-segment-loader"),v=h(c),c=d("./ranges"),p=h(c),t=h("undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null);b=d("./ad-cue-tags");var e=h(b);b=d("./sync-controller");var u=h(b),A=d("videojs-contrib-media-sources/es5/codec-utils");b=d("webwackify");var B=h(b);b=d("./decrypter-worker");var x=h(b);b=
d("./config");var z=h(b),D=d("./util/codecs.js"),y=d("./media-groups"),C=void 0,w={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},G="mediaRequests mediaRequestsAborted mediaRequestsTimedout mediaRequestsErrored mediaTransferDuration mediaBytesTransferred".split(" "),k=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},E=function(){var e=void 0;try{e=d.resolve("./decrypter-worker")}catch(a){}return e},F=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,
function(e){return(0,A.translateLegacyCodecs)([e])[0]})};g.mapLegacyAvcCodecs_=F;var I=function(e,a,c){return e+"/"+a+'; codecs="'+c.filter(function(e){return!!e}).join(", ")+'"'},J=function(e,a){var c;c=a.segments&&a.segments.length&&a.segments[0].map?"mp4":"mp2t";var f;var l=a.attributes||{};f=l.CODECS?(0,D.parseCodecs)(l.CODECS):w;var u=a.attributes||{},l=!0,b=!1;if(!a)return[];if(e.mediaGroups.AUDIO&&u.AUDIO&&(u=e.mediaGroups.AUDIO[u.AUDIO])){var b=!0,l=!1,p;for(p in u)if(!u[p].uri){l=!0;break}}b&&
!f.audioProfile&&(t["default"].log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),f.audioProfile=w.audioProfile);var d,v;f.videoCodec&&(d=""+f.videoCodec+f.videoObjectTypeIndicator);f.audioProfile&&(v="mp4a.40."+f.audioProfile);p=I("audio",c,[v]);f=I("video",c,[d]);c=I("video",c,[d,v]);return b?!l&&d?[f,p]:[c,p]:d?[c]:[p]};g.mimeTypesForPlaylist_=J;b=function(c){function w(e){var a=this;if(!(this instanceof w))throw new TypeError("Cannot call a class as a function");
n(Object.getPrototypeOf(w.prototype),"constructor",this).call(this);var c=e.url,p=e.withCredentials,b=e.mode,d=e.tech,D=e.bandwidth,h=e.externHls,A=e.useCueTags,q=e.blacklistDuration,r=e.enableLowInitialPlaylist;if(!c)throw Error("A non-empty playlist URL is required");C=h;this.withCredentials=p;this.tech_=d;this.hls_=d.hls;this.mode_=b;this.useCueTags_=A;this.blacklistDuration=q;this.enableLowInitialPlaylist=r;this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=
"");this.requestOptions_={withCredentials:this.withCredentials,timeout:null};this.mediaTypes_=(0,y.createMediaTypes)();this.mediaSource=new t["default"].MediaSource({mode:b});this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_.bind(this));this.seekable_=t["default"].createTimeRanges();this.hasPlayed_=function(){return!1};this.syncController_=new u["default"](e);this.segmentMetadataTrack_=d.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track;this.decrypter_=(0,
B["default"])(x["default"],E());p={hls:this.hls_,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:function(){return a.seekable()},seeking:function(){return a.tech_.seeking()},duration:function(){return a.mediaSource.duration},hasPlayed:function(){return a.hasPlayed_()},goalBufferLength:function(){return a.goalBufferLength()},bandwidth:D,syncController:this.syncController_,decrypter:this.decrypter_};this.masterPlaylistLoader_=new f["default"](c,this.hls_,this.withCredentials);
this.setupMasterPlaylistLoaderListeners_();this.mainSegmentLoader_=new l["default"](t["default"].mergeOptions(p,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e);this.audioSegmentLoader_=new l["default"](t["default"].mergeOptions(p,{loaderType:"audio"}),e);this.subtitleSegmentLoader_=new v["default"](t["default"].mergeOptions(p,{loaderType:"vtt"}),e);this.setupSegmentLoaderListeners_();G.forEach(function(e){a[e+"_"]=k.bind(a,e)});this.masterPlaylistLoader_.load()}q(w,c);r(w,
[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var c=e.masterPlaylistLoader_.media(),f=1500*e.masterPlaylistLoader_.targetDuration;(0,a.isLowestEnabledRendition)(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=f;c.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(c,e.requestOptions_),e.mainSegmentLoader_.load());(0,y.setupMediaGroups)({segmentLoaders:{AUDIO:e.audioSegmentLoader_,
SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,mode:e.mode_,hls:e.hls_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)});e.triggerPresenceUsage_(e.master(),c);try{e.setupSourceBuffers_()}catch(l){return t["default"].log.warn("Failed to create SourceBuffers",l),e.mediaSource.endOfStream("decode")}e.setupFirstPlay();e.trigger("selectedinitialmedia")});
this.masterPlaylistLoader_.on("loadedplaylist",function(){var a=e.masterPlaylistLoader_.media();a?(e.useCueTags_&&e.updateAdCues_(a),e.mainSegmentLoader_.playlist(a,e.requestOptions_),e.updateDuration(),e.tech_.paused()||e.mainSegmentLoader_.load(),a.endList||function(){var a=function(){var a=e.seekable();0!==a.length&&e.mediaSource.addSeekableRange_(a.start(0),a.end(0))};Infinity!==e.duration()?function(){e.tech_.one("durationchange",function K(){if(Infinity===e.duration())a();else e.tech_.one("durationchange",
K)})}():a()}()):(a=void 0,e.enableLowInitialPlaylist&&(a=e.selectInitialPlaylist()),a||(a=e.selectPlaylist()),e.initialMedia_=a,e.masterPlaylistLoader_.media(e.initialMedia_))});this.masterPlaylistLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)});this.masterPlaylistLoader_.on("mediachanging",function(){e.mainSegmentLoader_.abort();e.mainSegmentLoader_.pause()});this.masterPlaylistLoader_.on("mediachange",function(){var c=e.masterPlaylistLoader_.media(),f=1500*
e.masterPlaylistLoader_.targetDuration;(0,a.isLowestEnabledRendition)(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=f;e.mainSegmentLoader_.playlist(c,e.requestOptions_);e.mainSegmentLoader_.load();e.tech_.trigger({type:"mediachange",bubbles:!0})});this.masterPlaylistLoader_.on("playlistunchanged",function(){var a=e.masterPlaylistLoader_.media();e.stuckAtPlaylistEnd_(a)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),
e.tech_.trigger("playliststuck"))});this.masterPlaylistLoader_.on("renditiondisabled",function(){e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})});this.masterPlaylistLoader_.on("renditionenabled",function(){e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})}},{key:"triggerPresenceUsage_",value:function(e,a){var c=e.mediaGroups||{},f=!0,l=Object.keys(c.AUDIO),w;for(w in c.AUDIO)for(var u in c.AUDIO[w])c.AUDIO[w][u].uri||(f=!1);f&&this.tech_.trigger({type:"usage",name:"hls-demuxed"});
Object.keys(c.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"hls-webvtt"});C.Playlist.isAes(a)&&this.tech_.trigger({type:"usage",name:"hls-aes"});C.Playlist.isFmp4(a)&&this.tech_.trigger({type:"usage",name:"hls-fmp4"});l.length&&1<Object.keys(c.AUDIO[l[0]]).length&&this.tech_.trigger({type:"usage",name:"hls-alternate-audio"});this.useCueTags_&&this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"})}},{key:"setupSegmentLoaderListeners_",value:function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",
function(){var a=e.selectPlaylist(),c=e.masterPlaylistLoader_.media(),f=e.tech_.buffered(),f=f.length?f.end(f.length-1)-e.tech_.currentTime():0,l=e.bufferLowWaterLine();(!c.endList||e.duration()<z["default"].MAX_BUFFER_LOW_WATER_LINE||a.attributes.BANDWIDTH<c.attributes.BANDWIDTH||f>=l)&&e.masterPlaylistLoader_.media(a);e.tech_.trigger("bandwidthupdate")});this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")});this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())});
this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()});this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})});this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()});this.mainSegmentLoader_.on("ended",function(){e.onEndOfStream()});this.mainSegmentLoader_.on("earlyabort",function(){e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},
120)});this.mainSegmentLoader_.on("reseteverything",function(){e.tech_.trigger("hls-reset")});this.mainSegmentLoader_.on("segmenttimemapping",function(a){e.tech_.trigger({type:"hls-segment-time-mapping",mapping:a.mapping})});this.audioSegmentLoader_.on("ended",function(){e.onEndOfStream()})}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"load",value:function(){this.mainSegmentLoader_.load();
this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load();this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}},{key:"fastQualityChange_",value:function(){var e=this.selectPlaylist();e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0);this.hasPlayed_()&&this.load();var e=this.tech_.seekable();
if(Infinity===this.tech_.duration()&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}}},{key:"setupFirstPlay",value:function(){var e=this,a=this.masterPlaylistLoader_.media();if(!a||this.tech_.paused()||this.hasPlayed_())return!1;if(!a.endList&&(a=function(){var a=e.seekable();if(!a.length)return{v:!1};if(t["default"].browser.IE_VERSION&&"html5"===e.mode_&&0===e.tech_.readyState())return e.tech_.one("loadedmetadata",function(){e.trigger("firstplay");e.tech_.setCurrentTime(a.end(0));
e.hasPlayed_=function(){return!0}}),{v:!1};e.trigger("firstplay");e.tech_.setCurrentTime(a.end(0))}(),"object"===typeof a))return a.v;this.hasPlayed_=function(){return!0};this.load();return!0}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(e){return t["default"].log.warn("Failed to create Source Buffers",e),this.mediaSource.endOfStream("decode")}if(this.tech_.autoplay()){var a=this.tech_.play();"undefined"!==typeof a&&"function"===typeof a.then&&a.then(null,function(e){})}this.trigger("sourceopen")}},
{key:"onEndOfStream",value:function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=e&&this.audioSegmentLoader_.ended_);e&&this.mediaSource.endOfStream()}},{key:"stuckAtPlaylistEnd_",value:function(e){if(!this.seekable().length)return!1;var a=this.syncController_.getExpiredTime(e,this.mediaSource.duration);if(null===a)return!1;e=C.Playlist.playlistEnd(e,a);var a=this.tech_.currentTime(),c=this.tech_.buffered();if(!c.length)return e-a<=p["default"].SAFE_TIME_DELTA;
c=c.end(c.length-1);return c-a<=p["default"].SAFE_TIME_DELTA&&e-c<=p["default"].SAFE_TIME_DELTA}},{key:"blacklistCurrentPlaylist",value:function(e,c){void 0===e&&(e={});var f=void 0,f=void 0,f=e.playlist||this.masterPlaylistLoader_.media();c=c||e.blacklistDuration||this.blacklistDuration;if(!f){this.error=e;try{return this.mediaSource.endOfStream("network")}catch(l){return this.trigger("error")}}var w=1===this.masterPlaylistLoader_.master.playlists.filter(a.isEnabled).length;if(w)return t["default"].log.warn("Problem encountered with the current HLS playlist. Trying again since it is the final playlist."),
this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(w);f.excludeUntil=Date.now()+1E3*c;this.tech_.trigger("blacklistplaylist");this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});f=this.selectPlaylist();t["default"].log.warn("Problem encountered with the current HLS playlist."+(e.message?" "+e.message:"")+" Switching to another playlist.");return this.masterPlaylistLoader_.media(f)}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause();this.mediaTypes_.AUDIO.activePlaylistLoader&&
this.audioSegmentLoader_.pause();this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(e){var a=p["default"].findRange(this.tech_.buffered(),e);if(!this.masterPlaylistLoader_||!this.masterPlaylistLoader_.media()||!this.masterPlaylistLoader_.media().segments)return 0;if(a&&a.length&&"flash"!==this.mode_)return e;this.mainSegmentLoader_.resetEverything();this.mainSegmentLoader_.abort();this.mediaTypes_.AUDIO.activePlaylistLoader&&
(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort());this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort());this.load()}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:C.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var e=void 0,
a=void 0;if(this.masterPlaylistLoader_){var c=this.masterPlaylistLoader_.media();if(c){var f=this.syncController_.getExpiredTime(c,this.mediaSource.duration);if(null!==f&&(e=C.Playlist.seekable(c,f),0!==e.length)){if(this.mediaTypes_.AUDIO.activePlaylistLoader){c=this.mediaTypes_.AUDIO.activePlaylistLoader.media();f=this.syncController_.getExpiredTime(c,this.mediaSource.duration);if(null===f)return;a=C.Playlist.seekable(c,f);if(0===a.length)return}a?a.start(0)>e.end(0)||e.start(0)>a.end(0)?this.seekable_=
e:this.seekable_=t["default"].createTimeRanges([[a.start(0)>e.start(0)?a.start(0):e.start(0),a.end(0)<e.end(0)?a.end(0):e.end(0)]]):this.seekable_=e;this.tech_.trigger("seekablechanged")}}}}},{key:"updateDuration",value:function(){var e=this,a=this.mediaSource.duration,c=C.Playlist.duration(this.masterPlaylistLoader_.media()),f=this.tech_.buffered(),l=function R(){e.mediaSource.duration=c;e.tech_.trigger("durationchange");e.mediaSource.removeEventListener("sourceopen",R)};0<f.length&&(c=Math.max(c,
f.end(f.length-1)));a!==c&&("open"!==this.mediaSource.readyState?this.mediaSource.addEventListener("sourceopen",l):l())}},{key:"dispose",value:function(){var e=this;this.decrypter_.terminate();this.masterPlaylistLoader_.dispose();this.mainSegmentLoader_.dispose();["AUDIO","SUBTITLES"].forEach(function(a){a=e.mediaTypes_[a].groups;for(var c in a)a[c].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})});this.audioSegmentLoader_.dispose();this.subtitleSegmentLoader_.dispose()}},{key:"master",
value:function(){return this.masterPlaylistLoader_.master}},{key:"media",value:function(){return this.masterPlaylistLoader_.media()||this.initialMedia_}},{key:"setupSourceBuffers_",value:function(){var e=this.masterPlaylistLoader_.media(),a=void 0;if(e&&"open"===this.mediaSource.readyState){a=J(this.masterPlaylistLoader_.master,e);if(1>a.length)return this.error="No compatible SourceBuffer configuration for the variant stream:"+e.resolvedUri,this.mediaSource.endOfStream("decode");this.mainSegmentLoader_.mimeType(a[0]);
a[1]&&this.audioSegmentLoader_.mimeType(a[1]);this.excludeIncompatibleVariants_(e)}}},{key:"excludeIncompatibleVariants_",value:function(e){var a=this.masterPlaylistLoader_.master,c=2,f=null,l=void 0;e.attributes.CODECS&&(l=(0,D.parseCodecs)(e.attributes.CODECS),f=l.videoCodec,c=l.codecCount);a.playlists.forEach(function(e){var a={codecCount:2,videoCodec:null};if(e.attributes.CODECS){var l=e.attributes.CODECS,a=(0,D.parseCodecs)(l);window.MediaSource&&window.MediaSource.isTypeSupported&&!window.MediaSource.isTypeSupported('video/mp4; codecs="'+
F(l)+'"')&&(e.excludeUntil=Infinity)}a.codecCount!==c&&(e.excludeUntil=Infinity);a.videoCodec!==f&&(e.excludeUntil=Infinity)})}},{key:"updateAdCues_",value:function(a){var c=0,f=this.seekable();f.length&&(c=f.start(0));e["default"].updateAdCues(a,this.cueTagsTrack_,c)}},{key:"goalBufferLength",value:function(){var e=this.tech_.currentTime(),a=z["default"].GOAL_BUFFER_LENGTH;return Math.min(a+e*z["default"].GOAL_BUFFER_LENGTH_RATE,Math.max(a,z["default"].MAX_GOAL_BUFFER_LENGTH))}},{key:"bufferLowWaterLine",
value:function(){var e=this.tech_.currentTime(),a=z["default"].BUFFER_LOW_WATER_LINE;return Math.min(a+e*z["default"].BUFFER_LOW_WATER_LINE_RATE,Math.max(a,z["default"].MAX_BUFFER_LOW_WATER_LINE))}}]);return w}(t["default"].EventTarget);g.MasterPlaylistController=b}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./ad-cue-tags":1,"./config":3,"./decrypter-worker":4,"./media-groups":6,"./playlist-loader":9,"./playlist.js":11,"./ranges":12,
"./segment-loader":16,"./sync-controller":18,"./util/codecs.js":19,"./vtt-segment-loader":20,"videojs-contrib-media-sources/es5/codec-utils":65,webwackify:76}],6:[function(d,k,g){(function(b){Object.defineProperty(g,"__esModule",{value:!0});var h=(b="undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null)&&b.__esModule?b:{"default":b},q=(b=d("./playlist-loader"))&&b.__esModule?b:{"default":b},r=function(){},n=function(e,a){e.abort();e.pause();a&&a.activePlaylistLoader&&(a.activePlaylistLoader.pause(),
a.activePlaylistLoader=null)};g.stopLoaders=n;var c=function(e,a){a.activePlaylistLoader=e;e.load()};g.startLoaders=c;var f=function(e,a){return function(){var f=a.segmentLoaders,l=f[e],f=f.main,p=a.mediaTypes[e],b=p.activeTrack(),b=p.activeGroup(b),d=p.activePlaylistLoader;n(l,p);b&&(b.playlistLoader?(l.resyncLoader(),c(b.playlistLoader,p)):d&&f.resetEverything())}};g.onGroupChanged=f;var a=function(e,a){return function(){var f=a.segmentLoaders,l=f[e],f=f.main,p=a.mediaTypes[e],b=p.activeTrack(),
d=p.activeGroup(b),t=p.activePlaylistLoader;n(l,p);d&&(d.playlistLoader?(t!==d.playlistLoader&&(l.track&&l.track(b),l.resetEverything()),c(d.playlistLoader,p)):f.resetEverything())}};g.onTrackChanged=a;var l={AUDIO:function(e,a){return function(){var c=a.mediaTypes[e],f=a.blacklistCurrentPlaylist;n(a.segmentLoaders[e],c);var l=c.activeTrack(),p=c.activeGroup(),p=(p.filter(function(e){return e["default"]})[0]||p[0]).id,p=c.tracks[p];if(l===p)f({message:"Problem encountered loading the default audio track."});
else{h["default"].log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(var b in c.tracks)c.tracks[b].enabled=c.tracks[b]===p;c.onTrackChanged()}}},SUBTITLES:function(e,a){return function(){var c=a.segmentLoaders[e],f=a.mediaTypes[e];h["default"].log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");n(c,f);if(c=f.activeTrack())c.mode="disabled";f.onTrackChanged()}}};g.onError=l;var v={AUDIO:function(e,a,c){if(a){var f=c.tech,
p=c.requestOptions,b=c.segmentLoaders[e];a.on("loadedmetadata",function(){var e=a.media();b.playlist(e,p);(!f.paused()||e.endList&&"none"!==f.preload())&&b.load()});a.on("loadedplaylist",function(){b.playlist(a.media(),p);f.paused()||b.load()});a.on("error",l[e](e,c))}},SUBTITLES:function(e,a,c){var f=c.tech,p=c.requestOptions,b=c.segmentLoaders[e],d=c.mediaTypes[e];a.on("loadedmetadata",function(){var e=a.media();b.playlist(e,p);b.track(d.activeTrack());(!f.paused()||e.endList&&"none"!==f.preload())&&
b.load()});a.on("loadedplaylist",function(){b.playlist(a.media(),p);f.paused()||b.load()});a.on("error",l[e](e,c))}};g.setupListeners=v;var p={AUDIO:function(e,a){var c=a.mode,f=a.hls,p=a.segmentLoaders[e],b=a.requestOptions.withCredentials,d=a.master.mediaGroups,t=a.mediaTypes[e],w=t.groups,t=t.tracks;d[e]&&0!==Object.keys(d[e]).length&&"html5"===c||(d[e]={main:{"default":{"default":!0}}});for(var n in d[e]){w[n]||(w[n]=[]);for(var r in d[e][n]){var c=d[e][n][r],g=void 0,g=c.resolvedUri?new q["default"](c.resolvedUri,
f,b):null,c=h["default"].mergeOptions({id:r,playlistLoader:g},c);v[e](e,c.playlistLoader,a);w[n].push(c);if("undefined"===typeof t[r]){var g=h["default"].AudioTrack,k=r,I=c["default"]?"main":"alternative";c.characteristics&&0<=c.characteristics.indexOf("public.accessibility.describes-video")&&(I="main-desc");c=new g({id:k,kind:I,enabled:!1,language:c.language,"default":c["default"],label:r});t[r]=c}}}p.on("error",l[e](e,a))},SUBTITLES:function(e,a){var c=a.tech,f=a.hls,p=a.segmentLoaders[e],b=a.requestOptions.withCredentials,
d=a.master.mediaGroups,t=a.mediaTypes[e],w=t.groups,t=t.tracks,n;for(n in d[e]){w[n]||(w[n]=[]);for(var r in d[e][n])if(!d[e][n][r].forced){var g=d[e][n][r],g=h["default"].mergeOptions({id:r,playlistLoader:new q["default"](g.resolvedUri,f,b)},g);v[e](e,g.playlistLoader,a);w[n].push(g);"undefined"===typeof t[r]&&(g=c.addRemoteTextTrack({id:r,kind:"subtitles",enabled:!1,language:g.language,label:r},!1).track,t[r]=g)}}p.on("error",l[e](e,a))},"CLOSED-CAPTIONS":function(e,a){var c=a.tech,f=a.master.mediaGroups,
l=a.mediaTypes[e],p=l.groups,l=l.tracks,b;for(b in f[e]){p[b]||(p[b]=[]);for(var d in f[e][b]){var w=f[e][b][d];w.instreamId.match(/CC\d/)&&(p[b].push(h["default"].mergeOptions({id:d},w)),"undefined"===typeof l[d]&&(w=c.addRemoteTextTrack({id:w.instreamId,kind:"captions",enabled:!1,language:w.language,label:d},!1).track,l[d]=w))}}}};g.initialize=p;var t=function(e,a){return function(c){var f=a.mediaTypes[e].groups,l=a.masterPlaylistLoader.media();if(!l)return null;var p=null;l.attributes[e]&&(p=f[l.attributes[e]]);
p=p||f.main;return"undefined"===typeof c?p:null===c?null:p.filter(function(e){return e.id===c.id})[0]||null}};g.activeGroup=t;var e={AUDIO:function(e,a){return function(){var c=a.mediaTypes[e].tracks,f;for(f in c)if(c[f].enabled)return c[f];return null}},SUBTITLES:function(e,a){return function(){var c=a.mediaTypes[e].tracks,f;for(f in c)if("showing"===c[f].mode)return c[f];return null}}};g.activeTrack=e;g.setupMediaGroups=function(c){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){p[e](e,
c)});var l=c.mediaTypes,b=c.masterPlaylistLoader,d=c.tech,v=c.hls;["AUDIO","SUBTITLES"].forEach(function(p){l[p].activeGroup=t(p,c);l[p].activeTrack=e[p](p,c);l[p].onGroupChanged=f(p,c);l[p].onTrackChanged=a(p,c)});var h=l.AUDIO.activeGroup(),h=(h.filter(function(e){return e["default"]})[0]||h[0]).id;l.AUDIO.tracks[h].enabled=!0;l.AUDIO.onTrackChanged();b.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return l[e].onGroupChanged()})});var n=function(){l.AUDIO.onTrackChanged();
d.trigger({type:"usage",name:"hls-audio-change"})};d.audioTracks().addEventListener("change",n);d.remoteTextTracks().addEventListener("change",l.SUBTITLES.onTrackChanged);v.on("dispose",function(){d.audioTracks().removeEventListener("change",n);d.remoteTextTracks().removeEventListener("change",l.SUBTITLES.onTrackChanged)});d.clearTracks("audio");for(var C in l.AUDIO.tracks)d.audioTracks().addTrack(l.AUDIO.tracks[C])};g.createMediaTypes=function(){var e={};["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(a){e[a]=
{groups:{},tracks:{},activePlaylistLoader:null,activeGroup:r,activeTrack:r,onGroupChanged:r,onTrackChanged:r}});return e}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./playlist-loader":9}],7:[function(d,k,g){(function(b){Object.defineProperty(g,"__esModule",{value:!0});var h=(b="undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null)&&b.__esModule?b:{"default":b},q=d("./bin-utils"),r={FAILURE:2,TIMEOUT:-101,
ABORTED:-102};g.REQUEST_ERRORS=r;var n=function(e){var a={};if(e.byterange){e=e.byterange;var c=void 0,f=void 0,f=e.offset+e.length-1,c=e.offset;a.Range="bytes="+c+"-"+f}return a},c=function(e){e.forEach(function(e){e.abort()})},f=function(e){var a=e.target,a=Date.now()-a.requestTime,a={bandwidth:Infinity,bytesReceived:0,roundTripTime:a||0};a.bytesReceived=e.loaded;a.bandwidth=Math.floor(a.bytesReceived/a.roundTripTime*8E3);return a},a=function(e,a){return a.timedout?{status:a.status,message:"HLS request timed-out at URL: "+
a.uri,code:r.TIMEOUT,xhr:a}:a.aborted?{status:a.status,message:"HLS request aborted at URL: "+a.uri,code:r.ABORTED,xhr:a}:e?{status:a.status,message:"HLS request errored at URL: "+a.uri,code:r.FAILURE,xhr:a}:null},l=function(e,c){return function(f,l){var p=l.response,b=a(f,l);if(b)return c(b,e);if(16!==p.byteLength)return c({status:l.status,message:"Invalid HLS key at URL: "+l.uri,code:r.FAILURE,xhr:l},e);p=new DataView(p);e.key.bytes=new Uint32Array([p.getUint32(0),p.getUint32(4),p.getUint32(8),
p.getUint32(12)]);return c(null,e)}},v=function(e,c){return function(f,l){var p=l.response,b=a(f,l);if(b)return c(b,e);if(0===p.byteLength)return c({status:l.status,message:"Empty HLS segment content at URL: "+l.uri,code:r.FAILURE,xhr:l},e);e.map.bytes=new Uint8Array(l.response);return c(null,e)}},p=function(e,c){return function(f,l){var p=l.response,b=a(f,l);if(b)return c(b,e);if(0===p.byteLength)return c({status:l.status,message:"Empty HLS segment content at URL: "+l.uri,code:r.FAILURE,xhr:l},e);
e.stats={bandwidth:l.bandwidth,bytesReceived:l.bytesReceived||0,roundTripTime:l.roundTripTime||0};e.key?e.encryptedBytes=new Uint8Array(l.response):e.bytes=new Uint8Array(l.response);return c(null,e)}},t=function(e,a,c){e.addEventListener("message",function y(f){if(f.data.source===a.requestId)return e.removeEventListener("message",y),f=f.data.decrypted,a.bytes=new Uint8Array(f.bytes,f.byteOffset,f.byteLength),c(null,a)});e.postMessage((0,q.createTransferableMessage)({source:a.requestId,encrypted:a.encryptedBytes,
key:a.key.bytes,iv:a.key.iv}),[a.encryptedBytes.buffer,a.key.bytes.buffer])},e=function(e){return e.reduce(function(e,a){return a.code>e.code?a:e})},u=function(a,f,l){var p=[],b=0;return function(d,w){d&&(c(a),p.push(d));b+=1;if(b===a.length){w.endOfAllRequests=Date.now();if(0<p.length){var v=e(p);return l(v,w)}return w.encryptedBytes?t(f,w,l):l(null,w)}}},A=function(e,a){return function(c){e.stats=h["default"].mergeOptions(e.stats,f(c));!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=
Date.now());return a(c,e)}};g.mediaSegmentRequest=function(e,a,f,b,d,t){var w=[];f=u(w,f,t);if(b.key){t=h["default"].mergeOptions(a,{uri:b.key.resolvedUri,responseType:"arraybuffer"});var q=l(b,f);t=e(t,q);w.push(t)}b.map&&!b.map.bytes&&(t=h["default"].mergeOptions(a,{uri:b.map.resolvedUri,responseType:"arraybuffer",headers:n(b.map)}),q=v(b,f),t=e(t,q),w.push(t));a=h["default"].mergeOptions(a,{uri:b.resolvedUri,responseType:"arraybuffer",headers:n(b)});f=p(b,f);e=e(a,f);e.addEventListener("progress",
A(b,d));w.push(e);return function(){return c(w)}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./bin-utils":2}],8:[function(d,k,g){(function(b){function h(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(g,"__esModule",{value:!0});var q=function(){function a(c,f){for(var l=0;l<f.length;l++){var e=f[l];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(c,e.key,e)}}
return function(c,f,b){f&&a(c.prototype,f);b&&a(c,b);return c}}(),r=d("global/window"),n=h(r),r=d("./ranges"),c=h(r),f=h("undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null),a=["seeking","seeked","pause","playing","error"];b=function(){function l(c){var b=this;if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");this.tech_=c.tech;this.seekable=c.seekable;this.consecutiveUpdates=0;this.checkCurrentTimeTimeout_=this.timer_=this.lastRecordedTime=
null;c.debug&&(this.logger_=f["default"].log.bind(f["default"],"playback-watcher ->"));this.logger_("initialize");var d=function(){return b.monitorCurrentTime_()},e=function(){return b.techWaiting_()},u=function(){return b.cancelTimer_()},h=function(){return b.fixesBadSeeks_()};this.tech_.on("seekablechanged",h);this.tech_.on("waiting",e);this.tech_.on(a,u);this.tech_.on("canplay",d);this.dispose=function(){b.logger_("dispose");b.tech_.off("seekablechanged",h);b.tech_.off("waiting",e);b.tech_.off(a,
u);b.tech_.off("canplay",d);b.checkCurrentTimeTimeout_&&n["default"].clearTimeout(b.checkCurrentTimeTimeout_);b.cancelTimer_()}}q(l,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_();this.checkCurrentTimeTimeout_&&n["default"].clearTimeout(this.checkCurrentTimeTimeout_);this.checkCurrentTimeTimeout_=n["default"].setTimeout(this.monitorCurrentTime_.bind(this),250)}},{key:"checkCurrentTime_",value:function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())this.consecutiveUpdates=0,
this.lastRecordedTime=this.tech_.currentTime();else if(!this.tech_.paused()&&!this.tech_.seeking()){var a=this.tech_.currentTime(),f=this.tech_.buffered();if(this.lastRecordedTime===a&&(!f.length||a+c["default"].SAFE_TIME_DELTA>=f.end(f.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&a===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):a===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=a)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=
0;this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_));this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var a=this.tech_.seeking(),f=this.seekable(),l=this.tech_.currentTime(),e=void 0;a&&this.afterSeekableWindow_(f,l)&&(e=f.end(f.length-1));a&&this.beforeSeekableWindow_(f,l)&&(e=f.start(0)+c["default"].SAFE_TIME_DELTA);return"undefined"!==typeof e?(this.logger_("Trying to seek outside of seekable at time "+l+" with "+("seekable range "+c["default"].printableRange(f)+". Seeking to ")+
(e+".")),this.tech_.setCurrentTime(e),!0):!1}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var a=this.tech_.currentTime(),f=this.tech_.buffered(),f=c["default"].findRange(f,a);f.length&&a+3<=f.end(0)&&(this.cancelTimer_(),this.tech_.setCurrentTime(a),this.logger_("Stopped at "+a+" while inside a buffered region "+("["+f.start(0)+" -> "+f.end(0)+"]. Attempting to resume ")+"playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"}))}}},{key:"techWaiting_",
value:function(){var a=this.seekable(),f=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_()||this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(a,f))return a=a.end(a.length-1),this.logger_("Fell out of live window at time "+f+". Seeking to "+("live point (seekable end) "+a)),this.cancelTimer_(),this.tech_.setCurrentTime(a),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0;var l=this.tech_.buffered(),a=c["default"].findNextRange(l,f);return this.videoUnderflow_(a,
l,f)?(this.cancelTimer_(),this.tech_.setCurrentTime(f),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0):0<a.length?(l=a.start(0)-f,this.logger_("Stopped at "+f+", setting timer for "+l+", seeking "+("to "+a.start(0))),this.timer_=setTimeout(this.skipTheGap_.bind(this),1E3*l,f),!0):!1}},{key:"afterSeekableWindow_",value:function(a,f){return a.length?f>a.end(a.length-1)+c["default"].SAFE_TIME_DELTA?!0:!1:!1}},{key:"beforeSeekableWindow_",value:function(a,f){return a.length&&0<a.start(0)&&
f<a.start(0)-c["default"].SAFE_TIME_DELTA?!0:!1}},{key:"videoUnderflow_",value:function(a,c,f){return 0===a.length&&(a=this.gapFromVideoUnderflow_(c,f))?(this.logger_("Encountered a gap in video from "+a.start+" to "+a.end+". "+("Seeking to current time "+f)),!0):!1}},{key:"skipTheGap_",value:function(a){var f=this.tech_.buffered(),l=this.tech_.currentTime(),f=c["default"].findNextRange(f,l);this.cancelTimer_();0!==f.length&&l===a&&(this.logger_("skipTheGap_:","currentTime:",l,"scheduled currentTime:",
a,"nextRange start:",f.start(0)),this.tech_.setCurrentTime(f.start(0)+c["default"].TIME_FUDGE_FACTOR),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))}},{key:"gapFromVideoUnderflow_",value:function(a,f){for(var l=c["default"].findGaps(a),e=0;e<l.length;e++){var b=l.start(e),d=l.end(e);if(4>f-b&&2<f-b)return{start:b,end:d}}return null}},{key:"logger_",value:function(){}}]);return l}();g["default"]=b;k.exports=g["default"]}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?
self:"undefined"!==typeof window?window:{})},{"./ranges":12,"global/window":32}],9:[function(d,k,g){(function(b){function h(e){return e&&e.__esModule?e:{"default":e}}function q(e,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(e,a):e.__proto__=a)}Object.defineProperty(g,
"__esModule",{value:!0});var r=function(){function e(a,c){for(var f=0;f<c.length;f++){var l=c[f];l.enumerable=l.enumerable||!1;l.configurable=!0;"value"in l&&(l.writable=!0);Object.defineProperty(a,l.key,l)}}return function(a,c,f){c&&e(a.prototype,c);f&&e(a,f);return a}}(),n=function(e,a,c){var f=!0;for(;f;)if(null===e&&(e=Function.prototype),f=Object.getOwnPropertyDescriptor(e,a),void 0===f){e=Object.getPrototypeOf(e);if(null===e)break;f=!0}else{if("value"in f)return f.value;a=f.get;return void 0===
a?void 0:a.call(c)}},c=d("./resolve-url"),f=h(c),a="undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null;b=d("m3u8-parser");var l=h(b);b=d("global/window");var v=h(b),p=function(e,c,f){var l=c.slice();f=f||0;c=Math.min(e.length,c.length+f);for(var b=f;b<c;b++)l[b-f]=(0,a.mergeOptions)(e[b],l[b-f]);return l};g.updateSegments=p;var t=function(e,a){e.resolvedUri||(e.resolvedUri=(0,f["default"])(a,e.uri));e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=(0,f["default"])(a,e.key.uri));
e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=(0,f["default"])(a,e.map.uri))};g.resolveSegmentUris=t;var e=function(e,c){var f=(0,a.mergeOptions)(e,{}),l=f.playlists.filter(function(e){return e.uri===c.uri})[0];if(!l||l.segments&&c.segments&&l.segments.length===c.segments.length&&l.mediaSequence===c.mediaSequence)return null;var b=(0,a.mergeOptions)(l,c);l.segments&&(b.segments=p(l.segments,c.segments,c.mediaSequence-l.mediaSequence));b.segments.forEach(function(e){t(e,b.resolvedUri)});for(l=0;l<
f.playlists.length;l++)f.playlists[l].uri===c.uri&&(f.playlists[l]=b);f.playlists[c.uri]=b;return f};g.updateMaster=e;var u=function(e){for(var c=e.playlists.length;c--;){var l=e.playlists[c];e.playlists[l.uri]=l;l.resolvedUri=(0,f["default"])(e.uri,l.uri);l.attributes||(l.attributes={},a.log.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute."))}};g.setupMediaPlaylists=u;var A=function(e){["AUDIO","SUBTITLES"].forEach(function(a){for(var c in e.mediaGroups[a])for(var l in e.mediaGroups[a][c]){var b=
e.mediaGroups[a][c][l];b.uri&&(b.resolvedUri=(0,f["default"])(e.uri,b.uri))}})};g.resolveMediaGroupUris=A;var k=function(e,a){var c=e.segments[e.segments.length-1],f=void 0;return f=a&&c&&c.duration?1E3*c.duration:500*(e.targetDuration||10)};g.refreshDelay=k;b=function(a){function c(e,a,l){var b=this;if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");n(Object.getPrototypeOf(c.prototype),"constructor",this).call(this);this.srcUrl=e;this.hls_=a;this.withCredentials=l;if(!this.srcUrl)throw Error("A non-empty playlist URL is required");
this.state="HAVE_NOTHING";this.on("mediaupdatetimeout",function(){"HAVE_METADATA"===b.state&&(b.state="HAVE_CURRENT_METADATA",b.request=b.hls_.xhr({uri:(0,f["default"])(b.master.uri,b.media().uri),withCredentials:b.withCredentials},function(e,a){if(b.request){if(e)return b.playlistRequestError(b.request,b.media().uri,"HAVE_METADATA");b.haveMetadata(b.request,b.media().uri)}}))})}q(c,a);r(c,[{key:"playlistRequestError",value:function(e,a,c){this.request=null;c&&(this.state=c);this.error={playlist:this.master.playlists[a],
status:e.status,message:"HLS playlist request error at URL: "+a,responseText:e.responseText,code:500<=e.status?4:2};this.trigger("error")}},{key:"haveMetadata",value:function(a,c){var f=this;this.request=null;this.state="HAVE_METADATA";var b=new l["default"].Parser;b.push(a.responseText);b.end();b.manifest.uri=c;b.manifest.attributes=b.manifest.attributes||{};var d=e(this.master,b.manifest);this.targetDuration=b.manifest.targetDuration;d?(this.master=d,this.media_=this.master.playlists[b.manifest.uri]):
this.trigger("playlistunchanged");this.media().endList||(v["default"].clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=v["default"].setTimeout(function(){f.trigger("mediaupdatetimeout")},k(this.media(),!!d)));this.trigger("loadedplaylist")}},{key:"dispose",value:function(){this.stopRequest();v["default"].clearTimeout(this.mediaUpdateTimeout)}},{key:"stopRequest",value:function(){if(this.request){var e=this.request;this.request=null;e.onreadystatechange=null;e.abort()}}},{key:"media",
value:function(e){var a=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw Error("Cannot switch media playlist from "+this.state);var c=this.state;if("string"===typeof e){if(!this.master.playlists[e])throw Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}var l=!this.media_||e.uri!==this.media_.uri;if(this.master.playlists[e.uri].endList)this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,l&&
(this.trigger("mediachanging"),this.trigger("mediachange"));else if(l){this.state="SWITCHING_MEDIA";if(this.request){if((0,f["default"])(this.master.uri,e.uri)===this.request.url)return;this.request.onreadystatechange=null;this.request.abort();this.request=null}this.media_&&this.trigger("mediachanging");this.request=this.hls_.xhr({uri:(0,f["default"])(this.master.uri,e.uri),withCredentials:this.withCredentials},function(f,l){if(a.request){if(f)return a.playlistRequestError(a.request,e.uri,c);a.haveMetadata(l,
e.uri);"HAVE_MASTER"===c?a.trigger("loadedmetadata"):a.trigger("mediachange")}})}}},{key:"pause",value:function(){this.stopRequest();v["default"].clearTimeout(this.mediaUpdateTimeout);"HAVE_NOTHING"===this.state&&(this.started=!1);"SWITCHING_MEDIA"===this.state?this.state=this.media_?"HAVE_METADATA":"HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}},{key:"load",value:function(e){var a=this;v["default"].clearTimeout(this.mediaUpdateTimeout);var c=this.media();e?this.mediaUpdateTimeout=
v["default"].setTimeout(function(){return a.load()},c?c.targetDuration/2*1E3:5E3):this.started?c&&!c.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}},{key:"start",value:function(){var e=this;this.started=!0;this.request=this.hls_.xhr({uri:this.srcUrl,withCredentials:this.withCredentials},function(a,c){if(e.request){e.request=null;if(a)return e.error={status:c.status,message:"HLS playlist request error at URL: "+e.srcUrl,responseText:c.responseText,code:2},"HAVE_NOTHING"===
e.state&&(e.started=!1),e.trigger("error");var f=new l["default"].Parser;f.push(c.responseText);f.end();e.state="HAVE_MASTER";f.manifest.uri=e.srcUrl;if(f.manifest.playlists)e.master=f.manifest,u(e.master),A(e.master),e.trigger("loadedplaylist"),e.request||e.media(f.manifest.playlists[0]);else return e.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:v["default"].location.href,playlists:[{uri:e.srcUrl}]},e.master.playlists[e.srcUrl]=e.master.playlists[0],e.master.playlists[0].resolvedUri=
e.srcUrl,e.master.playlists[0].attributes=e.master.playlists[0].attributes||{},e.haveMetadata(c,e.srcUrl),e.trigger("loadedmetadata")}})}}]);return c}(a.EventTarget);g["default"]=b}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./resolve-url":15,"global/window":32,"m3u8-parser":33}],10:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=(k=d("./config"))&&k.__esModule?k:{"default":k},h=(k=d("./playlist"))&&
k.__esModule?k:{"default":k},q=d("./util/codecs.js"),r=function(a,c){var f=void 0;return a?(f=window.getComputedStyle(a))?f[c]:"":""},n=function(a,c){var f=a.slice();a.sort(function(a,b){var e=c(a,b);return 0===e?f.indexOf(a)-f.indexOf(b):e})},c=function(a,c){var f=void 0,b=void 0;a.attributes.BANDWIDTH&&(f=a.attributes.BANDWIDTH);f=f||window.Number.MAX_VALUE;c.attributes.BANDWIDTH&&(b=c.attributes.BANDWIDTH);b=b||window.Number.MAX_VALUE;return f-b};g.comparePlaylistBandwidth=c;g.comparePlaylistResolution=
function(a,c){var f=void 0,b=void 0;a.attributes.RESOLUTION&&a.attributes.RESOLUTION.width&&(f=a.attributes.RESOLUTION.width);f=f||window.Number.MAX_VALUE;c.attributes.RESOLUTION&&c.attributes.RESOLUTION.width&&(b=c.attributes.RESOLUTION.width);b=b||window.Number.MAX_VALUE;return f===b&&a.attributes.BANDWIDTH&&c.attributes.BANDWIDTH?a.attributes.BANDWIDTH-c.attributes.BANDWIDTH:f-b};var f=function(a,c,f,d){a=a.playlists.map(function(e){var a=void 0,c=void 0,f=void 0,a=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,
c=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height,f=(f=e.attributes.BANDWIDTH)||window.Number.MAX_VALUE;return{bandwidth:f,width:a,height:c,playlist:e}});n(a,function(e,a){return e.bandwidth-a.bandwidth});a=a.filter(function(e){return!h["default"].isIncompatible(e.playlist)});var t=a.filter(function(e){return h["default"].isEnabled(e.playlist)});t.length||(t=a.filter(function(e){return!h["default"].isDisabled(e.playlist)}));var e=t.filter(function(e){return e.bandwidth*b["default"].BANDWIDTH_VARIANCE<
c}),u=e[e.length-1],q=e.filter(function(e){return e.bandwidth===u.bandwidth})[0],e=e.filter(function(e){return e.width&&e.height});n(e,function(e,a){return e.width-a.width});var r=e.filter(function(e){return e.width===f&&e.height===d}),u=r[r.length-1],r=r.filter(function(e){return e.bandwidth===u.bandwidth})[0],g=void 0,k=void 0,k=void 0;r||(g=e.filter(function(e){return e.width>f||e.height>d}),k=g.filter(function(e){return e.width===g[0].width&&e.height===g[0].height}),u=k[k.length-1],k=k.filter(function(e){return e.bandwidth===
u.bandwidth})[0]);return(a=k||r||q||t[0]||a[0])?a.playlist:null};g.simpleSelector=f;g.lastBandwidthSelector=function(){return f(this.playlists.master,this.systemBandwidth,parseInt(r(this.tech_.el(),"width"),10),parseInt(r(this.tech_.el(),"height"),10))};g.movingAverageBandwidthSelector=function(a){var c=-1;if(0>a||1<a)throw Error("Moving average bandwidth decay must be between 0 and 1.");return function(){0>c&&(c=this.systemBandwidth);c=a*this.systemBandwidth+(1-a)*c;return f(this.playlists.master,
c,parseInt(r(this.tech_.el(),"width"),10),parseInt(r(this.tech_.el(),"height"),10))}};g.minRebufferMaxBandwidthSelector=function(a){var f=a.currentTime,b=a.bandwidth,d=a.duration,t=a.segmentDuration,e=a.timeUntilRebuffer,u=a.currentTimeline,q=a.syncController;a=a.master.playlists.filter(function(e){return!h["default"].isIncompatible(e)});var r=a.filter(h["default"].isEnabled);r.length||(r=a.filter(function(e){return!h["default"].isDisabled(e)}));a=r.filter(h["default"].hasAttribute.bind(null,"BANDWIDTH")).map(function(a){var c=
q.getSyncPoint(a,d,u,f)?1:2,c=h["default"].estimateSegmentRequestTime(t,b,a)*c-e;return{playlist:a,rebufferingImpact:c}});r=a.filter(function(e){return 0>=e.rebufferingImpact});n(r,function(e,a){return c(a.playlist,e.playlist)});if(r.length)return r[0];n(a,function(e,a){return e.rebufferingImpact-a.rebufferingImpact});return a[0]||null};g.lowestBitrateCompatibleVariantSelector=function(){var a=this.playlists.master.playlists.filter(h["default"].isEnabled);n(a,function(a,f){return c(a,f)});return a.filter(function(a){return(0,
q.parseCodecs)(a.attributes.CODECS).videoCodec})[0]||null}},{"./config":3,"./playlist":11,"./util/codecs.js":19}],11:[function(d,k,g){(function(b){Object.defineProperty(g,"__esModule",{value:!0});var h="undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null,q=(b=d("global/window"))&&b.__esModule?b:{"default":b},r=function(e,a){var c=0,f=a-e.mediaSequence,l=e.segments[f];if(l){if("undefined"!==typeof l.start)return{result:l.start,precise:!0};if("undefined"!==typeof l.end)return{result:l.end-
l.duration,precise:!0}}for(;f--;){l=e.segments[f];if("undefined"!==typeof l.end)return{result:c+l.end,precise:!0};c+=l.duration;if("undefined"!==typeof l.start)return{result:c+l.start,precise:!0}}return{result:c,precise:!1}},n=function(e,a,c){var f=void 0,l=void 0;"undefined"===typeof a&&(a=e.mediaSequence+e.segments.length);if(a<e.mediaSequence)return 0;f=r(e,a);if(f.precise)return f.result;a:{var l=0,b=void 0;for(a-=e.mediaSequence;a<e.segments.length;a++){b=e.segments[a];if("undefined"!==typeof b.start){l=
{result:b.start-l,precise:!0};break a}l+=b.duration;if("undefined"!==typeof b.end){l={result:b.end-l,precise:!0};break a}}l={result:-1,precise:!1}}return l.precise?l.result:f.result+c},c=function(e,a,c){if(!e)return 0;"number"!==typeof c&&(c=0);if("undefined"===typeof a){if(e.totalDuration)return e.totalDuration;if(!e.endList)return q["default"].Infinity}return n(e,a,c)};g.duration=c;var f=function(e,a,c){var f=0;a>c&&(c=[c,a],a=c[0],c=c[1]);if(0>a){for(;a<Math.min(0,c);a++)f+=e.targetDuration;a=
0}for(;a<c;a++)f+=e.segments[a].duration;return f};g.sumDurations=f;var a=function(e){if(!e.segments.length)return 0;for(var a=e.segments.length-1,c=e.segments[a].duration||e.targetDuration,f=c+2*e.targetDuration;a--&&!(c+=e.segments[a].duration,c>=f););return Math.max(0,a)};g.safeLiveIndex=a;var l=function(e,f,l){if(!e||!e.segments)return null;if(e.endList)return c(e);if(null===f)return null;f=f||0;l=l?a(e):e.segments.length;return n(e,e.mediaSequence+l,f)};g.playlistEnd=l;b=function(e,a){var c=
a||0,f=l(e,a,!0);return null===f?(0,h.createTimeRange)():(0,h.createTimeRange)(c,f)};g.seekable=b;var v=function(e,a){if(0===a-Math.floor(a))return a+.1*e;for(var c=a.toString().split(".")[1].length,f=1;f<=c;f++){var l=Math.pow(10,f),b=a*l;if(0===b-Math.floor(b)||f===c)return(b+e)/l}},p=v.bind(null,1),t=v.bind(null,-1),v=function(e,a,c,l){var b=void 0,d=void 0,u=e.segments.length,h=a-l;if(0>h){if(0<c)for(b=c-1;0<=b;b--)if(d=e.segments[b],h+=t(d.duration),0<h)return{mediaIndex:b,startTime:l-f(e,c,
b)};return{mediaIndex:0,startTime:a}}if(0>c){for(b=c;0>b;b++)if(h-=e.targetDuration,0>h)return{mediaIndex:0,startTime:a};c=0}for(b=c;b<u;b++)if(d=e.segments[b],h-=p(d.duration),0>h)return{mediaIndex:b,startTime:l+f(e,c,b)};return{mediaIndex:u-1,startTime:a}};g.getMediaInfoForTime=v;var e=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()};g.isBlacklisted=e;var u=function(e){return e.excludeUntil&&Infinity===e.excludeUntil};g.isIncompatible=u;var A=function(a){var c=e(a);return!a.disabled&&
!c};g.isEnabled=A;var k=function(e){return e.disabled};g.isDisabled=k;var x=function(e){for(var a=0;a<e.segments.length;a++)if(e.segments[a].key)return!0;return!1};g.isAes=x;var z=function(e){for(var a=0;a<e.segments.length;a++)if(e.segments[a].map)return!0;return!1};g.isFmp4=z;var D=function(e,a){return a.attributes&&a.attributes[e]};g.hasAttribute=D;var y=function(e,a,c){var f=3>=arguments.length||void 0===arguments[3]?0:arguments[3];return D("BANDWIDTH",c)?(e*c.attributes.BANDWIDTH-8*f)/a:NaN};
g.estimateSegmentRequestTime=y;var C=function(e,a){if(1===e.playlists.length)return!0;var c=a.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(function(e){return A(e)?(e.attributes.BANDWIDTH||0)<c:!1}).length};g.isLowestEnabledRendition=C;g["default"]={duration:c,seekable:b,safeLiveIndex:a,getMediaInfoForTime:v,isEnabled:A,isDisabled:k,isBlacklisted:e,isIncompatible:u,playlistEnd:l,isAes:x,isFmp4:z,hasAttribute:D,estimateSegmentRequestTime:y,isLowestEnabledRendition:C}}).call(this,
"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"global/window":32}],12:[function(d,k,g){(function(b){Object.defineProperty(g,"__esModule",{value:!0});var d=function(){return function(a,c){if(Array.isArray(a))return a;$jscomp.initSymbol();$jscomp.initSymbolIterator();if(Symbol.iterator in Object(a)){var f=[],b=!0,d=!1,e=void 0;try{$jscomp.initSymbol();$jscomp.initSymbolIterator();for(var h=a[Symbol.iterator](),n;!(b=(n=h.next()).done)&&(f.push(n.value),
!c||f.length!==c);b=!0);}catch(q){d=!0,e=q}finally{try{if(!b&&h["return"])h["return"]()}finally{if(d)throw e;}}return f}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),q=(b="undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null)&&b.__esModule?b:{"default":b},r=1/30,n=function(a,c){var f=d(c,2);return Math.min(Math.max(f[0],a),f[1])},c=function(a,c){var f=[],b=void 0;if(a&&a.length)for(b=0;b<a.length;b++)c(a.start(b),a.end(b))&&f.push([a.start(b),
a.end(b)]);return q["default"].createTimeRanges(f)},f=function(a,c){var f=null,b=null,d=0,e=[],h=[];if(!(a&&a.length&&c&&c.length))return q["default"].createTimeRange();for(var n=a.length;n--;)e.push({time:a.start(n),type:"start"}),e.push({time:a.end(n),type:"end"});for(n=c.length;n--;)e.push({time:c.start(n),type:"start"}),e.push({time:c.end(n),type:"end"});e.sort(function(e,a){return e.time-a.time});for(n=0;n<e.length;n++)"start"===e[n].type?(d++,2===d&&(f=e[n].time)):"end"===e[n].type&&(d--,1===
d&&(b=e[n].time)),null!==f&&null!==b&&(h.push([f,b]),b=f=null);return q["default"].createTimeRanges(h)};g["default"]={findRange:function(a,f){return c(a,function(a,c){return a-r<=f&&c+r>=f})},findNextRange:function(a,f){return c(a,function(a){return a-r>=f})},findGaps:function(a){if(2>a.length)return q["default"].createTimeRanges();for(var c=[],f=1;f<a.length;f++){var b=a.end(f-1),d=a.start(f);c.push([b,d])}return q["default"].createTimeRanges(c)},findSoleUncommonTimeRangesEnd:function(a,c){var f=
void 0,b=void 0,d=void 0,e=[],h=[],n=function(e){return e[0]<=d&&e[1]>=d};if(a)for(f=0;f<a.length;f++)b=a.start(f),d=a.end(f),h.push([b,d]);if(c)for(f=0;f<c.length;f++)b=c.start(f),d=c.end(f),h.some(n)||e.push(d);return 1!==e.length?null:e[0]},getSegmentBufferedPercent:function(a,c,b,d){c=a+c;var t=q["default"].createTimeRanges([[a,c]]),e=q["default"].createTimeRanges([[n(a,[b,c]),c]]);if(e.start(0)===e.end(0))return 0;a=t.end(0)-t.start(0);c=e.end(0)-e.start(0);c=a-c;e=f(e,d);d=f(t,d);for(var h=
t=0,r=e.length;r--;)t+=e.end(r)-e.start(r),e.start(r)===b&&(t+=c);for(r=d.length;r--;)h+=d.end(r)-d.start(r);b=Math.max(t,h)/a*100;return isNaN(b)||Infinity===b||-Infinity===b?0:b},TIME_FUDGE_FACTOR:r,SAFE_TIME_DELTA:3*r,printableRange:function(a){var c=[];if(!a||!a.length)return"";for(var f=0;f<a.length;f++)c.push(a.start(f)+" => "+a.end(f));return c.join(", ")},timeUntilRebuffer:function(a,c){var f=2>=arguments.length||void 0===arguments[2]?1:arguments[2];return((a.length?a.end(a.length-1):0)-c)/
f}};k.exports=g["default"]}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],13:[function(d,k,g){(function(b){Object.defineProperty(g,"__esModule",{value:!0});var d=(b="undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null)&&b.__esModule?b:{"default":b},q={errorInterval:30,getSource:function(b){var c=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_;return b(c)}},r=function c(f,a){var b=0,r=0,p=
d["default"].mergeOptions(q,a);f.ready(function(){f.trigger({type:"usage",name:"hls-error-reload-initialized"})});var t=function(){r&&f.currentTime(r)},e=function(e){null!==e&&void 0!==e&&(r=Infinity!==f.duration()&&f.currentTime()||0,f.one("loadedmetadata",t),f.src(e),f.trigger({type:"usage",name:"hls-error-reload"}),f.play())},u=function(){if(Date.now()-b<1E3*p.errorInterval)f.trigger({type:"usage",name:"hls-error-reload-canceled"});else{if(p.getSource&&"function"===typeof p.getSource)return b=
Date.now(),p.getSource.call(f,e);d["default"].log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},g=function x(){f.off("loadedmetadata",t);f.off("error",u);f.off("dispose",x)};f.on("error",u);f.on("dispose",g);f.reloadSourceOnError=function(e){g();c(f,e)}};g["default"]=function(c){r(this,c)};k.exports=g["default"]}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],14:[function(d,k,g){Object.defineProperty(g,
"__esModule",{value:!0});var b=d("./playlist.js"),h=function(d,h,c){return function(f){var a=d.master.playlists[h],l=(0,b.isIncompatible)(a),q=(0,b.isEnabled)(a);if("undefined"===typeof f)return q;f?delete a.disabled:a.disabled=!0;f===q||l||(c(),f?d.trigger("renditionenabled"):d.trigger("renditiondisabled"));return f}},q=function n(c,f,a){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");var b=c.masterPlaylistController_.fastQualityChange_.bind(c.masterPlaylistController_);
if(f.attributes.RESOLUTION){var d=f.attributes.RESOLUTION;this.width=d.width;this.height=d.height}this.bandwidth=f.attributes.BANDWIDTH;this.id=a;this.enabled=h(c.playlists,f.uri,b)};g["default"]=function(d){var c=d.playlists;d.representations=function(){return c.master.playlists.filter(function(c){return!(0,b.isIncompatible)(c)}).map(function(c,a){return new q(d,c,c.uri)})}};k.exports=g["default"]},{"./playlist.js":11}],15:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=d("url-toolkit"),
h=b&&b.__esModule?b:{"default":b},q=(d=d("global/window"))&&d.__esModule?d:{"default":d};g["default"]=function(b,d){if(/^[a-z]+:/i.test(d))return d;/\/\//i.test(b)||(b=h["default"].buildAbsoluteURL(q["default"].location.href,b));return h["default"].buildAbsoluteURL(b,d)};k.exports=g["default"]},{"global/window":32,"url-toolkit":63}],16:[function(d,k,g){(function(b){function h(e){return e&&e.__esModule?e:{"default":e}}function q(e,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+
typeof a);e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(e,a):e.__proto__=a)}Object.defineProperty(g,"__esModule",{value:!0});var r=function(){function e(a,c){for(var f=0;f<c.length;f++){var b=c[f];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(a,b.key,b)}}return function(a,c,f){c&&e(a.prototype,c);f&&e(a,f);return a}}(),n=function(e,a,c){var f=
!0;for(;f;)if(null===e&&(e=Function.prototype),f=Object.getOwnPropertyDescriptor(e,a),void 0===f){e=Object.getPrototypeOf(e);if(null===e)break;f=!0}else{if("value"in f)return f.value;a=f.get;return void 0===a?void 0:a.call(c)}},c=d("./playlist"),f=h(c),a=h("undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null);b=d("./source-updater");var l=h(b);b=d("./config");var v=h(b);b=d("global/window");var p=h(b);b=d("videojs-contrib-media-sources/es5/remove-cues-from-track.js");var t=
h(b),e=d("./bin-utils"),u=d("./media-segment-request"),A=d("./ranges"),k=d("./playlist-selectors"),x=function(e,a,c){if(!e||!a)return!1;c=c===e.segments.length;return e.endList&&"open"===a.readyState&&c},z=function(e,a,c){return"main"===e&&a&&c?c.containsAudio||c.containsVideo?a.containsVideo&&!c.containsVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!a.containsVideo&&
c.containsVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null};g.illegalMediaSwitch=z;var D=function(e,a,c){var f=void 0,f=e.length&&0<e.start(0)&&e.start(0)<a?e.start(0):a-30;return Math.min(f,a-c)};g.safeBackBufferTrimTime=D;b=function(c){function b(e){var c=this,f=1>=arguments.length||void 0===arguments[1]?
{}:arguments[1];if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");n(Object.getPrototypeOf(b.prototype),"constructor",this).call(this);if(!e)throw new TypeError("Initialization settings are required");if("function"!==typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.state="INIT";this.bandwidth=e.bandwidth;this.throughput={rate:0,count:0};this.roundTrip=NaN;this.resetStats_();
this.mediaIndex=null;this.hasPlayed_=e.hasPlayed;this.currentTime_=e.currentTime;this.seekable_=e.seekable;this.seeking_=e.seeking;this.duration_=e.duration;this.mediaSource_=e.mediaSource;this.hls_=e.hls;this.loaderType_=e.loaderType;this.startingMedia_=void 0;this.segmentMetadataTrack_=e.segmentMetadataTrack;this.goalBufferLength_=e.goalBufferLength;this.checkBufferTimeout_=null;this.error_=void 0;this.currentTimeline_=-1;this.activeInitSegmentId_=this.xhrOptions_=this.sourceUpdater_=this.mimeType_=
this.pendingSegment_=null;this.initSegments_={};this.decrypter_=e.decrypter;this.syncController_=e.syncController;this.syncPoint_={segmentIndex:0,time:0};this.syncController_.on("syncinfoupdate",function(){return c.trigger("syncinfoupdate")});this.mediaSource_.addEventListener("sourceopen",function(){return c.ended_=!1});this.fetchAtBuffer_=!1;f.debug&&(this.logger_=a["default"].log.bind(a["default"],"segment-loader",this.loaderType_,"->"))}q(b,c);r(b,[{key:"resetStats_",value:function(){this.mediaSecondsLoaded=
this.mediaTransferDuration=this.mediaRequestsErrored=this.mediaRequestsTimedout=this.mediaRequestsAborted=this.mediaRequests=this.mediaBytesTransferred=0}},{key:"dispose",value:function(){this.state="DISPOSED";this.pause();this.abort_();this.sourceUpdater_&&this.sourceUpdater_.dispose();this.resetStats_()}},{key:"abort",value:function(){"WAITING"!==this.state?this.pendingSegment_&&(this.pendingSegment_=null):(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_())}},{key:"abort_",value:function(){this.pendingSegment_&&
this.pendingSegment_.abortRequests();this.pendingSegment_=null}},{key:"error",value:function(e){"undefined"!==typeof e&&(this.error_=e);this.pendingSegment_=null;return this.error_}},{key:"endOfStream",value:function(){this.ended_=!0;this.pause();this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():a["default"].createTimeRanges()}},{key:"initSegment",value:function(a){var c=1>=arguments.length||void 0===arguments[1]?!1:arguments[1];if(!a)return null;
var f=(0,e.initSegmentId)(a),b=this.initSegments_[f];c&&!b&&a.bytes&&(this.initSegments_[f]=b={resolvedUri:a.resolvedUri,byterange:a.byterange,bytes:a.bytes});return b||a}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&"INIT"===this.state)&&!this.paused()}},{key:"load",value:function(){this.monitorBuffer_();if(this.playlist_){this.syncController_.setDateTimeMapping(this.playlist_);if("INIT"===this.state&&this.couldBeginLoading_())return this.init_();
!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}}},{key:"init_",value:function(){this.state="READY";this.sourceUpdater_=new l["default"](this.mediaSource_,this.mimeType_);this.resetEverything();return this.monitorBuffer_()}},{key:"playlist",value:function(e){var a=1>=arguments.length||void 0===arguments[1]?{}:arguments[1];if(e){var c=this.playlist_,f=this.pendingSegment_;this.playlist_=e;this.xhrOptions_=a;this.hasPlayed_()||(e.syncInfo={mediaSequence:e.mediaSequence,
time:0});this.trigger("syncinfoupdate");if("INIT"===this.state&&this.couldBeginLoading_())return this.init_();c&&c.uri===e.uri?(a=e.mediaSequence-c.mediaSequence,this.logger_("mediaSequenceDiff",a),null!==this.mediaIndex&&(this.mediaIndex-=a),f&&(f.mediaIndex-=a,0<=f.mediaIndex&&(f.segment=e.segments[f.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(c,e)):null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(p["default"].clearTimeout(this.checkBufferTimeout_),
this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(e){this.mimeType_||(this.mimeType_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(){this.ended_=!1;this.resetLoader();this.remove(0,this.duration_());this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1;this.resyncLoader()}},{key:"resyncLoader",value:function(){this.syncPoint_=
this.mediaIndex=null;this.abort()}},{key:"remove",value:function(e,a){this.sourceUpdater_&&this.sourceUpdater_.remove(e,a);(0,t["default"])(e,a,this.segmentMetadataTrack_)}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&p["default"].clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=p["default"].setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_();this.checkBufferTimeout_&&p["default"].clearTimeout(this.checkBufferTimeout_);
this.checkBufferTimeout_=p["default"].setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e)if(x(this.playlist_,this.mediaSource_,e.mediaIndex))this.endOfStream();
else if(e.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_()){if(e.timeline!==this.currentTimeline_||null!==e.startOfSegment&&e.startOfSegment<this.sourceUpdater_.timestampOffset())this.syncController_.reset(),e.timestampOffset=e.startOfSegment;this.loadSegment_(e)}}}},{key:"checkBuffer_",value:function(e,a,c,b,l,d){var t=0,p=void 0;e.length&&(t=e.end(e.length-1));e=Math.max(0,t-l);if(!a.segments.length||e>=this.goalBufferLength_()||!b&&1<=e)return null;
this.logger_("checkBuffer_","mediaIndex:",c,"hasPlayed:",b,"currentTime:",l,"syncPoint:",d,"fetchAtBuffer:",this.fetchAtBuffer_,"bufferedTime:",e);if(null===d)return c=this.getSyncSegmentCandidate_(a),this.logger_("getSync","mediaIndex:",c),this.generateSegmentInfo_(a,c,null,!0);if(null!==c)return this.logger_("walkForward","mediaIndex:",c+1),p=(b=a.segments[c])&&b.end?b.end:t,this.generateSegmentInfo_(a,c+1,p,!1);t=this.fetchAtBuffer_?f["default"].getMediaInfoForTime(a,t,d.segmentIndex,d.time):f["default"].getMediaInfoForTime(a,
l,d.segmentIndex,d.time);c=t.mediaIndex;p=t.startTime;this.logger_("getMediaIndexForTime","mediaIndex:",c,"startOfSegment:",p);return this.generateSegmentInfo_(a,c,p,!1)}},{key:"getSyncSegmentCandidate_",value:function(e){var a=this;if(-1===this.currentTimeline_)return 0;var c=e.segments.map(function(e,a){return{timeline:e.timeline,segmentIndex:a}}).filter(function(e){return e.timeline===a.currentTimeline_});return c.length?c[Math.min(c.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0)}},
{key:"generateSegmentInfo_",value:function(e,a,c,f){if(0>a||a>=e.segments.length)return null;var b=e.segments[a];return{requestId:"segment-loader-"+Math.random(),uri:b.resolvedUri,mediaIndex:a,isSyncRequest:f,startOfSegment:c,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:b.timeline,duration:b.duration,segment:b}}},{key:"abortRequestEarly_",value:function(e){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH||1E3>Date.now()-(e.firstBytesReceivedAt||
Date.now()))return!1;var a=this.currentTime_(),c=e.bandwidth,b=this.pendingSegment_.duration,l=f["default"].estimateSegmentRequestTime(b,c,this.playlist_,e.bytesReceived);e=(0,A.timeUntilRebuffer)(this.buffered_(),a,this.hls_.tech_.playbackRate())-1;if(l<=e)return!1;if(a=(0,k.minRebufferMaxBandwidthSelector)({master:this.hls_.playlists.master,currentTime:a,bandwidth:c,duration:this.duration_(),segmentDuration:b,timeUntilRebuffer:e,currentTimeline:this.currentTimeline_,syncController:this.syncController_})){c=
l-e-a.rebufferingImpact;b=.5;e<=A.TIME_FUDGE_FACTOR&&(b=1);if(!a.playlist||a.playlist.uri===this.playlist_.uri||c<b)return!1;this.bandwidth=a.playlist.attributes.BANDWIDTH*v["default"].BANDWIDTH_VARIANCE+1;this.abort();this.trigger("earlyabort");return!0}}},{key:"handleProgress_",value:function(e,a){this.pendingSegment_&&a.requestId===this.pendingSegment_.requestId&&!this.abortRequestEarly_(a.stats)&&this.trigger("progress")}},{key:"loadSegment_",value:function(e){this.state="WAITING";this.pendingSegment_=
e;this.trimBackBuffer_(e);e.abortRequests=(0,u.mediaSegmentRequest)(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.createSimplifiedSegmentObj_(e),this.handleProgress_.bind(this),this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(e){e=D(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);0<e&&this.remove(0,e)}},{key:"createSimplifiedSegmentObj_",value:function(e){var a=e.segment,c={resolvedUri:a.resolvedUri,byterange:a.byterange,requestId:e.requestId};
a.key&&(e=a.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]),c.key={resolvedUri:a.key.resolvedUri,iv:e});a.map&&(c.map=this.initSegment(a.map));return c}},{key:"segmentRequestFinished_",value:function(e,a){this.mediaRequests+=1;a.stats&&(this.mediaBytesTransferred+=a.stats.bytesReceived,this.mediaTransferDuration+=a.stats.roundTripTime);this.pendingSegment_?a.requestId===this.pendingSegment_.requestId&&(e?(this.pendingSegment_=null,this.state="READY",e.code===u.REQUEST_ERRORS.ABORTED?
this.mediaRequestsAborted+=1:(this.pause(),e.code===u.REQUEST_ERRORS.TIMEOUT?(this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")):(this.mediaRequestsErrored+=1,this.error(e),this.trigger("error")))):(this.bandwidth=a.stats.bandwidth,this.roundTrip=a.stats.roundTripTime,a.map&&(a.map=this.initSegment(a.map,!0)),this.processSegmentResponse_(a))):this.mediaRequestsAborted+=1}},{key:"processSegmentResponse_",value:function(e){var a=this.pendingSegment_;a.bytes=
e.bytes;e.map&&(a.segment.map.bytes=e.map.bytes);a.endOfAllRequests=e.endOfAllRequests;this.handleSegment_()}},{key:"handleSegment_",value:function(){var a=this;if(this.pendingSegment_){var c=this.pendingSegment_,f=c.segment,b=this.syncController_.probeSegmentInfo(c);"undefined"===typeof this.startingMedia_&&b&&(b.containsAudio||b.containsVideo)&&(this.startingMedia_={containsAudio:b.containsAudio,containsVideo:b.containsVideo});(b=z(this.loaderType_,this.startingMedia_,b))?(this.error({message:b,
blacklistDuration:Infinity}),this.trigger("error")):c.isSyncRequest?(this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY"):(null!==c.timestampOffset&&c.timestampOffset!==this.sourceUpdater_.timestampOffset()&&(this.sourceUpdater_.timestampOffset(c.timestampOffset),this.trigger("timestampoffset")),b=this.syncController_.mappingForTimeline(c.timeline),null!==b&&this.trigger({type:"segmenttimemapping",mapping:b}),this.state="APPENDING",f.map&&function(){var c=(0,e.initSegmentId)(f.map);
if(!a.activeInitSegmentId_||a.activeInitSegmentId_!==c){var b=a.initSegment(f.map);a.sourceUpdater_.appendBuffer(b.bytes,function(){a.activeInitSegmentId_=c})}}(),c.byteLength=c.bytes.byteLength,this.mediaSecondsLoaded="number"===typeof f.start&&"number"===typeof f.end?this.mediaSecondsLoaded+(f.end-f.start):this.mediaSecondsLoaded+f.duration,this.sourceUpdater_.appendBuffer(c.bytes,this.handleUpdateEnd_.bind(this)))}else this.state="READY"}},{key:"handleUpdateEnd_",value:function(){this.logger_("handleUpdateEnd_",
"segmentInfo:",this.pendingSegment_);if(this.pendingSegment_){var e=this.pendingSegment_,a=e.segment,c=null!==this.mediaIndex;this.pendingSegment_=null;this.recordThroughput_(e);this.addSegmentMetadataCue_(e);this.state="READY";this.mediaIndex=e.mediaIndex;this.fetchAtBuffer_=!0;this.currentTimeline_=e.timeline;this.trigger("syncinfoupdate");a.end&&this.currentTime_()-a.end>3*e.playlist.targetDuration?this.resetEverything():(c&&this.trigger("bandwidthupdate"),this.trigger("progress"),x(e.playlist,
this.mediaSource_,e.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}else this.state="READY",this.paused()||this.monitorBuffer_()}},{key:"recordThroughput_",value:function(e){var a=this.throughput.rate,c=Date.now()-e.endOfAllRequests+1;this.throughput.rate+=(Math.floor(e.byteLength/c*8E3)-a)/++this.throughput.count}},{key:"logger_",value:function(){}},{key:"addSegmentMetadataCue_",value:function(e){if(this.segmentMetadataTrack_){var a=e.segment,c=a.start,a=a.end;if("number"===
typeof c&&isFinite(c)&&"number"===typeof a&&isFinite(a)){(0,t["default"])(c,a,this.segmentMetadataTrack_);var f=p["default"].WebKitDataCue||p["default"].VTTCue;e={bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.uri,start:c,end:a};var b=JSON.stringify(e),c=new f(c,a,b);c.value=e;this.segmentMetadataTrack_.addCue(c)}}}}]);return b}(a["default"].EventTarget);
g["default"]=b}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./bin-utils":2,"./config":3,"./media-segment-request":7,"./playlist":11,"./playlist-selectors":10,"./ranges":12,"./source-updater":17,"global/window":32,"videojs-contrib-media-sources/es5/remove-cues-from-track.js":72}],17:[function(d,k,g){(function(b){Object.defineProperty(g,"__esModule",{value:!0});var d=function(){function b(c,f){for(var a=0;a<f.length;a++){var l=
f[a];l.enumerable=l.enumerable||!1;l.configurable=!0;"value"in l&&(l.writable=!0);Object.defineProperty(c,l.key,l)}}return function(c,f,a){f&&b(c.prototype,f);a&&b(c,a);return c}}(),q=(b="undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null)&&b.__esModule?b:{"default":b},r=function(){};b=function(){function b(c,f){var a=this;if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var l=function(){a.sourceBuffer_=c.addSourceBuffer(f);a.onUpdateendCallback_=
function(){var c=a.pendingCallback_;a.pendingCallback_=null;c&&c();a.runCallback_()};a.sourceBuffer_.addEventListener("updateend",a.onUpdateendCallback_);a.runCallback_()};this.callbacks_=[];this.pendingCallback_=null;this.timestampOffset_=0;this.mediaSource=c;this.processedAppend_=!1;"closed"===c.readyState?c.addEventListener("sourceopen",l):l()}d(b,[{key:"abort",value:function(c){var f=this;this.processedAppend_&&this.queueCallback_(function(){f.sourceBuffer_.abort()},c)}},{key:"appendBuffer",value:function(c,
f){var a=this;this.processedAppend_=!0;this.queueCallback_(function(){a.sourceBuffer_.appendBuffer(c)},f)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:q["default"].createTimeRanges()}},{key:"remove",value:function(c,f){var a=this;this.processedAppend_&&this.queueCallback_(function(){a.sourceBuffer_.remove(c,f)},r)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(c){var f=
this;"undefined"!==typeof c&&(this.queueCallback_(function(){f.sourceBuffer_.timestampOffset=c}),this.timestampOffset_=c);return this.timestampOffset_}},{key:"queueCallback_",value:function(c,f){this.callbacks_.push([c.bind(this),f]);this.runCallback_()}},{key:"runCallback_",value:function(){var c=void 0;!this.updating()&&this.callbacks_.length&&(c=this.callbacks_.shift(),this.pendingCallback_=c[1],c[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_);
this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()}}]);return b}();g["default"]=b;k.exports=g["default"]}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],18:[function(d,k,g){(function(b){function h(a,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,enumerable:!1,
writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c)}Object.defineProperty(g,"__esModule",{value:!0});var q=function(){function a(c,f){for(var e=0;e<f.length;e++){var b=f[e];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(c,b.key,b)}}return function(c,f,e){f&&a(c.prototype,f);e&&a(c,e);return c}}(),r=d("mux.js/lib/mp4/probe"),n=r&&r.__esModule?r:{"default":r},c=d("mux.js/lib/tools/ts-inspector.js"),f=
d("./playlist"),a=(b="undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null)&&b.__esModule?b:{"default":b},l=[{name:"VOD",run:function(a,c,f,e,b){return Infinity!==f?{time:0,segmentIndex:0}:null}},{name:"ProgramDateTime",run:function(a,c,f,e,b){return a.datetimeToDisplayTime&&c.dateTimeObject?{time:c.dateTimeObject.getTime()/1E3+a.datetimeToDisplayTime,segmentIndex:0}:null}},{name:"Segment",run:function(a,c,f,e,b){a=c.segments||[];f=c=null;b=b||0;for(var l=0;l<a.length;l++){var d=
a[l];if(d.timeline===e&&"undefined"!==typeof d.start){var h=Math.abs(b-d.start);if(null!==f&&f<h)break;if(!c||null===f||f>=h)f=h,c={time:d.start,segmentIndex:l}}}return c}},{name:"Discontinuity",run:function(a,c,f,e,b){f=null;b=b||0;if(c.discontinuityStarts&&c.discontinuityStarts.length){e=null;for(var l=0;l<c.discontinuityStarts.length;l++){var d=c.discontinuityStarts[l],h=a.discontinuities[c.discontinuitySequence+l+1];if(h){var n=Math.abs(b-h.time);if(null!==e&&e<n)break;if(!f||null===e||e>=n)e=
n,f={time:h.time,segmentIndex:d}}}}return f}},{name:"Playlist",run:function(a,c,f,e,b){return c.syncInfo?{time:c.syncInfo.time,segmentIndex:c.syncInfo.mediaSequence-c.mediaSequence}:null}}];g.syncPointStrategies=l;b=function(b){function d(){var c=0>=arguments.length||void 0===arguments[0]?{}:arguments[0];if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");var e;a:{var f=Object.getPrototypeOf(d.prototype),b="constructor";e=this;var l=!0;for(;l;)if(null===f&&(f=Function.prototype),
l=Object.getOwnPropertyDescriptor(f,b),void 0===l){f=Object.getPrototypeOf(f);if(null===f)break;l=!0}else{if("value"in l){e=l.value;break a}b=l.get;e=void 0===b?void 0:b.call(e);break a}e=void 0}e.call(this);this.inspectCache_=void 0;this.timelines=[];this.discontinuities=[];this.datetimeToDisplayTime=null;c.debug&&(this.logger_=a["default"].log.bind(a["default"],"sync-controller ->"))}h(d,b);q(d,[{key:"getSyncPoint",value:function(a,e,c,f){a=this.runStrategies_(a,e,c,f);return a.length?this.selectSyncPoint_(a,
{key:"time",value:f}):null}},{key:"getExpiredTime",value:function(a,e){if(!a||!a.segments)return null;var c=this.runStrategies_(a,e,a.discontinuitySequence,0);if(!c.length)return null;c=this.selectSyncPoint_(c,{key:"segmentIndex",value:0});0<c.segmentIndex&&(c.time*=-1);return Math.abs(c.time+(0,f.sumDurations)(a,c.segmentIndex,0))}},{key:"runStrategies_",value:function(a,e,c,f){for(var b=[],d=0;d<l.length;d++){var h=l[d],n=h.run(this,a,e,c,f);n&&(n.strategy=h.name,b.push({strategy:h.name,syncPoint:n}),
this.logger_("syncPoint found via <"+h.name+">:",n))}return b}},{key:"selectSyncPoint_",value:function(a,e){for(var c=a[0].syncPoint,f=Math.abs(a[0].syncPoint[e.key]-e.value),b=a[0].strategy,l=1;l<a.length;l++){var d=Math.abs(a[l].syncPoint[e.key]-e.value);d<f&&(f=d,c=a[l].syncPoint,b=a[l].strategy)}this.logger_("syncPoint with strategy <"+b+"> chosen: ",c);return c}},{key:"saveExpiredSegmentInfo",value:function(a,e){for(var c=e.mediaSequence-a.mediaSequence-1;0<=c;c--){var f=a.segments[c];if(f&&
"undefined"!==typeof f.start){e.syncInfo={mediaSequence:a.mediaSequence+c,time:f.start};this.logger_("playlist sync:",e.syncInfo);this.trigger("syncinfoupdate");break}}}},{key:"setDateTimeMapping",value:function(a){!this.datetimeToDisplayTime&&a.dateTimeObject&&(this.datetimeToDisplayTime=-(a.dateTimeObject.getTime()/1E3))}},{key:"reset",value:function(){this.inspectCache_=void 0}},{key:"probeSegmentInfo",value:function(a){var e=a.segment,c=a.playlist,f=void 0;(f=e.map?this.probeMp4Segment_(a):this.probeTsSegment_(a))&&
this.calculateSegmentTimeMapping_(a,f)&&(this.saveDiscontinuitySyncInfo_(a),c.syncInfo||(c.syncInfo={mediaSequence:c.mediaSequence+a.mediaIndex,time:e.start}));return f}},{key:"probeMp4Segment_",value:function(a){var e=a.segment,c=n["default"].timescale(e.map.bytes),c=n["default"].startTime(c,a.bytes);null!==a.timestampOffset&&(a.timestampOffset-=c);return{start:c,end:c+e.duration}}},{key:"probeTsSegment_",value:function(a){a=(0,c.inspect)(a.bytes,this.inspectCache_);var e=void 0,f=void 0;if(!a)return null;
a.video&&2===a.video.length?(this.inspectCache_=a.video[1].dts,e=a.video[0].dtsTime,f=a.video[1].dtsTime):a.audio&&2===a.audio.length&&(this.inspectCache_=a.audio[1].dts,e=a.audio[0].dtsTime,f=a.audio[1].dtsTime);return{start:e,end:f,containsVideo:a.video&&2===a.video.length,containsAudio:a.audio&&2===a.audio.length}}},{key:"timestampOffsetForTimeline",value:function(a){return"undefined"===typeof this.timelines[a]?null:this.timelines[a].time}},{key:"mappingForTimeline",value:function(a){return"undefined"===
typeof this.timelines[a]?null:this.timelines[a].mapping}},{key:"calculateSegmentTimeMapping_",value:function(a,e){var c=a.segment,f=this.timelines[a.timeline];if(null!==a.timestampOffset)this.logger_("tsO:",a.timestampOffset),f={time:a.startOfSegment,mapping:a.startOfSegment-e.start},this.timelines[a.timeline]=f,this.trigger("timestampoffset"),c.start=a.startOfSegment,c.end=e.end+f.mapping;else if(f)c.start=e.start+f.mapping,c.end=e.end+f.mapping;else return!1;return!0}},{key:"saveDiscontinuitySyncInfo_",
value:function(a){var e=a.playlist,c=a.segment;if(c.discontinuity)this.discontinuities[c.timeline]={time:c.start,accuracy:0};else if(e.discontinuityStarts.length)for(var b=0;b<e.discontinuityStarts.length;b++){var l=e.discontinuityStarts[b],d=e.discontinuitySequence+b+1,h=l-a.mediaIndex,n=Math.abs(h);if(!this.discontinuities[d]||this.discontinuities[d].accuracy>n){var p=void 0,p=0>h?c.start-(0,f.sumDurations)(e,a.mediaIndex,l):c.end+(0,f.sumDurations)(e,a.mediaIndex+1,l);this.discontinuities[d]={time:p,
accuracy:n}}}}},{key:"logger_",value:function(){}}]);return d}(a["default"].EventTarget);g["default"]=b}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./playlist":11,"mux.js/lib/mp4/probe":57,"mux.js/lib/tools/ts-inspector.js":59}],19:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});g.parseCodecs=function(){var b=0>=arguments.length||void 0===arguments[0]?"":arguments[0],d={codecCount:0},q=void 0;d.codecCount=
b.split(",").length;d.codecCount=d.codecCount||2;if(q=/(^|\s|,)+(avc1)([^ ,]*)/i.exec(b))d.videoCodec=q[2],d.videoObjectTypeIndicator=q[3];d.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(b);d.audioProfile=d.audioProfile&&d.audioProfile[2];return d}},{}],20:[function(d,k,g){(function(b){function h(a){return a&&a.__esModule?a:{"default":a}}function q(a,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);a.prototype=
Object.create(c&&c.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c)}Object.defineProperty(g,"__esModule",{value:!0});var r=function(){function a(c,e){for(var f=0;f<e.length;f++){var b=e[f];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(c,b.key,b)}}return function(c,e,f){e&&a(c.prototype,e);f&&a(c,f);return c}}(),n=d("./segment-loader"),n=h(n),c=h("undefined"!==
typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null);b=d("global/window");var f=h(b);b=d("videojs-contrib-media-sources/es5/remove-cues-from-track.js");var a=h(b),l=d("./bin-utils"),v=new Uint8Array(["\n","\n"].map(function(a){return a.charCodeAt(0)})),n=function(b){function d(e){var a=1>=arguments.length||void 0===arguments[1]?{}:arguments[1];if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");var c;a:{var f=Object.getPrototypeOf(d.prototype),b="constructor";
c=this;var l=!0;for(;l;)if(null===f&&(f=Function.prototype),l=Object.getOwnPropertyDescriptor(f,b),void 0===l){f=Object.getPrototypeOf(f);if(null===f)break;l=!0}else{if("value"in l){c=l.value;break a}b=l.get;c=void 0===b?void 0:b.call(c);break a}c=void 0}c.call(this,e,a);this.subtitlesTrack_=this.mediaSource_=null}q(d,b);r(d,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return c["default"].createTimeRanges();var e=this.subtitlesTrack_.cues;return c["default"].createTimeRanges([[e[0].startTime,
e[e.length-1].startTime]])}},{key:"initSegment",value:function(e){var a=1>=arguments.length||void 0===arguments[1]?!1:arguments[1];if(!e)return null;var c=(0,l.initSegmentId)(e),f=this.initSegments_[c];a&&!f&&e.bytes&&(a=new Uint8Array(v.byteLength+e.bytes.byteLength),a.set(e.bytes),a.set(v,e.bytes.byteLength),this.initSegments_[c]=f={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:a});return f||e}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},
{key:"init_",value:function(){this.state="READY";this.resetEverything();return this.monitorBuffer_()}},{key:"track",value:function(e){if("undefined"===typeof e)return this.subtitlesTrack_;this.subtitlesTrack_=e;"INIT"===this.state&&this.couldBeginLoading_()&&this.init_();return this.subtitlesTrack_}},{key:"remove",value:function(e,c){(0,a["default"])(e,c,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var e=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,
this.duration_(),this.currentTimeline_,this.currentTime_()));var a=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(a=this.skipEmptySegments_(a))null===this.syncController_.timestampOffsetForTimeline(a.timeline)?(this.syncController_.one("timestampoffset",function(){e.state="READY";e.paused()||e.monitorBuffer_()}),this.state="WAITING_ON_TIMELINE"):this.loadSegment_(a)}},{key:"skipEmptySegments_",value:function(e){for(;e&&e.segment.empty;)e=
this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e}},{key:"handleSegment_",value:function(){var e=this;if(this.pendingSegment_&&this.subtitlesTrack_){this.state="APPENDING";var a=this.pendingSegment_,c=a.segment;if("function"!==typeof f["default"].WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var b=function(){var a=function(){e.handleSegment_()};e.state="WAITING_ON_VTTJS";e.subtitlesTrack_.tech_.one("vttjsloaded",a);e.subtitlesTrack_.tech_.one("vttjserror",
function(){e.subtitlesTrack_.tech_.off("vttjsloaded",a);e.error({message:"Error loading vtt.js"});e.state="READY";e.pause();e.trigger("error")});return{v:void 0}}();if("object"===typeof b)return b.v}c.requested=!0;try{this.parseVTTCues_(a)}catch(l){return this.error({message:l.message}),this.state="READY",this.pause(),this.trigger("error")}this.updateTimeMapping_(a,this.syncController_.timelines[a.timeline],this.playlist_);a.isSyncRequest?(this.trigger("syncinfoupdate"),this.pendingSegment_=null,
this.state="READY"):(a.byteLength=a.bytes.byteLength,this.mediaSecondsLoaded+=c.duration,a.cues.length&&this.remove(a.cues[0].endTime,a.cues[a.cues.length-1].endTime),a.cues.forEach(function(a){e.subtitlesTrack_.addCue(a)}),this.handleUpdateEnd_())}else this.state="READY"}},{key:"parseVTTCues_",value:function(e){var a=void 0,b=!1;"function"===typeof f["default"].TextDecoder?a=new f["default"].TextDecoder("utf8"):(a=f["default"].WebVTT.StringDecoder(),b=!0);a=new f["default"].WebVTT.Parser(f["default"],
f["default"].vttjs,a);e.cues=[];e.timestampmap={MPEGTS:0,LOCAL:0};a.oncue=e.cues.push.bind(e.cues);a.ontimestampmap=function(a){return e.timestampmap=a};a.onparsingerror=function(e){c["default"].log.warn("Error encountered when parsing cues: "+e.message)};if(e.segment.map){var l=e.segment.map.bytes;b&&(l=String.fromCharCode.apply(null,l));a.parse(l)}l=e.bytes;b&&(l=String.fromCharCode.apply(null,l));a.parse(l);a.flush()}},{key:"updateTimeMapping_",value:function(e,a,c){var f=e.segment;if(a)if(e.cues.length){var b=
e.timestampmap,l=b.MPEGTS/9E4-b.LOCAL+a.mapping;e.cues.forEach(function(e){e.startTime+=l;e.endTime+=l});c.syncInfo||(c.syncInfo={mediaSequence:c.mediaSequence+e.mediaIndex,time:Math.min(e.cues[0].startTime,e.cues[e.cues.length-1].startTime-f.duration)})}else f.empty=!0}}]);return d}(n["default"]);g["default"]=n;k.exports=g["default"]}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./bin-utils":2,"./segment-loader":16,"global/window":32,
"videojs-contrib-media-sources/es5/remove-cues-from-track.js":72}],21:[function(d,k,g){(function(b){Object.defineProperty(g,"__esModule",{value:!0});var d="undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null,q=d&&d.__esModule?d:{"default":d};g["default"]=function(){return function n(c,f){c=(0,d.mergeOptions)({timeout:45E3},c);var a=n.beforeRequest||q["default"].Hls.xhr.beforeRequest;a&&"function"===typeof a&&(a=a(c))&&(c=a);var b=(0,d.xhr)(c,function(a,c){var e=b.response;
!a&&e&&(b.responseTime=Date.now(),b.roundTripTime=b.responseTime-b.requestTime,b.bytesReceived=e.byteLength||e.length,b.bandwidth||(b.bandwidth=Math.floor(b.bytesReceived/b.roundTripTime*8E3)));a&&"ETIMEDOUT"===a.code&&(b.timedout=!0);a||b.aborted||200===c.statusCode||206===c.statusCode||0===c.statusCode||(a=Error("XHR Failed with a response of: "+(b&&(e||b.responseText))));f(a,b)}),g=b.abort;b.abort=function(){b.aborted=!0;return g.apply(b,arguments)};b.uri=c.uri;b.requestTime=Date.now();return b}};
k.exports=g["default"]}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],22:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=function(){function b(d,h){for(var c=0;c<h.length;c++){var f=h[c];f.enumerable=f.enumerable||!1;f.configurable=!0;"value"in f&&(f.writable=!0);Object.defineProperty(d,f.key,f)}}return function(d,h,c){h&&b(d.prototype,h);c&&b(d,c);return d}}(),h=null;d=function(){function d(b){if(!(this instanceof
d))throw new TypeError("Cannot call a class as a function");if(!h){for(var n=[[[],[],[],[],[]],[[],[],[],[],[]]],c=n[0],f=n[1],a=c[4],l=f[4],g=void 0,p=void 0,t=void 0,e=[],u=[],k=void 0,B=g=void 0,x=void 0,z=B=void 0,g=0;256>g;g++)u[(e[g]=g<<1^283*(g>>7))^g]=g;for(p=t=0;!a[p];p^=k||1,t=u[t]||1)for(x=t^t<<1^t<<2^t<<3^t<<4,x=x>>8^x&255^99,a[p]=x,l[x]=p,B=e[g=e[k=e[p]]],z=16843009*B^65537*g^257*k^16843008*p,B=257*e[x]^16843008*x,g=0;4>g;g++)c[g][p]=B=B<<24^B>>>8,f[g][x]=z=z<<24^z>>>8;for(g=0;5>g;g++)c[g]=
c[g].slice(0),f[g]=f[g].slice(0);h=n}this._tables=[[h[0][0].slice(),h[0][1].slice(),h[0][2].slice(),h[0][3].slice(),h[0][4].slice()],[h[1][0].slice(),h[1][1].slice(),h[1][2].slice(),h[1][3].slice(),h[1][4].slice()]];a=f=c=t=n=void 0;l=this._tables[0][4];p=this._tables[1];t=b.length;e=1;if(4!==t&&6!==t&&8!==t)throw Error("Invalid aes key size");f=b.slice(0);a=[];this._key=[f,a];for(n=t;n<4*t+28;n++){c=f[n-1];if(0===n%t||8===t&&4===n%t)c=l[c>>>24]<<24^l[c>>16&255]<<16^l[c>>8&255]<<8^l[c&255],0===n%
t&&(c=c<<8^c>>>24^e<<24,e=e<<1^283*(e>>7));f[n]=f[n-t]^c}for(t=0;n;t++,n--)c=f[t&3?n:n-4],a[t]=4>=n||4>t?c:p[0][l[c>>>24]]^p[1][l[c>>16&255]]^p[2][l[c>>8&255]]^p[3][l[c&255]]}b(d,[{key:"decrypt",value:function(b,d,c,f,a,l){var h=this._key[1];b^=h[0];f^=h[1];c^=h[2];d^=h[3];for(var p=void 0,g=void 0,e=void 0,q=h.length/4-2,k=void 0,B=4,p=this._tables[1],x=p[0],z=p[1],D=p[2],y=p[3],C=p[4],k=0;k<q;k++)p=x[b>>>24]^z[f>>16&255]^D[c>>8&255]^y[d&255]^h[B],g=x[f>>>24]^z[c>>16&255]^D[d>>8&255]^y[b&255]^h[B+
1],e=x[c>>>24]^z[d>>16&255]^D[b>>8&255]^y[f&255]^h[B+2],d=x[d>>>24]^z[b>>16&255]^D[f>>8&255]^y[c&255]^h[B+3],B+=4,b=p,f=g,c=e;for(k=0;4>k;k++)a[(3&-k)+l]=C[b>>>24]<<24^C[f>>16&255]<<16^C[c>>8&255]<<8^C[d&255]^h[B++],p=b,b=f,f=c,c=d,d=p}}]);return d}();g["default"]=d;k.exports=g["default"]},{}],23:[function(d,k,g){function b(b,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);b.prototype=Object.create(d&&d.prototype,{constructor:{value:b,
enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(b,d):b.__proto__=d)}Object.defineProperty(g,"__esModule",{value:!0});var h=function(){function b(d,c){for(var f=0;f<c.length;f++){var a=c[f];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(d,a.key,a)}}return function(d,c,f){c&&b(d.prototype,c);f&&b(d,f);return d}}(),q=(d=d("./stream"))&&d.__esModule?d:{"default":d};d=function(d){function n(){if(!(this instanceof
n))throw new TypeError("Cannot call a class as a function");var c;a:{var f=Object.getPrototypeOf(n.prototype),a="constructor";c=this;var b=!0;for(;b;)if(null===f&&(f=Function.prototype),b=Object.getOwnPropertyDescriptor(f,a),void 0===b){f=Object.getPrototypeOf(f);if(null===f)break;b=!0}else{if("value"in b){c=b.value;break a}a=b.get;c=void 0===a?void 0:a.call(c);break a}c=void 0}c.call(this,q["default"]);this.jobs=[];this.delay=1;this.timeout_=null}b(n,d);h(n,[{key:"processJob_",value:function(){this.jobs.shift()();
this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null}},{key:"push",value:function(c){this.jobs.push(c);this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}]);return n}(q["default"]);g["default"]=d;k.exports=g["default"]},{"./stream":26}],24:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=function(){function c(a,f){for(var b=0;b<f.length;b++){var d=f[b];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in
d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(a,b,d){b&&c(a.prototype,b);d&&c(a,d);return a}}(),h=(k=d("./aes"))&&k.__esModule?k:{"default":k},q=(k=d("./async-stream"))&&k.__esModule?k:{"default":k},r=d("pkcs7"),n=function(c){return c<<24|(c&65280)<<8|(c&16711680)>>8|c>>>24},c=function(c,a,b){var d=new Int32Array(c.buffer,c.byteOffset,c.byteLength>>2);a=new h["default"](Array.prototype.slice.call(a));c=new Uint8Array(c.byteLength);for(var p=new Int32Array(c.buffer),g=void 0,
e=void 0,q=void 0,r=void 0,k=void 0,x=void 0,z=void 0,D=void 0,y=void 0,g=b[0],e=b[1],q=b[2],r=b[3],y=0;y<d.length;y+=4)k=n(d[y]),x=n(d[y+1]),z=n(d[y+2]),D=n(d[y+3]),a.decrypt(k,x,z,D,p,y),p[y]=n(p[y]^g),p[y+1]=n(p[y+1]^e),p[y+2]=n(p[y+2]^q),p[y+3]=n(p[y+3]^r),g=k,e=x,q=z,r=D;return c};g.decrypt=c;d=function(){function f(a,c,b,d){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");var h=f.STEP,e=new Int32Array(a.buffer),g=new Uint8Array(a.byteLength);a=0;this.asyncStream_=
new q["default"];this.asyncStream_.push(this.decryptChunk_(e.subarray(a,a+h),c,b,g));for(a=h;a<e.length;a+=h)b=new Uint32Array([n(e[a-4]),n(e[a-3]),n(e[a-2]),n(e[a-1])]),this.asyncStream_.push(this.decryptChunk_(e.subarray(a,a+h),c,b,g));this.asyncStream_.push(function(){d(null,(0,r.unpad)(g))})}b(f,[{key:"decryptChunk_",value:function(a,f,b,d){return function(){var h=c(a,f,b);d.set(h,a.byteOffset)}}}],[{key:"STEP",get:function(){return 32E3}}]);return f}();g.Decrypter=d;g["default"]={Decrypter:d,
decrypt:c}},{"./aes":22,"./async-stream":23,pkcs7:28}],25:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=d("./decrypter");d=d("./async-stream");g["default"]={decrypt:b.decrypt,Decrypter:b.Decrypter,AsyncStream:(d&&d.__esModule?d:{"default":d})["default"]};k.exports=g["default"]},{"./async-stream":23,"./decrypter":24}],26:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=function(){function b(d,h){for(var n=0;n<h.length;n++){var c=h[n];c.enumerable=c.enumerable||
!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,g,n){g&&b(d.prototype,g);n&&b(d,n);return d}}();d=function(){function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this.listeners={}}b(d,[{key:"on",value:function(b,d){this.listeners[b]||(this.listeners[b]=[]);this.listeners[b].push(d)}},{key:"off",value:function(b,d){var h=void 0;if(!this.listeners[b])return!1;h=this.listeners[b].indexOf(d);this.listeners[b].splice(h,
1);return-1<h}},{key:"trigger",value:function(b){var d=void 0,h=void 0,c=void 0,f=void 0;if(d=this.listeners[b])if(2===arguments.length)for(c=d.length,h=0;h<c;++h)d[h].call(this,arguments[1]);else for(f=Array.prototype.slice.call(arguments,1),c=d.length,h=0;h<c;++h)d[h].apply(this,f)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(b){this.on("data",function(d){b.push(d)})}}]);return d}();g["default"]=d;k.exports=g["default"]},{}],27:[function(d,k,g){var b;k.exports=
function(d){var g=b[d.byteLength%16||0],r=new Uint8Array(d.byteLength+g.length);r.set(d);r.set(g,d.byteLength);return r};b=[[16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16],[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15],[14,14,14,14,14,14,14,14,14,14,14,14,14,14],[13,13,13,13,13,13,13,13,13,13,13,13,13],[12,12,12,12,12,12,12,12,12,12,12,12],[11,11,11,11,11,11,11,11,11,11,11],[10,10,10,10,10,10,10,10,10,10],[9,9,9,9,9,9,9,9,9],[8,8,8,8,8,8,8,8],[7,7,7,7,7,7,7],[6,6,6,6,6,6],[5,5,5,5,5],[4,4,4,4],
[3,3,3],[2,2],[1]]},{}],28:[function(d,k,g){g.pad=d("./pad.js");g.unpad=d("./unpad.js")},{"./pad.js":27,"./unpad.js":29}],29:[function(d,k,g){k.exports=function(b){return b.subarray(0,b.byteLength-b[b.byteLength-1])}},{}],30:[function(d,k,g){},{}],31:[function(d,k,g){g="undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{};g="undefined"!==typeof g?g:"undefined"!==typeof window?window:{};d=d("min-document");var b;"undefined"!==typeof document?b=document:
(b=g["__GLOBAL_DOCUMENT_CACHE@4"])||(b=g["__GLOBAL_DOCUMENT_CACHE@4"]=d);k.exports=b},{"min-document":30}],32:[function(d,k,g){d="undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{};k.exports="undefined"!==typeof window?window:"undefined"!==typeof d?d:"undefined"!==typeof self?self:{}},{}],33:[function(d,k,g){function b(b){return b&&b.__esModule?b:{"default":b}}g=d("./line-stream");g=b(g);var h=d("./parse-stream"),h=b(h);d=d("./parser");d=b(d);k.exports=
{LineStream:g["default"],ParseStream:h["default"],Parser:d["default"]}},{"./line-stream":34,"./parse-stream":35,"./parser":36}],34:[function(d,k,g){function b(b,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);b.prototype=Object.create(d&&d.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(b,d):b.__proto__=d)}Object.defineProperty(g,"__esModule",
{value:!0});var h=function(){function b(d,h){for(var c=0;c<h.length;c++){var f=h[c];f.enumerable=f.enumerable||!1;f.configurable=!0;"value"in f&&(f.writable=!0);Object.defineProperty(d,f.key,f)}}return function(d,h,c){h&&b(d.prototype,h);c&&b(d,c);return d}}();d=d("./stream");d=function(d){function g(){if(!(this instanceof g))throw new TypeError("Cannot call a class as a function");var b;b=(g.__proto__||Object.getPrototypeOf(g)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
b=!b||"object"!==typeof b&&"function"!==typeof b?this:b;b.buffer="";return b}b(g,d);h(g,[{key:"push",value:function(b){var c=void 0;this.buffer+=b;for(c=this.buffer.indexOf("\n");-1<c;c=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,c)),this.buffer=this.buffer.substring(c+1)}}]);return g}((d&&d.__esModule?d:{"default":d})["default"]);g["default"]=d},{"./stream":37}],35:[function(d,k,g){function b(b,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+
typeof c);b.prototype=Object.create(c&&c.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(b,c):b.__proto__=c)}Object.defineProperty(g,"__esModule",{value:!0});var h=function(){return function(b,c){if(Array.isArray(b))return b;$jscomp.initSymbol();$jscomp.initSymbolIterator();if(Symbol.iterator in Object(b)){var f=[],a=!0,d=!1,h=void 0;try{$jscomp.initSymbol();$jscomp.initSymbolIterator();for(var g=b[Symbol.iterator](),q;!(a=
(q=g.next()).done)&&(f.push(q.value),!c||f.length!==c);a=!0);}catch(e){d=!0,h=e}finally{try{if(!a&&g["return"])g["return"]()}finally{if(d)throw h;}}return f}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),q=function(){function b(c,f){for(var a=0;a<f.length;a++){var d=f[a];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(c,d.key,d)}}return function(c,f,a){f&&b(c.prototype,f);a&&b(c,a);return c}}();d=d("./stream");var r=
function(b){b=b.split(/(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))/);for(var c={},f=b.length,a=void 0;f--;)""!==b[f]&&(a=/([^=]*)=(.*)/.exec(b[f]).slice(1),a[0]=a[0].replace(/^\s+|\s+$/g,""),a[1]=a[1].replace(/^\s+|\s+$/g,""),a[1]=a[1].replace(/^['"](.*)['"]$/g,"$1"),c[a[0]]=a[1]);return c};d=function(d){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var f=(c.__proto__||Object.getPrototypeOf(c)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return!f||"object"!==typeof f&&"function"!==typeof f?this:f}b(c,d);q(c,[{key:"push",value:function(c){var a=void 0,b=void 0;c=c.replace(/^[\u0000\s]+|[\u0000\s]+$/g,"");0!==c.length&&("#"!==c[0]?this.trigger("data",{type:"uri",uri:c}):0!==c.indexOf("#EXT")?this.trigger("data",{type:"comment",text:c.slice(1)}):(c=c.replace("\r",""),(a=/^#EXTM3U/.exec(c))?this.trigger("data",{type:"tag",tagType:"m3u"}):(a=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(c))?(b={type:"tag",tagType:"inf"},a[1]&&(b.duration=parseFloat(a[1])),
a[2]&&(b.title=a[2]),this.trigger("data",b)):(a=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(c))?(b={type:"tag",tagType:"targetduration"},a[1]&&(b.duration=parseInt(a[1],10)),this.trigger("data",b)):(a=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(c))?(b={type:"tag",tagType:"totalduration"},a[1]&&(b.duration=parseInt(a[1],10)),this.trigger("data",b)):(a=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(c))?(b={type:"tag",tagType:"version"},a[1]&&(b.version=parseInt(a[1],10)),this.trigger("data",b)):(a=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(c))?
(b={type:"tag",tagType:"media-sequence"},a[1]&&(b.number=parseInt(a[1],10)),this.trigger("data",b)):(a=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(c))?(b={type:"tag",tagType:"discontinuity-sequence"},a[1]&&(b.number=parseInt(a[1],10)),this.trigger("data",b)):(a=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(c))?(b={type:"tag",tagType:"playlist-type"},a[1]&&(b.playlistType=a[1]),this.trigger("data",b)):(a=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(c))?(b={type:"tag",tagType:"byterange"},a[1]&&
(b.length=parseInt(a[1],10)),a[2]&&(b.offset=parseInt(a[2],10)),this.trigger("data",b)):(a=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(c))?(b={type:"tag",tagType:"allow-cache"},a[1]&&(b.allowed=!/NO/.test(a[1])),this.trigger("data",b)):(a=/^#EXT-X-MAP:?(.*)$/.exec(c))?(b={type:"tag",tagType:"map"},a[1]&&(c=r(a[1]),c.URI&&(b.uri=c.URI),c.BYTERANGE&&(c=c.BYTERANGE.split("@"),a=h(c,2),c=a[0],a=a[1],b.byterange={},c&&(b.byterange.length=parseInt(c,10)),a&&(b.byterange.offset=parseInt(a,10)))),this.trigger("data",
b)):(a=/^#EXT-X-STREAM-INF:?(.*)$/.exec(c))?(b={type:"tag",tagType:"stream-inf"},a[1]&&(b.attributes=r(a[1]),b.attributes.RESOLUTION&&(c=b.attributes.RESOLUTION.split("x"),a={},c[0]&&(a.width=parseInt(c[0],10)),c[1]&&(a.height=parseInt(c[1],10)),b.attributes.RESOLUTION=a),b.attributes.BANDWIDTH&&(b.attributes.BANDWIDTH=parseInt(b.attributes.BANDWIDTH,10)),b.attributes["PROGRAM-ID"]&&(b.attributes["PROGRAM-ID"]=parseInt(b.attributes["PROGRAM-ID"],10))),this.trigger("data",b)):(a=/^#EXT-X-MEDIA:?(.*)$/.exec(c))?
(b={type:"tag",tagType:"media"},a[1]&&(b.attributes=r(a[1])),this.trigger("data",b)):(a=/^#EXT-X-ENDLIST/.exec(c))?this.trigger("data",{type:"tag",tagType:"endlist"}):(a=/^#EXT-X-DISCONTINUITY/.exec(c))?this.trigger("data",{type:"tag",tagType:"discontinuity"}):(a=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(c))?(b={type:"tag",tagType:"program-date-time"},a[1]&&(b.dateTimeString=a[1],b.dateTimeObject=new Date(a[1])),this.trigger("data",b)):(a=/^#EXT-X-KEY:?(.*)$/.exec(c))?(b={type:"tag",tagType:"key"},
a[1]&&(b.attributes=r(a[1]),b.attributes.IV&&("0x"===b.attributes.IV.substring(0,2).toLowerCase()&&(b.attributes.IV=b.attributes.IV.substring(2)),b.attributes.IV=b.attributes.IV.match(/.{8}/g),b.attributes.IV[0]=parseInt(b.attributes.IV[0],16),b.attributes.IV[1]=parseInt(b.attributes.IV[1],16),b.attributes.IV[2]=parseInt(b.attributes.IV[2],16),b.attributes.IV[3]=parseInt(b.attributes.IV[3],16),b.attributes.IV=new Uint32Array(b.attributes.IV))),this.trigger("data",b)):(a=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(c))?
(b={type:"tag",tagType:"cue-out-cont"},b.data=a[1]?a[1]:"",this.trigger("data",b)):(a=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(c))?(b={type:"tag",tagType:"cue-out"},b.data=a[1]?a[1]:"",this.trigger("data",b)):(a=/^#EXT-X-CUE-IN:?(.*)?$/.exec(c))?(b={type:"tag",tagType:"cue-in"},b.data=a[1]?a[1]:"",this.trigger("data",b)):this.trigger("data",{type:"tag",data:c.slice(4)})))}}]);return c}((d&&d.__esModule?d:{"default":d})["default"]);g["default"]=d},{"./stream":37}],36:[function(d,k,g){function b(a){return a&&
a.__esModule?a:{"default":a}}function h(a,c){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!c||"object"!==typeof c&&"function"!==typeof c?a:c}function q(a,c){if("function"!==typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function, not "+typeof c);a.prototype=Object.create(c&&c.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});c&&(Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=
c)}Object.defineProperty(g,"__esModule",{value:!0});var r=Object.assign||function(a){for(var c=1;c<arguments.length;c++){var b=arguments[c],f;for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(a[f]=b[f])}return a},n=function(){function a(c,b){for(var f=0;f<b.length;f++){var e=b[f];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(c,e.key,e)}}return function(c,b,f){b&&a(c.prototype,b);f&&a(c,f);return c}}();k=d("./stream");k=b(k);var c=d("./line-stream"),
f=b(c);d=d("./parse-stream");var a=b(d);d=function(c){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var c=h(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));c.lineStream=new f["default"];c.parseStream=new a["default"];c.lineStream.pipe(c.parseStream);var d=[],e={},l=void 0,g=void 0,n=function(){},q={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},k=0;c.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};c.parseStream.on("data",function(a){var b=
void 0,f=void 0;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=a.allowed;"allowed"in a||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var c={};"length"in a&&(e.byterange=c,c.length=a.length,"offset"in a||(this.trigger("info",{message:"defaulting offset to zero"}),a.offset=0));"offset"in a&&(e.byterange=c,c.offset=a.offset)},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||
(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"}));"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"}));0<a.duration&&(e.duration=a.duration);0===a.duration&&(e.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"}));this.manifest.segments=d},key:function(){a.attributes?"NONE"===a.attributes.METHOD?g=null:a.attributes.URI?
(a.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),g={method:a.attributes.METHOD||"AES-128",uri:a.attributes.URI},"undefined"!==typeof a.attributes.IV&&(g.iv=a.attributes.IV)):this.trigger("warn",{message:"ignoring key declaration without URI"}):this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(a.number)?this.manifest.mediaSequence=a.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+
a.number})},"discontinuity-sequence":function(){isFinite(a.number)?k=this.manifest.discontinuitySequence=a.number:this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+a.number})},"playlist-type":function(){/VOD|EVENT/.test(a.playlistType)?this.manifest.playlistType=a.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+a.playlist})},map:function(){l={};a.uri&&(l.uri=a.uri);a.byterange&&(l.byterange=a.byterange)},"stream-inf":function(){this.manifest.playlists=
d;this.manifest.mediaGroups=this.manifest.mediaGroups||q;a.attributes?(e.attributes||(e.attributes={}),r(e.attributes,a.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){this.manifest.mediaGroups=this.manifest.mediaGroups||q;if(a.attributes&&a.attributes.TYPE&&a.attributes["GROUP-ID"]&&a.attributes.NAME){var e=this.manifest.mediaGroups[a.attributes.TYPE];e[a.attributes["GROUP-ID"]]=e[a.attributes["GROUP-ID"]]||{};b=e[a.attributes["GROUP-ID"]];f={"default":/yes/i.test(a.attributes.DEFAULT)};
f.autoselect=f["default"]?!0:/yes/i.test(a.attributes.AUTOSELECT);a.attributes.LANGUAGE&&(f.language=a.attributes.LANGUAGE);a.attributes.URI&&(f.uri=a.attributes.URI);a.attributes["INSTREAM-ID"]&&(f.instreamId=a.attributes["INSTREAM-ID"]);a.attributes.CHARACTERISTICS&&(f.characteristics=a.attributes.CHARACTERISTICS);a.attributes.FORCED&&(f.forced=/yes/i.test(a.attributes.FORCED));b[a.attributes.NAME]=f}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){k+=
1;e.discontinuity=!0;this.manifest.discontinuityStarts.push(d.length)},"program-date-time":function(){this.manifest.dateTimeString=a.dateTimeString;this.manifest.dateTimeObject=a.dateTimeObject},targetduration:function(){!isFinite(a.duration)||0>a.duration?this.trigger("warn",{message:"ignoring invalid target duration: "+a.duration}):this.manifest.targetDuration=a.duration},totalduration:function(){!isFinite(a.duration)||0>a.duration?this.trigger("warn",{message:"ignoring invalid total duration: "+
a.duration}):this.manifest.totalDuration=a.duration},"cue-out":function(){e.cueOut=a.data},"cue-out-cont":function(){e.cueOutCont=a.data},"cue-in":function(){e.cueIn=a.data}}[a.tagType]||n).call(c)},uri:function(){e.uri=a.uri;d.push(e);!this.manifest.targetDuration||"duration"in e||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),e.duration=this.manifest.targetDuration);g&&(e.key=g);e.timeline=k;l&&(e.map=l);e={}},comment:function(){}})[a.type].call(c)});return c}
q(b,c);n(b,[{key:"push",value:function(a){this.lineStream.push(a)}},{key:"end",value:function(){this.lineStream.push("\n")}}]);return b}(k["default"]);g["default"]=d},{"./line-stream":34,"./parse-stream":35,"./stream":37}],37:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=function(){function b(d,h){for(var g=0;g<h.length;g++){var c=h[g];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,g,n){g&&
b(d.prototype,g);n&&b(d,n);return d}}();d=function(){function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this.listeners={}}b(d,[{key:"on",value:function(b,d){this.listeners[b]||(this.listeners[b]=[]);this.listeners[b].push(d)}},{key:"off",value:function(b,d){if(!this.listeners[b])return!1;var h=this.listeners[b].indexOf(d);this.listeners[b].splice(h,1);return-1<h}},{key:"trigger",value:function(b){var d=this.listeners[b],h=void 0,c=void 0,f=void 0;if(d)if(2===
arguments.length)for(c=d.length,h=0;h<c;++h)d[h].call(this,arguments[1]);else for(f=Array.prototype.slice.call(arguments,1),c=d.length,h=0;h<c;++h)d[h].apply(this,f)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(b){this.on("data",function(d){b.push(d)})}}]);return d}();g["default"]=d},{}],38:[function(d,k,g){d=d("../utils/stream.js");var b;b=function(){var d=new Uint8Array,g=0;b.prototype.init.call(this);this.setTimestamp=function(b){g=b};this.parseId3TagSize=function(b,
d){var c=b[d+6]<<21|b[d+7]<<14|b[d+8]<<7|b[d+9];return(b[d+5]&16)>>4?c+20:c+10};this.parseAdtsSize=function(b,d){return b[d+3]&6144|b[d+4]<<3|(b[d+5]&224)>>5};this.push=function(b){var n=0,c=0;d.length?(n=d.length,d=new Uint8Array(b.byteLength+n),d.set(d.subarray(0,n)),d.set(b,n)):d=b;for(;3<=d.length-c;)if(73===d[c]&&68===d[c+1]&&51===d[c+2]){if(10>d.length-c)break;n=this.parseId3TagSize(d,c);if(n>d.length)break;b={type:"timed-metadata",data:d.subarray(c,c+n)};this.trigger("data",b);c+=n}else if(d[c]&
1&&240===(d[c+1]&240)){if(7>d.length-c)break;n=this.parseAdtsSize(d,c);if(n>d.length)break;b={type:"audio",data:d.subarray(c,c+n),pts:g,dts:g};this.trigger("data",b);c+=n}else c++;d=0<d.length-c?d.subarray(c):new Uint8Array}};b.prototype=new d;k.exports=b},{"../utils/stream.js":62}],39:[function(d,k,g){var b=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],h=function(b){return b[0]<<21|b[1]<<14|b[2]<<7|b[3]};k.exports={parseId3TagSize:function(b,d){var h=b[d+6]<<21|b[d+7]<<14|
b[d+8]<<7|b[d+9];return(b[d+5]&16)>>4?h+20:h+10},parseAdtsSize:function(b,d){return b[d+3]&6144|b[d+4]<<3|(b[d+5]&224)>>5},parseType:function(b,d){return 73===b[d]&&68===b[d+1]&&51===b[d+2]?"timed-metadata":b[d]&1&&240===(b[d+1]&240)?"audio":null},parseSampleRate:function(d){for(var h=0;h+5<d.length;)if(255!==d[h]||240!==(d[h+1]&246))h++;else return b[(d[h+2]&60)>>>2];return null},parseAacTimestamp:function(b){var d,g,c;d=10;b[5]&64&&(d=d+4+h(b.subarray(10,14)));do{g=h(b.subarray(d+4,d+8));if(1>g)break;
c=String.fromCharCode(b[d],b[d+1],b[d+2],b[d+3]);if("PRIV"===c){c=b.subarray(d+10,d+g+10);for(var f=0;f<c.byteLength;f++)if(0===c[f]){for(var a=unescape,l=c,k=f,p=void 0,t="",p=0;p<k;p++)t+="%"+("00"+l[p].toString(16)).slice(-2);if("com.apple.streaming.transportStreamTimestamp"===a(t))return b=c.subarray(f+1),d=(b[3]&1)<<30|b[4]<<22|b[5]<<14|b[6]<<6|b[7]>>>2,d*=4,d+=b[7]&3;break}}d+=10;d+=g}while(d<b.byteLength);return null}}},{}],40:[function(d,k,g){d=d("../utils/stream.js");var b,h=[96E3,88200,
64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350];b=function(){var d;b.prototype.init.call(this);this.push=function(b){var g=0,c=0,f,a,l,k;if("audio"===b.type)for(d?(a=d,d=new Uint8Array(a.byteLength+b.data.byteLength),d.set(a),d.set(b.data,a.byteLength)):d=b.data;g+5<d.length;)if(255!==d[g]||240!==(d[g+1]&246))g++;else{a=2*(~d[g+1]&1);f=(d[g+3]&3)<<11|d[g+4]<<3|(d[g+5]&224)>>5;l=1024*((d[g+6]&3)+1);k=9E4*l/h[(d[g+2]&60)>>>2];f=g+f;if(d.byteLength<f)break;this.trigger("data",{pts:b.pts+c*
k,dts:b.dts+c*k,sampleCount:l,audioobjecttype:(d[g+2]>>>6&3)+1,channelcount:(d[g+2]&1)<<2|(d[g+3]&192)>>>6,samplerate:h[(d[g+2]&60)>>>2],samplingfrequencyindex:(d[g+2]&60)>>>2,samplesize:16,data:d.subarray(g+7+a,f)});if(d.byteLength===f){d=void 0;break}c++;d=d.subarray(f)}};this.flush=function(){this.trigger("done")}};b.prototype=new d;k.exports=b},{"../utils/stream.js":62}],41:[function(d,k,g){g=d("../utils/stream.js");var b=d("../utils/exp-golomb.js"),h,q,r;q=function(){var b=0,c,f;q.prototype.init.call(this);
this.push=function(a){var d;f?(d=new Uint8Array(f.byteLength+a.data.byteLength),d.set(f),d.set(a.data,f.byteLength),f=d):f=a.data;for(;b<f.byteLength-3;b++)if(1===f[b+2]){c=b+5;break}for(;c<f.byteLength;)switch(f[c]){case 0:if(0!==f[c-1]){c+=2;break}else if(0!==f[c-2]){c++;break}b+3!==c-2&&this.trigger("data",f.subarray(b+3,c-2));do c++;while(1!==f[c]&&c<f.length);b=c-2;c+=3;break;case 1:if(0!==f[c-1]||0!==f[c-2]){c+=3;break}this.trigger("data",f.subarray(b+3,c-2));b=c-2;c+=3;break;default:c+=3}f=
f.subarray(b);c-=b;b=0};this.flush=function(){f&&3<f.byteLength&&this.trigger("data",f.subarray(b+3));f=null;b=0;this.trigger("done")}};q.prototype=new g;r={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0};h=function(){var d=new q,c,f,a,l,g,p,t;h.prototype.init.call(this);c=this;this.push=function(e){"video"===e.type&&(f=e.trackId,a=e.pts,l=e.dts,d.push(e))};d.on("data",function(e){var b={trackId:f,pts:a,dts:l,data:e};switch(e[0]&31){case 5:b.nalUnitType="slice_layer_without_partitioning_rbsp_idr";
break;case 6:b.nalUnitType="sei_rbsp";b.escapedRBSP=g(e.subarray(1));break;case 7:b.nalUnitType="seq_parameter_set_rbsp";b.escapedRBSP=g(e.subarray(1));b.config=p(b.escapedRBSP);break;case 8:b.nalUnitType="pic_parameter_set_rbsp";break;case 9:b.nalUnitType="access_unit_delimiter_rbsp"}c.trigger("data",b)});d.on("done",function(){c.trigger("done")});this.flush=function(){d.flush()};t=function(a,c){var b=8,f=8,d;for(d=0;d<a;d++)0!==f&&(f=c.readExpGolomb(),f=(b+f+256)%256),b=0===f?b:f};g=function(a){for(var c=
a.byteLength,b=[],f=1,d;f<c-2;)0===a[f]&&0===a[f+1]&&3===a[f+2]?(b.push(f+2),f+=2):f++;if(0===b.length)return a;c-=b.length;d=new Uint8Array(c);for(var l=0,f=0;f<c;l++,f++)l===b[0]&&(l++,b.shift()),d[f]=a[l];return d};p=function(a){var c=0,f=0,d=0,l=0,h=1,g,p,k,n,q,v,E,F;a=new b(a);g=a.readUnsignedByte();k=a.readUnsignedByte();p=a.readUnsignedByte();a.skipUnsignedExpGolomb();if(r[g]&&(n=a.readUnsignedExpGolomb(),3===n&&a.skipBits(1),a.skipUnsignedExpGolomb(),a.skipUnsignedExpGolomb(),a.skipBits(1),
a.readBoolean()))for(q=3!==n?8:12,n=0;n<q;n++)a.readBoolean()&&(6>n?t(16,a):t(64,a));a.skipUnsignedExpGolomb();n=a.readUnsignedExpGolomb();if(0===n)a.readUnsignedExpGolomb();else if(1===n)for(a.skipBits(1),a.skipExpGolomb(),a.skipExpGolomb(),q=a.readUnsignedExpGolomb(),n=0;n<q;n++)a.skipExpGolomb();a.skipUnsignedExpGolomb();a.skipBits(1);n=a.readUnsignedExpGolomb();q=a.readUnsignedExpGolomb();v=a.readBits(1);0===v&&a.skipBits(1);a.skipBits(1);a.readBoolean()&&(c=a.readUnsignedExpGolomb(),f=a.readUnsignedExpGolomb(),
d=a.readUnsignedExpGolomb(),l=a.readUnsignedExpGolomb());if(a.readBoolean()&&a.readBoolean()){F=a.readUnsignedByte();switch(F){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=
[a.readUnsignedByte()<<8|a.readUnsignedByte(),a.readUnsignedByte()<<8|a.readUnsignedByte()]}E&&(h=E[0]/E[1])}return{profileIdc:g,levelIdc:p,profileCompatibility:k,width:Math.ceil((16*(n+1)-2*c-2*f)*h),height:(2-v)*(q+1)*16-2*d-2*l}}};h.prototype=new g;k.exports={H264Stream:h,NalByteStream:q}},{"../utils/exp-golomb.js":61,"../utils/stream.js":62}],42:[function(d,k,g){d=[33,16,5,32,164,27];g=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252];var b=function(b){for(var d=[];b--;)d.push(0);return d};d={96E3:[d,
[227,64],b(154),[56]],88200:[d,[231],b(170),[56]],64E3:[d,[248,192],b(240),[56]],48E3:[d,[255,192],b(268),[55,148,128],b(54),[112]],44100:[d,[255,192],b(268),[55,163,128],b(84),[112]],32E3:[d,[255,192],b(268),[55,234],b(226),[112]],24E3:[d,[255,192],b(268),[55,255,128],b(268),[111,112],b(126),[224]],16E3:[d,[255,192],b(268),[55,255,128],b(268),[111,255],b(269),[223,108],b(195),[1,192]],12E3:[g,b(268),[3,127,248],b(268),[6,255,240],b(268),[13,255,224],b(268),[27,253,128],b(259),[56]],11025:[g,b(268),
[3,127,248],b(268),[6,255,240],b(268),[13,255,224],b(268),[27,255,192],b(268),[55,175,128],b(108),[112]],8E3:[g,b(268),[3,121,16],b(47),[7]]};k.exports=function(b){return Object.keys(b).reduce(function(d,g){d[g]=new Uint8Array(b[g].reduce(function(b,c){return b.concat(c)},[]));return d},{})}(d)},{}],43:[function(d,k,g){d=d("../utils/stream.js");var b=function(d){this.numberOfTracks=0;this.metadataStream=d.metadataStream;this.videoTags=[];this.audioTags=[];this.audioTrack=this.videoTrack=null;this.pendingCaptions=
[];this.pendingMetadata=[];this.processedTracks=this.pendingTracks=0;b.prototype.init.call(this);this.push=function(b){if(b.text)return this.pendingCaptions.push(b);if(b.frames)return this.pendingMetadata.push(b);"video"===b.track.type&&(this.videoTrack=b.track,this.videoTags=b.tags,this.pendingTracks++);"audio"===b.track.type&&(this.audioTrack=b.track,this.audioTags=b.tags,this.pendingTracks++)}};b.prototype=new d;b.prototype.flush=function(b){var d,g,n={tags:{},captions:[],captionStreams:{},metadata:[]};
if(this.pendingTracks<this.numberOfTracks&&("VideoSegmentStream"!==b&&"AudioSegmentStream"!==b||0===this.pendingTracks&&(this.processedTracks++,this.processedTracks<this.numberOfTracks)))return;this.processedTracks+=this.pendingTracks;this.pendingTracks=0;if(!(this.processedTracks<this.numberOfTracks)){this.videoTrack?g=this.videoTrack.timelineStartInfo.pts:this.audioTrack&&(g=this.audioTrack.timelineStartInfo.pts);n.tags.videoTags=this.videoTags;n.tags.audioTags=this.audioTags;for(b=0;b<this.pendingCaptions.length;b++)d=
this.pendingCaptions[b],d.startTime=d.startPts-g,d.startTime/=9E4,d.endTime=d.endPts-g,d.endTime/=9E4,n.captionStreams[d.stream]=!0,n.captions.push(d);for(b=0;b<this.pendingMetadata.length;b++)d=this.pendingMetadata[b],d.cueTime=d.pts-g,d.cueTime/=9E4,n.metadata.push(d);n.metadata.dispatchType=this.metadataStream.dispatchType;this.audioTrack=this.videoTrack=null;this.videoTags=[];this.audioTags=[];this.pendingCaptions.length=0;this.processedTracks=this.pendingTracks=this.pendingMetadata.length=0;
this.trigger("data",n);this.trigger("done")}};k.exports=b},{"../utils/stream.js":62}],44:[function(d,k,g){var b=d("./flv-tag.js");k.exports=function(d,g,k){var n=new Uint8Array(9),c=new DataView(n.buffer);d=d||0;g=void 0===g?!0:g;k=void 0===k?!0:k;c.setUint8(0,70);c.setUint8(1,76);c.setUint8(2,86);c.setUint8(3,1);c.setUint8(4,(g?4:0)|(k?1:0));c.setUint32(5,n.byteLength);if(0>=d)return d=new Uint8Array(n.byteLength+4),d.set(n),d.set([0,0,0,0],n.byteLength),d;g=new b(b.METADATA_TAG);g.pts=g.dts=0;g.writeMetaDataDouble("duration",
d);g=g.finalize().length;d=new Uint8Array(n.byteLength+g);d.set(n);d.set(c.byteLength,g);return d}},{"./flv-tag.js":45}],45:[function(d,k,g){var b;b=function(d,g){var k=0,n=16384,c=function(a,c){var e;e=a.position+c;e<a.bytes.byteLength||(e=new Uint8Array(2*e),e.set(a.bytes.subarray(0,a.position),0),a.bytes=e,a.view=new DataView(a.bytes.buffer))},f=b.widthBytes||new Uint8Array(5),a=b.heightBytes||new Uint8Array(6),l=b.videocodecidBytes||new Uint8Array(12),v;if(!b.widthBytes){for(v=0;5>v;v++)f[v]=
"width".charCodeAt(v);for(v=0;6>v;v++)a[v]="height".charCodeAt(v);for(v=0;12>v;v++)l[v]="videocodecid".charCodeAt(v);b.widthBytes=f;b.heightBytes=a;b.videocodecidBytes=l}this.keyFrame=!1;switch(d){case b.VIDEO_TAG:this.length=16;n*=6;break;case b.AUDIO_TAG:this.length=13;this.keyFrame=!0;break;case b.METADATA_TAG:this.length=29;this.keyFrame=!0;break;default:throw Error("Unknown FLV tag type");}this.bytes=new Uint8Array(n);this.view=new DataView(this.bytes.buffer);this.bytes[0]=d;this.position=this.length;
this.keyFrame=g;this.dts=this.pts=0;this.writeBytes=function(a,b,e){b=b||0;var f;e=e||a.byteLength;f=b+e;c(this,e);this.bytes.set(a.subarray(b,f),this.position);this.position+=e;this.length=Math.max(this.length,this.position)};this.writeByte=function(a){c(this,1);this.bytes[this.position]=a;this.position++;this.length=Math.max(this.length,this.position)};this.writeShort=function(a){c(this,2);this.view.setUint16(this.position,a);this.position+=2;this.length=Math.max(this.length,this.position)};this.negIndex=
function(a){return this.bytes[this.length-a]};this.nalUnitSize=function(){return 0===k?0:this.length-(k+4)};this.startNalUnit=function(){if(0<k)throw Error("Attempted to create new NAL wihout closing the old one");k=this.length;this.position=this.length+=4};this.endNalUnit=function(a){var c,e;this.length===k+4?this.length-=4:0<k&&(c=k+4,e=this.length-c,this.position=k,this.view.setUint32(this.position,e),this.position=this.length,a&&a.push(this.bytes.subarray(c,c+e)));k=0};this.writeMetaDataDouble=
function(b,d){var e;c(this,2+b.length+9);this.view.setUint16(this.position,b.length);this.position+=2;if("width"===b)this.bytes.set(f,this.position),this.position+=5;else if("height"===b)this.bytes.set(a,this.position),this.position+=6;else if("videocodecid"===b)this.bytes.set(l,this.position),this.position+=12;else for(e=0;e<b.length;e++)this.bytes[this.position]=b.charCodeAt(e),this.position++;this.position++;this.view.setFloat64(this.position,d);this.position+=8;this.length=Math.max(this.length,
this.position);++k};this.writeMetaDataBoolean=function(a,b){var e;c(this,2);this.view.setUint16(this.position,a.length);this.position+=2;for(e=0;e<a.length;e++)c(this,1),this.bytes[this.position]=a.charCodeAt(e),this.position++;c(this,2);this.view.setUint8(this.position,1);this.position++;this.view.setUint8(this.position,b?1:0);this.position++;this.length=Math.max(this.length,this.position);++k};this.finalize=function(){var a;switch(this.bytes[0]){case b.VIDEO_TAG:this.bytes[11]=(this.keyFrame||g?
16:32)|7;this.bytes[12]=g?0:1;a=this.pts-this.dts;this.bytes[13]=(a&16711680)>>>16;this.bytes[14]=(a&65280)>>>8;this.bytes[15]=(a&255)>>>0;break;case b.AUDIO_TAG:this.bytes[11]=175;this.bytes[12]=g?0:1;break;case b.METADATA_TAG:this.position=11,this.view.setUint8(this.position,2),this.position++,this.view.setUint16(this.position,10),this.position+=2,this.bytes.set([111,110,77,101,116,97,68,97,116,97],this.position),this.position+=10,this.bytes[this.position]=8,this.position++,this.view.setUint32(this.position,
k),this.position=this.length,this.bytes.set([0,0,9],this.position),this.length=this.position+=3}a=this.length-11;this.bytes[1]=(a&16711680)>>>16;this.bytes[2]=(a&65280)>>>8;this.bytes[3]=(a&255)>>>0;this.bytes[4]=(this.dts&16711680)>>>16;this.bytes[5]=(this.dts&65280)>>>8;this.bytes[6]=(this.dts&255)>>>0;this.bytes[7]=(this.dts&4278190080)>>>24;this.bytes[8]=0;this.bytes[9]=0;this.bytes[10]=0;c(this,4);this.view.setUint32(this.length,this.length);this.length+=4;this.position+=4;this.bytes=this.bytes.subarray(0,
this.length);this.frameTime=b.frameTime(this.bytes);return this}};b.AUDIO_TAG=8;b.VIDEO_TAG=9;b.METADATA_TAG=18;b.isAudioFrame=function(d){return b.AUDIO_TAG===d[0]};b.isVideoFrame=function(d){return b.VIDEO_TAG===d[0]};b.isMetaData=function(d){return b.METADATA_TAG===d[0]};b.isKeyFrame=function(d){return b.isVideoFrame(d)?23===d[11]:b.isAudioFrame(d)||b.isMetaData(d)?!0:!1};b.frameTime=function(b){var d=b[4]<<16,d=d|b[5]<<8,d=d|b[6]<<0;return d|=b[7]<<24};k.exports=b},{}],46:[function(d,k,g){k.exports=
{tag:d("./flv-tag"),Transmuxer:d("./transmuxer"),getFlvHeader:d("./flv-header")}},{"./flv-header":44,"./flv-tag":45,"./transmuxer":48}],47:[function(d,k,g){k.exports=function(){var b=this;this.list=[];this.push=function(b){this.list.push({bytes:b.bytes,dts:b.dts,pts:b.pts,keyFrame:b.keyFrame,metaDataTag:b.metaDataTag})};Object.defineProperty(this,"length",{get:function(){return b.list.length}})}},{}],48:[function(d,k,g){g=d("../utils/stream.js");var b=d("./flv-tag.js"),h=d("../m2ts/m2ts.js"),q=d("../codecs/adts.js"),
r=d("../codecs/h264").H264Stream,n=d("./coalesce-stream.js"),c=d("./tag-list.js"),f,a,l,v,p,t;v=function(a,c){"number"===typeof c.pts&&(a.timelineStartInfo.pts=void 0===a.timelineStartInfo.pts?c.pts:Math.min(a.timelineStartInfo.pts,c.pts));"number"===typeof c.dts&&(a.timelineStartInfo.dts=void 0===a.timelineStartInfo.dts?c.dts:Math.min(a.timelineStartInfo.dts,c.dts))};p=function(a,c){var f=new b(b.METADATA_TAG);f.dts=c;f.pts=c;f.writeMetaDataDouble("videocodecid",7);f.writeMetaDataDouble("width",
a.width);f.writeMetaDataDouble("height",a.height);return f};t=function(a,c){var f,d=new b(b.VIDEO_TAG,!0);d.dts=c;d.pts=c;d.writeByte(1);d.writeByte(a.profileIdc);d.writeByte(a.profileCompatibility);d.writeByte(a.levelIdc);d.writeByte(255);d.writeByte(225);d.writeShort(a.sps[0].length);d.writeBytes(a.sps[0]);d.writeByte(a.pps.length);for(f=0;f<a.pps.length;++f)d.writeShort(a.pps[f].length),d.writeBytes(a.pps[f]);return d};l=function(a){var f=[],d=[],g;l.prototype.init.call(this);this.push=function(c){v(a,
c);a&&(a.audioobjecttype=c.audioobjecttype,a.channelcount=c.channelcount,a.samplerate=c.samplerate,a.samplingfrequencyindex=c.samplingfrequencyindex,a.samplesize=c.samplesize,a.extraData=a.audioobjecttype<<11|a.samplingfrequencyindex<<7|a.channelcount<<3);c.pts=Math.round(c.pts/90);c.dts=Math.round(c.dts/90);f.push(c)};this.flush=function(){var l,h,p,k=new c;if(0!==f.length){for(p=-Infinity;f.length;){l=f.shift();d.length&&l.pts>=d[0]&&(p=d.shift(),this.writeMetaDataTags(k,p));if(a.extraData!==g||
1E3<=l.pts-p)this.writeMetaDataTags(k,l.pts),g=a.extraData,p=l.pts;h=new b(b.AUDIO_TAG);h.pts=l.pts;h.dts=l.dts;h.writeBytes(l.data);k.push(h.finalize())}d.length=0;g=null;this.trigger("data",{track:a,tags:k.list})}this.trigger("done","AudioSegmentStream")};this.writeMetaDataTags=function(c,f){var d;d=new b(b.METADATA_TAG);d.pts=f;d.dts=f;d.writeMetaDataDouble("audiocodecid",10);d.writeMetaDataBoolean("stereo",2===a.channelcount);d.writeMetaDataDouble("audiosamplerate",a.samplerate);d.writeMetaDataDouble("audiosamplesize",
16);c.push(d.finalize());d=new b(b.AUDIO_TAG,!0);d.pts=f;d.dts=f;d.view.setUint16(d.position,a.extraData);d.position+=2;d.length=Math.max(d.length,d.position);c.push(d.finalize())};this.onVideoKeyFrame=function(a){d.push(a)}};l.prototype=new g;a=function(e){var d=[],f,l;a.prototype.init.call(this);this.finishFrame=function(a,c){if(c){if(f&&e&&e.newMetadata&&(c.keyFrame||0===a.length)){var b=p(f,c.dts).finalize(),d=t(e,c.dts).finalize();b.metaDataTag=d.metaDataTag=!0;a.push(b);a.push(d);e.newMetadata=
!1;this.trigger("keyframe",c.dts)}c.endNalUnit();a.push(c.finalize());l=null}};this.push=function(a){v(e,a);a.pts=Math.round(a.pts/90);a.dts=Math.round(a.dts/90);d.push(a)};this.flush=function(){for(var a,g=new c;d.length&&"access_unit_delimiter_rbsp"!==d[0].nalUnitType;)d.shift();if(0!==d.length){for(;d.length;)a=d.shift(),"seq_parameter_set_rbsp"===a.nalUnitType?(e.newMetadata=!0,f=a.config,e.width=f.width,e.height=f.height,e.sps=[a.data],e.profileIdc=f.profileIdc,e.levelIdc=f.levelIdc,e.profileCompatibility=
f.profileCompatibility,l.endNalUnit()):"pic_parameter_set_rbsp"===a.nalUnitType?(e.newMetadata=!0,e.pps=[a.data],l.endNalUnit()):"access_unit_delimiter_rbsp"===a.nalUnitType?(l&&this.finishFrame(g,l),l=new b(b.VIDEO_TAG),l.pts=a.pts,l.dts=a.dts):("slice_layer_without_partitioning_rbsp_idr"===a.nalUnitType&&(l.keyFrame=!0),l.endNalUnit()),l.startNalUnit(),l.writeBytes(a.data);l&&this.finishFrame(g,l);this.trigger("data",{track:e,tags:g.list})}this.trigger("done","VideoSegmentStream")}};a.prototype=
new g;f=function(c){var b=this,d,g,p,k,t,v,C,w,G,H,E,F;f.prototype.init.call(this);c=c||{};this.metadataStream=new h.MetadataStream;c.metadataStream=this.metadataStream;d=new h.TransportPacketStream;g=new h.TransportParseStream;p=new h.ElementaryStream;k=new h.TimestampRolloverStream("video");t=new h.TimestampRolloverStream("audio");v=new h.TimestampRolloverStream("timed-metadata");C=new q;w=new r;F=new n(c);d.pipe(g).pipe(p);p.pipe(k).pipe(w);p.pipe(t).pipe(C);p.pipe(v).pipe(this.metadataStream).pipe(F);
E=new h.CaptionStream;w.pipe(E).pipe(F);p.on("data",function(c){var e,b,d;if("metadata"===c.type){for(e=c.tracks.length;e--;)"video"===c.tracks[e].type?b=c.tracks[e]:"audio"===c.tracks[e].type&&(d=c.tracks[e]);b&&!G&&(F.numberOfTracks++,G=new a(b),w.pipe(G).pipe(F));if(d&&!H&&(F.numberOfTracks++,H=new l(d),C.pipe(H).pipe(F),G))G.on("keyframe",H.onVideoKeyFrame)}});this.push=function(a){d.push(a)};this.flush=function(){d.flush()};this.resetCaptions=function(){E.reset()};F.on("data",function(a){b.trigger("data",
a)});F.on("done",function(){b.trigger("done")})};f.prototype=new g;k.exports=f},{"../codecs/adts.js":40,"../codecs/h264":41,"../m2ts/m2ts.js":50,"../utils/stream.js":62,"./coalesce-stream.js":43,"./flv-tag.js":45,"./tag-list.js":47}],49:[function(d,k,g){d=d("../utils/stream");var b=function(a,c){var b=[],d,f,e,g;if(!(c[0]&64))return b;f=c[0]&31;for(d=0;d<f;d++)e=3*d,g={type:c[e+2]&3,pts:a},c[e+2]&4&&(g.ccData=c[e+3]<<8|c[e+4],b.push(g));return b},h=function(){h.prototype.init.call(this);this.captionPackets_=
[];this.ccStreams_=[new f(0,0),new f(0,1),new f(1,0),new f(1,1)];this.reset();this.ccStreams_.forEach(function(a){a.on("data",this.trigger.bind(this,"data"));a.on("done",this.trigger.bind(this,"done"))},this)};h.prototype=new d;h.prototype.push=function(a){var c;if("sei_rbsp"===a.nalUnitType){c=a.escapedRBSP;for(var d=0,f={payloadType:-1,payloadSize:0},g=0,e=0;d<c.byteLength&&128!==c[d];){for(;255===c[d];)g+=255,d++;for(g+=c[d++];255===c[d];)e+=255,d++;e+=c[d++];if(!f.payload&&4===g){f.payloadType=
g;f.payloadSize=e;f.payload=c.subarray(d,d+e);break}d+=e;e=g=0}4===f.payloadType&&(c=181!==f.payload[0]||49!==(f.payload[1]<<8|f.payload[2])||"GA94"!==String.fromCharCode(f.payload[3],f.payload[4],f.payload[5],f.payload[6])||3!==f.payload[7]?null:f.payload.subarray(8,f.payload.length-1))&&(a.dts<this.latestDts_?this.ignoreNextEqualDts_=!0:a.dts===this.latestDts_&&this.ignoreNextEqualDts_?this.ignoreNextEqualDts_=!1:(this.captionPackets_=this.captionPackets_.concat(b(a.pts,c)),this.latestDts_=a.dts))}};
h.prototype.flush=function(){this.captionPackets_.length?(this.captionPackets_.forEach(function(a,c){a.presortIndex=c}),this.captionPackets_.sort(function(a,c){return a.pts===c.pts?a.presortIndex-c.presortIndex:a.pts-c.pts}),this.captionPackets_.forEach(function(a){2>a.type&&this.dispatchCea608Packet(a)},this),this.captionPackets_.length=0,this.ccStreams_.forEach(function(a){a.flush()},this)):this.ccStreams_.forEach(function(a){a.flush()},this)};h.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=
!1;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(a){a.reset()})};h.prototype.dispatchCea608Packet=function(a){this.setsChannel1Active(a)?this.activeCea608Channel_[a.type]=0:this.setsChannel2Active(a)&&(this.activeCea608Channel_[a.type]=1);null!==this.activeCea608Channel_[a.type]&&this.ccStreams_[(a.type<<1)+this.activeCea608Channel_[a.type]].push(a)};h.prototype.setsChannel1Active=function(a){return 4096===(a.ccData&30720)};h.prototype.setsChannel2Active=function(a){return 6144===
(a.ccData&30720)};var q={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,
802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},r=function(a){if(null===a)return"";a=q[a]||a;return String.fromCharCode(a)},n=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],c=function(){for(var a=[],c=15;c--;)a.push("");return a},f=function(a,b){f.prototype.init.call(this);this.field_=
a||0;this.dataChannel_=b||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(a){var b,d,e;b=a.ccData&32639;b===this.lastControlCode_?this.lastControlCode_=null:(4096===(b&61440)?this.lastControlCode_=b:b!==this.PADDING_&&(this.lastControlCode_=null),e=b>>>8,d=b&255,b!==this.PADDING_&&(b===this.RESUME_CAPTION_LOADING_?this.mode_="popOn":b===this.END_OF_CAPTION_?(this.clearFormatting(a.pts),this.flushDisplayed(a.pts),d=this.displayed_,this.displayed_=
this.nonDisplayed_,this.nonDisplayed_=d,this.startPts_=a.pts):b===this.ROLL_UP_2_ROWS_?(this.topRow_=13,this.mode_="rollUp"):b===this.ROLL_UP_3_ROWS_?(this.topRow_=12,this.mode_="rollUp"):b===this.ROLL_UP_4_ROWS_?(this.topRow_=11,this.mode_="rollUp"):b===this.CARRIAGE_RETURN_?(this.clearFormatting(a.pts),this.flushDisplayed(a.pts),this.shiftRowsUp_(),this.startPts_=a.pts):b===this.BACKSPACE_?"popOn"===this.mode_?this.nonDisplayed_[14]=this.nonDisplayed_[14].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,
-1):b===this.ERASE_DISPLAYED_MEMORY_?(this.flushDisplayed(a.pts),this.displayed_=c()):b===this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=c():b===this.RESUME_DIRECT_CAPTIONING_?this.mode_="paintOn":this.isSpecialCharacter(e,d)?(b=r((e&3)<<8|d),this[this.mode_](a.pts,b),this.column_++):this.isExtCharacter(e,d)?("popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[14]=this.displayed_[14].slice(0,-1),b=r((e&3)<<8|d),this[this.mode_](a.pts,b),
this.column_++):this.isMidRowCode(e,d)?(this.clearFormatting(a.pts),this[this.mode_](a.pts," "),this.column_++,14===(d&14)&&this.addFormatting(a.pts,["i"]),1===(d&1)&&this.addFormatting(a.pts,["u"])):this.isOffsetControlCode(e,d)?this.column_+=d&3:this.isPAC(e,d)?(e=n.indexOf(b&7968),e!==this.row_&&(this.clearFormatting(a.pts),this.row_=e),d&1&&-1===this.formatting_.indexOf("u")&&this.addFormatting(a.pts,["u"]),16===(b&16)&&(this.column_=4*((b&14)>>1)),this.isColorPAC(d)&&14===(d&14)&&this.addFormatting(a.pts,
["i"])):this.isNormalChar(e)&&(0===d&&(d=null),b=r(e),b+=r(d),this[this.mode_](a.pts,b),this.column_+=b.length)))}};f.prototype=new d;f.prototype.flushDisplayed=function(a){var c=this.displayed_.map(function(a){return a.trim()}).join("\n").replace(/^\n+|\n+$/g,"");c.length&&this.trigger("data",{startPts:this.startPts_,endPts:a,text:c,stream:this.name_})};f.prototype.reset=function(){this.mode_="popOn";this.startPts_=this.topRow_=0;this.displayed_=c();this.nonDisplayed_=c();this.lastControlCode_=null;
this.column_=0;this.row_=14;this.formatting_=[]};f.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31);this.PADDING_=0;this.RESUME_CAPTION_LOADING_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_|39;
this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};f.prototype.isSpecialCharacter=function(a,c){return a===this.EXT_&&48<=c&&63>=c};f.prototype.isExtCharacter=function(a,c){return(a===this.EXT_+1||a===this.EXT_+2)&&32<=c&&63>=c};f.prototype.isMidRowCode=function(a,c){return a===this.EXT_&&32<=c&&47>=c};f.prototype.isOffsetControlCode=
function(a,c){return a===this.OFFSET_&&33<=c&&35>=c};f.prototype.isPAC=function(a,c){return a>=this.BASE_&&a<this.BASE_+8&&64<=c&&127>=c};f.prototype.isColorPAC=function(a){return 64<=a&&79>=a||96<=a&&127>=a};f.prototype.isNormalChar=function(a){return 32<=a&&127>=a};f.prototype.addFormatting=function(a,c){this.formatting_=this.formatting_.concat(c);var b=c.reduce(function(a,c){return a+"<"+c+">"},"");this[this.mode_](a,b)};f.prototype.clearFormatting=function(a){if(this.formatting_.length){var c=
this.formatting_.reverse().reduce(function(a,c){return a+"</"+c+">"},"");this.formatting_=[];this[this.mode_](a,c)}};f.prototype.popOn=function(a,c){var b=this.nonDisplayed_[this.row_];this.nonDisplayed_[this.row_]=b+c};f.prototype.rollUp=function(a,c){var b=this.displayed_[14];this.displayed_[14]=b+c};f.prototype.shiftRowsUp_=function(){var a;for(a=0;a<this.topRow_;a++)this.displayed_[a]="";for(a=this.topRow_;14>a;a++)this.displayed_[a]=this.displayed_[a+1];this.displayed_[14]=""};f.prototype.paintOn=
function(){};k.exports={CaptionStream:h,Cea608Stream:f}},{"../utils/stream":62}],50:[function(d,k,g){g=d("../utils/stream.js");var b=d("./caption-stream"),h=d("./stream-types"),q=d("./timestamp-rollover-stream").TimestampRolloverStream,r=d("./stream-types.js"),n,c,f;n=function(){var a=new Uint8Array(188),c=0;n.prototype.init.call(this);this.push=function(b){var d=0,e=188,f;c?(f=new Uint8Array(b.byteLength+c),f.set(a.subarray(0,c)),f.set(b,c),c=0):f=b;for(;e<f.byteLength;)71===f[d]&&71===f[e]?(this.trigger("data",
f.subarray(d,e)),d+=188,e+=188):(d++,e++);d<f.byteLength&&(a.set(f.subarray(d),0),c=f.byteLength-d)};this.flush=function(){188===c&&71===a[0]&&(this.trigger("data",a),c=0);this.trigger("done")}};n.prototype=new g;c=function(){var a,b,d,f;c.prototype.init.call(this);f=this;this.packetsWaitingForPmt=[];this.programMapTable=void 0;a=function(a,c){var f=0;c.payloadUnitStartIndicator&&(f+=a[f]+1);"pat"===c.type?b(a.subarray(f),c):d(a.subarray(f),c)};b=function(a,c){c.section_number=a[7];c.last_section_number=
a[8];f.pmtPid=(a[10]&31)<<8|a[11];c.pmtPid=f.pmtPid};d=function(a,c){var b,d;if(a[5]&1){f.programMapTable={video:null,audio:null,"timed-metadata":{}};b=(a[1]&15)<<8|a[2];b=3+b-4;d=(a[10]&15)<<8|a[11];for(d=12+d;d<b;){var l=a[d],g=(a[d+1]&31)<<8|a[d+2];l===h.H264_STREAM_TYPE&&null===f.programMapTable.video?f.programMapTable.video=g:l===h.ADTS_STREAM_TYPE&&null===f.programMapTable.audio?f.programMapTable.audio=g:l===h.METADATA_STREAM_TYPE&&(f.programMapTable["timed-metadata"][g]=l);d+=((a[d+3]&15)<<
8|a[d+4])+5}c.programMapTable=f.programMapTable}};this.push=function(c){var b={},d=4;b.payloadUnitStartIndicator=!!(c[1]&64);b.pid=c[1]&31;b.pid<<=8;b.pid|=c[2];1<(c[3]&48)>>>4&&(d+=c[d]+1);if(0===b.pid)b.type="pat",a(c.subarray(d),b),this.trigger("data",b);else if(b.pid===this.pmtPid)for(b.type="pmt",a(c.subarray(d),b),this.trigger("data",b);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([c,
d,b]):this.processPes_(c,d,b)};this.processPes_=function(a,c,b){b.streamType=b.pid===this.programMapTable.video?h.H264_STREAM_TYPE:b.pid===this.programMapTable.audio?h.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][b.pid];b.type="pes";b.data=a.subarray(c);this.trigger("data",b)}};c.prototype=new g;c.STREAM_TYPES={h264:27,adts:15};f=function(){var a=this,c={data:[],size:0},b={data:[],size:0},d={data:[],size:0},e=function(c,b,e){var d=new Uint8Array(c.size),f={type:b},g=0,h=0,g=!1,k;if(c.data.length&&
!(9>c.size)){f.trackId=c.data[0].pid;for(g=0;g<c.data.length;g++)k=c.data[g],d.set(k.data,h),h+=k.data.byteLength;f.packetLength=6+(d[4]<<8|d[5]);f.dataAlignmentIndicator=0!==(d[6]&4);h=d[7];h&192&&(f.pts=(d[9]&14)<<27|(d[10]&255)<<20|(d[11]&254)<<12|(d[12]&255)<<5|(d[13]&254)>>>3,f.pts*=4,f.pts+=(d[13]&6)>>>1,f.dts=f.pts,h&64&&(f.dts=(d[14]&14)<<27|(d[15]&255)<<20|(d[16]&254)<<12|(d[17]&255)<<5|(d[18]&254)>>>3,f.dts*=4,f.dts+=(d[18]&6)>>>1));f.data=d.subarray(9+d[8]);g="video"===b||f.packetLength<=
c.size;if(e||g)c.size=0,c.data.length=0;g&&a.trigger("data",f)}};f.prototype.init.call(this);this.push=function(f){({pat:function(){},pes:function(){var a,g;switch(f.streamType){case h.H264_STREAM_TYPE:case r.H264_STREAM_TYPE:a=c;g="video";break;case h.ADTS_STREAM_TYPE:a=b;g="audio";break;case h.METADATA_STREAM_TYPE:a=d;g="timed-metadata";break;default:return}f.payloadUnitStartIndicator&&e(a,g,!0);a.data.push(f);a.size+=f.data.byteLength},pmt:function(){var c={type:"metadata",tracks:[]},b=f.programMapTable;
null!==b.video&&c.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+b.video,codec:"avc",type:"video"});null!==b.audio&&c.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+b.audio,codec:"adts",type:"audio"});a.trigger("data",c)}})[f.type]()};this.flush=function(){e(c,"video");e(b,"audio");e(d,"timed-metadata");this.trigger("done")}};f.prototype=new g;d={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:n,TransportParseStream:c,ElementaryStream:f,TimestampRolloverStream:q,CaptionStream:b.CaptionStream,
Cea608Stream:b.Cea608Stream,MetadataStream:d("./metadata-stream")};for(var a in h)h.hasOwnProperty(a)&&(d[a]=h[a]);k.exports=d},{"../utils/stream.js":62,"./caption-stream":49,"./metadata-stream":51,"./stream-types":53,"./stream-types.js":53,"./timestamp-rollover-stream":54}],51:[function(d,k,g){g=d("../utils/stream");var b=d("./stream-types"),h=function(c,b,a){for(var d="";b<a;b++)d+="%"+("00"+c[b].toString(16)).slice(-2);return d},q=function(c){return c[0]<<21|c[1]<<14|c[2]<<7|c[3]},r={TXXX:function(c){var b;
if(3===c.data[0]){for(b=1;b<c.data.length;b++)if(0===c.data[b]){c.description=decodeURIComponent(h(c.data,1,b));c.value=decodeURIComponent(h(c.data,b+1,c.data.length)).replace(/\0*$/,"");break}c.data=c.value}},WXXX:function(c){var b;if(3===c.data[0])for(b=1;b<c.data.length;b++)if(0===c.data[b]){c.description=decodeURIComponent(h(c.data,1,b));c.url=decodeURIComponent(h(c.data,b+1,c.data.length));break}},PRIV:function(c){var b;for(b=0;b<c.data.length;b++)if(0===c.data[b]){c.owner=unescape(h(c.data,
0,b));break}c.privateData=c.data.subarray(b+1);c.data=c.privateData}},n;n=function(c){var d=!(!c||!c.debug);c=c&&c.descriptor;var a=0,g=[],h=0,k;n.prototype.init.call(this);this.dispatchType=b.METADATA_STREAM_TYPE.toString(16);if(c)for(k=0;k<c.length;k++)this.dispatchType+=("00"+c[k].toString(16)).slice(-2);this.push=function(c){var b,k,n;if("timed-metadata"===c.type)if(c.dataAlignmentIndicator&&(h=0,g.length=0),0===g.length&&(10>c.data.length||73!==c.data[0]||68!==c.data[1]||51!==c.data[2]))d&&console.log("Skipping unrecognized metadata packet");
else if(g.push(c),h+=c.data.byteLength,1===g.length&&(a=q(c.data.subarray(6,10)),a+=10),!(h<a)){c={data:new Uint8Array(a),frames:[],pts:g[0].pts,dts:g[0].dts};for(b=0;b<a;)c.data.set(g[0].data.subarray(0,a-b),b),b+=g[0].data.byteLength,h-=g[0].data.byteLength,g.shift();b=10;c.data[5]&64&&(b=b+4+q(c.data.subarray(10,14)),a-=q(c.data.subarray(16,20)));do{k=q(c.data.subarray(b+4,b+8));if(1>k)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");n=String.fromCharCode(c.data[b],
c.data[b+1],c.data[b+2],c.data[b+3]);n={id:n,data:c.data.subarray(b+10,b+k+10)};n.key=n.id;if(r[n.id]&&(r[n.id](n),"com.apple.streaming.transportStreamTimestamp"===n.owner)){var p=n.data,x=(p[3]&1)<<30|p[4]<<22|p[5]<<14|p[6]<<6|p[7]>>>2,x=4*x,x=x+(p[7]&3);n.timeStamp=x;void 0===c.pts&&void 0===c.dts&&(c.pts=n.timeStamp,c.dts=n.timeStamp);this.trigger("timestamp",n)}c.frames.push(n);b+=10;b+=k}while(b<a);this.trigger("data",c)}}};n.prototype=new g;k.exports=n},{"../utils/stream":62,"./stream-types":53}],
52:[function(d,k,g){var b=d("./stream-types.js"),h=function(c){var b=c[1]&31;return b=b<<8|c[2]},q=function(c){return!!(c[1]&64)},r=function(c){var b=0;1<(c[3]&48)>>>4&&(b+=c[4]+1);return b},n=function(c){switch(c){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};k.exports={parseType:function(c,b){var a=h(c);return 0===a?"pat":
a===b?"pmt":b?"pes":null},parsePat:function(c){var b=q(c),a=4+r(c);b&&(a+=c[a]+1);return(c[a+10]&31)<<8|c[a+11]},parsePmt:function(c){var b={},a=q(c),d=4+r(c);a&&(d+=c[d]+1);if(c[d+5]&1){for(var a=3+((c[d+1]&15)<<8|c[d+2])-4,g=12+((c[d+10]&15)<<8|c[d+11]);g<a;){var h=d+g;b[(c[h+1]&31)<<8|c[h+2]]=c[h];g+=((c[h+3]&15)<<8|c[h+4])+5}return b}},parsePayloadUnitStartIndicator:q,parsePesType:function(c,d){var a=h(c);switch(d[a]){case b.H264_STREAM_TYPE:return"video";case b.ADTS_STREAM_TYPE:return"audio";
case b.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(c){if(!q(c))return null;var b=4+r(c);if(b>=c.byteLength)return null;var a=null,d;d=c[b+7];d&192&&(a={},a.pts=(c[b+9]&14)<<27|(c[b+10]&255)<<20|(c[b+11]&254)<<12|(c[b+12]&255)<<5|(c[b+13]&254)>>>3,a.pts*=4,a.pts+=(c[b+13]&6)>>>1,a.dts=a.pts,d&64&&(a.dts=(c[b+14]&14)<<27|(c[b+15]&255)<<20|(c[b+16]&254)<<12|(c[b+17]&255)<<5|(c[b+18]&254)>>>3,a.dts*=4,a.dts+=(c[b+18]&6)>>>1));return a},videoPacketContainsKeyFrame:function(c){var b=
4+r(c);c=c.subarray(b);for(var a=b=0,d=!1;a<c.byteLength-3;a++)if(1===c[a+2]){b=a+5;break}for(;b<c.byteLength;)switch(c[b]){case 0:if(0!==c[b-1]){b+=2;break}else if(0!==c[b-2]){b++;break}a+3!==b-2&&(a=n(c[a+3]&31),"slice_layer_without_partitioning_rbsp_idr"===a&&(d=!0));do b++;while(1!==c[b]&&b<c.length);a=b-2;b+=3;break;case 1:if(0!==c[b-1]||0!==c[b-2]){b+=3;break}a=n(c[a+3]&31);"slice_layer_without_partitioning_rbsp_idr"===a&&(d=!0);a=b-2;b+=3;break;default:b+=3}(c=c.subarray(a))&&3<c.byteLength&&
(a=n(c[3]&31),"slice_layer_without_partitioning_rbsp_idr"===a&&(d=!0));return d}}},{"./stream-types.js":53}],53:[function(d,k,g){k.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},{}],54:[function(d,k,g){d=d("../utils/stream");var b=function(b,d){var g=1;for(b>d&&(g=-1);4294967296<Math.abs(d-b);)b+=8589934592*g;return b},h=function(d){var g,k;h.prototype.init.call(this);this.type_=d;this.push=function(c){c.type===this.type_&&(void 0===k&&(k=c.dts),c.dts=b(c.dts,k),c.pts=
b(c.pts,k),g=c.dts,this.trigger("data",c))};this.flush=function(){k=g;this.trigger("done")};this.discontinuity=function(){g=k=void 0}};h.prototype=new d;k.exports={TimestampRolloverStream:h,handleRollover:b}},{"../utils/stream":62}],55:[function(d,k,g){k.exports={generator:d("./mp4-generator"),Transmuxer:d("./transmuxer").Transmuxer,AudioSegmentStream:d("./transmuxer").AudioSegmentStream,VideoSegmentStream:d("./transmuxer").VideoSegmentStream}},{"./mp4-generator":56,"./transmuxer":58}],56:[function(d,
k,g){var b=Math.pow(2,32)-1,h,q,r,n,c,f,a,l,v,p,t,e,u,A,B,x,z,D,y,C,w,G,H,E,F,I,J,M,N,O,L,P,Q,K;(function(){var a;w={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]};if("undefined"!==typeof Uint8Array){for(a in w)w.hasOwnProperty(a)&&(w[a]=[a.charCodeAt(0),a.charCodeAt(1),
a.charCodeAt(2),a.charCodeAt(3)]);G=new Uint8Array([105,115,111,109]);E=new Uint8Array([97,118,99,49]);H=new Uint8Array([0,0,0,1]);F=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]);I=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);J={video:F,audio:I};O=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);N=new Uint8Array([0,0,0,0,0,0,0,0]);
P=L=new Uint8Array([0,0,0,0,0,0,0,0]);Q=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);K=L;M=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})();h=function(a){var c=[],b=0,e,d;for(e=1;e<arguments.length;e++)c.push(arguments[e]);for(e=c.length;e--;)b+=c[e].byteLength;d=new Uint8Array(b+8);(new DataView(d.buffer,d.byteOffset,d.byteLength)).setUint32(0,d.byteLength);d.set(a,4);e=0;for(b=8;e<c.length;e++)d.set(c[e],b),b+=c[e].byteLength;return d};q=function(){return h(w.dinf,h(w.dref,O))};r=function(a){return h(w.esds,
new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,a.audioobjecttype<<3|a.samplingfrequencyindex>>>1,a.samplingfrequencyindex<<7|a.channelcount<<3,6,1,2]))};n=function(){return h(w.ftyp,G,H,G,E)};A=function(a){return h(w.hdlr,J[a])};u=function(a){var c=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,a.duration>>>24&255,a.duration>>>16&255,a.duration>>>8&255,a.duration&255,85,196,0,0]);a.samplerate&&(c[12]=a.samplerate>>>24&255,c[13]=a.samplerate>>>16&255,c[14]=a.samplerate>>>
8&255,c[15]=a.samplerate&255);return h(w.mdhd,c)};e=function(a){return h(w.mdia,u(a),A(a.type),f(a))};c=function(a){return h(w.mfhd,new Uint8Array([0,0,0,0,(a&4278190080)>>24,(a&16711680)>>16,(a&65280)>>8,a&255]))};f=function(a){return h(w.minf,"video"===a.type?h(w.vmhd,M):h(w.smhd,N),q(),x(a))};a=function(a){for(var c=a.length,b=[];c--;)b[c]=p(a[c]);return h.apply(null,[w.moov,v(4294967295)].concat(b).concat(l(a)))};l=function(a){for(var c=a.length,b=[];c--;)b[c]=y(a[c]);return h.apply(null,[w.mvex].concat(b))};
v=function(a){a=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(a&4278190080)>>24,(a&16711680)>>16,(a&65280)>>8,a&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return h(w.mvhd,a)};B=function(a){a=a.samples||[];var c=new Uint8Array(4+a.length),b,e;for(e=0;e<a.length;e++)b=a[e].flags,c[e+4]=b.dependsOn<<4|b.isDependedOn<<2|b.hasRedundancy;return h(w.sdtp,c)};x=function(a){return h(w.stbl,
z(a),h(w.stts,K),h(w.stsc,P),h(w.stsz,Q),h(w.stco,L))};(function(){var a,c;z=function(b){return h(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===b.type?a(b):c(b))};a=function(a){var c=a.sps||[],b=a.pps||[],e=[],d=[],f;for(f=0;f<c.length;f++)e.push((c[f].byteLength&65280)>>>8),e.push(c[f].byteLength&255),e=e.concat(Array.prototype.slice.call(c[f]));for(f=0;f<b.length;f++)d.push((b[f].byteLength&65280)>>>8),d.push(b[f].byteLength&255),d=d.concat(Array.prototype.slice.call(b[f]));return h(w.avc1,
new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(a.width&65280)>>8,a.width&255,(a.height&65280)>>8,a.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),h(w.avcC,new Uint8Array([1,a.profileIdc,a.profileCompatibility,a.levelIdc,255].concat([c.length]).concat(e).concat([b.length]).concat(d))),h(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))};c=function(a){return h(w.mp4a,
new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(a.channelcount&65280)>>8,a.channelcount&255,(a.samplesize&65280)>>8,a.samplesize&255,0,0,0,0,(a.samplerate&65280)>>8,a.samplerate&255,0,0]),r(a))}})();t=function(a){a=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(a.id&4278190080)>>24,(a.id&16711680)>>16,(a.id&65280)>>8,a.id&255,0,0,0,0,(a.duration&4278190080)>>24,(a.duration&16711680)>>16,(a.duration&65280)>>8,a.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,64,0,0,0,(a.width&65280)>>8,a.width&255,0,0,(a.height&65280)>>8,a.height&255,0,0]);return h(w.tkhd,a)};D=function(a){var c,e,d;c=h(w.tfhd,new Uint8Array([0,0,0,58,(a.id&4278190080)>>24,(a.id&16711680)>>16,(a.id&65280)>>8,a.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));e=Math.floor(a.baseMediaDecodeTime/(b+1));d=Math.floor(a.baseMediaDecodeTime%(b+1));e=h(w.tfdt,new Uint8Array([1,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,e&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255]));if("audio"===a.type)return a=
C(a,92),h(w.traf,c,e,a);d=B(a);a=C(a,d.length+92);return h(w.traf,c,e,a,d)};p=function(a){a.duration=a.duration||4294967295;return h(w.trak,t(a),e(a))};y=function(a){var c=new Uint8Array([0,0,0,0,(a.id&4278190080)>>24,(a.id&16711680)>>16,(a.id&65280)>>8,a.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);"video"!==a.type&&(c[c.length-1]=0);return h(w.trex,c)};(function(){var a,c,b;b=function(a,c){var b=0,e=0,d=0,f=0;a.length&&(void 0!==a[0].duration&&(b=1),void 0!==a[0].size&&(e=2),void 0!==a[0].flags&&(d=
4),void 0!==a[0].compositionTimeOffset&&(f=8));return[0,0,b|e|d|f,1,(a.length&4278190080)>>>24,(a.length&16711680)>>>16,(a.length&65280)>>>8,a.length&255,(c&4278190080)>>>24,(c&16711680)>>>16,(c&65280)>>>8,c&255]};c=function(a,c){var e,d,f,g;d=a.samples||[];c+=20+16*d.length;e=b(d,c);for(g=0;g<d.length;g++)f=d[g],e=e.concat([(f.duration&4278190080)>>>24,(f.duration&16711680)>>>16,(f.duration&65280)>>>8,f.duration&255,(f.size&4278190080)>>>24,(f.size&16711680)>>>16,(f.size&65280)>>>8,f.size&255,f.flags.isLeading<<
2|f.flags.dependsOn,f.flags.isDependedOn<<6|f.flags.hasRedundancy<<4|f.flags.paddingValue<<1|f.flags.isNonSyncSample,f.flags.degradationPriority&61440,f.flags.degradationPriority&15,(f.compositionTimeOffset&4278190080)>>>24,(f.compositionTimeOffset&16711680)>>>16,(f.compositionTimeOffset&65280)>>>8,f.compositionTimeOffset&255]);return h(w.trun,new Uint8Array(e))};a=function(a,c){var e,d,f,g;d=a.samples||[];c+=20+8*d.length;e=b(d,c);for(g=0;g<d.length;g++)f=d[g],e=e.concat([(f.duration&4278190080)>>>
24,(f.duration&16711680)>>>16,(f.duration&65280)>>>8,f.duration&255,(f.size&4278190080)>>>24,(f.size&16711680)>>>16,(f.size&65280)>>>8,f.size&255]);return h(w.trun,new Uint8Array(e))};C=function(b,e){return"audio"===b.type?a(b,e):c(b,e)}})();k.exports={ftyp:n,mdat:function(a){return h(w.mdat,a)},moof:function(a,b){for(var e=[],d=b.length;d--;)e[d]=D(b[d]);return h.apply(null,[w.moof,c(a)].concat(e))},moov:a,initSegment:function(c){var b=n();c=a(c);var e;e=new Uint8Array(b.byteLength+c.byteLength);
e.set(b);e.set(c,b.byteLength);return e}}},{}],57:[function(d,k,g){var b,h;b=function(d,g){var k=[],c,f,a;if(!g.length)return null;for(c=0;c<d.byteLength;)f=d[c]<<24,f|=d[c+1]<<16,f|=d[c+2]<<8,f|=d[c+3],a=h(d.subarray(c+4,c+8)),f=1<f?c+f:d.byteLength,a===g[0]&&(1===g.length?k.push(d.subarray(c+8,f)):(c=b(d.subarray(c+8,f),g.slice(1)),c.length&&(k=k.concat(c)))),c=f;return k};h=function(b){var d;d=""+String.fromCharCode(b[0]);d+=String.fromCharCode(b[1]);d+=String.fromCharCode(b[2]);return d+=String.fromCharCode(b[3])};
k.exports={parseType:h,timescale:function(d){return b(d,["moov","trak"]).reduce(function(d,g){var c,f,a;c=b(g,["tkhd"])[0];if(!c)return null;f=c[0];f=0===f?12:20;c=c[f]<<24|c[f+1]<<16|c[f+2]<<8|c[f+3];a=b(g,["mdia","mdhd"])[0];if(!a)return null;f=a[0];f=0===f?12:20;d[c]=a[f]<<24|a[f+1]<<16|a[f+2]<<8|a[f+3];return d},{})},startTime:function(d,g){var h;h=b(g,["moof","traf"]);h=[].concat.apply([],h.map(function(c){return b(c,["tfhd"]).map(function(f){var a;f=d[f[4]<<24|f[5]<<16|f[6]<<8|f[7]]||9E4;a=
(a=b(c,["tfdt"]).map(function(a){var c,b;c=a[0];b=a[4]<<24|a[5]<<16|a[6]<<8|a[7];1===c&&(b*=Math.pow(2,32),b+=a[8]<<24|a[9]<<16|a[10]<<8|a[11]);return b})[0])||Infinity;return a/f})}));h=Math.min.apply(null,h);return isFinite(h)?h:0}}},{}],58:[function(d,k,g){g=d("../utils/stream.js");var b=d("./mp4-generator.js"),h=d("../m2ts/m2ts.js"),q=d("../codecs/adts.js"),r=d("../codecs/h264").H264Stream,n=d("../aac"),c=d("../data/silence"),f=d("../utils/clock"),a=["audioobjecttype","channelcount","samplerate",
"samplingfrequencyindex","samplesize"],l=["width","height","profileIdc","levelIdc","profileCompatibility"],v,p,t,e,u,A,B,x,z,D,y;u=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0}}};A=function(a){return 73===a[0]&&68===a[1]&&51===a[2]?!0:!1};D=function(a,c){var b;if(a.length!==c.length)return!1;for(b=0;b<a.length;b++)if(a[b]!==c[b])return!1;return!0};y=function(a){var c,b,e=0;for(c=0;c<a.length;c++)b=a[c],e+=b.data.byteLength;return e};
p=function(e){var d=[],g=0,l=0,h=0,k=Infinity;p.prototype.init.call(this);this.push=function(c){B(e,c);e&&a.forEach(function(a){e[a]=c[a]});d.push(c)};this.setEarliestDts=function(a){l=a-e.timelineStartInfo.baseMediaDecodeTime};this.setVideoBaseMediaDecodeTime=function(a){k=a};this.setAudioAppendStart=function(a){h=a};this.flush=function(){var a,c,f;0!==d.length&&(a=this.trimAdtsFramesByEarliestDts_(d),e.baseMediaDecodeTime=z(e),this.prefixWithSilence_(e,a),e.samples=this.generateSampleTable_(a),
c=b.mdat(this.concatenateFrameData_(a)),d=[],a=b.moof(g,[e]),f=new Uint8Array(a.byteLength+c.byteLength),g++,f.set(a),f.set(c,a.byteLength),x(e),this.trigger("data",{track:e,boxes:f}));this.trigger("done","AudioSegmentStream")};this.prefixWithSilence_=function(a,b){var e,d=0,g=0,l=g=0;if(b.length&&(e=f.audioTsToVideoTs(a.baseMediaDecodeTime,a.samplerate),d=Math.ceil(9E4/(a.samplerate/1024)),h&&k&&(g=e-Math.max(h,k),g=Math.floor(g/d),l=g*d),!(1>g||45E3<l))){d=c[a.samplerate];d||(d=b[0].data);for(e=
0;e<g;e++)b.splice(e,0,{data:d});a.baseMediaDecodeTime-=Math.floor(f.videoTsToAudioTs(l,a.samplerate))}};this.trimAdtsFramesByEarliestDts_=function(a){if(e.minSegmentDts>=l)return a;e.minSegmentDts=Infinity;return a.filter(function(a){return a.dts>=l?(e.minSegmentDts=Math.min(e.minSegmentDts,a.dts),e.minSegmentPts=e.minSegmentDts,!0):!1})};this.generateSampleTable_=function(a){var c,b,e=[];for(c=0;c<a.length;c++)b=a[c],e.push({size:b.data.byteLength,duration:1024});return e};this.concatenateFrameData_=
function(a){var c,b,e=0,d=new Uint8Array(y(a));for(c=0;c<a.length;c++)b=a[c],d.set(b.data,e),e+=b.data.byteLength;return d}};p.prototype=new g;v=function(a,c){var e=0,d=[],f=[],g,h;c=c||{};v.prototype.init.call(this);delete a.minPTS;this.gopCache_=[];this.push=function(c){B(a,c);"seq_parameter_set_rbsp"!==c.nalUnitType||g||(g=c.config,a.sps=[c.data],l.forEach(function(c){a[c]=g[c]},this));"pic_parameter_set_rbsp"!==c.nalUnitType||h||(h=c.data,a.pps=[c.data]);d.push(c)};this.flush=function(){for(var g,
l,h;d.length&&"access_unit_delimiter_rbsp"!==d[0].nalUnitType;)d.shift();if(0!==d.length){g=this.groupNalsIntoFrames_(d);g=this.groupFramesIntoGops_(g);g[0][0].keyFrame||((l=this.getGopForFusion_(d[0],a))?(g.unshift(l),g.byteLength+=l.byteLength,g.nalCount+=l.nalCount,g.pts=l.pts,g.dts=l.dts,g.duration+=l.duration):g=this.extendFirstKeyFrame_(g));if(f.length){l=c.alignGopsAtEnd?this.alignGopsAtEnd_(g):this.alignGopsAtStart_(g);if(!l){this.gopCache_.unshift({gop:g.pop(),pps:a.pps,sps:a.sps});this.gopCache_.length=
Math.min(6,this.gopCache_.length);d=[];this.resetStream_();this.trigger("done","VideoSegmentStream");return}x(a);g=l}B(a,g);a.samples=this.generateSampleTable_(g);l=b.mdat(this.concatenateNalData_(g));a.baseMediaDecodeTime=z(a);this.trigger("processedGopsInfo",g.map(function(a){return{pts:a.pts,dts:a.dts,byteLength:a.byteLength}}));this.gopCache_.unshift({gop:g.pop(),pps:a.pps,sps:a.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);d=[];this.trigger("baseMediaDecodeTime",a.baseMediaDecodeTime);
this.trigger("timelineStartInfo",a.timelineStartInfo);g=b.moof(e,[a]);h=new Uint8Array(g.byteLength+l.byteLength);e++;h.set(g);h.set(l,g.byteLength);this.trigger("data",{track:a,boxes:h})}this.resetStream_();this.trigger("done","VideoSegmentStream")};this.resetStream_=function(){x(a);h=g=void 0};this.getGopForFusion_=function(c){var b=Infinity,e,d,f,g;for(g=0;g<this.gopCache_.length;g++)f=this.gopCache_[g],e=f.gop,a.pps&&D(a.pps[0],f.pps[0])&&a.sps&&D(a.sps[0],f.sps[0])&&!(e.dts<a.timelineStartInfo.dts)&&
(e=c.dts-e.dts-e.duration,-1E4<=e&&45E3>=e&&(!d||b>e)&&(d=f,b=e));return d?d.gop:null};this.extendFirstKeyFrame_=function(a){var c;!a[0][0].keyFrame&&1<a.length&&(c=a.shift(),a.byteLength-=c.byteLength,a.nalCount-=c.nalCount,a[0][0].dts=c.dts,a[0][0].pts=c.pts,a[0][0].duration+=c.duration);return a};this.groupNalsIntoFrames_=function(a){var c,b,e=[],d=[];for(c=e.byteLength=0;c<a.length;c++)b=a[c],"access_unit_delimiter_rbsp"===b.nalUnitType?(e.length&&(e.duration=b.dts-e.dts,d.push(e)),e=[b],e.byteLength=
b.data.byteLength,e.pts=b.pts,e.dts=b.dts):("slice_layer_without_partitioning_rbsp_idr"===b.nalUnitType&&(e.keyFrame=!0),e.duration=b.dts-e.dts,e.byteLength+=b.data.byteLength,e.push(b));d.length&&(!e.duration||0>=e.duration)&&(e.duration=d[d.length-1].duration);d.push(e);return d};this.groupFramesIntoGops_=function(a){var c,b,e=[],d=[];e.byteLength=0;e.nalCount=0;e.duration=0;e.pts=a[0].pts;e.dts=a[0].dts;d.byteLength=0;d.nalCount=0;d.duration=0;d.pts=a[0].pts;d.dts=a[0].dts;for(c=0;c<a.length;c++)b=
a[c],b.keyFrame?(e.length&&(d.push(e),d.byteLength+=e.byteLength,d.nalCount+=e.nalCount,d.duration+=e.duration),e=[b],e.nalCount=b.length,e.byteLength=b.byteLength,e.pts=b.pts,e.dts=b.dts,e.duration=b.duration):(e.duration+=b.duration,e.nalCount+=b.length,e.byteLength+=b.byteLength,e.push(b));d.length&&0>=e.duration&&(e.duration=d[d.length-1].duration);d.byteLength+=e.byteLength;d.nalCount+=e.nalCount;d.duration+=e.duration;d.push(e);return d};this.generateSampleTable_=function(a,c){var b,e,d,f,g,
l=c||0,h=[];for(b=0;b<a.length;b++)for(f=a[b],e=0;e<f.length;e++)g=f[e],d=u(),d.dataOffset=l,d.compositionTimeOffset=g.pts-g.dts,d.duration=g.duration,d.size=4*g.length,d.size+=g.byteLength,g.keyFrame&&(d.flags.dependsOn=2),l+=d.size,h.push(d);return h};this.concatenateNalData_=function(a){var c,b,e,d,f,g,l=0,h=new Uint8Array(a.byteLength+4*a.nalCount),k=new DataView(h.buffer);for(c=0;c<a.length;c++)for(d=a[c],b=0;b<d.length;b++)for(f=d[b],e=0;e<f.length;e++)g=f[e],k.setUint32(l,g.data.byteLength),
l+=4,h.set(g.data,l),l+=g.data.byteLength;return h};this.alignGopsAtStart_=function(a){var c,b,e,d,g,l,h;g=a.byteLength;l=a.nalCount;h=a.duration;for(c=b=0;c<f.length&&b<a.length;){e=f[c];d=a[b];if(e.pts===d.pts)break;d.pts>e.pts?c++:(b++,g-=d.byteLength,l-=d.nalCount,h-=d.duration)}if(0===b)return a;if(b===a.length)return null;a=a.slice(b);a.byteLength=g;a.duration=h;a.nalCount=l;a.pts=a[0].pts;a.dts=a[0].dts;return a};this.alignGopsAtEnd_=function(a){var c,b,e,d,g,l;c=f.length-1;b=a.length-1;g=
null;for(l=!1;0<=c&&0<=b;){e=f[c];d=a[b];if(e.pts===d.pts){l=!0;break}e.pts>d.pts?c--:(c===f.length-1&&(g=b),b--)}if(!l&&null===g)return null;c=l?b:g;if(0===c)return a;a=a.slice(c);c=a.reduce(function(a,c){a.byteLength+=c.byteLength;a.duration+=c.duration;a.nalCount+=c.nalCount;return a},{byteLength:0,duration:0,nalCount:0});a.byteLength=c.byteLength;a.duration=c.duration;a.nalCount=c.nalCount;a.pts=a[0].pts;a.dts=a[0].dts;return a};this.alignGopsWith=function(a){f=a}};v.prototype=new g;B=function(a,
c){"number"===typeof c.pts&&(void 0===a.timelineStartInfo.pts&&(a.timelineStartInfo.pts=c.pts),a.minSegmentPts=void 0===a.minSegmentPts?c.pts:Math.min(a.minSegmentPts,c.pts),a.maxSegmentPts=void 0===a.maxSegmentPts?c.pts:Math.max(a.maxSegmentPts,c.pts));"number"===typeof c.dts&&(void 0===a.timelineStartInfo.dts&&(a.timelineStartInfo.dts=c.dts),a.minSegmentDts=void 0===a.minSegmentDts?c.dts:Math.min(a.minSegmentDts,c.dts),a.maxSegmentDts=void 0===a.maxSegmentDts?c.dts:Math.max(a.maxSegmentDts,c.dts))};
x=function(a){delete a.minSegmentDts;delete a.maxSegmentDts;delete a.minSegmentPts;delete a.maxSegmentPts};z=function(a){var c,b=a.minSegmentDts-a.timelineStartInfo.dts;c=a.timelineStartInfo.baseMediaDecodeTime;c=Math.max(0,c+b);"audio"===a.type&&(a=a.samplerate/9E4,c*=a,c=Math.floor(c));return c};e=function(a,c){this.numberOfTracks=0;this.metadataStream=c;this.remuxTracks="undefined"!==typeof a.remux?!!a.remux:!0;this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=
[];this.pendingMetadata=[];this.emittedTracks=this.pendingBytes=0;e.prototype.init.call(this);this.push=function(a){if(a.text)return this.pendingCaptions.push(a);if(a.frames)return this.pendingMetadata.push(a);this.pendingTracks.push(a.track);this.pendingBoxes.push(a.boxes);this.pendingBytes+=a.boxes.byteLength;"video"===a.track.type&&(this.videoTrack=a.track);"audio"===a.track.type&&(this.audioTrack=a.track)}};e.prototype=new g;e.prototype.flush=function(c){var e=0,d={captions:[],captionStreams:{},
metadata:[],info:{}},f=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==c&&"AudioSegmentStream"!==c||this.remuxTracks)return;if(0===this.pendingTracks.length){this.emittedTracks++;this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}this.videoTrack?(f=this.videoTrack.timelineStartInfo.pts,l.forEach(function(a){d.info[a]=this.videoTrack[a]},this)):this.audioTrack&&(f=this.audioTrack.timelineStartInfo.pts,a.forEach(function(a){d.info[a]=
this.audioTrack[a]},this));d.type=1===this.pendingTracks.length?this.pendingTracks[0].type:"combined";this.emittedTracks+=this.pendingTracks.length;c=b.initSegment(this.pendingTracks);d.initSegment=new Uint8Array(c.byteLength);d.initSegment.set(c);d.data=new Uint8Array(this.pendingBytes);for(c=0;c<this.pendingBoxes.length;c++)d.data.set(this.pendingBoxes[c],e),e+=this.pendingBoxes[c].byteLength;for(c=0;c<this.pendingCaptions.length;c++)e=this.pendingCaptions[c],e.startTime=e.startPts-f,e.startTime/=
9E4,e.endTime=e.endPts-f,e.endTime/=9E4,d.captionStreams[e.stream]=!0,d.captions.push(e);for(c=0;c<this.pendingMetadata.length;c++)e=this.pendingMetadata[c],e.cueTime=e.pts-f,e.cueTime/=9E4,d.metadata.push(e);d.metadata.dispatchType=this.metadataStream.dispatchType;this.pendingTracks.length=0;this.videoTrack=null;this.pendingBoxes.length=0;this.pendingBytes=this.pendingCaptions.length=0;this.pendingMetadata.length=0;this.trigger("data",d);this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),
this.emittedTracks=0)};t=function(a){var c=this,b=!0,d,f;t.prototype.init.call(this);a=a||{};this.baseMediaDecodeTime=a.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var b={};this.transmuxPipeline_=b;b.type="aac";b.metadataStream=new h.MetadataStream;b.aacStream=new n;b.audioTimestampRolloverStream=new h.TimestampRolloverStream("audio");b.timedMetadataTimestampRolloverStream=new h.TimestampRolloverStream("timed-metadata");b.adtsStream=new q;b.coalesceStream=new e(a,
b.metadataStream);b.headOfPipeline=b.aacStream;b.aacStream.pipe(b.audioTimestampRolloverStream).pipe(b.adtsStream);b.aacStream.pipe(b.timedMetadataTimestampRolloverStream).pipe(b.metadataStream).pipe(b.coalesceStream);b.metadataStream.on("timestamp",function(a){b.aacStream.setTimestamp(a.timeStamp)});b.aacStream.on("data",function(a){"timed-metadata"!==a.type||b.audioSegmentStream||(f=f||{timelineStartInfo:{baseMediaDecodeTime:c.baseMediaDecodeTime},codec:"adts",type:"audio"},b.coalesceStream.numberOfTracks++,
b.audioSegmentStream=new p(f),b.adtsStream.pipe(b.audioSegmentStream).pipe(b.coalesceStream))});b.coalesceStream.on("data",this.trigger.bind(this,"data"));b.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setupTsPipeline=function(){var b={};this.transmuxPipeline_=b;b.type="ts";b.metadataStream=new h.MetadataStream;b.packetStream=new h.TransportPacketStream;b.parseStream=new h.TransportParseStream;b.elementaryStream=new h.ElementaryStream;b.videoTimestampRolloverStream=new h.TimestampRolloverStream("video");
b.audioTimestampRolloverStream=new h.TimestampRolloverStream("audio");b.timedMetadataTimestampRolloverStream=new h.TimestampRolloverStream("timed-metadata");b.adtsStream=new q;b.h264Stream=new r;b.captionStream=new h.CaptionStream;b.coalesceStream=new e(a,b.metadataStream);b.headOfPipeline=b.packetStream;b.packetStream.pipe(b.parseStream).pipe(b.elementaryStream);b.elementaryStream.pipe(b.videoTimestampRolloverStream).pipe(b.h264Stream);b.elementaryStream.pipe(b.audioTimestampRolloverStream).pipe(b.adtsStream);
b.elementaryStream.pipe(b.timedMetadataTimestampRolloverStream).pipe(b.metadataStream).pipe(b.coalesceStream);b.h264Stream.pipe(b.captionStream).pipe(b.coalesceStream);b.elementaryStream.on("data",function(e){var g;if("metadata"===e.type){for(g=e.tracks.length;g--;)d||"video"!==e.tracks[g].type?f||"audio"!==e.tracks[g].type||(f=e.tracks[g],f.timelineStartInfo.baseMediaDecodeTime=c.baseMediaDecodeTime):(d=e.tracks[g],d.timelineStartInfo.baseMediaDecodeTime=c.baseMediaDecodeTime);d&&!b.videoSegmentStream&&
(b.coalesceStream.numberOfTracks++,b.videoSegmentStream=new v(d,a),b.videoSegmentStream.on("timelineStartInfo",function(a){f&&(f.timelineStartInfo=a,b.audioSegmentStream.setEarliestDts(a.dts))}),b.videoSegmentStream.on("processedGopsInfo",c.trigger.bind(c,"gopInfo")),b.videoSegmentStream.on("baseMediaDecodeTime",function(a){f&&b.audioSegmentStream.setVideoBaseMediaDecodeTime(a)}),b.h264Stream.pipe(b.videoSegmentStream).pipe(b.coalesceStream));f&&!b.audioSegmentStream&&(b.coalesceStream.numberOfTracks++,
b.audioSegmentStream=new p(f),b.adtsStream.pipe(b.audioSegmentStream).pipe(b.coalesceStream))}});b.coalesceStream.on("data",this.trigger.bind(this,"data"));b.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setBaseMediaDecodeTime=function(a){var b=this.transmuxPipeline_;this.baseMediaDecodeTime=a;f&&(f.timelineStartInfo.dts=void 0,f.timelineStartInfo.pts=void 0,x(f),f.timelineStartInfo.baseMediaDecodeTime=a,b.audioTimestampRolloverStream&&b.audioTimestampRolloverStream.discontinuity());
d&&(b.videoSegmentStream&&(b.videoSegmentStream.gopCache_=[],b.videoTimestampRolloverStream.discontinuity()),d.timelineStartInfo.dts=void 0,d.timelineStartInfo.pts=void 0,x(d),b.captionStream.reset(),d.timelineStartInfo.baseMediaDecodeTime=a);b.timedMetadataTimestampRolloverStream&&b.timedMetadataTimestampRolloverStream.discontinuity()};this.setAudioAppendStart=function(a){f&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(a)};this.alignGopsWith=function(a){d&&this.transmuxPipeline_.videoSegmentStream&&
this.transmuxPipeline_.videoSegmentStream.alignGopsWith(a)};this.push=function(a){if(b){var c=A(a);c&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():c||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline();b=!1}this.transmuxPipeline_.headOfPipeline.push(a)};this.flush=function(){b=!0;this.transmuxPipeline_.headOfPipeline.flush()};this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}};t.prototype=new g;k.exports={Transmuxer:t,
VideoSegmentStream:v,AudioSegmentStream:p,AUDIO_PROPERTIES:a,VIDEO_PROPERTIES:l}},{"../aac":38,"../codecs/adts.js":40,"../codecs/h264":41,"../data/silence":42,"../m2ts/m2ts.js":50,"../utils/clock":60,"../utils/stream.js":62,"./mp4-generator.js":56}],59:[function(d,k,g){var b=d("../m2ts/stream-types.js"),h=d("../m2ts/timestamp-rollover-stream.js").handleRollover,q,r;q=d("../m2ts/probe.js");r=d("../aac/probe.js");var n=function(b,d){if(b.audio&&b.audio.length){var a=d;"undefined"===typeof a&&(a=b.audio[0].dts);
b.audio.forEach(function(b){b.dts=h(b.dts,a);b.pts=h(b.pts,a);b.dtsTime=b.dts/9E4;b.ptsTime=b.pts/9E4})}if(b.video&&b.video.length){var g=d;"undefined"===typeof g&&(g=b.video[0].dts);b.video.forEach(function(a){a.dts=h(a.dts,g);a.pts=h(a.pts,g);a.dtsTime=a.dts/9E4;a.ptsTime=a.pts/9E4});if(b.firstKeyFrame){var k=b.firstKeyFrame;k.dts=h(k.dts,g);k.pts=h(k.pts,g);k.dtsTime=k.dts/9E4;k.ptsTime=k.dts/9E4}}};k.exports={inspect:function(c,d){var a;a=73===c[0]&&68===c[1]&&51===c[2]?!0:!1;var g;if(a)a:{var h=
!1;g=0;var k=null;a=null;for(var t=0,e=0,u;3<=c.length-e;){switch(r.parseType(c,e)){case "timed-metadata":if(10>c.length-e){h=!0;break}t=r.parseId3TagSize(c,e);if(t>c.length){h=!0;break}null===a&&(u=c.subarray(e,e+t),a=r.parseAacTimestamp(u));e+=t;break;case "audio":if(7>c.length-e){h=!0;break}t=r.parseAdtsSize(c,e);if(t>c.length){h=!0;break}null===k&&(u=c.subarray(e,e+t),k=r.parseSampleRate(u));g++;e+=t;break;default:e++}if(h){g=null;break a}}null===k||null===a?g=null:(h=9E4/k,g={audio:[{type:"audio",
dts:a,pts:a},{type:"audio",dts:a+1024*g*h,pts:a+1024*g*h}]})}else{a={pid:null,table:null};h={};k=0;for(t=188;t<c.byteLength;)if(71===c[k]&&71===c[t]){e=c.subarray(k,t);u=q.parseType(e,a.pid);switch(u){case "pat":a.pid||(a.pid=q.parsePat(e));break;case "pmt":a.table||(a.table=q.parsePmt(e))}if(a.pid&&a.table)break;k+=188;t+=188}else k++,t++;for(g in a.table)if(a.table.hasOwnProperty(g))switch(a.table[g]){case b.H264_STREAM_TYPE:h.video=[];k=c;t=a;e=h;u=0;for(var A=188,B=void 0,x=void 0,z=void 0,D=
z=x=void 0,z=x=void 0,y=!1,C=[],D=0;A<k.byteLength;)if(71===k[u]&&71===k[A]){B=k.subarray(u,A);x=q.parseType(B,t.pid);switch(x){case "pes":if(z=q.parsePesType(B,t.table),x=q.parsePayloadUnitStartIndicator(B),"video"===z)if(x&&!y&&(z=q.parsePesTime(B))&&(z.type="video",e.video.push(z),y=!0),!e.firstKeyFrame){if(x&&0!==D){D=new Uint8Array(D);for(x=0;C.length;)z=C.shift(),D.set(z,x),x+=z.byteLength;q.videoPacketContainsKeyFrame(D)&&(e.firstKeyFrame=q.parsePesTime(D),e.firstKeyFrame.type="video");D=0}C.push(B);
D+=B.byteLength}}if(y&&e.firstKeyFrame)break;u+=188;A+=188}else u++,A++;A=k.byteLength;u=A-188;for(y=!1;0<=u;)if(71===k[u]&&71===k[A]){B=k.subarray(u,A);x=q.parseType(B,t.pid);switch(x){case "pes":if(z=q.parsePesType(B,t.table),x=q.parsePayloadUnitStartIndicator(B),"video"===z&&x&&(z=q.parsePesTime(B)))z.type="video",e.video.push(z),y=!0}if(y)break;u-=188;A-=188}else u--,A--;0===h.video.length&&delete h.video;break;case b.ADTS_STREAM_TYPE:h.audio=[];k=c;t=a;e=h;u=0;A=188;y=D=C=C=y=void 0;for(B=!1;A<
k.byteLength;)if(71===k[u]&&71===k[A]){y=k.subarray(u,A);C=q.parseType(y,t.pid);switch(C){case "pes":if(C=q.parsePesType(y,t.table),D=q.parsePayloadUnitStartIndicator(y),"audio"===C&&D&&(y=q.parsePesTime(y)))y.type="audio",e.audio.push(y),B=!0}if(B)break;u+=188;A+=188}else u++,A++;A=k.byteLength;u=A-188;for(B=!1;0<=u;)if(71===k[u]&&71===k[A]){y=k.subarray(u,A);C=q.parseType(y,t.pid);switch(C){case "pes":if(C=q.parsePesType(y,t.table),D=q.parsePayloadUnitStartIndicator(y),"audio"===C&&D&&(y=q.parsePesTime(y)))y.type=
"audio",e.audio.push(y),B=!0}if(B)break;u-=188;A-=188}else u--,A--;0===h.audio.length&&delete h.audio}g=h}if(!g||!g.audio&&!g.video)return null;n(g,d);return g}}},{"../aac/probe.js":39,"../m2ts/probe.js":52,"../m2ts/stream-types.js":53,"../m2ts/timestamp-rollover-stream.js":54}],60:[function(d,k,g){var b,h,q,r;b=function(b){return 9E4*b};h=function(b,c){return b*c};q=function(b){return b/9E4};r=function(b,c){return b/c};k.exports={secondsToVideoTs:b,secondsToAudioTs:h,videoTsToSeconds:q,audioTsToSeconds:r,
audioTsToVideoTs:function(d,c){return b(r(d,c))},videoTsToAudioTs:function(b,c){return h(q(b),c)}}},{}],61:[function(d,k,g){k.exports=function(b){var d=b.byteLength,g=0,k=0;this.length=function(){return 8*d};this.bitsAvailable=function(){return 8*d+k};this.loadWord=function(){var n=b.byteLength-d,c=new Uint8Array(4),f=Math.min(4,d);if(0===f)throw Error("no bytes available");c.set(b.subarray(n,n+f));g=(new DataView(c.buffer)).getUint32(0);k=8*f;d-=f};this.skipBits=function(b){var c;k>b||(b-=k,c=Math.floor(b/
8),b-=8*c,d-=c,this.loadWord());g<<=b;k-=b};this.readBits=function(b){var c=Math.min(k,b),f=g>>>32-c;k-=c;0<k?g<<=c:0<d&&this.loadWord();c=b-c;return 0<c?f<<c|this.readBits(c):f};this.skipLeadingZeros=function(){var b;for(b=0;b<k;++b)if(0!==(g&2147483648>>>b))return g<<=b,k-=b,b;this.loadWord();return b+this.skipLeadingZeros()};this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.readUnsignedExpGolomb=
function(){var b=this.skipLeadingZeros();return this.readBits(b+1)-1};this.readExpGolomb=function(){var b=this.readUnsignedExpGolomb();return 1&b?1+b>>>1:-1*(b>>>1)};this.readBoolean=function(){return 1===this.readBits(1)};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()}},{}],62:[function(d,k,g){d=function(){this.init=function(){var b={};this.on=function(d,g){b[d]||(b[d]=[]);b[d]=b[d].concat(g)};this.off=function(d,g){var k;if(!b[d])return!1;k=b[d].indexOf(g);b[d]=b[d].slice();
b[d].splice(k,1);return-1<k};this.trigger=function(d){var g,k,n,c;if(g=b[d])if(2===arguments.length)for(n=g.length,k=0;k<n;++k)g[k].call(this,arguments[1]);else{c=[];for(k=1;k<arguments.length;++k)c.push(arguments[k]);n=g.length;for(k=0;k<n;++k)g[k].apply(this,c)}};this.dispose=function(){b={}}}};d.prototype.pipe=function(b){this.on("data",function(d){b.push(d)});this.on("done",function(d){b.flush(d)});return b};d.prototype.push=function(b){this.trigger("data",b)};d.prototype.flush=function(b){this.trigger("done",
b)};k.exports=d},{}],63:[function(d,k,g){(function(b){var d=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/\;?#]*)?(.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,q=/^([^\/;?#]*)(.*)$/,r=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,c={buildAbsoluteURL:function(b,a,d){d=d||{};b=b.trim();a=a.trim();if(!a){if(!d.alwaysNormalize)return b;d=this.parseURL(b);if(!d)throw Error("Error trying to parse base URL.");d.path=c.normalizePath(d.path);return c.buildURLFromParts(d)}var g=this.parseURL(a);if(!g)throw Error("Error trying to parse relative URL.");
if(g.scheme){if(!d.alwaysNormalize)return a;g.path=c.normalizePath(g.path);return c.buildURLFromParts(g)}a=this.parseURL(b);if(!a)throw Error("Error trying to parse base URL.");!a.netLoc&&a.path&&"/"!==a.path[0]&&(b=q.exec(a.path),a.netLoc=b[1],a.path=b[2]);a.netLoc&&!a.path&&(a.path="/");b={scheme:a.scheme,netLoc:g.netLoc,path:null,params:g.params,query:g.query,fragment:g.fragment};g.netLoc||(b.netLoc=a.netLoc,"/"!==g.path[0]&&(g.path?(a=a.path,a=a.substring(0,a.lastIndexOf("/")+1)+g.path,b.path=
c.normalizePath(a)):(b.path=a.path,g.params||(b.params=a.params,g.query||(b.query=a.query)))));null===b.path&&(b.path=d.alwaysNormalize?c.normalizePath(g.path):g.path);return c.buildURLFromParts(b)},parseURL:function(b){return(b=d.exec(b))?{scheme:b[1]||"",netLoc:b[2]||"",path:b[3]||"",params:b[4]||"",query:b[5]||"",fragment:b[6]||""}:null},normalizePath:function(b){for(b=b.split("").reverse().join("").replace(r,"");b.length!==(b=b.replace(n,"")).length;);return b.split("").reverse().join("")},buildURLFromParts:function(b){return b.scheme+
b.netLoc+b.path+b.params+b.query+b.fragment}};"object"===typeof g&&"object"===typeof k?k.exports=c:"object"===typeof g?g.URLToolkit=c:b.URLToolkit=c})(this)},{}],64:[function(d,k,g){(function(b){Object.defineProperty(g,"__esModule",{value:!0});var h=d("global/window"),q=h&&h.__esModule?h:{"default":h},r=(b="undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null)&&b.__esModule?b:{"default":b},n=function(b){Object.defineProperties(b.frame,{id:{get:function(){r["default"].log.warn("cue.frame.id is deprecated. Use cue.value.key instead.");
return b.value.key}},value:{get:function(){r["default"].log.warn("cue.frame.value is deprecated. Use cue.value.data instead.");return b.value.data}},privateData:{get:function(){r["default"].log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead.");return b.value.data}}})},c=function(b){var a=void 0;return a=isNaN(b)||Infinity===Math.abs(b)?Number.MAX_VALUE:b};g["default"]={addTextTrackData:function(b,a,d){var g=q["default"].WebKitDataCue||q["default"].VTTCue;a&&a.forEach(function(a){this.inbandTextTracks_[a.stream].addCue(new g(a.startTime+
this.timestampOffset,a.endTime+this.timestampOffset,a.text))},b);d&&function(){var a=c(b.mediaSource_.duration);d.forEach(function(a){var b=a.cueTime+this.timestampOffset;a.frames.forEach(function(a){var c=new g(b,b,a.value||a.url||a.data||"");c.frame=a;c.value=a;n(c);this.metadataTrack_.addCue(c)},this)},b);b.metadataTrack_&&b.metadataTrack_.cues&&b.metadataTrack_.cues.length&&function(){for(var c=b.metadataTrack_.cues,e=[],d=0;d<c.length;d++)c[d]&&e.push(c[d]);var g=e.reduce(function(a,b){var c=
a[b.startTime]||[];c.push(b);a[b.startTime]=c;return a},{}),h=Object.keys(g).sort(function(a,b){return Number(a)-Number(b)});h.forEach(function(b,c){var e=Number(h[c+1])||a;g[b].forEach(function(a){a.endTime=e})})}()}()},durationOfVideo:c};k.exports=g["default"]}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"global/window":32}],65:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});g["default"]={isAudioCodec:function(b){return/mp4a\.\d+.\d+/i.test(b)},
parseContentType:function(b){var d={type:"",parameters:{}};b=b.trim().split(";");d.type=b.shift().trim();b.forEach(function(b){var g=b.trim().split("=");1<g.length&&(b=g[0].replace(/"/g,"").trim(),g=g[1].replace(/"/g,"").trim(),d.parameters[b]=g)});return d},isVideoCodec:function(b){return/avc1\.[\da-f]+/i.test(b)},translateLegacyCodecs:function(b){return b.map(function(b){return b.replace(/avc1\.(\d+)\.(\d+)/i,function(b,d,g){b=("00"+Number(d).toString(16)).slice(-2);g=("00"+Number(g).toString(16)).slice(-2);
return"avc1."+b+"00"+g})})}};k.exports=g["default"]},{}],66:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});g["default"]=function(b,d,g){d=d.player_;if(g.captions&&g.captions.length){b.inbandTextTracks_||(b.inbandTextTracks_={});for(var k in g.captionStreams)if(!b.inbandTextTracks_[k]){d.tech_.trigger({type:"usage",name:"hls-608"});var n=d.textTracks().getTrackById(k);b.inbandTextTracks_[k]=n?n:d.addRemoteTextTrack({kind:"captions",id:k,label:k},!1).track}}g.metadata&&g.metadata.length&&
!b.metadataTrack_&&(b.metadataTrack_=d.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,b.metadataTrack_.inBandMetadataTrackDispatchType=g.metadata.dispatchType)};k.exports=g["default"]},{}],67:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});g["default"]={TIME_BETWEEN_CHUNKS:1,BYTES_PER_CHUNK:32768};k.exports=g["default"]},{}],68:[function(d,k,g){(function(b){function h(a){return a&&a.__esModule?a:{"default":a}}function q(a,b){if("function"!==typeof b&&null!==
b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(g,"__esModule",{value:!0});var r=function(){function a(b,c){for(var d=0;d<c.length;d++){var f=c[d];f.enumerable=f.enumerable||!1;f.configurable=!0;"value"in f&&(f.writable=!0);Object.defineProperty(b,f.key,f)}}return function(b,
c,d){c&&a(b.prototype,c);d&&a(b,d);return b}}(),n=function(a,b,c){var d=!0;for(;d;)if(null===a&&(a=Function.prototype),d=Object.getOwnPropertyDescriptor(a,b),void 0===d){a=Object.getPrototypeOf(a);if(null===a)break;d=!0}else{if("value"in d)return d.value;b=d.get;return void 0===b?void 0:b.call(c)}},c=d("global/document"),f=h(c),a=h("undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null);b=d("./flash-source-buffer");var l=h(b);b=d("./flash-constants");b=h(b);var v=d("./codec-utils"),
c=function(b){function c(){var b=this;if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");n(Object.getPrototypeOf(c.prototype),"constructor",this).call(this);this.sourceBuffers=[];this.readyState="closed";this.on(["sourceopen","webkitsourceopen"],function(c){b.swfObj=f["default"].getElementById(c.swfId);b.player_=(0,a["default"])(b.swfObj.parentNode);b.tech_=b.swfObj.tech;b.readyState="open";b.tech_.on("seeking",function(){for(var a=b.sourceBuffers.length;a--;)b.sourceBuffers[a].abort()});
b.swfObj&&b.swfObj.vjs_load()})}q(c,b);r(c,[{key:"addSeekableRange_",value:function(){}},{key:"addSourceBuffer",value:function(a){a=(0,v.parseContentType)(a);var b=void 0;if("video/mp2t"===a.type||"audio/mp2t"===a.type)b=new l["default"](this);else throw Error("NotSupportedError (Video.js)");this.sourceBuffers.push(b);return b}},{key:"endOfStream",value:function(a){"network"===a?this.tech_.error(2):"decode"===a&&this.tech_.error(3);"ended"!==this.readyState&&(this.readyState="ended",this.swfObj.vjs_endOfStream())}}]);
return c}(a["default"].EventTarget);g["default"]=c;try{Object.defineProperty(c.prototype,"duration",{get:function(){return this.swfObj?this.swfObj.vjs_getProperty("duration"):NaN},set:function(a){var b=void 0,c=this.swfObj.vjs_getProperty("duration");this.swfObj.vjs_setProperty("duration",a);if(a<c)for(b=0;b<this.sourceBuffers.length;b++)this.sourceBuffers[b].remove(a,c);return a}})}catch(t){c.prototype.duration=NaN}for(var p in b["default"])c[p]=b["default"][p];k.exports=g["default"]}).call(this,
"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./codec-utils":65,"./flash-constants":67,"./flash-source-buffer":69,"global/document":31}],69:[function(d,k,g){(function(b){function h(a){return a&&a.__esModule?a:{"default":a}}function q(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,
writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(g,"__esModule",{value:!0});var r=function(){function a(b,c){for(var d=0;d<c.length;d++){var e=c[d];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(b,e.key,e)}}return function(b,c,d){c&&a(b.prototype,c);d&&a(b,d);return b}}(),n=function(a,b,c){var d=!0;for(;d;)if(null===a&&(a=Function.prototype),d=Object.getOwnPropertyDescriptor(a,
b),void 0===d){a=Object.getPrototypeOf(a);if(null===a)break;d=!0}else{if("value"in d)return d.value;b=d.get;return void 0===b?void 0:b.call(c)}},c=d("global/window"),f=h(c),a=h("undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null);b=d("mux.js/lib/flv");var l=h(b);b=d("./remove-cues-from-track");var v=h(b);b=d("./create-text-tracks-if-necessary");var p=h(b),t=d("./add-text-track-data");b=d("./flash-transmuxer-worker");var e=h(b);b=d("webwackify");var u=h(b);b=d("./flash-constants");
var A=h(b),B=function(){var a=void 0;try{a=d.resolve("./flash-transmuxer-worker")}catch(b){}return a},x=function(a){f["default"].setTimeout(a,A["default"].TIME_BETWEEN_CHUNKS)},z=function(a,b){if("number"!==typeof b||0>b)b=0;var c=Math.pow(10,b);return Math.round(a*c)/c};b=function(b){function c(b){var d=this;if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");n(Object.getPrototypeOf(c.prototype),"constructor",this).call(this);var g=void 0;this.chunkSize_=A["default"].BYTES_PER_CHUNK;
this.buffer_=[];this.bufferSize_=0;this.basePtsOffset_=NaN;this.mediaSource_=b;this.videoBufferEnd_=this.audioBufferEnd_=NaN;this.updating=!1;this.timestampOffset_=0;g=f["default"].btoa(String.fromCharCode.apply(null,Array.prototype.slice.call(l["default"].getFlvHeader())));b=this.mediaSource_.player_.id().replace(/[^a-zA-Z0-9]/g,"_");this.flashEncodedHeaderName_="vjs_flashEncodedHeader_"+b+Math.random().toString(36).slice(2,8);this.flashEncodedDataName_="vjs_flashEncodedData_"+b+Math.random().toString(36).slice(2,
8);f["default"][this.flashEncodedHeaderName_]=function(){delete f["default"][d.flashEncodedHeaderName_];return g};this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedHeaderName_);this.transmuxer_=(0,u["default"])(e["default"],B());this.transmuxer_.postMessage({action:"init",options:{}});this.transmuxer_.onmessage=function(a){"data"===a.data.action&&d.receiveBuffer_(a.data.segment)};this.one("updateend",function(){d.mediaSource_.tech_.trigger("loadedmetadata")});Object.defineProperty(this,
"timestampOffset",{get:function(){return this.timestampOffset_},set:function(a){"number"===typeof a&&0<=a&&(this.timestampOffset_=a,this.mediaSource_.swfObj.vjs_discontinuity(),this.videoBufferEnd_=this.audioBufferEnd_=this.basePtsOffset_=NaN,this.transmuxer_.postMessage({action:"reset"}))}});Object.defineProperty(this,"buffered",{get:function(){if(!(this.mediaSource_&&this.mediaSource_.swfObj&&"vjs_getProperty"in this.mediaSource_.swfObj))return a["default"].createTimeRange();var b=this.mediaSource_.swfObj.vjs_getProperty("buffered");
b&&b.length&&(b[0][0]=z(b[0][0],3),b[0][1]=z(b[0][1],3));return a["default"].createTimeRanges(b)}});this.mediaSource_.player_.on("seeked",function(){(0,v["default"])(0,Infinity,d.metadataTrack_);if(d.inbandTextTracks_)for(var a in d.inbandTextTracks_)(0,v["default"])(0,Infinity,d.inbandTextTracks_[a])});var h=this.onHlsReset_.bind(this);this.mediaSource_.player_.tech_.on("hls-reset",h);this.mediaSource_.player_.tech_.hls.on("dispose",function(){d.transmuxer_.terminate();d.mediaSource_.player_.tech_.off("hls-reset",
h)})}q(c,b);r(c,[{key:"appendBuffer",value:function(a){var b=void 0;if(this.updating)throw b=Error("SourceBuffer.append() cannot be called while an update is in progress"),b.name="InvalidStateError",b.code=11,b;this.updating=!0;this.mediaSource_.readyState="open";this.trigger({type:"update"});this.transmuxer_.postMessage({action:"push",data:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength},[a.buffer]);this.transmuxer_.postMessage({action:"flush"})}},{key:"abort",value:function(){this.buffer_=
[];this.bufferSize_=0;this.mediaSource_.swfObj.vjs_abort();this.updating&&(this.updating=!1,this.trigger({type:"updateend"}))}},{key:"remove",value:function(a,b){(0,v["default"])(a,b,this.metadataTrack_);if(this.inbandTextTracks_)for(var c in this.inbandTextTracks_)(0,v["default"])(a,b,this.inbandTextTracks_[c]);this.trigger({type:"update"});this.trigger({type:"updateend"})}},{key:"receiveBuffer_",value:function(a){var b=this;(0,p["default"])(this,this.mediaSource_,a);(0,t.addTextTrackData)(this,
a.captions,a.metadata);x(function(){var c=b.convertTagsToData_(a);0===b.buffer_.length&&x(b.processBuffer_.bind(b));c&&(b.buffer_.push(c),b.bufferSize_+=c.byteLength)})}},{key:"processBuffer_",value:function(){var a=this,b=A["default"].BYTES_PER_CHUNK;if(this.buffer_.length){var c=this.buffer_[0].subarray(0,b);c.byteLength<b||this.buffer_[0].byteLength===b?this.buffer_.shift():this.buffer_[0]=this.buffer_[0].subarray(b);this.bufferSize_-=c.byteLength;for(var b=[],d=c.byteLength,e=0;e<d;e++)b.push(String.fromCharCode(c[e]));
var g=f["default"].btoa(b.join(""));f["default"][this.flashEncodedDataName_]=function(){x(a.processBuffer_.bind(a));delete f["default"][a.flashEncodedDataName_];return g};this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedDataName_)}else!1!==this.updating&&(this.updating=!1,this.trigger({type:"updateend"}))}},{key:"convertTagsToData_",value:function(a){var b=0,c=this.mediaSource_.tech_,d=0,e=void 0,f=a.tags.videoTags;a=a.tags.audioTags;isNaN(this.basePtsOffset_)&&(f.length||a.length)&&
(this.basePtsOffset_=Math.min((a[0]||{pts:Infinity}).pts,(f[0]||{pts:Infinity}).pts));c.seeking()&&(this.audioBufferEnd_=this.videoBufferEnd_=NaN);isNaN(this.videoBufferEnd_)?(c.buffered().length&&(d=c.buffered().end(0)-this.timestampOffset),c.seeking()&&(d=Math.max(d,c.currentTime()-this.timestampOffset)),d=1E3*d+this.basePtsOffset_):d=this.videoBufferEnd_+.1;if((e=f.length)&&f[e-1].pts>=d){for(;--e;){var g=f[e];if(!(g.pts>d)&&(g.keyFrame||g.metaDataTag))break}for(;e&&f[e-1].metaDataTag;)e--}f=f.slice(e);
g=void 0;g=isNaN(this.audioBufferEnd_)?d:this.audioBufferEnd_+.1;f.length&&(g=Math.min(g,f[0].pts));for(e=0;e<a.length&&!(a[e].pts>=g);)e++;a=a.slice(e);a.length&&(this.audioBufferEnd_=a[a.length-1].pts);f.length&&(this.videoBufferEnd_=f[f.length-1].pts);a=this.getOrderedTags_(f,a);if(0!==a.length){if(a[0].pts<d&&c.seeking()){e=1/30;c=c.currentTime()-(d-a[0].pts)/1E3;c<e&&(c=0);try{this.mediaSource_.swfObj.vjs_adjustCurrentTime(c)}catch(l){}}for(c=0;c<a.length;c++)b+=a[c].bytes.byteLength;e=new Uint8Array(b);
for(b=c=0;c<a.length;c++)e.set(a[c].bytes,b),b+=a[c].bytes.byteLength;return e}}},{key:"getOrderedTags_",value:function(a,b){for(var c=void 0,d=[];a.length||b.length;)c=a.length?b.length?b[0].dts<a[0].dts?b.shift():a.shift():a.shift():b.shift(),d.push(c);return d}},{key:"onHlsReset_",value:function(){this.transmuxer_.postMessage({action:"resetCaptions"})}}]);return c}(a["default"].EventTarget);g["default"]=b;k.exports=g["default"]}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?
self:"undefined"!==typeof window?window:{})},{"./add-text-track-data":64,"./create-text-tracks-if-necessary":66,"./flash-constants":67,"./flash-transmuxer-worker":70,"./remove-cues-from-track":72,"global/window":32,"mux.js/lib/flv":46,webwackify:76}],70:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}
return function(b,c,d){c&&a(b.prototype,c);d&&a(b,d);return b}}(),h=d("global/window"),q=h&&h.__esModule?h:{"default":h},r=(d=d("mux.js/lib/flv"))&&d.__esModule?d:{"default":d},n=function(a){a.on("data",function(a){q["default"].postMessage({action:"data",segment:a})});a.on("done",function(a){q["default"].postMessage({action:"done"})})},c=function(){function a(b){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.options=b||{};this.init()}b(a,[{key:"init",value:function(){this.transmuxer&&
this.transmuxer.dispose();this.transmuxer=new r["default"].Transmuxer(this.options);n(this.transmuxer)}},{key:"push",value:function(a){a=new Uint8Array(a.data,a.byteOffset,a.byteLength);this.transmuxer.push(a)}},{key:"reset",value:function(){this.init()}},{key:"flush",value:function(){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}}]);return a}(),f=function(a){a.onmessage=function(a){if("init"===a.data.action&&a.data.options)this.messageHandlers=new c(a.data.options);
else if(this.messageHandlers||(this.messageHandlers=new c),a.data&&a.data.action&&"init"!==a.data.action&&this.messageHandlers[a.data.action])this.messageHandlers[a.data.action](a.data)}};g["default"]=function(a){return new f(a)};k.exports=g["default"]},{"global/window":32,"mux.js/lib/flv":46}],71:[function(d,k,g){(function(b){function h(a){return a&&a.__esModule?a:{"default":a}}function q(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+
typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(g,"__esModule",{value:!0});var r=function(){function a(b,c){for(var d=0;d<c.length;d++){var e=c[d];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(b,e.key,e)}}return function(b,c,d){c&&a(b.prototype,c);d&&a(b,d);return b}}(),n=function(a,b,c){var d=
!0;for(;d;)if(null===a&&(a=Function.prototype),d=Object.getOwnPropertyDescriptor(a,b),void 0===d){a=Object.getPrototypeOf(a);if(null===a)break;d=!0}else{if("value"in d)return d.value;b=d.get;return void 0===b?void 0:b.call(c)}},c=d("global/window"),f=h(c),c=d("global/document"),a=h(c),l=h("undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null);b=d("./virtual-source-buffer");var v=h(b),p=d("./add-text-track-data"),t=d("./codec-utils");b=function(b){function c(){var b=this;
if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");n(Object.getPrototypeOf(c.prototype),"constructor",this).call(this);var d=void 0;this.nativeMediaSource_=new f["default"].MediaSource;for(d in this.nativeMediaSource_)d in c.prototype||"function"!==typeof this.nativeMediaSource_[d]||(this[d]=this.nativeMediaSource_[d].bind(this.nativeMediaSource_));this.duration_=NaN;Object.defineProperty(this,"duration",{get:function(){return Infinity===this.duration_?this.duration_:
this.nativeMediaSource_.duration},set:function(a){this.duration_=a;Infinity!==a&&(this.nativeMediaSource_.duration=a)}});Object.defineProperty(this,"seekable",{get:function(){return Infinity===this.duration_?l["default"].createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}});Object.defineProperty(this,"readyState",{get:function(){return this.nativeMediaSource_.readyState}});Object.defineProperty(this,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}});
this.sourceBuffers=[];this.activeSourceBuffers_=[];this.updateActiveSourceBuffers_=function(){b.activeSourceBuffers_.length=0;if(1===b.sourceBuffers.length){var a=b.sourceBuffers[0];a.appendAudioInitSegment_=!0;a.audioDisabled_=!a.audioCodec_;b.activeSourceBuffers_.push(a)}else{for(var c=!1,d=!0,a=0;a<b.player_.audioTracks().length;a++){var e=b.player_.audioTracks()[a];if(e.enabled&&"main"!==e.kind){c=!0;d=!1;break}}b.sourceBuffers.forEach(function(a){a.appendAudioInitSegment_=!0;if(a.videoCodec_&&
a.audioCodec_)a.audioDisabled_=c;else if(a.videoCodec_&&!a.audioCodec_)a.audioDisabled_=!0,d=!1;else if(!a.videoCodec_&&a.audioCodec_&&(a.audioDisabled_=d))return;b.activeSourceBuffers_.push(a)})}};this.onPlayerMediachange_=function(){b.sourceBuffers.forEach(function(a){a.appendAudioInitSegment_=!0})};this.onHlsReset_=function(){b.sourceBuffers.forEach(function(a){a.transmuxer_&&a.transmuxer_.postMessage({action:"resetCaptions"})})};this.onHlsSegmentTimeMapping_=function(a){b.sourceBuffers.forEach(function(b){return b.timeMapping_=
a.mapping})};["sourceopen","sourceclose","sourceended"].forEach(function(a){this.nativeMediaSource_.addEventListener(a,this.trigger.bind(this))},this);this.on("sourceopen",function(c){if(c=a["default"].querySelector('[src="'+b.url_+'"]'))b.player_=(0,l["default"])(c.parentNode),b.player_.tech_.on("hls-reset",b.onHlsReset_),b.player_.tech_.on("hls-segment-time-mapping",b.onHlsSegmentTimeMapping_),b.player_.audioTracks&&b.player_.audioTracks()&&(b.player_.audioTracks().on("change",b.updateActiveSourceBuffers_),
b.player_.audioTracks().on("addtrack",b.updateActiveSourceBuffers_),b.player_.audioTracks().on("removetrack",b.updateActiveSourceBuffers_)),b.player_.on("mediachange",b.onPlayerMediachange_)});this.on("sourceended",function(a){a=(0,p.durationOfVideo)(b.duration);for(var c=0;c<b.sourceBuffers.length;c++){var d=b.sourceBuffers[c];(d=d.metadataTrack_&&d.metadataTrack_.cues)&&d.length&&(d[d.length-1].endTime=a)}});this.on("sourceclose",function(a){this.sourceBuffers.forEach(function(a){a.transmuxer_&&
a.transmuxer_.terminate()});this.sourceBuffers.length=0;this.player_&&(this.player_.audioTracks&&this.player_.audioTracks()&&(this.player_.audioTracks().off("change",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("addtrack",this.updateActiveSourceBuffers_),this.player_.audioTracks().off("removetrack",this.updateActiveSourceBuffers_)),this.player_.el_&&(this.player_.off("mediachange",this.onPlayerMediachange_),this.player_.tech_.off("hls-reset",this.onHlsReset_),this.player_.tech_.off("hls-segment-time-mapping",
this.onHlsSegmentTimeMapping_)))})}q(c,b);r(c,[{key:"addSeekableRange_",value:function(a,b){var c=void 0;if(Infinity!==this.duration)throw c=Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity"),c.name="InvalidStateError",c.code=11,c;if(b>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))this.nativeMediaSource_.duration=b}},{key:"addSourceBuffer",value:function(a){var b=void 0,b=(0,t.parseContentType)(a);/^(video|audio)\/mp2t$/i.test(b.type)?
(a=[],b.parameters&&b.parameters.codecs&&(a=b.parameters.codecs.split(","),a=(0,t.translateLegacyCodecs)(a),a=a.filter(function(a){return(0,t.isAudioCodec)(a)||(0,t.isVideoCodec)(a)})),0===a.length&&(a=["avc1.4d400d","mp4a.40.2"]),b=new v["default"](this,a),0!==this.sourceBuffers.length&&(this.sourceBuffers[0].createRealSourceBuffers_(),b.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)):b=this.nativeMediaSource_.addSourceBuffer(a);this.sourceBuffers.push(b);return b}}]);return c}(l["default"].EventTarget);
g["default"]=b;k.exports=g["default"]}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./add-text-track-data":64,"./codec-utils":65,"./virtual-source-buffer":75,"global/document":31,"global/window":32}],72:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});g["default"]=function(b,d,g){var k=void 0,n=void 0;if(g&&g.cues)for(k=g.cues.length;k--;)n=g.cues[k],n.startTime<=d&&n.endTime>=b&&g.removeCue(n)};k.exports=g["default"]},
{}],73:[function(d,k,g){Object.defineProperty(g,"__esModule",{value:!0});var b=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(b,c,d){c&&a(b.prototype,c);d&&a(b,d);return b}}(),h=d("global/window"),q=h&&h.__esModule?h:{"default":h},r=(d=d("mux.js/lib/mp4"))&&d.__esModule?d:{"default":d},n=function(a){a.on("data",function(a){var b=a.initSegment;a.initSegment=
{data:b.buffer,byteOffset:b.byteOffset,byteLength:b.byteLength};b=a.data;a.data=b.buffer;q["default"].postMessage({action:"data",segment:a,byteOffset:b.byteOffset,byteLength:b.byteLength},[a.data])});if(a.captionStream)a.captionStream.on("data",function(a){q["default"].postMessage({action:"caption",data:a})});a.on("done",function(a){q["default"].postMessage({action:"done"})});a.on("gopInfo",function(a){q["default"].postMessage({action:"gopInfo",gopInfo:a})})},c=function(){function a(b){if(!(this instanceof
a))throw new TypeError("Cannot call a class as a function");this.options=b||{};this.init()}b(a,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose();this.transmuxer=new r["default"].Transmuxer(this.options);n(this.transmuxer)}},{key:"push",value:function(a){a=new Uint8Array(a.data,a.byteOffset,a.byteLength);this.transmuxer.push(a)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(a){this.transmuxer.setBaseMediaDecodeTime(Math.round(9E4*(a.timestampOffset||
0)))}},{key:"setAudioAppendStart",value:function(a){this.transmuxer.setAudioAppendStart(Math.ceil(9E4*a.appendStart))}},{key:"flush",value:function(a){this.transmuxer.flush()}},{key:"resetCaptions",value:function(){this.transmuxer.resetCaptions()}},{key:"alignGopsWith",value:function(a){this.transmuxer.alignGopsWith(a.gopsToAlignWith.slice())}}]);return a}(),f=function(a){a.onmessage=function(a){if("init"===a.data.action&&a.data.options)this.messageHandlers=new c(a.data.options);else if(this.messageHandlers||
(this.messageHandlers=new c),a.data&&a.data.action&&"init"!==a.data.action&&this.messageHandlers[a.data.action])this.messageHandlers[a.data.action](a.data)}};g["default"]=function(a){return new f(a)};k.exports=g["default"]},{"global/window":32,"mux.js/lib/mp4":55}],74:[function(d,k,g){(function(b){function h(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(g,"__esModule",{value:!0});var k=d("global/window"),r=h(k),k=d("./flash-media-source"),n=h(k),k=d("./html-media-source"),c=h(k),
f=h("undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null),a=0,l={mode:"auto"};f["default"].mediaSources={};var v=function(a,b){var c=f["default"].mediaSources[a];if(c)c.trigger({type:"sourceopen",swfId:b});else throw Error("Media Source not found (Video.js)");},p=function(){return!!r["default"].MediaSource&&!!r["default"].MediaSource.isTypeSupported&&r["default"].MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')};b=function(a){a=f["default"].mergeOptions(l,
a);this.MediaSource={open:v,supportsNativeMediaSources:p};if("html5"===a.mode||"auto"===a.mode&&p())return new c["default"];if(f["default"].getTech("Flash"))return new n["default"];throw Error("Cannot use Flash or Html5 to create a MediaSource for this video");};g.MediaSource=b;b.open=v;b.supportsNativeMediaSources=p;k={createObjectURL:function(b){var d=void 0;if(b instanceof c["default"])return d=r["default"].URL.createObjectURL(b.nativeMediaSource_),b.url_=d;if(!(b instanceof n["default"]))return d=
r["default"].URL.createObjectURL(b),b.url_=d;d="blob:vjs-media-source/"+a;a++;f["default"].mediaSources[d]=b;return d}};g.URL=k;f["default"].MediaSource=b;f["default"].URL=k}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./flash-media-source":68,"./html-media-source":71,"global/window":32}],75:[function(d,k,g){(function(b){function h(a){return a&&a.__esModule?a:{"default":a}}function k(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+
typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(g,"__esModule",{value:!0});var r=function(){function a(b,c){for(var d=0;d<c.length;d++){var e=c[d];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(b,e.key,e)}}return function(b,c,d){c&&a(b.prototype,c);d&&a(b,d);return b}}(),n=function(a,b,c){var d=
!0;for(;d;)if(null===a&&(a=Function.prototype),d=Object.getOwnPropertyDescriptor(a,b),void 0===d){a=Object.getPrototypeOf(a);if(null===a)break;d=!0}else{if("value"in d)return d.value;b=d.get;return void 0===b?void 0:b.call(c)}},c=h("undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null);b=d("./create-text-tracks-if-necessary");var f=h(b);b=d("./remove-cues-from-track");var a=h(b),l=d("./add-text-track-data");b=d("webwackify");var v=h(b);b=d("./transmuxer-worker");var p=h(b),
t=d("./codec-utils"),e=function(){var a=void 0;try{a=d.resolve("./transmuxer-worker")}catch(b){}return a},u=function(a,b){var c=a.addSourceBuffer(b),d=Object.create(null);d.updating=!1;d.realBuffer_=c;var e=function(a){"function"===typeof c[a]?d[a]=function(){return c[a].apply(c,arguments)}:"undefined"===typeof d[a]&&Object.defineProperty(d,a,{get:function(){return c[a]},set:function(b){return c[a]=b}})},f;for(f in c)e(f);return d},A=function(a,b,c){if(!b||!a.length)return[];b=Math.ceil(9E4*(b.currentTime()-
c+3));c=void 0;for(c=0;c<a.length&&!(a[c].pts>b);c++);return a.slice(c)};g.gopsSafeToAlignWith=A;var B=function(a,b,c){if(!b.length)return a;if(c)return b.slice();c=b[0].pts;var d=0;for(d;d<a.length&&!(a[d].pts>=c);d++);return a.slice(0,d).concat(b)};g.updateGopBuffer=B;var x=function(a,b,c,d){b=Math.ceil(9E4*(b-d));var e=Math.ceil(9E4*(c-d));c=a.slice();for(d=a.length;d--&&!(a[d].pts<=e););if(-1===d)return c;for(e=d+1;e--&&!(a[e].pts<=b););e=Math.max(e,0);c.splice(e,d-e+1);return c};g.removeGopBuffer=
x;b=function(b){function d(a,b){var f=this;if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");n(Object.getPrototypeOf(d.prototype),"constructor",this).call(this,c["default"].EventTarget);this.timestampOffset_=0;this.pendingBuffers_=[];this.bufferUpdating_=!1;this.mediaSource_=a;this.codecs_=b;this.videoCodec_=this.audioCodec_=null;this.audioDisabled_=!1;this.appendAudioInitSegment_=!0;this.gopBuffer_=[];this.timeMapping_=0;this.safeAppend_=11<=c["default"].browser.IE_VERSION;
var g={remux:!1,alignGopsAtEnd:this.safeAppend_};this.codecs_.forEach(function(a){(0,t.isAudioCodec)(a)?f.audioCodec_=a:(0,t.isVideoCodec)(a)&&(f.videoCodec_=a)});this.transmuxer_=(0,v["default"])(p["default"],e());this.transmuxer_.postMessage({action:"init",options:g});this.transmuxer_.onmessage=function(a){if("data"===a.data.action)return f.data_(a);if("done"===a.data.action)return f.done_(a);if("gopInfo"===a.data.action)return f.appendGopInfo_(a)};Object.defineProperty(this,"timestampOffset",{get:function(){return this.timestampOffset_},
set:function(a){"number"===typeof a&&0<=a&&(this.timestampOffset_=a,this.appendAudioInitSegment_=!0,this.timeMapping_=this.gopBuffer_.length=0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:a}))}});Object.defineProperty(this,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(a){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=a);this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=a)}});Object.defineProperty(this,
"updating",{get:function(){return!!(this.bufferUpdating_||!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.updating||this.videoBuffer_&&this.videoBuffer_.updating)}});Object.defineProperty(this,"buffered",{get:function(){var a=null,b=null,d=0,e=[],f=[];if(!this.videoBuffer_&&!this.audioBuffer_)return c["default"].createTimeRange();if(!this.videoBuffer_)return this.audioBuffer_.buffered;if(!this.audioBuffer_||this.audioDisabled_)return this.videoBuffer_.buffered;if(0===this.videoBuffer_.buffered.length&&
0===this.audioBuffer_.buffered.length)return c["default"].createTimeRange();for(var g=this.videoBuffer_.buffered,h=this.audioBuffer_.buffered,k=g.length;k--;)e.push({time:g.start(k),type:"start"}),e.push({time:g.end(k),type:"end"});for(k=h.length;k--;)e.push({time:h.start(k),type:"start"}),e.push({time:h.end(k),type:"end"});e.sort(function(a,b){return a.time-b.time});for(k=0;k<e.length;k++)"start"===e[k].type?(d++,2===d&&(a=e[k].time)):"end"===e[k].type&&(d--,1===d&&(b=e[k].time)),null!==a&&null!==
b&&(f.push([a,b]),b=a=null);return c["default"].createTimeRanges(f)}})}k(d,b);r(d,[{key:"data_",value:function(a){var b=a.data.segment;b.data=new Uint8Array(b.data,a.data.byteOffset,a.data.byteLength);b.initSegment=new Uint8Array(b.initSegment.data,b.initSegment.byteOffset,b.initSegment.byteLength);(0,f["default"])(this,this.mediaSource_,b);this.pendingBuffers_.push(b)}},{key:"done_",value:function(a){"closed"===this.mediaSource_.readyState?this.pendingBuffers_.length=0:this.processPendingSegments_()}},
{key:"createRealSourceBuffers_",value:function(){var a=this,b=["audio","video"];b.forEach(function(c){if(a[c+"Codec_"]&&!a[c+"Buffer_"]){var d=null;a.mediaSource_[c+"Buffer_"]?(d=a.mediaSource_[c+"Buffer_"],d.updating=!1):(d=u(a.mediaSource_.nativeMediaSource_,c+'/mp4;codecs="'+a[c+"Codec_"]+'"'),a.mediaSource_[c+"Buffer_"]=d);a[c+"Buffer_"]=d;["update","updatestart","updateend"].forEach(function(e){d.addEventListener(e,function(){if("audio"!==c||!a.audioDisabled_)if("updateend"===e&&(a[c+"Buffer_"].updating=
!1),b.every(function(b){return"audio"===b&&a.audioDisabled_?!0:c!==b&&a[b+"Buffer_"]&&a[b+"Buffer_"].updating?!1:!0}))return a.trigger(e)})})}})}},{key:"appendBuffer",value:function(a){this.bufferUpdating_=!0;if(this.audioBuffer_&&this.audioBuffer_.buffered.length){var b=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:b.end(b.length-1)})}this.videoBuffer_&&this.transmuxer_.postMessage({action:"alignGopsWith",gopsToAlignWith:A(this.gopBuffer_,this.mediaSource_.player_,
this.timeMapping_)});this.transmuxer_.postMessage({action:"push",data:a.buffer,byteOffset:a.byteOffset,byteLength:a.byteLength},[a.buffer]);this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(a){this.gopBuffer_=B(this.gopBuffer_,a.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(b,c){this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(b,c),this.gopBuffer_=x(this.gopBuffer_,b,c,this.timeMapping_));!this.audioDisabled_&&this.audioBuffer_&&
(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(b,c));(0,a["default"])(b,c,this.metadataTrack_);if(this.inbandTextTracks_)for(var d in this.inbandTextTracks_)(0,a["default"])(b,c,this.inbandTextTracks_[d])}},{key:"processPendingSegments_",value:function(){var a={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]},a=this.pendingBuffers_.reduce(function(a,b){var c=b.type,d=b.data,e=b.initSegment;a[c].segments.push(d);a[c].bytes+=d.byteLength;a[c].initSegment=e;b.captions&&
(a.captions=a.captions.concat(b.captions));b.info&&(a[c].info=b.info);b.metadata&&(a.metadata=a.metadata.concat(b.metadata));return a},a);this.videoBuffer_||this.audioBuffer_||(0===a.video.bytes&&(this.videoCodec_=null),0===a.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_());a.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:a.audio.info});a.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:a.video.info});this.appendAudioInitSegment_&&(!this.audioDisabled_&&
this.audioBuffer_&&(a.audio.segments.unshift(a.audio.initSegment),a.audio.bytes+=a.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var b=!1;this.videoBuffer_&&a.video.bytes?(a.video.segments.unshift(a.video.initSegment),a.video.bytes+=a.video.initSegment.byteLength,this.concatAndAppendSegments_(a.video,this.videoBuffer_),(0,l.addTextTrackData)(this,a.captions,a.metadata)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(b=!0);!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(a.audio,
this.audioBuffer_);this.pendingBuffers_.length=0;b&&this.trigger("updateend");this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(a,b){var c=0,d=void 0;if(a.bytes){d=new Uint8Array(a.bytes);a.segments.forEach(function(a){d.set(a,c);c+=a.byteLength});try{b.updating=!0,b.appendBuffer(d)}catch(e){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:e.message,originalError:e})}}}},{key:"abort",value:function(){this.videoBuffer_&&this.videoBuffer_.abort();
!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort();this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"});this.pendingBuffers_.length=0;this.bufferUpdating_=!1}}]);return d}(c["default"].EventTarget);g["default"]=b}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./add-text-track-data":64,"./codec-utils":65,"./create-text-tracks-if-necessary":66,"./remove-cues-from-track":72,"./transmuxer-worker":73,webwackify:76}],
76:[function(d,k,g,b,h,q){var r=b,n=h,c=JSON.stringify,f=!1;d=function(a){function b(d){if(c[d])return c[d].exports;var f=c[d]={i:d,l:!1,exports:{}};a[d].call(f.exports,f,f.exports,b);f.l=!0;return f.exports}var c={};b.m=a;b.c=c;b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})};b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};b.d(c,"a",c);return c};b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,
b)};b.p="";return b(b.s=entryModule)};"undefined"===typeof r&&(f=!0,r=d,n=__webpack_modules__);var a=function(a){for(var b=Object.keys(q),d,e=0;e<b.length;e++){var f=b[e],g=q[f].exports;if(g===a||g&&g["default"]===a){d=f;break}}if(!d){d=Math.floor(Math.pow(16,8)*Math.random()).toString(16);g={};for(e=0;e<b.length;e++)f=b[e],g[f]=f;n[d]=["function(require,module,exports){"+a+"(self); }",g]}a=Math.floor(Math.pow(16,8)*Math.random()).toString(16);b={};b[d]=d;n[a]=["function(require,module,exports){var f = require("+
c(d)+");(f.default ? f.default : f)(self);}",b];return"("+r+")({"+Object.keys(n).map(function(a){return c(a)+":["+n[a][0]+","+c(n[a][1])+"]"}).join(",")+"},{},["+c(a)+"])"},l=function(a,b){var d="string"===typeof b,e;e=d?{}:[];Object.keys(n).forEach(function(a){n[a]&&(e[a]=n[a].toString())});var f=__webpack_require__(b);if(!f||f!==a&&f["default"]!==a)f=e[b],e[b]=f.substring(0,f.length-1)+"\n"+a.name+"();\n}";d?(b=c(b),d="{"+Object.keys(e).map(function(a){return c(a)+":"+e[a]}).join(",")+"}"):d="["+
e.join(",")+"]";return"var fn = ("+r.toString().replace("entryModule",b)+")("+d+');\n(typeof fn === "function") && fn(self);'};k.exports=function(b,c){var d;d=f?l(b,c):a(b);d=new Blob([d],{type:"text/javascript"});d=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(d);var e=new Worker(d);e.objectURL=d;return e}},{}],77:[function(d,k,g){(function(b){function g(a){return a&&a.__esModule?a:{"default":a}}function q(a,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+
typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var r=function(){function a(b,c){for(var d=0;d<c.length;d++){var e=c[d];e.enumerable=e.enumerable||!1;e.configurable=!0;"value"in e&&(e.writable=!0);Object.defineProperty(b,e.key,e)}}return function(b,c,d){c&&a(b.prototype,c);d&&a(b,d);return b}}(),n=function(a,b,c){var d=!0;for(;d;)if(null===a&&(a=Function.prototype),
d=Object.getOwnPropertyDescriptor(a,b),void 0===d){a=Object.getPrototypeOf(a);if(null===a)break;d=!0}else{if("value"in d)return d.value;b=d.get;return void 0===b?void 0:b.call(c)}},c=d("global/document"),f=g(c),c=d("./playlist-loader"),c=g(c),a=d("./playlist"),a=g(a),l=d("./xhr"),v=g(l),p=d("aes-decrypter"),l=d("./bin-utils"),t=g(l),l=d("videojs-contrib-media-sources"),e=d("m3u8-parser"),e=g(e),u=g("undefined"!==typeof window?window.videojs:"undefined"!==typeof b?b.videojs:null),A=d("./master-playlist-controller");
b=d("./config");var B=g(b);b=d("./rendition-mixin");var x=g(b);b=d("global/window");b=g(b);var z=d("./playback-watcher"),D=g(z),z=d("./reload-source-on-error"),z=g(z),y=d("./playlist-selectors.js"),C={PlaylistLoader:c["default"],Playlist:a["default"],Decrypter:p.Decrypter,AsyncStream:p.AsyncStream,decrypt:p.decrypt,utils:t["default"],STANDARD_PLAYLIST_SELECTOR:y.lastBandwidthSelector,INITIAL_PLAYLIST_SELECTOR:y.lowestBitrateCompatibleVariantSelector,comparePlaylistBandwidth:y.comparePlaylistBandwidth,
comparePlaylistResolution:y.comparePlaylistResolution,xhr:(0,v["default"])()};"GOAL_BUFFER_LENGTH MAX_GOAL_BUFFER_LENGTH GOAL_BUFFER_LENGTH_RATE BUFFER_LOW_WATER_LINE MAX_BUFFER_LOW_WATER_LINE BUFFER_LOW_WATER_LINE_RATE BANDWIDTH_VARIANCE".split(" ").forEach(function(a){Object.defineProperty(C,a,{get:function(){u["default"].log.warn("using Hls."+a+" is UNSAFE be sure you know what you are doing");return B["default"][a]},set:function(b){u["default"].log.warn("using Hls."+a+" is UNSAFE be sure you know what you are doing");
"number"!==typeof b||0>b?u["default"].log.warn("value of Hls."+a+" must be greater than or equal to 0"):B["default"][a]=b}})});var w=function(a,b){for(var c=b.media(),d=-1,e=0;e<a.length;e++)if(a[e].id===c.uri){d=e;break}a.selectedIndex_=d;a.trigger({selectedIndex:d,type:"change"})},G=function(a,b){b.representations().forEach(function(b){a.addQualityLevel(b)});w(a,b.playlists)};C.canPlaySource=function(){return u["default"].log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};
C.supportsNativeHls=function(){var a=f["default"].createElement("video");return u["default"].getTech("Html5").isSupported()?"application/vnd.apple.mpegurl audio/mpegurl audio/x-mpegurl application/x-mpegurl video/x-mpegurl video/mpegurl application/mpegurl".split(" ").some(function(b){return/maybe|probably/i.test(a.canPlayType(b))}):!1}();C.isSupported=function(){return u["default"].log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var H=function(a){function b(a,
c,d){var e=this;if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");n(Object.getPrototypeOf(b.prototype),"constructor",this).call(this,c,d.hls);c.options_&&c.options_.playerId&&(d=(0,u["default"])(c.options_.playerId),d.hasOwnProperty("hls")||Object.defineProperty(d,"hls",{get:function(){u["default"].log.warn("player.hls is deprecated. Use player.tech_.hls instead.");c.trigger({type:"usage",name:"hls-player-access"});return e}}));this.tech_=c;this.source_=a;this.stats=
{};this.ignoreNextSeekingEvent_=!1;this.setOptions_();if(this.options_.overrideNative&&(c.featuresNativeVideoTracks||c.featuresNativeAudioTracks))throw Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");this.on(f["default"],["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(a){(a=f["default"].fullscreenElement||f["default"].webkitFullscreenElement||f["default"].mozFullScreenElement||f["default"].msFullscreenElement)&&a.contains(e.tech_.el())&&
e.masterPlaylistController_.fastQualityChange_()});this.on(this.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())});this.on(this.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()});this.on(this.tech_,"play",this.play)}q(b,a);r(b,[{key:"setOptions_",value:function(){var a=this;this.options_.withCredentials=this.options_.withCredentials||!1;"number"!==typeof this.options_.blacklistDuration&&
(this.options_.blacklistDuration=300);"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=4194304);this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&4194304===this.options_.bandwidth;["withCredentials","bandwidth"].forEach(function(b){"undefined"!==typeof a.source_[b]&&(a.options_[b]=a.source_[b])});this.bandwidth=this.options_.bandwidth}},{key:"src",value:function(a){var b=this;a&&(this.setOptions_(),this.options_.url=this.source_.src,this.options_.tech=
this.tech_,this.options_.externHls=C,this.masterPlaylistController_=new A.MasterPlaylistController(this.options_),this.playbackWatcher_=new D["default"](u["default"].mergeOptions(this.options_,{seekable:function(){return b.seekable()}})),this.masterPlaylistController_.on("error",function(){u["default"].players[b.tech_.options_.playerId].error(b.masterPlaylistController_.error)}),this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):C.STANDARD_PLAYLIST_SELECTOR.bind(this),
this.masterPlaylistController_.selectInitialPlaylist=C.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(a){this.masterPlaylistController_.selectPlaylist=a.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},
set:function(a){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=a;this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(a){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=a;this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var a=1/(this.bandwidth||1),b=void 0,b=0<this.throughput?1/this.throughput:
0;return Math.floor(1/(a+b))},set:function(){u["default"].log.error('The "systemBandwidth" property is read-only')}}}),Object.defineProperties(this.stats,{bandwidth:{get:function(){return b.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return b.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return b.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return b.masterPlaylistController_.mediaRequestsTimedout_()||
0},enumerable:!0},mediaRequestsErrored:{get:function(){return b.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return b.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return b.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return b.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0}}),this.tech_.one("canplay",
this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.masterPlaylistController_.on("selectedinitialmedia",function(){(0,x["default"])(b)}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.tech_.ready(function(){return b.setupQualityLevels_()}),this.tech_.el()&&this.tech_.src(u["default"].URL.createObjectURL(this.masterPlaylistController_.mediaSource)))}},
{key:"setupQualityLevels_",value:function(){var a=this,b=u["default"].players[this.tech_.options_.playerId];b&&b.qualityLevels&&(this.qualityLevels_=b.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){G(a.qualityLevels_,a)}),this.playlists.on("mediachange",function(){w(a.qualityLevels_,a.playlists)}))}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(a){this.masterPlaylistController_.setCurrentTime(a)}},{key:"duration",
value:function(){return this.masterPlaylistController_.duration()}},{key:"seekable",value:function(){return this.masterPlaylistController_.seekable()}},{key:"dispose",value:function(){this.playbackWatcher_&&this.playbackWatcher_.dispose();this.masterPlaylistController_&&this.masterPlaylistController_.dispose();this.qualityLevels_&&this.qualityLevels_.dispose();n(Object.getPrototypeOf(b.prototype),"dispose",this).call(this)}}]);return b}(u["default"].getComponent("Component")),c=function F(a){return{canHandleSource:function(b){var c=
u["default"].mergeOptions(u["default"].options,1>=arguments.length||void 0===arguments[1]?{}:arguments[1]);return c.hls&&c.hls.mode&&c.hls.mode!==a?!1:F.canPlayType(b.type,c)},handleSource:function(b,c){var d=u["default"].mergeOptions(u["default"].options,2>=arguments.length||void 0===arguments[2]?{}:arguments[2],{hls:{mode:a}});"flash"===a&&c.setTimeout(function(){c.trigger("loadstart")},1);c.hls=new H(b,c,d);c.hls.xhr=(0,v["default"])();c.hls.src(b.src);return c.hls},canPlayType:function(a){var b=
u["default"].mergeOptions(u["default"].options,1>=arguments.length||void 0===arguments[1]?{}:arguments[1]);return F.canPlayType(a,b)?"maybe":""}}};c.canPlayType=function(a,b){return u["default"].browser.IE_VERSION&&10>=u["default"].browser.IE_VERSION||!b.hls.overrideNative&&C.supportsNativeHls?!1:/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(a)};if("undefined"===typeof u["default"].MediaSource||"undefined"===typeof u["default"].URL)u["default"].MediaSource=l.MediaSource,u["default"].URL=
l.URL;a=u["default"].getTech("Flash");l.MediaSource.supportsNativeMediaSources()&&u["default"].getTech("Html5").registerSourceHandler(c("html5"),0);b["default"].Uint8Array&&a&&a.registerSourceHandler(c("flash"));u["default"].HlsHandler=H;u["default"].HlsSourceHandler=c;u["default"].Hls=C;u["default"].use||u["default"].registerComponent("Hls",C);u["default"].m3u8=e["default"];u["default"].options.hls=u["default"].options.hls||{};u["default"].registerPlugin?u["default"].registerPlugin("reloadSourceOnError",
z["default"]):u["default"].plugin("reloadSourceOnError",z["default"]);k.exports={Hls:C,HlsHandler:H,HlsSourceHandler:c}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"./bin-utils":2,"./config":3,"./master-playlist-controller":5,"./playback-watcher":8,"./playlist":11,"./playlist-loader":9,"./playlist-selectors.js":10,"./reload-source-on-error":13,"./rendition-mixin":14,"./xhr":21,"aes-decrypter":25,"global/document":31,"global/window":32,
"m3u8-parser":33,"videojs-contrib-media-sources":74}]},{},[77])(77)});
(function(f,g){"function"===typeof define&&define.amd?define([],g.bind(this,f,f.videojs)):"undefined"!==typeof module&&module.exports?module.exports=g(f,f.videojs):g(f,f.videojs)})(window,function(f,g){f.videojs_hotkeys={version:"0.2.14"};g.plugin("hotkeys",function(d){var b=this,e=b.el(),h=document;d=(g.mergeOptions||g.util.mergeOptions)({volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,playPauseKey:function(a){return 32===
a.which},rewindKey:function(a){return 37===a.which},forwardKey:function(a){return 39===a.which},volumeUpKey:function(a){return 38===a.which},volumeDownKey:function(a){return 40===a.which},muteKey:function(a){return 77===a.which},fullscreenKey:function(a){return 70===a.which},customKeys:{}},d||{});var k=d.volumeStep,n=d.seekStep,r=d.enableMute,t=d.enableVolumeScroll,p=d.enableFullscreen,u=d.enableNumbers,q=d.enableJogStyle,l=d.alwaysCaptureHotkeys;e.hasAttribute("tabIndex")||e.setAttribute("tabIndex",
"-1");e.style.outline="none";if(l||!b.autoplay())b.one("play",function(){e.focus()});b.on("userinactive",function(){var a=function(){clearTimeout(c)},c=setTimeout(function(){b.off("useractive",a);h.activeElement.parentElement==e.querySelector(".vjs-control-bar")&&e.focus()},10);b.one("useractive",a)});b.on("play",function(){var a=e.querySelector(".iframeblocker");a&&""===a.style.display&&(a.style.display="block",a.style.bottom="39px")});var m=function(a){if(b.controls()){var c=a.relatedTarget||a.toElement||
h.activeElement;(l||c==e||c==e.querySelector(".vjs-tech")||c==e.querySelector(".iframeblocker")||c==e.querySelector(".vjs-control-bar"))&&t&&(a=f.event||a,c=Math.max(-1,Math.min(1,a.wheelDelta||-a.detail)),a.preventDefault(),1==c?b.volume(b.volume()+k):-1==c&&b.volume(b.volume()-k))}},v=function(a,b){if(d.playPauseKey(a,b))return 1;if(d.rewindKey(a,b))return 2;if(d.forwardKey(a,b))return 3;if(d.volumeUpKey(a,b))return 4;if(d.volumeDownKey(a,b))return 5;if(d.muteKey(a,b))return 6;if(d.fullscreenKey(a,
b))return 7};b.on("keydown",function(a){var c=a.which,f=a.preventDefault;if(b.controls()){var g=h.activeElement;if(l||g==e||g==e.querySelector(".vjs-tech")||g==e.querySelector(".vjs-control-bar")||g==e.querySelector(".iframeblocker"))switch(v(a,b)){case 1:f();l&&a.stopPropagation();b.paused()?b.play():b.pause();break;case 2:f();a=b.currentTime()-n;b.currentTime()<=n&&(a=0);b.currentTime(a);break;case 3:f();b.currentTime(b.currentTime()+n);break;case 5:f();q?(a=b.currentTime()-1,1>=b.currentTime()&&
(a=0),b.currentTime(a)):b.volume(b.volume()-k);break;case 4:f();q?b.currentTime(b.currentTime()+1):b.volume(b.volume()+k);break;case 6:r&&b.muted(!b.muted());break;case 7:p&&(b.isFullscreen()?b.exitFullscreen():b.requestFullscreen());break;default:(47<c&&59>c||95<c&&106>c)&&u&&(g=48,95<c&&(g=96),c-=g,f(),b.currentTime(b.duration()*c*.1));for(var m in d.customKeys)(c=d.customKeys[m])&&c.key&&c.handler&&c.key(a)&&(f(),c.handler(b,d,a))}}});b.on("dblclick",function(a){b.controls()&&(a=a.relatedTarget||
a.toElement||h.activeElement,(a==e||a==e.querySelector(".vjs-tech")||a==e.querySelector(".iframeblocker"))&&p&&(b.isFullscreen()?b.exitFullscreen():b.requestFullscreen()))});b.on("mousewheel",m);b.on("DOMMouseScroll",m);return this})});
(function(){var k,g;k={zoom:1,rotate:0,debug:!0};g=function(){var a,d,e,c,b;a=Array.prototype.slice.call(arguments);d=a.shift()||{};for(e in a)for(b in c=a[e],c)c.hasOwnProperty(b)&&(d[b]="object"===typeof c[b]?g(d[b],c[b]):c[b]);return d};videojs.plugin("zoomrotate",function(a){var d,e,c;a=g(k,a);a.debug&&console.log("zoomrotate: Register init");d=this.el();e=this.el().getElementsByTagName("video")[0];c=this.el().getElementsByTagName("div")[1];a.debug&&console.log("zoomrotate: "+e.style);a.debug&&
console.log("zoomrotate: "+c.style);a.debug&&console.log("zoomrotate: "+a.rotate);a.debug&&console.log("zoomrotate: "+a.zoom);var b=["transform","WebkitTransform","MozTransform","msTransform","OTransform"],h=b[0],f,l;f=0;for(l=b.length;f<l;f++)if("undefined"!==typeof d.style[b[f]]){h=b[f];break}d.style.overflow="hidden";a.setVideo&&(e.style[h]="scale("+a.zoom+") rotate("+a.rotate+"deg)");a.setPoster&&(c.style[h]="scale("+a.zoom+") rotate("+a.rotate+"deg)");a.debug&&console.log("zoomrotate: Register end")})})();
var SitePlayer=function(e,t,o,n,i,l,a){var r,d=o.q;e&&(r="720"===d&&t.html5HQUrl?{type:"1"===t.MEDIA_TYPE?"audio/mp3":"video/mp4",src:t.html5HQUrl}:"1080"===d&&t.html5HQUrl2?{type:"1"===t.MEDIA_TYPE?"audio/mp3":"video/mp4",src:t.html5HQUrl2}:"360"===d?{type:"1"===t.MEDIA_TYPE?"audio/mp3":"video/mp4",src:t.html5Url}:{type:"1"===t.MEDIA_TYPE?"audio/mp3":"video/mp4",src:t.HD?t.html5HQUrl:t.html5Url});var s=o.playerVolume/100;null===J("volume")&&null===J("vol")&&null!==G("xuitePlayerVolume")&&(s=G("xuitePlayerVolume"));var c=o.playerTime,u=t.MEDIA_DURATION/1e6,m=e?"":t.passwdHint,p=t.OTHERS?JSON.parse(t.OTHERS).rotate:void 0,v=o.loadAd,h=o.loop,g=!1,f=5,y=.1,E=!!(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i)),T=(Date.now(),window.location.href),C="https://googleads.g.doubleclick.net/pagead/ads?ad_type=video&client=ca-video-pub-2977875281338330&slotname=7527895186&description_url="+T+"&max_ad_duration=31000&videoad_start_delay=0&overlay=0",w="https://googleads.g.doubleclick.net/pagead/ads?ad_type=image&client=ca-video-pub-2977875281338330&slotname=7527895186&description_url="+T+"&max_ad_duration=31000&videoad_start_delay=0&overlay=0",A=X(a,"https"),b=w,_=!1,D={type:"application/x-mpegURL",src:"//6.mms.vlog.xuite.net/hls/ftvtv/index.m3u8?k=0ff6412ccb9834e435fc60c055c7c719"},B=new Date(G("lastAdDate")),H=new Date,x=!!(v&&u>=0&&(H-B)/1e3>=0),U=u>=60,I=U?A:b,S=!!(window.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./));S=!1;var j,M=!!(x&&U&&S),P=!(!x||U&&S),L=document.getElementById("mainContainer");var k=videojs.dom||videojs;function Q(){(j=videojs("content_video",{debug:!1,muted:0===s,autoplay:!0,width:document.getElementById("single-video").offsetWidth,height:document.getElementById("single-video").offsetHeight,controlBar:{children:{}}})).ready(function(){j.volume(s),this.on("ended",function(){1==j.options_.loop?z(null,!1):!0===l&&window.playListCtrl.fnextMid()&&window.playListCtrl.fnextPage(window.playListCtrl.fnextMid())}),this.on("volumechange",function(){this.muted()?q("xuitePlayerVolume",0,30):q("xuitePlayerVolume",j.volume(),30)}),void 0!==p&&this.zoomrotate({rotate:p||0,zoom:1,setVideo:!0,setPoster:!1,debug:!1}),this.hotkeys({enableVolumeScroll:!1,seekStep:f,volumeStep:y,alwaysCaptureHotkeys:!0,playPauseKey:function(e,t){return!1},rewindKey:function(e,t){return 37===e.which||65===e.which},forwardKey:function(e,t){return 39===e.which||68===e.which},volumeUpKey:function(e,t){return 38===e.which||87===e.which},volumeDownKey:function(e,t){return 40===e.which||88===e.which},customKeys:{playPauseKeyWithAd:{key:function(e){return 32===e.which||83===e.which},handler:function(e,t,o){e.paused()?z(o,!1):(o.stopPropagation(),e.pause())}}}})}),function(){var e=j.controlBar.addChild("playToggle",{}),t=j.controlBar.addChild("volumePanel",{}),o=j.controlBar.addChild("currentTimeDisplay",{}),n=j.controlBar.addChild("timeDivider",{}),i=j.controlBar.addChild("durationDisplay",{}),l=j.controlBar.addChild("progressControl",{}),a=j.controlBar.addChild("liveDisplay",{}),r=j.controlBar.addChild("remainingTimeDisplay",{}),d=j.controlBar.addChild("customControlSpacer",{}),s=j.controlBar.addChild("chaptersButton",{}),c=j.controlBar.addChild("subtitlesButton",{}),u=j.controlBar.addChild("captionsButton",{});!function(){var e=videojs.getComponent("Button"),t=videojs.extend(e,{handleClick:function(){1==j.options_.loop?(j.options_.loop=!1,this.el_.innerHTML='<i class="material-icons md-control-icon" style="color:#FFFFFF;">repeat</i>'):(j.options_.loop=!0,this.el_.innerHTML='<i class="material-icons md-control-icon" style="color:#FFBD0A;">repeat</i>')}});videojs.registerComponent("LoopBtn",t);var o=j.controlBar.addChild("LoopBtn",{});o.addClass("pointer"),o.el_.innerHTML='<i class="material-icons md-control-icon" style="color:#FFFFFF;">repeat</i>',"1"===h&&(j.options_.loop=!0,o.el_.innerHTML='<i class="material-icons md-control-icon" style="color:#FFBD0A;">repeat</i>')}();var m=j.controlBar.addChild("fullscreenToggle",{});j.controlBar.playToggle=e,j.controlBar.volumePanel=t,j.controlBar.currentTimeDisplay=o,j.controlBar.timeDivider=n,j.controlBar.durationDisplay=i,j.controlBar.progressControl=l,j.controlBar.liveDisplay=a,j.controlBar.remainingTimeDisplay=r,j.controlBar.customControlSpacer=d,j.controlBar.chaptersButton=s,j.controlBar.subtitlesButton=c,j.controlBar.captionsButton=u,j.controlBar.fullscreenToggle=m}(),e&&(F(),O())}function O(){if(P){var o={id:"content_video",adsManagerLoadedCallback:function(){j.ima.addEventListener(google.ima.AdEvent.Type.STARTED,function(){}),j.ima.addEventListener(google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(){0!==j.volume()?j.volume(1*j.volume()+1e-4):(j.volume(1*j.volume()+1e-4),j.volume(0)),setTimeout(function(){j.removeClass("vjs-vast-load"),j.removeClass("vjs-seeking"),j.removeClass("vjs-waiting"),console.log("remove loading icon when ALL_ADS_COMPLETED"),j.play()},60);var e=new Date;q("lastAdDate",e,1)}),j.ima.addEventListener(google.ima.AdEvent.Type.USER_CLOSE,function(){var e=document.getElementById("content_video_ima-ad-container");e.parentNode.removeChild(e)})},adsRenderingSettings:{useStyledNonLinearAds:!0,useShareButton:!0},contribAdsSettings:{timeout:1e3},debug:g,locale:"zh-tw",vpaidMode:"INSECURE",showCountdown:!0,nativeControlsForTouch:!1};j.ima(o);var n,i=1;j.on("adserror",function(e){Y&&(j.addClass("vjs-vast-load"),(i>8||-1!==e.data.AdError.toString().indexOf("1010")||-1!==e.data.AdError.toString().indexOf("1005")||-1!==e.data.AdError.toString().indexOf("1012")||-1!==e.data.AdError.toString().indexOf("1009")&&!U)&&(j.play(),setTimeout(function(){j.removeClass("vjs-vast-load"),j.removeClass("vjs-seeking"),j.removeClass("vjs-waiting"),console.log("remove loading icon when no_more_vast")},60)),i<=8&&U&&(-1!==e.data.AdError.toString().indexOf("1009")||-1!==e.data.AdError.toString().indexOf("301")||-1!==e.data.AdError.toString().indexOf("303")||-1!==e.data.AdError.toString().indexOf("402")||-1!==e.data.AdError.toString().indexOf("501"))?(i++,n=X(a,"https")||X(a,"https")||X(a,"https")||"http://",console.log("%cRETRY TAG: "+n,"color: blue"),j.ima.setContentWithAdTag(null,n,!1),j.ima.requestAds()):(j.play(),setTimeout(function(){j.removeClass("vjs-vast-load"),j.removeClass("vjs-seeking"),j.removeClass("vjs-waiting"),console.log("remove loading icon when banner_ad")},60)))}),e&&setTimeout(function(){j.poster(t.ogImageUrl.split(":")[1])},1e3)}else if(M){o={sdkurl:"//imasdk.googleapis.com/js/sdkloader/ima3.js",adSwf:"/_hvp2",adTechOrder:["flash"],serverUrl:I,debug:g,vpaidMode:"INSECURE"};j.ima3(o),j.on("ads-pod-started",function(e){j.ima3.adPlayer.volume(s)}),j.on("ads-allpods-completed",function(e){q("lastAdDate",new Date,1)}),j.one("adserror",function(e){j.one("play",function(e){U&&j.ima3.adrequest(C)})}),e&&setTimeout(function(){j.poster(t.ogImageUrl.split(":")[1])},2500)}}function F(){if("1"!==t.MEDIA_TYPE&&!j.controlBar.getChild("MenuButton")){var e=j.controlBar.addChild("MenuButton",{},13);e.addClass("vjs-playback-rate"),e.addClass("vjs-icon-hd"),"720"===d&&t.html5HQUrl?e.addClass("vjs-icon-hd-active"):"1080"===d&&t.html5HQUrl2?e.addClass("vjs-icon-hd-active"):"360"===d||t.HD&&e.addClass("vjs-icon-hd-active"),e.el().onmouseover=function(){var e=document.getElementById("content_video_ima-ad-container");e&&(e.style.visibility="hidden")},e.el().onmouseout=function(){var e=document.getElementById("content_video_ima-ad-container");e&&(e.style.visibility="visible")};var o=videojs.getComponent("MenuItem"),n=videojs.extend(o,{constructor:function(n,i){o.call(this,n,i),this.on(e,"clean-hightlight",this.cleanHightlight),"720"===d&&t.html5HQUrl&&"720p"===this.options_.label?this.selected(!0):"1080"===d&&t.html5HQUrl2&&"1080p"===this.options_.label?this.selected(!0):"360"===d&&"360p"===this.options_.label?this.selected(!0):"1080"!==d&&"720"!==d&&"360"!==d&&(t.HD&&"720p"===this.options_.label?this.selected(!0):t.HD||"360p"!==this.options_.label||this.selected(!0))},handleClick:function(){var o;this.selected(!0),e.trigger("clean-hightlight",{label:this.options_.label}),j.currentSrc()&&(j.poster(""),j.pause(),o=j.currentTime());var n={type:"1"===t.MEDIA_TYPE?"audio/mp3":"video/mp4",src:this.options_.seleSrc};j.src([n]),z(null,!1,o),j.currentSrc()===t.html5HQUrl||j.currentSrc()===t.html5HQUrl2?e.addClass("vjs-icon-hd-active"):e.removeClass("vjs-icon-hd-active")},cleanHightlight:function(e,t){t.label!==this.options_.label&&this.selected(!1)}});if(videojs.registerComponent("MyMenuItem",n),t.html5HQUrl2)e.menu.addChild("MyMenuItem",{label:"1080p",seleSrc:t.html5HQUrl2,selectable:!0});if(t.html5HQUrl)e.menu.addChild("MyMenuItem",{label:"720p",seleSrc:t.html5HQUrl,selectable:!0});if(t.html5Url)e.menu.addChild("MyMenuItem",{label:"360p",seleSrc:t.html5Url,selectable:!0})}}var R,Y=!1;function N(e){var t=document.getElementById("content_video_html5_api");(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&t.hasAttribute("controls")&&t.removeAttribute("controls");var o="click";(E||navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(o="touchend"),j.one("play",function(){Y||(Y=!0)});var n=function(){if(!Y&&!R||e){if(P)console.log("%cTRY TAG ON CLICK: "+I,"color: blue"),j.ima.initializeAdDisplayContainer(),j.ima.setContentWithAdTag(null,I,!1),j.ima.requestAds(),document.getElementById("content_video_ima-ad-container").ontouchend=function(){setTimeout(function(){j.play()},100)};z(null,!0)}i.removeEventListener(o,n)},i=document.getElementById("content_video");i.addEventListener(o,n)}function z(e,t,o){e&&e.stopPropagation(),S&&t?setTimeout(function(){j.play()},700):j.play(),o&&j.one("loadedmetadata",function(){j.currentTime(o)}),setTimeout(function(){j.removeClass("vjs-vast-load"),j.removeClass("vjs-seeking"),j.removeClass("vjs-waiting"),console.log("remove loading icon after playing 9s"),j.play()},9e3)}function V(){e?(_?j.src([D]):j.src([r]),j.one("loadedmetadata",function(){0!==j.volume()?j.volume(1*j.volume()+1e-4):(j.volume(1*j.volume()+1e-4),j.volume(0)),j.currentTime(c)}),function(){"visible"===document.visibilityState&&(P&&(console.log("%cTRY TAG WHEN VISIBLE: "+I,"color: blue"),j.ima.initializeAdDisplayContainer(),j.ima.setContentWithAdTag(null,I,!1),j.ima.requestAds()),z(null,!0));var e,t;void 0!==document.hidden?(e="hidden",t="visibilitychange"):void 0!==document.mozHidden?(e="mozHidden",t="mozvisibilitychange"):void 0!==document.msHidden?(e="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden&&(e="webkitHidden",t="webkitvisibilitychange");void 0===document.addEventListener||void 0===document[e]?console.log("This browser do not supports Page Visibility API"):document.addEventListener(t,function(){document[e]||Y||(P&&(console.log("%cTRY TAG WHEN CHANGE: "+I,"color: blue"),j.ima.initializeAdDisplayContainer(),j.ima.setContentWithAdTag(null,I,!1),j.ima.requestAds()),z(null,!0))},!1)}()):function(){var e=k.createEl("div",{},{id:"single-panel-password",class:"single-panel-max",style:"padding: 20% 0%;text-align:center;"}),o=k.createEl("div",{},{id:"single-panel-password-tips",style:"font-size: 15px;margin-bottom: 5px;"});o.innerHTML='<span id="single-panel-password-tips-label">密碼提示：</span>'+m+"</div>";var n=k.createEl("div",{},{id:"single-panel-password-form"});n.innerHTML='<span id="single-panel-password-label"><input style="display:none" type="text" name="fakeusernameremembered"/><input style="display:none" type="password" name="fakepasswordremembered"/><input type="password" name="password" placeholder="輸入密碼" id="single-panel-password-text" style="width: 130px;height: 36px;font-size: 17px;"></span><input class="single-panel-password-submit" type="button" value="確定" style="padding:6px 9px;font-size:17px;"><div id="single-panel-password-message" style="color:red;width:100%;margin-left:0px;font-size: 15px;margin-top: 5px;"></div>',n.childNodes[1].onclick=function(){document.getElementById("single-panel-password-text").focus(),$.ajax({url:"/_ajax/default/media/ajax",type:"post",dataType:"json",data:{act:"checkPasswd",mediumId:$("#play-hiddendata").data("mediaid"),passwd:document.getElementById("single-panel-password-text").value},error:function(e){},success:function(e){if(e.success){n.childNodes[1].disabled=!0,n.childNodes[1].value="載入中";var o,i=e.media;t.MEDIA_TYPE=i.MEDIA_TYPE,t.HD=i.HD,t.html5Url=i.html5Url?""+i.html5Url:i.html5Url,t.html5HQUrl=i.html5HQUrl?""+i.html5HQUrl:i.html5HQUrl,t.html5HQUrl2=i.html5HQUrl2?""+i.html5HQUrl2:i.html5HQUrl2,t.thumbnailUrl=i.thumbnailUrl,o="720"===d&&t.html5HQUrl?{type:"1"===t.MEDIA_TYPE?"audio/mp3":"video/mp4",src:t.html5HQUrl}:"1080"===d&&t.html5HQUrl2?{type:"1"===t.MEDIA_TYPE?"audio/mp3":"video/mp4",src:t.html5HQUrl2}:"360"===d?{type:"1"===t.MEDIA_TYPE?"audio/mp3":"video/mp4",src:t.html5Url}:{type:"1"===t.MEDIA_TYPE?"audio/mp3":"video/mp4",src:t.HD?t.html5HQUrl:t.html5Url},j.src([o]),j.one("loadedmetadata",function(){0!==j.volume()?j.volume(1*j.volume()+1e-4):(j.volume(1*j.volume()+1e-4),j.volume(0)),j.currentTime(c),j.poster(t.thumbnailUrl)}),F(),O(),E?N(!0):(P&&(console.log("%cTRY TAG: "+I,"color: blue"),j.ima.initializeAdDisplayContainer(),j.ima.setContentWithAdTag(null,I,!1),j.ima.requestAds()),z(null,!0)),setTimeout(function(){R.close()},80)}else document.getElementById("single-panel-password-message").innerText="密碼錯誤"}})},n.childNodes[0].childNodes[2].addEventListener("keypress",function(e){document.getElementById("single-panel-password-message").innerText="",13===e.which&&$(".single-panel-password-submit").click()}),e.appendChild(o),e.appendChild(n),R=j.addChild("modalDialog",{uncloseable:!0,fillAlways:!1,content:e}),j.modalDialog=R,R.open()}(),setTimeout(function(){L.style.visibility="inherit"},5)}function W(){var e;L.addEventListener?L.addEventListener("contextmenu",function(e){e.preventDefault()},!1):L.attachEvent("oncontextmenu",function(){window.event.returnValue=!1}),Q(),N(),V(),(e=document.getElementById("body-single")).addEventListener("keypress",function(t){Y&&e&&e===document.activeElement&&(115===t.which?(t.preventDefault(),j.paused()?z(t,!1):(t.stopPropagation(),j.pause())):97===t.which?(t.preventDefault(),curTime=j.currentTime()-f,j.currentTime()<=f&&(curTime=0),j.currentTime(curTime)):100===t.which?(t.preventDefault(),j.currentTime(j.currentTime()+f)):119===t.which?(t.preventDefault(),j.volume(j.volume()+y)):120===t.which&&(t.preventDefault(),j.volume(j.volume()-y)))})}function K(e){var t=document.createElement("script");t.src=e,t.onload=function(){W()},document.body.appendChild(t)}function q(e,t,o,n){if(o){var i=new Date;i.setTime(i.getTime()+24*o*60*60*1e3);var l="; expires="+i.toGMTString()}else l="";document.cookie=e+"="+t+l+"; path=/"}function G(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var i=o[n];" "==i.charAt(0);)i=i.substring(1,i.length);if(0==i.indexOf(t))return i.substring(t.length,i.length)}return null}function J(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var o=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return o?o[2]?decodeURIComponent(o[2].replace(/\+/g," ")):"":null}function X(e,t){for(var o,n=0;n<e.length;n++)if(-1!==e[n].indexOf(t)){o=e[n],e.splice(n,1);break}return o||null}P?K("/_api/combo/js/v/"+n+"/dh/videojs.ima"+i):M?K("/_api/combo/js/v/"+n+"/dh/videojs.ima3"+i):x||W()};