!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this;t.videojs=n()}}(function(){var n;return function t(n,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!n[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};n[f][0].call(s.exports,function(t){var i=n[f][1][t];return u(i?i:t)},s,s.exports,t,n,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}({1:[function(n,t){(function(i){var u="undefined"!=typeof i?i:"undefined"!=typeof window?window:{},f=n("min-document"),r;"undefined"!=typeof document?t.exports=document:(r=u["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=u["__GLOBAL_DOCUMENT_CACHE@4"]=f),t.exports=r)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"min-document":3}],2:[function(n,t){(function(n){t.exports="undefined"!=typeof window?window:"undefined"!=typeof n?n:"undefined"!=typeof self?self:{}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(){},{}],4:[function(n,t){var i=n("../internal/getNative"),r=i(Date,"now"),u=r||function(){return(new Date).getTime()};t.exports=u},{"../internal/getNative":20}],5:[function(n,t){function r(n,t,r){function nt(){o&&clearTimeout(o);s&&clearTimeout(s);a=0;s=o=b=void 0}function k(t,r){r&&clearTimeout(r);s=o=b=void 0;t&&(a=i(),w=n.apply(c,h),o||s||(h=c=void 0))}function d(){var n=t-(i()-l);0>=n||n>t?k(b,s):o=setTimeout(d,n)}function tt(){k(y,o)}function g(){var f,u,r;return(h=arguments,l=i(),c=this,b=y&&(o||!p),v===!1)?f=p&&!o:(s||p||(a=l),u=v-(l-a),r=0>=u||u>v,r?(s&&(s=clearTimeout(s)),a=l,w=n.apply(c,h)):s||(s=setTimeout(tt,u))),r&&o?o=clearTimeout(o):o||t===v||(o=setTimeout(d,t)),f&&(r=!0,w=n.apply(c,h)),!r||o||s||(h=c=void 0),w}var h,s,w,l,c,o,b,a=0,v=!1,y=!0,p;if("function"!=typeof n)throw new TypeError(f);return(t=0>t?0:+t||0,r===!0)?(p=!0,y=!1):u(r)&&(p=!!r.leading,v="maxWait"in r&&e(+r.maxWait||0,t),y="trailing"in r?!!r.trailing:y),g.cancel=nt,g}var u=n("../lang/isObject"),i=n("../date/now"),f="Expected a function",e=Math.max;t.exports=r},{"../date/now":4,"../lang/isObject":33}],6:[function(n,t){function r(n,t){if("function"!=typeof n)throw new TypeError(u);return t=i(void 0===t?n.length-1:+t||0,0),function(){for(var e,u=arguments,r=-1,o=i(u.length-t,0),f=Array(o);++r<o;)f[r]=u[t+r];switch(t){case 0:return n.call(this,f);case 1:return n.call(this,u[0],f);case 2:return n.call(this,u[0],u[1],f)}for(e=Array(t+1),r=-1;++r<t;)e[r]=u[r];return e[t]=f,n.apply(this,e)}}var u="Expected a function",i=Math.max;t.exports=r},{}],7:[function(n,t){function i(n,t,i){var e=!0,o=!0;if("function"!=typeof n)throw new TypeError(f);return i===!1?e=!1:u(i)&&(e="leading"in i?!!i.leading:e,o="trailing"in i?!!i.trailing:o),r(n,t,{leading:e,maxWait:+t,trailing:o})}var r=n("./debounce"),u=n("../lang/isObject"),f="Expected a function";t.exports=i},{"../lang/isObject":33,"./debounce":5}],8:[function(n,t){function i(n,t){var i=-1,r=n.length;for(t||(t=Array(r));++i<r;)t[i]=n[i];return t}t.exports=i},{}],9:[function(n,t){function i(n,t){for(var i=-1,r=n.length;++i<r&&t(n[i],i,n)!==!1;);return n}t.exports=i},{}],10:[function(n,t){function i(n,t,i){var r,f,u;for(i||(i={}),r=-1,f=t.length;++r<f;)u=t[r],i[u]=n[u];return i}t.exports=i},{}],11:[function(n,t){var i=n("./createBaseFor"),r=i();t.exports=r},{"./createBaseFor":18}],12:[function(n,t){function i(n,t){return r(n,t,u)}var r=n("./baseFor"),u=n("../object/keysIn");t.exports=i},{"../object/keysIn":39,"./baseFor":11}],13:[function(n,t){function i(n,t,l,a,v){if(!o(n))return n;var y=e(t)&&(f(t)||h(t)),p=y?void 0:c(t);return r(p||t,function(r,f){if(p&&(f=r,r=t[f]),s(r))a||(a=[]),v||(v=[]),u(n,t,f,i,l,a,v);else{var o=n[f],e=l?l(o,r,f,n,t):void 0,h=void 0===e;h&&(e=r);void 0===e&&(!y||f in n)||!h&&(e===e?e===o:o!==o)||(n[f]=e)}}),n}var r=n("./arrayEach"),u=n("./baseMergeDeep"),f=n("../lang/isArray"),e=n("./isArrayLike"),o=n("../lang/isObject"),s=n("./isObjectLike"),h=n("../lang/isTypedArray"),c=n("../object/keys");t.exports=i},{"../lang/isArray":30,"../lang/isObject":33,"../lang/isTypedArray":36,"../object/keys":38,"./arrayEach":9,"./baseMergeDeep":14,"./isArrayLike":21,"./isObjectLike":26}],14:[function(n,t){function e(n,t,e,c,l,a,v){for(var b=a.length,p=t[e];b--;)if(a[b]==p)return void(n[e]=v[b]);var y=n[e],w=l?l(y,p,e,n,t):void 0,k=void 0===w;k&&(w=p,u(p)&&(r(p)||s(p))?w=r(y)?y:u(y)?o(y):[]:f(p)||i(p)?w=i(y)?h(y):f(y)?y:{}:k=!1);a.push(p);v.push(w);k?n[e]=c(w,p,l,a,v):(w===w?w!==y:y===y)&&(n[e]=w)}var o=n("./arrayCopy"),i=n("../lang/isArguments"),r=n("../lang/isArray"),u=n("./isArrayLike"),f=n("../lang/isPlainObject"),s=n("../lang/isTypedArray"),h=n("../lang/toPlainObject");t.exports=e},{"../lang/isArguments":29,"../lang/isArray":30,"../lang/isPlainObject":34,"../lang/isTypedArray":36,"../lang/toPlainObject":37,"./arrayCopy":8,"./isArrayLike":21}],15:[function(n,t){function i(n){return function(t){if(null!=t)return r(t)[n]}}var r=n("./toObject");t.exports=i},{"./toObject":28}],16:[function(n,t){function i(n,t,i){if("function"!=typeof n)return r;if(void 0===t)return n;switch(i){case 1:return function(i){return n.call(t,i)};case 3:return function(i,r,u){return n.call(t,i,r,u)};case 4:return function(i,r,u,f){return n.call(t,i,r,u,f)};case 5:return function(i,r,u,f,e){return n.call(t,i,r,u,f,e)}}return function(){return n.apply(t,arguments)}}var r=n("../utility/identity");t.exports=i},{"../utility/identity":42}],17:[function(n,t){function i(n){return f(function(t,i){var h=-1,f=null==t?0:i.length,e=f>2?i[f-2]:void 0,c=f>2?i[2]:void 0,o=f>1?i[f-1]:void 0,s;for("function"==typeof e?(e=r(e,o,5),f-=2):(e="function"==typeof o?o:void 0,f-=e?1:0),c&&u(i[0],i[1],c)&&(e=3>f?void 0:e,f=1);++h<f;)s=i[h],s&&n(t,s,e);return t})}var r=n("./bindCallback"),u=n("./isIterateeCall"),f=n("../function/restParam");t.exports=i},{"../function/restParam":6,"./bindCallback":16,"./isIterateeCall":24}],18:[function(n,t){function i(n){return function(t,i,u){for(var e,o=r(t),s=u(t),h=s.length,f=n?h:-1;n?f--:++f<h;)if(e=s[f],i(o[e],e,o)===!1)break;return t}}var r=n("./toObject");t.exports=i},{"./toObject":28}],19:[function(n,t){var i=n("./baseProperty"),r=i("length");t.exports=r},{"./baseProperty":15}],20:[function(n,t){function i(n,t){var i=null==n?void 0:n[t];if(r(i))return i}var r=n("../lang/isNative");t.exports=i},{"../lang/isNative":32}],21:[function(n,t){function i(n){return null!=n&&u(r(n))}var r=n("./getLength"),u=n("./isLength");t.exports=i},{"./getLength":19,"./isLength":25}],22:[function(n,t){var i=function(){try{Object({toString:0}+"")}catch(n){return function(){return!1}}return function(n){return"function"!=typeof n.toString&&"string"==typeof(n+"")}}();t.exports=i},{}],23:[function(n,t){function i(n,t){return n="number"==typeof n||r.test(n)?+n:-1,t=null==t?u:t,n>-1&&n%1==0&&t>n}var r=/^\d+$/,u=9007199254740991;t.exports=i},{}],24:[function(n,t){function i(n,t,i){var o,e;return f(i)?(o=typeof t,"number"==o?r(i)&&u(t,i.length):"string"==o&&t in i)?(e=i[t],n===n?n===e:e!==e):!1:!1}var r=n("./isArrayLike"),u=n("./isIndex"),f=n("../lang/isObject");t.exports=i},{"../lang/isObject":33,"./isArrayLike":21,"./isIndex":23}],25:[function(n,t){function i(n){return"number"==typeof n&&n>-1&&n%1==0&&r>=n}var r=9007199254740991;t.exports=i},{}],26:[function(n,t){function i(n){return!!n&&"object"==typeof n}t.exports=i},{}],27:[function(n,t){function i(n){for(var t,h=s(n),l=h.length,i=l&&n.length,y=!!i&&e(i)&&(u(n)||r(n)||o(n)),a=-1,v=[];++a<l;)t=h[a],(y&&f(t,i)||c.call(n,t))&&v.push(t);return v}var r=n("../lang/isArguments"),u=n("../lang/isArray"),f=n("./isIndex"),e=n("./isLength"),o=n("../lang/isString"),s=n("../object/keysIn"),h=Object.prototype,c=h.hasOwnProperty;t.exports=i},{"../lang/isArguments":29,"../lang/isArray":30,"../lang/isString":35,"../object/keysIn":39,"./isIndex":23,"./isLength":25}],28:[function(n,t){function i(n){if(f.unindexedChars&&u(n)){for(var t=-1,e=n.length,i=Object(n);++t<e;)i[t]=n.charAt(t);return i}return r(n)?n:Object(n)}var r=n("../lang/isObject"),u=n("../lang/isString"),f=n("../support");t.exports=i},{"../lang/isObject":33,"../lang/isString":35,"../support":41}],29:[function(n,t){function r(n){return f(n)&&u(n)&&e.call(n,"callee")&&!o.call(n,"callee")}var u=n("../internal/isArrayLike"),f=n("../internal/isObjectLike"),i=Object.prototype,e=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=r},{"../internal/isArrayLike":21,"../internal/isObjectLike":26}],30:[function(n,t){var i=n("../internal/getNative"),r=n("../internal/isLength"),u=n("../internal/isObjectLike"),f="[object Array]",e=Object.prototype,o=e.toString,s=i(Array,"isArray"),h=s||function(n){return u(n)&&r(n.length)&&o.call(n)==f};t.exports=h},{"../internal/getNative":20,"../internal/isLength":25,"../internal/isObjectLike":26}],31:[function(n,t){function i(n){return r(n)&&e.call(n)==u}var r=n("./isObject"),u="[object Function]",f=Object.prototype,e=f.toString;t.exports=i},{"./isObject":33}],32:[function(n,t){function u(n){return null==n?!1:f(n)?r.test(i.call(n)):o(n)&&(e(n)?r:s).test(n)}var f=n("./isFunction"),e=n("../internal/isHostObject"),o=n("../internal/isObjectLike"),s=/^\[object .+?Constructor\]$/,h=Object.prototype,i=Function.prototype.toString,c=h.hasOwnProperty,r=RegExp("^"+i.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=u},{"../internal/isHostObject":22,"../internal/isObjectLike":26,"./isFunction":31}],33:[function(n,t){function i(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}t.exports=i},{}],34:[function(n,t){function f(n){var u,t;return!s(n)||l.call(n)!=c||o(n)||e(n)||!i.call(n,"constructor")&&(u=n.constructor,"function"==typeof u&&!(u instanceof u))?!1:h.ownLast?(r(n,function(n,r,u){return t=i.call(u,r),!1}),t!==!1):(r(n,function(n,i){t=i}),void 0===t||i.call(n,t))}var r=n("../internal/baseForIn"),e=n("./isArguments"),o=n("../internal/isHostObject"),s=n("../internal/isObjectLike"),h=n("../support"),c="[object Object]",u=Object.prototype,i=u.hasOwnProperty,l=u.toString;t.exports=f},{"../internal/baseForIn":12,"../internal/isHostObject":22,"../internal/isObjectLike":26,"../support":41,"./isArguments":29}],35:[function(n,t){function i(n){return"string"==typeof n||r(n)&&e.call(n)==u}var r=n("../internal/isObjectLike"),u="[object String]",f=Object.prototype,e=f.toString;t.exports=i},{"../internal/isObjectLike":26}],36:[function(n,t){function f(n){return o(n)&&e(n.length)&&!!i[u.call(n)]}var e=n("../internal/isLength"),o=n("../internal/isObjectLike"),i={},r,u;i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0;i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1;r=Object.prototype;u=r.toString;t.exports=f},{"../internal/isLength":25,"../internal/isObjectLike":26}],37:[function(n,t){function i(n){return r(n,u(n))}var r=n("../internal/baseCopy"),u=n("../object/keysIn");t.exports=i},{"../internal/baseCopy":10,"../object/keysIn":39}],38:[function(n,t){var u=n("../internal/getNative"),f=n("../internal/isArrayLike"),e=n("../lang/isObject"),i=n("../internal/shimKeys"),o=n("../support"),r=u(Object,"keys"),s=r?function(n){var t=null==n?void 0:n.constructor;return"function"==typeof t&&t.prototype===n||("function"==typeof n?o.enumPrototypes:f(n))?i(n):e(n)?r(n):[]}:i;t.exports=s},{"../internal/getNative":20,"../internal/isArrayLike":21,"../internal/shimKeys":27,"../lang/isObject":33,"../support":41}],39:[function(n,t){function a(n){var a,t,rt,ot,ut;if(null==n)return[];k(n)||(n=Object(n));a=n.length;a=a&&b(a)&&(p(n)||y(n)||d(n))&&a||0;for(var ft=n.constructor,tt=-1,it=s(ft)&&ft.prototype||r,et=it===n,v=Array(a),st=a>0,ht=f.enumErrorProps&&(n===l||n instanceof Error),ct=f.enumPrototypes&&s(n);++tt<a;)v[tt]=tt+"";for(t in n)ct&&"prototype"==t||ht&&("message"==t||"name"==t)||st&&w(t,a)||"constructor"==t&&(et||!u.call(n,t))||v.push(t);if(f.nonEnumShadows&&n!==r)for(rt=n===g?c:n===l?h:nt.call(n),ot=i[rt]||i[e],rt==e&&(it=r),a=o.length;a--;)t=o[a],ut=ot[t],et&&ut||(ut?!u.call(n,t):n[t]===it[t])||v.push(t);return v}var v=n("../internal/arrayEach"),y=n("../lang/isArguments"),p=n("../lang/isArray"),s=n("../lang/isFunction"),w=n("../internal/isIndex"),b=n("../internal/isLength"),k=n("../lang/isObject"),d=n("../lang/isString"),f=n("../support"),h="[object Error]",e="[object Object]",c="[object String]",o=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],l=Error.prototype,r=Object.prototype,g=String.prototype,u=r.hasOwnProperty,nt=r.toString,i={};i["[object Array]"]=i["[object Date]"]=i["[object Number]"]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0};i["[object Boolean]"]=i[c]={constructor:!0,toString:!0,valueOf:!0};i[h]=i["[object Function]"]=i["[object RegExp]"]={constructor:!0,toString:!0};i[e]={constructor:!0};v(o,function(n){var t,r;for(t in i)u.call(i,t)&&(r=i[t],r[n]=u.call(r,n))});t.exports=a},{"../internal/arrayEach":9,"../internal/isIndex":23,"../internal/isLength":25,"../lang/isArguments":29,"../lang/isArray":30,"../lang/isFunction":31,"../lang/isObject":33,"../lang/isString":35,"../support":41}],40:[function(n,t){var i=n("../internal/baseMerge"),r=n("../internal/createAssigner"),u=r(i);t.exports=u},{"../internal/baseMerge":13,"../internal/createAssigner":17}],41:[function(n,t){var f=Array.prototype,u=Error.prototype,e=Object.prototype,r=e.propertyIsEnumerable,o=f.splice,i={};!function(n){var t=function(){this.x=n},e={0:n,length:n},f=[],s;t.prototype={valueOf:n,y:n};for(s in new t)f.push(s);i.enumErrorProps=r.call(u,"message")||r.call(u,"name");i.enumPrototypes=r.call(t,"prototype");i.nonEnumShadows=!/valueOf/.test(f);i.ownLast="x"!=f[0];i.spliceObjects=(o.call(e,0,1),!e[0]);i.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0);t.exports=i},{}],42:[function(n,t){function i(n){return n}t.exports=i},{}],43:[function(n,t){"use strict";var i=n("object-keys");t.exports=function(){var n,t,r,u,f;if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;if(n={},t=Symbol("test"),"string"==typeof t)return!1;r=42;n[t]=r;for(t in n)return!1;return 0!==i(n).length?!1:"function"==typeof Object.keys&&0!==Object.keys(n).length?!1:"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(n).length?!1:(u=Object.getOwnPropertySymbols(n),1!==u.length||u[0]!==t)?!1:Object.prototype.propertyIsEnumerable.call(n,t)?"function"==typeof Object.getOwnPropertyDescriptor&&(f=Object.getOwnPropertyDescriptor(n,t),f.value!==r||f.enumerable!==!0)?!1:!0:!1}},{"object-keys":50}],44:[function(n,t){"use strict";var f=n("object-keys"),i=n("function-bind"),e=function(n){return"undefined"!=typeof n&&null!==n},o=n("./hasSymbols")(),r=Object,s=i.call(Function.call,Array.prototype.push),u=i.call(Function.call,Object.prototype.propertyIsEnumerable);t.exports=function(n){if(!e(n))throw new TypeError("target must be an object");for(var h,t,l,a,v,i,y=r(n),c=1;c<arguments.length;++c){if(h=r(arguments[c]),l=f(h),o&&Object.getOwnPropertySymbols)for(a=Object.getOwnPropertySymbols(h),t=0;t<a.length;++t)i=a[t],u(h,i)&&s(l,i);for(t=0;t<l.length;++t)i=l[t],v=h[i],u(h,i)&&(y[i]=v)}return y}},{"./hasSymbols":43,"function-bind":49,"object-keys":50}],45:[function(n,t){"use strict";var r=n("define-properties"),i=n("./implementation"),u=n("./polyfill"),f=n("./shim");r(i,{implementation:i,getPolyfill:u,shim:f});t.exports=i},{"./implementation":44,"./polyfill":52,"./shim":53,"define-properties":46}],46:[function(n,t){"use strict";var u=n("object-keys"),f=n("foreach"),e="function"==typeof Symbol&&"symbol"==typeof Symbol(),o=Object.prototype.toString,s=function(n){return"function"==typeof n&&"[object Function]"===o.call(n)},h=function(){var n={},t;try{Object.defineProperty(n,"x",{enumerable:!1,value:n});for(t in n)return!1;return n.x===n}catch(i){return!1}},i=Object.defineProperty&&h(),c=function(n,t,r,u){t in n&&(!s(u)||!u())||(i?Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):n[t]=r)},r=function(n,t){var r=arguments.length>2?arguments[2]:{},i=u(t);e&&(i=i.concat(Object.getOwnPropertySymbols(t)));f(i,function(i){c(n,i,t[i],r[i])})};r.supportsDescriptors=!!i;t.exports=r},{foreach:47,"object-keys":50}],47:[function(n,t){var i=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(n,t,u){var e,f,o;if("[object Function]"!==r.call(t))throw new TypeError("iterator must be a function");if(e=n.length,e===+e)for(f=0;e>f;f++)t.call(u,n[f],f,n);else for(o in n)i.call(n,o)&&t.call(u,n[o],o,n)}},{}],48:[function(n,t){var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,u=Object.prototype.toString,f="[object Function]";t.exports=function(n){var t=this,o;if("function"!=typeof t||u.call(t)!==f)throw new TypeError(r+t);for(var e,s=i.call(arguments,1),l=function(){if(this instanceof e){var r=t.apply(this,s.concat(i.call(arguments)));return Object(r)===r?r:this}return t.apply(n,s.concat(i.call(arguments)))},a=Math.max(0,t.length-s.length),c=[],h=0;a>h;h++)c.push("$"+h);return(e=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(l),t.prototype)&&(o=function(){},o.prototype=t.prototype,e.prototype=new o,o.prototype=null),e}},{}],49:[function(n,t){var i=n("./implementation");t.exports=Function.prototype.bind||i},{"./implementation":48}],50:[function(n,t){"use strict";var i=Object.prototype.hasOwnProperty,e=Object.prototype.toString,s=Array.prototype.slice,o=n("./isArguments"),h=!{toString:null}.propertyIsEnumerable("toString"),c=function(){}.propertyIsEnumerable("prototype"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(n){var t=n.constructor;return t&&t.prototype===n},l={$console:!0,$frame:!0,$frameElement:!0,$frames:!0,$parent:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},a=function(){if("undefined"==typeof window)return!1;for(var n in window)try{if(!l["$"+n]&&i.call(window,n)&&null!==window[n]&&"object"==typeof window[n])try{f(window[n])}catch(t){return!0}}catch(t){return!0}return!1}(),v=function(n){if("undefined"==typeof window||!a)return f(n);try{return f(n)}catch(t){return!1}},u=function(n){var a=null!==n&&"object"==typeof n,y="[object Function]"===e.call(n),p=o(n),k=a&&"[object String]"===e.call(n),u=[],w,f,s,l,b,t;if(!a&&!y&&!p)throw new TypeError("Object.keys called on a non-object");if(w=c&&y,k&&n.length>0&&!i.call(n,0))for(f=0;f<n.length;++f)u.push(String(f));if(p&&n.length>0)for(s=0;s<n.length;++s)u.push(String(s));else for(l in n)w&&"prototype"===l||!i.call(n,l)||u.push(String(l));if(h)for(b=v(n),t=0;t<r.length;++t)b&&"constructor"===r[t]||!i.call(n,r[t])||u.push(r[t]);return u};u.shim=function(){var n,t;return Object.keys?(n=function(){return 2===(Object.keys(arguments)||"").length}(1,2),n||(t=Object.keys,Object.keys=function(n){return t(o(n)?s.call(n):n)})):Object.keys=u,Object.keys||u};t.exports=u},{"./isArguments":51}],51:[function(n,t){"use strict";var i=Object.prototype.toString;t.exports=function(n){var r=i.call(n),t="[object Arguments]"===r;return t||(t="[object Array]"!==r&&null!==n&&"object"==typeof n&&"number"==typeof n.length&&n.length>=0&&"[object Function]"===i.call(n.callee)),t}},{}],52:[function(n,t){"use strict";var i=n("./implementation"),r=function(){var f,i,e;if(!Object.assign)return!1;for(var r="abcdefghijklmnopqrst",t=r.split(""),u={},n=0;n<t.length;++n)u[t[n]]=t[n];f=Object.assign({},u);i="";for(e in f)i+=e;return r!==i},u=function(){if(!Object.assign||!Object.preventExtensions)return!1;var n=Object.preventExtensions({1:2});try{Object.assign(n,"xy")}catch(t){return"y"===n[1]}};t.exports=function(){return Object.assign?r()?i:u()?i:Object.assign:i}},{"./implementation":44}],53:[function(n,t){"use strict";var i=n("define-properties"),r=n("./polyfill");t.exports=function(){var n=r();return i(Object,{assign:n},{assign:function(){return Object.assign!==n}}),n}},{"./polyfill":52,"define-properties":46}],54:[function(n,t){function i(n,t){var i,r=null;try{i=JSON.parse(n,t)}catch(u){r=u}return[r,i]}t.exports=i},{}],55:[function(n,t){function i(n){return n.replace(/\n\r?\s*/g,"")}t.exports=function(n){for(var r="",t=0;t<arguments.length;t++)r+=i(n[t])+(arguments[t+1]||"");return r}},{}],56:[function(n,t){"use strict";function e(n,t){for(var i=0;i<n.length;i++)t(n[i])}function o(n){for(var t in n)if(n.hasOwnProperty(t))return!1;return!0}function r(n,t,i){var r=n;return c(t)?(i=t,"string"==typeof n&&(r={uri:n})):r=a(t,{uri:n}),r.callback=i,r}function i(n,t,i){return t=r(n,t,i),u(t)}function u(n){function d(){4===t.readyState&&p()}function g(){var n=void 0;if(t.response?n=t.response:"text"!==t.responseType&&t.responseType||(n=t.responseText||t.responseXML),k)try{n=JSON.parse(n)}catch(i){}return n}function s(n){clearTimeout(a);n instanceof Error||(n=new Error(""+(n||"Unknown XMLHttpRequest Error")));n.statusCode=0;u(n,c)}function p(){var r,i,e;w||(clearTimeout(a),r=n.useXDR&&void 0===t.status?200:1223===t.status?204:t.status,i=c,e=null,0!==r?(i={body:g(),statusCode:r,method:f,headers:{},url:v,rawRequest:t},t.getAllResponseHeaders&&(i.headers=l(t.getAllResponseHeaders()))):e=new Error("Internal XMLHttpRequest Error"),u(e,i,i.body))}var u=n.callback,c,t;if("undefined"==typeof u)throw new Error("callback argument missing");u=h(u);c={body:void 0,headers:{},statusCode:0,method:f,url:v,rawRequest:t};t=n.xhr||null;t||(t=n.cors||n.useXDR?new i.XDomainRequest:new i.XMLHttpRequest);var e,w,a,v=t.url=n.uri||n.url,f=t.method=n.method||"GET",b=n.body||n.data||null,r=t.headers=n.headers||{},y=!!n.sync,k=!1;if("json"in n&&(k=!0,r.accept||r.Accept||(r.Accept="application/json"),"GET"!==f&&"HEAD"!==f&&(r["content-type"]||r["Content-Type"]||(r["Content-Type"]="application/json"),b=JSON.stringify(n.json))),t.onreadystatechange=d,t.onload=p,t.onerror=s,t.onprogress=function(){},t.ontimeout=s,t.open(f,v,!y,n.username,n.password),y||(t.withCredentials=!!n.withCredentials),!y&&n.timeout>0&&(a=setTimeout(function(){w=!0;t.abort("timeout");var n=new Error("XMLHttpRequest timeout");n.code="ETIMEDOUT";s(n)},n.timeout)),t.setRequestHeader)for(e in r)r.hasOwnProperty(e)&&t.setRequestHeader(e,r[e]);else if(n.headers&&!o(n.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in n&&(t.responseType=n.responseType),"beforeSend"in n&&"function"==typeof n.beforeSend&&n.beforeSend(t),t.send(b),t}function s(){}var f=n("global/window"),h=n("once"),c=n("is-function"),l=n("parse-headers"),a=n("xtend");t.exports=i;i.XMLHttpRequest=f.XMLHttpRequest||s;i.XDomainRequest="withCredentials"in new i.XMLHttpRequest?i.XMLHttpRequest:f.XDomainRequest;e(["get","put","post","patch","head","delete"],function(n){i["delete"===n?"del":n]=function(t,i,f){return i=r(t,i,f),i.method=n.toUpperCase(),u(i)}})},{"global/window":2,"is-function":57,once:58,"parse-headers":61,xtend:62}],57:[function(n,t){function i(n){var t=r.call(n);return"[object Function]"===t||"function"==typeof n&&"[object RegExp]"!==t||"undefined"!=typeof window&&(n===window.setTimeout||n===window.alert||n===window.confirm||n===window.prompt)}t.exports=i;var r=Object.prototype.toString},{}],58:[function(n,t){function i(n){var t=!1;return function(){if(!t)return(t=!0,n.apply(this,arguments))}}t.exports=i;i.proto=i(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0})})},{}],59:[function(n,t){function u(n,t,i){if(!s(t))throw new TypeError("iterator must be a function");arguments.length<3&&(i=this);"[object Array]"===r.call(n)?f(n,t,i):"string"==typeof n?e(n,t,i):o(n,t,i)}function f(n,t,r){for(var u=0,f=n.length;f>u;u++)i.call(n,u)&&t.call(r,n[u],u,n)}function e(n,t,i){for(var r=0,u=n.length;u>r;r++)t.call(i,n.charAt(r),r,n)}function o(n,t,r){for(var u in n)i.call(n,u)&&t.call(r,n[u],u,n)}var s=n("is-function"),r,i;t.exports=u;r=Object.prototype.toString;i=Object.prototype.hasOwnProperty},{"is-function":57}],60:[function(n,t,i){function r(n){return n.replace(/^\s*|\s*$/g,"")}i=t.exports=r;i.left=function(n){return n.replace(/^\s*/,"")};i.right=function(n){return n.replace(/\s*$/,"")}},{}],61:[function(n,t){var i=n("trim"),r=n("for-each"),u=function(n){return"[object Array]"===Object.prototype.toString.call(n)};t.exports=function(n){if(!n)return{};var t={};return r(i(n).split("\n"),function(n){var e=n.indexOf(":"),r=i(n.slice(0,e)).toLowerCase(),f=i(n.slice(e+1));"undefined"==typeof t[r]?t[r]=f:u(t[r])?t[r].push(f):t[r]=[t[r],f]}),t}},{"for-each":59,trim:60}],62:[function(n,t){function i(){for(var t,i,u={},n=0;n<arguments.length;n++){t=arguments[n];for(i in t)r.call(t,i)&&(u[i]=t[i])}return u}t.exports=i;var r=Object.prototype.hasOwnProperty},{}],63:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("./button.js"),s=u(o),h=n("./component.js"),c=u(h),r=function(n){function t(i,r){f(this,t);n.call(this,i,r)}return e(t,n),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(){this.player_.play()},t}(s["default"]);r.prototype.controlText_="Play Video";c["default"].registerComponent("BigPlayButton",r);i["default"]=r;t.exports=i["default"]},{"./button.js":64,"./component.js":67}],64:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function h(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var l=n("./clickable-component.js"),a=r(l),v=n("./component"),f=r(v),y=n("./utils/events.js"),p=(e(y),n("./utils/fn.js")),w=(e(p),n("./utils/log.js")),o=r(w),b=n("global/document"),k=(r(b),n("object.assign")),u=r(k),s=function(n){function t(i,r){h(this,t);n.call(this,i,r)}return c(t,n),t.prototype.createEl=function(){var i=arguments.length<=0||void 0===arguments[0]?"button":arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],t=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],r;return n=u["default"]({className:this.buildCSSClass()},n),"button"!==i&&(o["default"].warn("Creating a Button with an HTML element of "+i+" is deprecated; use ClickableComponent instead."),n=u["default"]({tabIndex:0},n),t=u["default"]({role:"button"},t)),t=u["default"]({type:"button","aria-live":"polite"},t),r=f["default"].prototype.createEl.call(this,i,n,t),this.createControlTextEl(r),r},t.prototype.addChild=function(n){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=this.constructor.name;return o["default"].warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),f["default"].prototype.addChild.call(this,n,t)},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which||n.prototype.handleKeyPress.call(this,t)},t}(a["default"]);f["default"].registerComponent("Button",s);i["default"]=s;t.exports=i["default"]},{"./clickable-component.js":65,"./component":67,"./utils/events.js":144,"./utils/fn.js":145,"./utils/log.js":148,"global/document":1,"object.assign":45}],65:[function(n,t,i){"use strict";function u(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function l(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function a(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var v=n("./component"),f=r(v),y=n("./utils/dom.js"),p=u(y),w=n("./utils/events.js"),e=u(w),b=n("./utils/fn.js"),o=u(b),k=n("./utils/log.js"),d=r(k),g=n("global/document"),s=r(g),nt=n("object.assign"),h=r(nt),c=function(n){function t(i,r){l(this,t);n.call(this,i,r);this.emitTapEvents();this.on("tap",this.handleClick);this.on("click",this.handleClick);this.on("focus",this.handleFocus);this.on("blur",this.handleBlur)}return a(t,n),t.prototype.createEl=function(){var t=arguments.length<=0||void 0===arguments[0]?"div":arguments[0],i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],u;return i=h["default"]({className:this.buildCSSClass(),tabIndex:0},i),"button"===t&&d["default"].error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),r=h["default"]({role:"button","aria-live":"polite"},r),u=n.prototype.createEl.call(this,t,i,r),this.createControlTextEl(u),u},t.prototype.createControlTextEl=function(n){return this.controlTextEl_=p.createEl("span",{className:"vjs-control-text"}),n&&n.appendChild(this.controlTextEl_),this.controlText(this.controlText_),this.controlTextEl_},t.prototype.controlText=function(n){return n?(this.controlText_=n,this.controlTextEl_.innerHTML=this.localize(this.controlText_),this):this.controlText_||"Need Text"},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+n.prototype.buildCSSClass.call(this)},t.prototype.addChild=function(t){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return n.prototype.addChild.call(this,t,i)},t.prototype.enable=function(){return this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),this},t.prototype.disable=function(){return this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),this},t.prototype.handleClick=function(){},t.prototype.handleFocus=function(){e.on(s["default"],"keydown",o.bind(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleClick(t)):n.prototype.handleKeyPress&&n.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(){e.off(s["default"],"keydown",o.bind(this,this.handleKeyPress))},t}(f["default"]);f["default"].registerComponent("ClickableComponent",c);i["default"]=c;t.exports=i["default"]},{"./component":67,"./utils/dom.js":143,"./utils/events.js":144,"./utils/fn.js":145,"./utils/log.js":148,"global/document":1,"object.assign":45}],66:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("./button"),s=r(o),h=n("./component"),c=r(h),u=function(n){function t(i,r){f(this,t);n.call(this,i,r);this.controlText(r&&r.controlText||this.localize("Close"))}return e(t,n),t.prototype.buildCSSClass=function(){return"vjs-close-button "+n.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(){this.trigger({type:"close",bubbles:!1})},t}(s["default"]);c["default"].registerComponent("CloseButton",u);i["default"]=u;t.exports=i["default"]},{"./button":64,"./component":67}],67:[function(n,t,i){"use strict";function s(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function o(n){return n&&n.__esModule?n:{"default":n}}function v(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}i.__esModule=!0;var y=n("global/window"),r=o(y),p=n("./utils/dom.js"),u=s(p),w=n("./utils/fn.js"),f=s(w),b=n("./utils/guid.js"),k=s(b),d=n("./utils/events.js"),e=s(d),g=n("./utils/log.js"),h=o(g),nt=n("./utils/to-title-case.js"),c=o(nt),tt=n("object.assign"),it=o(tt),rt=n("./utils/merge-options.js"),l=o(rt),a=function(){function n(t,i,r){if(v(this,n),this.player_=!t&&this.play?t=this:t,this.options_=l["default"]({},this.options_),i=this.options_=l["default"](this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){var u=t&&t.id&&t.id()||"no_player";this.id_=u+"_component_"+k.newGUID()}this.name_=i.name||null;i.el?this.el_=i.el:i.createEl!==!1&&(this.el_=this.createEl());this.children_=[];this.childIndex_={};this.childNameIndex_={};i.initChildren!==!1&&this.initChildren();this.ready(r);i.reportTouchActivity!==!1&&this.enableTouchActivity()}return n.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var n=this.children_.length-1;n>=0;n--)this.children_[n].dispose&&this.children_[n].dispose();this.children_=null;this.childIndex_=null;this.childNameIndex_=null;this.off();this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_);u.removeElData(this.el_);this.el_=null},n.prototype.player=function(){return this.player_},n.prototype.options=function(n){return h["default"].warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),n?(this.options_=l["default"](this.options_,n),this.options_):this.options_},n.prototype.el=function(){return this.el_},n.prototype.createEl=function(n,t,i){return u.createEl(n,t,i)},n.prototype.localize=function(n){var r=this.player_.language&&this.player_.language(),u=this.player_.languages&&this.player_.languages(),t,f,i;return!r||!u?n:(t=u[r],t&&t[n])?t[n]:(f=r.split("-")[0],i=u[f],i&&i[n]?i[n]:n)},n.prototype.contentEl=function(){return this.contentEl_||this.el_},n.prototype.id=function(){return this.id_},n.prototype.name=function(){return this.name_},n.prototype.children=function(){return this.children_},n.prototype.getChildById=function(n){return this.childIndex_[n]},n.prototype.getChild=function(n){return this.childNameIndex_[n]},n.prototype.addChild=function(t){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=arguments.length<=2||void 0===arguments[2]?this.children_.length:arguments[2],i=void 0,u=void 0,e,f,s,l;if("string"==typeof t){if(u=t,r||(r={}),r===!0&&(h["default"].warn("Initializing a child component with `true` is deprecated. Children should be defined in an array when possible, but if necessary use an object instead of `true`."),r={}),e=r.componentClass||c["default"](u),r.name=u,f=n.getComponent(e),!f)throw new Error("Component "+e+" does not exist");if("function"!=typeof f)return null;i=new f(this.player_||this,r)}else i=t;return(this.children_.splice(o,0,i),"function"==typeof i.id&&(this.childIndex_[i.id()]=i),u=u||i.name&&i.name(),u&&(this.childNameIndex_[u]=i),"function"==typeof i.el&&i.el())&&(s=this.contentEl().children,l=s[o]||null,this.contentEl().insertBefore(i.el(),l)),i},n.prototype.removeChild=function(n){var i,t,r;if("string"==typeof n&&(n=this.getChild(n)),n&&this.children_){for(i=!1,t=this.children_.length-1;t>=0;t--)if(this.children_[t]===n){i=!0;this.children_.splice(t,1);break}i&&(this.childIndex_[n.id()]=null,this.childNameIndex_[n.name()]=null,r=n.el(),r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(n.el()))}},n.prototype.initChildren=function(){var t=this,i=this.options_.children;i&&!function(){var u=t.options_,f=function(n){var r=n.name,i=n.opts,f;(void 0!==u[r]&&(i=u[r]),i!==!1)&&(i===!0&&(i={}),i.playerOptions=t.options_.playerOptions,f=t.addChild(r,i),f&&(t[r]=f))},r=void 0,e=n.getComponent("Tech");r=Array.isArray(i)?i:Object.keys(i);r.concat(Object.keys(t.options_).filter(function(n){return!r.some(function(t){return"string"==typeof t?n===t:n===t.name})})).map(function(n){var r=void 0,u=void 0;return"string"==typeof n?(r=n,u=i[r]||t.options_[r]||{}):(r=n.name,u=n),{name:r,opts:u}}).filter(function(t){var i=n.getComponent(t.opts.componentClass||c["default"](t.name));return i&&!e.isTech(i)}).forEach(f)}()},n.prototype.buildCSSClass=function(){return""},n.prototype.on=function(n,t,i){var r=this;return"string"==typeof n||Array.isArray(n)?e.on(this.el_,n,f.bind(this,t)):!function(){var u=n,h=t,o=f.bind(r,i),c=function(){return r.off(u,h,o)},s;c.guid=o.guid;r.on("dispose",c);s=function(){return r.off("dispose",c)};s.guid=o.guid;n.nodeName?(e.on(u,h,o),e.on(u,"dispose",s)):"function"==typeof n.on&&(u.on(h,o),u.on("dispose",s))}(),this},n.prototype.off=function(n,t,i){if(!n||"string"==typeof n||Array.isArray(n))e.off(this.el_,n,t);else{var u=n,o=t,r=f.bind(this,i);this.off("dispose",r);n.nodeName?(e.off(u,o,r),e.off(u,"dispose",r)):(u.off(o,r),u.off("dispose",r))}return this},n.prototype.one=function(n,t,i){var r=this,u=arguments;return"string"==typeof n||Array.isArray(n)?e.one(this.el_,n,f.bind(this,t)):!function(){var e=n,o=t,s=f.bind(r,i),h=function c(){r.off(e,o,c);s.apply(null,u)};h.guid=s.guid;r.on(e,o,h)}(),this},n.prototype.trigger=function(n,t){return e.trigger(this.el_,n,t),this},n.prototype.ready=function(n){var t=arguments.length<=1||void 0===arguments[1]?!1:arguments[1];return n&&(this.isReady_?t?n.call(this):this.setTimeout(n,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(n))),this},n.prototype.triggerReady=function(){this.isReady_=!0;this.setTimeout(function(){var n=this.readyQueue_;this.readyQueue_=[];n&&n.length>0&&n.forEach(function(n){n.call(this)},this);this.trigger("ready")},1)},n.prototype.$=function(n,t){return u.$(n,t||this.contentEl())},n.prototype.$$=function(n,t){return u.$$(n,t||this.contentEl())},n.prototype.hasClass=function(n){return u.hasElClass(this.el_,n)},n.prototype.addClass=function(n){return u.addElClass(this.el_,n),this},n.prototype.removeClass=function(n){return u.removeElClass(this.el_,n),this},n.prototype.toggleClass=function(n,t){return u.toggleElClass(this.el_,n,t),this},n.prototype.show=function(){return this.removeClass("vjs-hidden"),this},n.prototype.hide=function(){return this.addClass("vjs-hidden"),this},n.prototype.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},n.prototype.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},n.prototype.width=function(n,t){return this.dimension("width",n,t)},n.prototype.height=function(n,t){return this.dimension("height",n,t)},n.prototype.dimensions=function(n,t){return this.width(n,!0).height(t)},n.prototype.dimension=function(n,t,i){if(void 0!==t)return(null===t||t!==t)&&(t=0),this.el_.style[n]=-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?t:"auto"===t?"":t+"px",i||this.trigger("resize"),this;if(!this.el_)return 0;var r=this.el_.style[n],u=r.indexOf("px");return-1!==u?parseInt(r.slice(0,u),10):parseInt(this.el_["offset"+c["default"](n)],10)},n.prototype.currentDimension=function(n){var t=0,i,u;if("width"!==n&&"height"!==n)throw new Error("currentDimension only accepts width or height value");return"function"==typeof r["default"].getComputedStyle?(i=r["default"].getComputedStyle(this.el_),t=i.getPropertyValue(n)||i[n]):this.el_.currentStyle&&(u="offset"+c["default"](n),t=this.el_[u]),parseFloat(t)},n.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},n.prototype.currentWidth=function(){return this.currentDimension("width")},n.prototype.currentHeight=function(){return this.currentDimension("height")},n.prototype.emitTapEvents=function(){var r=0,n=null,u=10,f=200,t=void 0,i;this.on("touchstart",function(i){1===i.touches.length&&(n=it["default"]({},i.touches[0]),r=(new Date).getTime(),t=!0)});this.on("touchmove",function(i){if(i.touches.length>1)t=!1;else if(n){var r=i.touches[0].pageX-n.pageX,f=i.touches[0].pageY-n.pageY,e=Math.sqrt(r*r+f*f);e>u&&(t=!1)}});i=function(){t=!1};this.on("touchleave",i);this.on("touchcancel",i);this.on("touchend",function(i){if(n=null,t===!0){var u=(new Date).getTime()-r;f>u&&(i.preventDefault(),this.trigger("tap"))}})},n.prototype.enableTouchActivity=function(){var n,t,i;if(this.player()&&this.player().reportUserActivity){n=f.bind(this.player(),this.player().reportUserActivity);t=void 0;this.on("touchstart",function(){n();this.clearInterval(t);t=this.setInterval(n,250)});i=function(){n();this.clearInterval(t)};this.on("touchmove",n);this.on("touchend",i);this.on("touchcancel",i)}},n.prototype.setTimeout=function(n,t){n=f.bind(this,n);var i=r["default"].setTimeout(n,t),u=function(){this.clearTimeout(i)};return u.guid="vjs-timeout-"+i,this.on("dispose",u),i},n.prototype.clearTimeout=function(n){r["default"].clearTimeout(n);var t=function(){};return t.guid="vjs-timeout-"+n,this.off("dispose",t),n},n.prototype.setInterval=function(n,t){n=f.bind(this,n);var i=r["default"].setInterval(n,t),u=function(){this.clearInterval(i)};return u.guid="vjs-interval-"+i,this.on("dispose",u),i},n.prototype.clearInterval=function(n){r["default"].clearInterval(n);var t=function(){};return t.guid="vjs-interval-"+n,this.off("dispose",t),n},n.registerComponent=function(t,i){return n.components_||(n.components_={}),n.components_[t]=i,i},n.getComponent=function(t){return n.components_&&n.components_[t]?n.components_[t]:r["default"]&&r["default"].videojs&&r["default"].videojs[t]?(h["default"].warn("The "+t+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),r["default"].videojs[t]):void 0},n.extend=function(t){var u,i,r;t=t||{};h["default"].warn("Component.extend({}) has been deprecated, use videojs.extend(Component, {}) instead");u=t.init||t.init||this.prototype.init||this.prototype.init||function(){};i=function(){u.apply(this,arguments)};i.prototype=Object.create(this.prototype);i.prototype.constructor=i;i.extend=n.extend;for(r in t)t.hasOwnProperty(r)&&(i.prototype[r]=t[r]);return i},n}();a.registerComponent("Component",a);i["default"]=a;t.exports=i["default"]},{"./utils/dom.js":143,"./utils/events.js":144,"./utils/fn.js":145,"./utils/guid.js":147,"./utils/log.js":148,"./utils/merge-options.js":149,"./utils/to-title-case.js":152,"global/window":2,"object.assign":45}],68:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../track-button.js"),h=r(s),c=n("../../component.js"),l=r(c),a=n("../../utils/fn.js"),v=(f(a),n("./audio-track-menu-item.js")),y=r(v),u=function(n){function t(i){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];e(this,t);r.tracks=i.audioTracks&&i.audioTracks();n.call(this,i,r);this.el_.setAttribute("aria-label","Audio Menu")}return o(t,n),t.prototype.buildCSSClass=function(){return"vjs-audio-button "+n.prototype.buildCSSClass.call(this)},t.prototype.createItems=function(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],i=this.player_.audioTracks&&this.player_.audioTracks(),n,r;if(!i)return t;for(n=0;n<i.length;n++)r=i[n],t.push(new y["default"](this.player_,{selectable:!0,track:r}));return t},t}(h["default"]);l["default"].registerComponent("AudioTrackButton",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"../../utils/fn.js":145,"../track-button.js":98,"./audio-track-menu-item.js":69}],69:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../../menu/menu-item.js"),h=r(s),c=n("../../component.js"),l=r(c),a=n("../../utils/fn.js"),v=f(a),u=function(n){function t(i,r){var o=this,u,f;e(this,t);u=r.track;f=i.audioTracks();r.label=u.label||u.language||"Unknown";r.selected=u.enabled;n.call(this,i,r);this.track=u;f&&!function(){var n=v.bind(o,o.handleTracksChange);f.addEventListener("change",n);o.on("dispose",function(){f.removeEventListener("change",n)})}()}return o(t,n),t.prototype.handleClick=function(t){var r=this.player_.audioTracks(),i,u;if(n.prototype.handleClick.call(this,t),r)for(i=0;i<r.length;i++)u=r[i],u===this.track&&(u.enabled=!0)},t.prototype.handleTracksChange=function(){this.selected(this.track.enabled)},t}(h["default"]);l["default"].registerComponent("AudioTrackMenuItem",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"../../menu/menu-item.js":110,"../../utils/fn.js":145}],70:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../component.js"),f=r(s),h=n("./play-toggle.js"),c=(r(h),n("./time-controls/current-time-display.js")),l=(r(c),n("./time-controls/duration-display.js")),a=(r(l),n("./time-controls/time-divider.js")),v=(r(a),n("./time-controls/remaining-time-display.js")),y=(r(v),n("./live-display.js")),p=(r(y),n("./progress-control/progress-control.js")),w=(r(p),n("./fullscreen-toggle.js")),b=(r(w),n("./volume-control/volume-control.js")),k=(r(b),n("./volume-menu-button.js")),d=(r(k),n("./mute-toggle.js")),g=(r(d),n("./text-track-controls/chapters-button.js")),nt=(r(g),n("./text-track-controls/descriptions-button.js")),tt=(r(nt),n("./text-track-controls/subtitles-button.js")),it=(r(tt),n("./text-track-controls/captions-button.js")),rt=(r(it),n("./audio-track-controls/audio-track-button.js")),ut=(r(rt),n("./playback-rate-menu/playback-rate-menu-button.js")),ft=(r(ut),n("./spacer-controls/custom-control-spacer.js")),u=(r(ft),function(n){function t(){e(this,t);n.apply(this,arguments)}return o(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},t}(f["default"]));u.prototype.options_={loadEvent:"play",children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]};f["default"].registerComponent("ControlBar",u);i["default"]=u;t.exports=i["default"]},{"../component.js":67,"./audio-track-controls/audio-track-button.js":68,"./fullscreen-toggle.js":71,"./live-display.js":72,"./mute-toggle.js":73,"./play-toggle.js":74,"./playback-rate-menu/playback-rate-menu-button.js":75,"./progress-control/progress-control.js":80,"./spacer-controls/custom-control-spacer.js":83,"./text-track-controls/captions-button.js":86,"./text-track-controls/chapters-button.js":87,"./text-track-controls/descriptions-button.js":89,"./text-track-controls/subtitles-button.js":91,"./time-controls/current-time-display.js":94,"./time-controls/duration-display.js":95,"./time-controls/remaining-time-display.js":96,"./time-controls/time-divider.js":97,"./volume-control/volume-control.js":100,"./volume-menu-button.js":102}],71:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("../button.js"),s=u(o),h=n("../component.js"),c=u(h),r=function(n){function t(){f(this,t);n.apply(this,arguments)}return e(t,n),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+n.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(){this.player_.isFullscreen()?(this.player_.exitFullscreen(),this.controlText("Fullscreen")):(this.player_.requestFullscreen(),this.controlText("Non-Fullscreen"))},t}(s["default"]);r.prototype.controlText_="Fullscreen";c["default"].registerComponent("FullscreenToggle",r);i["default"]=r;t.exports=i["default"]},{"../button.js":64,"../component.js":67}],72:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function e(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../component"),r=e(h),c=n("../utils/dom.js"),l=f(c),u=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.updateShowing();this.on(this.player(),"durationchange",this.updateShowing)}return s(t,n),t.prototype.createEl=function(){var t=n.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=l.createEl("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"<\/span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateShowing=function(){this.player().duration()===1/0?this.show():this.hide()},t}(r["default"]);r["default"].registerComponent("LiveDisplay",u);i["default"]=u;t.exports=i["default"]},{"../component":67,"../utils/dom.js":143}],73:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function u(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../button"),c=u(h),l=n("../component"),a=u(l),v=n("../utils/dom.js"),f=e(v),r=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.on(i,"volumechange",this.update);i.tech_&&i.tech_.featuresVolumeControl===!1&&this.addClass("vjs-hidden");this.on(i,"loadstart",function(){this.update();i.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})}return s(t,n),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+n.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(){this.player_.muted(this.player_.muted()?!1:!0)},t.prototype.update=function(){var i=this.player_.volume(),n=3,r,t;for(0===i||this.player_.muted()?n=0:.33>i?n=1:.67>i&&(n=2),r=this.player_.muted()?"Unmute":"Mute",this.controlText()!==r&&this.controlText(r),t=0;4>t;t++)f.removeElClass(this.el_,"vjs-vol-"+t);f.addElClass(this.el_,"vjs-vol-"+n)},t}(c["default"]);r.prototype.controlText_="Mute";a["default"].registerComponent("MuteToggle",r);i["default"]=r;t.exports=i["default"]},{"../button":64,"../component":67,"../utils/dom.js":143}],74:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("../button.js"),s=u(o),h=n("../component.js"),c=u(h),r=function(n){function t(i,r){f(this,t);n.call(this,i,r);this.on(i,"play",this.handlePlay);this.on(i,"pause",this.handlePause)}return e(t,n),t.prototype.buildCSSClass=function(){return"vjs-play-control "+n.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handlePlay=function(){this.removeClass("vjs-paused");this.addClass("vjs-playing");this.controlText("Pause")},t.prototype.handlePause=function(){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.controlText("Play")},t}(s["default"]);r.prototype.controlText_="Play";c["default"].registerComponent("PlayToggle",r);i["default"]=r;t.exports=i["default"]},{"../button.js":64,"../component.js":67}],75:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../../menu/menu-button.js"),h=r(s),c=n("../../menu/menu.js"),l=r(c),a=n("./playback-rate-menu-item.js"),v=r(a),y=n("../../component.js"),p=r(y),w=n("../../utils/dom.js"),b=f(w),u=function(n){function t(i,r){e(this,t);n.call(this,i,r);this.updateVisibility();this.updateLabel();this.on(i,"loadstart",this.updateVisibility);this.on(i,"ratechange",this.updateLabel)}return o(t,n),t.prototype.createEl=function(){var t=n.prototype.createEl.call(this);return this.labelEl_=b.createEl("div",{className:"vjs-playback-rate-value",innerHTML:1}),t.appendChild(this.labelEl_),t},t.prototype.buildCSSClass=function(){return"vjs-playback-rate "+n.prototype.buildCSSClass.call(this)},t.prototype.createMenu=function(){var i=new l["default"](this.player()),t=this.playbackRates(),n;if(t)for(n=t.length-1;n>=0;n--)i.addChild(new v["default"](this.player(),{rate:t[n]+"x"}));return i},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(){for(var r=this.player().playbackRate(),n=this.playbackRates(),i=n[0],t=0;t<n.length;t++)if(n[t]>r){i=n[t];break}this.player().playbackRate(i)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(h["default"]);u.prototype.controlText_="Playback Rate";p["default"].registerComponent("PlaybackRateMenuButton",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"../../menu/menu-button.js":109,"../../menu/menu.js":111,"../../utils/dom.js":143,"./playback-rate-menu-item.js":76}],76:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("../../menu/menu-item.js"),s=u(o),h=n("../../component.js"),c=u(h),r=function(n){function t(i,r){f(this,t);var u=r.rate,e=parseFloat(u,10);r.label=u;r.selected=1===e;n.call(this,i,r);this.label=u;this.rate=e;this.on(i,"ratechange",this.update)}return e(t,n),t.prototype.handleClick=function(){n.prototype.handleClick.call(this);this.player().playbackRate(this.rate)},t.prototype.update=function(){this.selected(this.player().playbackRate()===this.rate)},t}(s["default"]);r.prototype.contentElType="button";c["default"].registerComponent("PlaybackRateMenuItem",r);i["default"]=r;t.exports=i["default"]},{"../../component.js":67,"../../menu/menu-item.js":110}],77:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function e(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../../component.js"),r=e(h),c=n("../../utils/dom.js"),l=f(c),u=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.on(i,"progress",this.update)}return s(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"<\/span>: 0%<\/span>"})},t.prototype.update=function(){var t=this.player_.buffered(),o=this.player_.duration(),r=this.player_.bufferedEnd(),u=this.el_.children,f=function(n,t){var i=n/t||0;return 100*(i>=1?1:i)+"%"},n;for(this.el_.style.width=f(r,o),n=0;n<t.length;n++){var e=t.start(n),s=t.end(n),i=u[n];i||(i=this.el_.appendChild(l.createEl()));i.style.left=f(e,r);i.style.width=f(s-e,r)}for(n=u.length;n>t.length;n--)this.el_.removeChild(u[n-1])},t}(r["default"]);r["default"].registerComponent("LoadProgressBar",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"../../utils/dom.js":143}],78:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function h(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var l=n("global/window"),u=r(l),a=n("../../component.js"),o=r(a),v=n("../../utils/dom.js"),f=e(v),y=n("../../utils/fn.js"),p=e(y),w=n("../../utils/format-time.js"),b=r(w),k=n("lodash-compat/function/throttle"),d=r(k),s=function(n){function t(i,r){var u=this;h(this,t);n.call(this,i,r);r.playerOptions&&r.playerOptions.controlBar&&r.playerOptions.controlBar.progressControl&&r.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=r.playerOptions.controlBar.progressControl.keepTooltipsInside);this.keepTooltipsInside&&(this.tooltip=f.createEl("div",{className:"vjs-time-tooltip"}),this.el().appendChild(this.tooltip),this.addClass("vjs-keep-tooltips-inside"));this.update(0,0);i.on("ready",function(){u.on(i.controlBar.progressControl.el(),"mousemove",d["default"](p.bind(u,u.handleMouseMove),25))})}return c(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.handleMouseMove=function(n){var t=this.player_.duration(),i=this.calculateDistance(n)*t,r=n.pageX-f.findElPosition(this.el().parentNode).left;this.update(i,r)},t.prototype.update=function(n,t){var i=b["default"](n,this.player_.duration());if(this.el().style.left=t+"px",this.el().setAttribute("data-current-time",i),this.keepTooltipsInside){var r=this.clampPosition_(t),f=t-r+1,e=parseFloat(u["default"].getComputedStyle(this.tooltip).width),o=e/2;this.tooltip.innerHTML=i;this.tooltip.style.right="-"+(o-f)+"px"}},t.prototype.calculateDistance=function(n){return f.getPointerPosition(this.el().parentNode,n).x},t.prototype.clampPosition_=function(n){if(!this.keepTooltipsInside)return n;var r=parseFloat(u["default"].getComputedStyle(this.player().el()).width),f=parseFloat(u["default"].getComputedStyle(this.tooltip).width),t=f/2,i=n;return t>n?i=Math.ceil(t):n>r-t&&(i=Math.floor(r-t)),i},t}(o["default"]);o["default"].registerComponent("MouseTimeDisplay",s);i["default"]=s;t.exports=i["default"]},{"../../component.js":67,"../../utils/dom.js":143,"../../utils/fn.js":145,"../../utils/format-time.js":146,"global/window":2,"lodash-compat/function/throttle":7}],79:[function(n,t,i){"use strict";function r(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function u(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../../component.js"),f=u(h),c=n("../../utils/fn.js"),l=r(c),a=n("../../utils/dom.js"),v=(r(a),n("../../utils/format-time.js")),y=u(v),e=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.updateDataAttr();this.on(i,"timeupdate",this.updateDataAttr);i.ready(l.bind(this,this.updateDataAttr));r.playerOptions&&r.playerOptions.controlBar&&r.playerOptions.controlBar.progressControl&&r.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=r.playerOptions.controlBar.progressControl.keepTooltipsInside);this.keepTooltipsInside&&this.addClass("vjs-keep-tooltips-inside")}return s(t,n),t.prototype.createEl=function(){return n.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>"})},t.prototype.updateDataAttr=function(){var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("data-current-time",y["default"](n,this.player_.duration()))},t}(f["default"]);f["default"].registerComponent("PlayProgressBar",e);i["default"]=e;t.exports=i["default"]},{"../../component.js":67,"../../utils/dom.js":143,"../../utils/fn.js":145,"../../utils/format-time.js":146}],80:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../../component.js"),f=r(s),h=n("./seek-bar.js"),c=(r(h),n("./mouse-time-display.js")),u=(r(c),function(n){function t(){e(this,t);n.apply(this,arguments)}return o(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t}(f["default"]));u.prototype.options_={children:["seekBar"]};f["default"].registerComponent("ProgressControl",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"./mouse-time-display.js":78,"./seek-bar.js":81}],81:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("global/window"),f=r(h),c=n("../../slider/slider.js"),l=r(c),a=n("../../component.js"),v=r(a),y=n("./load-progress-bar.js"),p=(r(y),n("./play-progress-bar.js")),w=(r(p),n("./tooltip-progress-bar.js")),b=(r(w),n("../../utils/fn.js")),k=e(b),d=n("../../utils/format-time.js"),g=r(d),nt=n("object.assign"),u=(r(nt),function(n){function t(i,r){o(this,t);n.call(this,i,r);this.on(i,"timeupdate",this.updateProgress);this.on(i,"ended",this.updateProgress);i.ready(k.bind(this,this.updateProgress));r.playerOptions&&r.playerOptions.controlBar&&r.playerOptions.controlBar.progressControl&&r.playerOptions.controlBar.progressControl.keepTooltipsInside&&(this.keepTooltipsInside=r.playerOptions.controlBar.progressControl.keepTooltipsInside);this.keepTooltipsInside&&(this.tooltipProgressBar=this.addChild("TooltipProgressBar"))}return s(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},t.prototype.updateProgress=function(){if(this.updateAriaAttributes(this.el_),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.el_);this.tooltipProgressBar.el_.style.width=this.bar.el_.style.width;var i=parseFloat(f["default"].getComputedStyle(this.player().el()).width),n=parseFloat(f["default"].getComputedStyle(this.tooltipProgressBar.tooltip).width),t=this.tooltipProgressBar.el().style;t.maxWidth=Math.floor(i-n/2)+"px";t.minWidth=Math.ceil(n/2)+"px";t.right="-"+n/2+"px"}},t.prototype.updateAriaAttributes=function(n){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2));n.setAttribute("aria-valuetext",g["default"](t,this.player_.duration()))},t.prototype.getPercent=function(){var n=this.player_.currentTime()/this.player_.duration();return n>=1?1:n},t.prototype.handleMouseDown=function(t){n.prototype.handleMouseDown.call(this,t);this.player_.scrubbing(!0);this.videoWasPlaying=!this.player_.paused();this.player_.pause()},t.prototype.handleMouseMove=function(n){var t=this.calculateDistance(n)*this.player_.duration();t===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)},t.prototype.handleMouseUp=function(t){n.prototype.handleMouseUp.call(this,t);this.player_.scrubbing(!1);this.videoWasPlaying&&this.player_.play()},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t}(l["default"]));u.prototype.options_={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"};u.prototype.playerEvent="timeupdate";v["default"].registerComponent("SeekBar",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"../../slider/slider.js":119,"../../utils/fn.js":145,"../../utils/format-time.js":146,"./load-progress-bar.js":77,"./play-progress-bar.js":79,"./tooltip-progress-bar.js":82,"global/window":2,"object.assign":45}],82:[function(n,t,i){"use strict";function r(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function u(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../../component.js"),f=u(h),c=n("../../utils/fn.js"),l=r(c),a=n("../../utils/dom.js"),v=(r(a),n("../../utils/format-time.js")),y=u(v),e=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.updateDataAttr();this.on(i,"timeupdate",this.updateDataAttr);i.ready(l.bind(this,this.updateDataAttr))}return s(t,n),t.prototype.createEl=function(){var t=n.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar",innerHTML:'<div class="vjs-time-tooltip"><\/div>\n        <span class="vjs-control-text"><span>'+this.localize("Progress")+"<\/span>: 0%<\/span>"});return this.tooltip=t.querySelector(".vjs-time-tooltip"),t},t.prototype.updateDataAttr=function(){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),n=y["default"](t,this.player_.duration());this.el_.setAttribute("data-current-time",n);this.tooltip.innerHTML=n},t}(f["default"]);f["default"].registerComponent("TooltipProgressBar",e);i["default"]=e;t.exports=i["default"]},{"../../component.js":67,"../../utils/dom.js":143,"../../utils/fn.js":145,"../../utils/format-time.js":146}],83:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("./spacer.js"),s=r(o),h=n("../../component.js"),c=r(h),u=function(n){function t(){f(this,t);n.apply(this,arguments)}return e(t,n),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+n.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=n.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML="&nbsp;",t},t}(s["default"]);c["default"].registerComponent("CustomControlSpacer",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"./spacer.js":84}],84:[function(n,t,i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../../component.js"),r=f(s),u=function(n){function t(){e(this,t);n.apply(this,arguments)}return o(t,n),t.prototype.buildCSSClass=function(){return"vjs-spacer "+n.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(r["default"]);r["default"].registerComponent("Spacer",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67}],85:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("./text-track-menu-item.js"),s=r(o),h=n("../../component.js"),c=r(h),u=function(n){function t(i,r){f(this,t);r.track={kind:r.kind,player:i,label:r.kind+" settings",selectable:!1,"default":!1,mode:"disabled"};r.selectable=!1;n.call(this,i,r);this.addClass("vjs-texttrack-settings");this.controlText(", opens "+r.kind+" settings dialog")}return e(t,n),t.prototype.handleClick=function(){this.player().getChild("textTrackSettings").show();this.player().getChild("textTrackSettings").el_.focus()},t}(s["default"]);c["default"].registerComponent("CaptionSettingsMenuItem",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"./text-track-menu-item.js":93}],86:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("./text-track-button.js"),s=u(o),h=n("../../component.js"),c=u(h),l=n("./caption-settings-menu-item.js"),a=u(l),r=function(n){function t(i,r,u){f(this,t);n.call(this,i,r,u);this.el_.setAttribute("aria-label","Captions Menu")}return e(t,n),t.prototype.buildCSSClass=function(){return"vjs-captions-button "+n.prototype.buildCSSClass.call(this)},t.prototype.update=function(){var t=2;n.prototype.update.call(this);this.player().tech_&&this.player().tech_.featuresNativeTextTracks&&(t=1);this.items&&this.items.length>t?this.show():this.hide()},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||t.push(new a["default"](this.player_,{kind:this.kind_})),n.prototype.createItems.call(this,t)},t}(s["default"]);r.prototype.kind_="captions";r.prototype.controlText_="Captions";c["default"].registerComponent("CaptionsButton",r);i["default"]=r;t.exports=i["default"]},{"../../component.js":67,"./caption-settings-menu-item.js":85,"./text-track-button.js":92}],87:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("./text-track-button.js"),c=r(h),l=n("../../component.js"),a=r(l),v=n("./text-track-menu-item.js"),y=r(v),p=n("./chapters-track-menu-item.js"),w=r(p),b=n("../../menu/menu.js"),k=r(b),d=n("../../utils/dom.js"),e=f(d),g=n("../../utils/fn.js"),nt=(f(g),n("../../utils/to-title-case.js")),tt=r(nt),it=n("global/window"),u=(r(it),function(n){function t(i,r,u){o(this,t);n.call(this,i,r,u);this.el_.setAttribute("aria-label","Chapters Menu")}return s(t,n),t.prototype.buildCSSClass=function(){return"vjs-chapters-button "+n.prototype.buildCSSClass.call(this)},t.prototype.createItems=function(){var t=[],i=this.player_.textTracks(),n,r;if(!i)return t;for(n=0;n<i.length;n++)r=i[n],r.kind===this.kind_&&t.push(new y["default"](this.player_,{track:r}));return t},t.prototype.createMenu=function(){for(var r,t,u,f,o,l=this,s=this.player_.textTracks()||[],n=void 0,a=this.items=[],i=0,v=s.length;v>i;i++)if(r=s[i],r.kind===this.kind_){n=r;break}if(t=this.menu,void 0===t&&(t=new k["default"](this.player_),u=e.createEl("li",{className:"vjs-menu-title",innerHTML:tt["default"](this.kind_),tabIndex:-1}),t.children_.unshift(u),e.insertElFirst(u,t.contentEl())),n&&null==n.cues&&(n.mode="hidden",f=this.player_.remoteTextTrackEls().getTrackElementByTrack_(n),f&&f.addEventListener("load",function(){return l.update()})),n&&n.cues&&n.cues.length>0){for(var h=n.cues,c=void 0,i=0,y=h.length;y>i;i++)c=h[i],o=new w["default"](this.player_,{track:n,cue:c}),a.push(o),t.addChild(o);this.addChild(t)}return this.items.length>0&&this.show(),t},t}(c["default"]));u.prototype.kind_="chapters";u.prototype.controlText_="Chapters";a["default"].registerComponent("ChaptersButton",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"../../menu/menu.js":111,"../../utils/dom.js":143,"../../utils/fn.js":145,"../../utils/to-title-case.js":152,"./chapters-track-menu-item.js":88,"./text-track-button.js":92,"./text-track-menu-item.js":93,"global/window":2}],88:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../../menu/menu-item.js"),h=r(s),c=n("../../component.js"),l=r(c),a=n("../../utils/fn.js"),v=f(a),u=function(n){function t(i,r){e(this,t);var f=r.track,u=r.cue,o=i.currentTime();r.label=u.text;r.selected=u.startTime<=o&&o<u.endTime;n.call(this,i,r);this.track=f;this.cue=u;f.addEventListener("cuechange",v.bind(this,this.update))}return o(t,n),t.prototype.handleClick=function(){n.prototype.handleClick.call(this);this.player_.currentTime(this.cue.startTime);this.update(this.cue.startTime)},t.prototype.update=function(){var n=this.cue,t=this.player_.currentTime();this.selected(n.startTime<=t&&t<n.endTime)},t}(h["default"]);l["default"].registerComponent("ChaptersTrackMenuItem",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"../../menu/menu-item.js":110,"../../utils/fn.js":145}],89:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function u(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("./text-track-button.js"),h=u(s),c=n("../../component.js"),l=u(c),a=n("../../utils/fn.js"),v=f(a),r=function(n){function t(i,r,u){var o=this,f;e(this,t);n.call(this,i,r,u);this.el_.setAttribute("aria-label","Descriptions Menu");f=i.textTracks();f&&!function(){var n=v.bind(o,o.handleTracksChange);f.addEventListener("change",n);o.on("dispose",function(){f.removeEventListener("change",n)})}()}return o(t,n),t.prototype.handleTracksChange=function(){for(var t,i=this.player().textTracks(),r=!1,n=0,u=i.length;u>n;n++)if(t=i[n],t.kind!==this.kind_&&"showing"===t.mode){r=!0;break}r?this.disable():this.enable()},t.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+n.prototype.buildCSSClass.call(this)},t}(h["default"]);r.prototype.kind_="descriptions";r.prototype.controlText_="Descriptions";l["default"].registerComponent("DescriptionsButton",r);i["default"]=r;t.exports=i["default"]},{"../../component.js":67,"../../utils/fn.js":145,"./text-track-button.js":92}],90:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("./text-track-menu-item.js"),s=r(o),h=n("../../component.js"),c=r(h),u=function(n){function t(i,r){f(this,t);r.track={kind:r.kind,player:i,label:r.kind+" off","default":!1,mode:"disabled"};r.selectable=!0;n.call(this,i,r);this.selected(!0)}return e(t,n),t.prototype.handleTracksChange=function(){for(var t,i=this.player().textTracks(),r=!0,n=0,u=i.length;u>n;n++)if(t=i[n],t.kind===this.track.kind&&"showing"===t.mode){r=!1;break}this.selected(r)},t}(s["default"]);c["default"].registerComponent("OffTextTrackMenuItem",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"./text-track-menu-item.js":93}],91:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("./text-track-button.js"),s=u(o),h=n("../../component.js"),c=u(h),r=function(n){function t(i,r,u){f(this,t);n.call(this,i,r,u);this.el_.setAttribute("aria-label","Subtitles Menu")}return e(t,n),t.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+n.prototype.buildCSSClass.call(this)},t}(s["default"]);r.prototype.kind_="subtitles";r.prototype.controlText_="Subtitles";c["default"].registerComponent("SubtitlesButton",r);i["default"]=r;t.exports=i["default"]},{"../../component.js":67,"./text-track-button.js":92}],92:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../track-button.js"),h=r(s),c=n("../../component.js"),l=r(c),a=n("../../utils/fn.js"),v=(f(a),n("./text-track-menu-item.js")),y=r(v),p=n("./off-text-track-menu-item.js"),w=r(p),u=function(n){function t(i){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];e(this,t);r.tracks=i.textTracks();n.call(this,i,r)}return o(t,n),t.prototype.createItems=function(){var n=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t,i,r;if(n.push(new w["default"](this.player_,{kind:this.kind_})),t=this.player_.textTracks(),!t)return n;for(i=0;i<t.length;i++)r=t[i],r.kind===this.kind_&&n.push(new y["default"](this.player_,{selectable:!0,track:r}));return n},t}(h["default"]);l["default"].registerComponent("TextTrackButton",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67,"../../utils/fn.js":145,"../track-button.js":98,"./off-text-track-menu-item.js":90,"./text-track-menu-item.js":93}],93:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../../menu/menu-item.js"),c=r(h),l=n("../../component.js"),a=r(l),v=n("../../utils/fn.js"),y=e(v),p=n("global/window"),u=r(p),w=n("global/document"),b=r(w),f=function(n){function t(i,r){var s=this,e,f;o(this,t);e=r.track;f=i.textTracks();r.label=e.label||e.language||"Unknown";r.selected=e["default"]||"showing"===e.mode;n.call(this,i,r);this.track=e;f&&!function(){var n=y.bind(s,s.handleTracksChange);f.addEventListener("change",n);s.on("dispose",function(){f.removeEventListener("change",n)})}();f&&void 0===f.onchange&&!function(){var n=void 0;s.on(["tap","click"],function(){if("object"!=typeof u["default"].Event)try{n=new u["default"].Event("change")}catch(t){}n||(n=b["default"].createEvent("Event"),n.initEvent("change",!0,!0));f.dispatchEvent(n)})}()}return s(t,n),t.prototype.handleClick=function(t){var f=this.track.kind,u=this.player_.textTracks(),i,r;if(n.prototype.handleClick.call(this,t),u)for(i=0;i<u.length;i++)r=u[i],r.kind===f&&(r.mode=r===this.track?"showing":"disabled")},t.prototype.handleTracksChange=function(){this.selected("showing"===this.track.mode)},t}(c["default"]);a["default"].registerComponent("TextTrackMenuItem",f);i["default"]=f;t.exports=i["default"]},{"../../component.js":67,"../../menu/menu-item.js":110,"../../utils/fn.js":145,"global/document":1,"global/window":2}],94:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../../component.js"),u=r(h),c=n("../../utils/dom.js"),l=e(c),a=n("../../utils/format-time.js"),v=r(a),f=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.on(i,"timeupdate",this.updateContent)}return s(t,n),t.prototype.createEl=function(){var t=n.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.contentEl_=l.createEl("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time <\/span>0:00'},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateContent=function(){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),i=this.localize("Current Time"),n=v["default"](t,this.player_.duration());n!==this.formattedTime_&&(this.formattedTime_=n,this.contentEl_.innerHTML='<span class="vjs-control-text">'+i+"<\/span> "+n)},t}(u["default"]);u["default"].registerComponent("CurrentTimeDisplay",f);i["default"]=f;t.exports=i["default"]},{"../../component.js":67,"../../utils/dom.js":143,"../../utils/format-time.js":146}],95:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../../component.js"),u=r(h),c=n("../../utils/dom.js"),l=e(c),a=n("../../utils/format-time.js"),v=r(a),f=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.on(i,"timeupdate",this.updateContent);this.on(i,"loadedmetadata",this.updateContent)}return s(t,n),t.prototype.createEl=function(){var t=n.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.contentEl_=l.createEl("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"<\/span> 0:00"},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateContent=function(){var n=this.player_.duration(),t,i;n&&this.duration_!==n&&(this.duration_=n,t=this.localize("Duration Time"),i=v["default"](n),this.contentEl_.innerHTML='<span class="vjs-control-text">'+t+"<\/span> "+i)},t}(u["default"]);u["default"].registerComponent("DurationDisplay",f);i["default"]=f;t.exports=i["default"]},{"../../component.js":67,"../../utils/dom.js":143,"../../utils/format-time.js":146}],96:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../../component.js"),u=r(h),c=n("../../utils/dom.js"),l=e(c),a=n("../../utils/format-time.js"),v=r(a),f=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.on(i,"timeupdate",this.updateContent)}return s(t,n),t.prototype.createEl=function(){var t=n.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.contentEl_=l.createEl("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"<\/span> -0:00"},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateContent=function(){if(this.player_.duration()){var t=this.localize("Remaining Time"),n=v["default"](this.player_.remainingTime());n!==this.formattedTime_&&(this.formattedTime_=n,this.contentEl_.innerHTML='<span class="vjs-control-text">'+t+"<\/span> -"+n)}},t}(u["default"]);u["default"].registerComponent("RemainingTimeDisplay",f);i["default"]=f;t.exports=i["default"]},{"../../component.js":67,"../../utils/dom.js":143,"../../utils/format-time.js":146}],97:[function(n,t,i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../../component.js"),r=f(s),u=function(n){function t(){e(this,t);n.apply(this,arguments)}return o(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/<\/span><\/div>"})},t}(r["default"]);r["default"].registerComponent("TimeDivider",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67}],98:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../menu/menu-button.js"),h=r(s),c=n("../component.js"),l=r(c),a=n("../utils/fn.js"),v=f(a),u=function(n){function t(i,r){var u,f;e(this,t);u=r.tracks;(n.call(this,i,r),this.items.length<=1&&this.hide(),u)&&(f=v.bind(this,this.update),u.addEventListener("removetrack",f),u.addEventListener("addtrack",f),this.player_.on("dispose",function(){u.removeEventListener("removetrack",f);u.removeEventListener("addtrack",f)}))}return o(t,n),t}(h["default"]);l["default"].registerComponent("TrackButton",u);i["default"]=u;t.exports=i["default"]},{"../component.js":67,"../menu/menu-button.js":109,"../utils/fn.js":145}],99:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function u(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../../slider/slider.js"),h=u(s),c=n("../../component.js"),l=u(c),a=n("../../utils/fn.js"),v=f(a),y=n("./volume-level.js"),r=(u(y),function(n){function t(i,r){e(this,t);n.call(this,i,r);this.on(i,"volumechange",this.updateARIAAttributes);i.ready(v.bind(this,this.updateARIAAttributes))}return o(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},t.prototype.handleMouseMove=function(n){this.checkMuted();this.player_.volume(this.calculateDistance(n))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted();this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted();this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(){var n=(100*this.player_.volume()).toFixed(2);this.el_.setAttribute("aria-valuenow",n);this.el_.setAttribute("aria-valuetext",n+"%")},t}(h["default"]));r.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};r.prototype.playerEvent="volumechange";l["default"].registerComponent("VolumeBar",r);i["default"]=r;t.exports=i["default"]},{"../../component.js":67,"../../slider/slider.js":119,"../../utils/fn.js":145,"./volume-level.js":101}],100:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../../component.js"),f=u(s),h=n("./volume-bar.js"),r=(u(h),function(n){function t(i,r){e(this,t);n.call(this,i,r);i.tech_&&i.tech_.featuresVolumeControl===!1&&this.addClass("vjs-hidden");this.on(i,"loadstart",function(){i.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})}return o(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},t}(f["default"]));r.prototype.options_={children:["volumeBar"]};f["default"].registerComponent("VolumeControl",r);i["default"]=r;t.exports=i["default"]},{"../../component.js":67,"./volume-bar.js":99}],101:[function(n,t,i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../../component.js"),r=f(s),u=function(n){function t(){e(this,t);n.apply(this,arguments)}return o(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"><\/span>'})},t}(r["default"]);r["default"].registerComponent("VolumeLevel",u);i["default"]=u;t.exports=i["default"]},{"../../component.js":67}],102:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function o(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function h(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var c=n("../utils/fn.js"),f=o(c),l=n("../component.js"),a=r(l),v=n("../popup/popup.js"),y=r(v),p=n("../popup/popup-button.js"),w=r(p),b=n("./mute-toggle.js"),e=r(b),k=n("./volume-control/volume-bar.js"),d=r(k),u=function(n){function t(i){function u(){i.tech_&&i.tech_.featuresVolumeControl===!1?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];s(this,t);void 0===r.inline&&(r.inline=!0);void 0===r.vertical&&(r.vertical=r.inline?!1:!0);r.volumeBar=r.volumeBar||{};r.volumeBar.vertical=!!r.vertical;n.call(this,i,r);this.on(i,"volumechange",this.volumeUpdate);this.on(i,"loadstart",this.volumeUpdate);u.call(this);this.on(i,"loadstart",u);this.on(this.volumeBar,["slideractive","focus"],function(){this.addClass("vjs-slider-active")});this.on(this.volumeBar,["sliderinactive","blur"],function(){this.removeClass("vjs-slider-active")});this.on(this.volumeBar,["focus"],function(){this.addClass("vjs-lock-showing")});this.on(this.volumeBar,["blur"],function(){this.removeClass("vjs-lock-showing")})}return h(t,n),t.prototype.buildCSSClass=function(){var t="";return t=this.options_.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+n.prototype.buildCSSClass.call(this)+" "+t},t.prototype.createPopup=function(){var n=new y["default"](this.player_,{contentElType:"div"}),t=new d["default"](this.player_,this.options_.volumeBar);return n.addChild(t),this.menuContent=n,this.volumeBar=t,this.attachVolumeBarEvents(),n},t.prototype.handleClick=function(){e["default"].prototype.handleClick.call(this);n.prototype.handleClick.call(this)},t.prototype.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],f.bind(this,this.handleMouseDown))},t.prototype.handleMouseDown=function(){this.on(["mousemove","touchmove"],f.bind(this.volumeBar,this.volumeBar.handleMouseMove));this.on(this.el_.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},t.prototype.handleMouseUp=function(){this.off(["mousemove","touchmove"],f.bind(this.volumeBar,this.volumeBar.handleMouseMove))},t}(w["default"]);u.prototype.volumeUpdate=e["default"].prototype.update;u.prototype.controlText_="Mute";a["default"].registerComponent("VolumeMenuButton",u);i["default"]=u;t.exports=i["default"]},{"../component.js":67,"../popup/popup-button.js":115,"../popup/popup.js":116,"../utils/fn.js":145,"./mute-toggle.js":73,"./volume-control/volume-bar.js":99}],103:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("./component"),c=r(h),l=n("./modal-dialog"),f=r(l),a=n("./utils/dom"),v=(e(a),n("./utils/merge-options")),y=r(v),u=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.on(i,"error",this.open)}return s(t,n),t.prototype.buildCSSClass=function(){return"vjs-error-display "+n.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var n=this.player().error();return n?this.localize(n.message):""},t}(f["default"]);u.prototype.options_=y["default"](f["default"].prototype.options_,{fillAlways:!0,temporary:!1,uncloseable:!0});c["default"].registerComponent("ErrorDisplay",u);i["default"]=u;t.exports=i["default"]},{"./component":67,"./modal-dialog":112,"./utils/dom":143,"./utils/merge-options":149}],104:[function(n,t,i){"use strict";function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}i.__esModule=!0;var e=n("./utils/events.js"),u=f(e),r=function(){};r.prototype.allowedEvents_={};r.prototype.on=function(n,t){var i=this.addEventListener;this.addEventListener=function(){};u.on(this,n,t);this.addEventListener=i};r.prototype.addEventListener=r.prototype.on;r.prototype.off=function(n,t){u.off(this,n,t)};r.prototype.removeEventListener=r.prototype.off;r.prototype.one=function(n,t){var i=this.addEventListener;this.addEventListener=function(){};u.one(this,n,t);this.addEventListener=i};r.prototype.trigger=function(n){var t=n.type||n;"string"==typeof n&&(n={type:t});n=u.fixEvent(n);this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](n);u.trigger(this,n)};r.prototype.dispatchEvent=r.prototype.trigger;i["default"]=r;t.exports=i["default"]},{"./utils/events.js":144}],105:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}i.__esModule=!0;var u=n("./utils/log"),f=r(u),e=function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(n.super_=t)},o=function(n){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=function(){n.apply(this,arguments)},r={},u;"object"==typeof t?("function"==typeof t.init&&(f["default"].warn("Constructor logic via init() is deprecated; please use constructor() instead."),t.constructor=t.init),t.constructor!==Object.prototype.constructor&&(i=t.constructor),r=t):"function"==typeof t&&(i=t);e(i,n);for(u in r)r.hasOwnProperty(u)&&(i.prototype[u]=r[u]);return i};i["default"]=o;t.exports=i["default"]},{"./utils/log":148}],106:[function(n,t,i){"use strict";function o(n){return n&&n.__esModule?n:{"default":n}}var r;i.__esModule=!0;for(var s=n("global/document"),h=o(s),e={},u=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],c=u[0],f=void 0,r=0;r<u.length;r++)if(u[r][1]in h["default"]){f=u[r];break}if(f)for(r=0;r<f.length;r++)e[c[r]]=f[r];i["default"]=e;t.exports=i["default"]},{"global/document":1}],107:[function(n,t,i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("./component"),r=f(s),u=function(n){function t(){e(this,t);n.apply(this,arguments)}return o(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},t}(r["default"]);r["default"].registerComponent("LoadingSpinner",u);i["default"]=u;t.exports=i["default"]},{"./component":67}],108:[function(n,t,i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}var u;i.__esModule=!0;var e=n("object.assign"),o=f(e),r=function s(n){"number"==typeof n?this.code=n:"string"==typeof n?this.message=n:"object"==typeof n&&o["default"](this,n);this.message||(this.message=s.defaultMessages[this.code]||"")};for(r.prototype.code=0,r.prototype.message="",r.prototype.status=null,r.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],r.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"Video is unavailable at this time.",5:"The media is encrypted and we do not have the keys to decrypt it."},u=0;u<r.errorTypes.length;u++)r[r.errorTypes[u]]=u,r.prototype[r.errorTypes[u]]=u;i["default"]=r;t.exports=i["default"]},{"object.assign":45}],109:[function(n,t,i){"use strict";function u(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../clickable-component.js"),c=r(h),l=n("../component.js"),a=r(l),v=n("./menu.js"),y=r(v),p=n("../utils/dom.js"),f=u(p),w=n("../utils/fn.js"),b=u(w),k=n("../utils/to-title-case.js"),d=r(k),e=function(n){function t(i){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];o(this,t);n.call(this,i,r);this.update();this.enabled_=!0;this.el_.setAttribute("aria-haspopup","true");this.el_.setAttribute("role","menuitem");this.on("keydown",this.handleSubmenuKeyPress)}return s(t,n),t.prototype.update=function(){var n=this.createMenu();this.menu&&this.removeChild(this.menu);this.menu=n;this.addChild(n);this.buttonPressed_=!1;this.el_.setAttribute("aria-expanded","false");this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},t.prototype.createMenu=function(){var n=new y["default"](this.player_),i,t;if(this.options_.title&&(i=f.createEl("li",{className:"vjs-menu-title",innerHTML:d["default"](this.options_.title),tabIndex:-1}),n.children_.unshift(i),f.insertElFirst(i,n.contentEl())),this.items=this.createItems(),this.items)for(t=0;t<this.items.length;t++)n.addItem(this.items[t]);return n},t.prototype.createItems=function(){},t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t.prototype.buildCSSClass=function(){var t="vjs-menu-button";return t+=this.options_.inline===!0?"-inline":"-popup","vjs-menu-button "+t+" "+n.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(){this.one("mouseout",b.bind(this,function(){this.menu.unlockShowing();this.el_.blur()}));this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&t.preventDefault()):38===t.which||40===t.which?this.buttonPressed_||(this.pressButton(),t.preventDefault()):n.prototype.handleKeyPress.call(this,t)},t.prototype.handleSubmenuKeyPress=function(n){(27===n.which||9===n.which)&&(this.buttonPressed_&&this.unpressButton(),9!==n.which&&n.preventDefault())},t.prototype.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.lockShowing(),this.el_.setAttribute("aria-expanded","true"),this.menu.focus())},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-expanded","false"),this.el_.focus())},t.prototype.disable=function(){return this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-expanded","false"),this.enabled_=!1,n.prototype.disable.call(this)},t.prototype.enable=function(){return this.enabled_=!0,n.prototype.enable.call(this)},t}(c["default"]);a["default"].registerComponent("MenuButton",e);i["default"]=e;t.exports=i["default"]},{"../clickable-component.js":65,"../component.js":67,"../utils/dom.js":143,"../utils/fn.js":145,"../utils/to-title-case.js":152,"./menu.js":111}],110:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("../clickable-component.js"),s=r(o),h=n("../component.js"),c=r(h),l=n("object.assign"),a=r(l),u=function(n){function t(i,r){f(this,t);n.call(this,i,r);this.selectable=r.selectable;this.selected(r.selected);this.selectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitem")}return e(t,n),t.prototype.createEl=function(t,i,r){return n.prototype.createEl.call(this,"li",a["default"]({className:"vjs-menu-item",innerHTML:this.localize(this.options_.label),tabIndex:-1},i),r)},t.prototype.handleClick=function(){this.selected(!0)},t.prototype.selected=function(n){this.selectable&&(n?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(" ")))},t}(s["default"]);c["default"].registerComponent("MenuItem",u);i["default"]=u;t.exports=i["default"]},{"../clickable-component.js":65,"../component.js":67,"object.assign":45}],111:[function(n,t,i){"use strict";function r(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function e(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../component.js"),u=e(h),c=n("../utils/dom.js"),l=r(c),a=n("../utils/fn.js"),v=r(a),y=n("../utils/events.js"),p=r(y),f=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.focusedChild_=-1;this.on("keydown",this.handleKeyPress)}return s(t,n),t.prototype.addItem=function(n){this.addChild(n);n.on("click",v.bind(this,function(){this.unlockShowing()}))},t.prototype.createEl=function(){var i=this.options_.contentElType||"ul",t;return this.contentEl_=l.createEl(i,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu"),t=n.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"}),t.setAttribute("role","presentation"),t.appendChild(this.contentEl_),p.on(t,"click",function(n){n.preventDefault();n.stopImmediatePropagation()}),t},t.prototype.handleKeyPress=function(n){37===n.which||40===n.which?(n.preventDefault(),this.stepForward()):(38===n.which||39===n.which)&&(n.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var n=0;void 0!==this.focusedChild_&&(n=this.focusedChild_+1);this.focus(n)},t.prototype.stepBack=function(){var n=0;void 0!==this.focusedChild_&&(n=this.focusedChild_-1);this.focus(n)},t.prototype.focus=function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],n=this.children().slice(),i=n.length&&n[0].className&&/vjs-menu-title/.test(n[0].className);i&&n.shift();n.length>0&&(0>t?t=0:t>=n.length&&(t=n.length-1),this.focusedChild_=t,n[t].el_.focus())},t}(u["default"]);u["default"].registerComponent("Menu",f);i["default"]=f;t.exports=i["default"]},{"../component.js":67,"../utils/dom.js":143,"../utils/events.js":144,"../utils/fn.js":145}],112:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function o(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function c(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function l(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var a=n("./utils/dom"),r=o(a),v=n("./utils/fn"),s=o(v),y=n("./utils/log"),p=(u(y),n("./component")),h=u(p),w=n("./close-button"),f=(u(w),"vjs-modal-dialog"),b=27,e=function(n){function t(i,u){c(this,t);n.call(this,i,u);this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1;this.closeable(!this.options_.uncloseable);this.content(this.options_.content);this.contentEl_=r.createEl("div",{className:f+"-content"},{role:"document"});this.descEl_=r.createEl("p",{className:f+"-description vjs-offscreen",id:this.el().getAttribute("aria-describedby")});r.textContent(this.descEl_,this.description());this.el_.appendChild(this.descEl_);this.el_.appendChild(this.contentEl_)}return l(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},t.prototype.buildCSSClass=function(){return f+" vjs-hidden "+n.prototype.buildCSSClass.call(this)},t.prototype.handleKeyPress=function(n){n.which===b&&this.closeable()&&this.close()},t.prototype.label=function(){return this.options_.label||this.localize("Modal Window")},t.prototype.description=function(){var n=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(n+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),n},t.prototype.open=function(){if(!this.opened_){var n=this.player();this.trigger("beforemodalopen");this.opened_=!0;(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill();this.wasPlaying_=!n.paused();this.wasPlaying_&&n.pause();this.closeable()&&this.on(this.el_.ownerDocument,"keydown",s.bind(this,this.handleKeyPress));n.controls(!1);this.show();this.el().setAttribute("aria-hidden","false");this.trigger("modalopen");this.hasBeenOpened_=!0}return this},t.prototype.opened=function(n){return"boolean"==typeof n&&this[n?"open":"close"](),this.opened_},t.prototype.close=function(){if(this.opened_){var n=this.player();this.trigger("beforemodalclose");this.opened_=!1;this.wasPlaying_&&n.play();this.closeable()&&this.off(this.el_.ownerDocument,"keydown",s.bind(this,this.handleKeyPress));n.controls(!0);this.hide();this.el().setAttribute("aria-hidden","true");this.trigger("modalclose");this.options_.temporary&&this.dispose()}return this},t.prototype.closeable=function(n){var i,t,r;return"boolean"==typeof n&&(i=this.closeable_=!!n,t=this.getChild("closeButton"),i&&!t&&(r=this.contentEl_,this.contentEl_=this.el_,t=this.addChild("closeButton"),this.contentEl_=r,this.on(t,"close",this.close)),!i&&t&&(this.off(t,"close",this.close),this.removeChild(t),t.dispose())),this.closeable_},t.prototype.fill=function(){return this.fillWith(this.content())},t.prototype.fillWith=function(n){var t=this.contentEl(),i=t.parentNode,u=t.nextSibling;return this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),r.insertContent(t,n),this.trigger("modalfill"),u?i.insertBefore(t,u):i.appendChild(t),this},t.prototype.empty=function(){return this.trigger("beforemodalempty"),r.emptyEl(this.contentEl()),this.trigger("modalempty"),this},t.prototype.content=function(n){return"undefined"!=typeof n&&(this.content_=n),this.content_},t}(h["default"]);e.prototype.options_={temporary:!0};h["default"].registerComponent("ModalDialog",e);i["default"]=e;t.exports=i["default"]},{"./close-button":66,"./component":67,"./utils/dom":143,"./utils/fn":145,"./utils/log":148}],113:[function(n,t,i){"use strict";function s(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function tt(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function it(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var l;i.__esModule=!0;var rt=n("./component.js"),h=r(rt),ut=n("global/document"),u=r(ut),ft=n("global/window"),a=r(ft),et=n("./utils/events.js"),v=s(et),ot=n("./utils/dom.js"),e=s(ot),st=n("./utils/fn.js"),y=s(st),ht=n("./utils/guid.js"),ct=s(ht),lt=n("./utils/browser.js"),at=s(lt),vt=n("./utils/log.js"),o=r(vt),yt=n("./utils/to-title-case.js"),b=r(yt),pt=n("./utils/time-ranges.js"),wt=n("./utils/buffer.js"),bt=n("./utils/stylesheet.js"),d=s(bt),kt=n("./fullscreen-api.js"),g=r(kt),dt=n("./media-error.js"),k=r(dt),gt=n("safe-json-parse/tuple"),ni=r(gt),ti=n("object.assign"),p=r(ti),ii=n("./utils/merge-options.js"),w=r(ii),ri=n("./tracks/text-track-list-converter.js"),nt=r(ri),ui=n("./tracks/audio-track-list.js"),fi=r(ui),ei=n("./tracks/video-track-list.js"),oi=r(ei),si=n("./tech/loader.js"),hi=(r(si),n("./poster-image.js")),ci=(r(hi),n("./tracks/text-track-display.js")),li=(r(ci),n("./loading-spinner.js")),ai=(r(li),n("./big-play-button.js")),vi=(r(ai),n("./control-bar/control-bar.js")),yi=(r(vi),n("./error-display.js")),pi=(r(yi),n("./tracks/text-track-settings.js")),wi=(r(pi),n("./modal-dialog")),bi=r(wi),ki=n("./tech/tech.js"),c=r(ki),di=n("./tech/html5.js"),f=(r(di),function(n){function t(i,r,u){var f=this,s;if(tt(this,t),i.id=i.id||"vjs_video_"+ct.newGUID(),r=p["default"](t.getTagSettings(i),r),r.initChildren=!1,r.createEl=!1,r.reportTouchActivity=!1,n.call(this,null,r,u),!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");this.tag=i;this.tagAttributes=i&&e.getElAttributes(i);this.language(this.options_.language);r.languages?!function(){var n={};Object.getOwnPropertyNames(r.languages).forEach(function(t){n[t.toLowerCase()]=r.languages[t]});f.languages_=n}():this.languages_=t.prototype.options_.languages;this.cache_={};this.poster_=r.poster||"";this.controls_=!!r.controls;i.controls=!1;this.scrubbing_=!1;this.el_=this.createEl();s=w["default"](this.options_);r.plugins&&!function(){var n=r.plugins;Object.getOwnPropertyNames(n).forEach(function(t){"function"==typeof this[t]?this[t](n[t]):o["default"].error("Unable to find plugin:",t)},f)}();this.options_.playerOptions=s;this.initChildren();this.isAudio("audio"===i.nodeName.toLowerCase());this.addClass(this.controls()?"vjs-controls-enabled":"vjs-controls-disabled");this.el_.setAttribute("role","region");this.isAudio()?this.el_.setAttribute("aria-label","audio player"):this.el_.setAttribute("aria-label","video player");this.isAudio()&&this.addClass("vjs-audio");this.flexNotSupported_()&&this.addClass("vjs-no-flex");at.IS_IOS||this.addClass("vjs-workinghover");t.players[this.id_]=this;this.userActive(!0);this.reportUserActivity();this.listenForUserActivity_();this.on("fullscreenchange",this.handleFullscreenChange_);this.on("stageclick",this.handleStageClick_)}return it(t,n),t.prototype.dispose=function(){this.trigger("dispose");this.off("dispose");this.styleEl_&&this.styleEl_.parentNode&&this.styleEl_.parentNode.removeChild(this.styleEl_);t.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();n.prototype.dispose.call(this)},t.prototype.createEl=function(){var i=this.el_=n.prototype.createEl.call(this,"div"),t=this.tag,r,f,o,s,u,h;for(t.removeAttribute("width"),t.removeAttribute("height"),r=e.getElAttributes(t),(Object.getOwnPropertyNames(r).forEach(function(n){"class"===n?i.className=r[n]:i.setAttribute(n,r[n])}),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=i.player=this,this.addClass("vjs-paused"),a["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0)&&(this.styleEl_=d.createStyleElement("vjs-styles-dimensions"),f=e.$(".vjs-styles-defaults"),o=e.$("head"),o.insertBefore(this.styleEl_,f?f.nextSibling:o.firstChild)),this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),s=t.getElementsByTagName("a"),u=0;u<s.length;u++)h=s.item(u),e.addElClass(h,"vjs-hidden"),h.setAttribute("hidden","hidden");return t.initNetworkState_=t.networkState,t.parentNode&&t.parentNode.insertBefore(i,t),e.insertElFirst(t,i),this.children_.unshift(t),this.el_=i,i},t.prototype.width=function(n){return this.dimension("width",n)},t.prototype.height=function(n){return this.dimension("height",n)},t.prototype.dimension=function(n,t){var i=n+"_",r;if(void 0===t)return this[i]||0;if(""===t)this[i]=void 0;else{if(r=parseFloat(t),isNaN(r))return o["default"].error('Improper value "'+t+'" supplied for for '+n),this;this[i]=r}return this.updateStyleEl_(),this},t.prototype.fluid=function(n){return void 0===n?!!this.fluid_:(this.fluid_=!!n,void(n?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid")))},t.prototype.aspectRatio=function(n){if(void 0===n)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(n))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=n;this.fluid(!0);this.updateStyleEl_()},t.prototype.updateStyleEl_=function(){var u,t;if(a["default"].VIDEOJS_NO_DYNAMIC_STYLE===!0){var f="number"==typeof this.width_?this.width_:this.options_.width,e="number"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(f>=0&&(i.width=f),e>=0&&(i.height=e)))}var r=void 0,o=void 0,s=void 0,n=void 0;s=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9";u=s.split(":");t=u[1]/u[0];r=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/t:this.videoWidth()||300;o=void 0!==this.height_?this.height_:r*t;n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions";this.addClass(n);d.setTextContent(this.styleEl_,"\n      ."+n+" {\n        width: "+r+"px;\n        height: "+o+"px;\n      }\n\n      ."+n+".vjs-fluid {\n        padding-top: "+100*t+"%;\n      }\n    ")},t.prototype.loadTech_=function(n,t){var i,r;this.tech_&&this.unloadTech_();"Html5"!==n&&this.tag&&(c["default"].getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null);this.techName_=n;this.isReady_=!1;i=p["default"]({nativeControlsForTouch:this.options_.nativeControlsForTouch,source:t,playerId:this.id(),techId:this.id()+"_"+n+"_api",videoTracks:this.videoTracks_,textTracks:this.textTracks_,audioTracks:this.audioTracks_,autoplay:this.options_.autoplay,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),"vtt.js":this.options_["vtt.js"]},this.options_[n.toLowerCase()]);this.tag&&(i.tag=this.tag);t&&(this.currentType_=t.type,t.src===this.cache_.src&&this.cache_.currentTime>0&&(i.startTime=this.cache_.currentTime),this.cache_.src=t.src);r=c["default"].getTech(n);r||(r=h["default"].getComponent(n));this.tech_=new r(i);this.tech_.ready(y.bind(this,this.handleTechReady_),!0);nt["default"].jsonToTextTracks(this.textTracksJson_||[],this.tech_);this.on(this.tech_,"loadstart",this.handleTechLoadStart_);this.on(this.tech_,"waiting",this.handleTechWaiting_);this.on(this.tech_,"canplay",this.handleTechCanPlay_);this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_);this.on(this.tech_,"playing",this.handleTechPlaying_);this.on(this.tech_,"ended",this.handleTechEnded_);this.on(this.tech_,"seeking",this.handleTechSeeking_);this.on(this.tech_,"seeked",this.handleTechSeeked_);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_,"progress",this.handleTechProgress_);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_,"suspend",this.handleTechSuspend_);this.on(this.tech_,"abort",this.handleTechAbort_);this.on(this.tech_,"emptied",this.handleTechEmptied_);this.on(this.tech_,"stalled",this.handleTechStalled_);this.on(this.tech_,"loadedmetadata",this.handleTechLoadedMetaData_);this.on(this.tech_,"loadeddata",this.handleTechLoadedData_);this.on(this.tech_,"timeupdate",this.handleTechTimeUpdate_);this.on(this.tech_,"ratechange",this.handleTechRateChange_);this.on(this.tech_,"volumechange",this.handleTechVolumeChange_);this.on(this.tech_,"texttrackchange",this.handleTechTextTrackChange_);this.on(this.tech_,"loadedmetadata",this.updateStyleEl_);this.on(this.tech_,"posterchange",this.handleTechPosterChange_);this.usingNativeControls(this.techGet_("controls"));this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_();this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||e.insertElFirst(this.tech_.el(),this.el());this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){this.videoTracks_=this.videoTracks();this.textTracks_=this.textTracks();this.audioTracks_=this.audioTracks();this.textTracksJson_=nt["default"].textTracksToJson(this.tech_);this.isReady_=!1;this.tech_.dispose();this.tech_=!1},t.prototype.tech=function(n){if(n&&n.IWillNotUseThisInPlugins)return this.tech_;var t="\n      Please make sure that you are not using this inside of a plugin.\n      To disable this alert and error, please pass in an object with\n      `IWillNotUseThisInPlugins` to the `tech` method. See\n      https://github.com/videojs/video.js/issues/2617 for more info.\n    ";throw a["default"].alert(t),new Error(t);},t.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_)},t.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_)},t.prototype.handleTechReady_=function(){this.triggerReady();this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume);this.handleTechPosterChange_();this.handleTechDurationChange_();this.src()&&this.tag&&this.options_.autoplay&&this.paused()&&(delete this.tag.poster,this.play())},t.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended");this.error(null);this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},t.prototype.hasStarted=function(n){return void 0!==n?(this.hasStarted_!==n&&(this.hasStarted_=n,n?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.hasStarted_},t.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended");this.removeClass("vjs-paused");this.addClass("vjs-playing");this.hasStarted(!0);this.trigger("play")},t.prototype.handleTechWaiting_=function(){var n=this;this.addClass("vjs-waiting");this.trigger("waiting");this.one("timeupdate",function(){return n.removeClass("vjs-waiting")})},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting");this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting");this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting");this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking");this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking");this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&this.currentTime(this.options_.starttime);this.addClass("vjs-has-started");this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.trigger("pause")},t.prototype.handleTechProgress_=function(){this.trigger("progress")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended");this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause();this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(n){0===n.button&&this.controls()&&(this.paused()?this.play():this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(n){n.preventDefault()},t.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.handleTechFullscreenChange_=function(n,t){t&&this.isFullscreen(t.isFullscreen);this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var n=this.tech_.error();this.error(n&&n.code)},t.prototype.handleTechSuspend_=function(){this.trigger("suspend")},t.prototype.handleTechAbort_=function(){this.trigger("abort")},t.prototype.handleTechEmptied_=function(){this.trigger("emptied")},t.prototype.handleTechStalled_=function(){this.trigger("stalled")},t.prototype.handleTechLoadedMetaData_=function(){this.trigger("loadedmetadata")},t.prototype.handleTechLoadedData_=function(){this.trigger("loadeddata")},t.prototype.handleTechTimeUpdate_=function(){this.trigger("timeupdate")},t.prototype.handleTechRateChange_=function(){this.trigger("ratechange")},t.prototype.handleTechVolumeChange_=function(){this.trigger("volumechange")},t.prototype.handleTechTextTrackChange_=function(){this.trigger("texttrackchange")},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(n,t){if(this.tech_&&!this.tech_.isReady_)this.tech_.ready(function(){this[n](t)},!0);else try{this.tech_[n](t)}catch(i){throw o["default"](i),i;}},t.prototype.techGet_=function(n){if(this.tech_&&this.tech_.isReady_)try{return this.tech_[n]()}catch(t){throw void 0===this.tech_[n]?o["default"]("Video.js: "+n+" method not defined for "+this.techName_+" playback technology.",t):"TypeError"===t.name?(o["default"]("Video.js: "+n+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1):o["default"](t),t;}},t.prototype.play=function(){return this.techCall_("play"),this},t.prototype.pause=function(){return this.techCall_("pause"),this},t.prototype.paused=function(){return this.techGet_("paused")===!1?!1:!0},t.prototype.scrubbing=function(n){return void 0!==n?(this.scrubbing_=!!n,n?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.scrubbing_},t.prototype.currentTime=function(n){return void 0!==n?(this.techCall_("setCurrentTime",n),this):this.cache_.currentTime=this.techGet_("currentTime")||0},t.prototype.duration=function(n){return void 0===n?this.cache_.duration||0:(n=parseFloat(n)||0,0>n&&(n=1/0),n!==this.cache_.duration&&(this.cache_.duration=n,n===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.buffered=function(){var n=this.techGet_("buffered");return n&&n.length||(n=pt.createTimeRange(0,0)),n},t.prototype.bufferedPercent=function(){return wt.bufferedPercent(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var t=this.buffered(),i=this.duration(),n=t.end(t.length-1);return n>i&&(n=i),n},t.prototype.volume=function(n){var t=void 0;return void 0!==n?(t=Math.max(0,Math.min(1,parseFloat(n))),this.cache_.volume=t,this.techCall_("setVolume",t),this):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(n){return void 0!==n?(this.techCall_("setMuted",n),this):this.techGet_("muted")||!1},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(n){return void 0!==n?(this.isFullscreen_=!!n,this):!!this.isFullscreen_},t.prototype.requestFullscreen=function(){var n=g["default"];return this.isFullscreen(!0),n.requestFullscreen?(v.on(u["default"],n.fullscreenchange,y.bind(this,function t(){this.isFullscreen(u["default"][n.fullscreenElement]);this.isFullscreen()===!1&&v.off(u["default"],n.fullscreenchange,t);this.trigger("fullscreenchange")})),this.el_[n.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},t.prototype.exitFullscreen=function(){var n=g["default"];return this.isFullscreen(!1),n.requestFullscreen?u["default"][n.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},t.prototype.enterFullWindow=function(){this.isFullWindow=!0;this.docOrigOverflow=u["default"].documentElement.style.overflow;v.on(u["default"],"keydown",y.bind(this,this.fullWindowOnEscKey));u["default"].documentElement.style.overflow="hidden";e.addElClass(u["default"].body,"vjs-full-window");this.trigger("enterFullWindow")},t.prototype.fullWindowOnEscKey=function(n){27===n.keyCode&&(this.isFullscreen()===!0?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1;v.off(u["default"],"keydown",this.fullWindowOnEscKey);u["default"].documentElement.style.overflow=this.docOrigOverflow;e.removeElClass(u["default"].body,"vjs-full-window");this.trigger("exitFullWindow")},t.prototype.canPlayType=function(n){for(var i,t,u=void 0,r=0,f=this.options_.techOrder;r<f.length;r++)if(i=b["default"](f[r]),t=c["default"].getTech(i),t||(t=h["default"].getComponent(i)),t){if(t.isSupported()&&(u=t.canPlayType(n)))return u}else o["default"].error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.');return""},t.prototype.selectSource=function(n){var t=this.options_.techOrder.map(b["default"]).map(function(n){return[n,c["default"].getTech(n)||h["default"].getComponent(n)]}).filter(function(n){var i=n[0],t=n[1];return t?t.isSupported():(o["default"].error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),i=function(n,t,i){var r=void 0;return n.some(function(n){return t.some(function(t){return r=i(n,t),r?!0:void 0})}),r},r=void 0,f=function(n){return function(t,i){return n(i,t)}},u=function(n,t){var i=n[0],r=n[1];if(r.canPlaySource(t))return{source:t,tech:i}};return r=this.options_.sourceOrder?i(n,t,f(u)):i(t,n,u),r||!1},t.prototype.src=function(n){if(void 0===n)return this.techGet_("src");var t=c["default"].getTech(this.techName_);return t||(t=h["default"].getComponent(this.techName_)),Array.isArray(n)?this.sourceList_(n):"string"==typeof n?this.src({src:n}):n instanceof Object&&(n.type&&!t.canPlaySource(n)?this.sourceList_([n]):(this.cache_.src=n.src,this.currentType_=n.type||"",this.ready(function(){t.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",n):this.techCall_("src",n.src);"auto"===this.options_.preload&&this.load();this.options_.autoplay&&this.play()},!0))),this},t.prototype.sourceList_=function(n){var t=this.selectSource(n);t?t.tech===this.techName_?this.src(t.source):this.loadTech_(t.tech,t.source):(this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),this.triggerReady())},t.prototype.load=function(){return this.techCall_("load"),this},t.prototype.reset=function(){return this.loadTech_(b["default"](this.options_.techOrder[0]),null),this.techCall_("reset"),this},t.prototype.currentSrc=function(){return this.techGet_("currentSrc")||this.cache_.src||""},t.prototype.currentType=function(){return this.currentType_||""},t.prototype.preload=function(n){return void 0!==n?(this.techCall_("setPreload",n),this.options_.preload=n,this):this.techGet_("preload")},t.prototype.autoplay=function(n){return void 0!==n?(this.techCall_("setAutoplay",n),this.options_.autoplay=n,this):this.techGet_("autoplay",n)},t.prototype.loop=function(n){return void 0!==n?(this.techCall_("setLoop",n),this.options_.loop=n,this):this.techGet_("loop")},t.prototype.poster=function(n){return void 0===n?this.poster_:(n||(n=""),this.poster_=n,this.techCall_("setPoster",n),this.trigger("posterchange"),this)},t.prototype.handleTechPosterChange_=function(){!this.poster_&&this.tech_&&this.tech_.poster&&(this.poster_=this.tech_.poster()||"",this.trigger("posterchange"))},t.prototype.controls=function(n){return void 0!==n?(n=!!n,this.controls_!==n&&(this.controls_=n,this.usingNativeControls()&&this.techCall_("setControls",n),n?(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_())),this):!!this.controls_},t.prototype.usingNativeControls=function(n){return void 0!==n?(n=!!n,this.usingNativeControls_!==n&&(this.usingNativeControls_=n,n?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.usingNativeControls_},t.prototype.error=function(n){return void 0===n?this.error_||null:null===n?(this.error_=n,this.removeClass("vjs-error"),this.errorDisplay.close(),this):(this.error_=n instanceof k["default"]?n:new k["default"](n),this.addClass("vjs-error"),o["default"].error("(CODE:"+this.error_.code+" "+k["default"].errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),this)},t.prototype.ended=function(){return this.techGet_("ended")},t.prototype.seeking=function(){return this.techGet_("seeking")},t.prototype.seekable=function(){return this.techGet_("seekable")},t.prototype.reportUserActivity=function(){this.userActivity_=!0},t.prototype.userActive=function(n){return void 0!==n?(n=!!n,n!==this.userActive_&&(this.userActive_=n,n?(this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.userActivity_=!1,this.tech_&&this.tech_.one("mousemove",function(n){n.stopPropagation();n.preventDefault()}),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.userActive_},t.prototype.listenForUserActivity_=function(){var t=void 0,r=void 0,u=void 0,n=y.bind(this,this.reportUserActivity),f=function(t){(t.screenX!==r||t.screenY!==u)&&(r=t.screenX,u=t.screenY,n())},e=function(){n();this.clearInterval(t);t=this.setInterval(n,250)},o=function(){n();this.clearInterval(t)},i;this.on("mousedown",e);this.on("mousemove",f);this.on("mouseup",o);this.on("keydown",n);this.on("keyup",n);i=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1;this.userActive(!0);this.clearTimeout(i);var n=this.options_.inactivityTimeout;n>0&&(i=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},n))}},250)},t.prototype.playbackRate=function(n){return void 0!==n?(this.techCall_("setPlaybackRate",n),this):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},t.prototype.isAudio=function(n){return void 0!==n?(this.isAudio_=!!n,this):!!this.isAudio_},t.prototype.networkState=function(){return this.techGet_("networkState")},t.prototype.readyState=function(){return this.techGet_("readyState")},t.prototype.videoTracks=function(){return this.tech_?this.tech_.videoTracks():(this.videoTracks_=this.videoTracks_||new oi["default"],this.videoTracks_)},t.prototype.audioTracks=function(){return this.tech_?this.tech_.audioTracks():(this.audioTracks_=this.audioTracks_||new fi["default"],this.audioTracks_)},t.prototype.textTracks=function(){return this.tech_&&this.tech_.textTracks()},t.prototype.remoteTextTracks=function(){return this.tech_&&this.tech_.remoteTextTracks()},t.prototype.remoteTextTrackEls=function(){return this.tech_&&this.tech_.remoteTextTrackEls()},t.prototype.addTextTrack=function(n,t,i){return this.tech_&&this.tech_.addTextTrack(n,t,i)},t.prototype.addRemoteTextTrack=function(n){return this.tech_&&this.tech_.addRemoteTextTrack(n)},t.prototype.removeRemoteTextTrack=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=t.track,i=void 0===n?arguments[0]:n;this.tech_&&this.tech_.removeRemoteTextTrack(i)},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(n){return void 0===n?this.language_:(this.language_=(""+n).toLowerCase(),this)},t.prototype.languages=function(){return w["default"](t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var i=w["default"](this.options_),r=i.tracks,n,t;for(i.tracks=[],n=0;n<r.length;n++)t=r[n],t=w["default"](t),t.player=void 0,i.tracks[n]=t;return i},t.prototype.createModal=function(n,t){var r=this,i;return t=t||{},t.content=n||"",i=new bi["default"](r,t),r.addChild(i),i.on("dispose",function(){r.removeChild(i)}),i.open()},t.getTagSettings=function(n){var t={sources:[],tracks:[]},r=e.getElAttributes(n),s=r["data-setup"],i,f;if(null!==s){var h=ni["default"](s||"{}"),c=h[0],a=h[1];c&&o["default"].error(c);p["default"](r,a)}if(p["default"](t,r),n.hasChildNodes())for(var l=n.childNodes,u=0,v=l.length;v>u;u++)i=l[u],f=i.nodeName.toLowerCase(),"source"===f?t.sources.push(e.getElAttributes(i)):"track"===f&&t.tracks.push(e.getElAttributes(i));return t},t}(h["default"]));f.players={};l=a["default"].navigator;f.prototype.options_={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:u["default"].getElementsByTagName("html")[0].getAttribute("lang")||l.languages&&l.languages[0]||l.userLanguage||l.language||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."};f.prototype.handleLoadedMetaData_;f.prototype.handleLoadedData_;f.prototype.handleUserActive_;f.prototype.handleUserInactive_;f.prototype.handleTimeUpdate_;f.prototype.handleTechEnded_;f.prototype.handleVolumeChange_;f.prototype.handleError_;f.prototype.flexNotSupported_=function(){var n=u["default"].createElement("i");return!("flexBasis"in n.style||"webkitFlexBasis"in n.style||"mozFlexBasis"in n.style||"msFlexBasis"in n.style||"msFlexOrder"in n.style)};h["default"].registerComponent("Player",f);i["default"]=f;t.exports=i["default"]},{"./big-play-button.js":63,"./component.js":67,"./control-bar/control-bar.js":70,"./error-display.js":103,"./fullscreen-api.js":106,"./loading-spinner.js":107,"./media-error.js":108,"./modal-dialog":112,"./poster-image.js":117,"./tech/html5.js":122,"./tech/loader.js":123,"./tech/tech.js":124,"./tracks/audio-track-list.js":125,"./tracks/text-track-display.js":130,"./tracks/text-track-list-converter.js":131,"./tracks/text-track-settings.js":133,"./tracks/video-track-list.js":138,"./utils/browser.js":140,"./utils/buffer.js":141,"./utils/dom.js":143,"./utils/events.js":144,"./utils/fn.js":145,"./utils/guid.js":147,"./utils/log.js":148,"./utils/merge-options.js":149,"./utils/stylesheet.js":150,"./utils/time-ranges.js":151,"./utils/to-title-case.js":152,"global/document":1,"global/window":2,"object.assign":45,"safe-json-parse/tuple":54}],114:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}i.__esModule=!0;var u=n("./player.js"),f=r(u),e=function(n,t){f["default"].prototype[n]=t};i["default"]=e;t.exports=i["default"]},{"./player.js":113}],115:[function(n,t,i){"use strict";function u(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../clickable-component.js"),h=r(s),c=n("../component.js"),l=r(c),a=n("./popup.js"),v=(r(a),n("../utils/dom.js")),y=(u(v),n("../utils/fn.js")),p=(u(y),n("../utils/to-title-case.js")),f=(r(p),function(n){function t(i){var r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];e(this,t);n.call(this,i,r);this.update()}return o(t,n),t.prototype.update=function(){var n=this.createPopup();this.popup&&this.removeChild(this.popup);this.popup=n;this.addChild(n);this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},t.prototype.createPopup=function(){},t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t.prototype.buildCSSClass=function(){var t="vjs-menu-button";return t+=this.options_.inline===!0?"-inline":"-popup","vjs-menu-button "+t+" "+n.prototype.buildCSSClass.call(this)},t}(h["default"]));l["default"].registerComponent("PopupButton",f);i["default"]=f;t.exports=i["default"]},{"../clickable-component.js":65,"../component.js":67,"../utils/dom.js":143,"../utils/fn.js":145,"../utils/to-title-case.js":152,"./popup.js":116}],116:[function(n,t,i){"use strict";function r(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function e(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("../component.js"),u=e(h),c=n("../utils/dom.js"),l=r(c),a=n("../utils/fn.js"),v=r(a),y=n("../utils/events.js"),p=r(y),f=function(n){function t(){o(this,t);n.apply(this,arguments)}return s(t,n),t.prototype.addItem=function(n){this.addChild(n);n.on("click",v.bind(this,function(){this.unlockShowing()}))},t.prototype.createEl=function(){var i=this.options_.contentElType||"ul",t;return this.contentEl_=l.createEl(i,{className:"vjs-menu-content"}),t=n.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"}),t.appendChild(this.contentEl_),p.on(t,"click",function(n){n.preventDefault();n.stopImmediatePropagation()}),t},t}(u["default"]);u["default"].registerComponent("Popup",f);i["default"]=f;t.exports=i["default"]},{"../component.js":67,"../utils/dom.js":143,"../utils/events.js":144,"../utils/fn.js":145}],117:[function(n,t,i){"use strict";function r(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function u(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("./clickable-component.js"),c=u(h),l=n("./component.js"),a=u(l),v=n("./utils/fn.js"),y=r(v),p=n("./utils/dom.js"),f=r(p),w=n("./utils/browser.js"),b=r(w),e=function(n){function t(i,r){o(this,t);n.call(this,i,r);this.update();i.on("posterchange",y.bind(this,this.update))}return s(t,n),t.prototype.dispose=function(){this.player().off("posterchange",this.update);n.prototype.dispose.call(this)},t.prototype.createEl=function(){var n=f.createEl("div",{className:"vjs-poster",tabIndex:-1});return b.BACKGROUND_SIZE_SUPPORTED||(this.fallbackImg_=f.createEl("img"),n.appendChild(this.fallbackImg_)),n},t.prototype.update=function(){var n=this.player().poster();this.setSrc(n);n?this.show():this.hide()},t.prototype.setSrc=function(n){if(this.fallbackImg_)this.fallbackImg_.src=n;else{var t="";n&&(t='url("'+n+'")');this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},t}(c["default"]);a["default"].registerComponent("PosterImage",e);i["default"]=e;t.exports=i["default"]},{"./clickable-component.js":65,"./component.js":67,"./utils/browser.js":140,"./utils/dom.js":143,"./utils/fn.js":145}],118:[function(n,t,i){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}function c(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}var h;i.__esModule=!0;var l=n("./utils/events.js"),a=c(l),v=n("global/document"),u=e(v),y=n("global/window"),p=e(y),r=!1,o=void 0,s=function(){var s=u["default"].getElementsByTagName("video"),h=u["default"].getElementsByTagName("audio"),i=[],n,t,e,c;if(s&&s.length>0)for(n=0,t=s.length;t>n;n++)i.push(s[n]);if(h&&h.length>0)for(n=0,t=h.length;t>n;n++)i.push(h[n]);if(i&&i.length>0)for(n=0,t=i.length;t>n;n++){if(e=i[n],!e||!e.getAttribute){f(1);break}void 0===e.player&&(c=e.getAttribute("data-setup"),null!==c&&o(e))}else r||f(1)},f=function(n,t){t&&(o=t);setTimeout(s,n)};"complete"===u["default"].readyState?r=!0:a.one(p["default"],"load",function(){r=!0});h=function(){return r};i.autoSetup=s;i.autoSetupTimeout=f;i.hasLoaded=h},{"./utils/events.js":144,"global/document":1,"global/window":2}],119:[function(n,t,i){"use strict";function s(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function u(n){return n&&n.__esModule?n:{"default":n}}function h(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var l=n("../component.js"),f=u(l),a=n("../utils/dom.js"),r=s(a),v=n("object.assign"),e=u(v),o=function(n){function t(i,r){h(this,t);n.call(this,i,r);this.bar=this.getChild(this.options_.barName);this.vertical(!!this.options_.vertical);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(i,"controlsvisible",this.update);this.on(i,this.playerEvent,this.update)}return c(t,n),t.prototype.createEl=function(t){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return i.className=i.className+" vjs-slider",i=e["default"]({tabIndex:0},i),r=e["default"]({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},r),n.prototype.createEl.call(this,t,i,r)},t.prototype.handleMouseDown=function(n){var t=this.bar.el_.ownerDocument;n.preventDefault();r.blockTextSelection();this.addClass("vjs-sliding");this.trigger("slideractive");this.on(t,"mousemove",this.handleMouseMove);this.on(t,"mouseup",this.handleMouseUp);this.on(t,"touchmove",this.handleMouseMove);this.on(t,"touchend",this.handleMouseUp);this.handleMouseMove(n)},t.prototype.handleMouseMove=function(){},t.prototype.handleMouseUp=function(){var n=this.bar.el_.ownerDocument;r.unblockTextSelection();this.removeClass("vjs-sliding");this.trigger("sliderinactive");this.off(n,"mousemove",this.handleMouseMove);this.off(n,"mouseup",this.handleMouseUp);this.off(n,"touchmove",this.handleMouseMove);this.off(n,"touchend",this.handleMouseUp);this.update()},t.prototype.update=function(){var n,t,i;this.el_&&(n=this.getPercent(),t=this.bar,t&&(("number"!=typeof n||n!==n||0>n||n===1/0)&&(n=0),i=(100*n).toFixed(2)+"%",this.vertical()?t.el().style.height=i:t.el().style.width=i))},t.prototype.calculateDistance=function(n){var t=r.getPointerPosition(this.el_,n);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(n){37===n.which||40===n.which?(n.preventDefault(),this.stepBack()):(38===n.which||39===n.which)&&(n.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(n){n.stopImmediatePropagation();n.preventDefault()},t.prototype.vertical=function(n){return void 0===n?this.vertical_||!1:(this.vertical_=!!n,this.addClass(this.vertical_?"vjs-slider-vertical":"vjs-slider-horizontal"),this)},t}(f["default"]);f["default"].registerComponent("Slider",o);i["default"]=o;t.exports=i["default"]},{"../component.js":67,"../utils/dom.js":143,"object.assign":45}],120:[function(n,t,i){"use strict";function r(n){return n.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},n.streamFromParts=function(n,t){return n+"&"+t},n.streamToParts=function(n){var r={connection:"",stream:""},t,i;return n?(t=n.search(/&(?!\w+=)/),i=void 0,-1!==t?i=t+1:(t=i=n.lastIndexOf("/")+1,0===t&&(t=i=n.length)),r.connection=n.substring(0,t),r.stream=n.substring(i,n.length),r):r},n.isStreamingType=function(t){return t in n.streamingFormats},n.RTMP_RE=/^rtmp[set]?:\/\//i,n.isStreamingSrc=function(t){return n.RTMP_RE.test(t)},n.rtmpSourceHandler={},n.rtmpSourceHandler.canPlayType=function(t){return n.isStreamingType(t)?"maybe":""},n.rtmpSourceHandler.canHandleSource=function(t){var i=n.rtmpSourceHandler.canPlayType(t.type);return i?i:n.isStreamingSrc(t.src)?"maybe":""},n.rtmpSourceHandler.handleSource=function(t,i){var r=n.streamToParts(t.src);i.setRtmpConnection(r.connection);i.setRtmpStream(r.stream)},n.registerSourceHandler(n.rtmpSourceHandler),n}i.__esModule=!0;i["default"]=r;t.exports=i["default"]},{}],121:[function(n,t,i){"use strict";function v(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function e(n){return n&&n.__esModule?n:{"default":n}}function k(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function d(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function g(n){var t=n.charAt(0).toUpperCase()+n.slice(1);w["set"+t]=function(t){return this.el_.vjs_setProperty(n,t)}}function y(n){w[n]=function(){return this.el_.vjs_getProperty(n)}}var f;i.__esModule=!0;for(var nt=n("./tech"),c=e(nt),tt=n("../utils/dom.js"),s=v(tt),it=n("../utils/url.js"),p=v(it),h=n("../utils/time-ranges.js"),rt=n("./flash-rtmp"),ut=e(rt),ft=n("../component"),et=e(ft),ot=n("global/window"),u=e(ot),st=n("object.assign"),o=e(st),l=u["default"].navigator,r=function(n){function t(i,r){k(this,t);n.call(this,i,r);i.source&&this.ready(function(){this.setSource(i.source)},!0);i.startTime&&this.ready(function(){this.load();this.play();this.currentTime(i.startTime)},!0);u["default"].videojs=u["default"].videojs||{};u["default"].videojs.Flash=u["default"].videojs.Flash||{};u["default"].videojs.Flash.onReady=t.onReady;u["default"].videojs.Flash.onEvent=t.onEvent;u["default"].videojs.Flash.onError=t.onError;this.on("seeked",function(){this.lastSeekTarget_=void 0})}return d(t,n),t.prototype.createEl=function(){var n=this.options_;n.swf||(n.swf="//vjs.zencdn.net/swf/5.0.1/video-js.swf");var i=n.techId,r=o["default"]({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:n.autoplay,preload:n.preload,loop:n.loop,muted:n.muted},n.flashVars),u=o["default"]({wmode:"opaque",bgcolor:"#000000"},n.params),f=o["default"]({id:i,name:i,"class":"vjs-tech"},n.attributes);return this.el_=t.embed(n.swf,r,u,f),this.el_.tech=this,this.el_},t.prototype.play=function(){this.ended()&&this.setCurrentTime(0);this.el_.vjs_play()},t.prototype.pause=function(){this.el_.vjs_pause()},t.prototype.src=function(n){return void 0===n?this.currentSrc():this.setSrc(n)},t.prototype.setSrc=function(n){if(n=p.getAbsoluteURL(n),this.el_.vjs_src(n),this.autoplay()){var t=this;this.setTimeout(function(){t.play()},0)}},t.prototype.seeking=function(){return void 0!==this.lastSeekTarget_},t.prototype.setCurrentTime=function(t){var i=this.seekable();i.length&&(t=t>i.start(0)?t:i.start(0),t=t<i.end(i.length-1)?t:i.end(i.length-1),this.lastSeekTarget_=t,this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",t),n.prototype.setCurrentTime.call(this))},t.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},t.prototype.load=function(){this.el_.vjs_load()},t.prototype.poster=function(){this.el_.vjs_getProperty("poster")},t.prototype.setPoster=function(){},t.prototype.seekable=function(){var n=this.duration();return 0===n?h.createTimeRange():h.createTimeRange(0,n)},t.prototype.buffered=function(){var n=this.el_.vjs_getProperty("buffered");return 0===n.length?h.createTimeRange():h.createTimeRange(n[0][0],n[0][1])},t.prototype.supportsFullScreen=function(){return!1},t.prototype.enterFullScreen=function(){return!1},t}(c["default"]),w=r.prototype,a="rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),b="networkState,readyState,initialTime,duration,startOffsetTime,paused,ended,videoWidth,videoHeight".split(","),f=0;f<a.length;f++)y(a[f]),g(a[f]);for(f=0;f<b.length;f++)y(b[f]);r.isSupported=function(){return r.version()[0]>=10};c["default"].withSourceHandlers(r);r.nativeSourceHandler={};r.nativeSourceHandler.canPlayType=function(n){return n in r.formats?"maybe":""};r.nativeSourceHandler.canHandleSource=function(n){function i(n){var t=p.getFileExtension(n);return t?"video/"+t:""}var t;return t=n.type?n.type.replace(/;.*/,"").toLowerCase():i(n.src),r.nativeSourceHandler.canPlayType(t)};r.nativeSourceHandler.handleSource=function(n,t){t.setSrc(n.src)};r.nativeSourceHandler.dispose=function(){};r.registerSourceHandler(r.nativeSourceHandler);r.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"};r.onReady=function(n){var i=s.getEl(n),t=i&&i.tech;t&&t.el()&&r.checkReady(t)};r.checkReady=function(n){n.el()&&(n.el().vjs_getProperty?n.triggerReady():this.setTimeout(function(){r.checkReady(n)},50))};r.onEvent=function(n,t){var i=s.getEl(n).tech;i.trigger(t)};r.onError=function(n,t){var i=s.getEl(n).tech;return"srcnotfound"===t?i.error(4):void i.error("FLASH: "+t)};r.version=function(){var n="0,0,0";try{n=new u["default"].ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{l.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(n=(l.plugins["Shockwave Flash 2.0"]||l.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(i){}}return n.split(",")};r.embed=function(n,t,i,u){var f=r.getEmbedCode(n,t,i,u);return s.createEl("div",{innerHTML:f}).childNodes[0]};r.getEmbedCode=function(n,t,i,r){var u="",f="",e="";return t&&Object.getOwnPropertyNames(t).forEach(function(n){u+=n+"="+t[n]+"&amp;"}),i=o["default"]({movie:n,flashvars:u,allowScriptAccess:"always",allowNetworking:"all"},i),Object.getOwnPropertyNames(i).forEach(function(n){f+='<param name="'+n+'" value="'+i[n]+'" />'}),r=o["default"]({data:n,width:"100%",height:"100%"},r),Object.getOwnPropertyNames(r).forEach(function(n){e+=n+'="'+r[n]+'" '}),'<object type="application/x-shockwave-flash" '+e+">"+f+"<\/object>"};ut["default"](r);et["default"].registerComponent("Flash",r);c["default"].registerTech("Flash",r);i["default"]=r;t.exports=i["default"]},{"../component":67,"../utils/dom.js":143,"../utils/time-ranges.js":151,"../utils/url.js":153,"./flash-rtmp":120,"./tech":124,"global/window":2,"object.assign":45}],122:[function(n,t,i){"use strict";function h(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function u(n){return n&&n.__esModule?n:{"default":n}}function w(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function b(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function k(n,t){return n.raw=t,n}var s;i.__esModule=!0;var d=k(["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."]),g=n("./tech.js"),l=u(g),nt=n("../component"),tt=u(nt),it=n("../utils/dom.js"),a=h(it),rt=n("../utils/url.js"),v=h(rt),ut=n("../utils/fn.js"),o=h(ut),ft=n("../utils/log.js"),y=u(ft),et=n("tsml"),ot=u(et),st=n("../../../src/js/tracks/text-track.js"),ht=(u(st),n("../utils/browser.js")),f=h(ht),ct=n("global/document"),c=u(ct),lt=n("global/window"),at=u(lt),vt=n("object.assign"),yt=u(vt),pt=n("../utils/merge-options.js"),wt=u(pt),bt=n("../utils/to-title-case.js"),p=u(bt),r=function(n){function t(i,r){var u=this,s,h,e,k,c,g;if(w(this,t),n.call(this,i,r),s=i.source,h=!1,s&&(this.el_.currentSrc!==s.src||i.tag&&3===i.tag.initNetworkState_)?this.setSource(s):this.handleLateInit_(this.el_),this.el_.hasChildNodes()){for(var a=this.el_.childNodes,b=a.length,l=[];b--;)e=a[b],k=e.nodeName.toLowerCase(),"track"===k&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(e),this.remoteTextTracks().addTrack_(e.track),h||this.el_.hasAttribute("crossorigin")||!v.isCrossOrigin(e.src)||(h=!0)):l.push(e));for(c=0;c<l.length;c++)this.el_.removeChild(l[c])}g=["audio","video"];g.forEach(function(n){var i=p["default"](n),t;u["featuresNative"+i+"Tracks"]&&(t=u.el()[n+"Tracks"],t&&t.addEventListener&&(t.addEventListener("change",o.bind(u,u["handle"+i+"TrackChange_"])),t.addEventListener("addtrack",o.bind(u,u["handle"+i+"TrackAdd_"])),t.addEventListener("removetrack",o.bind(u,u["handle"+i+"TrackRemove_"]))))});this.featuresNativeTextTracks&&(h&&y["default"].warn(ot["default"](d)),this.handleTextTrackChange_=o.bind(this,this.handleTextTrackChange),this.handleTextTrackAdd_=o.bind(this,this.handleTextTrackAdd),this.handleTextTrackRemove_=o.bind(this,this.handleTextTrackRemove),this.proxyNativeTextTracks_());(f.TOUCH_ENABLED&&i.nativeControlsForTouch===!0||f.IS_IPHONE||f.IS_NATIVE_ANDROID)&&this.setControls(!0);this.triggerReady()}return b(t,n),t.prototype.dispose=function(){var i=this;["audio","video","text"].forEach(function(n){var r=p["default"](n),t=i.el_[n+"Tracks"];t&&t.removeEventListener&&(t.removeEventListener("change",i["handle"+r+"TrackChange_"]),t.removeEventListener("addtrack",i["handle"+r+"TrackAdd_"]),t.removeEventListener("removetrack",i["handle"+r+"TrackRemove_"]))});t.disposeMediaElement(this.el_);n.prototype.dispose.call(this)},t.prototype.createEl=function(){var n=this.options_.tag,u,h,e,o,i,r,s;for(n&&this.movingMediaElementInDOM!==!1||(n?(u=n.cloneNode(!0),n.parentNode.insertBefore(u,n),t.disposeMediaElement(n),n=u):(n=c["default"].createElement("video"),h=this.options_.tag&&a.getElAttributes(this.options_.tag),e=wt["default"]({},h),f.TOUCH_ENABLED&&this.options_.nativeControlsForTouch===!0||delete e.controls,a.setElAttributes(n,yt["default"](e,{id:this.options_.techId,"class":"vjs-tech"})))),o=["autoplay","preload","loop","muted"],i=o.length-1;i>=0;i--)r=o[i],s={},"undefined"!=typeof this.options_[r]&&(s[r]=this.options_[r]),a.setElAttributes(n,s);return n},t.prototype.handleLateInit_=function(n){var i=this,r,t;if(0!==n.networkState&&3!==n.networkState){if(0===n.readyState&&(r=function(){var n=!1,r=function(){n=!0},t;i.on("loadstart",r);return t=function(){n||this.trigger("loadstart")},i.on("loadedmetadata",t),i.ready(function(){this.off("loadstart",r);this.off("loadedmetadata",t);n||this.trigger("loadstart")}),{v:void 0}}(),"object"==typeof r))return r.v;t=["loadstart"];t.push("loadedmetadata");n.readyState>=2&&t.push("loadeddata");n.readyState>=3&&t.push("canplay");n.readyState>=4&&t.push("canplaythrough");this.ready(function(){t.forEach(function(n){this.trigger(n)},this)})}},t.prototype.proxyNativeTextTracks_=function(){var n=this.el().textTracks,t;if(n){for(t=0;t<n.length;t++)this.textTracks().addTrack_(n[t]);n.addEventListener&&(n.addEventListener("change",this.handleTextTrackChange_),n.addEventListener("addtrack",this.handleTextTrackAdd_),n.addEventListener("removetrack",this.handleTextTrackRemove_))}},t.prototype.handleTextTrackChange=function(){var n=this.textTracks();this.textTracks().trigger({type:"change",target:n,currentTarget:n,srcElement:n})},t.prototype.handleTextTrackAdd=function(n){this.textTracks().addTrack_(n.track)},t.prototype.handleTextTrackRemove=function(n){this.textTracks().removeTrack_(n.track)},t.prototype.handleVideoTrackChange_=function(){var n=this.videoTracks();this.videoTracks().trigger({type:"change",target:n,currentTarget:n,srcElement:n})},t.prototype.handleVideoTrackAdd_=function(n){this.videoTracks().addTrack_(n.track)},t.prototype.handleVideoTrackRemove_=function(n){this.videoTracks().removeTrack_(n.track)},t.prototype.handleAudioTrackChange_=function(){var n=this.audioTracks();this.audioTracks().trigger({type:"change",target:n,currentTarget:n,srcElement:n})},t.prototype.handleAudioTrackAdd_=function(n){this.audioTracks().addTrack_(n.track)},t.prototype.handleAudioTrackRemove_=function(n){this.audioTracks().removeTrack_(n.track)},t.prototype.play=function(){this.el_.play()},t.prototype.pause=function(){this.el_.pause()},t.prototype.paused=function(){return this.el_.paused},t.prototype.currentTime=function(){return this.el_.currentTime},t.prototype.setCurrentTime=function(n){try{this.el_.currentTime=n}catch(t){y["default"](t,"Video is not ready. (Video.js)")}},t.prototype.duration=function(){return this.el_.duration||0},t.prototype.buffered=function(){return this.el_.buffered},t.prototype.volume=function(){return this.el_.volume},t.prototype.setVolume=function(n){this.el_.volume=n},t.prototype.muted=function(){return this.el_.muted},t.prototype.setMuted=function(n){this.el_.muted=n},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var n=at["default"].navigator.userAgent;if(/Android/.test(n)||!/Chrome|Mac OS X 10.5/.test(n))return!0}return!1},t.prototype.enterFullScreen=function(){var n=this.el_;"webkitDisplayingFullscreen"in n&&this.one("webkitbeginfullscreen",function(){this.one("webkitendfullscreen",function(){this.trigger("fullscreenchange",{isFullscreen:!1})});this.trigger("fullscreenchange",{isFullscreen:!0})});n.paused&&n.networkState<=n.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){n.pause();n.webkitEnterFullScreen()},0)):n.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(n){return void 0===n?this.el_.src:void this.setSrc(n)},t.prototype.setSrc=function(n){this.el_.src=n},t.prototype.load=function(){this.el_.load()},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.poster=function(){return this.el_.poster},t.prototype.setPoster=function(n){this.el_.poster=n},t.prototype.preload=function(){return this.el_.preload},t.prototype.setPreload=function(n){this.el_.preload=n},t.prototype.autoplay=function(){return this.el_.autoplay},t.prototype.setAutoplay=function(n){this.el_.autoplay=n},t.prototype.controls=function(){return this.el_.controls},t.prototype.setControls=function(n){this.el_.controls=!!n},t.prototype.loop=function(){return this.el_.loop},t.prototype.setLoop=function(n){this.el_.loop=n},t.prototype.error=function(){return this.el_.error},t.prototype.seeking=function(){return this.el_.seeking},t.prototype.seekable=function(){return this.el_.seekable},t.prototype.ended=function(){return this.el_.ended},t.prototype.defaultMuted=function(){return this.el_.defaultMuted},t.prototype.playbackRate=function(){return this.el_.playbackRate},t.prototype.played=function(){return this.el_.played},t.prototype.setPlaybackRate=function(n){this.el_.playbackRate=n},t.prototype.networkState=function(){return this.el_.networkState},t.prototype.readyState=function(){return this.el_.readyState},t.prototype.videoWidth=function(){return this.el_.videoWidth},t.prototype.videoHeight=function(){return this.el_.videoHeight},t.prototype.textTracks=function(){return n.prototype.textTracks.call(this)},t.prototype.addTextTrack=function(t,i,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,i,r):n.prototype.addTextTrack.call(this,t,i,r)},t.prototype.addRemoteTextTrack=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i;return this.featuresNativeTextTracks?(i=c["default"].createElement("track"),t.kind&&(i.kind=t.kind),t.label&&(i.label=t.label),(t.language||t.srclang)&&(i.srclang=t.language||t.srclang),t["default"]&&(i["default"]=t["default"]),t.id&&(i.id=t.id),t.src&&(i.src=t.src),this.el().appendChild(i),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack_(i.track),i):n.prototype.addRemoteTextTrack.call(this,t)},t.prototype.removeRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return n.prototype.removeRemoteTextTrack.call(this,t);var i=void 0,r=void 0,u=this.remoteTextTrackEls().getTrackElementByTrack_(t);for(this.remoteTextTrackEls().removeTrackElement_(u),this.remoteTextTracks().removeTrack_(t),i=this.$$("track"),r=i.length;r--;)(t===i[r]||t===i[r].track)&&this.el().removeChild(i[r])},t}(l["default"]);r.TEST_VID=c["default"].createElement("video");s=c["default"].createElement("track");s.kind="captions";s.srclang="en";s.label="English";r.TEST_VID.appendChild(s);r.isSupported=function(){try{r.TEST_VID.volume=.5}catch(n){return!1}return!!r.TEST_VID.canPlayType};l["default"].withSourceHandlers(r);r.nativeSourceHandler={};r.nativeSourceHandler.canPlayType=function(n){try{return r.TEST_VID.canPlayType(n)}catch(t){return""}};r.nativeSourceHandler.canHandleSource=function(n){var t;return n.type?r.nativeSourceHandler.canPlayType(n.type):n.src?(t=v.getFileExtension(n.src),r.nativeSourceHandler.canPlayType("video/"+t)):""};r.nativeSourceHandler.handleSource=function(n,t){t.setSrc(n.src)};r.nativeSourceHandler.dispose=function(){};r.registerSourceHandler(r.nativeSourceHandler);r.canControlVolume=function(){var n=r.TEST_VID.volume;return r.TEST_VID.volume=n/2+.1,n!==r.TEST_VID.volume};r.canControlPlaybackRate=function(){if(f.IS_ANDROID&&f.IS_CHROME)return!1;var n=r.TEST_VID.playbackRate;return r.TEST_VID.playbackRate=n/2+.1,n!==r.TEST_VID.playbackRate};r.supportsNativeTextTracks=function(){var n;return n=!!r.TEST_VID.textTracks,n&&r.TEST_VID.textTracks.length>0&&(n="number"!=typeof r.TEST_VID.textTracks[0].mode),n&&f.IS_FIREFOX&&(n=!1),!n||"onremovetrack"in r.TEST_VID.textTracks||(n=!1),n};r.supportsNativeVideoTracks=function(){return!!r.TEST_VID.videoTracks};r.supportsNativeAudioTracks=function(){return!!r.TEST_VID.audioTracks};r.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"];r.prototype.featuresVolumeControl=r.canControlVolume();r.prototype.featuresPlaybackRate=r.canControlPlaybackRate();r.prototype.movingMediaElementInDOM=!f.IS_IOS;r.prototype.featuresFullscreenResize=!0;r.prototype.featuresProgressEvents=!0;r.prototype.featuresNativeTextTracks=r.supportsNativeTextTracks();r.prototype.featuresNativeVideoTracks=r.supportsNativeVideoTracks();r.prototype.featuresNativeAudioTracks=r.supportsNativeAudioTracks();var e=void 0,kt=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,dt=/^video\/mp4/i;r.patchCanPlayType=function(){f.ANDROID_VERSION>=4&&(e||(e=r.TEST_VID.constructor.prototype.canPlayType),r.TEST_VID.constructor.prototype.canPlayType=function(n){return n&&kt.test(n)?"maybe":e.call(this,n)});f.IS_OLD_ANDROID&&(e||(e=r.TEST_VID.constructor.prototype.canPlayType),r.TEST_VID.constructor.prototype.canPlayType=function(n){return n&&dt.test(n)?"maybe":e.call(this,n)})};r.unpatchCanPlayType=function(){var n=r.TEST_VID.constructor.prototype.canPlayType;return r.TEST_VID.constructor.prototype.canPlayType=e,e=null,n};r.patchCanPlayType();r.disposeMediaElement=function(n){if(n){for(n.parentNode&&n.parentNode.removeChild(n);n.hasChildNodes();)n.removeChild(n.firstChild);n.removeAttribute("src");"function"==typeof n.load&&!function(){try{n.load()}catch(t){}}()}};r.resetMediaElement=function(n){if(n){for(var t=n.querySelectorAll("source"),i=t.length;i--;)n.removeChild(t[i]);n.removeAttribute("src");"function"==typeof n.load&&!function(){try{n.load()}catch(t){}}()}};tt["default"].registerComponent("Html5",r);l["default"].registerTech("Html5",r);i["default"]=r;t.exports=i["default"]},{"../../../src/js/tracks/text-track.js":134,"../component":67,"../utils/browser.js":140,"../utils/dom.js":143,"../utils/fn.js":145,"../utils/log.js":148,"../utils/merge-options.js":149,"../utils/to-title-case.js":152,"../utils/url.js":153,"./tech.js":124,"global/document":1,"global/window":2,"object.assign":45,tsml:55}],123:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("../component.js"),u=r(s),h=n("./tech.js"),c=r(h),l=n("global/window"),a=(r(l),n("../utils/to-title-case.js")),v=r(a),f=function(n){function t(i,r,f){var s,l,o,h;if(e(this,t),n.call(this,i,r,f),r.playerOptions.sources&&0!==r.playerOptions.sources.length)i.src(r.playerOptions.sources);else for(s=0,l=r.playerOptions.techOrder;s<l.length;s++)if(o=v["default"](l[s]),h=c["default"].getTech(o),o||(h=u["default"].getComponent(o)),h&&h.isSupported()){i.loadTech_(o);break}}return o(t,n),t}(u["default"]);u["default"].registerComponent("MediaLoader",f);i["default"]=f;t.exports=i["default"]},{"../component.js":67,"../utils/to-title-case.js":152,"./tech.js":124,"global/window":2}],124:[function(n,t,i){"use strict";function v(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function u(n){return n&&n.__esModule?n:{"default":n}}function y(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function p(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a;i.__esModule=!0;var w=n("../component"),e=u(w),b=n("../tracks/html-track-element"),k=u(b),d=n("../tracks/html-track-element-list"),g=u(d),nt=n("../utils/merge-options.js"),tt=u(nt),it=n("../tracks/text-track"),rt=u(it),ut=n("../tracks/text-track-list"),h=u(ut),ft=n("../tracks/video-track"),et=(u(ft),n("../tracks/video-track-list")),ot=u(et),st=n("../tracks/audio-track-list"),ht=u(st),ct=n("../tracks/audio-track"),lt=(u(ct),n("../utils/fn.js")),o=v(lt),at=n("../utils/log.js"),c=u(at),s=n("../utils/time-ranges.js"),vt=n("../utils/buffer.js"),yt=n("../media-error.js"),l=u(yt),pt=n("global/window"),f=u(pt),wt=n("global/document"),bt=u(wt),r=function(n){function t(){var i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=arguments.length<=1||void 0===arguments[1]?function(){}:arguments[1];y(this,t);i.reportTouchActivity=!1;n.call(this,null,i,r);this.hasStarted_=!1;this.on("playing",function(){this.hasStarted_=!0});this.on("loadstart",function(){this.hasStarted_=!1});this.textTracks_=i.textTracks;this.videoTracks_=i.videoTracks;this.audioTracks_=i.audioTracks;this.featuresProgressEvents||this.manualProgressOn();this.featuresTimeupdateEvents||this.manualTimeUpdatesOn();(i.nativeCaptions===!1||i.nativeTextTracks===!1)&&(this.featuresNativeTextTracks=!1);this.featuresNativeTextTracks||this.on("ready",this.emulateTextTracks);this.initTextTrackListeners();this.initTrackListeners();this.emitTapEvents()}return p(t,n),t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange);this.manualProgress=!0;this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1;this.stopTrackingProgress();this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(){this.stopTrackingProgress();this.progressInterval=this.setInterval(o.bind(this,function(){var n=this.bufferedPercent();this.bufferedPercent_!==n&&this.trigger("progress");this.bufferedPercent_=n;1===n&&this.stopTrackingProgress()}),500)},t.prototype.onDurationChange=function(){this.duration_=this.duration()},t.prototype.buffered=function(){return s.createTimeRange(0,0)},t.prototype.bufferedPercent=function(){return vt.bufferedPercent(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0;this.on("play",this.trackCurrentTime);this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1;this.stopTrackingCurrentTime();this.off("play",this.trackCurrentTime);this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime();this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval);this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(["audio","video","text"]);this.manualProgress&&this.manualProgressOff();this.manualTimeUpdates&&this.manualTimeUpdatesOff();n.prototype.dispose.call(this)},t.prototype.clearTracks=function(n){var t=this;n=[].concat(n);n.forEach(function(n){for(var u,i=t[n+"Tracks"]()||[],r=i.length;r--;)u=i[r],"text"===n&&t.removeRemoteTextTrack(u),i.removeTrack_(u)})},t.prototype.reset=function(){},t.prototype.error=function(n){return void 0!==n&&(this.error_=n instanceof l["default"]?n:new l["default"](n),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?s.createTimeRange(0,0):s.createTimeRange()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTextTrackListeners=function(){var t=o.bind(this,function(){this.trigger("texttrackchange")}),n=this.textTracks();n&&(n.addEventListener("removetrack",t),n.addEventListener("addtrack",t),this.on("dispose",o.bind(this,function(){n.removeEventListener("removetrack",t);n.removeEventListener("addtrack",t)})))},t.prototype.initTrackListeners=function(){var n=this;["video","audio"].forEach(function(t){var i=function(){n.trigger(t+"trackchange")},r=n[t+"Tracks"]();r.addEventListener("removetrack",i);r.addEventListener("addtrack",i);n.on("dispose",function(){r.removeEventListener("removetrack",i);r.removeEventListener("addtrack",i)})})},t.prototype.emulateTextTracks=function(){var n=this,t=this.textTracks(),i,r;t&&(f["default"].WebVTT||null==this.el().parentNode||!function(){var t=bt["default"].createElement("script");t.src=n.options_["vtt.js"]||"https://cdn.rawgit.com/gkatsev/vtt.js/vjs-v0.12.1/dist/vtt.min.js";t.onload=function(){n.trigger("vttjsloaded")};t.onerror=function(){n.trigger("vttjserror")};n.on("dispose",function(){t.onload=null;t.onerror=null});f["default"].WebVTT=!0;n.el().parentNode.appendChild(t)}(),i=function(){return n.trigger("texttrackchange")},r=function(){var n,r;for(i(),n=0;n<t.length;n++)r=t[n],r.removeEventListener("cuechange",i),"showing"===r.mode&&r.addEventListener("cuechange",i)},r(),t.addEventListener("change",r),this.on("dispose",function(){t.removeEventListener("change",r)}))},t.prototype.videoTracks=function(){return this.videoTracks_=this.videoTracks_||new ot["default"],this.videoTracks_},t.prototype.audioTracks=function(){return this.audioTracks_=this.audioTracks_||new ht["default"],this.audioTracks_},t.prototype.textTracks=function(){return this.textTracks_=this.textTracks_||new h["default"],this.textTracks_},t.prototype.remoteTextTracks=function(){return this.remoteTextTracks_=this.remoteTextTracks_||new h["default"],this.remoteTextTracks_},t.prototype.remoteTextTrackEls=function(){return this.remoteTextTrackEls_=this.remoteTextTrackEls_||new g["default"],this.remoteTextTrackEls_},t.prototype.addTextTrack=function(n,t,i){if(!n)throw new Error("TextTrack kind is required but was not provided");return a(this,n,t,i)},t.prototype.addRemoteTextTrack=function(n){var i=tt["default"](n,{tech:this}),t=new k["default"](i);return this.remoteTextTrackEls().addTrackElement_(t),this.remoteTextTracks().addTrack_(t.track),this.textTracks().addTrack_(t.track),t},t.prototype.removeRemoteTextTrack=function(n){this.textTracks().removeTrack_(n);var t=this.remoteTextTrackEls().getTrackElementByTrack_(n);this.remoteTextTrackEls().removeTrackElement_(t);this.remoteTextTracks().removeTrack_(n)},t.prototype.setPoster=function(){},t.prototype.canPlayType=function(){return""},t.isTech=function(n){return n.prototype instanceof t||n instanceof t||n===t},t.registerTech=function(n,i){if(t.techs_||(t.techs_={}),!t.isTech(i))throw new Error("Tech "+n+" must be a Tech");return t.techs_[n]=i,i},t.getTech=function(n){return t.techs_&&t.techs_[n]?t.techs_[n]:f["default"]&&f["default"].videojs&&f["default"].videojs[n]?(c["default"].warn("The "+n+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),f["default"].videojs[n]):void 0},t}(e["default"]);r.prototype.textTracks_;r.prototype.audioTracks_;r.prototype.videoTracks_;a=function(n,t,i,r){var u=arguments.length<=4||void 0===arguments[4]?{}:arguments[4],e=n.textTracks(),f;return u.kind=t,i&&(u.label=i),r&&(u.language=r),u.tech=n,f=new rt["default"](u),e.addTrack_(f),f};r.prototype.featuresVolumeControl=!0;r.prototype.featuresFullscreenResize=!1;r.prototype.featuresPlaybackRate=!1;r.prototype.featuresProgressEvents=!1;r.prototype.featuresTimeupdateEvents=!1;r.prototype.featuresNativeTextTracks=!1;r.withSourceHandlers=function(n){n.registerSourceHandler=function(t,i){var r=n.sourceHandlers;r||(r=n.sourceHandlers=[]);void 0===i&&(i=r.length);r.splice(i,0,t)};n.canPlayType=function(t){for(var r=n.sourceHandlers||[],u=void 0,i=0;i<r.length;i++)if(u=r[i].canPlayType(t))return u;return""};n.selectSourceHandler=function(t){for(var r=n.sourceHandlers||[],u=void 0,i=0;i<r.length;i++)if(u=r[i].canHandleSource(t))return r[i];return null};n.canPlaySource=function(t){var i=n.selectSourceHandler(t);return i?i.canHandleSource(t):""};["seekable","duration"].forEach(function(n){var t=this[n];"function"==typeof t&&(this[n]=function(){return this.sourceHandler_&&this.sourceHandler_[n]?this.sourceHandler_[n].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},n.prototype);n.prototype.setSource=function(t){var i=n.selectSourceHandler(t);return i||(n.nativeSourceHandler?i=n.nativeSourceHandler:c["default"].error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),i!==n.nativeSourceHandler&&(this.currentSource_=t,this.off(this.el_,"loadstart",n.prototype.firstLoadStartListener_),this.off(this.el_,"loadstart",n.prototype.successiveLoadStartListener_),this.one(this.el_,"loadstart",n.prototype.firstLoadStartListener_)),this.sourceHandler_=i.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler),this};n.prototype.firstLoadStartListener_=function(){this.one(this.el_,"loadstart",n.prototype.successiveLoadStartListener_)};n.prototype.successiveLoadStartListener_=function(){this.currentSource_=null;this.disposeSourceHandler();this.one(this.el_,"loadstart",n.prototype.successiveLoadStartListener_)};n.prototype.disposeSourceHandler=function(){this.sourceHandler_&&this.sourceHandler_.dispose&&(this.off(this.el_,"loadstart",n.prototype.firstLoadStartListener_),this.off(this.el_,"loadstart",n.prototype.successiveLoadStartListener_),this.sourceHandler_.dispose(),this.sourceHandler_=null)}};e["default"].registerComponent("Tech",r);e["default"].registerComponent("MediaTechController",r);r.registerTech("Tech",r);i["default"]=r;t.exports=i["default"]},{"../component":67,"../media-error.js":108,"../tracks/audio-track":126,"../tracks/audio-track-list":125,"../tracks/html-track-element":128,"../tracks/html-track-element-list":127,"../tracks/text-track":134,"../tracks/text-track-list":132,"../tracks/video-track":139,"../tracks/video-track-list":138,"../utils/buffer.js":141,"../utils/fn.js":145,"../utils/log.js":148,"../utils/merge-options.js":149,"../utils/time-ranges.js":151,"global/document":1,"global/window":2}],125:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function f(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("./track-list"),r=f(h),c=n("../utils/browser.js"),l=e(c),a=n("global/document"),v=f(a),u=function(n,t){for(var i=0;i<n.length;i++)t.id!==n[i].id&&(n[i].enabled=!1)},y=function(n){function t(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],i,s,f;for(o(this,t),i=void 0,s=e.length-1;s>=0;s--)if(e[s].enabled){u(e,e[s]);break}if(l.IS_IE8){i=v["default"].createElement("custom");for(f in r["default"].prototype)"constructor"!==f&&(i[f]=r["default"].prototype[f]);for(f in t.prototype)"constructor"!==f&&(i[f]=t.prototype[f])}return i=n.call(this,e,i),i.changing_=!1,i}return s(t,n),t.prototype.addTrack_=function(t){var i=this;t.enabled&&u(this,t);n.prototype.addTrack_.call(this,t);t.addEventListener&&t.addEventListener("enabledchange",function(){i.changing_||(i.changing_=!0,u(i,t),i.changing_=!1,i.trigger("change"))})},t.prototype.addTrack=function(n){this.addTrack_(n)},t.prototype.removeTrack=function(t){n.prototype.removeTrack_.call(this,t)},t}(r["default"]);i["default"]=y;t.exports=i["default"]},{"../utils/browser.js":140,"./track-list":136,"global/document":1}],126:[function(n,t,i){"use strict";function u(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("./track-enums"),s=n("./track"),h=r(s),c=n("../utils/merge-options"),l=r(c),a=n("../utils/browser.js"),v=u(a),y=function(n){function t(){var s=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r;f(this,t);var u=l["default"](s,{kind:o.AudioTrackKind[s.kind]||""}),i=n.call(this,u),e=!1;if(v.IS_IE8)for(r in t.prototype)"constructor"!==r&&(i[r]=t.prototype[r]);return Object.defineProperty(i,"enabled",{get:function(){return e},set:function(n){"boolean"==typeof n&&n!==e&&(e=n,this.trigger("enabledchange"))}}),u.enabled&&(i.enabled=u.enabled),i.loaded_=!0,i}return e(t,n),t}(h["default"]);i["default"]=y;t.exports=i["default"]},{"../utils/browser.js":140,"../utils/merge-options":149,"./track":137,"./track-enums":135}],127:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}i.__esModule=!0;var o=n("../utils/browser.js"),r=f(o),s=n("global/document"),h=u(s),c=function(){function n(){var f=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t,i,u,o;if(e(this,n),t=this,r.IS_IE8){t=h["default"].createElement("custom");for(i in n.prototype)"constructor"!==i&&(t[i]=n.prototype[i])}for(t.trackElements_=[],Object.defineProperty(t,"length",{get:function(){return this.trackElements_.length}}),u=0,o=f.length;o>u;u++)t.addTrackElement_(f[u]);if(r.IS_IE8)return t}return n.prototype.addTrackElement_=function(n){this.trackElements_.push(n)},n.prototype.getTrackElementByTrack_=function(n){for(var i=void 0,t=0,r=this.trackElements_.length;r>t;t++)if(n===this.trackElements_[t].track){i=this.trackElements_[t];break}return i},n.prototype.removeTrackElement_=function(n){for(var t=0,i=this.trackElements_.length;i>t;t++)if(n===this.trackElements_[t]){this.trackElements_.splice(t,1);break}},n}();i["default"]=c;t.exports=i["default"]},{"../utils/browser.js":140,"global/document":1}],128:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function s(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function h(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var l=n("../utils/browser.js"),f=s(l),a=n("global/document"),v=u(a),y=n("../event-target"),p=u(y),w=n("../tracks/text-track"),b=u(w),e=0,o=2,r=function(n){function t(){var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],u,i,s,r;if(h(this,t),n.call(this),u=void 0,i=this,f.IS_IE8){i=v["default"].createElement("custom");for(s in t.prototype)"constructor"!==s&&(i[s]=t.prototype[s])}return r=new b["default"](c),i.kind=r.kind,i.src=r.src,i.srclang=r.language,i.label=r.label,i["default"]=r["default"],Object.defineProperty(i,"readyState",{get:function(){return u}}),Object.defineProperty(i,"track",{get:function(){return r}}),u=e,r.addEventListener("loadeddata",function(){u=o;i.trigger({type:"load",target:i})}),f.IS_IE8?i:void 0}return c(t,n),t}(p["default"]);r.prototype.allowedEvents_={load:"load"};r.NONE=e;r.LOADING=1;r.LOADED=o;r.ERROR=3;i["default"]=r;t.exports=i["default"]},{"../event-target":104,"../tracks/text-track":134,"../utils/browser.js":140,"global/document":1}],129:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function f(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}i.__esModule=!0;var o=n("../utils/browser.js"),r=f(o),s=n("global/document"),h=u(s),c=function(){function n(t){var i,u;if(e(this,n),i=this,r.IS_IE8){i=h["default"].createElement("custom");for(u in n.prototype)"constructor"!==u&&(i[u]=n.prototype[u])}return n.prototype.setCues_.call(i,t),Object.defineProperty(i,"length",{get:function(){return this.length_}}),r.IS_IE8?i:void 0}return n.prototype.setCues_=function(n){var i=this.length||0,t=0,r=n.length,u;if(this.cues_=n,this.length_=n.length,u=function(n){""+n in this||Object.defineProperty(this,""+n,{get:function(){return this.cues_[n]}})},r>i)for(t=i;r>t;t++)u.call(this,t)},n.prototype.getCueById=function(n){for(var i,r=null,t=0,u=this.length;u>t;t++)if(i=this[t],i.id===n){r=i;break}return r},n}();i["default"]=c;t.exports=i["default"]},{"../utils/browser.js":140,"global/document":1}],130:[function(n,t,i){"use strict";function a(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function f(n){return n&&n.__esModule?n:{"default":n}}function v(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function y(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function o(n,t){return"rgba("+parseInt(n[1]+n[1],16)+","+parseInt(n[2]+n[2],16)+","+parseInt(n[3]+n[3],16)+","+t+")"}function s(n,t,i){try{n.style[t]=i}catch(r){}}i.__esModule=!0;var p=n("../component"),h=f(p),w=n("../menu/menu.js"),b=(f(w),n("../menu/menu-item.js")),k=(f(b),n("../menu/menu-button.js")),d=(f(k),n("../utils/fn.js")),e=a(d),g=n("global/document"),nt=(f(g),n("global/window")),u=f(nt),r="#222",c="#ccc",tt={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'},l=function(n){function t(i,r,u){v(this,t);n.call(this,i,r,u);i.on("loadstart",e.bind(this,this.toggleDisplay));i.on("texttrackchange",e.bind(this,this.updateDisplay));i.ready(e.bind(this,function(){var f,n,t;if(i.tech_&&i.tech_.featuresNativeTextTracks)return void this.hide();i.on("fullscreenchange",e.bind(this,this.updateDisplay));for(f=this.options_.playerOptions.tracks||[],n=0;n<f.length;n++)t=f[n],this.player_.addRemoteTextTrack(t);var s={captions:1,subtitles:1},o=this.player_.textTracks(),r=void 0,u=void 0;if(o){for(n=0;n<o.length;n++)t=o[n],t["default"]&&("descriptions"!==t.kind||r?t.kind in s&&!u&&(u=t):r=t);u?u.mode="showing":r&&(r.mode="showing")}}))}return y(t,n),t.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"assertive","aria-atomic":"true"})},t.prototype.clearDisplay=function(){"function"==typeof u["default"].WebVTT&&u["default"].WebVTT.processCues(u["default"],[],this.el_)},t.prototype.updateDisplay=function(){var t=this.player_.textTracks(),n;if(this.clearDisplay(),t){for(var i=null,r=null,u=t.length;u--;)n=t[u],"showing"===n.mode&&("descriptions"===n.kind?i=n:r=n);r?this.updateForTrack(r):i&&this.updateForTrack(i)}},t.prototype.updateForTrack=function(n){var h,l,i,a;if("function"==typeof u["default"].WebVTT&&n.activeCues){for(var t=this.player_.textTrackSettings.getValues(),f=[],e=0;e<n.activeCues.length;e++)f.push(n.activeCues[e]);for(u["default"].WebVTT.processCues(u["default"],f,this.el_),h=f.length;h--;)l=f[h],l&&(i=l.displayState,(t.color&&(i.firstChild.style.color=t.color),t.textOpacity&&s(i.firstChild,"color",o(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(i.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&s(i.firstChild,"backgroundColor",o(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?s(i,"backgroundColor",o(t.windowColor,t.windowOpacity)):i.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?i.firstChild.style.textShadow="2px 2px 3px "+r+", 2px 2px 4px "+r+", 2px 2px 5px "+r:"raised"===t.edgeStyle?i.firstChild.style.textShadow="1px 1px "+r+", 2px 2px "+r+", 3px 3px "+r:"depressed"===t.edgeStyle?i.firstChild.style.textShadow="1px 1px "+c+", 0 1px "+c+", -1px -1px "+r+", 0 -1px "+r:"uniform"===t.edgeStyle&&(i.firstChild.style.textShadow="0 0 4px "+r+", 0 0 4px "+r+", 0 0 4px "+r+", 0 0 4px "+r)),t.fontPercent&&1!==t.fontPercent)&&(a=u["default"].parseFloat(i.style.fontSize),i.style.fontSize=a*t.fontPercent+"px",i.style.height="auto",i.style.top="auto",i.style.bottom="2px"),t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?i.firstChild.style.fontVariant="small-caps":i.firstChild.style.fontFamily=tt[t.fontFamily]))}},t}(h["default"]);h["default"].registerComponent("TextTrackDisplay",l);i["default"]=l;t.exports=i["default"]},{"../component":67,"../menu/menu-button.js":109,"../menu/menu-item.js":110,"../menu/menu.js":111,"../utils/fn.js":145,"global/document":1,"global/window":2}],131:[function(n,t,i){"use strict";i.__esModule=!0;var r=function(n){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,i){return n[i]&&(t[i]=n[i]),t},{cues:n.cues&&Array.prototype.map.call(n.cues,function(n){return{startTime:n.startTime,endTime:n.endTime,text:n.text,id:n.id}})})},u=function(n){var t=n.$$("track"),i=Array.prototype.map.call(t,function(n){return n.track}),u=Array.prototype.map.call(t,function(n){var t=r(n.track);return n.src&&(t.src=n.src),t});return u.concat(Array.prototype.filter.call(n.textTracks(),function(n){return-1===i.indexOf(n)}).map(r))},f=function(n,t){return n.forEach(function(n){var i=t.addRemoteTextTrack(n).track;!n.src&&n.cues&&n.cues.forEach(function(n){return i.addCue(n)})}),t.textTracks()};i["default"]={textTracksToJson:u,jsonToTextTracks:f,trackToJson_:r};t.exports=i["default"]},{}],132:[function(n,t,i){"use strict";function u(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function f(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var s=n("./track-list"),r=f(s),h=n("../utils/fn.js"),c=u(h),l=n("../utils/browser.js"),a=u(l),v=n("global/document"),y=f(v),p=function(n){function t(){var f=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],u,i;if(e(this,t),u=void 0,a.IS_IE8){u=y["default"].createElement("custom");for(i in r["default"].prototype)"constructor"!==i&&(u[i]=r["default"].prototype[i]);for(i in t.prototype)"constructor"!==i&&(u[i]=t.prototype[i])}return n.call(this,f,u)}return o(t,n),t.prototype.addTrack_=function(t){n.prototype.addTrack_.call(this,t);t.addEventListener("modechange",c.bind(this,function(){this.trigger("change")}))},t.prototype.removeTrack_=function(n){for(var t=void 0,i=0,r=this.length;r>i;i++)if(this[i]===n){t=this[i];t.off&&t.off();this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack"})},t.prototype.getTrackById=function(n){for(var i,r=null,t=0,u=this.length;u>t;t++)if(i=this[t],i.id===n){r=i;break}return r},t}(r["default"]);i["default"]=p;t.exports=i["default"]},{"../utils/browser.js":140,"../utils/fn.js":145,"./track-list":136,"global/document":1}],133:[function(n,t,i){"use strict";function c(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function o(n){return n&&n.__esModule?n:{"default":n}}function v(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function y(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function f(n){var t=void 0;return n.selectedOptions?t=n.selectedOptions[0]:n.options&&(t=n.options[n.options.selectedIndex]),t.value}function e(n,t){var i,r;if(t){for(i=void 0,i=0;i<n.options.length;i++)if(r=n.options[i],r.value===t)break;n.selectedIndex=i}}function p(){return'<div class="vjs-tracksettings">\n      <div class="vjs-tracksettings-colors">\n        <div class="vjs-fg-color vjs-tracksetting">\n            <label class="vjs-label">Foreground<\/label>\n            <select>\n              <option value="">---<\/option>\n              <option value="#FFF">White<\/option>\n              <option value="#000">Black<\/option>\n              <option value="#F00">Red<\/option>\n              <option value="#0F0">Green<\/option>\n              <option value="#00F">Blue<\/option>\n              <option value="#FF0">Yellow<\/option>\n              <option value="#F0F">Magenta<\/option>\n              <option value="#0FF">Cyan<\/option>\n            <\/select>\n            <span class="vjs-text-opacity vjs-opacity">\n              <select>\n                <option value="">---<\/option>\n                <option value="1">Opaque<\/option>\n                <option value="0.5">Semi-Opaque<\/option>\n              <\/select>\n            <\/span>\n        <\/div> <!-- vjs-fg-color -->\n        <div class="vjs-bg-color vjs-tracksetting">\n            <label class="vjs-label">Background<\/label>\n            <select>\n              <option value="">---<\/option>\n              <option value="#FFF">White<\/option>\n              <option value="#000">Black<\/option>\n              <option value="#F00">Red<\/option>\n              <option value="#0F0">Green<\/option>\n              <option value="#00F">Blue<\/option>\n              <option value="#FF0">Yellow<\/option>\n              <option value="#F0F">Magenta<\/option>\n              <option value="#0FF">Cyan<\/option>\n            <\/select>\n            <span class="vjs-bg-opacity vjs-opacity">\n                <select>\n                  <option value="">---<\/option>\n                  <option value="1">Opaque<\/option>\n                  <option value="0.5">Semi-Transparent<\/option>\n                  <option value="0">Transparent<\/option>\n                <\/select>\n            <\/span>\n        <\/div> <!-- vjs-bg-color -->\n        <div class="window-color vjs-tracksetting">\n            <label class="vjs-label">Window<\/label>\n            <select>\n              <option value="">---<\/option>\n              <option value="#FFF">White<\/option>\n              <option value="#000">Black<\/option>\n              <option value="#F00">Red<\/option>\n              <option value="#0F0">Green<\/option>\n              <option value="#00F">Blue<\/option>\n              <option value="#FF0">Yellow<\/option>\n              <option value="#F0F">Magenta<\/option>\n              <option value="#0FF">Cyan<\/option>\n            <\/select>\n            <span class="vjs-window-opacity vjs-opacity">\n                <select>\n                  <option value="">---<\/option>\n                  <option value="1">Opaque<\/option>\n                  <option value="0.5">Semi-Transparent<\/option>\n                  <option value="0">Transparent<\/option>\n                <\/select>\n            <\/span>\n        <\/div> <!-- vjs-window-color -->\n      <\/div> <!-- vjs-tracksettings -->\n      <div class="vjs-tracksettings-font">\n        <div class="vjs-font-percent vjs-tracksetting">\n          <label class="vjs-label">Font Size<\/label>\n          <select>\n            <option value="0.50">50%<\/option>\n            <option value="0.75">75%<\/option>\n            <option value="1.00" selected>100%<\/option>\n            <option value="1.25">125%<\/option>\n            <option value="1.50">150%<\/option>\n            <option value="1.75">175%<\/option>\n            <option value="2.00">200%<\/option>\n            <option value="3.00">300%<\/option>\n            <option value="4.00">400%<\/option>\n          <\/select>\n        <\/div> <!-- vjs-font-percent -->\n        <div class="vjs-edge-style vjs-tracksetting">\n          <label class="vjs-label">Text Edge Style<\/label>\n          <select>\n            <option value="none">None<\/option>\n            <option value="raised">Raised<\/option>\n            <option value="depressed">Depressed<\/option>\n            <option value="uniform">Uniform<\/option>\n            <option value="dropshadow">Dropshadow<\/option>\n          <\/select>\n        <\/div> <!-- vjs-edge-style -->\n        <div class="vjs-font-family vjs-tracksetting">\n          <label class="vjs-label">Font Family<\/label>\n          <select>\n            <option value="">Default<\/option>\n            <option value="monospaceSerif">Monospace Serif<\/option>\n            <option value="proportionalSerif">Proportional Serif<\/option>\n            <option value="monospaceSansSerif">Monospace Sans-Serif<\/option>\n            <option value="proportionalSansSerif">Proportional Sans-Serif<\/option>\n            <option value="casual">Casual<\/option>\n            <option value="script">Script<\/option>\n            <option value="small-caps">Small Caps<\/option>\n          <\/select>\n        <\/div> <!-- vjs-font-family -->\n      <\/div>\n    <\/div>\n    <div class="vjs-tracksettings-controls">\n      <button class="vjs-default-button">Defaults<\/button>\n      <button class="vjs-done-button">Done<\/button>\n    <\/div>'}i.__esModule=!0;var w=n("../component"),l=o(w),b=n("../utils/events.js"),r=c(b),k=n("../utils/fn.js"),u=c(k),d=n("../utils/log.js"),h=o(d),g=n("safe-json-parse/tuple"),nt=o(g),tt=n("global/window"),s=o(tt),a=function(n){function t(i,f){v(this,t);n.call(this,i,f);this.hide();void 0===f.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings);r.on(this.$(".vjs-done-button"),"click",u.bind(this,function(){this.saveSettings();this.hide()}));r.on(this.$(".vjs-default-button"),"click",u.bind(this,function(){this.$(".vjs-fg-color > select").selectedIndex=0;this.$(".vjs-bg-color > select").selectedIndex=0;this.$(".window-color > select").selectedIndex=0;this.$(".vjs-text-opacity > select").selectedIndex=0;this.$(".vjs-bg-opacity > select").selectedIndex=0;this.$(".vjs-window-opacity > select").selectedIndex=0;this.$(".vjs-edge-style select").selectedIndex=0;this.$(".vjs-font-family select").selectedIndex=0;this.$(".vjs-font-percent select").selectedIndex=2;this.updateDisplay()}));r.on(this.$(".vjs-fg-color > select"),"change",u.bind(this,this.updateDisplay));r.on(this.$(".vjs-bg-color > select"),"change",u.bind(this,this.updateDisplay));r.on(this.$(".window-color > select"),"change",u.bind(this,this.updateDisplay));r.on(this.$(".vjs-text-opacity > select"),"change",u.bind(this,this.updateDisplay));r.on(this.$(".vjs-bg-opacity > select"),"change",u.bind(this,this.updateDisplay));r.on(this.$(".vjs-window-opacity > select"),"change",u.bind(this,this.updateDisplay));r.on(this.$(".vjs-font-percent select"),"change",u.bind(this,this.updateDisplay));r.on(this.$(".vjs-edge-style select"),"change",u.bind(this,this.updateDisplay));r.on(this.$(".vjs-font-family select"),"change",u.bind(this,this.updateDisplay));this.options_.persistTextTrackSettings&&this.restoreSettings()}return y(t,n),t.prototype.createEl=function(){return n.prototype.createEl.call(this,"div",{className:"vjs-caption-settings vjs-modal-overlay",innerHTML:p()})},t.prototype.getValues=function(){var i=f(this.$(".vjs-edge-style select")),r=f(this.$(".vjs-font-family select")),u=f(this.$(".vjs-fg-color > select")),e=f(this.$(".vjs-text-opacity > select")),o=f(this.$(".vjs-bg-color > select")),h=f(this.$(".vjs-bg-opacity > select")),c=f(this.$(".window-color > select")),l=f(this.$(".vjs-window-opacity > select")),a=s["default"].parseFloat(f(this.$(".vjs-font-percent > select"))),n={backgroundOpacity:h,textOpacity:e,windowOpacity:l,edgeStyle:i,fontFamily:r,color:u,backgroundColor:o,windowColor:c,fontPercent:a},t;for(t in n)(""===n[t]||"none"===n[t]||"fontPercent"===t&&1===n[t])&&delete n[t];return n},t.prototype.setValues=function(n){e(this.$(".vjs-edge-style select"),n.edgeStyle);e(this.$(".vjs-font-family select"),n.fontFamily);e(this.$(".vjs-fg-color > select"),n.color);e(this.$(".vjs-text-opacity > select"),n.textOpacity);e(this.$(".vjs-bg-color > select"),n.backgroundColor);e(this.$(".vjs-bg-opacity > select"),n.backgroundOpacity);e(this.$(".window-color > select"),n.windowColor);e(this.$(".vjs-window-opacity > select"),n.windowOpacity);var t=n.fontPercent;t&&(t=t.toFixed(2));e(this.$(".vjs-font-percent > select"),t)},t.prototype.restoreSettings=function(){var n=void 0,t=void 0,i;try{i=nt["default"](s["default"].localStorage.getItem("vjs-text-track-settings"));n=i[0];t=i[1];n&&h["default"].error(n)}catch(r){h["default"].warn(r)}t&&this.setValues(t)},t.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var n=this.getValues();try{Object.getOwnPropertyNames(n).length>0?s["default"].localStorage.setItem("vjs-text-track-settings",JSON.stringify(n)):s["default"].localStorage.removeItem("vjs-text-track-settings")}catch(t){h["default"].warn(t)}}},t.prototype.updateDisplay=function(){var n=this.player_.getChild("textTrackDisplay");n&&n.updateDisplay()},t}(l["default"]);l["default"].registerComponent("TextTrackSettings",a);i["default"]=a;t.exports=i["default"]},{"../component":67,"../utils/events.js":144,"../utils/fn.js":145,"../utils/log.js":148,"global/window":2,"safe-json-parse/tuple":54}],134:[function(n,t,i){"use strict";function o(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function a(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function v(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var y=n("./text-track-cue-list"),s=r(y),p=n("../utils/fn.js"),h=o(p),f=n("./track-enums"),w=n("../utils/log.js"),e=r(w),b=n("global/document"),k=(r(b),n("global/window")),u=r(k),d=n("./track.js"),g=r(d),nt=n("../utils/url.js"),tt=n("xhr"),it=r(tt),rt=n("../utils/merge-options"),ut=r(rt),ft=n("../utils/browser.js"),et=o(ft),c=function(n,t){var i=new u["default"].WebVTT.Parser(u["default"],u["default"].vttjs,u["default"].WebVTT.StringDecoder()),r=[];i.oncue=function(n){t.addCue(n)};i.onparsingerror=function(n){r.push(n)};i.onflush=function(){t.trigger({type:"loadeddata",target:t})};i.parse(n);r.length>0&&(console.groupCollapsed,r.forEach(function(n){return e["default"].error(n)}),console.groupEnd);i.flush()},ot=function(n,t){var i={uri:n},r=nt.isCrossOrigin(n);r&&(i.cors=r);it["default"](i,h.bind(this,function(n,i,r){return n?e["default"].error(n,i):(t.loaded_=!0,void("function"!=typeof u["default"].WebVTT?t.tech_&&!function(){var n=function(){return c(r,t)};t.tech_.on("vttjsloaded",n);t.tech_.on("vttjserror",function(){e["default"].error("vttjs failed to load, stopping trying to process "+t.src);t.tech_.off("vttjsloaded",n)})}():c(r,t)))}))},l=function(n){function t(){var u=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i,c;if(a(this,t),!u.tech)throw new Error("A tech was not provided.");var r=ut["default"](u,{kind:f.TextTrackKind[u.kind]||"subtitles",language:u.language||u.srclang||""}),e=f.TextTrackMode[r.mode]||"disabled",y=r["default"];if(("metadata"===r.kind||"chapters"===r.kind)&&(e="hidden"),i=n.call(this,r),i.tech_=r.tech,et.IS_IE8)for(c in t.prototype)"constructor"!==c&&(i[c]=t.prototype[c]);i.cues_=[];i.activeCues_=[];var p=new s["default"](i.cues_),l=new s["default"](i.activeCues_),o=!1,v=h.bind(i,function(){this.activeCues;o&&(this.trigger("cuechange"),o=!1)});return"disabled"!==e&&i.tech_.on("timeupdate",v),Object.defineProperty(i,"default",{get:function(){return y},set:function(){}}),Object.defineProperty(i,"mode",{get:function(){return e},set:function(n){f.TextTrackMode[n]&&(e=n,"showing"===e&&this.tech_.on("timeupdate",v),this.trigger("modechange"))}}),Object.defineProperty(i,"cues",{get:function(){return this.loaded_?p:null},set:function(){}}),Object.defineProperty(i,"activeCues",{get:function(){var n,t;if(!this.loaded_)return null;if(0===this.cues.length)return l;for(var r=this.tech_.currentTime(),i=[],t=0,u=this.cues.length;u>t;t++)n=this.cues[t],n.startTime<=r&&n.endTime>=r?i.push(n):n.startTime===n.endTime&&n.startTime<=r&&n.startTime+.5>=r&&i.push(n);if(o=!1,i.length!==this.activeCues_.length)o=!0;else for(t=0;t<i.length;t++)-1===this.activeCues_.indexOf(i[t])&&(o=!0);return this.activeCues_=i,l.setCues_(this.activeCues_),l},set:function(){}}),r.src?(i.src=r.src,ot(r.src,i)):i.loaded_=!0,i}return v(t,n),t.prototype.addCue=function(n){var i=this.tech_.textTracks(),t;if(i)for(t=0;t<i.length;t++)i[t]!==this&&i[t].removeCue(n);this.cues_.push(n);this.cues.setCues_(this.cues_)},t.prototype.removeCue=function(n){for(var r,i=!1,t=0,u=this.cues_.length;u>t;t++)r=this.cues_[t],r===n&&(this.cues_.splice(t,1),i=!0);i&&this.cues.setCues_(this.cues_)},t}(g["default"]);l.prototype.allowedEvents_={cuechange:"cuechange"};i["default"]=l;t.exports=i["default"]},{"../utils/browser.js":140,"../utils/fn.js":145,"../utils/log.js":148,"../utils/merge-options":149,"../utils/url.js":153,"./text-track-cue-list":129,"./track-enums":135,"./track.js":137,"global/document":1,"global/window":2,xhr:56}],135:[function(n,t,i){"use strict";i.__esModule=!0;i["default"]={VideoTrackKind:{alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},AudioTrackKind:{alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},TextTrackKind:{subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},TextTrackMode:{disabled:"disabled",hidden:"hidden",showing:"showing"}};t.exports=i["default"]},{}],136:[function(n,t,i){"use strict";function u(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function f(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var e;i.__esModule=!0;var h=n("../event-target"),c=f(h),l=n("../utils/fn.js"),a=(u(l),n("../utils/browser.js")),v=u(a),y=n("global/document"),p=f(y),r=function(n){function t(){var f=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],i=arguments.length<=1||void 0===arguments[1]?null:arguments[1],r,u;if(o(this,t),n.call(this),!i&&(i=this,v.IS_IE8)){i=p["default"].createElement("custom");for(r in t.prototype)"constructor"!==r&&(i[r]=t.prototype[r])}for(i.tracks_=[],Object.defineProperty(i,"length",{get:function(){return this.tracks_.length}}),u=0;u<f.length;u++)i.addTrack_(f[u]);return i}return s(t,n),t.prototype.addTrack_=function(n){var t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}});-1===this.tracks_.indexOf(n)&&(this.tracks_.push(n),this.trigger({track:n,type:"addtrack"}))},t.prototype.removeTrack_=function(n){for(var t=void 0,i=0,r=this.length;r>i;i++)if(this[i]===n){t=this[i];t.off&&t.off();this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack"})},t.prototype.getTrackById=function(n){for(var i,r=null,t=0,u=this.length;u>t;t++)if(i=this[t],i.id===n){r=i;break}return r},t}(c["default"]);r.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(e in r.prototype.allowedEvents_)r.prototype["on"+e]=null;i["default"]=r;t.exports=i["default"]},{"../event-target":104,"../utils/browser.js":140,"../utils/fn.js":145,"global/document":1}],137:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function u(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("../utils/browser.js"),s=u(o),h=n("global/document"),c=r(h),l=n("../utils/guid.js"),a=u(l),v=n("../event-target"),y=r(v),p=function(n){function t(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i,u,e,o,h;if(f(this,t),n.call(this),i=this,s.IS_IE8){i=c["default"].createElement("custom");for(u in t.prototype)"constructor"!==u&&(i[u]=t.prototype[u])}e={id:r.id||"vjs_track_"+a.newGUID(),kind:r.kind||"",label:r.label||"",language:r.language||""};o=function(n){Object.defineProperty(i,n,{get:function(){return e[n]},set:function(){}})};for(h in e)o(h);return i}return e(t,n),t}(y["default"]);i["default"]=p;t.exports=i["default"]},{"../event-target":104,"../utils/browser.js":140,"../utils/guid.js":147,"global/document":1}],138:[function(n,t,i){"use strict";function e(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function f(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var h=n("./track-list"),r=f(h),c=n("../utils/browser.js"),l=e(c),a=n("global/document"),v=f(a),u=function(n,t){for(var i=0;i<n.length;i++)t.id!==n[i].id&&(n[i].selected=!1)},y=function(n){function t(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],i,s,f;for(o(this,t),i=void 0,s=e.length-1;s>=0;s--)if(e[s].selected){u(e,e[s]);break}if(l.IS_IE8){i=v["default"].createElement("custom");for(f in r["default"].prototype)"constructor"!==f&&(i[f]=r["default"].prototype[f]);for(f in t.prototype)"constructor"!==f&&(i[f]=t.prototype[f])}return i=n.call(this,e,i),i.changing_=!1,Object.defineProperty(i,"selectedIndex",{get:function(){for(var n=0;n<this.length;n++)if(this[n].selected)return n;return-1},set:function(){}}),i}return s(t,n),t.prototype.addTrack_=function(t){var i=this;t.selected&&u(this,t);n.prototype.addTrack_.call(this,t);t.addEventListener&&t.addEventListener("selectedchange",function(){i.changing_||(i.changing_=!0,u(i,t),i.changing_=!1,i.trigger("change"))})},t.prototype.addTrack=function(n){this.addTrack_(n)},t.prototype.removeTrack=function(t){n.prototype.removeTrack_.call(this,t)},t}(r["default"]);i["default"]=y;t.exports=i["default"]},{"../utils/browser.js":140,"./track-list":136,"global/document":1}],139:[function(n,t,i){"use strict";function u(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function r(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function e(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}i.__esModule=!0;var o=n("./track-enums"),s=n("./track"),h=r(s),c=n("../utils/merge-options"),l=r(c),a=n("../utils/browser.js"),v=u(a),y=function(n){function t(){var s=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r;f(this,t);var u=l["default"](s,{kind:o.VideoTrackKind[s.kind]||""}),i=n.call(this,u),e=!1;if(v.IS_IE8)for(r in t.prototype)"constructor"!==r&&(i[r]=t.prototype[r]);return Object.defineProperty(i,"selected",{get:function(){return e},set:function(n){"boolean"==typeof n&&n!==e&&(e=n,this.trigger("selectedchange"))}}),u.selected&&(i.selected=u.selected),i}return e(t,n),t}(h["default"]);i["default"]=y;t.exports=i["default"]},{"../utils/browser.js":140,"../utils/merge-options":149,"./track":137,"./track-enums":135}],140:[function(n,t,i){"use strict";function l(n){return n&&n.__esModule?n:{"default":n}}var s,h,y,p,f,e,w,b,k,c,d,g,nt,tt;i.__esModule=!0;var it=n("global/document"),a=l(it),rt=n("global/window"),u=l(rt),r=u["default"].navigator.userAgent,v=/AppleWebKit\/([\d.]+)/i.exec(r),ut=v?parseFloat(v.pop()):null,o=/iPad/i.test(r);i.IS_IPAD=o;s=/iPhone/i.test(r)&&!o;i.IS_IPHONE=s;h=/iPod/i.test(r);i.IS_IPOD=h;y=s||o||h;i.IS_IOS=y;p=function(){var n=r.match(/OS (\d+)_/i);if(n&&n[1])return n[1]}();i.IOS_VERSION=p;f=/Android/i.test(r);i.IS_ANDROID=f;e=function(){var t,i,n=r.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return n?(t=n[1]&&parseFloat(n[1]),i=n[2]&&parseFloat(n[2]),t&&i?parseFloat(n[1]+"."+n[2]):t?t:null):null}();i.ANDROID_VERSION=e;w=f&&/webkit/i.test(r)&&2.3>e;i.IS_OLD_ANDROID=w;b=f&&5>e&&537>ut;i.IS_NATIVE_ANDROID=b;k=/Firefox/i.test(r);i.IS_FIREFOX=k;c=/Edge/i.test(r);i.IS_EDGE=c;d=!c&&/Chrome/i.test(r);i.IS_CHROME=d;g=/MSIE\s8\.0/.test(r);i.IS_IE8=g;nt=!!("ontouchstart"in u["default"]||u["default"].DocumentTouch&&a["default"]instanceof u["default"].DocumentTouch);i.TOUCH_ENABLED=nt;tt="backgroundSize"in a["default"].createElement("video").style;i.BACKGROUND_SIZE_SUPPORTED=tt},{"global/document":1,"global/window":2}],141:[function(n,t,i){"use strict";function r(n,t){var f,r,e=0,i;if(!t)return 0;for(n&&n.length||(n=u.createTimeRange(0,0)),i=0;i<n.length;i++)f=n.start(i),r=n.end(i),r>t&&(r=t),e+=r-f;return e/t}i.__esModule=!0;i.bufferedPercent=r;var u=n("./time-ranges.js")},{"./time-ranges.js":151}],142:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}i.__esModule=!0;var f=n("./log.js"),e=u(f),r={get:function(n,t){return n[t]},set:function(n,t,i){return n[t]=i,!0}};i["default"]=function(n){var i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],t;return"function"==typeof Proxy&&(t=function(){var t={};return Object.keys(i).forEach(function(n){r.hasOwnProperty(n)&&(t[n]=function(){return e["default"].warn(i[n]),r[n].apply(this,arguments)})}),{v:new Proxy(n,t)}}(),"object"==typeof t)?t.v:n};t.exports=i["default"]},{"./log.js":148}],143:[function(n,t,i){"use strict";function nt(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function e(n){return n&&n.__esModule?n:{"default":n}}function tt(n,t){return n.raw=t,n}function h(n){return"string"==typeof n&&/\S/.test(n)}function c(n){if(/\s/.test(n))throw new Error("class has illegal whitespace characters");}function it(n){return new RegExp("(^|\\s)"+n+"($|\\s)")}function l(n){return function(t,i){return h(t)?(h(i)&&(i=r["default"].querySelector(i)),(s(i)?i:r["default"])[n](t)):r["default"][n](null)}}function rt(n){return 0===n.indexOf("#")&&(n=n.slice(1)),r["default"].getElementById(n)}function ut(){var u=arguments.length<=0||void 0===arguments[0]?"div":arguments[0],i=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],t=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=r["default"].createElement(u);return Object.getOwnPropertyNames(i).forEach(function(t){var r=i[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(ii["default"].warn(ui["default"](bt,t,r)),n.setAttribute(t,r)):n[t]=r}),Object.getOwnPropertyNames(t).forEach(function(i){t[i];n.setAttribute(i,t[i])}),n}function ft(n,t){"undefined"==typeof n.textContent?n.innerText=t:n.textContent=t}function et(n,t){t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}function ot(n){var t=n[u];return t||(t=n[u]=ni.newGUID()),f[t]||(f[t]={}),f[t]}function st(n){var t=n[u];return t?!!Object.getOwnPropertyNames(f[t]).length:!1}function ht(n){var t=n[u];if(t){delete f[t];try{delete n[u]}catch(i){n.removeAttribute?n.removeAttribute(u):n[u]=null}}}function o(n,t){return n.classList?n.classList.contains(t):(c(t),it(t).test(n.className))}function a(n,t){return n.classList?n.classList.add(t):o(n,t)||(n.className=(n.className+" "+t).trim()),n}function v(n,t){return n.classList?n.classList.remove(t):(c(t),n.className=n.className.split(/\s+/).filter(function(n){return n!==t}).join(" ")),n}function ct(n,t,i){var r=o(n,t);return"function"==typeof i&&(i=i(n,t)),"boolean"!=typeof i&&(i=!r),i!==r?(i?a(n,t):v(n,t),n):void 0}function lt(n,t){Object.getOwnPropertyNames(t).forEach(function(i){var r=t[i];null===r||"undefined"==typeof r||r===!1?n.removeAttribute(i):n.setAttribute(i,r===!0?"":r)})}function at(n){var f,e,i,r,u,t;if(f={},e=",autoplay,controls,loop,muted,default,",n&&n.attributes&&n.attributes.length>0)for(i=n.attributes,t=i.length-1;t>=0;t--)r=i[t].name,u=i[t].value,("boolean"==typeof n[r]||-1!==e.indexOf(","+r+","))&&(u=null!==u?!0:!1),f[r]=u;return f}function vt(){r["default"].body.focus();r["default"].onselectstart=function(){return!1}}function yt(){r["default"].onselectstart=function(){return!0}}function y(n){var t=void 0;if(n.getBoundingClientRect&&n.parentNode&&(t=n.getBoundingClientRect()),!t)return{left:0,top:0};var u=r["default"].documentElement,i=r["default"].body,f=u.clientLeft||i.clientLeft||0,e=d["default"].pageXOffset||i.scrollLeft,o=t.left+e-f,s=u.clientTop||i.clientTop||0,h=d["default"].pageYOffset||i.scrollTop,c=t.top+h-s;return{left:Math.round(o),top:Math.round(c)}}function pt(n,t){var i={},r=y(n),o=n.offsetWidth,u=n.offsetHeight,s=r.top,h=r.left,f=t.pageY,e=t.pageX;return t.changedTouches&&(e=t.changedTouches[0].pageX,f=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(s-f+u)/u)),i.x=Math.max(0,Math.min(1,(e-h)/o)),i}function s(n){return!!n&&"object"==typeof n&&1===n.nodeType}function p(n){return!!n&&"object"==typeof n&&3===n.nodeType}function w(n){for(;n.firstChild;)n.removeChild(n.firstChild);return n}function b(n){return"function"==typeof n&&(n=n()),(Array.isArray(n)?n:[n]).map(function(n){return"function"==typeof n&&(n=n()),s(n)||p(n)?n:"string"==typeof n&&/\S/.test(n)?r["default"].createTextNode(n):void 0}).filter(function(n){return n})}function k(n,t){return b(t).forEach(function(t){return n.appendChild(t)}),n}function wt(n,t){return k(w(n),t)}var g;i.__esModule=!0;i.getEl=rt;i.createEl=ut;i.textContent=ft;i.insertElFirst=et;i.getElData=ot;i.hasElData=st;i.removeElData=ht;i.hasElClass=o;i.addElClass=a;i.removeElClass=v;i.toggleElClass=ct;i.setElAttributes=lt;i.getElAttributes=at;i.blockTextSelection=vt;i.unblockTextSelection=yt;i.findElPosition=y;i.getPointerPosition=pt;i.isEl=s;i.isTextNode=p;i.emptyEl=w;i.normalizeContent=b;i.appendContent=k;i.insertContent=wt;var bt=tt(["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 ","."]),kt=n("global/document"),r=e(kt),dt=n("global/window"),d=e(dt),gt=n("./guid.js"),ni=nt(gt),ti=n("./log.js"),ii=e(ti),ri=n("tsml"),ui=e(ri),f={},u="vdata"+(new Date).getTime(),fi=l("querySelector");i.$=fi;g=l("querySelectorAll");i.$$=g},{"./guid.js":147,"./log.js":148,"global/document":1,"global/window":2,tsml:55}],144:[function(n,t,i){"use strict";function h(n){return n&&n.__esModule?n:{"default":n}}function c(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function u(n,t,i){if(Array.isArray(t))return o(u,n,t,i);var f=r.getElData(n);f.handlers||(f.handlers={});f.handlers[t]||(f.handlers[t]=[]);i.guid||(i.guid=y.newGUID());f.handlers[t].push(i);f.dispatcher||(f.disabled=!1,f.dispatcher=function(t,i){var r;if(!f.disabled&&(t=e(t),r=f.handlers[t.type],r))for(var o=r.slice(0),u=0,s=o.length;s>u&&!t.isImmediatePropagationStopped();u++)o[u].call(n,t,i)});1===f.handlers[t].length&&(n.addEventListener?n.addEventListener(t,f.dispatcher,!1):n.attachEvent&&n.attachEvent("on"+t,f.dispatcher))}function f(n,t,i){var u,h,e,s,c;if(r.hasElData(n)&&(u=r.getElData(n),u.handlers)){if(Array.isArray(t))return o(f,n,t,i);if(h=function(t){u.handlers[t]=[];v(n,t)},t){if(e=u.handlers[t],e){if(!i)return void h(t);if(i.guid)for(s=0;s<e.length;s++)e[s].guid===i.guid&&e.splice(s--,1);v(n,t)}}else for(c in u.handlers)h(c)}}function l(n,t,i){var o=r.hasElData(n)?r.getElData(n):{},u=n.parentNode||n.ownerDocument,f;return("string"==typeof t&&(t={type:t,target:n}),t=e(t),o.dispatcher&&o.dispatcher.call(n,t,i),u&&!t.isPropagationStopped()&&t.bubbles===!0)?l.call(null,u,t,i):u||t.defaultPrevented||(f=r.getElData(t.target),t.target[t.type]&&(f.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),f.disabled=!1)),!t.defaultPrevented}function a(n,t,i){if(Array.isArray(t))return o(a,n,t,i);var r=function e(){f(n,t,e);i.apply(this,arguments)};r.guid=i.guid=i.guid||y.newGUID();u(n,t,r)}function e(n){function f(){return!0}function e(){return!1}var t,i,r,u;if(!n||!n.isPropagationStopped){t=n||k["default"].event;n={};for(i in t)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&t.preventDefault||(n[i]=t[i]));(n.target||(n.target=n.srcElement||s["default"]),n.relatedTarget||(n.relatedTarget=n.fromElement===n.target?n.toElement:n.fromElement),n.preventDefault=function(){t.preventDefault&&t.preventDefault();n.returnValue=!1;t.returnValue=!1;n.defaultPrevented=!0},n.defaultPrevented=!1,n.stopPropagation=function(){t.stopPropagation&&t.stopPropagation();n.cancelBubble=!0;t.cancelBubble=!0;n.isPropagationStopped=f},n.isPropagationStopped=e,n.stopImmediatePropagation=function(){t.stopImmediatePropagation&&t.stopImmediatePropagation();n.isImmediatePropagationStopped=f;n.stopPropagation()},n.isImmediatePropagationStopped=e,null!=n.clientX)&&(r=s["default"].documentElement,u=s["default"].body,n.pageX=n.clientX+(r&&r.scrollLeft||u&&u.scrollLeft||0)-(r&&r.clientLeft||u&&u.clientLeft||0),n.pageY=n.clientY+(r&&r.scrollTop||u&&u.scrollTop||0)-(r&&r.clientTop||u&&u.clientTop||0));n.which=n.charCode||n.keyCode;null!=n.button&&(n.button=1&n.button?0:4&n.button?1:2&n.button?2:0)}return n}function v(n,t){var i=r.getElData(n);0===i.handlers[t].length&&(delete i.handlers[t],n.removeEventListener?n.removeEventListener(t,i.dispatcher,!1):n.detachEvent&&n.detachEvent("on"+t,i.dispatcher));Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled);0===Object.getOwnPropertyNames(i).length&&r.removeElData(n)}function o(n,t,i,r){i.forEach(function(i){n(t,i,r)})}i.__esModule=!0;i.on=u;i.off=f;i.trigger=l;i.one=a;i.fixEvent=e;var p=n("./dom.js"),r=c(p),w=n("./guid.js"),y=c(w),b=n("global/window"),k=h(b),d=n("global/document"),s=h(d)},{"./dom.js":143,"./guid.js":147,"global/document":1,"global/window":2}],145:[function(n,t,i){"use strict";i.__esModule=!0;var r=n("./guid.js"),u=function(n,t,i){t.guid||(t.guid=r.newGUID());var u=function(){return t.apply(n,arguments)};return u.guid=i?i+"_"+t.guid:t.guid,u};i.bind=u},{"./guid.js":147}],146:[function(n,t,i){"use strict";function r(n){var t=arguments.length<=1||void 0===arguments[1]?n:arguments[1];return function(){n=0>n?0:n;var i=Math.floor(n%60),r=Math.floor(n/60%60),u=Math.floor(n/3600),f=Math.floor(t/60%60),e=Math.floor(t/3600);return(isNaN(n)||n===1/0)&&(u=r=i="-"),u=u>0||e>0?u+":":"",r=((u||f>=10)&&10>r?"0"+r:r)+":",i=10>i?"0"+i:i,u+r+i}()}i.__esModule=!0;i["default"]=r;t.exports=i["default"]},{}],147:[function(n,t,i){"use strict";function r(){return u++}i.__esModule=!0;i.newGUID=r;var u=1},{}],148:[function(n,t,i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function u(n,t){var i=Array.prototype.slice.call(t),f=function(){},u=o["default"].console||{log:f,warn:f,error:f};n?i.unshift(n.toUpperCase()+":"):n="log";r.history.push(i);i.unshift("VIDEOJS:");u[n].apply?u[n].apply(u,i):u[n](i.join(" "))}i.__esModule=!0;var e=n("global/window"),o=f(e),r=function(){u(null,arguments)};r.history=[];r.error=function(){u("error",arguments)};r.warn=function(){u("warn",arguments)};i["default"]=r;t.exports=i["default"]},{"global/window":2}],149:[function(n,t,i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function r(n){return!!n&&"object"==typeof n&&"[object Object]"===n.toString()&&n.constructor===Object}function u(){var n=Array.prototype.slice.call(arguments);return n.unshift({}),n.push(s),o["default"].apply(null,n),n[0]}i.__esModule=!0;i["default"]=u;var e=n("lodash-compat/object/merge"),o=f(e),s=function(n,t){return r(t)?r(n)?void 0:u(t):t};t.exports=i["default"]},{"lodash-compat/object/merge":40}],150:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}var r;i.__esModule=!0;var f=n("global/document"),e=u(f),o=function(n){var t=e["default"].createElement("style");return t.className=n,t};i.createStyleElement=o;r=function(n,t){n.styleSheet?n.styleSheet.cssText=t:n.textContent=t};i.setTextContent=r},{"global/document":1}],151:[function(n,t,i){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}function u(n,t){return Array.isArray(n)?r(n):void 0===n||void 0===t?r():r([[n,t]])}function r(n){return void 0===n||0===n.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty");},end:function(){throw new Error("This TimeRanges object is empty");}}:{length:n.length,start:f.bind(null,"start",0,n),end:f.bind(null,"end",1,n)}}function f(n,t,i,r){return void 0===r&&(h["default"].warn("DEPRECATED: Function '"+n+"' on 'TimeRanges' called without an index argument."),r=0),o(n,r,i.length-1),i[r][t]}function o(n,t,i){if(0>t||t>i)throw new Error("Failed to execute '"+n+"' on 'TimeRanges': The index provided ("+t+") is greater than or equal to the maximum bound ("+i+").");}i.__esModule=!0;i.createTimeRanges=u;var s=n("./log.js"),h=e(s);i.createTimeRange=u},{"./log.js":148}],152:[function(n,t,i){"use strict";function r(n){return n.charAt(0).toUpperCase()+n.slice(1)}i.__esModule=!0;i["default"]=r;t.exports=i["default"]},{}],153:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}var e,o,s;i.__esModule=!0;var h=n("global/document"),r=u(h),c=n("global/window"),l=u(c),f=function(n){var e=["protocol","hostname","port","pathname","search","hash","host"],u=r["default"].createElement("a"),o,i,t,f;for(u.href=n,o=""===u.host&&"file:"!==u.protocol,i=void 0,o&&(i=r["default"].createElement("div"),i.innerHTML='<a href="'+n+'"><\/a>',u=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),r["default"].body.appendChild(i)),t={},f=0;f<e.length;f++)t[e[f]]=u[e[f]];return"http:"===t.protocol&&(t.host=t.host.replace(/:80$/,"")),"https:"===t.protocol&&(t.host=t.host.replace(/:443$/,"")),o&&r["default"].body.removeChild(i),t};i.parseUrl=f;e=function(n){if(!n.match(/^https?:\/\//)){var t=r["default"].createElement("div");t.innerHTML='<a href="'+n+'">x<\/a>';n=t.firstChild.href}return n};i.getAbsoluteURL=e;o=function(n){if("string"==typeof n){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(n);if(t)return t.pop().toLowerCase()}return""};i.getFileExtension=o;s=function(n){var t=l["default"].location,i=f(n),r=":"===i.protocol?t.protocol:i.protocol;return r+i.host!==t.protocol+t.host};i.isCrossOrigin=s},{"global/document":1,"global/window":2}],154:[function(t,i,r){"use strict";function o(n){var t,i;if(n&&n.__esModule)return n;if(t={},null!=n)for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t["default"]=n,t}function f(n){return n&&n.__esModule?n:{"default":n}}var u,h,w;r.__esModule=!0;var g=t("global/window"),nt=f(g),tt=t("global/document"),l=f(tt),it=t("./setup"),rt=o(it),ut=t("./utils/stylesheet.js"),b=o(ut),ft=t("./component"),a=f(ft),et=t("./event-target"),ot=f(et),st=t("./utils/events.js"),c=o(st),ht=t("./player"),s=f(ht),ct=t("./plugins.js"),lt=f(ct),at=t("../../src/js/utils/merge-options.js"),vt=f(at),yt=t("./utils/fn.js"),pt=o(yt),wt=t("./tracks/text-track.js"),bt=f(wt),kt=t("./tracks/audio-track.js"),dt=f(kt),gt=t("./tracks/video-track.js"),ni=f(gt),ti=t("object.assign"),ii=(f(ti),t("./utils/time-ranges.js")),ri=t("./utils/format-time.js"),ui=f(ri),fi=t("./utils/log.js"),v=f(fi),ei=t("./utils/dom.js"),e=o(ei),oi=t("./utils/browser.js"),k=o(oi),si=t("./utils/url.js"),d=o(si),hi=t("./extend.js"),ci=f(hi),li=t("lodash-compat/object/merge"),ai=f(li),vi=t("./utils/create-deprecation-proxy.js"),yi=f(vi),pi=t("xhr"),wi=f(pi),bi=t("./tech/tech.js"),y=f(bi),ki=t("./tech/html5.js"),di=(f(ki),t("./tech/flash.js"));f(di);"undefined"==typeof HTMLVideoElement&&(l["default"].createElement("video"),l["default"].createElement("audio"),l["default"].createElement("track"));u=function p(n,t,i){var r=void 0;if("string"==typeof n){if(0===n.indexOf("#")&&(n=n.slice(1)),p.getPlayers()[n])return t&&v["default"].warn('Player "'+n+'" is already initialised. Options will not be applied.'),i&&p.getPlayers()[n].ready(i),p.getPlayers()[n];r=e.getEl(n)}else r=n;if(!r||!r.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return r.player||s["default"].players[r.playerId]||new s["default"](r,t,i)};nt["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0&&(h=e.$(".vjs-styles-defaults"),h||(h=b.createStyleElement("vjs-styles-defaults"),w=e.$("head"),w.insertBefore(h,w.firstChild),b.setTextContent(h,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")));rt.autoSetupTimeout(1,u);u.VERSION="5.10.4";u.options=s["default"].prototype.options_;u.getPlayers=function(){return s["default"].players};u.players=yi["default"](s["default"].players,{get:"Access to videojs.players is deprecated; use videojs.getPlayers instead",set:"Modification of videojs.players is deprecated"});u.getComponent=a["default"].getComponent;u.registerComponent=function(n,t){y["default"].isTech(t)&&v["default"].warn("The "+n+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)");a["default"].registerComponent.call(a["default"],n,t)};u.getTech=y["default"].getTech;u.registerTech=y["default"].registerTech;u.browser=k;u.TOUCH_ENABLED=k.TOUCH_ENABLED;u.extend=ci["default"];u.mergeOptions=vt["default"];u.bind=pt.bind;u.plugin=lt["default"];u.addLanguage=function(n,t){var i;return n=(""+n).toLowerCase(),ai["default"](u.options.languages,(i={},i[n]=t,i))[n]};u.log=v["default"];u.createTimeRange=u.createTimeRanges=ii.createTimeRanges;u.formatTime=ui["default"];u.parseUrl=d.parseUrl;u.isCrossOrigin=d.isCrossOrigin;u.EventTarget=ot["default"];u.on=c.on;u.one=c.one;u.off=c.off;u.trigger=c.trigger;u.xhr=wi["default"];u.TextTrack=bt["default"];u.AudioTrack=dt["default"];u.VideoTrack=ni["default"];u.isEl=e.isEl;u.isTextNode=e.isTextNode;u.createEl=e.createEl;u.hasClass=e.hasElClass;u.addClass=e.addElClass;u.removeClass=e.removeElClass;u.toggleClass=e.toggleElClass;u.setAttributes=e.setElAttributes;u.getAttributes=e.getElAttributes;u.emptyEl=e.emptyEl;u.appendContent=e.appendContent;u.insertContent=e.insertContent;"function"==typeof n&&n.amd?n("videojs",[],function(){return u}):"object"==typeof r&&"object"==typeof i&&(i.exports=u);r["default"]=u;i.exports=r["default"]},{"../../src/js/utils/merge-options.js":149,"./component":67,"./event-target":104,"./extend.js":105,"./player":113,"./plugins.js":114,"./setup":118,"./tech/flash.js":121,"./tech/html5.js":122,"./tech/tech.js":124,"./tracks/audio-track.js":126,"./tracks/text-track.js":134,"./tracks/video-track.js":139,"./utils/browser.js":140,"./utils/create-deprecation-proxy.js":142,"./utils/dom.js":143,"./utils/events.js":144,"./utils/fn.js":145,"./utils/format-time.js":146,"./utils/log.js":148,"./utils/stylesheet.js":150,"./utils/time-ranges.js":151,"./utils/url.js":153,"global/document":1,"global/window":2,"lodash-compat/object/merge":40,"object.assign":45,xhr:56}]},{},[154])(154)}),function(n){var t=n.vttjs={},i=t.VTTCue,r=t.VTTRegion,u=n.VTTCue,f=n.VTTRegion;t.shim=function(){t.VTTCue=i;t.VTTRegion=r};t.restore=function(){t.VTTCue=u;t.VTTRegion=f}}(this),function(n,t){function f(n){if("string"!=typeof n)return!1;var t=o[n.toLowerCase()];return t?n.toLowerCase():!1}function r(n){if("string"!=typeof n)return!1;var t=s[n.toLowerCase()];return t?n.toLowerCase():!1}function i(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)n[r]=i[r]}return n}function u(n,t,u){var o=this,h=/MSIE\s8\.0/.test(navigator.userAgent),s={};h?o=document.createElement("custom"):s.enumerable=!0;o.hasBeenReset=!1;var c="",l=!1,a=n,v=t,y=u,p=null,w="",b=!0,k="auto",d="start",g=50,nt="middle",tt=50,it="middle";return Object.defineProperty(o,"id",i({},s,{get:function(){return c},set:function(n){c=""+n}})),Object.defineProperty(o,"pauseOnExit",i({},s,{get:function(){return l},set:function(n){l=!!n}})),Object.defineProperty(o,"startTime",i({},s,{get:function(){return a},set:function(n){if("number"!=typeof n)throw new TypeError("Start time must be set to a number.");a=n;this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",i({},s,{get:function(){return v},set:function(n){if("number"!=typeof n)throw new TypeError("End time must be set to a number.");v=n;this.hasBeenReset=!0}})),Object.defineProperty(o,"text",i({},s,{get:function(){return y},set:function(n){y=""+n;this.hasBeenReset=!0}})),Object.defineProperty(o,"region",i({},s,{get:function(){return p},set:function(n){p=n;this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",i({},s,{get:function(){return w},set:function(n){var t=f(n);if(t===!1)throw new SyntaxError("An invalid or illegal string was specified.");w=t;this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",i({},s,{get:function(){return b},set:function(n){b=!!n;this.hasBeenReset=!0}})),Object.defineProperty(o,"line",i({},s,{get:function(){return k},set:function(n){if("number"!=typeof n&&n!==e)throw new SyntaxError("An invalid number or illegal string was specified.");k=n;this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",i({},s,{get:function(){return d},set:function(n){var t=r(n);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");d=t;this.hasBeenReset=!0}})),Object.defineProperty(o,"position",i({},s,{get:function(){return g},set:function(n){if(0>n||n>100)throw new Error("Position must be between 0 and 100.");g=n;this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",i({},s,{get:function(){return nt},set:function(n){var t=r(n);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");nt=t;this.hasBeenReset=!0}})),Object.defineProperty(o,"size",i({},s,{get:function(){return tt},set:function(n){if(0>n||n>100)throw new Error("Size must be between 0 and 100.");tt=n;this.hasBeenReset=!0}})),Object.defineProperty(o,"align",i({},s,{get:function(){return it},set:function(n){var t=r(n);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");it=t;this.hasBeenReset=!0}})),o.displayState=void 0,h?o:void 0}var e="auto",o={"":!0,lr:!0,rl:!0},s={start:!0,middle:!0,end:!0,left:!0,right:!0};u.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};n.VTTCue=n.VTTCue||u;t.VTTCue=u}(this,this.vttjs||{}),function(n,t){function u(n){if("string"!=typeof n)return!1;var t=f[n.toLowerCase()];return t?n.toLowerCase():!1}function i(n){return"number"==typeof n&&n>=0&&100>=n}function r(){var n=100,t=3,r=0,f=100,e=0,o=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return n},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");n=t}},lines:{enumerable:!0,get:function(){return t},set:function(n){if("number"!=typeof n)throw new TypeError("Lines must be set to a number.");t=n}},regionAnchorY:{enumerable:!0,get:function(){return f},set:function(n){if(!i(n))throw new Error("RegionAnchorX must be between 0 and 100.");f=n}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(n){if(!i(n))throw new Error("RegionAnchorY must be between 0 and 100.");r=n}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(n){if(!i(n))throw new Error("ViewportAnchorY must be between 0 and 100.");o=n}},viewportAnchorX:{enumerable:!0,get:function(){return e},set:function(n){if(!i(n))throw new Error("ViewportAnchorX must be between 0 and 100.");e=n}},scroll:{enumerable:!0,get:function(){return s},set:function(n){var t=u(n);if(t===!1)throw new SyntaxError("An invalid or illegal string was specified.");s=t}}})}var f={"":!0,up:!0};n.VTTRegion=n.VTTRegion||r;t.VTTRegion=r}(this,this.vttjs||{}),function(n){function i(n,t){this.name="ParsingError";this.code=n.code;this.message=t||n.message}function h(n){function i(n,t,i,r){return 3600*(0|n)+60*(0|t)+(0|i)+(0|r)/1e3}var t=n.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return t?t[3]?i(t[1],t[2],t[3].replace(":",""),t[4]):t[1]>59?i(t[1],t[2],0,t[4]):i(0,t[1],t[2],t[4]):null}function u(){this.values=s(null)}function o(n,t,i,r){var f=r?n.split(r):[n],e,u,o,s;for(e in f)"string"==typeof f[e]&&(u=f[e].split(i),2===u.length&&(o=u[0],s=u[1],t(o,s)))}function v(n,t,r){function e(){var t=h(n);if(null===t)throw new i(i.Errors.BadTimeStamp,"Malformed timestamp: "+s);return n=n.replace(/^[^\sa-zA-Z-]+/,""),t}function c(n,t){var i=new u;o(n,function(n,t){var f,u,e;switch(n){case"region":for(f=r.length-1;f>=0;f--)if(r[f].id===t){i.set(n,r[f].region);break}break;case"vertical":i.alt(n,t,["rl","lr"]);break;case"line":u=t.split(",");e=u[0];i.integer(n,e);i.percent(n,e)?i.set("snapToLines",!1):null;i.alt(n,e,["auto"]);2===u.length&&i.alt("lineAlign",u[1],["start","middle","end"]);break;case"position":u=t.split(",");i.percent(n,u[0]);2===u.length&&i.alt("positionAlign",u[1],["start","middle","end"]);break;case"size":i.percent(n,t);break;case"align":i.alt(n,t,["start","middle","end","left","right"])}},/:/,/\s/);t.region=i.get("region",null);t.vertical=i.get("vertical","");t.line=i.get("line","auto");t.lineAlign=i.get("lineAlign","start");t.snapToLines=i.get("snapToLines",!0);t.size=i.get("size",100);t.align=i.get("align","middle");t.position=i.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align);t.positionAlign=i.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}function f(){n=n.replace(/^\s+/,"")}var s=n;if(f(),t.startTime=e(),f(),"-->"!==n.substr(0,3))throw new i(i.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+s);n=n.substr(3);f();t.endTime=e();f();c(n,t)}function c(n,t){function c(){function i(n){return t=t.substr(n.length),n}if(!t)return null;var n=t.match(/^([^<]*)(<[^>]+>?)?/);return i(n[1]?n[1]:n[2])}function a(n){return b[n]}function v(n){for(;i=n.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)n=n.replace(i[0],a);return n}function y(n,t){return!l[t.localName]||l[t.localName]===n.localName}function p(t,i){var u=k[t],r,f;return u?(r=n.document.createElement(u),r.localName=u,f=d[t],f&&i&&(r[f]=i.trim()),r):null}for(var u,o,i,r,s=n.document.createElement("div"),f=s,e=[];null!==(r=c());)if("<"!==r[0])f.appendChild(n.document.createTextNode(v(r)));else{if("/"===r[1]){e.length&&e[e.length-1]===r.substr(2).replace(">","")&&(e.pop(),f=f.parentNode);continue}if(o=h(r.substr(1,r.length-2)),o){u=n.document.createProcessingInstruction("timestamp",o);f.appendChild(u);continue}if(i=r.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/),!i)continue;if(u=p(i[1],i[3]),!u)continue;if(!y(f,u))continue;i[2]&&(u.className=i[2].substr(1).replace("."," "));e.push(i[1]);f.appendChild(u);f=u}return s}function y(n){function f(n,t){for(var i=t.childNodes.length-1;i>=0;i--)n.push(t.childNodes[i])}function r(n){var t,i,u;return!n||!n.length?null:(t=n.pop(),i=t.textContent||t.innerText,i)?(u=i.match(/^.*(\n|\r)/),u?(n.length=0,u[0]):i):"ruby"===t.tagName?r(n):t.childNodes?(f(n,t),r(n)):void 0}var e,o=[],u="",t,i;if(!n||!n.childNodes)return"ltr";for(f(o,n);u=r(o);)for(t=0;t<u.length;t++)for(e=u.charCodeAt(t),i=0;i<a.length;i++)if(a[i]===e)return"rtl";return"ltr"}function p(n){if("number"==typeof n.line&&(n.snapToLines||n.line>=0&&n.line<=100))return n.line;if(!n.track||!n.track.textTrackList||!n.track.textTrackList.mediaElement)return-1;for(var r=n.track,i=r.textTrackList,u=0,t=0;t<i.length&&i[t]!==r;t++)"showing"===i[t].mode&&u++;return-1*++u}function f(){}function e(n,t,i){var e=/MSIE\s8\.0/.test(navigator.userAgent),o="rgba(255, 255, 255, 1)",s="rgba(0, 0, 0, 0.8)",r,u;e&&(o="rgb(255, 255, 255)",s="rgb(0, 0, 0)");f.call(this);this.cue=t;this.cueDiv=c(n,t.text);r={color:o,backgroundColor:s,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};e||(r.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",r.unicodeBidi="plaintext");this.applyStyles(r,this.cueDiv);this.div=n.document.createElement("div");r={textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"};e||(r.direction=y(this.cueDiv),r.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext");this.applyStyles(r);this.div.appendChild(this.cueDiv);u=0;switch(t.positionAlign){case"start":u=t.position;break;case"middle":u=t.position-t.size/2;break;case"end":u=t.position-t.size}this.applyStyles(""===t.vertical?{left:this.formatStyle(u,"%"),width:this.formatStyle(t.size,"%")}:{top:this.formatStyle(u,"%"),height:this.formatStyle(t.size,"%")});this.move=function(n){this.applyStyles({top:this.formatStyle(n.top,"px"),bottom:this.formatStyle(n.bottom,"px"),left:this.formatStyle(n.left,"px"),right:this.formatStyle(n.right,"px"),height:this.formatStyle(n.height,"px"),width:this.formatStyle(n.width,"px")})}}function t(n){var i,r,f,u,e=/MSIE\s8\.0/.test(navigator.userAgent),t;n.div&&(r=n.div.offsetHeight,f=n.div.offsetWidth,u=n.div.offsetTop,t=(t=n.div.childNodes)&&(t=t[0])&&t.getClientRects&&t.getClientRects(),n=n.div.getBoundingClientRect(),i=t?Math.max(t[0]&&t[0].height||0,n.height/t.length):0);this.left=n.left;this.right=n.right;this.top=n.top||u;this.height=n.height||r;this.bottom=n.bottom||u+(n.height||r);this.width=n.width||f;this.lineHeight=void 0!==i?i:n.lineHeight;e&&!this.lineHeight&&(this.lineHeight=13)}function w(n,i,r,u){function w(n,i){for(var e,o,s=new t(n),h=1,f=0;f<i.length;f++){for(;n.overlapsOppositeAxis(r,i[f])||n.within(r)&&n.overlapsAny(u);)n.move(i[f]);if(n.within(r))return n;e=n.intersectPercentage(r);h>e&&(o=new t(n),h=e);n=new t(s)}return o||s}var h=new t(i),o=i.cue,e=p(o),f=[],c,a,y;if(o.snapToLines){switch(o.vertical){case"":f=["+y","-y"];c="height";break;case"rl":f=["+x","-x"];c="width";break;case"lr":f=["-x","+x"];c="width"}var l=h.lineHeight,s=l*Math.round(e),v=r[c]+l,b=f[0];Math.abs(s)>v&&(s=0>s?-1:1,s*=Math.ceil(v/l)*l);0>e&&(s+=""===o.vertical?r.height:r.width,f=f.reverse());h.move(b,s)}else{a=h.lineHeight/r.height*100;switch(o.lineAlign){case"middle":e-=a/2;break;case"end":e-=a}switch(o.vertical){case"":i.applyStyles({top:i.formatStyle(e,"%")});break;case"rl":i.applyStyles({left:i.formatStyle(e,"%")});break;case"lr":i.applyStyles({right:i.formatStyle(e,"%")})}f=["+y","-x","+x","-y"];h=new t(i)}y=w(h,f);i.move(y.toCSSCompatValues(r))}function r(){}var s=Object.create||function(){function n(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return n.prototype=t,new n}}();i.prototype=s(Error.prototype);i.prototype.constructor=i;i.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};u.prototype={set:function(n,t){this.get(n)||""===t||(this.values[n]=t)},get:function(n,t,i){return i?this.has(n)?this.values[n]:t[i]:this.has(n)?this.values[n]:t},has:function(n){return n in this.values},alt:function(n,t,i){for(var r=0;r<i.length;++r)if(t===i[r]){this.set(n,t);break}},integer:function(n,t){/^-?\d+$/.test(t)&&this.set(n,parseInt(t,10))},percent:function(n,t){var i;return(i=t.match(/^([\d]{1,3})(\.[\d]*)?%$/))&&(t=parseFloat(t),t>=0&&100>=t)?(this.set(n,t),!0):!1}};var b={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},k={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={v:"title",lang:"lang"},l={rt:"ruby"},a=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];f.prototype.applyStyles=function(n,t){t=t||this.div;for(var i in n)n.hasOwnProperty(i)&&(t.style[i]=n[i])};f.prototype.formatStyle=function(n,t){return 0===n?0:n+t};e.prototype=s(f.prototype);e.prototype.constructor=e;t.prototype.move=function(n,t){switch(t=void 0!==t?t:this.lineHeight,n){case"+x":this.left+=t;this.right+=t;break;case"-x":this.left-=t;this.right-=t;break;case"+y":this.top+=t;this.bottom+=t;break;case"-y":this.top-=t;this.bottom-=t}};t.prototype.overlaps=function(n){return this.left<n.right&&this.right>n.left&&this.top<n.bottom&&this.bottom>n.top};t.prototype.overlapsAny=function(n){for(var t=0;t<n.length;t++)if(this.overlaps(n[t]))return!0;return!1};t.prototype.within=function(n){return this.top>=n.top&&this.bottom<=n.bottom&&this.left>=n.left&&this.right<=n.right};t.prototype.overlapsOppositeAxis=function(n,t){switch(t){case"+x":return this.left<n.left;case"-x":return this.right>n.right;case"+y":return this.top<n.top;case"-y":return this.bottom>n.bottom}};t.prototype.intersectPercentage=function(n){var t=Math.max(0,Math.min(this.right,n.right)-Math.max(this.left,n.left)),i=Math.max(0,Math.min(this.bottom,n.bottom)-Math.max(this.top,n.top)),r=t*i;return r/(this.height*this.width)};t.prototype.toCSSCompatValues=function(n){return{top:this.top-n.top,bottom:n.bottom-this.bottom,left:this.left-n.left,right:n.right-this.right,height:this.height,width:this.width}};t.getSimpleBoxPosition=function(n){var t=n.div?n.div.offsetHeight:n.tagName?n.offsetHeight:0,r=n.div?n.div.offsetWidth:n.tagName?n.offsetWidth:0,i=n.div?n.div.offsetTop:n.tagName?n.offsetTop:0;return n=n.div?n.div.getBoundingClientRect():n.tagName?n.getBoundingClientRect():n,{left:n.left,right:n.right,top:n.top||i,height:n.height||t,bottom:n.bottom||i+(n.height||t),width:n.width||r}};r.StringDecoder=function(){return{decode:function(n){if(!n)return"";if("string"!=typeof n)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(n))}}};r.convertCueToDOMTree=function(n,t){return n&&t?c(n,t):null};var g=.05,nt="sans-serif",tt="1.5%";r.processCues=function(n,i,r){function h(n){for(var t=0;t<n.length;t++)if(n[t].hasBeenReset||!n[t].displayState)return!0;return!1}var u,f;if(!n||!i||!r)return null;for(;r.firstChild;)r.removeChild(r.firstChild);if(u=n.document.createElement("div"),u.style.position="absolute",u.style.left="0",u.style.right="0",u.style.top="0",u.style.bottom="0",u.style.margin=tt,r.appendChild(u),h(i)){var o=[],s=t.getSimpleBoxPosition(u),c=Math.round(s.height*g*100)/100,l={font:c+"px "+nt};!function(){for(var r,f,h=0;h<i.length;h++)f=i[h],r=new e(n,f,l),u.appendChild(r.div),w(n,r,s,o),f.displayState=r.div,o.push(t.getSimpleBoxPosition(r))}()}else for(f=0;f<i.length;f++)u.appendChild(i[f].displayState)};r.Parser=function(n,t,i){i||(i=t,t={});t||(t={});this.window=n;this.vttjs=t;this.state="INITIAL";this.buffer="";this.decoder=i||new TextDecoder("utf8");this.regionList=[]};r.Parser.prototype={reportOrThrowError:function(n){if(!(n instanceof i))throw n;this.onparsingerror&&this.onparsingerror(n)},parse:function(n){function s(){for(var r,i=t.buffer,n=0;n<i.length&&"\r"!==i[n]&&"\n"!==i[n];)++n;return r=i.substr(0,n),"\r"===i[n]&&++n,"\n"===i[n]&&++n,t.buffer=i.substr(n),r}function l(n){var i=new u,r;(o(n,function(n,t){var f,r;switch(n){case"id":i.set(n,t);break;case"width":i.percent(n,t);break;case"lines":i.integer(n,t);break;case"regionanchor":case"viewportanchor":if(f=t.split(","),2!==f.length)break;if(r=new u,r.percent("x",f[0]),r.percent("y",f[1]),!r.has("x")||!r.has("y"))break;i.set(n+"X",r.get("x"));i.set(n+"Y",r.get("y"));break;case"scroll":i.alt(n,t,["up"])}},/=/,/\s/),i.has("id"))&&(r=new(t.vttjs.VTTRegion||t.window.VTTRegion),r.width=i.get("width",100),r.lines=i.get("lines",3),r.regionAnchorX=i.get("regionanchorX",0),r.regionAnchorY=i.get("regionanchorY",100),r.viewportAnchorX=i.get("viewportanchorX",0),r.viewportAnchorY=i.get("viewportanchorY",100),r.scroll=i.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:i.get("id"),region:r}))}function a(n){o(n,function(n,t){switch(n){case"Region":l(t)}},/:/)}var t=this,r,e,f,c;n&&(t.buffer+=t.decoder.decode(n,{stream:!0}));try{if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;if(r=s(),e=r.match(/^WEBVTT([ \t].*)?$/),!e||!e[0])throw new i(i.Errors.BadSignature);t.state="HEADER"}for(f=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(f?f=!1:r=s(),t.state){case"HEADER":/:/.test(r)?a(r):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;if(t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,""),t.state="CUE",-1===r.indexOf("-->")){t.cue.id=r;continue}case"CUE":try{v(r,t.cue,t.regionList)}catch(h){t.reportOrThrowError(h);t.cue=null;t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":if(c=-1!==r.indexOf("-->"),!r||c&&(f=!0)){t.oncue&&t.oncue(t.cue);t.cue=null;t.state="ID";continue}t.cue.text&&(t.cue.text+="\n");t.cue.text+=r;continue;case"BADCUE":r||(t.state="ID");continue}}}catch(h){t.reportOrThrowError(h);"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue);t.cue=null;t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var n=this;try{if(n.buffer+=n.decoder.decode(),(n.cue||"HEADER"===n.state)&&(n.buffer+="\n\n",n.parse()),"INITIAL"===n.state)throw new i(i.Errors.BadSignature);}catch(t){n.reportOrThrowError(t)}return n.onflush&&n.onflush(),this}};n.WebVTT=r}(this,this.vttjs||{}),function(n){if(typeof exports=="object"&&typeof module!="undefined")module.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var t;t=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this;t.videojsContribHls=n()}}(function(){var n;return function t(n,i,r){function f(u,o){var h,c,s;if(!i[u]){if(!n[u]){if(h=typeof require=="function"&&require,!o&&h)return h(u,!0);if(e)return e(u,!0);c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[u]={exports:{}};n[u][0].call(s.exports,function(t){var i=n[u][1][t];return f(i?i:t)},s,s.exports,t,n,i,r)}return i[u].exports}for(var e=typeof require=="function"&&require,u=0;u<r.length;u++)f(r[u]);return f}({1:[function(n,t,i){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}var r;Object.defineProperty(i,"__esModule",{value:!0});r=function(){function n(n,t){var r=[],u=!0,f=!1,e=undefined,i,o;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done);u=!0)if(r.push(o.value),t&&r.length===t)break}catch(s){f=!0;e=s}finally{try{!u&&i["return"]&&i["return"]()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}();var o=n("global/window"),u=e(o),f=function(n,t){for(var u=n.cues,r,i=0;i<u.length;i++)if(r=u[i],t>=r.adStartTime&&t<=r.adEndTime)return r;return null},s=function(n,t){var a=arguments.length<=2||arguments[2]===undefined?0:arguments[2],e,i,s,o;if(n.segments)for(e=a,i=undefined,s=0;s<n.segments.length;s++){if(o=n.segments[s],i||(i=f(t,e+o.duration/2)),i){if("cueIn"in o){i.endTime=e;i.adEndTime=e;e+=o.duration;i=null;continue}if(e<i.endTime){e+=o.duration;continue}i.endTime+=o.duration}else if("cueOut"in o&&(i=new u["default"].VTTCue(e,e+o.duration,o.cueOut),i.adStartTime=e,i.adEndTime=e+parseFloat(o.cueOut),t.addCue(i)),"cueOutCont"in o){var h=undefined,c=undefined,v=o.cueOutCont.split("/").map(parseFloat),l=r(v,2);h=l[0];c=l[1];i=new u["default"].VTTCue(e,e+o.duration,"");i.adStartTime=e-h;i.adEndTime=i.adStartTime+c;t.addCue(i)}e+=o.duration}};i["default"]={updateAdCues:s,findAdCue:f};t.exports=i["default"]},{"global/window":30}],2:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var u=function(n,t){return n.start(t)+"-"+n.end(t)},f=function(n,t){var i=n.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},e=function(n){return n>=32&&n<126?String.fromCharCode(n):"."},o=function(n){var t={};return Object.keys(n).forEach(function(i){var r=n[i];t[i]=ArrayBuffer.isView(r)?{bytes:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength}:r}),t},s=function(n){var t=n.byterange||{length:Infinity,offset:0};return[t.length,t.offset,n.resolvedUri].join(",")},r={hexDump:function(n){for(var r=Array.prototype.slice.call(n),t=16,u="",o=undefined,s=undefined,i=0;i<r.length/t;i++)o=r.slice(i*t,i*t+t).map(f).join(""),s=r.slice(i*t,i*t+t).map(e).join(""),u+=o+" "+s+"\n";return u},tagDump:function(n){return r.hexDump(n.bytes)},textRanges:function(n){for(var i="",t=undefined,t=0;t<n.length;t++)i+=u(n,t)+" ";return i},createTransferableMessage:o,initSegmentId:s};i["default"]=r;t.exports=i["default"]},{}],3:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});i["default"]={GOAL_BUFFER_LENGTH:30,BANDWIDTH_VARIANCE:1.2};t.exports=i["default"]},{}],4:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(i,"__esModule",{value:!0});var u=n("global/window"),f=r(u),e=n("aes-decrypter"),o=n("./bin-utils"),s=function(n){n.onmessage=function(n){var t=n.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),r=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),u=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new e.Decrypter(i,r,u,function(n,i){f["default"].postMessage(o.createTransferableMessage({source:t.source,decrypted:i}),[i.buffer])})}};i["default"]=function(n){return new s(n)};t.exports=i["default"]},{"./bin-utils":2,"aes-decrypter":23,"global/window":30}],5:[function(n,t,i){(function(t){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function b(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function k(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var c,l,w;Object.defineProperty(i,"__esModule",{value:!0});c=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();l=function(n,t,i){var e=!0,r,f,o;n:while(e){var u=n,s=t,h=i;if(e=!1,u===null&&(u=Function.prototype),r=Object.getOwnPropertyDescriptor(u,s),r===undefined){if(f=Object.getPrototypeOf(u),f===null)return undefined;n=f;t=s;i=h;e=!0;r=f=undefined;continue n}else return"value"in r?r.value:(o=r.get,o===undefined)?undefined:o.call(h)}};var d=n("./playlist-loader"),o=u(d),g=n("./segment-loader"),a=u(g),nt=n("./vtt-segment-loader"),tt=u(nt),it=n("./ranges"),e=u(it),rt=typeof window!="undefined"?window.videojs:typeof t!="undefined"?t.videojs:null,r=u(rt),ut=n("./ad-cue-tags"),ft=u(ut),et=n("./sync-controller"),ot=u(et),st=n("videojs-contrib-media-sources/es5/codec-utils"),ht=n("webworkify"),ct=u(ht),lt=n("./decrypter-worker"),at=u(lt),f=undefined,v={videoCodec:"avc1",videoObjectTypeIndicator:".4d400d",audioProfile:"2"},vt=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],yt=function(n){return this.audioSegmentLoader_[n]+this.mainSegmentLoader_[n]},pt=function(n,t){if(typeof n!=typeof t||Object.keys(n).length!==Object.keys(t).length)return!0;for(var i in n)if(n[i]!==t[i])return!0;return!1},s=function(n){var t={codecCount:0},i=undefined;return t.codecCount=n.split(",").length,t.codecCount=t.codecCount||2,i=/(^|\s|,)+(avc1)([^ ,]*)/i.exec(n),i&&(t.videoCodec=i[2],t.videoObjectTypeIndicator=i[3]),t.audioProfile=/(^|\s|,)+mp4a.[0-9A-Fa-f]+\.([0-9A-Fa-f]+)/i.exec(n),t.audioProfile=t.audioProfile&&t.audioProfile[2],t},y=function(n){return n.replace(/avc1\.(\d+)\.(\d+)/i,function(n){return st.translateLegacyCodecs([n])[0]})};i.mapLegacyAvcCodecs_=y;var h=function(n,t,i){return n+"/"+t+'; codecs="'+i.filter(function(n){return!!n}).join(", ")+'"'},wt=function(n){return n.segments&&n.segments.length&&n.segments[0].map?"mp4":"mp2t"},bt=function(n){var t=n.attributes||{};return t.CODECS?s(t.CODECS):v},p=function(n,t){var e=wt(t),u=bt(t),l=t.attributes||{},o=!0,s=!1,f,a,i;if(!t)return[];if(n.mediaGroups.AUDIO&&l.AUDIO&&(f=n.mediaGroups.AUDIO[l.AUDIO],f)){s=!0;o=!1;for(a in f)if(!f[a].uri){o=!0;break}}s&&!u.audioProfile&&(r["default"].log.warn("Multiple audio tracks present but no audio codec string is specified. Attempting to use the default audio codec (mp4a.40.2)"),u.audioProfile=v.audioProfile);i={};u.videoCodec&&(i.video=""+u.videoCodec+u.videoObjectTypeIndicator);u.audioProfile&&(i.audio="mp4a.40."+u.audioProfile);var c=h("audio",e,[i.audio]),p=h("video",e,[i.video]),y=h("video",e,[i.video,i.audio]);return s?!o&&i.video?[p,c]:[y,c]:i.video?[y]:[c]};i.mimeTypesForPlaylist_=p;w=function(n){function t(n){var i=this,u;b(this,t);l(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);var s=n.url,c=n.withCredentials,h=n.mode,e=n.tech,v=n.bandwidth,y=n.externHls,p=n.useCueTags,w=n.blacklistDuration;if(!s)throw new Error("A non-empty playlist URL is required");f=y;this.withCredentials=c;this.tech_=e;this.hls_=e.hls;this.mode_=h;this.useCueTags_=p;this.blacklistDuration=w;this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType="");this.requestOptions_={withCredentials:this.withCredentials,timeout:null};this.audioGroups_={};this.subtitleGroups_={groups:{},tracks:{}};this.mediaSource=new r["default"].MediaSource({mode:h});this.audioinfo_=null;this.mediaSource.on("audioinfo",this.handleAudioinfoUpdate_.bind(this));this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_.bind(this));this.seekable_=r["default"].createTimeRanges();this.hasPlayed_=function(){return!1};this.syncController_=new ot["default"];this.segmentMetadataTrack_=e.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!0).track;this.decrypter_=ct["default"](at["default"]);u={hls:this.hls_,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:function(){return i.seekable()},seeking:function(){return i.tech_.seeking()},duration:function(){return i.mediaSource.duration},hasPlayed:function(){return i.hasPlayed_()},bandwidth:v,syncController:this.syncController_,decrypter:this.decrypter_};this.masterPlaylistLoader_=new o["default"](s,this.hls_,this.withCredentials);this.setupMasterPlaylistLoaderListeners_();this.audioPlaylistLoader_=null;this.subtitlePlaylistLoader_=null;this.mainSegmentLoader_=new a["default"](r["default"].mergeOptions(u,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}));this.audioSegmentLoader_=new a["default"](r["default"].mergeOptions(u,{loaderType:"audio"}));this.subtitleSegmentLoader_=new tt["default"](r["default"].mergeOptions(u,{loaderType:"vtt"}));this.setupSegmentLoaderListeners_();vt.forEach(function(n){i[n+"_"]=yt.bind(i,n)});this.masterPlaylistLoader_.load()}return k(t,n),c(t,[{key:"setupMasterPlaylistLoaderListeners_",value:function(){var n=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var t=n.masterPlaylistLoader_.media(),i=n.masterPlaylistLoader_.targetDuration*1.5*1e3;n.requestOptions_.timeout=n.masterPlaylistLoader_.isLowestEnabledRendition_()?0:i;t.endList&&n.tech_.preload()!=="none"&&(n.mainSegmentLoader_.playlist(t,n.requestOptions_),n.mainSegmentLoader_.load());n.fillAudioTracks_();n.setupAudio();n.fillSubtitleTracks_();n.setupSubtitles();try{n.setupSourceBuffers_()}catch(u){return r["default"].log.warn("Failed to create SourceBuffers",u),n.mediaSource.endOfStream("decode")}n.setupFirstPlay();n.trigger("audioupdate");n.trigger("selectedinitialmedia")});this.masterPlaylistLoader_.on("loadedplaylist",function(){var t=n.masterPlaylistLoader_.media();if(!t){n.initialMedia_=n.selectPlaylist();n.masterPlaylistLoader_.media(n.initialMedia_);return}n.useCueTags_&&n.updateAdCues_(t);n.mainSegmentLoader_.playlist(t,n.requestOptions_);n.updateDuration();n.tech_.paused()||n.mainSegmentLoader_.load();t.endList||function(){var t=function(){var t=n.seekable();t.length!==0&&n.mediaSource.addSeekableRange_(t.start(0),t.end(0))};n.duration()!==Infinity?function(){var i=function i(){if(n.duration()===Infinity)t();else n.tech_.one("durationchange",i)};n.tech_.one("durationchange",i)}():t()}()});this.masterPlaylistLoader_.on("error",function(){n.blacklistCurrentPlaylist(n.masterPlaylistLoader_.error)});this.masterPlaylistLoader_.on("mediachanging",function(){n.mainSegmentLoader_.abort();n.mainSegmentLoader_.pause()});this.masterPlaylistLoader_.on("mediachange",function(){var r=n.masterPlaylistLoader_.media(),u=n.masterPlaylistLoader_.targetDuration*1.5*1e3,t=undefined,i=undefined;n.requestOptions_.timeout=n.masterPlaylistLoader_.isLowestEnabledRendition_()?0:u;n.mainSegmentLoader_.playlist(r,n.requestOptions_);n.mainSegmentLoader_.load();t=n.activeAudioGroup();i=t.filter(function(n){return n.enabled})[0];i||(n.setupAudio(),n.trigger("audioupdate"));n.setupSubtitles();n.tech_.trigger({type:"mediachange",bubbles:!0})});this.masterPlaylistLoader_.on("playlistunchanged",function(){var t=n.masterPlaylistLoader_.media(),i=n.stuckAtPlaylistEnd_(t);i&&(n.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),n.tech_.trigger("playliststuck"))})}},{key:"setupSegmentLoaderListeners_",value:function(){var n=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){n.masterPlaylistLoader_.media(n.selectPlaylist())});this.mainSegmentLoader_.on("progress",function(){n.trigger("progress")});this.mainSegmentLoader_.on("error",function(){n.blacklistCurrentPlaylist(n.mainSegmentLoader_.error())});this.mainSegmentLoader_.on("syncinfoupdate",function(){n.onSyncInfoUpdate_()});this.audioSegmentLoader_.on("syncinfoupdate",function(){n.onSyncInfoUpdate_()});this.audioSegmentLoader_.on("error",function(){r["default"].log.warn("Problem encountered with the current alternate audio track. Switching back to default.");n.audioSegmentLoader_.abort();n.audioPlaylistLoader_=null;n.setupAudio()});this.subtitleSegmentLoader_.on("error",this.handleSubtitleError_.bind(this))}},{key:"handleAudioinfoUpdate_",value:function(n){if(f.supportsAudioInfoChange_()||!this.audioInfo_||!pt(this.audioInfo_,n.info)){this.audioInfo_=n.info;return}var t="had different audio properties (channels, sample rate, etc.) or changed in some other way.  This behavior is currently unsupported in Firefox 48 and below due to an issue: \n\nhttps://bugzilla.mozilla.org/show_bug.cgi?id=1247138\n\n",i=this.activeAudioGroup().map(function(n){return n.enabled}).indexOf(!0),e=this.activeAudioGroup()[i],u=this.activeAudioGroup().filter(function(n){return n.properties_&&n.properties_["default"]})[0];this.audioPlaylistLoader_?(t="The audio track '"+e.label+"' that we tried to "+("switch to "+t+" Unfortunately this means we will have to ")+("return you to the main track '"+u.label+"'. Sorry!"),u.enabled=!0,this.activeAudioGroup().splice(i,1),this.trigger("audioupdate")):(t="The rendition that we tried to switch to "+t+"Unfortunately that means we will have to blacklist the current playlist and switch to another. Sorry!",this.blacklistCurrentPlaylist());r["default"].log.warn(t);this.setupAudio()}},{key:"mediaSecondsLoaded_",value:function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}},{key:"fillAudioTracks_",value:function(){var e=this.master(),n=e.mediaGroups||{},t,i,u,f;n&&n.AUDIO&&Object.keys(n.AUDIO).length!==0&&this.mode_==="html5"||(n.AUDIO={main:{"default":{"default":!0}}});for(t in n.AUDIO){this.audioGroups_[t]||(this.audioGroups_[t]=[]);for(i in n.AUDIO[t])u=n.AUDIO[t][i],f=new r["default"].AudioTrack({id:i,kind:this.audioTrackKind_(u),enabled:!1,language:u.language,label:i}),f.properties_=u,this.audioGroups_[t].push(f)}(this.activeAudioGroup().filter(function(n){return n.properties_["default"]})[0]||this.activeAudioGroup()[0]).enabled=!0}},{key:"audioTrackKind_",value:function(n){var t=n["default"]?"main":"alternative";return n.characteristics&&n.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t}},{key:"fillSubtitleTracks_",value:function(){var e=this.master(),u=e.mediaGroups||{},t,n,i,f;for(t in u.SUBTITLES){this.subtitleGroups_.groups[t]||(this.subtitleGroups_.groups[t]=[]);for(n in u.SUBTITLES[t])i=u.SUBTITLES[t][n],i.forced||(this.subtitleGroups_.groups[t].push(r["default"].mergeOptions({id:n},i)),typeof this.subtitleGroups_.tracks[n]=="undefined"&&(f=this.tech_.addRemoteTextTrack({id:n,kind:"subtitles",enabled:!1,language:i.language,label:n},!0).track,this.subtitleGroups_.tracks[n]=f))}}},{key:"load",value:function(){this.mainSegmentLoader_.load();this.audioPlaylistLoader_&&this.audioSegmentLoader_.load();this.subtitlePlaylistLoader_&&this.subtitleSegmentLoader_.load()}},{key:"activeAudioGroup",value:function(){var n=this.masterPlaylistLoader_.media(),t=undefined;return n.attributes&&n.attributes.AUDIO&&(t=this.audioGroups_[n.attributes.AUDIO]),t||this.audioGroups_.main}},{key:"activeSubtitleGroup_",value:function(){var n=this.masterPlaylistLoader_.media(),t=undefined;return n?(n.attributes&&n.attributes.SUBTITLES&&(t=this.subtitleGroups_.groups[n.attributes.SUBTITLES]),t||this.subtitleGroups_.groups.main):null}},{key:"activeSubtitleTrack_",value:function(){for(var n in this.subtitleGroups_.tracks)if(this.subtitleGroups_.tracks[n].mode==="showing")return this.subtitleGroups_.tracks[n];return null}},{key:"handleSubtitleError_",value:function(){r["default"].log.warn("Problem encountered loading the subtitle track. Switching back to default.");this.subtitleSegmentLoader_.abort();var n=this.activeSubtitleTrack_();n&&(n.mode="disabled");this.setupSubtitles()}},{key:"setupAudio",value:function(){var n=this,i=this.activeAudioGroup(),t=i.filter(function(n){return n.enabled})[0];if(t||(t=i.filter(function(n){return n.properties_["default"]})[0]||i[0],t.enabled=!0),this.audioPlaylistLoader_&&(this.audioPlaylistLoader_.dispose(),this.audioPlaylistLoader_=null),this.audioSegmentLoader_.pause(),!t.properties_.resolvedUri){this.mainSegmentLoader_.resetEverything();return}this.audioSegmentLoader_.resetEverything();this.audioPlaylistLoader_=new o["default"](t.properties_.resolvedUri,this.hls_,this.withCredentials);this.audioPlaylistLoader_.load();this.audioPlaylistLoader_.on("loadedmetadata",function(){var t=n.audioPlaylistLoader_.media();n.audioSegmentLoader_.playlist(t,n.requestOptions_);(!n.tech_.paused()||t.endList&&n.tech_.preload()!=="none")&&n.audioSegmentLoader_.load();t.endList||n.audioPlaylistLoader_.trigger("firstplay")});this.audioPlaylistLoader_.on("loadedplaylist",function(){var t=undefined;if(n.audioPlaylistLoader_&&(t=n.audioPlaylistLoader_.media()),!t){n.audioPlaylistLoader_.media(n.audioPlaylistLoader_.playlists.master.playlists[0]);return}n.audioSegmentLoader_.playlist(t,n.requestOptions_)});this.audioPlaylistLoader_.on("error",function(){r["default"].log.warn("Problem encountered loading the alternate audio track. Switching back to default.");n.audioSegmentLoader_.abort();n.setupAudio()})}},{key:"setupSubtitles",value:function(){var n=this,r=this.activeSubtitleGroup_(),i=this.activeSubtitleTrack_(),t;if(this.subtitleSegmentLoader_.pause(),!i){this.subtitlePlaylistLoader_&&(this.subtitlePlaylistLoader_.dispose(),this.subtitlePlaylistLoader_=null);return}if(t=r.filter(function(n){return n.id===i.id})[0],!this.subtitlePlaylistLoader_||!this.subtitlePlaylistLoader_.media()||this.subtitlePlaylistLoader_.media().resolvedUri!==t.resolvedUri){this.subtitlePlaylistLoader_&&this.subtitlePlaylistLoader_.dispose();this.subtitleSegmentLoader_.resetEverything();this.subtitlePlaylistLoader_=new o["default"](t.resolvedUri,this.hls_,this.withCredentials);this.subtitlePlaylistLoader_.on("loadedmetadata",function(){var t=n.subtitlePlaylistLoader_.media();n.subtitleSegmentLoader_.playlist(t,n.requestOptions_);n.subtitleSegmentLoader_.track(n.activeSubtitleTrack_());(!n.tech_.paused()||t.endList&&n.tech_.preload()!=="none")&&n.subtitleSegmentLoader_.load()});this.subtitlePlaylistLoader_.on("loadedplaylist",function(){var t=undefined;(n.subtitlePlaylistLoader_&&(t=n.subtitlePlaylistLoader_.media()),t)&&n.subtitleSegmentLoader_.playlist(t,n.requestOptions_)});this.subtitlePlaylistLoader_.on("error",this.handleSubtitleError_.bind(this))}this.subtitlePlaylistLoader_.media()&&this.subtitlePlaylistLoader_.media().resolvedUri===t.resolvedUri?this.subtitleSegmentLoader_.load():this.subtitlePlaylistLoader_.load()}},{key:"fastQualityChange_",value:function(){var n=this.selectPlaylist();n!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(n),this.mainSegmentLoader_.resetLoader())}},{key:"play",value:function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0);this.hasPlayed_()&&this.load();var n=this.tech_.seekable();if(this.tech_.duration()===Infinity&&this.tech_.currentTime()<n.start(0))return this.tech_.setCurrentTime(n.end(n.length-1))}}},{key:"setupFirstPlay",value:function(){var n=undefined,t=this.masterPlaylistLoader_.media();return t&&!this.tech_.paused()&&!this.hasPlayed_()?(t.endList||(this.trigger("firstplay"),n=this.seekable(),n.length&&this.tech_.setCurrentTime(n.end(0))),this.hasPlayed_=function(){return!0},this.load(),!0):!1}},{key:"handleSourceOpen_",value:function(){try{this.setupSourceBuffers_()}catch(n){return r["default"].log.warn("Failed to create Source Buffers",n),this.mediaSource.endOfStream("decode")}this.tech_.autoplay()&&this.tech_.play();this.trigger("sourceopen")}},{key:"stuckAtPlaylistEnd_",value:function(n){var s=this.seekable(),t,r;if(!s.length||(t=this.syncController_.getExpiredTime(n,this.mediaSource.duration),t===null))return!1;var u=f.Playlist.playlistEnd(n,t),o=this.tech_.currentTime(),i=this.tech_.buffered();return i.length?(r=i.end(i.length-1),r-o<=e["default"].TIME_FUDGE_FACTOR&&u-r<=e["default"].TIME_FUDGE_FACTOR):u-o<=e["default"].TIME_FUDGE_FACTOR}},{key:"blacklistCurrentPlaylist",value:function(){var n=arguments.length<=0||arguments[0]===undefined?{}:arguments[0],t=undefined,u=undefined,i;if(t=n.playlist||this.masterPlaylistLoader_.media(),!t){this.error=n;try{return this.mediaSource.endOfStream("network")}catch(f){return this.trigger("error")}}return(i=this.masterPlaylistLoader_.isFinalRendition_(),i)?(r["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(i)):(t.excludeUntil=Date.now()+this.blacklistDuration*1e3,this.tech_.trigger("blacklistplaylist"),u=this.selectPlaylist(),r["default"].log.warn("Problem encountered with the current HLS playlist."+(n.message?" "+n.message:"")+" Switching to another playlist."),this.masterPlaylistLoader_.media(u))}},{key:"pauseLoading",value:function(){this.mainSegmentLoader_.pause();this.audioPlaylistLoader_&&this.audioSegmentLoader_.pause();this.subtitlePlaylistLoader_&&this.subtitleSegmentLoader_.pause()}},{key:"setCurrentTime",value:function(n){var t=e["default"].findRange(this.tech_.buffered(),n),i;if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())||!this.masterPlaylistLoader_.media().segments)return 0;if(i=this.mode_==="flash"||this.mode_==="auto"&&!r["default"].MediaSource.supportsNativeMediaSources(),t&&t.length&&!i)return n;this.mainSegmentLoader_.resetEverything();this.mainSegmentLoader_.abort();this.audioPlaylistLoader_&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort());this.subtitlePlaylistLoader_&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort());this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioPlaylistLoader_&&this.audioSegmentLoader_.load(),this.subtitlePlaylistLoader_&&this.subtitleSegmentLoader_.load())}},{key:"duration",value:function(){return this.masterPlaylistLoader_?this.mediaSource?this.mediaSource.duration:f.Playlist.duration(this.masterPlaylistLoader_.media()):0}},{key:"seekable",value:function(){return this.seekable_}},{key:"onSyncInfoUpdate_",value:function(){var n=undefined,t=undefined,i,u;if(this.masterPlaylistLoader_&&(i=this.masterPlaylistLoader_.media(),i)&&(u=this.syncController_.getExpiredTime(i,this.mediaSource.duration),u!==null)&&(n=f.Playlist.seekable(i,u),n.length!==0)){if(this.audioPlaylistLoader_){if(i=this.audioPlaylistLoader_.media(),u=this.syncController_.getExpiredTime(i,this.mediaSource.duration),u===null)return;if(t=f.Playlist.seekable(i,u),t.length===0)return}this.seekable_=t?t.start(0)>n.end(0)||n.start(0)>t.end(0)?n:r["default"].createTimeRanges([[t.start(0)>n.start(0)?t.start(0):n.start(0),t.end(0)<n.end(0)?t.end(0):n.end(0)]]):n;this.tech_.trigger("seekablechanged")}}},{key:"updateDuration",value:function(){var t=this,u=this.mediaSource.duration,n=f.Playlist.duration(this.masterPlaylistLoader_.media()),i=this.tech_.buffered(),r=function r(){t.mediaSource.duration=n;t.tech_.trigger("durationchange");t.mediaSource.removeEventListener("sourceopen",r)};i.length>0&&(n=Math.max(n,i.end(i.length-1)));u!==n&&(this.mediaSource.readyState!=="open"?this.mediaSource.addEventListener("sourceopen",r):r())}},{key:"dispose",value:function(){this.decrypter_.terminate();this.masterPlaylistLoader_.dispose();this.mainSegmentLoader_.dispose();this.audioPlaylistLoader_&&this.audioPlaylistLoader_.dispose();this.subtitlePlaylistLoader_&&this.subtitlePlaylistLoader_.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 t=this.masterPlaylistLoader_.media(),n=undefined;if(t&&this.mediaSource.readyState==="open"){if(n=p(this.masterPlaylistLoader_.master,t),n.length<1)return this.error="No compatible SourceBuffer configuration for the variant stream:"+t.resolvedUri,this.mediaSource.endOfStream("decode");this.mainSegmentLoader_.mimeType(n[0]);n[1]&&this.audioSegmentLoader_.mimeType(n[1]);this.excludeIncompatibleVariants_(t)}}},{key:"excludeIncompatibleVariants_",value:function(n){var u=this.masterPlaylistLoader_.master,i=2,r=null,t=undefined;n.attributes&&n.attributes.CODECS&&(t=s(n.attributes.CODECS),r=t.videoCodec,i=t.codecCount);u.playlists.forEach(function(n){var t={codecCount:2,videoCodec:null},u;n.attributes&&n.attributes.CODECS&&(u=n.attributes.CODECS,t=s(u),window.MediaSource&&window.MediaSource.isTypeSupported&&!window.MediaSource.isTypeSupported('video/mp4; codecs="'+y(u)+'"')&&(n.excludeUntil=Infinity));t.codecCount!==i&&(n.excludeUntil=Infinity);t.videoCodec!==r&&(n.excludeUntil=Infinity)})}},{key:"updateAdCues_",value:function(n){var t=0,i=this.seekable();i.length&&(t=i.start(0));ft["default"].updateAdCues(n,this.cueTagsTrack_,t)}}]),t}(r["default"].EventTarget);i.MasterPlaylistController=w}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./ad-cue-tags":1,"./decrypter-worker":4,"./playlist-loader":8,"./ranges":10,"./segment-loader":14,"./sync-controller":17,"./vtt-segment-loader":18,"videojs-contrib-media-sources/es5/codec-utils":64,webworkify:75}],6:[function(n,t,i){(function(t){"use strict";function s(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(i,"__esModule",{value:!0});var h=typeof window!="undefined"?window.videojs:typeof t!="undefined"?t.videojs:null,u=s(h),c=n("./bin-utils"),r={FAILURE:2,TIMEOUT:-101,ABORTED:-102};i.REQUEST_ERRORS=r;var l=function(n){var t=undefined,i=undefined;return i=n.offset+n.length-1,t=n.offset,"bytes="+t+"-"+i},e=function(n){var t={};return n.byterange&&(t.Range=l(n.byterange)),t},o=function(n){n.forEach(function(n){n.abort()})},a=function(n){return{bandwidth:n.bandwidth,bytesReceived:n.bytesReceived||0,roundTripTime:n.roundTripTime||0}},v=function(n){var i=n.target,r=Date.now()-i.requestTime,t={bandwidth:Infinity,bytesReceived:0,roundTripTime:r||0};return n.lengthComputable&&(t.bytesReceived=n.loaded,t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8e3)),t},f=function(n,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:r.TIMEOUT,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:r.ABORTED,xhr:t}:n?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:r.FAILURE,xhr:t}:null},y=function(n,t){return function(i,u){var o=u.response,s=f(i,u),e;return s?t(s,n):o.byteLength!==16?t({status:u.status,message:"Invalid HLS key at URL: "+u.uri,code:r.FAILURE,xhr:u},n):(e=new DataView(o),n.key.bytes=new Uint32Array([e.getUint32(0),e.getUint32(4),e.getUint32(8),e.getUint32(12)]),t(null,n))}},p=function(n,t){return function(i,u){var o=u.response,e=f(i,u);return e?t(e,n):o.byteLength===0?t({status:u.status,message:"Empty HLS segment content at URL: "+u.uri,code:r.FAILURE,xhr:u},n):(n.map.bytes=new Uint8Array(u.response),t(null,n))}},w=function(n,t){return function(i,u){var o=u.response,e=f(i,u);return e?t(e,n):o.byteLength===0?t({status:u.status,message:"Empty HLS segment content at URL: "+u.uri,code:r.FAILURE,xhr:u},n):(n.stats=a(u),n.key?n.encryptedBytes=new Uint8Array(u.response):n.bytes=new Uint8Array(u.response),t(null,n))}},b=function(n,t,i){var r=function r(u){if(u.data.source===t.requestId){n.removeEventListener("message",r);var f=u.data.decrypted;return t.bytes=new Uint8Array(f.bytes,f.byteOffset,f.byteLength),i(null,t)}};n.addEventListener("message",r);n.postMessage(c.createTransferableMessage({source:t.requestId,encrypted:t.encryptedBytes,key:t.key.bytes,iv:t.key.iv}),[t.encryptedBytes.buffer,t.key.bytes.buffer])},k=function(n){return n.reduce(function(n,t){return t.code>n.code?t:n})},d=function(n,t,i){var r=[],u=0;return function(f,e){if(f&&(o(n),r.push(f)),u+=1,u===n.length){if(e.endOfAllRequests=Date.now(),r.length>0){var s=k(r);return i(s,e)}return e.encryptedBytes?b(t,e,i):i(null,e)}}},g=function(n,t){return function(i){return n.stats=v(i),t(i,n)}},nt=function(n,t,i,r,f,s){var h=[],c=d(h,i,s);if(r.key){var a=u["default"].mergeOptions(t,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),v=y(r,c),b=n(a,v);h.push(b)}if(r.map&&!r.map.bytes){var k=u["default"].mergeOptions(t,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:e(r.map)}),nt=p(r,c),tt=n(k,nt);h.push(tt)}var it=u["default"].mergeOptions(t,{uri:r.resolvedUri,responseType:"arraybuffer",headers:e(r)}),rt=w(r,c),l=n(it,rt);return l.addEventListener("progress",g(r,f)),h.push(l),function(){return o(h)}};i.mediaSegmentRequest=nt}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./bin-utils":2}],7:[function(n,t,i){(function(r){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function c(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var o;Object.defineProperty(i,"__esModule",{value:!0});o=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();var l=n("global/window"),e=f(l),a=n("./ranges"),u=f(a),v=typeof window!="undefined"?window.videojs:typeof r!="undefined"?r.videojs:null,s=f(v),h=["seeking","seeked","pause","playing","error"],y=function(){function n(t){var i=this;c(this,n);this.tech_=t.tech;this.seekable=t.seekable;this.consecutiveUpdates=0;this.lastRecordedTime=null;this.timer_=null;this.checkCurrentTimeTimeout_=null;t.debug&&(this.logger_=s["default"].log.bind(s["default"],"playback-watcher ->"));this.logger_("initialize");var r=function(){return i.techWaiting_()},u=function(){return i.cancelTimer_()},f=function(){return i.fixesBadSeeks_()};this.tech_.on("seekablechanged",f);this.tech_.on("waiting",r);this.tech_.on(h,u);this.monitorCurrentTime_();this.dispose=function(){i.logger_("dispose");i.tech_.off("seekablechanged",f);i.tech_.off("waiting",r);i.tech_.off(h,u);i.checkCurrentTimeTimeout_&&e["default"].clearTimeout(i.checkCurrentTimeTimeout_);i.cancelTimer_()}}return o(n,[{key:"monitorCurrentTime_",value:function(){this.checkCurrentTime_();this.checkCurrentTimeTimeout_&&e["default"].clearTimeout(this.checkCurrentTimeTimeout_);this.checkCurrentTimeTimeout_=e["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();return}if(!this.tech_.paused()&&!this.tech_.seeking()){var n=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===n&&(!t.length||n+.1>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&n===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):n===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=n)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0;this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_));this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var n=this.seekable(),i=this.tech_.currentTime(),t;return this.tech_.seeking()&&this.outsideOfSeekableWindow_(n,i)?(t=n.end(n.length-1),this.logger_("Trying to seek outside of seekable at time "+i+" with "+("seekable range "+u["default"].printableRange(n)+". Seeking to ")+(t+".")),this.tech_.setCurrentTime(t),!0):!1}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var n=this.tech_.currentTime(),i=this.tech_.buffered(),t=u["default"].findRange(i,n);if(t.length&&n+3<=t.end(0)){this.cancelTimer_();this.tech_.setCurrentTime(n);this.logger_("Stopped at "+n+" while inside a buffered region "+("["+t.start(0)+" -> "+t.end(0)+"]. Attempting to resume ")+"playback by seeking to the current time.");this.tech_.trigger("unknownwaiting");return}}}},{key:"techWaiting_",value:function(){var i=this.seekable(),n=this.tech_.currentTime(),r,f,t,e;return this.tech_.seeking()&&this.fixesBadSeeks_()?!0:this.tech_.seeking()||this.timer_!==null?!0:this.fellOutOfLiveWindow_(i,n)?(r=i.end(i.length-1),this.logger_("Fell out of live window at time "+n+". Seeking to "+("live point (seekable end) "+r)),this.cancelTimer_(),this.tech_.setCurrentTime(r),this.tech_.trigger("liveresync"),!0):(f=this.tech_.buffered(),t=u["default"].findNextRange(f,n),this.videoUnderflow_(t,f,n))?(this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger("videounderflow"),!0):t.length>0?(e=t.start(0)-n,this.logger_("Stopped at "+n+", setting timer for "+e+", seeking "+("to "+t.start(0))),this.timer_=setTimeout(this.skipTheGap_.bind(this),e*1e3,n),!0):!1}},{key:"outsideOfSeekableWindow_",value:function(n,t){return n.length?t<n.start(0)-.1||t>n.end(n.length-1)+.1?!0:!1:!1}},{key:"fellOutOfLiveWindow_",value:function(n,t){return n.length&&n.start(0)>0&&t<n.start(0)?!0:!1}},{key:"videoUnderflow_",value:function(n,t,i){if(n.length===0){var r=this.gapFromVideoUnderflow_(t,i);if(r)return this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". "+("Seeking to current time "+i)),!0}return!1}},{key:"skipTheGap_",value:function(n){var r=this.tech_.buffered(),t=this.tech_.currentTime(),i=u["default"].findNextRange(r,t);(this.cancelTimer_(),i.length!==0&&t===n)&&(this.logger_("skipTheGap_:","currentTime:",t,"scheduled currentTime:",n,"nextRange start:",i.start(0)),this.tech_.setCurrentTime(i.start(0)+u["default"].TIME_FUDGE_FACTOR))}},{key:"gapFromVideoUnderflow_",value:function(n,t){for(var f=u["default"].findGaps(n),r,e,i=0;i<f.length;i++)if(r=f.start(i),e=f.end(i),t-r<4&&t-r>2)return{start:r,end:e};return null}},{key:"logger_",value:function(){}}]),n}();i["default"]=y;t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./ranges":10,"global/window":30}],8:[function(n,t,i){(function(r){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(i,"__esModule",{value:!0});var l=n("./resolve-url"),u=e(l),o=typeof window!="undefined"?window.videojs:typeof r!="undefined"?r.videojs:null,s=n("./playlist.js"),a=n("./stream"),v=e(a),y=n("m3u8-parser"),c=e(y),p=n("global/window"),f=e(p),w=function(n,t,i){var u=t.slice(),f=undefined,r=undefined;for(i=i||0,f=Math.min(n.length,t.length+i),r=i;r<f;r++)u[r-i]=o.mergeOptions(n[r],u[r-i]);return u},b=function(n,t){for(var h=!1,f=o.mergeOptions(n,{}),e=n.playlists.length,i=undefined,r=undefined,s=undefined;e--;)if(i=f.playlists[e],i.uri===t.uri){if(i.segments&&t.segments&&i.segments.length===t.segments.length&&i.mediaSequence===t.mediaSequence)continue;for(f.playlists[e]=o.mergeOptions(i,t),f.playlists[t.uri]=f.playlists[e],i.segments&&(f.playlists[e].segments=w(i.segments,t.segments,t.mediaSequence-i.mediaSequence)),s=0,f.playlists[e].segments&&(s=f.playlists[e].segments.length);s--;)r=f.playlists[e].segments[s],r.resolvedUri||(r.resolvedUri=u["default"](i.resolvedUri,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=u["default"](i.resolvedUri,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=u["default"](i.resolvedUri,r.map.uri));h=!0}return h?f:null},h=function h(n,t,i){var y=this,r=this,v=undefined,o=undefined,e=undefined,a=undefined,l=undefined;if(h.prototype.constructor.call(this),this.hls_=t,!n)throw new Error("A non-empty playlist URL is required");a=function(n,t,i){r.setBandwidth(e||n);e=null;i&&(r.state=i);r.error={playlist:r.master.playlists[t],status:n.status,message:"HLS playlist request error at URL: "+t,responseText:n.responseText,code:n.status>=500?4:2};r.trigger("error")};l=function(n,t){var i=undefined,u=undefined,s=undefined;r.setBandwidth(e||n);e=null;r.state="HAVE_METADATA";i=new c["default"].Parser;i.push(n.responseText);i.end();i.manifest.uri=t;s=b(r.master,i.manifest);u=(i.manifest.targetDuration||10)*1e3;r.targetDuration=i.manifest.targetDuration;s?(r.master=s,r.media_=r.master.playlists[i.manifest.uri]):(u/=2,r.trigger("playlistunchanged"));r.media().endList||(f["default"].clearTimeout(o),o=f["default"].setTimeout(function(){r.trigger("mediaupdatetimeout")},u));r.trigger("loadedplaylist")};r.state="HAVE_NOTHING";v=this.dispose;r.dispose=function(){r.stopRequest();f["default"].clearTimeout(o);v.call(this)};r.stopRequest=function(){if(e){var n=e;e=null;n.onreadystatechange=null;n.abort()}};r.enabledPlaylists_=function(){return r.master.playlists.filter(s.isEnabled).length};r.isLowestEnabledRendition_=function(){if(r.master.playlists.length===1)return!0;var n=r.media(),t=n.attributes.BANDWIDTH||Number.MAX_VALUE;return r.master.playlists.filter(function(n){var r=s.isEnabled(n),i;return r?(i=0,n&&n.attributes&&(i=n.attributes.BANDWIDTH),i<t):!1}).length===0};r.isFinalRendition_=function(){return r.master.playlists.filter(s.isEnabled).length===1};r.media=function(n){var f=r.state,t=undefined;if(!n)return r.media_;if(r.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+r.state);if(typeof n=="string"){if(!r.master.playlists[n])throw new Error("Unknown playlist URI: "+n);n=r.master.playlists[n]}if(t=!r.media_||n.uri!==r.media_.uri,r.master.playlists[n.uri].endList){e&&(e.onreadystatechange=null,e.abort(),e=null);r.state="HAVE_METADATA";r.media_=n;t&&(r.trigger("mediachanging"),r.trigger("mediachange"));return}if(t){if(r.state="SWITCHING_MEDIA",e){if(u["default"](r.master.uri,n.uri)===e.url)return;e.onreadystatechange=null;e.abort();e=null}this.media_&&this.trigger("mediachanging");e=this.hls_.xhr({uri:u["default"](r.master.uri,n.uri),withCredentials:i},function(t,i){if(e){if(t)return a(e,n.uri,f);l(i,n.uri);f==="HAVE_MASTER"?r.trigger("loadedmetadata"):r.trigger("mediachange")}})}};r.setBandwidth=function(n){r.bandwidth=n.bandwidth};r.on("mediaupdatetimeout",function(){r.state==="HAVE_METADATA"&&(r.state="HAVE_CURRENT_METADATA",e=this.hls_.xhr({uri:u["default"](r.master.uri,r.media().uri),withCredentials:i},function(n){if(e){if(n)return a(e,r.media().uri,"HAVE_METADATA");l(e,r.media().uri)}}))});r.on("firstplay",function(){var n=r.media();n&&(n.syncInfo={mediaSequence:n.mediaSequence,time:0})});r.pause=function(){r.stopRequest();f["default"].clearTimeout(o);r.state==="HAVE_NOTHING"&&(r.started=!1)};r.load=function(n){var t=r.media(),i;if(f["default"].clearTimeout(o),n){i=t?t.targetDuration*500:5e3;o=f["default"].setTimeout(r.load.bind(null,!1),i);return}if(!r.started){r.start();return}t&&!t.endList?r.trigger("mediaupdatetimeout"):r.trigger("loadedplaylist")};r.start=function(){r.started=!0;e=y.hls_.xhr({uri:n,withCredentials:i},function(t,i){var o=undefined,s=undefined,h=undefined;if(e){if(e=null,t)return r.error={status:i.status,message:"HLS playlist request error at URL: "+n,responseText:i.responseText,code:2},r.state==="HAVE_NOTHING"&&(r.started=!1),r.trigger("error");if(o=new c["default"].Parser,o.push(i.responseText),o.end(),r.state="HAVE_MASTER",o.manifest.uri=n,o.manifest.playlists){for(r.master=o.manifest,h=r.master.playlists.length;h--;)s=r.master.playlists[h],r.master.playlists[s.uri]=s,s.resolvedUri=u["default"](r.master.uri,s.uri);["AUDIO","SUBTITLES"].forEach(function(n){var i,f,t;for(i in r.master.mediaGroups[n])for(f in r.master.mediaGroups[n][i])t=r.master.mediaGroups[n][i][f],t.uri&&(t.resolvedUri=u["default"](r.master.uri,t.uri))});r.trigger("loadedplaylist");e||r.media(o.manifest.playlists[0]);return}return r.master={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:f["default"].location.href,playlists:[{uri:n}]},r.master.playlists[n]=r.master.playlists[0],r.master.playlists[0].resolvedUri=n,l(i,n),r.trigger("loadedmetadata")}})}};h.prototype=new v["default"];i["default"]=h;t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./playlist.js":9,"./resolve-url":13,"./stream":16,"global/window":30,"m3u8-parser":31}],9:[function(n,t,i){(function(t){"use strict";function p(n){return n&&n.__esModule?n:{"default":n}}var u,f,s,e,h;Object.defineProperty(i,"__esModule",{value:!0});var c=typeof window!="undefined"?window.videojs:typeof t!="undefined"?t.videojs:null,w=n("global/window"),b=p(w),r={UNSAFE_LIVE_SEGMENTS:3},k=function(n,t){var r=0,u=t-n.mediaSequence,i=n.segments[u];if(i){if(typeof i.start!="undefined")return{result:i.start,precise:!0};if(typeof i.end!="undefined")return{result:i.end-i.duration,precise:!0}}while(u--){if(i=n.segments[u],typeof i.end!="undefined")return{result:r+i.end,precise:!0};if(r+=i.duration,typeof i.start!="undefined")return{result:r+i.start,precise:!0}}return{result:r,precise:!1}},d=function(n,t){for(var r=0,i=undefined,u=t-n.mediaSequence;u<n.segments.length;u++){if(i=n.segments[u],typeof i.start!="undefined")return{result:i.start-r,precise:!0};if(r+=i.duration,typeof i.end!="undefined")return{result:i.end-r,precise:!0}}return{result:-1,precise:!1}},l=function(n,t,i){var r=undefined,u=undefined;return(typeof t=="undefined"&&(t=n.mediaSequence+n.segments.length),t<n.mediaSequence)?0:(r=k(n,t),r.precise)?r.result:(u=d(n,t),u.precise)?u.result:r.result+i},o=function(n,t,i){if(!n)return 0;if(typeof i!="number"&&(i=0),typeof t=="undefined"){if(n.totalDuration)return n.totalDuration;if(!n.endList)return b["default"].Infinity}return l(n,t,i)};i.duration=o;u=function(n,t,i){var u=0,f,r;if(t>i&&(f=[i,t],t=f[0],i=f[1]),t<0){for(r=t;r<Math.min(0,i);r++)u+=n.targetDuration;t=0}for(r=t;r<i;r++)u+=n.segments[r].duration;return u};i.sumDurations=u;f=function(n,t,i){if(!n||!n.segments)return null;if(n.endList)return o(n);if(t===null)return null;t=t||0;var u=i?Math.max(0,n.segments.length-r.UNSAFE_LIVE_SEGMENTS):Math.max(0,n.segments.length);return l(n,n.mediaSequence+u,t)};i.playlistEnd=f;s=function(n,t){var r=t||0,i=f(n,t,!0);return i===null?c.createTimeRange():c.createTimeRange(r,i)};i.seekable=s;var a=function(n){return n-Math.floor(n)==0},v=function(n,t){var r,i,u,f;if(a(t))return t+n*.1;for(r=t.toString().split(".")[1].length,i=1;i<=r;i++)if(u=Math.pow(10,i),f=t*u,a(f)||i===r)return(f+n)/u},g=v.bind(null,1),nt=v.bind(null,-1),y=function(n,t,i,r){var f=undefined,o=undefined,s=n.segments.length,e=t-r;if(e<0){if(i>0)for(f=i-1;f>=0;f--)if(o=n.segments[f],e+=nt(o.duration),e>0)return{mediaIndex:f,startTime:r-u(n,i,f)};return{mediaIndex:0,startTime:t}}if(i<0){for(f=i;f<0;f++)if(e-=n.targetDuration,e<0)return{mediaIndex:0,startTime:t};i=0}for(f=i;f<s;f++)if(o=n.segments[f],e-=g(o.duration),e<0)return{mediaIndex:f,startTime:r+u(n,i,f)};return{mediaIndex:s-1,startTime:t}};i.getMediaInfoForTime_=y;e=function(n){return n.excludeUntil&&n.excludeUntil>Date.now()};i.isBlacklisted=e;h=function(n){var t=e(n);return!n.disabled&&!t};i.isEnabled=h;r.duration=o;r.seekable=s;r.getMediaInfoForTime_=y;r.isEnabled=h;r.isBlacklisted=e;r.playlistEnd=f;i["default"]=r}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"global/window":30}],10:[function(n,t,i){(function(n){"use strict";function s(n){return n&&n.__esModule?n:{"default":n}}var f;Object.defineProperty(i,"__esModule",{value:!0});f=function(){function n(n,t){var r=[],u=!0,f=!1,e=undefined,i,o;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done);u=!0)if(r.push(o.value),t&&r.length===t)break}catch(s){f=!0;e=s}finally{try{!u&&i["return"]&&i["return"]()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}();var h=typeof window!="undefined"?window.videojs:typeof n!="undefined"?n.videojs:null,r=s(h),u=1/30,c=function(n,t){var i=f(t,2),r=i[0],u=i[1];return Math.min(Math.max(r,n),u)},e=function(n,t){var u=[],i=undefined;if(n&&n.length)for(i=0;i<n.length;i++)t(n.start(i),n.end(i))&&u.push([n.start(i),n.end(i)]);return r["default"].createTimeRanges(u)},l=function(n,t){return e(n,function(n,i){return n-u<=t&&i+u>=t})},a=function(n,t){return e(n,function(n){return n-u>=t})},v=function(n){var i,t,u,f;if(n.length<2)return r["default"].createTimeRanges();for(i=[],t=1;t<n.length;t++)u=n.end(t-1),f=n.start(t),i.push([u,f]);return r["default"].createTimeRanges(i)},y=function(n,t){var i=undefined,u=undefined,r=undefined,f=[],e=[],o=function(n){return n[0]<=r&&n[1]>=r};if(n)for(i=0;i<n.length;i++)u=n.start(i),r=n.end(i),e.push([u,r]);if(t)for(i=0;i<t.length;i++)(u=t.start(i),r=t.end(i),e.some(o))||f.push(r);return f.length!==1?null:f[0]},o=function(n,t){var f=null,e=null,o=0,u=[],s=[],i;if(!n||!n.length||!t||!t.length)return r["default"].createTimeRange();for(i=n.length;i--;)u.push({time:n.start(i),type:"start"}),u.push({time:n.end(i),type:"end"});for(i=t.length;i--;)u.push({time:t.start(i),type:"start"}),u.push({time:t.end(i),type:"end"});for(u.sort(function(n,t){return n.time-t.time}),i=0;i<u.length;i++)u[i].type==="start"?(o++,o===2&&(f=u[i].time)):u[i].type==="end"&&(o--,o===1&&(e=u[i].time)),f!==null&&e!==null&&(s.push([f,e]),f=null,e=null);return r["default"].createTimeRanges(s)},p=function(n,t,i,r){for(var h=t.end(0)-t.start(0),l=n.end(0)-n.start(0),a=h-l,f=o(n,r),e=o(t,r),s=0,c=0,u=f.length;u--;)s+=f.end(u)-f.start(u),f.start(u)===i&&(s+=a);for(u=e.length;u--;)c+=e.end(u)-e.start(u);return Math.max(s,c)/h*100},w=function(n,t,i,u){var e=n+t,s=r["default"].createTimeRanges([[n,e]]),o=r["default"].createTimeRanges([[c(n,[i,e]),e]]),f;return o.start(0)===o.end(0)?0:(f=p(o,s,i,u),isNaN(f)||f===Infinity||f===-Infinity)?0:f},b=function(n){var i=[],t;if(!n||!n.length)return"";for(t=0;t<n.length;t++)i.push(n.start(t)+" => "+n.end(t));return i.join(", ")};i["default"]={findRange:l,findNextRange:a,findGaps:v,findSoleUncommonTimeRangesEnd:y,getSegmentBufferedPercent:w,TIME_FUDGE_FACTOR:u,printableRange:b};t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],11:[function(n,t,i){(function(n){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(i,"__esModule",{value:!0});var e=typeof window!="undefined"?window.videojs:typeof n!="undefined"?n.videojs:null,r=f(e),o={errorInterval:30,getSource:function(n){var t=this.tech({IWillNotUseThisInPlugins:!0}),i=t.currentSource_;return n(i)}},u=function u(n,t){var s=0,f=0,i=r["default"].mergeOptions(o,t),h=function(){f&&n.currentTime(f)},l=function(t){if(t!==null&&t!==undefined){f=n.duration()!==Infinity&&n.currentTime()||0;n.one("loadedmetadata",h);n.src(t);n.play()}},c=function(){if(!(Date.now()-s<i.errorInterval*1e3)){if(!i.getSource||typeof i.getSource!="function"){r["default"].log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return s=Date.now(),i.getSource.call(n,l)}},e=function e(){n.off("loadedmetadata",h);n.off("error",c);n.off("dispose",e)},a=function(t){e();u(n,t)};n.on("error",c);n.on("dispose",e);n.reloadSourceOnError=a},s=function(n){u(this,n)};i["default"]=s;t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],12:[function(n,t,i){"use strict";function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}Object.defineProperty(i,"__esModule",{value:!0});var r=n("./playlist.js"),e=function(n,t,i,u){var f=n.master.playlists[t],o=r.isBlacklisted(f),e=r.isEnabled(f);return typeof u=="undefined"?e:(u?delete f.disabled:f.disabled=!0,u===e||o||i(),u)},u=function u(n,t,i){var s,r,o;f(this,u);s=n.masterPlaylistController_.fastQualityChange_.bind(n.masterPlaylistController_);t.attributes&&(r=t.attributes,r.RESOLUTION&&(o=r.RESOLUTION,this.width=o.width,this.height=o.height),this.bandwidth=r.BANDWIDTH);this.id=i;this.enabled=e.bind(this,n.playlists,t.uri,s)},o=function(n){var t=n.playlists;n.representations=function(){return t.master.playlists.filter(function(n){return!r.isBlacklisted(n)}).map(function(t){return new u(n,t,t.uri)})}};i["default"]=o;t.exports=i["default"]},{"./playlist.js":9}],13:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(i,"__esModule",{value:!0});var f=n("url-toolkit"),u=r(f),e=n("global/window"),o=r(e),s=function(n,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(n)||(n=u["default"].buildAbsoluteURL(o["default"].location.href,n)),u["default"].buildAbsoluteURL(n,t))};i["default"]=s;t.exports=i["default"]},{"global/window":30,"url-toolkit":61}],14:[function(n,t,i){(function(r){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}function y(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function p(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var s,h;Object.defineProperty(i,"__esModule",{value:!0});s=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();h=function(n,t,i){var e=!0,r,f,o;n:while(e){var u=n,s=t,h=i;if(e=!1,u===null&&(u=Function.prototype),r=Object.getOwnPropertyDescriptor(u,s),r===undefined){if(f=Object.getPrototypeOf(u),f===null)return undefined;n=f;t=s;i=h;e=!0;r=f=undefined;continue n}else return"value"in r?r.value:(o=r.get,o===undefined)?undefined:o.call(h)}};var c=n("./playlist"),w=typeof window!="undefined"?window.videojs:typeof r!="undefined"?r.videojs:null,f=e(w),b=n("./source-updater"),k=e(b),d=n("./config"),g=e(d),nt=n("global/window"),u=e(nt),tt=n("videojs-contrib-media-sources/es5/remove-cues-from-track.js"),l=e(tt),a=n("./bin-utils"),o=n("./media-segment-request"),it=500,v=function(n,t,i){if(!n||!t)return!1;var r=n.segments,u=i===r.length;return n.endList&&t.readyState==="open"&&u},rt=function(n){function t(n){var r=this,i;if(y(this,t),h(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),!n)throw new TypeError("Initialization options are required");if(typeof n.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!n.mediaSource)throw new TypeError("No MediaSource specified");i=f["default"].mergeOptions(f["default"].options.hls,n);this.state="INIT";this.bandwidth=i.bandwidth;this.throughput={rate:0,count:0};this.roundTrip=NaN;this.resetStats_();this.mediaIndex=null;this.hasPlayed_=i.hasPlayed;this.currentTime_=i.currentTime;this.seekable_=i.seekable;this.seeking_=i.seeking;this.duration_=i.duration;this.mediaSource_=i.mediaSource;this.hls_=i.hls;this.loaderType_=i.loaderType;this.segmentMetadataTrack_=i.segmentMetadataTrack;this.checkBufferTimeout_=null;this.error_=void 0;this.currentTimeline_=-1;this.pendingSegment_=null;this.mimeType_=null;this.sourceUpdater_=null;this.xhrOptions_=null;this.activeInitSegmentId_=null;this.initSegments_={};this.decrypter_=i.decrypter;this.syncController_=i.syncController;this.syncPoint_={segmentIndex:0,time:0};this.syncController_.on("syncinfoupdate",function(){return r.trigger("syncinfoupdate")});this.fetchAtBuffer_=!1;i.debug&&(this.logger_=f["default"].log.bind(f["default"],"segment-loader",this.loaderType_,"->"))}return p(t,n),s(t,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0;this.mediaRequests=0;this.mediaRequestsAborted=0;this.mediaRequestsTimedout=0;this.mediaRequestsErrored=0;this.mediaTransferDuration=0;this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED";this.abort_();this.sourceUpdater_&&this.sourceUpdater_.dispose();this.resetStats_()}},{key:"abort",value:function(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null);return}this.abort_();this.paused()||(this.state="READY",this.monitorBuffer_())}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests();this.pendingSegment_=null}},{key:"error",value:function(n){return typeof n!="undefined"&&(this.error_=n),this.pendingSegment_=null,this.error_}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():f["default"].createTimeRanges()}},{key:"initSegment",value:function(n){var r=arguments.length<=1||arguments[1]===undefined?!1:arguments[1],i,t;return n?(i=a.initSegmentId(n),t=this.initSegments_[i],r&&!t&&n.bytes&&(this.initSegments_[i]=t={resolvedUri:n.resolvedUri,byterange:n.byterange,bytes:n.bytes}),t||n):null}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&(this.sourceUpdater_||this.mimeType_&&this.state==="INIT")&&!this.paused()}},{key:"load",value:function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();this.couldBeginLoading_()&&(this.state==="READY"||this.state==="INIT")&&(this.state="READY")}}},{key:"init_",value:function(){return this.state="READY",this.sourceUpdater_=new k["default"](this.mediaSource_,this.mimeType_),this.resetEverything(),this.monitorBuffer_()}},{key:"playlist",value:function(n){var u=arguments.length<=1||arguments[1]===undefined?{}:arguments[1],i,t,r;if(n){if(i=this.playlist_,t=this.pendingSegment_,this.playlist_=n,this.xhrOptions_=u,this.hasPlayed_()||(n.syncInfo={mediaSequence:n.mediaSequence,time:0}),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==n.uri){this.mediaIndex!==null&&this.resyncLoader();return}r=n.mediaSequence-i.mediaSequence;this.logger_("mediaSequenceDiff",r);this.mediaIndex!==null&&(this.mediaIndex-=r);t&&(t.mediaIndex-=r,t.mediaIndex>=0&&(t.segment=n.segments[t.mediaIndex]));this.syncController_.saveExpiredSegmentInfo(i,n)}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(u["default"].clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return this.checkBufferTimeout_===null}},{key:"mimeType",value:function(n){this.mimeType_||(this.mimeType_=n,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(){this.resetLoader();this.remove(0,Infinity)}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1;this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null;this.syncPoint_=null}},{key:"remove",value:function(n,t){this.sourceUpdater_&&this.sourceUpdater_.remove(n,t);l["default"](n,t,this.segmentMetadataTrack_)}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&u["default"].clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=u["default"].setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){this.state==="READY"&&this.fillBuffer_();this.checkBufferTimeout_&&u["default"].clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=u["default"].setTimeout(this.monitorBufferTick_.bind(this),it)}},{key:"fillBuffer_",value:function(){var n,t;if(!this.sourceUpdater_.updating()&&(this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())),n=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_),n)){if(t=v(this.playlist_,this.mediaSource_,n.mediaIndex),t){this.mediaSource_.endOfStream();return}(n.mediaIndex!==this.playlist_.segments.length-1||this.mediaSource_.readyState!=="ended"||this.seeking_())&&((n.timeline!==this.currentTimeline_||n.startOfSegment!==null&&n.startOfSegment<this.sourceUpdater_.timestampOffset())&&(this.syncController_.reset(),n.timestampOffset=n.startOfSegment),this.loadSegment_(n))}}},{key:"checkBuffer_",value:function(n,t,i,r,u,f){var s=0,o=undefined,h,l,e;return(n.length&&(s=n.end(n.length-1)),h=Math.max(0,s-u),!t.segments.length)?null:h>=g["default"].GOAL_BUFFER_LENGTH?null:!r&&h>=1?null:(this.logger_("checkBuffer_","mediaIndex:",i,"hasPlayed:",r,"currentTime:",u,"syncPoint:",f,"fetchAtBuffer:",this.fetchAtBuffer_,"bufferedTime:",h),f===null)?(i=this.getSyncSegmentCandidate_(t),this.logger_("getSync","mediaIndex:",i),this.generateSegmentInfo_(t,i,null,!0)):i!==null?(this.logger_("walkForward","mediaIndex:",i+1),l=t.segments[i],o=l&&l.end?l.end:s,this.generateSegmentInfo_(t,i+1,o,!1)):(this.fetchAtBuffer_?(e=c.getMediaInfoForTime_(t,s,f.segmentIndex,f.time),i=e.mediaIndex,o=e.startTime):(e=c.getMediaInfoForTime_(t,u,f.segmentIndex,f.time),i=e.mediaIndex,o=e.startTime),this.logger_("getMediaIndexForTime","mediaIndex:",i,"startOfSegment:",o),this.generateSegmentInfo_(t,i,o,!1))}},{key:"getSyncSegmentCandidate_",value:function(n){var i=this,t;return this.currentTimeline_===-1?0:(t=n.segments.map(function(n,t){return{timeline:n.timeline,segmentIndex:t}}).filter(function(n){return n.timeline===i.currentTimeline_}),t.length)?t[Math.min(t.length-1,1)].segmentIndex:Math.max(n.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(n,t,i,r){if(t<0||t>=n.segments.length)return null;var u=n.segments[t];return{requestId:"segment-loader-"+Math.random(),uri:u.resolvedUri,mediaIndex:t,isSyncRequest:r,startOfSegment:i,playlist:n,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:u.duration,segment:u}}},{key:"loadSegment_",value:function(n){var t=this;this.state="WAITING";this.pendingSegment_=n;this.trimBackBuffer_(n);n.abortRequests=o.mediaSegmentRequest(this.hls_.xhr,this.xhrOptions_,this.decrypter_,this.createSimplifiedSegmentObj_(n),function(n,i){t.pendingSegment_&&i.requestId===t.pendingSegment_.requestId&&t.trigger("progress")},this.segmentRequestFinished_.bind(this))}},{key:"trimBackBuffer_",value:function(){var n=this.seekable_(),i=this.currentTime_(),t=0;t=n.length&&n.start(0)>0&&n.start(0)<i?n.start(0):i-60;t>0&&this.remove(0,t)}},{key:"createSimplifiedSegmentObj_",value:function(n){var t=n.segment,i={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:n.requestId},r;return t.key&&(r=t.key.iv||new Uint32Array([0,0,0,n.mediaIndex+n.playlist.mediaSequence]),i.key={resolvedUri:t.key.resolvedUri,iv:r}),t.map&&(i.map=this.initSegment(t.map)),i}},{key:"segmentRequestFinished_",value:function(n,t){if(this.mediaRequests+=1,t.stats&&(this.mediaBytesTransferred+=t.stats.bytesReceived,this.mediaTransferDuration+=t.stats.roundTripTime),!this.pendingSegment_){this.mediaRequestsAborted+=1;return}if(t.requestId===this.pendingSegment_.requestId){if(n){if(this.pendingSegment_=null,n.code===o.REQUEST_ERRORS.ABORTED){this.mediaRequestsAborted+=1;return}if(this.state="READY",this.pause(),n.code===o.REQUEST_ERRORS.TIMEOUT){this.mediaRequestsTimedout+=1;this.bandwidth=1;this.roundTrip=NaN;this.trigger("bandwidthupdate");return}this.mediaRequestsErrored+=1;this.error(n);this.trigger("error");return}this.bandwidth=t.stats.bandwidth;this.roundTrip=t.stats.roundTripTime;t.map&&(t.map=this.initSegment(t.map,!0));this.processSegmentResponse_(t)}}},{key:"processSegmentResponse_",value:function(n){var t=this.pendingSegment_;t.bytes=n.bytes;n.map&&(t.segment.map.bytes=n.map.bytes);t.endOfAllRequests=n.endOfAllRequests;this.handleSegment_()}},{key:"handleSegment_",value:function(){var i=this,n,t;if(!this.pendingSegment_){this.state="READY";return}if(this.state="APPENDING",n=this.pendingSegment_,t=n.segment,this.syncController_.probeSegmentInfo(n),n.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}n.timestampOffset!==null&&n.timestampOffset!==this.sourceUpdater_.timestampOffset()&&this.sourceUpdater_.timestampOffset(n.timestampOffset);t.map&&function(){var n=a.initSegmentId(t.map),r;i.activeInitSegmentId_&&i.activeInitSegmentId_===n||(r=i.initSegment(t.map),i.sourceUpdater_.appendBuffer(r.bytes,function(){i.activeInitSegmentId_=n}))}();n.byteLength=n.bytes.byteLength;this.mediaSecondsLoaded+=typeof t.start=="number"&&typeof t.end=="number"?t.end-t.start:t.duration;this.sourceUpdater_.appendBuffer(n.bytes,this.handleUpdateEnd_.bind(this))}},{key:"handleUpdateEnd_",value:function(){var i;if(this.logger_("handleUpdateEnd_","segmentInfo:",this.pendingSegment_),!this.pendingSegment_){this.state="READY";this.paused()||this.monitorBuffer_();return}var n=this.pendingSegment_,t=n.segment,r=this.mediaIndex!==null;if(this.pendingSegment_=null,this.recordThroughput_(n),this.addSegmentMetadataCue_(n),this.state="READY",this.mediaIndex=n.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=n.timeline,this.trigger("syncinfoupdate"),t.end&&this.currentTime_()-t.end>n.playlist.targetDuration*3){this.resetEverything();return}r&&this.trigger("bandwidthupdate");this.trigger("progress");i=v(n.playlist,this.mediaSource_,n.mediaIndex+1);i&&this.mediaSource_.endOfStream();this.paused()||this.monitorBuffer_()}},{key:"recordThroughput_",value:function(n){var t=this.throughput.rate,i=Date.now()-n.endOfAllRequests+1,r=Math.floor(n.byteLength/i*8e3);this.throughput.rate+=(r-t)/++this.throughput.count}},{key:"logger_",value:function(){}},{key:"addSegmentMetadataCue_",value:function(n){if(this.segmentMetadataTrack_){var r=n.segment,t=r.start,i=r.end;l["default"](t,i,this.segmentMetadataTrack_);var o=u["default"].WebKitDataCue||u["default"].VTTCue,f={uri:n.uri,timeline:n.timeline,playlist:n.playlist.uri,start:t,end:i},s=JSON.stringify(f),e=new o(t,i,s);e.value=f;this.segmentMetadataTrack_.addCue(e)}}}]),t}(f["default"].EventTarget);i["default"]=rt;t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./bin-utils":2,"./config":3,"./media-segment-request":6,"./playlist":9,"./source-updater":15,"global/window":30,"videojs-contrib-media-sources/es5/remove-cues-from-track.js":71}],15:[function(n,t,i){(function(n){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r;Object.defineProperty(i,"__esModule",{value:!0});r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();var e=typeof window!="undefined"?window.videojs:typeof n!="undefined"?n.videojs:null,o=u(e),s=function(){},h=function(){function n(t,i){var r=this,u;f(this,n);u=function(){r.sourceBuffer_=t.addSourceBuffer(i);r.onUpdateendCallback_=function(){var n=r.pendingCallback_;r.pendingCallback_=null;n&&n();r.runCallback_()};r.sourceBuffer_.addEventListener("updateend",r.onUpdateendCallback_);r.runCallback_()};this.callbacks_=[];this.pendingCallback_=null;this.timestampOffset_=0;this.mediaSource=t;this.processedAppend_=!1;t.readyState==="closed"?t.addEventListener("sourceopen",u):u()}return r(n,[{key:"abort",value:function(n){var t=this;this.processedAppend_&&this.queueCallback_(function(){t.sourceBuffer_.abort()},n)}},{key:"appendBuffer",value:function(n,t){var i=this;this.processedAppend_=!0;this.queueCallback_(function(){i.sourceBuffer_.appendBuffer(n)},t)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:o["default"].createTimeRanges()}},{key:"remove",value:function(n,t){var i=this;this.processedAppend_&&this.queueCallback_(function(){i.sourceBuffer_.remove(n,t)},s)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(n){var t=this;return typeof n!="undefined"&&(this.queueCallback_(function(){t.sourceBuffer_.timestampOffset=n}),this.timestampOffset_=n),this.timestampOffset_}},{key:"queueCallback_",value:function(n,t){this.callbacks_.push([n.bind(this),t]);this.runCallback_()}},{key:"runCallback_",value:function(){var n=undefined;!this.updating()&&this.callbacks_.length&&(n=this.callbacks_.shift(),this.pendingCallback_=n[1],n[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_);this.sourceBuffer_&&this.mediaSource.readyState==="open"&&this.sourceBuffer_.abort()}}]),n}();i["default"]=h;t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],16:[function(n,t,i){"use strict";function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r,u;Object.defineProperty(i,"__esModule",{value:!0});r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();u=function(){function n(){f(this,n);this.listeners={}}return r(n,[{key:"on",value:function(n,t){this.listeners[n]||(this.listeners[n]=[]);this.listeners[n].push(t)}},{key:"off",value:function(n,t){var i=undefined;return this.listeners[n]?(i=this.listeners[n].indexOf(t),this.listeners[n].splice(i,1),i>-1):!1}},{key:"trigger",value:function(n){var i=undefined,t=undefined,r=undefined,u=undefined;if(i=this.listeners[n],i)if(arguments.length===2)for(r=i.length,t=0;t<r;++t)i[t].call(this,arguments[1]);else for(u=Array.prototype.slice.call(arguments,1),r=i.length,t=0;t<r;++t)i[t].apply(this,u)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(n){this.on("data",function(t){n.push(t)})}}]),n}();i["default"]=u;t.exports=i["default"]},{}],17:[function(n,t,i){(function(t){"use strict";function s(n){return n&&n.__esModule?n:{"default":n}}function l(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function a(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var e,o,c;Object.defineProperty(i,"__esModule",{value:!0});e=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();o=function(n,t,i){var e=!0,r,f,o;n:while(e){var u=n,s=t,h=i;if(e=!1,u===null&&(u=Function.prototype),r=Object.getOwnPropertyDescriptor(u,s),r===undefined){if(f=Object.getPrototypeOf(u),f===null)return undefined;n=f;t=s;i=h;e=!0;r=f=undefined;continue n}else return"value"in r?r.value:(o=r.get,o===undefined)?undefined:o.call(h)}};var v=n("mux.js/lib/mp4/probe"),h=s(v),y=n("mux.js/lib/tools/ts-inspector.js"),u=n("./playlist"),p=typeof window!="undefined"?window.videojs:typeof t!="undefined"?t.videojs:null,r=s(p),f=[{name:"VOD",run:function(n,t,i){return i!==Infinity?{time:0,segmentIndex:0}:null}},{name:"ProgramDateTime",run:function(n,t){if(n.datetimeToDisplayTime&&t.dateTimeObject){var i=t.dateTimeObject.getTime()/1e3,r=i+n.datetimeToDisplayTime;return{time:r,segmentIndex:0}}return null}},{name:"Segment",run:function(n,t,i,r,u){var c=t.segments,h=null,f=null,e,o,s;for(u=u||0,e=0;e<c.length;e++)if(o=c[e],o.timeline===r&&typeof o.start!="undefined"){if(s=Math.abs(u-o.start),f!==null&&f<s)break;(!h||f===null||f>=s)&&(f=s,h={time:o.start,segmentIndex:e})}return h}},{name:"Discontinuity",run:function(n,t,i,r,u){var s=null,f,e,o;if(u=u||0,t.discontinuityStarts.length)for(f=null,e=0;e<t.discontinuityStarts.length;e++){var c=t.discontinuityStarts[e],l=t.discontinuitySequence+e+1,h=n.discontinuities[l];if(h){if(o=Math.abs(u-h.time),f!==null&&f<o)break;(!s||f===null||f>=o)&&(f=o,s={time:h.time,segmentIndex:c})}}return s}},{name:"Playlist",run:function(n,t){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}];i.syncPointStrategies=f;c=function(n){function t(){l(this,t);o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);this.inspectCache_=undefined;this.timelines=[];this.discontinuities=[];this.datetimeToDisplayTime=null;r["default"].options.hls&&r["default"].options.hls.debug&&(this.logger_=r["default"].log.bind(r["default"],"sync-controller ->"))}return a(t,n),e(t,[{key:"getSyncPoint",value:function(n,t,i,r){var u=this.runStrategies_(n,t,i,r);return u.length?this.selectSyncPoint_(u,{key:"time",value:r}):null}},{key:"getExpiredTime",value:function(n,t){var r,i;return!n||!n.segments?null:(r=this.runStrategies_(n,t,n.discontinuitySequence,0),!r.length)?null:(i=this.selectSyncPoint_(r,{key:"segmentIndex",value:0}),i.segmentIndex>0&&(i.time*=-1),Math.abs(i.time+u.sumDurations(n,i.segmentIndex,0)))}},{key:"runStrategies_",value:function(n,t,i,r){for(var s=[],u,e,o=0;o<f.length;o++)u=f[o],e=u.run(this,n,t,i,r),e&&(e.strategy=u.name,s.push({strategy:u.name,syncPoint:e}),this.logger_("syncPoint found via <"+u.name+">:",e));return s}},{key:"selectSyncPoint_",value:function(n,t){for(var r=n[0].syncPoint,f=Math.abs(n[0].syncPoint[t.key]-t.value),e=n[0].strategy,u,i=1;i<n.length;i++)u=Math.abs(n[i].syncPoint[t.key]-t.value),u<f&&(f=u,r=n[i].syncPoint,e=n[i].strategy);return this.logger_("syncPoint with strategy <"+e+"> chosen: ",r),r}},{key:"saveExpiredSegmentInfo",value:function(n,t){for(var u=t.mediaSequence-n.mediaSequence,r,i=u-1;i>=0;i--)if(r=n.segments[i],r&&typeof r.start!="undefined"){t.syncInfo={mediaSequence:n.mediaSequence+i,time:r.start};this.logger_("playlist sync:",t.syncInfo);this.trigger("syncinfoupdate");break}}},{key:"setDateTimeMapping",value:function(n){if(!this.datetimeToDisplayTime&&n.dateTimeObject){var t=n.dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-t}}},{key:"reset",value:function(){this.inspectCache_=undefined}},{key:"probeSegmentInfo",value:function(n){var i=n.segment,t=undefined;t=i.map?this.probeMp4Segment_(n):this.probeTsSegment_(n);t&&this.calculateSegmentTimeMapping_(n,t)&&this.saveDiscontinuitySyncInfo_(n)}},{key:"probeMp4Segment_",value:function(n){var i=n.segment,r=h["default"].timescale(i.map.bytes),t=h["default"].startTime(r,n.bytes);return n.timestampOffset!==null&&(n.timestampOffset-=t),{start:t,end:t+i.duration}}},{key:"probeTsSegment_",value:function(n){var t=y.inspect(n.bytes,this.inspectCache_),i=undefined,r=undefined;return t?(t.video&&t.video.length===2?(this.inspectCache_=t.video[1].dts,i=t.video[0].dtsTime,r=t.video[1].dtsTime):t.audio&&t.audio.length===2&&(this.inspectCache_=t.audio[1].dts,i=t.audio[0].dtsTime,r=t.audio[1].dtsTime),{start:i,end:r}):null}},{key:"timestampOffsetForTimeline",value:function(n){return typeof this.timelines[n]=="undefined"?null:this.timelines[n].time}},{key:"calculateSegmentTimeMapping_",value:function(n,t){var r=n.segment,i=this.timelines[n.timeline];if(n.timestampOffset!==null)this.logger_("tsO:",n.timestampOffset),i={time:n.startOfSegment,mapping:n.startOfSegment-t.start},this.timelines[n.timeline]=i,this.trigger("timestampoffset"),r.start=n.startOfSegment,r.end=t.end+i.mapping;else if(i)r.start=t.start+i.mapping,r.end=t.end+i.mapping;else return!1;return!0}},{key:"saveDiscontinuitySyncInfo_",value:function(n){var t=n.playlist,i=n.segment,r,o;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts.length)for(r=0;r<t.discontinuityStarts.length;r++){var f=t.discontinuityStarts[r],e=t.discontinuitySequence+r+1,s=f-n.mediaIndex,h=Math.abs(s);(!this.discontinuities[e]||this.discontinuities[e].accuracy>h)&&(o=undefined,o=s<0?i.start-u.sumDurations(t,n.mediaIndex,f):i.end+u.sumDurations(t,n.mediaIndex+1,f),this.discontinuities[e]={time:o,accuracy:h})}}},{key:"logger_",value:function(){}}]),t}(r["default"].EventTarget);i["default"]=c}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./playlist":9,"mux.js/lib/mp4/probe":55,"mux.js/lib/tools/ts-inspector.js":57}],18:[function(n,t,i){(function(r){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function l(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function a(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var o,s;Object.defineProperty(i,"__esModule",{value:!0});o=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();s=function(n,t,i){var e=!0,r,f,o;n:while(e){var u=n,s=t,h=i;if(e=!1,u===null&&(u=Function.prototype),r=Object.getOwnPropertyDescriptor(u,s),r===undefined){if(f=Object.getPrototypeOf(u),f===null)return undefined;n=f;t=s;i=h;e=!0;r=f=undefined;continue n}else return"value"in r?r.value:(o=r.get,o===undefined)?undefined:o.call(h)}};var v=n("./segment-loader"),y=f(v),p=typeof window!="undefined"?window.videojs:typeof r!="undefined"?r.videojs:null,e=f(p),w=n("global/window"),u=f(w),b=n("videojs-contrib-media-sources/es5/remove-cues-from-track.js"),k=f(b),d=n("./bin-utils"),h=new Uint8Array("\n\n".split("").map(function(n){return n.charCodeAt(0)})),c=function(n){return String.fromCharCode.apply(null,n)},g=function(n){function t(n){l(this,t);s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,n);this.mediaSource_=null;this.subtitlesTrack_=null}return a(t,n),o(t,[{key:"buffered_",value:function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return e["default"].createTimeRanges();var n=this.subtitlesTrack_.cues,t=n[0].startTime,i=n[n.length-1].startTime;return e["default"].createTimeRanges([[t,i]])}},{key:"initSegment",value:function(n){var f=arguments.length<=1||arguments[1]===undefined?!1:arguments[1],r,t,u,i;return n?(r=d.initSegmentId(n),t=this.initSegments_[r],f&&!t&&n.bytes&&(u=h.byteLength+n.bytes.byteLength,i=new Uint8Array(u),i.set(n.bytes),i.set(h,n.bytes.byteLength),this.initSegments_[r]=t={resolvedUri:n.resolvedUri,byterange:n.byterange,bytes:i}),t||n):null}},{key:"couldBeginLoading_",value:function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}},{key:"init_",value:function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}},{key:"track",value:function(n){this.subtitlesTrack_=n;this.state==="INIT"&&this.couldBeginLoading_()&&this.init_()}},{key:"remove",value:function(n,t){k["default"](n,t,this.subtitlesTrack_)}},{key:"fillBuffer_",value:function(){var t=this,n,i;if(this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())),n=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_),n=this.skipEmptySegments_(n),n){if(this.syncController_.timestampOffsetForTimeline(n.timeline)===null){i=function(){t.state="READY";t.paused()||t.monitorBuffer_()};this.syncController_.one("timestampoffset",i);this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(n)}}},{key:"skipEmptySegments_",value:function(n){while(n&&n.segment.empty)n=this.generateSegmentInfo_(n.playlist,n.mediaIndex+1,n.startOfSegment+n.duration,n.isSyncRequest);return n}},{key:"handleSegment_",value:function(){var n=this,t,i,r;if(!this.pendingSegment_){this.state="READY";return}if(this.state="APPENDING",t=this.pendingSegment_,i=t.segment,typeof u["default"].WebVTT!="function"&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_&&(r=function(){var t=function(){n.handleSegment_()};n.state="WAITING_ON_VTTJS";n.subtitlesTrack_.tech_.one("vttjsloaded",t);n.subtitlesTrack_.tech_.one("vttjserror",function(){n.subtitlesTrack_.tech_.off("vttjsloaded",t);n.error({message:"Error loading vtt.js"});n.state="READY";n.pause();n.trigger("error")});return{v:undefined}}(),typeof r=="object"))return r.v;i.requested=!0;try{this.parseVTTCues_(t)}catch(f){return this.error({message:f.message}),this.state="READY",this.pause(),this.trigger("error")}if(this.updateTimeMapping_(t,this.syncController_.timelines[t.timeline],this.playlist_),t.isSyncRequest){this.trigger("syncinfoupdate");this.pendingSegment_=null;this.state="READY";return}t.byteLength=t.bytes.byteLength;this.mediaSecondsLoaded+=i.duration;t.cues.forEach(function(t){n.subtitlesTrack_.addCue(t)});this.handleUpdateEnd_()}},{key:"parseVTTCues_",value:function(n){var f=undefined,o=!1,t,i,r;typeof u["default"].TextDecoder=="function"?f=new u["default"].TextDecoder("utf8"):(f=u["default"].WebVTT.StringDecoder(),o=!0);t=new u["default"].WebVTT.Parser(u["default"],u["default"].vttjs,f);n.cues=[];n.timestampmap={MPEGTS:0,LOCAL:0};t.oncue=n.cues.push.bind(n.cues);t.ontimestampmap=function(t){return n.timestampmap=t};t.onparsingerror=function(n){e["default"].log.warn("Error encountered when parsing cues: "+n.message)};n.segment.map&&(i=n.segment.map.bytes,o&&(i=c(i)),t.parse(i));r=n.bytes;o&&(r=c(r));t.parse(r);t.flush()}},{key:"updateTimeMapping_",value:function(n,t,i){var f=n.segment,r,u,e,o;if(t){if(!n.cues.length){f.empty=!0;return}r=n.timestampmap;u=r.MPEGTS/9e4-r.LOCAL+t.mapping;n.cues.forEach(function(n){n.startTime+=u;n.endTime+=u});i.syncInfo||(e=n.cues[0].startTime,o=n.cues[n.cues.length-1].startTime,i.syncInfo={mediaSequence:i.mediaSequence+n.mediaIndex,time:Math.min(e,o-f.duration)})}}}]),t}(y["default"]);i["default"]=g;t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./bin-utils":2,"./segment-loader":14,"global/window":30,"videojs-contrib-media-sources/es5/remove-cues-from-track.js":71}],19:[function(n,t,i){(function(n){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(i,"__esModule",{value:!0});var r=typeof window!="undefined"?window.videojs:typeof n!="undefined"?n.videojs:null,f=u(r),e=function(){return function n(t,i){var e,o,u,s;return t=r.mergeOptions({timeout:45e3},t),e=n.beforeRequest||f["default"].Hls.xhr.beforeRequest,e&&typeof e=="function"&&(o=e(t),o&&(t=o)),u=r.xhr(t,function(n,t){var r=u.response;!n&&r&&(u.responseTime=Date.now(),u.roundTripTime=u.responseTime-u.requestTime,u.bytesReceived=r.byteLength||r.length,u.bandwidth||(u.bandwidth=Math.floor(u.bytesReceived/u.roundTripTime*8e3)));n&&n.code==="ETIMEDOUT"&&(u.timedout=!0);n||u.aborted||t.statusCode===200||t.statusCode===206||t.statusCode===0||(n=new Error("XHR Failed with a response of: "+(u&&(r||u.responseText))));i(n,u)}),s=u.abort,u.abort=function(){return u.aborted=!0,s.apply(u,arguments)},u.uri=t.uri,u.requestTime=Date.now(),u}};i["default"]=e;t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],20:[function(n,t,i){"use strict";function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var u;Object.defineProperty(i,"__esModule",{value:!0});u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();var e=function(){for(var h=[[[],[],[],[],[]],[[],[],[],[],[]]],f=h[0],e=h[1],l=f[4],p=e[4],n=undefined,i=undefined,r=undefined,u=[],a=[],c=undefined,v=undefined,y=undefined,t=undefined,o=undefined,s=undefined,n=0;n<256;n++)a[(u[n]=n<<1^(n>>7)*283)^n]=n;for(i=r=0;!l[i];i^=c||1,r=a[r]||1)for(t=r^r<<1^r<<2^r<<3^r<<4,t=t>>8^t&255^99,l[i]=t,p[t]=i,y=u[v=u[c=u[i]]],s=y*16843009^v*65537^c*257^i*16843008,o=u[t]*257^t*16843008,n=0;n<4;n++)f[n][i]=o=o<<24^o>>>8,e[n][t]=s=s<<24^s>>>8;for(n=0;n<5;n++)f[n]=f[n].slice(0),e[n]=e[n].slice(0);return h},r=null,o=function(){function n(t){f(this,n);r||(r=e());this._tables=[[r[0][0].slice(),r[0][1].slice(),r[0][2].slice(),r[0][3].slice(),r[0][4].slice()],[r[1][0].slice(),r[1][1].slice(),r[1][2].slice(),r[1][3].slice(),r[1][4].slice()]];var u=undefined,c=undefined,i=undefined,h=undefined,v=undefined,s=this._tables[0][4],l=this._tables[1],o=t.length,a=1;if(o!==4&&o!==6&&o!==8)throw new Error("Invalid aes key size");for(h=t.slice(0),v=[],this._key=[h,v],u=o;u<4*o+28;u++)i=h[u-1],(u%o==0||o===8&&u%o==4)&&(i=s[i>>>24]<<24^s[i>>16&255]<<16^s[i>>8&255]<<8^s[i&255],u%o==0&&(i=i<<8^i>>>24^a<<24,a=a<<1^(a>>7)*283)),h[u]=h[u-o]^i;for(c=0;u;c++,u--)i=h[c&3?u:u-4],v[c]=u<=4||c<4?i:l[0][s[i>>>24]]^l[1][s[i>>16&255]]^l[2][s[i>>8&255]]^l[3][s[i&255]]}return u(n,[{key:"decrypt",value:function(n,t,i,r,u,f){for(var e=this._key[1],o=n^e[0],s=r^e[1],h=i^e[2],c=t^e[3],y=undefined,g=undefined,nt=undefined,tt=e.length/4-2,l=undefined,a=4,v=this._tables[1],p=v[0],w=v[1],b=v[2],k=v[3],d=v[4],l=0;l<tt;l++)y=p[o>>>24]^w[s>>16&255]^b[h>>8&255]^k[c&255]^e[a],g=p[s>>>24]^w[h>>16&255]^b[c>>8&255]^k[o&255]^e[a+1],nt=p[h>>>24]^w[c>>16&255]^b[o>>8&255]^k[s&255]^e[a+2],c=p[c>>>24]^w[o>>16&255]^b[s>>8&255]^k[h&255]^e[a+3],a+=4,o=y,s=g,h=nt;for(l=0;l<4;l++)u[(3&-l)+f]=d[o>>>24]<<24^d[s>>16&255]<<16^d[h>>8&255]<<8^d[c&255]^e[a++],y=o,o=s,s=h,h=c,c=y}}]),n}();i["default"]=o;t.exports=i["default"]},{}],21:[function(n,t,i){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function s(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var r,u;Object.defineProperty(i,"__esModule",{value:!0});r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();u=function(n,t,i){var e=!0,r,f,o;n:while(e){var u=n,s=t,h=i;if(e=!1,u===null&&(u=Function.prototype),r=Object.getOwnPropertyDescriptor(u,s),r===undefined){if(f=Object.getPrototypeOf(u),f===null)return undefined;n=f;t=s;i=h;e=!0;r=f=undefined;continue n}else return"value"in r?r.value:(o=r.get,o===undefined)?undefined:o.call(h)}};var h=n("./stream"),f=e(h),c=function(n){function t(){o(this,t);u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,f["default"]);this.jobs=[];this.delay=1;this.timeout_=null}return s(t,n),r(t,[{key:"processJob_",value:function(){this.jobs.shift()();this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null}},{key:"push",value:function(n){this.jobs.push(n);this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}]),t}(f["default"]);i["default"]=c;t.exports=i["default"]},{"./stream":24}],22:[function(n,t,i){"use strict";function o(n){return n&&n.__esModule?n:{"default":n}}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var e,f;Object.defineProperty(i,"__esModule",{value:!0});e=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();var h=n("./aes"),c=o(h),l=n("./async-stream"),a=o(l),v=n("pkcs7"),r=function(n){return n<<24|(n&65280)<<8|(n&16711680)>>8|n>>>24},u=function(n,t,i){var e=new Int32Array(n.buffer,n.byteOffset,n.byteLength>>2),b=new c["default"](Array.prototype.slice.call(t)),w=new Uint8Array(n.byteLength),f=new Int32Array(w.buffer),o=undefined,s=undefined,h=undefined,l=undefined,a=undefined,v=undefined,y=undefined,p=undefined,u=undefined;for(o=i[0],s=i[1],h=i[2],l=i[3],u=0;u<e.length;u+=4)a=r(e[u]),v=r(e[u+1]),y=r(e[u+2]),p=r(e[u+3]),b.decrypt(a,v,y,p,f,u),f[u]=r(f[u]^o),f[u+1]=r(f[u+1]^s),f[u+2]=r(f[u+2]^h),f[u+3]=r(f[u+3]^l),o=a,s=v,h=y,l=p;return w};i.decrypt=u;f=function(){function n(t,i,u,f){s(this,n);var h=n.STEP,o=new Int32Array(t.buffer),c=new Uint8Array(t.byteLength),e=0;for(this.asyncStream_=new a["default"],this.asyncStream_.push(this.decryptChunk_(o.subarray(e,e+h),i,u,c)),e=h;e<o.length;e+=h)u=new Uint32Array([r(o[e-4]),r(o[e-3]),r(o[e-2]),r(o[e-1])]),this.asyncStream_.push(this.decryptChunk_(o.subarray(e,e+h),i,u,c));this.asyncStream_.push(function(){f(null,v.unpad(c))})}return e(n,[{key:"decryptChunk_",value:function(n,t,i,r){return function(){var f=u(n,t,i);r.set(f,n.byteOffset)}}}],[{key:"STEP",get:function(){return 32e3}}]),n}();i.Decrypter=f;i["default"]={Decrypter:f,decrypt:u}},{"./aes":20,"./async-stream":21,pkcs7:26}],23:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(i,"__esModule",{value:!0});var r=n("./decrypter"),f=n("./async-stream"),e=u(f);i["default"]={decrypt:r.decrypt,Decrypter:r.Decrypter,AsyncStream:e["default"]};t.exports=i["default"]},{"./async-stream":21,"./decrypter":22}],24:[function(n,t,i){arguments[4][16][0].apply(i,arguments)},{dup:16}],25:[function(n,t){"use strict";var i;t.exports=function(n){var r=i[n.byteLength%16||0],t=new Uint8Array(n.byteLength+r.length);return t.set(n),t.set(r,n.byteLength),t};i=[[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]]},{}],26:[function(n,t,i){"use strict";i.pad=n("./pad.js");i.unpad=n("./unpad.js")},{"./pad.js":25,"./unpad.js":27}],27:[function(n,t){"use strict";t.exports=function(n){return n.subarray(0,n.byteLength-n[n.byteLength-1])}},{}],28:[function(){},{}],29:[function(n,t){(function(i){var u=typeof i!="undefined"?i:typeof window!="undefined"?window:{},f=n("min-document"),r;typeof document!="undefined"?r=document:(r=u["__GLOBAL_DOCUMENT_CACHE@4"],r||(r=u["__GLOBAL_DOCUMENT_CACHE@4"]=f));t.exports=r}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"min-document":28}],30:[function(n,t){(function(n){var i;i=typeof window!="undefined"?window:typeof n!="undefined"?n:typeof self!="undefined"?self:{};t.exports=i}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],31:[function(n,t){"use strict";function i(n){return n&&n.__esModule?n:{"default":n}}var r=n("./line-stream"),u=i(r),f=n("./parse-stream"),e=i(f),o=n("./parser"),s=i(o);t.exports={LineStream:u["default"],ParseStream:e["default"],Parser:s["default"]}},{"./line-stream":32,"./parse-stream":33,"./parser":34}],32:[function(n,t,i){"use strict";function o(n){return n&&n.__esModule?n:{"default":n}}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function h(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:n}function c(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var r;Object.defineProperty(i,"__esModule",{value:!0});var u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),f=n("./stream"),e=o(f);r=function(n){function t(){s(this,t);var n=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.buffer="",n}return c(t,n),u(t,[{key:"push",value:function(n){var t=void 0;for(this.buffer+=n,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}]),t}(e["default"]);i["default"]=r},{"./stream":35}],33:[function(n,t,i){"use strict";function s(n){return n&&n.__esModule?n:{"default":n}}function h(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function c(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:n}function l(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}Object.defineProperty(i,"__esModule",{value:!0});var u=function(){function n(n,t){var r=[],u=!0,f=!1,e=undefined,i,o;try{for(i=n[Symbol.iterator]();!(u=(o=i.next()).done);u=!0)if(r.push(o.value),t&&r.length===t)break}catch(s){f=!0;e=s}finally{try{!u&&i["return"]&&i["return"]()}finally{if(f)throw e;}}return r}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return n(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),f=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),e=n("./stream"),o=s(e);var a=function(){return new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')},r=function(n){for(var i=n.split(a()),u={},r=i.length,t=void 0;r--;)i[r]!==""&&(t=/([^=]*)=(.*)/.exec(i[r]).slice(1),t[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),u[t[0]]=t[1]);return u},v=function(n){function t(){return h(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this))}return l(t,n),f(t,[{key:"push",value:function(n){var i=void 0,t=void 0,f,e,o;if(n=n.replace(/^[\u0000\s]+|[\u0000\s]+$/g,""),n.length!==0){if(n[0]!=="#"){this.trigger("data",{type:"uri",uri:n});return}if(n.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:n.slice(1)});return}if(n=n.replace("\r",""),i=/^#EXTM3U/.exec(n),i){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(n),i){t={type:"tag",tagType:"inf"};i[1]&&(t.duration=parseFloat(i[1]));i[2]&&(t.title=i[2]);this.trigger("data",t);return}if(i=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"targetduration"};i[1]&&(t.duration=parseInt(i[1],10));this.trigger("data",t);return}if(i=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"totalduration"};i[1]&&(t.duration=parseInt(i[1],10));this.trigger("data",t);return}if(i=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"version"};i[1]&&(t.version=parseInt(i[1],10));this.trigger("data",t);return}if(i=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"media-sequence"};i[1]&&(t.number=parseInt(i[1],10));this.trigger("data",t);return}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"discontinuity-sequence"};i[1]&&(t.number=parseInt(i[1],10));this.trigger("data",t);return}if(i=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(n),i){t={type:"tag",tagType:"playlist-type"};i[1]&&(t.playlistType=i[1]);this.trigger("data",t);return}if(i=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(n),i){t={type:"tag",tagType:"byterange"};i[1]&&(t.length=parseInt(i[1],10));i[2]&&(t.offset=parseInt(i[2],10));this.trigger("data",t);return}if(i=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(n),i){t={type:"tag",tagType:"allow-cache"};i[1]&&(t.allowed=!/NO/.test(i[1]));this.trigger("data",t);return}if(i=/^#EXT-X-MAP:?(.*)$/.exec(n),i){if(t={type:"tag",tagType:"map"},i[1]&&(f=r(i[1]),f.URI&&(t.uri=f.URI),f.BYTERANGE)){var l=f.BYTERANGE.split("@"),s=u(l,2),h=s[0],c=s[1];t.byterange={};h&&(t.byterange.length=parseInt(h,10));c&&(t.byterange.offset=parseInt(c,10))}this.trigger("data",t);return}if(i=/^#EXT-X-STREAM-INF:?(.*)$/.exec(n),i){t={type:"tag",tagType:"stream-inf"};i[1]&&(t.attributes=r(i[1]),t.attributes.RESOLUTION&&(e=t.attributes.RESOLUTION.split("x"),o={},e[0]&&(o.width=parseInt(e[0],10)),e[1]&&(o.height=parseInt(e[1],10)),t.attributes.RESOLUTION=o),t.attributes.BANDWIDTH&&(t.attributes.BANDWIDTH=parseInt(t.attributes.BANDWIDTH,10)),t.attributes["PROGRAM-ID"]&&(t.attributes["PROGRAM-ID"]=parseInt(t.attributes["PROGRAM-ID"],10)));this.trigger("data",t);return}if(i=/^#EXT-X-MEDIA:?(.*)$/.exec(n),i){t={type:"tag",tagType:"media"};i[1]&&(t.attributes=r(i[1]));this.trigger("data",t);return}if(i=/^#EXT-X-ENDLIST/.exec(n),i){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(n),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(n),i){t={type:"tag",tagType:"program-date-time"};i[1]&&(t.dateTimeString=i[1],t.dateTimeObject=new Date(i[1]));this.trigger("data",t);return}if(i=/^#EXT-X-KEY:?(.*)$/.exec(n),i){t={type:"tag",tagType:"key"};i[1]&&(t.attributes=r(i[1]),t.attributes.IV&&(t.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(t.attributes.IV=t.attributes.IV.substring(2)),t.attributes.IV=t.attributes.IV.match(/.{8}/g),t.attributes.IV[0]=parseInt(t.attributes.IV[0],16),t.attributes.IV[1]=parseInt(t.attributes.IV[1],16),t.attributes.IV[2]=parseInt(t.attributes.IV[2],16),t.attributes.IV[3]=parseInt(t.attributes.IV[3],16),t.attributes.IV=new Uint32Array(t.attributes.IV)));this.trigger("data",t);return}if(i=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(n),i){t={type:"tag",tagType:"cue-out-cont"};t.data=i[1]?i[1]:"";this.trigger("data",t);return}if(i=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(n),i){t={type:"tag",tagType:"cue-out"};t.data=i[1]?i[1]:"";this.trigger("data",t);return}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(n),i){t={type:"tag",tagType:"cue-in"};t.data=i[1]?i[1]:"";this.trigger("data",t);return}this.trigger("data",{type:"tag",data:n.slice(4)})}}}]),t}(o["default"]);i["default"]=v},{"./stream":35}],34:[function(n,t,i){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function v(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function y(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:n}function p(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var u;Object.defineProperty(i,"__esModule",{value:!0});var f=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},e=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),o=n("./stream"),s=r(o),h=n("./line-stream"),c=r(h),l=n("./parse-stream"),a=r(l);u=function(n){function t(){var i;v(this,t);i=y(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));i.lineStream=new c["default"];i.parseStream=new a["default"];i.lineStream.pipe(i.parseStream);var s=i,e=[],n={},r=void 0,u=void 0,l=function(){},h={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},o=0;i.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};i.parseStream.on("data",function(t){var c=void 0,i=void 0;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=t.allowed;"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var i={};"length"in t&&(n.byterange=i,i.length=t.length,"offset"in t||(this.trigger("info",{message:"defaulting offset to zero"}),t.offset=0));"offset"in t&&(n.byterange=i,i.offset=t.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"}));t.duration>0&&(n.duration=t.duration);t.duration===0&&(n.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"}));this.manifest.segments=e},key:function(){if(!t.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(t.attributes.METHOD==="NONE"){u=null;return}if(!t.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"});u={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI};typeof t.attributes.IV!="undefined"&&(u.iv=t.attributes.IV)},"media-sequence":function(){if(!isFinite(t.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number});return}this.manifest.mediaSequence=t.number},"discontinuity-sequence":function(){if(!isFinite(t.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number});return}this.manifest.discontinuitySequence=t.number;o=t.number},"playlist-type":function(){if(!/VOD|EVENT/.test(t.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist});return}this.manifest.playlistType=t.playlistType},map:function(){r={};t.uri&&(r.uri=t.uri);t.byterange&&(r.byterange=t.byterange)},"stream-inf":function(){if(this.manifest.playlists=e,this.manifest.mediaGroups=this.manifest.mediaGroups||h,!t.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}n.attributes||(n.attributes={});f(n.attributes,t.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,!(t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var n=this.manifest.mediaGroups[t.attributes.TYPE];n[t.attributes["GROUP-ID"]]=n[t.attributes["GROUP-ID"]]||{};c=n[t.attributes["GROUP-ID"]];i={"default":/yes/i.test(t.attributes.DEFAULT)};i.autoselect=i["default"]?!0:/yes/i.test(t.attributes.AUTOSELECT);t.attributes.LANGUAGE&&(i.language=t.attributes.LANGUAGE);t.attributes.URI&&(i.uri=t.attributes.URI);t.attributes["INSTREAM-ID"]&&(i.instreamId=t.attributes["INSTREAM-ID"]);t.attributes.CHARACTERISTICS&&(i.characteristics=t.attributes.CHARACTERISTICS);t.attributes.FORCED&&(i.forced=/yes/i.test(t.attributes.FORCED));c[t.attributes.NAME]=i},discontinuity:function(){o+=1;n.discontinuity=!0;this.manifest.discontinuityStarts.push(e.length)},"program-date-time":function(){this.manifest.dateTimeString=t.dateTimeString;this.manifest.dateTimeObject=t.dateTimeObject},targetduration:function(){if(!isFinite(t.duration)||t.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration});return}this.manifest.targetDuration=t.duration},totalduration:function(){if(!isFinite(t.duration)||t.duration<0){this.trigger("warn",{message:"ignoring invalid total duration: "+t.duration});return}this.manifest.totalDuration=t.duration},"cue-out":function(){n.cueOut=t.data},"cue-out-cont":function(){n.cueOutCont=t.data},"cue-in":function(){n.cueIn=t.data}}[t.tagType]||l).call(s)},uri:function(){n.uri=t.uri;e.push(n);!this.manifest.targetDuration||"duration"in n||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),n.duration=this.manifest.targetDuration);u&&(n.key=u);n.timeline=o;r&&(n.map=r);n={}},comment:function(){}})[t.type].call(s)});return i}return p(t,n),e(t,[{key:"push",value:function(n){this.lineStream.push(n)}},{key:"end",value:function(){this.lineStream.push("\n")}}]),t}(s["default"]);i["default"]=u},{"./line-stream":32,"./parse-stream":33,"./stream":35}],35:[function(n,t,i){"use strict";function f(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r,u;Object.defineProperty(i,"__esModule",{value:!0});r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();u=function(){function n(){f(this,n);this.listeners={}}return r(n,[{key:"on",value:function(n,t){this.listeners[n]||(this.listeners[n]=[]);this.listeners[n].push(t)}},{key:"off",value:function(n,t){if(!this.listeners[n])return!1;var i=this.listeners[n].indexOf(t);return this.listeners[n].splice(i,1),i>-1}},{key:"trigger",value:function(n){var i=this.listeners[n],t=void 0,r=void 0,u=void 0;if(i)if(arguments.length===2)for(r=i.length,t=0;t<r;++t)i[t].call(this,arguments[1]);else for(u=Array.prototype.slice.call(arguments,1),r=i.length,t=0;t<r;++t)i[t].apply(this,u)}},{key:"dispose",value:function(){this.listeners={}}},{key:"pipe",value:function(n){this.on("data",function(t){n.push(t)})}}]),n}();i["default"]=u},{}],36:[function(n,t){"use strict";var r=n("../utils/stream.js"),i;i=function(){var n=new Uint8Array,t=0;i.prototype.init.call(this);this.setTimestamp=function(n){t=n};this.parseId3TagSize=function(n,t){var i=n[t+6]<<21|n[t+7]<<14|n[t+8]<<7|n[t+9],r=n[t+5],u=(r&16)>>4;return u?i+20:i+10};this.parseAdtsSize=function(n,t){var i=(n[t+5]&224)>>5,r=n[t+4]<<3,u=n[t+3]&6144;return u|r|i};this.push=function(i){var u=0,r=0,e,o,s,f;for(n.length?(f=n.length,n=new Uint8Array(i.byteLength+f),n.set(n.subarray(0,f)),n.set(i,f)):n=i;n.length-r>=3;){if(n[r]==="I".charCodeAt(0)&&n[r+1]==="D".charCodeAt(0)&&n[r+2]==="3".charCodeAt(0)){if(n.length-r<10)break;if(u=this.parseId3TagSize(n,r),u>n.length)break;o={type:"timed-metadata",data:n.subarray(r,r+u)};this.trigger("data",o);r+=u;continue}else if(n[r]&!0&&(n[r+1]&240)==240){if(n.length-r<7)break;if(u=this.parseAdtsSize(n,r),u>n.length)break;s={type:"audio",data:n.subarray(r,r+u),pts:t,dts:t};this.trigger("data",s);r+=u;continue}r++}e=n.length-r;n=e>0?n.subarray(r):new Uint8Array}};i.prototype=new r;t.exports=i},{"../utils/stream.js":60}],37:[function(n,t){"use strict";var r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(n){return n[0]<<21|n[1]<<14|n[2]<<7|n[3]},u=function(n,t,i){for(var u="",r=t;r<i;r++)u+="%"+("00"+n[r].toString(16)).slice(-2);return u},f=function(n,t,i){return unescape(u(n,t,i))},e=function(n,t){var i=n[t+6]<<21|n[t+7]<<14|n[t+8]<<7|n[t+9],r=n[t+5],u=(r&16)>>4;return u?i+20:i+10},o=function(n,t){var i=(n[t+5]&224)>>5,r=n[t+4]<<3,u=n[t+3]&6144;return u|r|i},s=function(n,t){return n[t]==="I".charCodeAt(0)&&n[t+1]==="D".charCodeAt(0)&&n[t+2]==="3".charCodeAt(0)?"timed-metadata":n[t]&!0&&(n[t+1]&240)==240?"audio":null},h=function(n){for(var t=0;t+5<n.length;){if(n[t]!==255||(n[t+1]&246)!=240){t++;continue}return r[(n[t+2]&60)>>>2]}return null},c=function(n){var t,o,e,h,u,c,r,s;t=10;n[5]&64&&(t+=4,t+=i(n.subarray(10,14)));do{if(o=i(n.subarray(t+4,t+8)),o<1)return null;if(h=String.fromCharCode(n[t],n[t+1],n[t+2],n[t+3]),h==="PRIV")for(e=n.subarray(t+10,t+o+10),u=0;u<e.byteLength;u++)if(e[u]===0){if(c=f(e,0,u),c==="com.apple.streaming.transportStreamTimestamp")return r=e.subarray(u+1),s=(r[3]&1)<<30|r[4]<<22|r[5]<<14|r[6]<<6|r[7]>>>2,s*=4,s+(r[7]&3);break}t+=10;t+=o}while(t<n.byteLength);return null};t.exports={parseId3TagSize:e,parseAdtsSize:o,parseType:s,parseSampleRate:h,parseAacTimestamp:c}},{}],38:[function(n,t){"use strict";var u=n("../utils/stream.js"),i,r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];i=function(){var n;i.prototype.init.call(this);this.push=function(t){var i=0,e=0,h,c,u,f,o,s;if(t.type==="audio")for(n?(f=n,n=new Uint8Array(f.byteLength+t.data.byteLength),n.set(f),n.set(t.data,f.byteLength)):n=t.data;i+5<n.length;){if(n[i]!==255||(n[i+1]&246)!=240){i++;continue}if(c=(~n[i+1]&1)*2,h=(n[i+3]&3)<<11|n[i+4]<<3|(n[i+5]&224)>>5,o=((n[i+6]&3)+1)*1024,s=o*9e4/r[(n[i+2]&60)>>>2],u=i+h,n.byteLength<u)return;if(this.trigger("data",{pts:t.pts+e*s,dts:t.dts+e*s,sampleCount:o,audioobjecttype:(n[i+2]>>>6&3)+1,channelcount:(n[i+2]&1)<<2|(n[i+3]&192)>>>6,samplerate:r[(n[i+2]&60)>>>2],samplingfrequencyindex:(n[i+2]&60)>>>2,samplesize:16,data:n.subarray(i+7+c,u)}),n.byteLength===u){n=undefined;return}e++;n=n.subarray(u)}};this.flush=function(){this.trigger("done")}};i.prototype=new u;t.exports=i},{"../utils/stream.js":60}],39:[function(n,t){"use strict";var u=n("../utils/stream.js"),e=n("../utils/exp-golomb.js"),r,i,f;i=function(){var r=0,t,n;i.prototype.init.call(this);this.push=function(i){var u;for(n?(u=new Uint8Array(n.byteLength+i.data.byteLength),u.set(n),u.set(i.data,n.byteLength),n=u):n=i.data;r<n.byteLength-3;r++)if(n[r+2]===1){t=r+5;break}while(t<n.byteLength)switch(n[t]){case 0:if(n[t-1]!==0){t+=2;break}else if(n[t-2]!==0){t++;break}r+3!==t-2&&this.trigger("data",n.subarray(r+3,t-2));do t++;while(n[t]!==1&&t<n.length);r=t-2;t+=3;break;case 1:if(n[t-1]!==0||n[t-2]!==0){t+=3;break}this.trigger("data",n.subarray(r+3,t-2));r=t-2;t+=3;break;default:t+=3}n=n.subarray(r);t-=r;r=0};this.flush=function(){n&&n.byteLength>3&&this.trigger("data",n.subarray(r+3));n=null;r=0;this.trigger("done")}};i.prototype=new u;f={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0};r=function(){var n=new i,t,s,h,c,u,l,o;r.prototype.init.call(this);t=this;this.push=function(t){t.type==="video"&&(s=t.trackId,h=t.pts,c=t.dts,n.push(t))};n.on("data",function(n){var i={trackId:s,pts:h,dts:c,data:n};switch(n[0]&31){case 5:i.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:i.nalUnitType="sei_rbsp";i.escapedRBSP=u(n.subarray(1));break;case 7:i.nalUnitType="seq_parameter_set_rbsp";i.escapedRBSP=u(n.subarray(1));i.config=l(i.escapedRBSP);break;case 8:i.nalUnitType="pic_parameter_set_rbsp";break;case 9:i.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",i)});n.on("done",function(){t.trigger("done")});this.flush=function(){n.flush()};o=function(n,t){for(var r=8,i=8,f,u=0;u<n;u++)i!==0&&(f=t.readExpGolomb(),i=(r+f+256)%256),r=i===0?r:i};u=function(n){for(var e=n.byteLength,i=[],t=1,u,f,r;t<e-2;)n[t]===0&&n[t+1]===0&&n[t+2]===3?(i.push(t+2),t+=2):t++;if(i.length===0)return n;for(u=e-i.length,f=new Uint8Array(u),r=0,t=0;t<u;r++,t++)r===i[0]&&(r++,i.shift()),f[t]=n[r];return f};l=function(n){var l=0,a=0,v=0,y=0,p=1,t,u,w,b,s,h,k,d,g,c,nt,i,tt,r;if(t=new e(n),u=t.readUnsignedByte(),b=t.readUnsignedByte(),w=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),f[u]&&(s=t.readUnsignedExpGolomb(),s===3&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(nt=s!==3?8:12,r=0;r<nt;r++)t.readBoolean()&&(r<6?o(16,t):o(64,t));if(t.skipUnsignedExpGolomb(),h=t.readUnsignedExpGolomb(),h===0)t.readUnsignedExpGolomb();else if(h===1)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),k=t.readUnsignedExpGolomb(),r=0;r<k;r++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),d=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),c=t.readBits(1),c===0&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(l=t.readUnsignedExpGolomb(),a=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){tt=t.readUnsignedByte();switch(tt){case 1:i=[1,1];break;case 2:i=[12,11];break;case 3:i=[10,11];break;case 4:i=[16,11];break;case 5:i=[40,33];break;case 6:i=[24,11];break;case 7:i=[20,11];break;case 8:i=[32,11];break;case 9:i=[80,33];break;case 10:i=[18,11];break;case 11:i=[15,11];break;case 12:i=[64,33];break;case 13:i=[160,99];break;case 14:i=[4,3];break;case 15:i=[3,2];break;case 16:i=[2,1];break;case 255:i=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}i&&(p=i[0]/i[1])}return{profileIdc:u,levelIdc:w,profileCompatibility:b,width:Math.ceil(((d+1)*16-l*2-a*2)*p),height:(2-c)*(g+1)*16-v*2-y*2}}};r.prototype=new u;t.exports={H264Stream:r,NalByteStream:i}},{"../utils/exp-golomb.js":59,"../utils/stream.js":60}],40:[function(n,t){var r=[33,16,5,32,164,27],u=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],i=function(n){for(var t=[];n--;)t.push(0);return t},f=function(n){return Object.keys(n).reduce(function(t,i){return t[i]=new Uint8Array(n[i].reduce(function(n,t){return n.concat(t)},[])),t},{})},e={96e3:[r,[227,64],i(154),[56]],88200:[r,[231],i(170),[56]],64e3:[r,[248,192],i(240),[56]],48e3:[r,[255,192],i(268),[55,148,128],i(54),[112]],44100:[r,[255,192],i(268),[55,163,128],i(84),[112]],32e3:[r,[255,192],i(268),[55,234],i(226),[112]],24e3:[r,[255,192],i(268),[55,255,128],i(268),[111,112],i(126),[224]],16e3:[r,[255,192],i(268),[55,255,128],i(268),[111,255],i(269),[223,108],i(195),[1,192]],12e3:[u,i(268),[3,127,248],i(268),[6,255,240],i(268),[13,255,224],i(268),[27,253,128],i(259),[56]],11025:[u,i(268),[3,127,248],i(268),[6,255,240],i(268),[13,255,224],i(268),[27,255,192],i(268),[55,175,128],i(108),[112]],8e3:[u,i(268),[3,121,16],i(47),[7]]};t.exports=f(e)},{}],41:[function(n,t){"use strict";var r=n("../utils/stream.js"),i=function(n){this.numberOfTracks=0;this.metadataStream=n.metadataStream;this.videoTags=[];this.audioTags=[];this.videoTrack=null;this.audioTrack=null;this.pendingCaptions=[];this.pendingMetadata=[];this.pendingTracks=0;this.processedTracks=0;i.prototype.init.call(this);this.push=function(n){if(n.text)return this.pendingCaptions.push(n);if(n.frames)return this.pendingMetadata.push(n);n.track.type==="video"&&(this.videoTrack=n.track,this.videoTags=n.tags,this.pendingTracks++);n.track.type==="audio"&&(this.audioTrack=n.track,this.audioTags=n.tags,this.pendingTracks++)}};i.prototype=new r;i.prototype.flush=function(n){var u,t,i,f,r={tags:{},captions:[],metadata:[]};if(this.pendingTracks<this.numberOfTracks){if(n!=="VideoSegmentStream"&&n!=="AudioSegmentStream")return;if(this.pendingTracks===0&&(this.processedTracks++,this.processedTracks<this.numberOfTracks))return}if(this.processedTracks+=this.pendingTracks,this.pendingTracks=0,!(this.processedTracks<this.numberOfTracks)){for(this.videoTrack?f=this.videoTrack.timelineStartInfo.pts:this.audioTrack&&(f=this.audioTrack.timelineStartInfo.pts),r.tags.videoTags=this.videoTags,r.tags.audioTags=this.audioTags,i=0;i<this.pendingCaptions.length;i++)t=this.pendingCaptions[i],t.startTime=t.startPts-f,t.startTime/=9e4,t.endTime=t.endPts-f,t.endTime/=9e4,r.captions.push(t);for(i=0;i<this.pendingMetadata.length;i++)u=this.pendingMetadata[i],u.cueTime=u.pts-f,u.cueTime/=9e4,r.metadata.push(u);r.metadata.dispatchType=this.metadataStream.dispatchType;this.videoTrack=null;this.audioTrack=null;this.videoTags=[];this.audioTags=[];this.pendingCaptions.length=0;this.pendingMetadata.length=0;this.pendingTracks=0;this.processedTracks=0;this.trigger("data",r);this.trigger("done")}};t.exports=i},{"../utils/stream.js":60}],42:[function(n,t){"use strict";var i=n("./flv-tag.js"),r=function(n,t,r){var f=new Uint8Array(9),e=new DataView(f.buffer),o,u,s;return(n=n||0,t=t===undefined?!0:t,r=r===undefined?!0:r,e.setUint8(0,70),e.setUint8(1,76),e.setUint8(2,86),e.setUint8(3,1),e.setUint8(4,(t?4:0)|(r?1:0)),e.setUint32(5,f.byteLength),n<=0)?(u=new Uint8Array(f.byteLength+4),u.set(f),u.set([0,0,0,0],f.byteLength),u):(o=new i(i.METADATA_TAG),o.pts=o.dts=0,o.writeMetaDataDouble("duration",n),s=o.finalize().length,u=new Uint8Array(f.byteLength+s),u.set(f),u.set(e.byteLength,s),u)};t.exports=r},{"./flv-tag.js":43}],43:[function(n,t){"use strict";var i;i=function(n,t){var u=0,h=16384,f=function(n,t){var i,r=n.position+t;r<n.bytes.byteLength||(i=new Uint8Array(r*2),i.set(n.bytes.subarray(0,n.position),0),n.bytes=i,n.view=new DataView(n.bytes.buffer))},e=i.widthBytes||new Uint8Array(5),o=i.heightBytes||new Uint8Array(6),s=i.videocodecidBytes||new Uint8Array(12),r;if(!i.widthBytes){for(r=0;r<5;r++)e[r]="width".charCodeAt(r);for(r=0;r<6;r++)o[r]="height".charCodeAt(r);for(r=0;r<12;r++)s[r]="videocodecid".charCodeAt(r);i.widthBytes=e;i.heightBytes=o;i.videocodecidBytes=s}this.keyFrame=!1;switch(n){case i.VIDEO_TAG:this.length=16;h*=6;break;case i.AUDIO_TAG:this.length=13;this.keyFrame=!0;break;case i.METADATA_TAG:this.length=29;this.keyFrame=!0;break;default:throw new Error("Unknown FLV tag type");}this.bytes=new Uint8Array(h);this.view=new DataView(this.bytes.buffer);this.bytes[0]=n;this.position=this.length;this.keyFrame=t;this.pts=0;this.dts=0;this.writeBytes=function(n,t,i){var r=t||0,u;i=i||n.byteLength;u=r+i;f(this,i);this.bytes.set(n.subarray(r,u),this.position);this.position+=i;this.length=Math.max(this.length,this.position)};this.writeByte=function(n){f(this,1);this.bytes[this.position]=n;this.position++;this.length=Math.max(this.length,this.position)};this.writeShort=function(n){f(this,2);this.view.setUint16(this.position,n);this.position+=2;this.length=Math.max(this.length,this.position)};this.negIndex=function(n){return this.bytes[this.length-n]};this.nalUnitSize=function(){return u===0?0:this.length-(u+4)};this.startNalUnit=function(){if(u>0)throw new Error("Attempted to create new NAL wihout closing the old one");u=this.length;this.length+=4;this.position=this.length};this.endNalUnit=function(n){var t,i;this.length===u+4?this.length-=4:u>0&&(t=u+4,i=this.length-t,this.position=u,this.view.setUint32(this.position,i),this.position=this.length,n&&n.push(this.bytes.subarray(t,t+i)));u=0};this.writeMetaDataDouble=function(n,t){var i;if(f(this,2+n.length+9),this.view.setUint16(this.position,n.length),this.position+=2,n==="width")this.bytes.set(e,this.position),this.position+=5;else if(n==="height")this.bytes.set(o,this.position),this.position+=6;else if(n==="videocodecid")this.bytes.set(s,this.position),this.position+=12;else for(i=0;i<n.length;i++)this.bytes[this.position]=n.charCodeAt(i),this.position++;this.position++;this.view.setFloat64(this.position,t);this.position+=8;this.length=Math.max(this.length,this.position);++u};this.writeMetaDataBoolean=function(n,t){var i;for(f(this,2),this.view.setUint16(this.position,n.length),this.position+=2,i=0;i<n.length;i++)f(this,1),this.bytes[this.position]=n.charCodeAt(i),this.position++;f(this,2);this.view.setUint8(this.position,1);this.position++;this.view.setUint8(this.position,t?1:0);this.position++;this.length=Math.max(this.length,this.position);++u};this.finalize=function(){var n,r;switch(this.bytes[0]){case i.VIDEO_TAG:this.bytes[11]=(this.keyFrame||t?16:32)|7;this.bytes[12]=t?0:1;n=this.pts-this.dts;this.bytes[13]=(n&16711680)>>>16;this.bytes[14]=(n&65280)>>>8;this.bytes[15]=(n&255)>>>0;break;case i.AUDIO_TAG:this.bytes[11]=175;this.bytes[12]=t?0:1;break;case i.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,u);this.position=this.length;this.bytes.set([0,0,9],this.position);this.position+=3;this.length=this.position}return r=this.length-11,this.bytes[1]=(r&16711680)>>>16,this.bytes[2]=(r&65280)>>>8,this.bytes[3]=(r&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,f(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=i.frameTime(this.bytes),this}};i.AUDIO_TAG=8;i.VIDEO_TAG=9;i.METADATA_TAG=18;i.isAudioFrame=function(n){return i.AUDIO_TAG===n[0]};i.isVideoFrame=function(n){return i.VIDEO_TAG===n[0]};i.isMetaData=function(n){return i.METADATA_TAG===n[0]};i.isKeyFrame=function(n){return i.isVideoFrame(n)?n[11]===23:i.isAudioFrame(n)?!0:i.isMetaData(n)?!0:!1};i.frameTime=function(n){var t=n[4]<<16;return t|=n[5]<<8,t|=n[6]<<0,t|n[7]<<24};t.exports=i},{}],44:[function(n,t){t.exports={tag:n("./flv-tag"),Transmuxer:n("./transmuxer"),getFlvHeader:n("./flv-header")}},{"./flv-header":42,"./flv-tag":43,"./transmuxer":46}],45:[function(n,t){"use strict";var i=function(){var n=this;this.list=[];this.push=function(n){this.list.push({bytes:n.bytes,dts:n.dts,pts:n.pts,keyFrame:n.keyFrame,metaDataTag:n.metaDataTag})};Object.defineProperty(this,"length",{get:function(){return n.list.length}})};t.exports=i},{}],46:[function(n,t){"use strict";var o=n("../utils/stream.js"),i=n("./flv-tag.js"),r=n("../m2ts/m2ts.js"),a=n("../codecs/adts.js"),v=n("../codecs/h264").H264Stream,y=n("./coalesce-stream.js"),h=n("./tag-list.js"),u,f,e,s,c,l;s=function(n,t){typeof t.pts=="number"&&(n.timelineStartInfo.pts=n.timelineStartInfo.pts===undefined?t.pts:Math.min(n.timelineStartInfo.pts,t.pts));typeof t.dts=="number"&&(n.timelineStartInfo.dts=n.timelineStartInfo.dts===undefined?t.dts:Math.min(n.timelineStartInfo.dts,t.dts))};c=function(n,t){var r=new i(i.METADATA_TAG);return r.dts=t,r.pts=t,r.writeMetaDataDouble("videocodecid",7),r.writeMetaDataDouble("width",n.width),r.writeMetaDataDouble("height",n.height),r};l=function(n,t){var u,r=new i(i.VIDEO_TAG,!0);for(r.dts=t,r.pts=t,r.writeByte(1),r.writeByte(n.profileIdc),r.writeByte(n.profileCompatibility),r.writeByte(n.levelIdc),r.writeByte(255),r.writeByte(225),r.writeShort(n.sps[0].length),r.writeBytes(n.sps[0]),r.writeByte(n.pps.length),u=0;u<n.pps.length;++u)r.writeShort(n.pps[u].length),r.writeBytes(n.pps[u]);return r};e=function(n){var t=[],r;e.prototype.init.call(this);this.push=function(i){s(n,i);n&&n.channelcount===undefined&&(n.audioobjecttype=i.audioobjecttype,n.channelcount=i.channelcount,n.samplerate=i.samplerate,n.samplingfrequencyindex=i.samplingfrequencyindex,n.samplesize=i.samplesize,n.extraData=n.audioobjecttype<<11|n.samplingfrequencyindex<<7|n.channelcount<<3);i.pts=Math.round(i.pts/90);i.dts=Math.round(i.dts/90);t.push(i)};this.flush=function(){var f,u,o,e=new h;if(t.length===0){this.trigger("done","AudioSegmentStream");return}for(o=-Infinity;t.length;)f=t.shift(),(n.extraData!==r||f.pts-o>=1e3)&&(u=new i(i.METADATA_TAG),u.pts=f.pts,u.dts=f.dts,u.writeMetaDataDouble("audiocodecid",10),u.writeMetaDataBoolean("stereo",n.channelcount===2),u.writeMetaDataDouble("audiosamplerate",n.samplerate),u.writeMetaDataDouble("audiosamplesize",16),e.push(u.finalize()),r=n.extraData,u=new i(i.AUDIO_TAG,!0),u.pts=f.pts,u.dts=f.dts,u.view.setUint16(u.position,n.extraData),u.position+=2,u.length=Math.max(u.length,u.position),e.push(u.finalize()),o=f.pts),u=new i(i.AUDIO_TAG),u.pts=f.pts,u.dts=f.dts,u.writeBytes(f.data),e.push(u.finalize());r=null;this.trigger("data",{track:n,tags:e.list});this.trigger("done","AudioSegmentStream")}};e.prototype=new o;f=function(n){var u=[],r,t;f.prototype.init.call(this);this.finishFrame=function(i,u){if(u){if(r&&n&&n.newMetadata&&(u.keyFrame||i.length===0)){var f=c(r,u.dts).finalize(),e=l(n,u.dts).finalize();f.metaDataTag=e.metaDataTag=!0;i.push(f);i.push(e);n.newMetadata=!1}u.endNalUnit();i.push(u.finalize());t=null}};this.push=function(t){s(n,t);t.pts=Math.round(t.pts/90);t.dts=Math.round(t.dts/90);u.push(t)};this.flush=function(){for(var f,e=new h;u.length;){if(u[0].nalUnitType==="access_unit_delimiter_rbsp")break;u.shift()}if(u.length===0){this.trigger("done","VideoSegmentStream");return}while(u.length)f=u.shift(),f.nalUnitType==="seq_parameter_set_rbsp"?(n.newMetadata=!0,r=f.config,n.width=r.width,n.height=r.height,n.sps=[f.data],n.profileIdc=r.profileIdc,n.levelIdc=r.levelIdc,n.profileCompatibility=r.profileCompatibility,t.endNalUnit()):f.nalUnitType==="pic_parameter_set_rbsp"?(n.newMetadata=!0,n.pps=[f.data],t.endNalUnit()):f.nalUnitType==="access_unit_delimiter_rbsp"?(t&&this.finishFrame(e,t),t=new i(i.VIDEO_TAG),t.pts=f.pts,t.dts=f.dts):(f.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(t.keyFrame=!0),t.endNalUnit()),t.startNalUnit(),t.writeBytes(f.data);t&&this.finishFrame(e,t);this.trigger("data",{track:n,tags:e.list});this.trigger("done","VideoSegmentStream")}};f.prototype=new o;u=function(n){var p=this,o,w,i,b,k,d,h,s,c,l,g,t;u.prototype.init.call(this);n=n||{};this.metadataStream=new r.MetadataStream;n.metadataStream=this.metadataStream;o=new r.TransportPacketStream;w=new r.TransportParseStream;i=new r.ElementaryStream;b=new r.TimestampRolloverStream("video");k=new r.TimestampRolloverStream("audio");d=new r.TimestampRolloverStream("timed-metadata");h=new a;s=new v;t=new y(n);o.pipe(w).pipe(i);i.pipe(b).pipe(s);i.pipe(k).pipe(h);i.pipe(d).pipe(this.metadataStream).pipe(t);g=new r.CaptionStream;s.pipe(g).pipe(t);i.on("data",function(n){var i,r,u;if(n.type==="metadata"){for(i=n.tracks.length;i--;)n.tracks[i].type==="video"?r=n.tracks[i]:n.tracks[i].type==="audio"&&(u=n.tracks[i]);r&&!c&&(t.numberOfTracks++,c=new f(r),s.pipe(c).pipe(t));u&&!l&&(t.numberOfTracks++,l=new e(u),h.pipe(l).pipe(t))}});this.push=function(n){o.push(n)};this.flush=function(){o.flush()};t.on("data",function(n){p.trigger("data",n)});t.on("done",function(){p.trigger("done")})};u.prototype=new o;t.exports=u},{"../codecs/adts.js":38,"../codecs/h264":39,"../m2ts/m2ts.js":48,"../utils/stream.js":60,"./coalesce-stream.js":41,"./flv-tag.js":43,"./tag-list.js":45}],47:[function(n,t){"use strict";var o=4,h=128,s=n("../utils/stream"),c=function(n){for(var t=0,r={payloadType:-1,payloadSize:0},u=0,i=0;t<n.byteLength;){if(n[t]===h)break;while(n[t]===255)u+=255,t++;for(u+=n[t++];n[t]===255;)i+=255,t++;if(i+=n[t++],!r.payload&&u===o){r.payloadType=u;r.payloadSize=i;r.payload=n.subarray(t,t+i);break}t+=i;u=0;i=0}return r},l=function(n){return n.payload[0]!==181?null:(n.payload[1]<<8|n.payload[2])!=49?null:String.fromCharCode(n.payload[3],n.payload[4],n.payload[5],n.payload[6])!=="GA94"?null:n.payload[7]!==3?null:n.payload.subarray(8,n.payload.length-1)},a=function(n,t){var u=[],r,e,i,f;if(!(t[0]&64))return u;for(e=t[0]&31,r=0;r<e;r++)i=r*3,f={type:t[i+2]&3,pts:n},t[i+2]&4&&(f.ccData=t[i+3]<<8|t[i+4],u.push(f));return u},u=function(){u.prototype.init.call(this);this.captionPackets_=[];this.field1_=new r;this.field1_.on("data",this.trigger.bind(this,"data"));this.field1_.on("done",this.trigger.bind(this,"done"))};u.prototype=new s;u.prototype.push=function(n){var t,i;n.nalUnitType==="sei_rbsp"&&(t=c(n.escapedRBSP),t.payloadType===o)&&(i=l(t),i)&&(this.captionPackets_=this.captionPackets_.concat(a(n.pts,i)))};u.prototype.flush=function(){if(!this.captionPackets_.length){this.field1_.flush();return}this.captionPackets_.forEach(function(n,t){n.presortIndex=t});this.captionPackets_.sort(function(n,t){return n.pts===t.pts?n.presortIndex-t.presortIndex:n.pts-t.pts});this.captionPackets_.forEach(this.field1_.push,this.field1_);this.captionPackets_.length=0;this.field1_.flush();return};var v={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608},f=function(n){return n===null?"":(n=v[n]||n,String.fromCharCode(n))},y=0,p=5152,w=5167,b=5157,k=5158,d=5159,g=5165,nt=5153,tt=5164,it=5166,i=14,e=function(){for(var n=[],t=i+1;t--;)n.push("");return n},r=function(){r.prototype.init.call(this);this.mode_="popOn";this.topRow_=0;this.startPts_=0;this.displayed_=e();this.nonDisplayed_=e();this.lastControlCode_=null;this.push=function(n){if(n.type===0){var u,f,t,r;if(u=n.ccData&32639,u===this.lastControlCode_){this.lastControlCode_=null;return}this.lastControlCode_=(u&61440)==4096?u:null;switch(u){case y:break;case p:this.mode_="popOn";break;case w:this.flushDisplayed(n.pts);f=this.displayed_;this.displayed_=this.nonDisplayed_;this.nonDisplayed_=f;this.startPts_=n.pts;break;case b:this.topRow_=i-1;this.mode_="rollUp";break;case k:this.topRow_=i-2;this.mode_="rollUp";break;case d:this.topRow_=i-3;this.mode_="rollUp";break;case g:this.flushDisplayed(n.pts);this.shiftRowsUp_();this.startPts_=n.pts;break;case nt:this.mode_==="popOn"?this.nonDisplayed_[i]=this.nonDisplayed_[i].slice(0,-1):this.displayed_[i]=this.displayed_[i].slice(0,-1);break;case tt:this.flushDisplayed(n.pts);this.displayed_=e();break;case it:this.nonDisplayed_=e();break;default:if(t=u>>>8,r=u&255,t>=16&&t<=23&&r>=64&&r<=127&&(t!==16||r<96)&&(t=32,r=null),(t===17||t===25)&&r>=48&&r<=63&&(t=9834,r=""),(t&240)==16)return;t===0&&(t=null);r===0&&(r=null);this[this.mode_](n.pts,t,r)}}}};r.prototype=new s;r.prototype.flushDisplayed=function(n){var t=this.displayed_.map(function(n){return n.trim()}).filter(function(n){return n.length}).join("\n");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:n,text:t})};r.prototype.popOn=function(n,t,r){var u=this.nonDisplayed_[i];u+=f(t);u+=f(r);this.nonDisplayed_[i]=u};r.prototype.rollUp=function(n,t,r){var u=this.displayed_[i];u===""&&(this.flushDisplayed(n),this.startPts_=n);u+=f(t);u+=f(r);this.displayed_[i]=u};r.prototype.shiftRowsUp_=function(){for(var n=0;n<this.topRow_;n++)this.displayed_[n]="";for(n=this.topRow_;n<i;n++)this.displayed_[n]=this.displayed_[n+1];this.displayed_[i]=""};t.exports={CaptionStream:u,Cea608Stream:r}},{"../utils/stream":60}],48:[function(n,t){"use strict";var s=n("../utils/stream.js"),a=n("./caption-stream"),i=n("./stream-types"),v=n("./timestamp-rollover-stream").TimestampRolloverStream,h=n("./stream-types.js"),f,u,e,r=188,c=71,l,o;f=function(){var t=new Uint8Array(r),n=0;f.prototype.init.call(this);this.push=function(i){var f=0,e=r,u;for(n?(u=new Uint8Array(i.byteLength+n),u.set(t.subarray(0,n)),u.set(i,n),n=0):u=i;e<u.byteLength;){if(u[f]===c&&u[e]===c){this.trigger("data",u.subarray(f,e));f+=r;e+=r;continue}f++;e++}f<u.byteLength&&(t.set(u.subarray(f),0),n=u.byteLength-f)};this.flush=function(){n===r&&t[0]===c&&(this.trigger("data",t),n=0);this.trigger("done")}};f.prototype=new s;u=function(){var t,i,r,n;u.prototype.init.call(this);n=this;this.packetsWaitingForPmt=[];this.programMapTable=undefined;t=function(n,t){var u=0;t.payloadUnitStartIndicator&&(u+=n[u]+1);t.type==="pat"?i(n.subarray(u),t):r(n.subarray(u),t)};i=function(t,i){i.section_number=t[7];i.last_section_number=t[8];n.pmtPid=(t[10]&31)<<8|t[11];i.pmtPid=n.pmtPid};r=function(t,i){var u,f,e,r;if(t[5]&1){for(n.programMapTable={},u=(t[1]&15)<<8|t[2],f=3+u-4,e=(t[10]&15)<<8|t[11],r=12+e;r<f;)n.programMapTable[(t[r+1]&31)<<8|t[r+2]]=t[r],r+=((t[r+3]&15)<<8|t[r+4])+5;for(i.programMapTable=n.programMapTable;n.packetsWaitingForPmt.length;)n.processPes_.apply(n,n.packetsWaitingForPmt.shift())}};this.push=function(n){var i={},r=4;i.payloadUnitStartIndicator=!!(n[1]&64);i.pid=n[1]&31;i.pid<<=8;i.pid|=n[2];(n[3]&48)>>>4>1&&(r+=n[r]+1);i.pid===0?(i.type="pat",t(n.subarray(r),i),this.trigger("data",i)):i.pid===this.pmtPid?(i.type="pmt",t(n.subarray(r),i),this.trigger("data",i)):this.programMapTable===undefined?this.packetsWaitingForPmt.push([n,r,i]):this.processPes_(n,r,i)};this.processPes_=function(n,t,i){i.streamType=this.programMapTable[i.pid];i.type="pes";i.data=n.subarray(t);this.trigger("data",i)}};u.prototype=new s;u.STREAM_TYPES={h264:27,adts:15};e=function(){var t=this,r={data:[],size:0},u={data:[],size:0},f={data:[],size:0},o=function(n,t){var i;t.dataAlignmentIndicator=(n[6]&4)!=0;i=n[7];i&192&&(t.pts=(n[9]&14)<<27|(n[10]&255)<<20|(n[11]&254)<<12|(n[12]&255)<<5|(n[13]&254)>>>3,t.pts*=4,t.pts+=(n[13]&6)>>>1,t.dts=t.pts,i&64&&(t.dts=(n[14]&14)<<27|(n[15]&255)<<20|(n[16]&254)<<12|(n[17]&255)<<5|(n[18]&254)>>>3,t.dts*=4,t.dts+=(n[18]&6)>>>1));t.data=n.subarray(9+n[8])},n=function(n,i){var f=new Uint8Array(n.size),r={type:i},e=0,u;if(n.data.length){for(r.trackId=n.data[0].pid;n.data.length;)u=n.data.shift(),f.set(u.data,e),e+=u.data.byteLength;o(f,r);n.size=0;t.trigger("data",r)}};e.prototype.init.call(this);this.push=function(e){({pat:function(){},pes:function(){var t,o;switch(e.streamType){case i.H264_STREAM_TYPE:case h.H264_STREAM_TYPE:t=r;o="video";break;case i.ADTS_STREAM_TYPE:t=u;o="audio";break;case i.METADATA_STREAM_TYPE:t=f;o="timed-metadata";break;default:return}e.payloadUnitStartIndicator&&n(t,o);t.data.push(e);t.size+=e.data.byteLength},pmt:function(){var u={type:"metadata",tracks:[]},r=e.programMapTable,i,n;for(i in r)r.hasOwnProperty(i)&&(n={timelineStartInfo:{baseMediaDecodeTime:0}},n.id=+i,r[i]===h.H264_STREAM_TYPE?(n.codec="avc",n.type="video"):r[i]===h.ADTS_STREAM_TYPE&&(n.codec="adts",n.type="audio"),u.tracks.push(n));t.trigger("data",u)}})[e.type]()};this.flush=function(){n(r,"video");n(u,"audio");n(f,"timed-metadata");this.trigger("done")}};e.prototype=new s;l={PAT_PID:0,MP2T_PACKET_LENGTH:r,TransportPacketStream:f,TransportParseStream:u,ElementaryStream:e,TimestampRolloverStream:v,CaptionStream:a.CaptionStream,Cea608Stream:a.Cea608Stream,MetadataStream:n("./metadata-stream")};for(o in i)i.hasOwnProperty(o)&&(l[o]=i[o]);t.exports=l},{"../utils/stream.js":60,"./caption-stream":47,"./metadata-stream":49,"./stream-types":51,"./stream-types.js":51,"./timestamp-rollover-stream":52}],49:[function(n,t){"use strict";var o=n("../utils/stream"),s=n("./stream-types"),f=function(n,t,i){for(var u="",r=t;r<i;r++)u+="%"+("00"+n[r].toString(16)).slice(-2);return u},i=function(n,t,i){return decodeURIComponent(f(n,t,i))},h=function(n,t,i){return unescape(f(n,t,i))},r=function(n){return n[0]<<21|n[1]<<14|n[2]<<7|n[3]},e={TXXX:function(n){var t;if(n.data[0]===3){for(t=1;t<n.data.length;t++)if(n.data[t]===0){n.description=i(n.data,1,t);n.value=i(n.data,t+1,n.data.length).replace(/\0*$/,"");break}n.data=n.value}},WXXX:function(n){var t;if(n.data[0]===3)for(t=1;t<n.data.length;t++)if(n.data[t]===0){n.description=i(n.data,1,t);n.url=i(n.data,t+1,n.data.length);break}},PRIV:function(n){for(var t=0;t<n.data.length;t++)if(n.data[t]===0){n.owner=h(n.data,0,t);break}n.privateData=n.data.subarray(t+1);n.data=n.privateData}},u;u=function(n){var f={debug:!!(n&&n.debug),descriptor:n&&n.descriptor},i=0,t=[],o=0,h;if(u.prototype.init.call(this),this.dispatchType=s.METADATA_STREAM_TYPE.toString(16),f.descriptor)for(h=0;h<f.descriptor.length;h++)this.dispatchType+=("00"+f.descriptor[h].toString(16)).slice(-2);this.push=function(n){var u,s,a,h,l,y,c,v;if(n.type==="timed-metadata"){if(n.dataAlignmentIndicator&&(o=0,t.length=0),t.length===0&&(n.data.length<10||n.data[0]!=="I".charCodeAt(0)||n.data[1]!=="D".charCodeAt(0)||n.data[2]!=="3".charCodeAt(0))){f.debug&&console.log("Skipping unrecognized metadata packet");return}if(t.push(n),o+=n.data.byteLength,t.length===1&&(i=r(n.data.subarray(6,10))+10),!(o<i)){for(u={data:new Uint8Array(i),frames:[],pts:t[0].pts,dts:t[0].dts},l=0;l<i;)u.data.set(t[0].data.subarray(0,i-l),l),l+=t[0].data.byteLength,o-=t[0].data.byteLength,t.shift();s=10;u.data[5]&64&&(s+=4,s+=r(u.data.subarray(10,14)),i-=r(u.data.subarray(16,20)));do{if(a=r(u.data.subarray(s+4,s+8)),a<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");y=String.fromCharCode(u.data[s],u.data[s+1],u.data[s+2],u.data[s+3]);h={id:y,data:u.data.subarray(s+10,s+a+10)};h.key=h.id;e[h.id]&&(e[h.id](h),h.owner==="com.apple.streaming.transportStreamTimestamp"&&(c=h.data,v=(c[3]&1)<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2,v*=4,v+=c[7]&3,h.timeStamp=v,u.pts===undefined&&u.dts===undefined&&(u.pts=h.timeStamp,u.dts=h.timeStamp),this.trigger("timestamp",h)));u.frames.push(h);s+=10;s+=a}while(s<i);this.trigger("data",u)}}}};u.prototype=new o;t.exports=u},{"../utils/stream":60,"./stream-types":51}],50:[function(n,t){"use strict";var u=n("./stream-types.js"),e=function(n){var t=n[1]&31;return t<<=8,t|n[2]},i=function(n){return!!(n[1]&64)},r=function(n){var t=0;return(n[3]&48)>>>4>1&&(t+=n[4]+1),t},o=function(n,t){var i=e(n);return i===0?"pat":i===t?"pmt":t?"pes":null},s=function(n){var u=i(n),t=4+r(n);return u&&(t+=n[t]+1),(n[t+10]&31)<<8|n[t+11]},h=function(n){var e={},c=i(n),t=4+r(n),o,s,h,f,u;if(c&&(t+=n[t]+1),n[t+5]&1){for(o=(n[t+1]&15)<<8|n[t+2],s=3+o-4,h=(n[t+10]&15)<<8|n[t+11],f=12+h;f<s;)u=t+f,e[(n[u+1]&31)<<8|n[u+2]]=n[u],f+=((n[u+3]&15)<<8|n[u+4])+5;return e}},c=function(n,t){var i=e(n),r=t[i];switch(r){case u.H264_STREAM_TYPE:return"video";case u.ADTS_STREAM_TYPE:return"audio";case u.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},l=function(n){var e=i(n),t,u,f;return e?(t=4+r(n),t>=n.byteLength)?null:(u=null,f=n[t+7],f&192&&(u={},u.pts=(n[t+9]&14)<<27|(n[t+10]&255)<<20|(n[t+11]&254)<<12|(n[t+12]&255)<<5|(n[t+13]&254)>>>3,u.pts*=4,u.pts+=(n[t+13]&6)>>>1,u.dts=u.pts,f&64&&(u.dts=(n[t+14]&14)<<27|(n[t+15]&255)<<20|(n[t+16]&254)<<12|(n[t+17]&255)<<5|(n[t+18]&254)>>>3,u.dts*=4,u.dts+=(n[t+18]&6)>>>1)),u):null},f=function(n){switch(n){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}},a=function(n){for(var s=4+r(n),i=n.subarray(s),t=0,u=0,o=!1,e;u<i.byteLength-3;u++)if(i[u+2]===1){t=u+5;break}while(t<i.byteLength)switch(i[t]){case 0:if(i[t-1]!==0){t+=2;break}else if(i[t-2]!==0){t++;break}u+3!==t-2&&(e=f(i[u+3]&31),e==="slice_layer_without_partitioning_rbsp_idr"&&(o=!0));do t++;while(i[t]!==1&&t<i.length);u=t-2;t+=3;break;case 1:if(i[t-1]!==0||i[t-2]!==0){t+=3;break}e=f(i[u+3]&31);e==="slice_layer_without_partitioning_rbsp_idr"&&(o=!0);u=t-2;t+=3;break;default:t+=3}return i=i.subarray(u),t-=u,u=0,i&&i.byteLength>3&&(e=f(i[u+3]&31),e==="slice_layer_without_partitioning_rbsp_idr"&&(o=!0)),o};t.exports={parseType:o,parsePat:s,parsePmt:h,parsePayloadUnitStartIndicator:i,parsePesType:c,parsePesTime:l,videoPacketContainsKeyFrame:a}},{"./stream-types.js":51}],51:[function(n,t){"use strict";t.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},{}],52:[function(n,t){"use strict";var u=n("../utils/stream"),f=8589934592,e=4294967296,i=function(n,t){var i=1;for(n>t&&(i=-1);Math.abs(t-n)>e;)n+=i*f;return n},r=function(n){var u,t;r.prototype.init.call(this);this.type_=n;this.push=function(n){n.type===this.type_&&(t===undefined&&(t=n.dts),n.dts=i(n.dts,t),n.pts=i(n.pts,t),u=n.dts,this.trigger("data",n))};this.flush=function(){t=u;this.trigger("done")};this.discontinuity=function(){t=void 0;u=void 0}};r.prototype=new u;t.exports={TimestampRolloverStream:r,handleRollover:i}},{"../utils/stream":60}],53:[function(n,t){t.exports={generator:n("./mp4-generator"),Transmuxer:n("./transmuxer").Transmuxer,AudioSegmentStream:n("./transmuxer").AudioSegmentStream,VideoSegmentStream:n("./transmuxer").VideoSegmentStream}},{"./mp4-generator":54,"./transmuxer":56}],54:[function(n,t){"use strict";var h=Math.pow(2,32)-1,r,c,l,f,a,v,y,p,e,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,o,i,s,ot,st,ht,ct,lt,at,vt,yt,u,pt,wt,bt;(function(){var n;if(i={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:[]},typeof Uint8Array!="undefined"){for(n in i)i.hasOwnProperty(n)&&(i[n]=[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3)]);s=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]);st=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]);ot=new Uint8Array([0,0,0,1]);ht=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]);ct=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]);lt={video:ht,audio:ct};yt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);vt=new Uint8Array([0,0,0,0,0,0,0,0]);u=new Uint8Array([0,0,0,0,0,0,0,0]);pt=u;wt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);bt=u;at=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})();r=function(n){for(var r=[],u=0,i,f,t=1;t<arguments.length;t++)r.push(arguments[t]);for(t=r.length;t--;)u+=r[t].byteLength;for(i=new Uint8Array(u+8),f=new DataView(i.buffer,i.byteOffset,i.byteLength),f.setUint32(0,i.byteLength),i.set(n,4),t=0,u=8;t<r.length;t++)i.set(r[t],u),u+=r[t].byteLength;return i};c=function(){return r(i.dinf,r(i.dref,yt))};l=function(n){return r(i.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,n.audioobjecttype<<3|n.samplingfrequencyindex>>>1,n.samplingfrequencyindex<<7|n.channelcount<<3,6,1,2]))};f=function(){return r(i.ftyp,s,ot,s,st)};tt=function(n){return r(i.hdlr,lt[n])};a=function(n){return r(i.mdat,n)};nt=function(n){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,n.duration>>>24&255,n.duration>>>16&255,n.duration>>>8&255,n.duration&255,85,196,0,0]);return n.samplerate&&(t[12]=n.samplerate>>>24&255,t[13]=n.samplerate>>>16&255,t[14]=n.samplerate>>>8&255,t[15]=n.samplerate&255),r(i.mdhd,t)};g=function(n){return r(i.mdia,nt(n),tt(n.type),y(n))};v=function(n){return r(i.mfhd,new Uint8Array([0,0,0,0,(n&4278190080)>>24,(n&16711680)>>16,(n&65280)>>8,n&255]))};y=function(n){return r(i.minf,n.type==="video"?r(i.vmhd,at):r(i.smhd,vt),c(),rt(n))};p=function(n,t){for(var f=[],u=t.length;u--;)f[u]=ft(t[u]);return r.apply(null,[i.moof,v(n)].concat(f))};e=function(n){for(var t=n.length,u=[];t--;)u[t]=k(n[t]);return r.apply(null,[i.moov,b(4294967295)].concat(u).concat(w(n)))};w=function(n){for(var t=n.length,u=[];t--;)u[t]=et(n[t]);return r.apply(null,[i.mvex].concat(u))};b=function(n){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(n&4278190080)>>24,(n&16711680)>>16,(n&65280)>>8,n&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 r(i.mvhd,t)};it=function(n){for(var f=n.samples||[],e=new Uint8Array(4+f.length),u,t=0;t<f.length;t++)u=f[t].flags,e[t+4]=u.dependsOn<<4|u.isDependedOn<<2|u.hasRedundancy;return r(i.sdtp,e)};rt=function(n){return r(i.stbl,ut(n),r(i.stts,bt),r(i.stsc,pt),r(i.stsz,wt),r(i.stco,u))},function(){var n,t;ut=function(u){return r(i.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),u.type==="video"?n(u):t(u))};n=function(n){for(var u=n.sps||[],f=n.pps||[],e=[],o=[],t=0;t<u.length;t++)e.push((u[t].byteLength&65280)>>>8),e.push(u[t].byteLength&255),e=e.concat(Array.prototype.slice.call(u[t]));for(t=0;t<f.length;t++)o.push((f[t].byteLength&65280)>>>8),o.push(f[t].byteLength&255),o=o.concat(Array.prototype.slice.call(f[t]));return r(i.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,(n.width&65280)>>8,n.width&255,(n.height&65280)>>8,n.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]),r(i.avcC,new Uint8Array([1,n.profileIdc,n.profileCompatibility,n.levelIdc,255].concat([u.length]).concat(e).concat([f.length]).concat(o))),r(i.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))};t=function(n){return r(i.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(n.channelcount&65280)>>8,n.channelcount&255,(n.samplesize&65280)>>8,n.samplesize&255,0,0,0,0,(n.samplerate&65280)>>8,n.samplerate&255,0,0]),l(n))}}();d=function(n){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(n.id&4278190080)>>24,(n.id&16711680)>>16,(n.id&65280)>>8,n.id&255,0,0,0,0,(n.duration&4278190080)>>24,(n.duration&16711680)>>16,(n.duration&65280)>>8,n.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,(n.width&65280)>>8,n.width&255,0,0,(n.height&65280)>>8,n.height&255,0,0]);return r(i.tkhd,t)};ft=function(n){var e,s,f,c,l,t,u;return(e=r(i.tfhd,new Uint8Array([0,0,0,58,(n.id&4278190080)>>24,(n.id&16711680)>>16,(n.id&65280)>>8,n.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),t=Math.floor(n.baseMediaDecodeTime/(h+1)),u=Math.floor(n.baseMediaDecodeTime%(h+1)),s=r(i.tfdt,new Uint8Array([1,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,t&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255])),l=92,n.type==="audio")?(f=o(n,l),r(i.traf,e,s,f)):(c=it(n),f=o(n,c.length+l),r(i.traf,e,s,f,c))};k=function(n){return n.duration=n.duration||4294967295,r(i.trak,d(n),g(n))};et=function(n){var t=new Uint8Array([0,0,0,0,(n.id&4278190080)>>24,(n.id&16711680)>>16,(n.id&65280)>>8,n.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return n.type!=="video"&&(t[t.length-1]=0),r(i.trex,t)},function(){var t,u,n;n=function(n,t){var i=0,r=0,u=0,f=0;return n.length&&(n[0].duration!==undefined&&(i=1),n[0].size!==undefined&&(r=2),n[0].flags!==undefined&&(u=4),n[0].compositionTimeOffset!==undefined&&(f=8)),[0,0,i|r|u|f,1,(n.length&4278190080)>>>24,(n.length&16711680)>>>16,(n.length&65280)>>>8,n.length&255,(t&4278190080)>>>24,(t&16711680)>>>16,(t&65280)>>>8,t&255]};u=function(t,u){var o,e,f,s;for(e=t.samples||[],u+=20+16*e.length,o=n(e,u),s=0;s<e.length;s++)f=e[s],o=o.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 r(i.trun,new Uint8Array(o))};t=function(t,u){var o,e,f,s;for(e=t.samples||[],u+=20+8*e.length,o=n(e,u),s=0;s<e.length;s++)f=e[s],o=o.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 r(i.trun,new Uint8Array(o))};o=function(n,i){return n.type==="audio"?t(n,i):u(n,i)}}();t.exports={ftyp:f,mdat:a,moof:p,moov:e,initSegment:function(n){var i=f(),r=e(n),t;return t=new Uint8Array(i.byteLength+r.byteLength),t.set(i),t.set(r,i.byteLength),t}}},{}],55:[function(n,t){"use strict";var i,r,u,f;i=function(n,t){var e=[],u,f,h,o,s;if(!t.length)return null;for(u=0;u<n.byteLength;)f=n[u]<<24,f|=n[u+1]<<16,f|=n[u+2]<<8,f|=n[u+3],h=r(n.subarray(u+4,u+8)),o=f>1?u+f:n.byteLength,h===t[0]&&(t.length===1?e.push(n.subarray(u+8,o)):(s=i(n.subarray(u+8,o),t.slice(1)),s.length&&(e=e.concat(s)))),u=o;return e};r=function(n){var t="";return t+=String.fromCharCode(n[0]),t+=String.fromCharCode(n[1]),t+=String.fromCharCode(n[2]),t+String.fromCharCode(n[3])};u=function(n){var t=i(n,["moov","trak"]);return t.reduce(function(n,t){var u,e,r,o,f;return(u=i(t,["tkhd"])[0],!u)?null:(e=u[0],r=e===0?12:20,o=u[r]<<24|u[r+1]<<16|u[r+2]<<8|u[r+3],f=i(t,["mdia","mdhd"])[0],!f)?null:(e=f[0],r=e===0?12:20,n[o]=f[r]<<24|f[r+1]<<16|f[r+2]<<8|f[r+3],n)},{})};f=function(n,t){var u,f,r;return u=i(t,["moof","traf"]),f=[].concat.apply([],u.map(function(t){return i(t,["tfhd"]).map(function(r){var f,e,u;return f=r[4]<<24|r[5]<<16|r[6]<<8|r[7],e=n[f]||9e4,u=i(t,["tfdt"]).map(function(n){var i,t;return i=n[0],t=n[4]<<24|n[5]<<16|n[6]<<8|n[7],i===1&&(t*=Math.pow(2,32),t+=n[8]<<24|n[9]<<16|n[10]<<8|n[11]),t})[0],u=u||Infinity,u/e})})),r=Math.min.apply(null,f),isFinite(r)?r:0};t.exports={parseType:r,timescale:u,startTime:f}},{}],56:[function(n,t){"use strict";var s=n("../utils/stream.js"),f=n("./mp4-generator.js"),i=n("../m2ts/m2ts.js"),w=n("../codecs/adts.js"),nt=n("../codecs/h264").H264Stream,tt=n("../aac"),it=n("../data/silence"),b=n("../utils/clock"),l=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],a=["width","height","profileIdc","levelIdc","profileCompatibility"],v=9e4,e,r,h,u,k,d,c,o,y,p,g;k=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0}}};d=function(n){return n[0]==="I".charCodeAt(0)&&n[1]==="D".charCodeAt(0)&&n[2]==="3".charCodeAt(0)?!0:!1};p=function(n,t){var i;if(n.length!==t.length)return!1;for(i=0;i<n.length;i++)if(n[i]!==t[i])return!1;return!0};g=function(n){for(var i,r=0,t=0;t<n.length;t++)i=n[t],r+=i.data.byteLength;return r};r=function(n){var t=[],s=0,i=0,u=0,e=Infinity;r.prototype.init.call(this);this.push=function(i){c(n,i);n&&l.forEach(function(t){n[t]=i[t]});t.push(i)};this.setEarliestDts=function(t){i=t-n.timelineStartInfo.baseMediaDecodeTime};this.setVideoBaseMediaDecodeTime=function(n){e=n};this.setAudioAppendStart=function(n){u=n};this.flush=function(){var i,r,e,u;if(t.length===0){this.trigger("done","AudioSegmentStream");return}i=this.trimAdtsFramesByEarliestDts_(t);n.baseMediaDecodeTime=y(n);this.prefixWithSilence_(n,i);n.samples=this.generateSampleTable_(i);e=f.mdat(this.concatenateFrameData_(i));t=[];r=f.moof(s,[n]);u=new Uint8Array(r.byteLength+e.byteLength);s++;u.set(r);u.set(e,r.byteLength);o(n);this.trigger("data",{track:n,boxes:u});this.trigger("done","AudioSegmentStream")};this.prefixWithSilence_=function(n,t){var h,o=0,c=0,i=0,s=0,r,f;if(t.length&&(h=b.audioTsToVideoTs(n.baseMediaDecodeTime,n.samplerate),o=Math.ceil(v/(n.samplerate/1024)),u&&e&&(c=h-Math.max(u,e),i=Math.floor(c/o),s=i*o),!(i<1)&&!(s>v/2))){for(r=it[n.samplerate],r||(r=t[0].data),f=0;f<i;f++)t.splice(f,0,{data:r});n.baseMediaDecodeTime-=Math.floor(b.videoTsToAudioTs(s,n.samplerate))}};this.trimAdtsFramesByEarliestDts_=function(t){return n.minSegmentDts>=i?t:(n.minSegmentDts=Infinity,t.filter(function(t){return t.dts>=i?(n.minSegmentDts=Math.min(n.minSegmentDts,t.dts),n.minSegmentPts=n.minSegmentDts,!0):!1}))};this.generateSampleTable_=function(n){for(var i,r=[],t=0;t<n.length;t++)i=n[t],r.push({size:i.data.byteLength,duration:1024});return r};this.concatenateFrameData_=function(n){for(var i,r=0,u=new Uint8Array(g(n)),t=0;t<n.length;t++)i=n[t],u.set(i.data,r),r+=i.data.byteLength;return u}};r.prototype=new s;e=function(n){var u=0,t=[],i,r;e.prototype.init.call(this);delete n.minPTS;this.gopCache_=[];this.push=function(u){c(n,u);u.nalUnitType!=="seq_parameter_set_rbsp"||i||(i=u.config,n.sps=[u.data],a.forEach(function(t){n[t]=i[t]},this));u.nalUnitType!=="pic_parameter_set_rbsp"||r||(r=u.data,n.pps=[u.data]);t.push(u)};this.flush=function(){for(var h,r,i,e,s,o;t.length;){if(t[0].nalUnitType==="access_unit_delimiter_rbsp")break;t.shift()}if(t.length===0){this.resetStream_();this.trigger("done","VideoSegmentStream");return}h=this.groupNalsIntoFrames_(t);i=this.groupFramesIntoGops_(h);i[0][0].keyFrame||(r=this.getGopForFusion_(t[0],n),r?(i.unshift(r),i.byteLength+=r.byteLength,i.nalCount+=r.nalCount,i.pts=r.pts,i.dts=r.dts,i.duration+=r.duration):i=this.extendFirstKeyFrame_(i));c(n,i);n.samples=this.generateSampleTable_(i);s=f.mdat(this.concatenateNalData_(i));this.gopCache_.unshift({gop:i.pop(),pps:n.pps,sps:n.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);t=[];n.baseMediaDecodeTime=y(n);this.trigger("baseMediaDecodeTime",n.baseMediaDecodeTime);this.trigger("timelineStartInfo",n.timelineStartInfo);e=f.moof(u,[n]);o=new Uint8Array(e.byteLength+s.byteLength);u++;o.set(e);o.set(s,e.byteLength);this.trigger("data",{track:n,boxes:o});this.resetStream_();this.trigger("done","VideoSegmentStream")};this.resetStream_=function(){o(n);i=undefined;r=undefined};this.getGopForFusion_=function(t){for(var o=Infinity,i,u,f,r,e=0;e<this.gopCache_.length;e++)(r=this.gopCache_[e],f=r.gop,n.pps&&p(n.pps[0],r.pps[0])&&n.sps&&p(n.sps[0],r.sps[0]))&&(f.dts<n.timelineStartInfo.dts||(i=t.dts-f.dts-f.duration,i>=-1e4&&i<=45e3&&(!u||o>i)&&(u=r,o=i)));return u?u.gop:null};this.extendFirstKeyFrame_=function(n){var t;return!n[0][0].keyFrame&&n.length>1&&(t=n.shift(),n.byteLength-=t.byteLength,n.nalCount-=t.nalCount,n[0][0].dts=t.dts,n[0][0].pts=t.pts,n[0][0].duration+=t.duration),n};this.groupNalsIntoFrames_=function(n){var u,i,t=[],r=[];for(t.byteLength=0,u=0;u<n.length;u++)i=n[u],i.nalUnitType==="access_unit_delimiter_rbsp"?(t.length&&(t.duration=i.dts-t.dts,r.push(t)),t=[i],t.byteLength=i.data.byteLength,t.pts=i.pts,t.dts=i.dts):(i.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(t.keyFrame=!0),t.duration=i.dts-t.dts,t.byteLength+=i.data.byteLength,t.push(i));return r.length&&(!t.duration||t.duration<=0)&&(t.duration=r[r.length-1].duration),r.push(t),r};this.groupFramesIntoGops_=function(n){var u,r,t=[],i=[];for(t.byteLength=0,t.nalCount=0,t.duration=0,t.pts=n[0].pts,t.dts=n[0].dts,i.byteLength=0,i.nalCount=0,i.duration=0,i.pts=n[0].pts,i.dts=n[0].dts,u=0;u<n.length;u++)r=n[u],r.keyFrame?(t.length&&(i.push(t),i.byteLength+=t.byteLength,i.nalCount+=t.nalCount,i.duration+=t.duration),t=[r],t.nalCount=r.length,t.byteLength=r.byteLength,t.pts=r.pts,t.dts=r.dts,t.duration=r.duration):(t.duration+=r.duration,t.nalCount+=r.length,t.byteLength+=r.byteLength,t.push(r));return i.length&&t.duration<=0&&(t.duration=i[i.length-1].duration),i.byteLength+=t.byteLength,i.nalCount+=t.nalCount,i.duration+=t.duration,i.push(t),i};this.generateSampleTable_=function(n,t){for(var f,i,e,r,o=t||0,s=[],u=0;u<n.length;u++)for(e=n[u],f=0;f<e.length;f++)r=e[f],i=k(),i.dataOffset=o,i.compositionTimeOffset=r.pts-r.dts,i.duration=r.duration,i.size=4*r.length,i.size+=r.byteLength,r.keyFrame&&(i.flags.dependsOn=2),o+=i.size,s.push(i);return s};this.concatenateNalData_=function(n){for(var i,r,e,o,u,f=0,h=n.byteLength,c=n.nalCount,l=h+4*c,s=new Uint8Array(l),a=new DataView(s.buffer),t=0;t<n.length;t++)for(e=n[t],i=0;i<e.length;i++)for(o=e[i],r=0;r<o.length;r++)u=o[r],a.setUint32(f,u.data.byteLength),f+=4,s.set(u.data,f),f+=u.data.byteLength;return s}};e.prototype=new s;c=function(n,t){typeof t.pts=="number"&&(n.timelineStartInfo.pts===undefined&&(n.timelineStartInfo.pts=t.pts),n.minSegmentPts=n.minSegmentPts===undefined?t.pts:Math.min(n.minSegmentPts,t.pts),n.maxSegmentPts=n.maxSegmentPts===undefined?t.pts:Math.max(n.maxSegmentPts,t.pts));typeof t.dts=="number"&&(n.timelineStartInfo.dts===undefined&&(n.timelineStartInfo.dts=t.dts),n.minSegmentDts=n.minSegmentDts===undefined?t.dts:Math.min(n.minSegmentDts,t.dts),n.maxSegmentDts=n.maxSegmentDts===undefined?t.dts:Math.max(n.maxSegmentDts,t.dts))};o=function(n){delete n.minSegmentDts;delete n.maxSegmentDts;delete n.minSegmentPts;delete n.maxSegmentPts};y=function(n){var t,i,r=n.minSegmentDts-n.timelineStartInfo.dts;return t=n.timelineStartInfo.baseMediaDecodeTime,t+=r,t=Math.max(0,t),n.type==="audio"&&(i=n.samplerate/v,t*=i,t=Math.floor(t)),t};u=function(n,t){this.numberOfTracks=0;this.metadataStream=t;this.remuxTracks=typeof n.remux!="undefined"?!!n.remux:!0;this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.pendingBytes=0;this.emittedTracks=0;u.prototype.init.call(this);this.push=function(n){if(n.text)return this.pendingCaptions.push(n);if(n.frames)return this.pendingMetadata.push(n);this.pendingTracks.push(n.track);this.pendingBoxes.push(n.boxes);this.pendingBytes+=n.boxes.byteLength;n.track.type==="video"&&(this.videoTrack=n.track);n.track.type==="audio"&&(this.audioTrack=n.track)}};u.prototype=new s;u.prototype.flush=function(n){var s=0,i={captions:[],metadata:[],info:{}},r,u,o,e=0,t;if(this.pendingTracks.length<this.numberOfTracks){if(n!=="VideoSegmentStream"&&n!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++;this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}for(this.videoTrack?(e=this.videoTrack.timelineStartInfo.pts,a.forEach(function(n){i.info[n]=this.videoTrack[n]},this)):this.audioTrack&&(e=this.audioTrack.timelineStartInfo.pts,l.forEach(function(n){i.info[n]=this.audioTrack[n]},this)),i.type=this.pendingTracks.length===1?this.pendingTracks[0].type:"combined",this.emittedTracks+=this.pendingTracks.length,o=f.initSegment(this.pendingTracks),i.initSegment=new Uint8Array(o.byteLength),i.initSegment.set(o),i.data=new Uint8Array(this.pendingBytes),t=0;t<this.pendingBoxes.length;t++)i.data.set(this.pendingBoxes[t],s),s+=this.pendingBoxes[t].byteLength;for(t=0;t<this.pendingCaptions.length;t++)r=this.pendingCaptions[t],r.startTime=r.startPts-e,r.startTime/=9e4,r.endTime=r.endPts-e,r.endTime/=9e4,i.captions.push(r);for(t=0;t<this.pendingMetadata.length;t++)u=this.pendingMetadata[t],u.cueTime=u.pts-e,u.cueTime/=9e4,i.metadata.push(u);i.metadata.dispatchType=this.metadataStream.dispatchType;this.pendingTracks.length=0;this.videoTrack=null;this.pendingBoxes.length=0;this.pendingCaptions.length=0;this.pendingBytes=0;this.pendingMetadata.length=0;this.trigger("data",i);this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)};h=function(n){var s=this,c=!0,f,t;h.prototype.init.call(this);n=n||{};this.baseMediaDecodeTime=n.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var f={};this.transmuxPipeline_=f;f.type="aac";f.metadataStream=new i.MetadataStream;f.aacStream=new tt;f.audioTimestampRolloverStream=new i.TimestampRolloverStream("audio");f.timedMetadataTimestampRolloverStream=new i.TimestampRolloverStream("timed-metadata");f.adtsStream=new w;f.coalesceStream=new u(n,f.metadataStream);f.headOfPipeline=f.aacStream;f.aacStream.pipe(f.audioTimestampRolloverStream).pipe(f.adtsStream);f.aacStream.pipe(f.timedMetadataTimestampRolloverStream).pipe(f.metadataStream).pipe(f.coalesceStream);f.metadataStream.on("timestamp",function(n){f.aacStream.setTimestamp(n.timeStamp)});f.aacStream.on("data",function(n){n.type!=="timed-metadata"||f.audioSegmentStream||(t=t||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},f.coalesceStream.numberOfTracks++,f.audioSegmentStream=new r(t),f.adtsStream.pipe(f.audioSegmentStream).pipe(f.coalesceStream))});f.coalesceStream.on("data",this.trigger.bind(this,"data"));f.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setupTsPipeline=function(){var o={};this.transmuxPipeline_=o;o.type="ts";o.metadataStream=new i.MetadataStream;o.packetStream=new i.TransportPacketStream;o.parseStream=new i.TransportParseStream;o.elementaryStream=new i.ElementaryStream;o.videoTimestampRolloverStream=new i.TimestampRolloverStream("video");o.audioTimestampRolloverStream=new i.TimestampRolloverStream("audio");o.timedMetadataTimestampRolloverStream=new i.TimestampRolloverStream("timed-metadata");o.adtsStream=new w;o.h264Stream=new nt;o.captionStream=new i.CaptionStream;o.coalesceStream=new u(n,o.metadataStream);o.headOfPipeline=o.packetStream;o.packetStream.pipe(o.parseStream).pipe(o.elementaryStream);o.elementaryStream.pipe(o.videoTimestampRolloverStream).pipe(o.h264Stream);o.elementaryStream.pipe(o.audioTimestampRolloverStream).pipe(o.adtsStream);o.elementaryStream.pipe(o.timedMetadataTimestampRolloverStream).pipe(o.metadataStream).pipe(o.coalesceStream);o.h264Stream.pipe(o.captionStream).pipe(o.coalesceStream);o.elementaryStream.on("data",function(n){var i;if(n.type==="metadata"){for(i=n.tracks.length;i--;)f||n.tracks[i].type!=="video"?t||n.tracks[i].type!=="audio"||(t=n.tracks[i],t.timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(f=n.tracks[i],f.timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime);if(f&&!o.videoSegmentStream){o.coalesceStream.numberOfTracks++;o.videoSegmentStream=new e(f);o.videoSegmentStream.on("timelineStartInfo",function(n){t&&(t.timelineStartInfo=n,o.audioSegmentStream.setEarliestDts(n.dts))});o.videoSegmentStream.on("baseMediaDecodeTime",function(n){t&&o.audioSegmentStream.setVideoBaseMediaDecodeTime(n)});o.h264Stream.pipe(o.videoSegmentStream).pipe(o.coalesceStream)}t&&!o.audioSegmentStream&&(o.coalesceStream.numberOfTracks++,o.audioSegmentStream=new r(t),o.adtsStream.pipe(o.audioSegmentStream).pipe(o.coalesceStream))}});o.coalesceStream.on("data",this.trigger.bind(this,"data"));o.coalesceStream.on("done",this.trigger.bind(this,"done"))};this.setBaseMediaDecodeTime=function(n){var i=this.transmuxPipeline_;this.baseMediaDecodeTime=n;t&&(t.timelineStartInfo.dts=undefined,t.timelineStartInfo.pts=undefined,o(t),t.timelineStartInfo.baseMediaDecodeTime=n,i.audioTimestampRolloverStream&&i.audioTimestampRolloverStream.discontinuity());f&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[],i.videoTimestampRolloverStream.discontinuity()),f.timelineStartInfo.dts=undefined,f.timelineStartInfo.pts=undefined,o(f),f.timelineStartInfo.baseMediaDecodeTime=n);i.timedMetadataTimestampRolloverStream&&i.timedMetadataTimestampRolloverStream.discontinuity()};this.setAudioAppendStart=function(n){t&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(n)};this.push=function(n){if(c){var t=d(n);t&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():t||this.transmuxPipeline_.type==="ts"||this.setupTsPipeline();c=!1}this.transmuxPipeline_.headOfPipeline.push(n)};this.flush=function(){c=!0;this.transmuxPipeline_.headOfPipeline.flush()}};h.prototype=new s;t.exports={Transmuxer:h,VideoSegmentStream:e,AudioSegmentStream:r,AUDIO_PROPERTIES:l,VIDEO_PROPERTIES:a}},{"../aac":36,"../codecs/adts.js":38,"../codecs/h264":39,"../data/silence":40,"../m2ts/m2ts.js":48,"../utils/clock":58,"../utils/stream.js":60,"./mp4-generator.js":54}],57:[function(n,t){"use strict";var o=n("../m2ts/stream-types.js"),e=n("../m2ts/timestamp-rollover-stream.js").handleRollover,i={};i.ts=n("../m2ts/probe.js");i.aac=n("../aac/probe.js");var f=9e4,r=188,u=71,s=function(n){return n[0]==="I".charCodeAt(0)&&n[1]==="D".charCodeAt(0)&&n[2]==="3".charCodeAt(0)?!0:!1},h=function(n,t){for(var e=0,f=r,o,s;f<n.byteLength;){if(n[e]===u&&n[f]===u){o=n.subarray(e,f);s=i.ts.parseType(o,t.pid);switch(s){case"pat":t.pid||(t.pid=i.ts.parsePat(o));break;case"pmt":t.table||(t.table=i.ts.parsePmt(o))}if(t.pid&&t.table)return;e+=r;f+=r;continue}e++;f++}},c=function(n,t,f){for(var o=0,e=r,s,l,a,v,h,c=!1;e<n.byteLength;){if(n[o]===u&&n[e]===u){s=n.subarray(o,e);l=i.ts.parseType(s,t.pid);switch(l){case"pes":a=i.ts.parsePesType(s,t.table);v=i.ts.parsePayloadUnitStartIndicator(s);a==="audio"&&v&&(h=i.ts.parsePesTime(s),h&&(h.type="audio",f.audio.push(h),c=!0))}if(c)break;o+=r;e+=r;continue}o++;e++}for(e=n.byteLength,o=e-r,c=!1;o>=0;){if(n[o]===u&&n[e]===u){s=n.subarray(o,e);l=i.ts.parseType(s,t.pid);switch(l){case"pes":a=i.ts.parsePesType(s,t.table);v=i.ts.parsePayloadUnitStartIndicator(s);a==="audio"&&v&&(h=i.ts.parsePesTime(s),h&&(h.type="audio",f.audio.push(h),c=!0))}if(c)break;o-=r;e-=r;continue}o--;e--}},l=function(n,t,f){for(var s=0,o=r,e,v,y,a,h,p,w,b,l=!1,c={data:[],size:0};o<n.byteLength;){if(n[s]===u&&n[o]===u){e=n.subarray(s,o);v=i.ts.parseType(e,t.pid);switch(v){case"pes":if(y=i.ts.parsePesType(e,t.table),a=i.ts.parsePayloadUnitStartIndicator(e),y==="video"&&(a&&!l&&(h=i.ts.parsePesTime(e),h&&(h.type="video",f.video.push(h),l=!0)),!f.firstKeyFrame)){if(a&&c.size!==0){for(p=new Uint8Array(c.size),w=0;c.data.length;)b=c.data.shift(),p.set(b,w),w+=b.byteLength;i.ts.videoPacketContainsKeyFrame(p)&&(f.firstKeyFrame=i.ts.parsePesTime(p),f.firstKeyFrame.type="video");c.size=0}c.data.push(e);c.size+=e.byteLength}}if(l&&f.firstKeyFrame)break;s+=r;o+=r;continue}s++;o++}for(o=n.byteLength,s=o-r,l=!1;s>=0;){if(n[s]===u&&n[o]===u){e=n.subarray(s,o);v=i.ts.parseType(e,t.pid);switch(v){case"pes":y=i.ts.parsePesType(e,t.table);a=i.ts.parsePayloadUnitStartIndicator(e);y==="video"&&a&&(h=i.ts.parsePesTime(e),h&&(h.type="video",f.video.push(h),l=!0))}if(l)break;s-=r;o-=r;continue}s--;o--}},a=function(n,t){var u,r,i;n.audio&&n.audio.length&&(u=t,typeof u=="undefined"&&(u=n.audio[0].dts),n.audio.forEach(function(n){n.dts=e(n.dts,u);n.pts=e(n.pts,u);n.dtsTime=n.dts/f;n.ptsTime=n.pts/f}));n.video&&n.video.length&&(r=t,typeof r=="undefined"&&(r=n.video[0].dts),n.video.forEach(function(n){n.dts=e(n.dts,r);n.pts=e(n.pts,r);n.dtsTime=n.dts/f;n.ptsTime=n.pts/f}),n.firstKeyFrame&&(i=n.firstKeyFrame,i.dts=e(i.dts,r),i.pts=e(i.pts,r),i.dtsTime=i.dts/f,i.ptsTime=i.dts/f))},v=function(n){for(var e=!1,h=0,o=null,u=null,r=0,t=0,s,l,c,a;n.length-t>=3;){l=i.aac.parseType(n,t);switch(l){case"timed-metadata":if(n.length-t<10){e=!0;break}if(r=i.aac.parseId3TagSize(n,t),r>n.length){e=!0;break}u===null&&(s=n.subarray(t,t+r),u=i.aac.parseAacTimestamp(s));t+=r;break;case"audio":if(n.length-t<7){e=!0;break}if(r=i.aac.parseAdtsSize(n,t),r>n.length){e=!0;break}o===null&&(s=n.subarray(t,t+r),o=i.aac.parseSampleRate(s));h++;t+=r;break;default:t++}if(e)return null}return o===null||u===null?null:(c=f/o,a={audio:[{type:"audio",dts:u,pts:u},{type:"audio",dts:u+h*1024*c,pts:u+h*1024*c}]},a)},y=function(n){var i={pid:null,table:null},t={},r,u;h(n,i);for(r in i.table)if(i.table.hasOwnProperty(r)){u=i.table[r];switch(u){case o.H264_STREAM_TYPE:t.video=[];l(n,i,t);t.video.length===0&&delete t.video;break;case o.ADTS_STREAM_TYPE:t.audio=[];c(n,i,t);t.audio.length===0&&delete t.audio}}return t},p=function(n,t){var r=s(n),i;return(i=r?v(n):y(n),!i||!i.audio&&!i.video)?null:(a(i,t),i)};t.exports={inspect:p}},{"../aac/probe.js":37,"../m2ts/probe.js":50,"../m2ts/stream-types.js":51,"../m2ts/timestamp-rollover-stream.js":52}],58:[function(n,t){var e=9e4,i,r,u,f,o,s;i=function(n){return n*e};r=function(n,t){return n*t};u=function(n){return n/e};f=function(n,t){return n/t};o=function(n,t){return i(f(n,t))};s=function(n,t){return r(u(n),t)};t.exports={secondsToVideoTs:i,secondsToAudioTs:r,videoTsToSeconds:u,audioTsToSeconds:f,audioTsToVideoTs:o,videoTsToAudioTs:s}},{}],59:[function(n,t){"use strict";var i;i=function(n){var i=n.byteLength,r=0,t=0;this.length=function(){return 8*i};this.bitsAvailable=function(){return 8*i+t};this.loadWord=function(){var f=n.byteLength-i,e=new Uint8Array(4),u=Math.min(4,i);if(u===0)throw new Error("no bytes available");e.set(n.subarray(f,f+u));r=new DataView(e.buffer).getUint32(0);t=u*8;i-=u};this.skipBits=function(n){var u;t>n?(r<<=n,t-=n):(n-=t,u=Math.floor(n/8),n-=u*8,i-=u,this.loadWord(),r<<=n,t-=n)};this.readBits=function(n){var u=Math.min(t,n),f=r>>>32-u;return(t-=u,t>0?r<<=u:i>0&&this.loadWord(),u=n-u,u>0)?f<<u|this.readBits(u):f};this.skipLeadingZeros=function(){for(var n=0;n<t;++n)if((r&2147483648>>>n)!=0)return r<<=n,t-=n,n;return this.loadWord(),n+this.skipLeadingZeros()};this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.readUnsignedExpGolomb=function(){var n=this.skipLeadingZeros();return this.readBits(n+1)-1};this.readExpGolomb=function(){var n=this.readUnsignedExpGolomb();return 1&n?1+n>>>1:-1*(n>>>1)};this.readBoolean=function(){return this.readBits(1)===1};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()};t.exports=i},{}],60:[function(n,t){"use strict";var i=function(){this.init=function(){var n={};this.on=function(t,i){n[t]||(n[t]=[]);n[t]=n[t].concat(i)};this.off=function(t,i){var r;return n[t]?(r=n[t].indexOf(i),n[t]=n[t].slice(),n[t].splice(r,1),r>-1):!1};this.trigger=function(t){var r,i,u,f;if(r=n[t],r)if(arguments.length===2)for(u=r.length,i=0;i<u;++i)r[i].call(this,arguments[1]);else{for(f=[],i=arguments.length,i=1;i<arguments.length;++i)f.push(arguments[i]);for(u=r.length,i=0;i<u;++i)r[i].apply(this,f)}};this.dispose=function(){n={}}}};i.prototype.pipe=function(n){this.on("data",function(t){n.push(t)});this.on("done",function(t){n.flush(t)});return n};i.prototype.push=function(n){this.trigger("data",n)};i.prototype.flush=function(n){this.trigger("done",n)};t.exports=i},{}],61:[function(t,i,r){(function(t){var u={buildAbsoluteURL:function(n,t){var f,c,l,i,r;if(t=t.trim(),/^[a-z]+:/i.test(t))return t;var o=null,s=null,h=/^([^#]*)(.*)$/.exec(t);if(h&&(s=h[2],t=h[1]),f=/^([^\?]*)(.*)$/.exec(t),f&&(o=f[2],t=f[1]),c=/^([^#]*)(.*)$/.exec(n),c&&(n=c[1]),l=/^([^\?]*)(.*)$/.exec(n),l&&(n=l[1]),i=/^(([a-z]+:)?\/\/[^:\/]+(:[0-9]+)?)?(\/?.*)$/i.exec(n),!i)throw new Error("Error trying to parse base URL.");var v=i[2]||"",a=i[1]||"",e=i[4];return e.indexOf("/")!==0&&a!==""&&(e="/"+e),r=null,r=/^\/\//.test(t)?v+"//"+u.buildAbsolutePath("",t.substring(2)):/^\//.test(t)?a+"/"+u.buildAbsolutePath("",t.substring(1)):u.buildAbsolutePath(a+e,t),o&&(r+=o),s&&(r+=s),r},buildAbsolutePath:function(n,t){for(var o=t,f,e="",u=n.replace(/[^\/]*$/,o.replace(/(\/|^)(?:\.?\/+)+/g,"$1")),i,r=0;i=u.indexOf("/../",r),i>-1;r=i+f)f=/^\/(?:\.\.\/)*/.exec(u.slice(i))[0].length,e=(e+u.substring(r,i)).replace(new RegExp("(?:\\/+[^\\/]*){0,"+(f-1)/3+"}$"),"/");return e+u.substr(r)}};typeof r=="object"&&typeof i=="object"?i.exports=u:typeof n=="function"&&n.amd?n([],function(){return u}):typeof r=="object"?r.URLToolkit=u:t.URLToolkit=u})(this)},{}],62:[function(n,t,i){(function(r){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}Object.defineProperty(i,"__esModule",{value:!0});var s=n("global/window"),e=f(s),h=typeof window!="undefined"?window.videojs:typeof r!="undefined"?r.videojs:null,u=f(h),c=function(n){Object.defineProperties(n.frame,{id:{get:function(){return u["default"].log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),n.value.key}},value:{get:function(){return u["default"].log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),n.value.data}},privateData:{get:function(){return u["default"].log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),n.value.data}}})},o=function(n){var t=undefined;return isNaN(n)||Math.abs(n)===Infinity?Number.MAX_VALUE:n},l=function(n,t,i){var r=e["default"].WebKitDataCue||e["default"].VTTCue;t&&t.forEach(function(n){this.inbandTextTrack_.addCue(new r(n.startTime+this.timestampOffset,n.endTime+this.timestampOffset,n.text))},n);i&&function(){var t=o(n.mediaSource_.duration);i.forEach(function(n){var t=n.cueTime+this.timestampOffset;n.frames.forEach(function(n){var i=new r(t,t,n.value||n.url||n.data||"");i.frame=n;i.value=n;c(i);this.metadataTrack_.addCue(i)},this)},n);n.metadataTrack_&&n.metadataTrack_.cues&&n.metadataTrack_.cues.length&&function(){for(var r=n.metadataTrack_.cues,e=[],u,f,i=0;i<r.length;i++)r[i]&&e.push(r[i]);u=e.reduce(function(n,t){var i=n[t.startTime]||[];return i.push(t),n[t.startTime]=i,n},{});f=Object.keys(u).sort(function(n,t){return Number(n)-Number(t)});f.forEach(function(n,i){var r=u[n],e=Number(f[i+1])||t;r.forEach(function(n){n.endTime=e})})}()}()};i["default"]={addTextTrackData:l,durationOfVideo:o};t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"global/window":30}],63:[function(n,t,i){"use strict";var r,u;Object.defineProperty(i,"__esModule",{value:!0});r=function(n,t,i){for(var f=n.remoteTextTracks()||[],u,r=0;r<f.length;r++)u=f[r],u.kind===t&&u.label===i&&n.removeRemoteTextTrack(u)};i.removeExistingTrack=r;u=function(n){r(n,"captions","cc1");r(n,"metadata","Timed Metadata")};i.cleanupTextTracks=u},{}],64:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(n){return/mp4a\.\d+.\d+/i.test(n)},u=function(n){return/avc1\.[\da-f]+/i.test(n)},f=function(n){var t={type:"",parameters:{}},i=n.trim().split(";");return t.type=i.shift().trim(),i.forEach(function(n){var i=n.trim().split("="),r,u;i.length>1&&(r=i[0].replace(/"/g,"").trim(),u=i[1].replace(/"/g,"").trim(),t.parameters[r]=u)}),t},e=function(n){return n.map(function(n){return n.replace(/avc1\.(\d+)\.(\d+)/i,function(n,t,i){var r=("00"+Number(t).toString(16)).slice(-2),u=("00"+Number(i).toString(16)).slice(-2);return"avc1."+r+"00"+u})})};i["default"]={isAudioCodec:r,parseContentType:f,isVideoCodec:u,translateLegacyCodecs:e};t.exports=i["default"]},{}],65:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=n("./cleanup-text-tracks"),u=function(n,t,i){var u=t.player_;i.captions&&i.captions.length&&!n.inbandTextTrack_&&(r.removeExistingTrack(u,"captions","cc1"),n.inbandTextTrack_=u.addRemoteTextTrack({kind:"captions",label:"cc1"},!1).track);i.metadata&&i.metadata.length&&!n.metadataTrack_&&(r.removeExistingTrack(u,"metadata","Timed Metadata",!0),n.metadataTrack_=u.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,n.metadataTrack_.inBandMetadataTrackDispatchType=i.metadata.dispatchType)};i["default"]=u;t.exports=i["default"]},{"./cleanup-text-tracks":63}],66:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});i["default"]={TIME_BETWEEN_CHUNKS:1,BYTES_PER_CHUNK:32768};t.exports=i["default"]},{}],67:[function(n,t,i){(function(r){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function l(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function a(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var o,s,e;Object.defineProperty(i,"__esModule",{value:!0});o=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();s=function(n,t,i){var e=!0,r,f,o;n:while(e){var u=n,s=t,h=i;if(e=!1,u===null&&(u=Function.prototype),r=Object.getOwnPropertyDescriptor(u,s),r===undefined){if(f=Object.getPrototypeOf(u),f===null)return undefined;n=f;t=s;i=h;e=!0;r=f=undefined;continue n}else return"value"in r?r.value:(o=r.get,o===undefined)?undefined:o.call(h)}};var v=n("global/document"),y=u(v),p=typeof window!="undefined"?window.videojs:typeof r!="undefined"?r.videojs:null,h=u(p),w=n("./flash-source-buffer"),b=u(w),k=n("./flash-constants"),c=u(k),d=n("./codec-utils"),g=n("./cleanup-text-tracks"),f=function(n){function t(){var n=this;l(this,t);s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);this.sourceBuffers=[];this.readyState="closed";this.on(["sourceopen","webkitsourceopen"],function(t){n.swfObj=y["default"].getElementById(t.swfId);n.player_=h["default"](n.swfObj.parentNode);n.tech_=n.swfObj.tech;n.readyState="open";n.tech_.on("seeking",function(){for(var t=n.sourceBuffers.length;t--;)n.sourceBuffers[t].abort()});if(n.tech_.hls)n.tech_.hls.on("dispose",function(){g.cleanupTextTracks(n.player_)});n.swfObj&&n.swfObj.vjs_load()})}return a(t,n),o(t,[{key:"addSeekableRange_",value:function(){}},{key:"addSourceBuffer",value:function(n){var i=d.parseContentType(n),t=undefined;if(i.type==="video/mp2t")t=new b["default"](this);else throw new Error("NotSupportedError (Video.js)");return this.sourceBuffers.push(t),t}},{key:"endOfStream",value:function(n){n==="network"?this.tech_.error(2):n==="decode"&&this.tech_.error(3);this.readyState!=="ended"&&(this.readyState="ended",this.swfObj.vjs_endOfStream())}}]),t}(h["default"].EventTarget);i["default"]=f;try{Object.defineProperty(f.prototype,"duration",{get:function(){return this.swfObj?this.swfObj.vjs_getProperty("duration"):NaN},set:function(n){var t=undefined,i=this.swfObj.vjs_getProperty("duration");if(this.swfObj.vjs_setProperty("duration",n),n<i)for(t=0;t<this.sourceBuffers.length;t++)this.sourceBuffers[t].remove(n,i);return n}})}catch(it){f.prototype.duration=NaN}for(e in c["default"])f[e]=c["default"][e];t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./cleanup-text-tracks":63,"./codec-utils":64,"./flash-constants":66,"./flash-source-buffer":68,"global/document":29}],68:[function(n,t,i){(function(r){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function y(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function p(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var c,l;Object.defineProperty(i,"__esModule",{value:!0});c=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();l=function(n,t,i){var e=!0,r,f,o;n:while(e){var u=n,s=t,h=i;if(e=!1,u===null&&(u=Function.prototype),r=Object.getOwnPropertyDescriptor(u,s),r===undefined){if(f=Object.getPrototypeOf(u),f===null)return undefined;n=f;t=s;i=h;e=!0;r=f=undefined;continue n}else return"value"in r?r.value:(o=r.get,o===undefined)?undefined:o.call(h)}};var w=n("global/window"),f=u(w),b=typeof window!="undefined"?window.videojs:typeof r!="undefined"?r.videojs:null,o=u(b),k=n("mux.js/lib/flv"),d=u(k),g=n("./remove-cues-from-track"),e=u(g),nt=n("./create-text-tracks-if-necessary"),tt=u(nt),it=n("./add-text-track-data"),rt=n("./flash-transmuxer-worker"),ut=u(rt),ft=n("webworkify"),et=u(ft),ot=n("./flash-constants"),s=u(ot),h=function(n){f["default"].setTimeout(n,s["default"].TIME_BETWEEN_CHUNKS)},a=function(){return Math.random().toString(36).slice(2,8)},v=function(n,t){(typeof t!="number"||t<0)&&(t=0);var i=Math.pow(10,t);return Math.round(n*i)/i},st=function(n){function t(n){var i=this,r,u;y(this,t);l(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);r=undefined;this.chunkSize_=s["default"].BYTES_PER_CHUNK;this.buffer_=[];this.bufferSize_=0;this.basePtsOffset_=NaN;this.mediaSource_=n;this.audioBufferEnd_=NaN;this.videoBufferEnd_=NaN;this.updating=!1;this.timestampOffset_=0;r=f["default"].btoa(String.fromCharCode.apply(null,Array.prototype.slice.call(d["default"].getFlvHeader())));u=this.mediaSource_.player_.id().replace(/[^a-zA-Z0-9]/g,"_");this.flashEncodedHeaderName_="vjs_flashEncodedHeader_"+u+a();this.flashEncodedDataName_="vjs_flashEncodedData_"+u+a();f["default"][this.flashEncodedHeaderName_]=function(){return delete f["default"][i.flashEncodedHeaderName_],r};this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedHeaderName_);this.transmuxer_=et["default"](ut["default"]);this.transmuxer_.postMessage({action:"init",options:{}});this.transmuxer_.onmessage=function(n){n.data.action==="data"&&i.receiveBuffer_(n.data.segment)};this.one("updateend",function(){i.mediaSource_.tech_.trigger("loadedmetadata")});Object.defineProperty(this,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(n){typeof n=="number"&&n>=0&&(this.timestampOffset_=n,this.mediaSource_.swfObj.vjs_discontinuity(),this.basePtsOffset_=NaN,this.audioBufferEnd_=NaN,this.videoBufferEnd_=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 o["default"].createTimeRange();var n=this.mediaSource_.swfObj.vjs_getProperty("buffered");return n&&n.length&&(n[0][0]=v(n[0][0],3),n[0][1]=v(n[0][1],3)),o["default"].createTimeRanges(n)}});this.mediaSource_.player_.on("seeked",function(){e["default"](0,Infinity,i.metadataTrack_);e["default"](0,Infinity,i.inbandTextTrack_)});this.mediaSource_.player_.tech_.hls.on("dispose",function(){i.transmuxer_.terminate()})}return p(t,n),c(t,[{key:"appendBuffer",value:function(n){var t=undefined;if(this.updating){t=new Error("SourceBuffer.append() cannot be called while an update is in progress");t.name="InvalidStateError";t.code=11;throw t;}this.updating=!0;this.mediaSource_.readyState="open";this.trigger({type:"update"});this.transmuxer_.postMessage({action:"push",data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength},[n.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(n,t){e["default"](n,t,this.metadataTrack_);e["default"](n,t,this.inbandTextTrack_);this.trigger({type:"update"});this.trigger({type:"updateend"})}},{key:"receiveBuffer_",value:function(n){var t=this;tt["default"](this,this.mediaSource_,n);it.addTextTrackData(this,n.captions,n.metadata);h(function(){var i=t.convertTagsToData_(n);t.buffer_.length===0&&h(t.processBuffer_.bind(t));i&&(t.buffer_.push(i),t.bufferSize_+=i.byteLength)})}},{key:"processBuffer_",value:function(){var r=this,t=s["default"].BYTES_PER_CHUNK,n,u,e,i,o;if(!this.buffer_.length){this.updating!==!1&&(this.updating=!1,this.trigger({type:"updateend"}));return}for(n=this.buffer_[0].subarray(0,t),n.byteLength<t||this.buffer_[0].byteLength===t?this.buffer_.shift():this.buffer_[0]=this.buffer_[0].subarray(t),this.bufferSize_-=n.byteLength,u=[],e=n.byteLength,i=0;i<e;i++)u.push(String.fromCharCode(n[i]));o=f["default"].btoa(u.join(""));f["default"][this.flashEncodedDataName_]=function(){return h(r.processBuffer_.bind(r)),delete f["default"][r.flashEncodedDataName_],o};this.mediaSource_.swfObj.vjs_appendChunkReady(this.flashEncodedDataName_)}},{key:"convertTagsToData_",value:function(n){var p=0,f=this.mediaSource_.tech_,i=0,a=undefined,e=n.tags.videoTags,s=n.tags.audioTags,w,b,t,l,k,o,h,c,u,r,y;if(isNaN(this.basePtsOffset_)&&(e.length||s.length)&&(w=e[0]||{pts:Infinity},b=s[0]||{pts:Infinity},this.basePtsOffset_=Math.min(b.pts,w.pts)),f.seeking()&&(this.videoBufferEnd_=NaN,this.audioBufferEnd_=NaN),isNaN(this.videoBufferEnd_)?(f.buffered().length&&(i=f.buffered().end(0)-this.timestampOffset),f.seeking()&&(i=Math.max(i,f.currentTime()-this.timestampOffset)),i*=1e3,i+=this.basePtsOffset_):i=this.videoBufferEnd_+.1,t=e.length,t&&e[t-1].pts>=i){while(--t)if((l=e[t],!(l.pts>i))&&(l.keyFrame||l.metaDataTag))break;while(t){if(k=e[t-1],!k.metaDataTag)break;t--}}for(o=e.slice(t),h=undefined,h=isNaN(this.audioBufferEnd_)?i:this.audioBufferEnd_+.1,o.length&&(h=Math.min(h,o[0].pts)),t=0;t<s.length;){if(s[t].pts>=h)break;t++}if(c=s.slice(t),c.length&&(this.audioBufferEnd_=c[c.length-1].pts),o.length&&(this.videoBufferEnd_=o[o.length-1].pts),u=this.getOrderedTags_(o,c),u.length!==0){if(u[0].pts<i&&f.seeking()){var d=f.currentTime(),g=(i-u[0].pts)/1e3,v=d-g;v<1/30&&(v=0);try{this.mediaSource_.swfObj.vjs_adjustCurrentTime(v)}catch(nt){}}for(r=0;r<u.length;r++)p+=u[r].bytes.byteLength;for(a=new Uint8Array(p),r=0,y=0;r<u.length;r++)a.set(u[r].bytes,y),y+=u[r].bytes.byteLength;return a}}},{key:"getOrderedTags_",value:function(n,t){for(var i=undefined,r=[];n.length||t.length;)i=n.length?t.length?t[0].dts<n[0].dts?t.shift():n.shift():n.shift():t.shift(),r.push(i);return r}}]),t}(o["default"].EventTarget);i["default"]=st;t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./add-text-track-data":62,"./create-text-tracks-if-necessary":65,"./flash-constants":66,"./flash-transmuxer-worker":69,"./remove-cues-from-track":71,"global/window":30,"mux.js/lib/flv":44,webworkify:75}],69:[function(n,t,i){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var r;Object.defineProperty(i,"__esModule",{value:!0});r=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();var s=n("global/window"),f=u(s),h=n("mux.js/lib/flv"),c=u(h),l=function(n){n.on("data",function(n){f["default"].postMessage({action:"data",segment:n})});n.on("done",function(){f["default"].postMessage({action:"done"})})},e=function(){function n(t){o(this,n);this.options=t||{};this.init()}return r(n,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose();this.transmuxer=new c["default"].Transmuxer(this.options);l(this.transmuxer)}},{key:"push",value:function(n){var t=new Uint8Array(n.data,n.byteOffset,n.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"flush",value:function(){this.transmuxer.flush()}}]),n}(),a=function(n){n.onmessage=function(n){if(n.data.action==="init"&&n.data.options){this.messageHandlers=new e(n.data.options);return}this.messageHandlers||(this.messageHandlers=new e);n.data&&n.data.action&&n.data.action!=="init"&&this.messageHandlers[n.data.action]&&this.messageHandlers[n.data.action](n.data)}};i["default"]=function(n){return new a(n)};t.exports=i["default"]},{"global/window":30,"mux.js/lib/flv":44}],70:[function(n,t,i){(function(r){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function h(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function c(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var o,s;Object.defineProperty(i,"__esModule",{value:!0});o=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();s=function(n,t,i){var e=!0,r,f,o;n:while(e){var u=n,s=t,h=i;if(e=!1,u===null&&(u=Function.prototype),r=Object.getOwnPropertyDescriptor(u,s),r===undefined){if(f=Object.getPrototypeOf(u),f===null)return undefined;n=f;t=s;i=h;e=!0;r=f=undefined;continue n}else return"value"in r?r.value:(o=r.get,o===undefined)?undefined:o.call(h)}};var l=n("global/window"),a=u(l),v=n("global/document"),y=u(v),p=typeof window!="undefined"?window.videojs:typeof r!="undefined"?r.videojs:null,e=u(p),w=n("./virtual-source-buffer"),b=u(w),k=n("./add-text-track-data"),f=n("./codec-utils"),d=n("./cleanup-text-tracks"),g=function(n){function t(){var n=this,i;h(this,t);s(Object.getPrototypeOf(t.prototype),"constructor",this).call(this);i=undefined;this.nativeMediaSource_=new a["default"].MediaSource;for(i in this.nativeMediaSource_)i in t.prototype||typeof this.nativeMediaSource_[i]!="function"||(this[i]=this.nativeMediaSource_[i].bind(this.nativeMediaSource_));this.duration_=NaN;Object.defineProperty(this,"duration",{get:function(){return this.duration_===Infinity?this.duration_:this.nativeMediaSource_.duration},set:function(n){if(this.duration_=n,n!==Infinity){this.nativeMediaSource_.duration=n;return}}});Object.defineProperty(this,"seekable",{get:function(){return this.duration_===Infinity?e["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(){var r,t,i,u;for(n.activeSourceBuffers_.length=0,r=!1,t=!0,i=0;i<n.player_.audioTracks().length;i++)if(u=n.player_.audioTracks()[i],u.enabled&&u.kind!=="main"){r=!0;t=!1;break}n.sourceBuffers.forEach(function(i){if(i.appendAudioInitSegment_=!0,i.videoCodec_&&i.audioCodec_)i.audioDisabled_=r;else if(i.videoCodec_&&!i.audioCodec_)i.audioDisabled_=!0,t=!1;else if(!i.videoCodec_&&i.audioCodec_&&(i.audioDisabled_=t,t))return;n.activeSourceBuffers_.push(i)})};this.onPlayerMediachange_=function(){n.sourceBuffers.forEach(function(n){n.appendAudioInitSegment_=!0})};["sourceopen","sourceclose","sourceended"].forEach(function(n){this.nativeMediaSource_.addEventListener(n,this.trigger.bind(this))},this);this.on("sourceopen",function(){var t=y["default"].querySelector('[src="'+n.url_+'"]');if(t){if(n.player_=e["default"](t.parentNode),n.player_.audioTracks&&n.player_.audioTracks()){n.player_.audioTracks().on("change",n.updateActiveSourceBuffers_);n.player_.audioTracks().on("addtrack",n.updateActiveSourceBuffers_);n.player_.audioTracks().on("removetrack",n.updateActiveSourceBuffers_)}n.player_.on("mediachange",n.onPlayerMediachange_)}});this.on("sourceended",function(){for(var u=k.durationOfVideo(n.duration),r,t,i=0;i<n.sourceBuffers.length;i++)r=n.sourceBuffers[i],t=r.metadataTrack_&&r.metadataTrack_.cues,t&&t.length&&(t[t.length-1].endTime=u)});this.on("sourceclose",function(){(this.sourceBuffers.forEach(function(n){n.transmuxer_&&n.transmuxer_.terminate()}),this.sourceBuffers.length=0,this.player_)&&(d.cleanupTextTracks(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_))})}return c(t,n),o(t,[{key:"addSeekableRange_",value:function(n,t){var i=undefined;if(this.duration!==Infinity){i=new Error("MediaSource.addSeekableRange() can only be invoked when the duration is Infinity");i.name="InvalidStateError";i.code=11;throw i;}(t>this.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=t)}},{key:"addSourceBuffer",value:function(n){var i=undefined,r=f.parseContentType(n),t;return/^(video|audio)\/mp2t$/i.test(r.type)?(t=[],r.parameters&&r.parameters.codecs&&(t=r.parameters.codecs.split(","),t=f.translateLegacyCodecs(t),t=t.filter(function(n){return f.isAudioCodec(n)||f.isVideoCodec(n)})),t.length===0&&(t=["avc1.4d400d","mp4a.40.2"]),i=new b["default"](this,t),this.sourceBuffers.length!==0&&(this.sourceBuffers[0].createRealSourceBuffers_(),i.createRealSourceBuffers_(),this.sourceBuffers[0].audioDisabled_=!0)):i=this.nativeMediaSource_.addSourceBuffer(n),this.sourceBuffers.push(i),i}}]),t}(e["default"].EventTarget);i["default"]=g;t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./add-text-track-data":62,"./cleanup-text-tracks":63,"./codec-utils":64,"./virtual-source-buffer":74,"global/document":29,"global/window":30}],71:[function(n,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(n,t,i){var u=undefined,r=undefined;if(i&&i.cues)for(u=i.cues.length;u--;)r=i.cues[u],r.startTime<=t&&r.endTime>=n&&i.removeCue(r)};i["default"]=r;t.exports=i["default"]},{}],72:[function(n,t,i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var u;Object.defineProperty(i,"__esModule",{value:!0});u=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();var s=n("global/window"),r=f(s),h=n("mux.js/lib/mp4"),c=f(h),l=function(n){n.on("data",function(n){var i=n.initSegment,t;n.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};t=n.data;n.data=t.buffer;r["default"].postMessage({action:"data",segment:n,byteOffset:t.byteOffset,byteLength:t.byteLength},[n.data])});if(n.captionStream)n.captionStream.on("data",function(n){r["default"].postMessage({action:"caption",data:n})});n.on("done",function(){r["default"].postMessage({action:"done"})})},e=function(){function n(t){o(this,n);this.options=t||{};this.init()}return u(n,[{key:"init",value:function(){this.transmuxer&&this.transmuxer.dispose();this.transmuxer=new c["default"].Transmuxer(this.options);l(this.transmuxer)}},{key:"push",value:function(n){var t=new Uint8Array(n.data,n.byteOffset,n.byteLength);this.transmuxer.push(t)}},{key:"reset",value:function(){this.init()}},{key:"setTimestampOffset",value:function(n){var t=n.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(t*9e4))}},{key:"setAudioAppendStart",value:function(n){this.transmuxer.setAudioAppendStart(Math.ceil(n.appendStart*9e4))}},{key:"flush",value:function(){this.transmuxer.flush()}}]),n}(),a=function(n){n.onmessage=function(n){if(n.data.action==="init"&&n.data.options){this.messageHandlers=new e(n.data.options);return}this.messageHandlers||(this.messageHandlers=new e);n.data&&n.data.action&&n.data.action!=="init"&&this.messageHandlers[n.data.action]&&this.messageHandlers[n.data.action](n.data)}};i["default"]=function(n){return new a(n)};t.exports=i["default"]},{"global/window":30,"mux.js/lib/mp4":53}],73:[function(n,t,i){(function(t){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}var s;Object.defineProperty(i,"__esModule",{value:!0});var v=n("global/window"),u=f(v),y=n("./flash-media-source"),h=f(y),p=n("./html-media-source"),c=f(p),w=typeof window!="undefined"?window.videojs:typeof t!="undefined"?t.videojs:null,r=f(w),l=0,b={mode:"auto"};r["default"].mediaSources={};var a=function(n,t){var i=r["default"].mediaSources[n];if(i)i.trigger({type:"sourceopen",swfId:t});else throw new Error("Media Source not found (Video.js)");},o=function(){return!!u["default"].MediaSource&&!!u["default"].MediaSource.isTypeSupported&&u["default"].MediaSource.isTypeSupported('video/mp4;codecs="avc1.4d400d,mp4a.40.2"')},e=function(n){var t=r["default"].mergeOptions(b,n);if(this.MediaSource={open:a,supportsNativeMediaSources:o},t.mode==="html5"||t.mode==="auto"&&o())return new c["default"];if(r["default"].getTech("Flash"))return new h["default"];throw new Error("Cannot use Flash or Html5 to create a MediaSource for this video");};i.MediaSource=e;e.open=a;e.supportsNativeMediaSources=o;s={createObjectURL:function(n){var t=undefined;return n instanceof c["default"]?(t=u["default"].URL.createObjectURL(n.nativeMediaSource_),n.url_=t,t):(n instanceof h["default"])?(t="blob:vjs-media-source/"+l,l++,r["default"].mediaSources[t]=n,t):(t=u["default"].URL.createObjectURL(n),n.url_=t,t)}};i.URL=s;r["default"].MediaSource=e;r["default"].URL=s}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./flash-media-source":67,"./html-media-source":70,"global/window":30}],74:[function(n,t,i){(function(r){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function c(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function l(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var e,o;Object.defineProperty(i,"__esModule",{value:!0});e=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}();o=function(n,t,i){var e=!0,r,f,o;n:while(e){var u=n,s=t,h=i;if(e=!1,u===null&&(u=Function.prototype),r=Object.getOwnPropertyDescriptor(u,s),r===undefined){if(f=Object.getPrototypeOf(u),f===null)return undefined;n=f;t=s;i=h;e=!0;r=f=undefined;continue n}else return"value"in r?r.value:(o=r.get,o===undefined)?undefined:o.call(h)}};var a=typeof window!="undefined"?window.videojs:typeof r!="undefined"?r.videojs:null,f=u(a),v=n("./create-text-tracks-if-necessary"),y=u(v),p=n("./remove-cues-from-track"),s=u(p),w=n("./add-text-track-data"),b=n("webworkify"),k=u(b),d=n("./transmuxer-worker"),g=u(d),h=n("./codec-utils"),nt=function(n,t){var i=n.addSourceBuffer(t),r=Object.create(null),u,f;r.updating=!1;r.realBuffer_=i;u=function(n){typeof i[n]=="function"?r[n]=function(){return i[n].apply(i,arguments)}:typeof r[n]=="undefined"&&Object.defineProperty(r,n,{get:function(){return i[n]},set:function(t){return i[n]=t}})};for(f in i)u(f);return r},tt=function(n){function t(n,i){var r=this,u;c(this,t);o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,f["default"].EventTarget);this.timestampOffset_=0;this.pendingBuffers_=[];this.bufferUpdating_=!1;this.mediaSource_=n;this.codecs_=i;this.audioCodec_=null;this.videoCodec_=null;this.audioDisabled_=!1;this.appendAudioInitSegment_=!0;u={remux:!1};this.codecs_.forEach(function(n){h.isAudioCodec(n)?r.audioCodec_=n:h.isVideoCodec(n)&&(r.videoCodec_=n)});this.transmuxer_=k["default"](g["default"]);this.transmuxer_.postMessage({action:"init",options:u});this.transmuxer_.onmessage=function(n){return n.data.action==="data"?r.data_(n):n.data.action==="done"?r.done_(n):void 0};Object.defineProperty(this,"timestampOffset",{get:function(){return this.timestampOffset_},set:function(n){typeof n=="number"&&n>=0&&(this.timestampOffset_=n,this.appendAudioInitSegment_=!0,this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:n}))}});Object.defineProperty(this,"appendWindowStart",{get:function(){return(this.videoBuffer_||this.audioBuffer_).appendWindowStart},set:function(n){this.videoBuffer_&&(this.videoBuffer_.appendWindowStart=n);this.audioBuffer_&&(this.audioBuffer_.appendWindowStart=n)}});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 i=null,r=null,u=0,t=[],s=[];if(!this.videoBuffer_&&!this.audioBuffer_)return f["default"].createTimeRange();if(!this.videoBuffer_)return this.audioBuffer_.buffered;if(!this.audioBuffer_||this.audioDisabled_)return this.videoBuffer_.buffered;if(this.videoBuffer_.buffered.length===0&&this.audioBuffer_.buffered.length===0)return f["default"].createTimeRange();for(var e=this.videoBuffer_.buffered,o=this.audioBuffer_.buffered,n=e.length;n--;)t.push({time:e.start(n),type:"start"}),t.push({time:e.end(n),type:"end"});for(n=o.length;n--;)t.push({time:o.start(n),type:"start"}),t.push({time:o.end(n),type:"end"});for(t.sort(function(n,t){return n.time-t.time}),n=0;n<t.length;n++)t[n].type==="start"?(u++,u===2&&(i=t[n].time)):t[n].type==="end"&&(u--,u===1&&(r=t[n].time)),i!==null&&r!==null&&(s.push([i,r]),i=null,r=null);return f["default"].createTimeRanges(s)}})}return l(t,n),e(t,[{key:"data_",value:function(n){var t=n.data.segment;t.data=new Uint8Array(t.data,n.data.byteOffset,n.data.byteLength);t.initSegment=new Uint8Array(t.initSegment.data,t.initSegment.byteOffset,t.initSegment.byteLength);y["default"](this,this.mediaSource_,t);this.pendingBuffers_.push(t);return}},{key:"done_",value:function(){this.processPendingSegments_();return}},{key:"createRealSourceBuffers_",value:function(){var n=this,t=["audio","video"];t.forEach(function(i){var r,u,f;n[i+"Codec_"]&&(n[i+"Buffer_"]||(r=null,n.mediaSource_[i+"Buffer_"]?(r=n.mediaSource_[i+"Buffer_"],r.updating=!1):(u=i+"Codec_",f=i+'/mp4;codecs="'+n[u]+'"',r=nt(n.mediaSource_.nativeMediaSource_,f),n.mediaSource_[i+"Buffer_"]=r),n[i+"Buffer_"]=r,["update","updatestart","updateend"].forEach(function(u){r.addEventListener(u,function(){if(i!=="audio"||!n.audioDisabled_){u==="updateend"&&(n[i+"Buffer_"].updating=!1);var r=t.every(function(t){return t==="audio"&&n.audioDisabled_?!0:i!==t&&n[t+"Buffer_"]&&n[t+"Buffer_"].updating?!1:!0});if(r)return n.trigger(u)}})})))})}},{key:"appendBuffer",value:function(n){if(this.bufferUpdating_=!0,this.audioBuffer_&&this.audioBuffer_.buffered.length){var t=this.audioBuffer_.buffered;this.transmuxer_.postMessage({action:"setAudioAppendStart",appendStart:t.end(t.length-1)})}this.transmuxer_.postMessage({action:"push",data:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength},[n.buffer]);this.transmuxer_.postMessage({action:"flush"})}},{key:"remove",value:function(n,t){this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(n,t));!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(n,t));s["default"](n,t,this.metadataTrack_);s["default"](n,t,this.inbandTextTrack_)}},{key:"processPendingSegments_",value:function(){var n={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};n=this.pendingBuffers_.reduce(function(n,t){var i=t.type,r=t.data,u=t.initSegment;return n[i].segments.push(r),n[i].bytes+=r.byteLength,n[i].initSegment=u,t.captions&&(n.captions=n.captions.concat(t.captions)),t.info&&(n[i].info=t.info),t.metadata&&(n.metadata=n.metadata.concat(t.metadata)),n},n);this.videoBuffer_||this.audioBuffer_||(n.video.bytes===0&&(this.videoCodec_=null),n.audio.bytes===0&&(this.audioCodec_=null),this.createRealSourceBuffers_());n.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:n.audio.info});n.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:n.video.info});this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(n.audio.segments.unshift(n.audio.initSegment),n.audio.bytes+=n.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);this.videoBuffer_&&(n.video.segments.unshift(n.video.initSegment),n.video.bytes+=n.video.initSegment.byteLength,this.concatAndAppendSegments_(n.video,this.videoBuffer_),w.addTextTrackData(this,n.captions,n.metadata));!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(n.audio,this.audioBuffer_);this.pendingBuffers_.length=0;this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(n,t){var r=0,i=undefined;if(n.bytes){i=new Uint8Array(n.bytes);n.segments.forEach(function(n){i.set(n,r);r+=n.byteLength});try{t.updating=!0;t.appendBuffer(i)}catch(u){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:u.message,originalError:u})}}}},{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}}]),t}(f["default"].EventTarget);i["default"]=tt;t.exports=i["default"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./add-text-track-data":62,"./codec-utils":64,"./create-text-tracks-if-necessary":65,"./remove-cues-from-track":71,"./transmuxer-worker":72,webworkify:75}],75:[function(n,t){var f=arguments[3],i=arguments[4],u=arguments[5],r=JSON.stringify;t.exports=function(n){for(var e,h=Object.keys(u),c,o,l,a,v,y,t=0,s=h.length;t<s;t++)if(o=h[t],u[o].exports===n){e=o;break}if(!e){for(e=Math.floor(Math.pow(16,8)*Math.random()).toString(16),c={},t=0,s=h.length;t<s;t++)o=h[t],c[o]=o;i[e]=[Function(["require","module","exports"],"("+n+")(self)"),c]}return l=Math.floor(Math.pow(16,8)*Math.random()).toString(16),a={},a[e]=e,i[l]=[Function(["require"],"require("+r(e)+")(self)"),a],v="("+f+")({"+Object.keys(i).map(function(n){return r(n)+":["+i[n][0]+","+r(i[n][1])+"]"}).join(",")+"},{},["+r(l)+"])",y=window.URL||window.webkitURL||window.mozURL||window.msURL,new Worker(y.createObjectURL(new Blob([v],{type:"text/javascript"})))}},{}],76:[function(n,t){(function(i){"use strict";function f(n){return n&&n.__esModule?n:{"default":n}}function it(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function rt(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var tt=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),y=function(n,t,i){var e=!0,r,f,o;n:while(e){var u=n,s=t,h=i;if(e=!1,u===null&&(u=Function.prototype),r=Object.getOwnPropertyDescriptor(u,s),r===undefined){if(f=Object.getPrototypeOf(u),f===null)return undefined;n=f;t=s;i=h;e=!0;r=f=undefined;continue n}else return"value"in r?r.value:(o=r.get,o===undefined)?undefined:o.call(h)}},ut=n("global/document"),s=f(ut),ft=n("./playlist-loader"),et=f(ft),ot=n("./playlist"),p=f(ot),st=n("./xhr"),w=f(st),c=n("aes-decrypter"),ht=n("./bin-utils"),ct=f(ht),l=n("videojs-contrib-media-sources"),lt=n("m3u8-parser"),at=f(lt),vt=typeof window!="undefined"?window.videojs:typeof i!="undefined"?i.videojs:null,r=f(vt),yt=n("./master-playlist-controller"),pt=n("./config"),h=f(pt),wt=n("./rendition-mixin"),bt=f(wt),kt=n("global/window"),e=f(kt),dt=n("./playback-watcher"),gt=f(dt),ni=n("./reload-source-on-error"),b=f(ni),u={PlaylistLoader:et["default"],Playlist:p["default"],Decrypter:c.Decrypter,AsyncStream:c.AsyncStream,decrypt:c.decrypt,utils:ct["default"],xhr:w["default"]()},nt,v;Object.defineProperty(u,"GOAL_BUFFER_LENGTH",{get:function(){return r["default"].log.warn("using Hls.GOAL_BUFFER_LENGTH is UNSAFE be sure you know what you are doing"),h["default"].GOAL_BUFFER_LENGTH},set:function(n){if(r["default"].log.warn("using Hls.GOAL_BUFFER_LENGTH is UNSAFE be sure you know what you are doing"),typeof n!="number"||n<=0){r["default"].log.warn("value passed to Hls.GOAL_BUFFER_LENGTH must be a number and greater than 0");return}h["default"].GOAL_BUFFER_LENGTH=n}});Object.defineProperty(u,"BANDWIDTH_VARIANCE",{get:function(){return r["default"].log.warn("using Hls.BANDWIDTH_VARIANCE is UNSAFE be sure you know what you are doing"),h["default"].BANDWIDTH_VARIANCE},set:function(n){if(r["default"].log.warn("using Hls.BANDWIDTH_VARIANCE is UNSAFE be sure you know what you are doing"),typeof n!="number"||n<=0){r["default"].log.warn("value passed to Hls.BANDWIDTH_VARIANCE must be a number and greater than 0");return}h["default"].BANDWIDTH_VARIANCE=n}});var k=function(n,t){var i=undefined;return n?(i=e["default"].getComputedStyle(n),!i)?"":i[t]:""},d=function(n,t){for(var u=t.media(),r=-1,i=0;i<n.length;i++)if(n[i].id===u.uri){r=i;break}n.selectedIndex_=r;n.trigger({selectedIndex:r,type:"change"})},ti=function(n,t){t.representations().forEach(function(t){n.addQualityLevel(t)});d(n,t.playlists)},g=function(n,t){var i=n.slice();n.sort(function(n,r){var u=t(n,r);return u===0?i.indexOf(n)-i.indexOf(r):u})};u.STANDARD_PLAYLIST_SELECTOR=function(){var t=this.playlists.master.playlists.slice(),n=[],l=undefined,a=undefined,e=undefined,o=undefined,s=undefined,v=undefined,c=undefined,i=[],r=[],f=[];return g(t,u.comparePlaylistBandwidth),t=t.filter(p["default"].isEnabled),v=this.systemBandwidth,n=t.filter(function(n){return n.attributes&&n.attributes.BANDWIDTH&&n.attributes.BANDWIDTH*h["default"].BANDWIDTH_VARIANCE<v}),l=n.filter(function(t){return t.attributes.BANDWIDTH===n[n.length-1].attributes.BANDWIDTH})[0],g(n,u.comparePlaylistResolution),o=parseInt(k(this.tech_.el(),"width"),10),s=parseInt(k(this.tech_.el(),"height"),10),c=n.filter(function(n){return n.attributes&&n.attributes.RESOLUTION&&n.attributes.RESOLUTION.width&&n.attributes.RESOLUTION.height}),f=c.filter(function(n){return n.attributes.RESOLUTION.width===o&&n.attributes.RESOLUTION.height===s}),e=f.filter(function(n){return n.attributes.BANDWIDTH===f[f.length-1].attributes.BANDWIDTH})[0],e||(i=c.filter(function(n){return n.attributes.RESOLUTION.width>o||n.attributes.RESOLUTION.height>s}),r=i.filter(function(n){return n.attributes.RESOLUTION.width===i[0].attributes.RESOLUTION.width&&n.attributes.RESOLUTION.height===i[0].attributes.RESOLUTION.height}),a=r.filter(function(n){return n.attributes.BANDWIDTH===r[r.length-1].attributes.BANDWIDTH})[0]),a||e||l||t[0]};u.canPlaySource=function(){return r["default"].log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};u.supportsNativeHls=function(){var t=s["default"].createElement("video"),n;return r["default"].getTech("Html5").isSupported()?(n=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"],n.some(function(n){return/maybe|probably/i.test(t.canPlayType(n))})):!1}();u.isSupported=function(){return r["default"].log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};nt=e["default"].navigator&&e["default"].navigator.userAgent||"";u.supportsAudioInfoChange_=function(){if(r["default"].browser.IS_FIREFOX){var n=/Firefox\/([\d.]+)/i.exec(nt),t=parseInt(n[1],10);return t>=49}return!0};var ii=r["default"].getComponent("Component"),a=function(n){function t(n,i,u){var f=this,e;if(it(this,t),y(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,i),i.options_&&i.options_.playerId&&(e=r["default"](i.options_.playerId),e.hasOwnProperty("hls")||Object.defineProperty(e,"hls",{get:function(){return r["default"].log.warn("player.hls is deprecated. Use player.tech_.hls instead."),f}})),r["default"].options.hls.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");this.tech_=i;this.source_=n;this.stats={};this.ignoreNextSeekingEvent_=!1;this.options_=r["default"].mergeOptions(r["default"].options.hls||{},u.hls);this.setOptions_();this.on(s["default"],["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(){var n=s["default"].fullscreenElement||s["default"].webkitFullscreenElement||s["default"].mozFullScreenElement||s["default"].msFullscreenElement;n&&n.contains(f.tech_.el())&&f.masterPlaylistController_.fastQualityChange_()});this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())});this.on(this.tech_,"error",function(){this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()});this.audioTrackChange_=function(){f.masterPlaylistController_.setupAudio()};this.textTrackChange_=function(){f.masterPlaylistController_.setupSubtitles()};this.on(this.tech_,"play",this.play)}return rt(t,n),tt(t,[{key:"setOptions_",value:function(){var n=this;this.options_.withCredentials=this.options_.withCredentials||!1;typeof this.options_.blacklistDuration!="number"&&(this.options_.blacklistDuration=300);typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=4194304);["withCredentials","bandwidth"].forEach(function(t){typeof n.source_[t]!="undefined"&&(n.options_[t]=n.source_[t])});this.bandwidth=this.options_.bandwidth}},{key:"src",value:function(n){var t=this;if(n){this.setOptions_();this.options_.url=this.source_.src;this.options_.tech=this.tech_;this.options_.externHls=u;this.masterPlaylistController_=new yt.MasterPlaylistController(this.options_);this.playbackWatcher_=new gt["default"](r["default"].mergeOptions(this.options_,{seekable:function(){return t.seekable()}}));this.masterPlaylistController_.on("error",function(){var n=r["default"].players[t.tech_.options_.playerId];n.error(t.masterPlaylistController_.error)});this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):u.STANDARD_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(n){this.masterPlaylistController_.selectPlaylist=n.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(n){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=n;this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(n){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=n;this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var t=1/(this.bandwidth||1),n=undefined;return n=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+n))},set:function(){r["default"].log.error('The "systemBandwidth" property is read-only')}}});Object.defineProperties(this.stats,{bandwidth:{get:function(){return t.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return t.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return t.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return t.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return t.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return t.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return t.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return t.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0}});this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_));this.masterPlaylistController_.on("sourceopen",function(){t.tech_.audioTracks().addEventListener("change",t.audioTrackChange_);t.tech_.remoteTextTracks().addEventListener("change",t.textTrackChange_)});this.masterPlaylistController_.on("selectedinitialmedia",function(){bt["default"](t)});this.masterPlaylistController_.on("audioupdate",function(){t.tech_.clearTracks("audio");t.masterPlaylistController_.activeAudioGroup().forEach(function(n){t.tech_.audioTracks().addTrack(n)})});this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")});this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0});(this.tech_.ready(function(){return t.setupQualityLevels_()}),this.tech_.el())&&this.tech_.src(r["default"].URL.createObjectURL(this.masterPlaylistController_.mediaSource))}}},{key:"setupQualityLevels_",value:function(){var n=this,t=r["default"].players[this.tech_.options_.playerId];if(t&&t.qualityLevels){this.qualityLevels_=t.qualityLevels();this.masterPlaylistController_.on("selectedinitialmedia",function(){ti(n.qualityLevels_,n)});this.playlists.on("mediachange",function(){d(n.qualityLevels_,n.playlists)})}}},{key:"activeAudioGroup_",value:function(){return this.masterPlaylistController_.activeAudioGroup()}},{key:"play",value:function(){this.masterPlaylistController_.play()}},{key:"setCurrentTime",value:function(n){this.masterPlaylistController_.setCurrentTime(n)}},{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();this.tech_.audioTracks().removeEventListener("change",this.audioTrackChange_);this.tech_.remoteTextTracks().removeEventListener("change",this.textTrackChange_);y(Object.getPrototypeOf(t.prototype),"dispose",this).call(this)}}]),t}(ii),o=function o(n){return{canHandleSource:function(t){return r["default"].options.hls&&r["default"].options.hls.mode&&r["default"].options.hls.mode!==n?!1:o.canPlayType(t.type)},handleSource:function(t,i,u){n==="flash"&&i.setTimeout(function(){i.trigger("loadstart")},1);var f=r["default"].mergeOptions(u,{hls:{mode:n}});return i.hls=new a(t,i,f),i.hls.xhr=w["default"](),i.hls.src(t.src),i.hls},canPlayType:function(n){return o.canPlayType(n)?"maybe":""}}};u.comparePlaylistBandwidth=function(n,t){var i=undefined,r=undefined;return n.attributes&&n.attributes.BANDWIDTH&&(i=n.attributes.BANDWIDTH),i=i||e["default"].Number.MAX_VALUE,t.attributes&&t.attributes.BANDWIDTH&&(r=t.attributes.BANDWIDTH),r=r||e["default"].Number.MAX_VALUE,i-r};u.comparePlaylistResolution=function(n,t){var i=undefined,r=undefined;return(n.attributes&&n.attributes.RESOLUTION&&n.attributes.RESOLUTION.width&&(i=n.attributes.RESOLUTION.width),i=i||e["default"].Number.MAX_VALUE,t.attributes&&t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),r=r||e["default"].Number.MAX_VALUE,i===r&&n.attributes.BANDWIDTH&&t.attributes.BANDWIDTH)?n.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-r};o.canPlayType=function(n){if(r["default"].browser.IE_VERSION&&r["default"].browser.IE_VERSION<=10)return!1;return!r["default"].options.hls.overrideNative&&u.supportsNativeHls?!1:/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(n)};(typeof r["default"].MediaSource=="undefined"||typeof r["default"].URL=="undefined")&&(r["default"].MediaSource=l.MediaSource,r["default"].URL=l.URL);v=r["default"].getTech("Flash");l.MediaSource.supportsNativeMediaSources()&&r["default"].getTech("Html5").registerSourceHandler(o("html5"),0);e["default"].Uint8Array&&v&&v.registerSourceHandler(o("flash"));r["default"].HlsHandler=a;r["default"].HlsSourceHandler=o;r["default"].Hls=u;r["default"].use||r["default"].registerComponent("Hls",u);r["default"].m3u8=at["default"];r["default"].options.hls=r["default"].options.hls||{};r["default"].registerPlugin?r["default"].registerPlugin("reloadSourceOnError",b["default"]):r["default"].plugin("reloadSourceOnError",b["default"]);t.exports={Hls:u,HlsHandler:a,HlsSourceHandler:o}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./bin-utils":2,"./config":3,"./master-playlist-controller":5,"./playback-watcher":7,"./playlist":9,"./playlist-loader":8,"./reload-source-on-error":11,"./rendition-mixin":12,"./xhr":19,"aes-decrypter":23,"global/document":29,"global/window":30,"m3u8-parser":31,"videojs-contrib-media-sources":73}]},{},[76])(76)})