nginx-live/frontend/assets/js/player.js
2021-06-02 23:25:21 +02:00

1144 lines
1 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VOCPlayer=t():e.VOCPlayer=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){var r;window,r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="dist/",n(n.s="./src/main.js")}({"./node_modules/babel-runtime/core-js/array/from.js":
/*!**********************************************************!*\
!*** ./node_modules/babel-runtime/core-js/array/from.js ***!
\**********************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/array/from */"./node_modules/core-js/library/fn/array/from.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/get-iterator.js":
/*!************************************************************!*\
!*** ./node_modules/babel-runtime/core-js/get-iterator.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/get-iterator */"./node_modules/core-js/library/fn/get-iterator.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/json/stringify.js":
/*!**************************************************************!*\
!*** ./node_modules/babel-runtime/core-js/json/stringify.js ***!
\**************************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/json/stringify */"./node_modules/core-js/library/fn/json/stringify.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/assign.js":
/*!*************************************************************!*\
!*** ./node_modules/babel-runtime/core-js/object/assign.js ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/object/assign */"./node_modules/core-js/library/fn/object/assign.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/create.js":
/*!*************************************************************!*\
!*** ./node_modules/babel-runtime/core-js/object/create.js ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/object/create */"./node_modules/core-js/library/fn/object/create.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/define-property.js":
/*!**********************************************************************!*\
!*** ./node_modules/babel-runtime/core-js/object/define-property.js ***!
\**********************************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/object/define-property */"./node_modules/core-js/library/fn/object/define-property.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js":
/*!**********************************************************************************!*\
!*** ./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js ***!
\**********************************************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/object/get-own-property-descriptor */"./node_modules/core-js/library/fn/object/get-own-property-descriptor.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/keys.js":
/*!***********************************************************!*\
!*** ./node_modules/babel-runtime/core-js/object/keys.js ***!
\***********************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/object/keys */"./node_modules/core-js/library/fn/object/keys.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/object/set-prototype-of.js":
/*!***********************************************************************!*\
!*** ./node_modules/babel-runtime/core-js/object/set-prototype-of.js ***!
\***********************************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/object/set-prototype-of */"./node_modules/core-js/library/fn/object/set-prototype-of.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/symbol.js":
/*!******************************************************!*\
!*** ./node_modules/babel-runtime/core-js/symbol.js ***!
\******************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/symbol */"./node_modules/core-js/library/fn/symbol/index.js"),__esModule:!0}},"./node_modules/babel-runtime/core-js/symbol/iterator.js":
/*!***************************************************************!*\
!*** ./node_modules/babel-runtime/core-js/symbol/iterator.js ***!
\***************************************************************/
/*! no static exports found */function(e,t,n){e.exports={default:n(/*! core-js/library/fn/symbol/iterator */"./node_modules/core-js/library/fn/symbol/iterator.js"),__esModule:!0}},"./node_modules/babel-runtime/helpers/classCallCheck.js":
/*!**************************************************************!*\
!*** ./node_modules/babel-runtime/helpers/classCallCheck.js ***!
\**************************************************************/
/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},"./node_modules/babel-runtime/helpers/createClass.js":
/*!***********************************************************!*\
!*** ./node_modules/babel-runtime/helpers/createClass.js ***!
\***********************************************************/
/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(/*! ../core-js/object/define-property */"./node_modules/babel-runtime/core-js/object/define-property.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,a.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},"./node_modules/babel-runtime/helpers/extends.js":
/*!*******************************************************!*\
!*** ./node_modules/babel-runtime/helpers/extends.js ***!
\*******************************************************/
/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(/*! ../core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},"./node_modules/babel-runtime/helpers/inherits.js":
/*!********************************************************!*\
!*** ./node_modules/babel-runtime/helpers/inherits.js ***!
\********************************************************/
/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(/*! ../core-js/object/set-prototype-of */"./node_modules/babel-runtime/core-js/object/set-prototype-of.js")),i=o(n(/*! ../core-js/object/create */"./node_modules/babel-runtime/core-js/object/create.js")),a=o(n(/*! ../helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js"));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,a.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js":
/*!*************************************************************************!*\
!*** ./node_modules/babel-runtime/helpers/possibleConstructorReturn.js ***!
\*************************************************************************/
/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(/*! ../helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,a.default)(t))&&"function"!=typeof t?e:t}},"./node_modules/babel-runtime/helpers/toConsumableArray.js":
/*!*****************************************************************!*\
!*** ./node_modules/babel-runtime/helpers/toConsumableArray.js ***!
\*****************************************************************/
/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(/*! ../core-js/array/from */"./node_modules/babel-runtime/core-js/array/from.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return(0,a.default)(e)}},"./node_modules/babel-runtime/helpers/typeof.js":
/*!******************************************************!*\
!*** ./node_modules/babel-runtime/helpers/typeof.js ***!
\******************************************************/
/*! no static exports found */function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(/*! ../core-js/symbol/iterator */"./node_modules/babel-runtime/core-js/symbol/iterator.js")),i=o(n(/*! ../core-js/symbol */"./node_modules/babel-runtime/core-js/symbol.js")),a="function"==typeof i.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===a(r.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":a(e)}},"./node_modules/clappr-zepto/zepto.js":
/*!********************************************!*\
!*** ./node_modules/clappr-zepto/zepto.js ***!
\********************************************/
/*! no static exports found */function(e,t){var n,r=function(){var e,t,n,r,i,a=[],o=a.concat,s=a.filter,l=a.slice,u=window.document,c={},d={},f={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},h=/^\s*<(\w+|!)[^>]*>/,p=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,g=/^(?:body|html)$/i,y=/([A-Z])/g,v=["val","css","html","text","data","width","height","offset"],b=u.createElement("table"),_=u.createElement("tr"),A={tr:u.createElement("tbody"),tbody:b,thead:b,tfoot:b,td:_,th:_,"*":u.createElement("div")},E=/complete|loaded|interactive/,T=/^[\w-]*$/,w={},S=w.toString,k={},C=u.createElement("div"),x={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},R=Array.isArray||function(e){return e instanceof Array};function L(e){return null==e?String(e):w[S.call(e)]||"object"}function I(e){return"function"==L(e)}function P(e){return null!=e&&e==e.window}function j(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function O(e){return"object"==L(e)}function D(e){return O(e)&&!P(e)&&Object.getPrototypeOf(e)==Object.prototype}function M(e){var n=!!e&&"length"in e&&e.length,r=t.type(e);return"function"!=r&&!P(e)&&("array"==r||0===n||"number"==typeof n&&n>0&&n-1 in e)}function N(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function U(e){return e in d?d[e]:d[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function F(e,t){return"number"!=typeof t||f[N(e)]?t:t+"px"}function B(e){return"children"in e?l.call(e.children):t.map(e.childNodes,(function(e){if(1==e.nodeType)return e}))}function K(e,t){var n,r=e?e.length:0;for(n=0;n<r;n++)this[n]=e[n];this.length=r,this.selector=t||""}function V(t,n,r){for(e in n)r&&(D(n[e])||R(n[e]))?(D(n[e])&&!D(t[e])&&(t[e]={}),R(n[e])&&!R(t[e])&&(t[e]=[]),V(t[e],n[e],r)):void 0!==n[e]&&(t[e]=n[e])}function G(e,n){return null==n?t(e):t(e).filter(n)}function H(e,t,n,r){return I(t)?t.call(e,n,r):t}function Y(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function z(e,t){var n=e.className||"",r=n&&void 0!==n.baseVal;if(void 0===t)return r?n.baseVal:n;r?n.baseVal=t:e.className=t}function W(e){try{return e?"true"==e||"false"!=e&&("null"==e?null:+e+""==e?+e:/^[\[\{]/.test(e)?t.parseJSON(e):e):e}catch(t){return e}}function $(e,t){t(e);for(var n=0,r=e.childNodes.length;n<r;n++)$(e.childNodes[n],t)}return k.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(n)return n.call(e,t);var r,i=e.parentNode,a=!i;return a&&(i=C).appendChild(e),r=~k.qsa(i,t).indexOf(e),a&&C.removeChild(e),r},r=function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},i=function(e){return s.call(e,(function(t,n){return e.indexOf(t)==n}))},k.fragment=function(e,n,r){var i,a,o;return p.test(e)&&(i=t(u.createElement(RegExp.$1))),i||(e.replace&&(e=e.replace(m,"<$1></$2>")),void 0===n&&(n=h.test(e)&&RegExp.$1),n in A||(n="*"),(o=A[n]).innerHTML=""+e,i=t.each(l.call(o.childNodes),(function(){o.removeChild(this)}))),D(r)&&(a=t(i),t.each(r,(function(e,t){v.indexOf(e)>-1?a[e](t):a.attr(e,t)}))),i},k.Z=function(e,t){return new K(e,t)},k.isZ=function(e){return e instanceof k.Z},k.init=function(e,n){var r,i;if(!e)return k.Z();if("string"==typeof e)if("<"==(e=e.trim())[0]&&h.test(e))r=k.fragment(e,RegExp.$1,n),e=null;else{if(void 0!==n)return t(n).find(e);r=k.qsa(u,e)}else{if(I(e))return t(u).ready(e);if(k.isZ(e))return e;if(R(e))i=e,r=s.call(i,(function(e){return null!=e}));else if(O(e))r=[e],e=null;else if(h.test(e))r=k.fragment(e.trim(),RegExp.$1,n),e=null;else{if(void 0!==n)return t(n).find(e);r=k.qsa(u,e)}}return k.Z(r,e)},(t=function(e,t){return k.init(e,t)}).extend=function(e){var t,n=l.call(arguments,1);return"boolean"==typeof e&&(t=e,e=n.shift()),n.forEach((function(n){V(e,n,t)})),e},k.qsa=function(e,t){var n,r="#"==t[0],i=!r&&"."==t[0],a=r||i?t.slice(1):t,o=T.test(a);return e.getElementById&&o&&r?(n=e.getElementById(a))?[n]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:l.call(o&&!r&&e.getElementsByClassName?i?e.getElementsByClassName(a):e.getElementsByTagName(t):e.querySelectorAll(t))},t.contains=u.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},t.type=L,t.isFunction=I,t.isWindow=P,t.isArray=R,t.isPlainObject=D,t.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},t.isNumeric=function(e){var t=Number(e),n=typeof e;return null!=e&&"boolean"!=n&&("string"!=n||e.length)&&!isNaN(t)&&isFinite(t)||!1},t.inArray=function(e,t,n){return a.indexOf.call(t,e,n)},t.camelCase=r,t.trim=function(e){return null==e?"":String.prototype.trim.call(e)},t.uuid=0,t.support={},t.expr={},t.noop=function(){},t.map=function(e,n){var r,i,a,o,s=[];if(M(e))for(i=0;i<e.length;i++)null!=(r=n(e[i],i))&&s.push(r);else for(a in e)null!=(r=n(e[a],a))&&s.push(r);return(o=s).length>0?t.fn.concat.apply([],o):o},t.each=function(e,t){var n,r;if(M(e)){for(n=0;n<e.length;n++)if(!1===t.call(e[n],n,e[n]))return e}else for(r in e)if(!1===t.call(e[r],r,e[r]))return e;return e},t.grep=function(e,t){return s.call(e,t)},window.JSON&&(t.parseJSON=JSON.parse),t.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(e,t){w["[object "+t+"]"]=t.toLowerCase()})),t.fn={constructor:k.Z,length:0,forEach:a.forEach,reduce:a.reduce,push:a.push,sort:a.sort,splice:a.splice,indexOf:a.indexOf,concat:function(){var e,t,n=[];for(e=0;e<arguments.length;e++)t=arguments[e],n[e]=k.isZ(t)?t.toArray():t;return o.apply(k.isZ(this)?this.toArray():this,n)},map:function(e){return t(t.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return t(l.apply(this,arguments))},ready:function(e){return E.test(u.readyState)&&u.body?e(t):u.addEventListener("DOMContentLoaded",(function(){e(t)}),!1),this},get:function(e){return void 0===e?l.call(this):this[e>=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(e){return a.every.call(this,(function(t,n){return!1!==e.call(t,n,t)})),this},filter:function(e){return I(e)?this.not(this.not(e)):t(s.call(this,(function(t){return k.matches(t,e)})))},add:function(e,n){return t(i(this.concat(t(e,n))))},is:function(e){return this.length>0&&k.matches(this[0],e)},not:function(e){var n=[];if(I(e)&&void 0!==e.call)this.each((function(t){e.call(this,t)||n.push(this)}));else{var r="string"==typeof e?this.filter(e):M(e)&&I(e.item)?l.call(e):t(e);this.forEach((function(e){r.indexOf(e)<0&&n.push(e)}))}return t(n)},has:function(e){return this.filter((function(){return O(e)?t.contains(this,e):t(this).find(e).size()}))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!O(e)?e:t(e)},last:function(){var e=this[this.length-1];return e&&!O(e)?e:t(e)},find:function(e){var n=this;return e?"object"==typeof e?t(e).filter((function(){var e=this;return a.some.call(n,(function(n){return t.contains(n,e)}))})):1==this.length?t(k.qsa(this[0],e)):this.map((function(){return k.qsa(this,e)})):t()},closest:function(e,n){var r=[],i="object"==typeof e&&t(e);return this.each((function(t,a){for(;a&&!(i?i.indexOf(a)>=0:k.matches(a,e));)a=a!==n&&!j(a)&&a.parentNode;a&&r.indexOf(a)<0&&r.push(a)})),t(r)},parents:function(e){for(var n=[],r=this;r.length>0;)r=t.map(r,(function(e){if((e=e.parentNode)&&!j(e)&&n.indexOf(e)<0)return n.push(e),e}));return G(n,e)},parent:function(e){return G(i(this.pluck("parentNode")),e)},children:function(e){return G(this.map((function(){return B(this)})),e)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(e){return G(this.map((function(e,t){return s.call(B(t.parentNode),(function(e){return e!==t}))})),e)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(e){return t.map(this,(function(t){return t[e]}))},show:function(){return this.each((function(){var e,t,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(e=this.nodeName,c[e]||(t=u.createElement(e),u.body.appendChild(t),n=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==n&&(n="block"),c[e]=n),c[e]))}))},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var n=I(e);if(this[0]&&!n)var r=t(e).get(0),i=r.parentNode||this.length>1;return this.each((function(a){t(this).wrapAll(n?e.call(this,a):i?r.cloneNode(!0):r)}))},wrapAll:function(e){if(this[0]){var n;for(t(this[0]).before(e=t(e));(n=e.children()).length;)e=n.first();t(e).append(this)}return this},wrapInner:function(e){var n=I(e);return this.each((function(r){var i=t(this),a=i.contents(),o=n?e.call(this,r):e;a.length?a.wrapAll(o):i.append(o)}))},unwrap:function(){return this.parent().each((function(){t(this).replaceWith(t(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(e){return this.each((function(){var n=t(this);(void 0===e?"none"==n.css("display"):e)?n.show():n.hide()}))},prev:function(e){return t(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return t(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each((function(n){var r=this.innerHTML;t(this).empty().append(H(this,e,n,r))})):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each((function(t){var n=H(this,e,t,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,n){var r;return"string"!=typeof t||1 in arguments?this.each((function(r){if(1===this.nodeType)if(O(t))for(e in t)Y(this,e,t[e]);else Y(this,t,H(this,n,r,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(r=this[0].getAttribute(t))?r:void 0},removeAttr:function(e){return this.each((function(){1===this.nodeType&&e.split(" ").forEach((function(e){Y(this,e)}),this)}))},prop:function(e,t){return e=x[e]||e,1 in arguments?this.each((function(n){this[e]=H(this,t,n,this[e])})):this[0]&&this[0][e]},removeProp:function(e){return e=x[e]||e,this.each((function(){delete this[e]}))},data:function(e,t){var n="data-"+e.replace(y,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,t):this.attr(n);return null!==r?W(r):void 0},val:function(e){return 0 in arguments?(null==e&&(e=""),this.each((function(t){this.value=H(this,e,t,this.value)}))):this[0]&&(this[0].multiple?t(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(n){var r=t(this),i=H(this,e,n,r.offset()),a=r.offsetParent().offset(),o={top:i.top-a.top,left:i.left-a.left};"static"==r.css("position")&&(o.position="relative"),r.css(o)}));if(!this.length)return null;if(u.documentElement!==this[0]&&!t.contains(u.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+window.pageXOffset,top:n.top+window.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(n,i){if(arguments.length<2){var a=this[0];if("string"==typeof n){if(!a)return;return a.style[r(n)]||getComputedStyle(a,"").getPropertyValue(n)}if(R(n)){if(!a)return;var o={},s=getComputedStyle(a,"");return t.each(n,(function(e,t){o[t]=a.style[r(t)]||s.getPropertyValue(t)})),o}}var l="";if("string"==L(n))i||0===i?l=N(n)+":"+F(n,i):this.each((function(){this.style.removeProperty(N(n))}));else for(e in n)n[e]||0===n[e]?l+=N(e)+":"+F(e,n[e])+";":this.each((function(){this.style.removeProperty(N(e))}));return this.each((function(){this.style.cssText+=";"+l}))},index:function(e){return e?this.indexOf(t(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&a.some.call(this,(function(e){return this.test(z(e))}),U(e))},addClass:function(e){return e?this.each((function(r){if("className"in this){n=[];var i=z(this);H(this,e,r,i).split(/\s+/g).forEach((function(e){t(this).hasClass(e)||n.push(e)}),this),n.length&&z(this,i+(i?" ":"")+n.join(" "))}})):this},removeClass:function(e){return this.each((function(t){if("className"in this){if(void 0===e)return z(this,"");n=z(this),H(this,e,t,n).split(/\s+/g).forEach((function(e){n=n.replace(U(e)," ")})),z(this,n.trim())}}))},toggleClass:function(e,n){return e?this.each((function(r){var i=t(this);H(this,e,r,z(this)).split(/\s+/g).forEach((function(e){(void 0===n?!i.hasClass(e):n)?i.addClass(e):i.removeClass(e)}))})):this},scrollTop:function(e){if(this.length){var t="scrollTop"in this[0];return void 0===e?t?this[0].scrollTop:this[0].pageYOffset:this.each(t?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var t="scrollLeft"in this[0];return void 0===e?t?this[0].scrollLeft:this[0].pageXOffset:this.each(t?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],n=this.offsetParent(),r=this.offset(),i=g.test(n[0].nodeName)?{top:0,left:0}:n.offset();return r.top-=parseFloat(t(e).css("margin-top"))||0,r.left-=parseFloat(t(e).css("margin-left"))||0,i.top+=parseFloat(t(n[0]).css("border-top-width"))||0,i.left+=parseFloat(t(n[0]).css("border-left-width"))||0,{top:r.top-i.top,left:r.left-i.left}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||u.body;e&&!g.test(e.nodeName)&&"static"==t(e).css("position");)e=e.offsetParent;return e}))}},t.fn.detach=t.fn.remove,["width","height"].forEach((function(e){var n=e.replace(/./,(function(e){return e[0].toUpperCase()}));t.fn[e]=function(r){var i,a=this[0];return void 0===r?P(a)?a["inner"+n]:j(a)?a.documentElement["scroll"+n]:(i=this.offset())&&i[e]:this.each((function(n){(a=t(this)).css(e,H(this,r,n,a[e]()))}))}})),["after","prepend","before","append"].forEach((function(e,n){var r=n%2;t.fn[e]=function(){var e,i,a=t.map(arguments,(function(n){var r=[];return"array"==(e=L(n))?(n.forEach((function(e){return void 0!==e.nodeType?r.push(e):t.zepto.isZ(e)?r=r.concat(e.get()):void(r=r.concat(k.fragment(e)))})),r):"object"==e||null==n?n:k.fragment(n)})),o=this.length>1;return a.length<1?this:this.each((function(e,s){i=r?s:s.parentNode,s=0==n?s.nextSibling:1==n?s.firstChild:2==n?s:null;var l=t.contains(u.documentElement,i);a.forEach((function(e){if(o)e=e.cloneNode(!0);else if(!i)return t(e).remove();i.insertBefore(e,s),l&&$(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var t=e.ownerDocument?e.ownerDocument.defaultView:window;t.eval.call(t,e.innerHTML)}}))}))}))},t.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(n){return t(n)[e](this),this}})),k.Z.prototype=K.prototype=t.fn,k.uniq=i,k.deserializeValue=W,t.zepto=k,t}();window.Zepto=r,void 0===window.$&&(window.$=r),function(e){var t,n,r=+new Date,i=window.document,a=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,o=/^(?:text|application)\/javascript/i,s=/^(?:text|application)\/xml/i,l=/^\s*$/,u=i.createElement("a");function c(t,n,r,a){if(t.global)return function(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}(n||i,r,a)}function d(e,t){var n=t.context;if(!1===t.beforeSend.call(n,e,t)||!1===c(t,n,"ajaxBeforeSend",[e,t]))return!1;c(t,n,"ajaxSend",[e,t])}function f(e,t,n,r){var i=n.context;n.success.call(i,e,"success",t),r&&r.resolveWith(i,[e,"success",t]),c(n,i,"ajaxSuccess",[t,n,e]),p("success",t,n)}function h(e,t,n,r,i){var a=r.context;r.error.call(a,n,t,e),i&&i.rejectWith(a,[n,t,e]),c(r,a,"ajaxError",[n,r,e||t]),p(t,n,r)}function p(t,n,r){var i=r.context;r.complete.call(i,n,t),c(r,i,"ajaxComplete",[n,r]),function(t){t.global&&!--e.active&&c(t,null,"ajaxStop")}(r)}function m(){}function g(e,t){return""==t?e:(e+"&"+t).replace(/[&?]{1,2}/,"?")}function y(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}u.href=window.location.href,e.active=0,e.ajaxJSONP=function(t,n){if(!("type"in t))return e.ajax(t);var a,o,s=t.jsonpCallback,l=(e.isFunction(s)?s():s)||"Zepto"+r++,u=i.createElement("script"),c=window[l],p=function(t){e(u).triggerHandler("error",t||"abort")},m={abort:p};return n&&n.promise(m),e(u).on("load error",(function(r,i){clearTimeout(o),e(u).off().remove(),"error"!=r.type&&a?f(a[0],m,t,n):h(null,i||"error",m,t,n),window[l]=c,a&&e.isFunction(c)&&c(a[0]),c=a=void 0})),!1===d(m,t)?(p("abort"),m):(window[l]=function(){a=arguments},u.src=t.url.replace(/\?(.+)=\?/,"?$1="+l),i.head.appendChild(u),t.timeout>0&&(o=setTimeout((function(){p("timeout")}),t.timeout)),m)},e.ajaxSettings={type:"GET",beforeSend:m,success:m,error:m,complete:m,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:m},e.ajax=function(r){var a,p,y=e.extend({},r||{}),v=e.Deferred&&e.Deferred();for(t in e.ajaxSettings)void 0===y[t]&&(y[t]=e.ajaxSettings[t]);!function(t){t.global&&0==e.active++&&c(t,null,"ajaxStart")}(y),y.crossDomain||((a=i.createElement("a")).href=y.url,a.href=a.href,y.crossDomain=u.protocol+"//"+u.host!=a.protocol+"//"+a.host),y.url||(y.url=window.location.toString()),(p=y.url.indexOf("#"))>-1&&(y.url=y.url.slice(0,p)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=g(t.url,t.data),t.data=void 0)}(y);var b=y.dataType,_=/\?.+=\?/.test(y.url);if(_&&(b="jsonp"),!1!==y.cache&&(r&&!0===r.cache||"script"!=b&&"jsonp"!=b)||(y.url=g(y.url,"_="+Date.now())),"jsonp"==b)return _||(y.url=g(y.url,y.jsonp?y.jsonp+"=?":!1===y.jsonp?"":"callback=?")),e.ajaxJSONP(y,v);var A,E=y.accepts[b],T={},w=function(e,t){T[e.toLowerCase()]=[e,t]},S=/^([\w-]+:)\/\//.test(y.url)?RegExp.$1:window.location.protocol,k=y.xhr(),C=k.setRequestHeader;if(v&&v.promise(k),y.crossDomain||w("X-Requested-With","XMLHttpRequest"),w("Accept",E||"*/*"),(E=y.mimeType||E)&&(E.indexOf(",")>-1&&(E=E.split(",",2)[0]),k.overrideMimeType&&k.overrideMimeType(E)),(y.contentType||!1!==y.contentType&&y.data&&"GET"!=y.type.toUpperCase())&&w("Content-Type",y.contentType||"application/x-www-form-urlencoded"),y.headers)for(n in y.headers)w(n,y.headers[n]);if(k.setRequestHeader=w,k.onreadystatechange=function(){if(4==k.readyState){k.onreadystatechange=m,clearTimeout(A);var t,n=!1;if(k.status>=200&&k.status<300||304==k.status||0==k.status&&"file:"==S){if(b=b||function(e){return e&&(e=e.split(";",2)[0]),e&&("text/html"==e?"html":"application/json"==e?"json":o.test(e)?"script":s.test(e)&&"xml")||"text"}(y.mimeType||k.getResponseHeader("content-type")),"arraybuffer"==k.responseType||"blob"==k.responseType)t=k.response;else{t=k.responseText;try{t=function(e,t,n){if(n.dataFilter==m)return e;var r=n.context;return n.dataFilter.call(r,e,t)}(t,b,y),"script"==b?(0,eval)(t):"xml"==b?t=k.responseXML:"json"==b&&(t=l.test(t)?null:e.parseJSON(t))}catch(e){n=e}if(n)return h(n,"parsererror",k,y,v)}f(t,k,y,v)}else h(k.statusText||null,k.status?"error":"abort",k,y,v)}},!1===d(k,y))return k.abort(),h(null,"abort",k,y,v),k;var x=!("async"in y)||y.async;if(k.open(y.type,y.url,x,y.username,y.password),y.xhrFields)for(n in y.xhrFields)k[n]=y.xhrFields[n];for(n in T)C.apply(k,T[n]);return y.timeout>0&&(A=setTimeout((function(){k.onreadystatechange=m,k.abort(),h(null,"timeout",k,y,v)}),y.timeout)),k.send(y.data?y.data:null),k},e.get=function(){return e.ajax(y.apply(null,arguments))},e.post=function(){var t=y.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=y.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var i,o=this,s=t.split(/\s/),l=y(t,n,r),u=l.success;return s.length>1&&(l.url=s[0],i=s[1]),l.success=function(t){o.html(i?e("<div>").html(t.replace(a,"")).find(i):t),u&&u.apply(o,arguments)},e.ajax(l),this};var v=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(v(t)+"="+v(n))},function t(n,r,i,a){var o,s=e.isArray(r),l=e.isPlainObject(r);e.each(r,(function(r,u){o=e.type(u),a&&(r=i?a:a+"["+(l||"object"==o||"array"==o?r:"")+"]"),!a&&s?n.add(u.name,u.value):"array"==o||!i&&"object"==o?t(n,u,i,r):n.add(r,u)}))}(r,t,n),r.join("&").replace(/%20/g,"+")}}(r),(n=r).Callbacks=function(e){e=n.extend({},e);var t,r,i,a,o,s,l=[],u=!e.once&&[],c=function(n){for(t=e.memory&&n,r=!0,s=a||0,a=0,o=l.length,i=!0;l&&s<o;++s)if(!1===l[s].apply(n[0],n[1])&&e.stopOnFalse){t=!1;break}i=!1,l&&(u?u.length&&c(u.shift()):t?l.length=0:d.disable())},d={add:function(){if(l){var r=l.length,s=function(t){n.each(t,(function(t,n){"function"==typeof n?e.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!=typeof n&&s(n)}))};s(arguments),i?o=l.length:t&&(a=r,c(t))}return this},remove:function(){return l&&n.each(arguments,(function(e,t){for(var r;(r=n.inArray(t,l,r))>-1;)l.splice(r,1),i&&(r<=o&&--o,r<=s&&--s)})),this},has:function(e){return!(!l||!(e?n.inArray(e,l)>-1:l.length))},empty:function(){return o=l.length=0,this},disable:function(){return l=u=t=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,t||d.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||r&&!u||(t=[e,(t=t||[]).slice?t.slice():t],i?u.push(t):c(t)),this},fire:function(){return d.fireWith(this,arguments)},fired:function(){return!!r}};return d},function(e){var t=Array.prototype.slice;function n(t){var r=[["resolve","done",e.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",e.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",e.Callbacks({memory:1})]],i="pending",a={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return n((function(n){e.each(r,(function(r,i){var s=e.isFunction(t[r])&&t[r];o[i[1]]((function(){var t=s&&s.apply(this,arguments);if(t&&e.isFunction(t.promise))t.promise().done(n.resolve).fail(n.reject).progress(n.notify);else{var r=this===a?n.promise():this,o=s?[t]:arguments;n[i[0]+"With"](r,o)}}))})),t=null})).promise()},promise:function(t){return null!=t?e.extend(t,a):a}},o={};return e.each(r,(function(e,t){var n=t[2],s=t[3];a[t[1]]=n.add,s&&n.add((function(){i=s}),r[1^e][2].disable,r[2][2].lock),o[t[0]]=function(){return o[t[0]+"With"](this===o?a:this,arguments),this},o[t[0]+"With"]=n.fireWith})),a.promise(o),t&&t.call(o,o),o}e.when=function(r){var i,a,o,s=t.call(arguments),l=s.length,u=0,c=1!==l||r&&e.isFunction(r.promise)?l:0,d=1===c?r:n(),f=function(e,n,r){return function(a){n[e]=this,r[e]=arguments.length>1?t.call(arguments):a,r===i?d.notifyWith(n,r):--c||d.resolveWith(n,r)}};if(l>1)for(i=new Array(l),a=new Array(l),o=new Array(l);u<l;++u)s[u]&&e.isFunction(s[u].promise)?s[u].promise().done(f(u,o,s)).fail(d.reject).progress(f(u,a,i)):--c;return c||d.resolveWith(o,s),d.promise()},e.Deferred=n}(r),function(e){var t=1,n=Array.prototype.slice,r=e.isFunction,i=function(e){return"string"==typeof e},a={},o={},s="onfocusin"in window,l={focus:"focusin",blur:"focusout"},u={mouseenter:"mouseover",mouseleave:"mouseout"};function c(e){return e._zid||(e._zid=t++)}function d(e,t,n,r){if((t=f(t)).ns)var i=(o=t.ns,new RegExp("(?:^| )"+o.replace(" "," .* ?")+"(?: |$)"));var o;return(a[c(e)]||[]).filter((function(e){return e&&(!t.e||e.e==t.e)&&(!t.ns||i.test(e.ns))&&(!n||c(e.fn)===c(n))&&(!r||e.sel==r)}))}function f(e){var t=(""+e).split(".");return{e:t[0],ns:t.slice(1).sort().join(" ")}}function h(e,t){return e.del&&!s&&e.e in l||!!t}function p(e){return u[e]||s&&l[e]||e}function m(t,n,r,i,o,s,l){var d=c(t),m=a[d]||(a[d]=[]);n.split(/\s/).forEach((function(n){if("ready"==n)return e(document).ready(r);var a=f(n);a.fn=r,a.sel=o,a.e in u&&(r=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return a.fn.apply(this,arguments)}),a.del=s;var c=s||r;a.proxy=function(e){if(!(e=A(e)).isImmediatePropagationStopped()){e.data=i;var n=c.apply(t,null==e._args?[e]:[e].concat(e._args));return!1===n&&(e.preventDefault(),e.stopPropagation()),n}},a.i=m.length,m.push(a),"addEventListener"in t&&t.addEventListener(p(a.e),a.proxy,h(a,l))}))}function g(e,t,n,r,i){var o=c(e);(t||"").split(/\s/).forEach((function(t){d(e,t,n,r).forEach((function(t){delete a[o][t.i],"removeEventListener"in e&&e.removeEventListener(p(t.e),t.proxy,h(t,i))}))}))}o.click=o.mousedown=o.mouseup=o.mousemove="MouseEvents",e.event={add:m,remove:g},e.proxy=function(t,a){var o=2 in arguments&&n.call(arguments,2);if(r(t)){var s=function(){return t.apply(a,o?o.concat(n.call(arguments)):arguments)};return s._zid=c(t),s}if(i(a))return o?(o.unshift(t[a],t),e.proxy.apply(null,o)):e.proxy(t[a],t);throw new TypeError("expected function")},e.fn.bind=function(e,t,n){return this.on(e,t,n)},e.fn.unbind=function(e,t){return this.off(e,t)},e.fn.one=function(e,t,n,r){return this.on(e,t,n,r,1)};var y=function(){return!0},v=function(){return!1},b=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,_={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function A(t,n){return!n&&t.isDefaultPrevented||(n||(n=t),e.each(_,(function(e,r){var i=n[e];t[e]=function(){return this[r]=y,i&&i.apply(n,arguments)},t[r]=v})),t.timeStamp||(t.timeStamp=Date.now()),(void 0!==n.defaultPrevented?n.defaultPrevented:"returnValue"in n?!1===n.returnValue:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=y)),t}function E(e){var t,n={originalEvent:e};for(t in e)b.test(t)||void 0===e[t]||(n[t]=e[t]);return A(n,e)}e.fn.delegate=function(e,t,n){return this.on(t,e,n)},e.fn.undelegate=function(e,t,n){return this.off(t,e,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,a,o,s,l){var u,c,d=this;return t&&!i(t)?(e.each(t,(function(e,t){d.on(e,a,o,t,l)})),d):(i(a)||r(s)||!1===s||(s=o,o=a,a=void 0),void 0!==s&&!1!==o||(s=o,o=void 0),!1===s&&(s=v),d.each((function(r,i){l&&(u=function(e){return g(i,e.type,s),s.apply(this,arguments)}),a&&(c=function(t){var r,o=e(t.target).closest(a,i).get(0);if(o&&o!==i)return r=e.extend(E(t),{currentTarget:o,liveFired:i}),(u||s).apply(o,[r].concat(n.call(arguments,1)))}),m(i,t,s,o,a,c||u)})))},e.fn.off=function(t,n,a){var o=this;return t&&!i(t)?(e.each(t,(function(e,t){o.off(e,n,t)})),o):(i(n)||r(a)||!1===a||(a=n,n=void 0),!1===a&&(a=v),o.each((function(){g(this,t,a,n)})))},e.fn.trigger=function(t,n){return(t=i(t)||e.isPlainObject(t)?e.Event(t):A(t))._args=n,this.each((function(){t.type in l&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)}))},e.fn.triggerHandler=function(t,n){var r,a;return this.each((function(o,s){(r=E(i(t)?e.Event(t):t))._args=n,r.target=s,e.each(d(s,t.type||t),(function(e,t){if(a=t.proxy(r),r.isImmediatePropagationStopped())return!1}))})),a},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(e,t){i(e)||(e=(t=e).type);var n=document.createEvent(o[e]||"Events"),r=!0;if(t)for(var a in t)"bubbles"==a?r=!!t[a]:n[a]=t[a];return n.initEvent(e,r,!0),A(n)}}(r),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t,n){try{return e(t,n)}catch(e){return null}}}}(),function(e){var t=e.zepto,n=t.qsa,r=t.matches;function i(t){return!(!(t=e(t)).width()&&!t.height())&&"none"!==t.css("display")}var a=e.expr[":"]={visible:function(){if(i(this))return this},hidden:function(){if(!i(this))return this},selected:function(){if(this.selected)return this},checked:function(){if(this.checked)return this},parent:function(){return this.parentNode},first:function(e){if(0===e)return this},last:function(e,t){if(e===t.length-1)return this},eq:function(e,t,n){if(e===n)return this},contains:function(t,n,r){if(e(this).text().indexOf(r)>-1)return this},has:function(e,n,r){if(t.qsa(this,r).length)return this}},o=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),s=/^\s*>/,l="Zepto"+ +new Date;function u(e,t){e=e.replace(/=#\]/g,'="#"]');var n,r,i=o.exec(e);if(i&&i[2]in a&&(n=a[i[2]],r=i[3],e=i[1],r)){var s=Number(r);r=isNaN(s)?r.replace(/^["']|["']$/g,""):s}return t(e,n,r)}t.qsa=function(r,i){return u(i,(function(a,o,u){try{var c;!a&&o?a="*":s.test(a)&&(c=e(r).addClass(l),a="."+l+" "+a);var d=n(r,a)}catch(e){throw console.error("error performing selector: %o",i),e}finally{c&&c.removeClass(l)}return o?t.uniq(e.map(d,(function(e,t){return o.call(e,t,d,u)}))):d}))},t.matches=function(e,t){return u(t,(function(t,n,i){return(!t||r(e,t))&&(!n||n.call(e,null,i)===e)}))}}(r),e.exports=r},"./node_modules/core-js/library/fn/array/from.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/library/fn/array/from.js ***!
\*******************************************************/
/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.string.iterator */"./node_modules/core-js/library/modules/es6.string.iterator.js"),n(/*! ../../modules/es6.array.from */"./node_modules/core-js/library/modules/es6.array.from.js"),e.exports=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Array.from},"./node_modules/core-js/library/fn/get-iterator.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/library/fn/get-iterator.js ***!
\*********************************************************/
/*! no static exports found */function(e,t,n){n(/*! ../modules/web.dom.iterable */"./node_modules/core-js/library/modules/web.dom.iterable.js"),n(/*! ../modules/es6.string.iterator */"./node_modules/core-js/library/modules/es6.string.iterator.js"),e.exports=n(/*! ../modules/core.get-iterator */"./node_modules/core-js/library/modules/core.get-iterator.js")},"./node_modules/core-js/library/fn/json/stringify.js":
/*!***********************************************************!*\
!*** ./node_modules/core-js/library/fn/json/stringify.js ***!
\***********************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js"),i=r.JSON||(r.JSON={stringify:JSON.stringify});e.exports=function(e){return i.stringify.apply(i,arguments)}},"./node_modules/core-js/library/fn/object/assign.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/library/fn/object/assign.js ***!
\**********************************************************/
/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.assign */"./node_modules/core-js/library/modules/es6.object.assign.js"),e.exports=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object.assign},"./node_modules/core-js/library/fn/object/create.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/library/fn/object/create.js ***!
\**********************************************************/
/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.create */"./node_modules/core-js/library/modules/es6.object.create.js");var r=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object;e.exports=function(e,t){return r.create(e,t)}},"./node_modules/core-js/library/fn/object/define-property.js":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/library/fn/object/define-property.js ***!
\*******************************************************************/
/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.define-property */"./node_modules/core-js/library/modules/es6.object.define-property.js");var r=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},"./node_modules/core-js/library/fn/object/get-own-property-descriptor.js":
/*!*******************************************************************************!*\
!*** ./node_modules/core-js/library/fn/object/get-own-property-descriptor.js ***!
\*******************************************************************************/
/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.get-own-property-descriptor */"./node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js");var r=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object;e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)}},"./node_modules/core-js/library/fn/object/keys.js":
/*!********************************************************!*\
!*** ./node_modules/core-js/library/fn/object/keys.js ***!
\********************************************************/
/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.keys */"./node_modules/core-js/library/modules/es6.object.keys.js"),e.exports=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object.keys},"./node_modules/core-js/library/fn/object/set-prototype-of.js":
/*!********************************************************************!*\
!*** ./node_modules/core-js/library/fn/object/set-prototype-of.js ***!
\********************************************************************/
/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.object.set-prototype-of */"./node_modules/core-js/library/modules/es6.object.set-prototype-of.js"),e.exports=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Object.setPrototypeOf},"./node_modules/core-js/library/fn/symbol/index.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/library/fn/symbol/index.js ***!
\*********************************************************/
/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.symbol */"./node_modules/core-js/library/modules/es6.symbol.js"),n(/*! ../../modules/es6.object.to-string */"./node_modules/core-js/library/modules/es6.object.to-string.js"),n(/*! ../../modules/es7.symbol.async-iterator */"./node_modules/core-js/library/modules/es7.symbol.async-iterator.js"),n(/*! ../../modules/es7.symbol.observable */"./node_modules/core-js/library/modules/es7.symbol.observable.js"),e.exports=n(/*! ../../modules/_core */"./node_modules/core-js/library/modules/_core.js").Symbol},"./node_modules/core-js/library/fn/symbol/iterator.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/fn/symbol/iterator.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){n(/*! ../../modules/es6.string.iterator */"./node_modules/core-js/library/modules/es6.string.iterator.js"),n(/*! ../../modules/web.dom.iterable */"./node_modules/core-js/library/modules/web.dom.iterable.js"),e.exports=n(/*! ../../modules/_wks-ext */"./node_modules/core-js/library/modules/_wks-ext.js").f("iterator")},"./node_modules/core-js/library/modules/_a-function.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/library/modules/_a-function.js ***!
\*************************************************************/
/*! no static exports found */function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"./node_modules/core-js/library/modules/_add-to-unscopables.js":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/library/modules/_add-to-unscopables.js ***!
\*********************************************************************/
/*! no static exports found */function(e,t){e.exports=function(){}},"./node_modules/core-js/library/modules/_an-object.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_an-object.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},"./node_modules/core-js/library/modules/_array-includes.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/library/modules/_array-includes.js ***!
\*****************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),i=n(/*! ./_to-length */"./node_modules/core-js/library/modules/_to-length.js"),a=n(/*! ./_to-index */"./node_modules/core-js/library/modules/_to-index.js");e.exports=function(e){return function(t,n,o){var s,l=r(t),u=i(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},"./node_modules/core-js/library/modules/_classof.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/library/modules/_classof.js ***!
\**********************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_cof */"./node_modules/core-js/library/modules/_cof.js"),i=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},"./node_modules/core-js/library/modules/_cof.js":
/*!******************************************************!*\
!*** ./node_modules/core-js/library/modules/_cof.js ***!
\******************************************************/
/*! no static exports found */function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"./node_modules/core-js/library/modules/_core.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/library/modules/_core.js ***!
\*******************************************************/
/*! no static exports found */function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},"./node_modules/core-js/library/modules/_create-property.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js/library/modules/_create-property.js ***!
\******************************************************************/
/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),i=n(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js");e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},"./node_modules/core-js/library/modules/_ctx.js":
/*!******************************************************!*\
!*** ./node_modules/core-js/library/modules/_ctx.js ***!
\******************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_a-function */"./node_modules/core-js/library/modules/_a-function.js");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},"./node_modules/core-js/library/modules/_defined.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/library/modules/_defined.js ***!
\**********************************************************/
/*! no static exports found */function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"./node_modules/core-js/library/modules/_descriptors.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js/library/modules/_descriptors.js ***!
\**************************************************************/
/*! no static exports found */function(e,t,n){e.exports=!n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"./node_modules/core-js/library/modules/_dom-create.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/library/modules/_dom-create.js ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),i=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js").document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},"./node_modules/core-js/library/modules/_enum-bug-keys.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js/library/modules/_enum-bug-keys.js ***!
\****************************************************************/
/*! no static exports found */function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"./node_modules/core-js/library/modules/_enum-keys.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_enum-keys.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),i=n(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js"),a=n(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js");e.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),l=a.f,u=0;s.length>u;)l.call(e,o=s[u++])&&t.push(o);return t}},"./node_modules/core-js/library/modules/_export.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/library/modules/_export.js ***!
\*********************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=n(/*! ./_core */"./node_modules/core-js/library/modules/_core.js"),a=n(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js"),o=n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),s=function(e,t,n){var l,u,c,d=e&s.F,f=e&s.G,h=e&s.S,p=e&s.P,m=e&s.B,g=e&s.W,y=f?i:i[t]||(i[t]={}),v=y.prototype,b=f?r:h?r[t]:(r[t]||{}).prototype;for(l in f&&(n=t),n)(u=!d&&b&&void 0!==b[l])&&l in y||(c=u?b[l]:n[l],y[l]=f&&"function"!=typeof b[l]?n[l]:m&&u?a(c,r):g&&b[l]==c?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):p&&"function"==typeof c?a(Function.call,c):c,p&&((y.virtual||(y.virtual={}))[l]=c,e&s.R&&v&&!v[l]&&o(v,l,c)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},"./node_modules/core-js/library/modules/_fails.js":
/*!********************************************************!*\
!*** ./node_modules/core-js/library/modules/_fails.js ***!
\********************************************************/
/*! no static exports found */function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"./node_modules/core-js/library/modules/_global.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/library/modules/_global.js ***!
\*********************************************************/
/*! no static exports found */function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"./node_modules/core-js/library/modules/_has.js":
/*!******************************************************!*\
!*** ./node_modules/core-js/library/modules/_has.js ***!
\******************************************************/
/*! no static exports found */function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"./node_modules/core-js/library/modules/_hide.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/library/modules/_hide.js ***!
\*******************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),i=n(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js");e.exports=n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},"./node_modules/core-js/library/modules/_html.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/library/modules/_html.js ***!
\*******************************************************/
/*! no static exports found */function(e,t,n){e.exports=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js").document&&document.documentElement},"./node_modules/core-js/library/modules/_ie8-dom-define.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/library/modules/_ie8-dom-define.js ***!
\*****************************************************************/
/*! no static exports found */function(e,t,n){e.exports=!n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")&&!n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){return 7!=Object.defineProperty(n(/*! ./_dom-create */"./node_modules/core-js/library/modules/_dom-create.js")("div"),"a",{get:function(){return 7}}).a}))},"./node_modules/core-js/library/modules/_iobject.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/library/modules/_iobject.js ***!
\**********************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_cof */"./node_modules/core-js/library/modules/_cof.js");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},"./node_modules/core-js/library/modules/_is-array-iter.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js/library/modules/_is-array-iter.js ***!
\****************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),i=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},"./node_modules/core-js/library/modules/_is-array.js":
/*!***********************************************************!*\
!*** ./node_modules/core-js/library/modules/_is-array.js ***!
\***********************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_cof */"./node_modules/core-js/library/modules/_cof.js");e.exports=Array.isArray||function(e){return"Array"==r(e)}},"./node_modules/core-js/library/modules/_is-object.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_is-object.js ***!
\************************************************************/
/*! no static exports found */function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"./node_modules/core-js/library/modules/_iter-call.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_iter-call.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js");e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},"./node_modules/core-js/library/modules/_iter-create.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js/library/modules/_iter-create.js ***!
\**************************************************************/
/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_object-create */"./node_modules/core-js/library/modules/_object-create.js"),i=n(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js"),a=n(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),o={};n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js")(o,n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+" Iterator")}},"./node_modules/core-js/library/modules/_iter-define.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js/library/modules/_iter-define.js ***!
\**************************************************************/
/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),i=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),a=n(/*! ./_redefine */"./node_modules/core-js/library/modules/_redefine.js"),o=n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),s=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),l=n(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),u=n(/*! ./_iter-create */"./node_modules/core-js/library/modules/_iter-create.js"),c=n(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),d=n(/*! ./_object-gpo */"./node_modules/core-js/library/modules/_object-gpo.js"),f=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,m,g,y,v){u(n,t,m);var b,_,A,E=function(e){if(!h&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},T=t+" Iterator",w="values"==g,S=!1,k=e.prototype,C=k[f]||k["@@iterator"]||g&&k[g],x=C||E(g),R=g?w?E("entries"):x:void 0,L="Array"==t&&k.entries||C;if(L&&(A=d(L.call(new e)))!==Object.prototype&&(c(A,T,!0),r||s(A,f)||o(A,f,p)),w&&C&&"values"!==C.name&&(S=!0,x=function(){return C.call(this)}),r&&!v||!h&&!S&&k[f]||o(k,f,x),l[t]=x,l[T]=p,g)if(b={values:w?x:E("values"),keys:y?x:E("keys"),entries:R},v)for(_ in b)_ in k||a(k,_,b[_]);else i(i.P+i.F*(h||S),t,b);return b}},"./node_modules/core-js/library/modules/_iter-detect.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js/library/modules/_iter-detect.js ***!
\**************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},e(a)}catch(e){}return n}},"./node_modules/core-js/library/modules/_iter-step.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_iter-step.js ***!
\************************************************************/
/*! no static exports found */function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},"./node_modules/core-js/library/modules/_iterators.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_iterators.js ***!
\************************************************************/
/*! no static exports found */function(e,t){e.exports={}},"./node_modules/core-js/library/modules/_keyof.js":
/*!********************************************************!*\
!*** ./node_modules/core-js/library/modules/_keyof.js ***!
\********************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),i=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js");e.exports=function(e,t){for(var n,a=i(e),o=r(a),s=o.length,l=0;s>l;)if(a[n=o[l++]]===t)return n}},"./node_modules/core-js/library/modules/_library.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/library/modules/_library.js ***!
\**********************************************************/
/*! no static exports found */function(e,t){e.exports=!0},"./node_modules/core-js/library/modules/_meta.js":
/*!*******************************************************!*\
!*** ./node_modules/core-js/library/modules/_meta.js ***!
\*******************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js")("meta"),i=n(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),a=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),o=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f,s=0,l=Object.isExtensible||function(){return!0},u=!n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){return l(Object.preventExtensions({}))})),c=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&d.NEED&&l(e)&&!a(e,r)&&c(e),e}}},"./node_modules/core-js/library/modules/_object-assign.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-assign.js ***!
\****************************************************************/
/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),i=n(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js"),a=n(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js"),o=n(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),s=n(/*! ./_iobject */"./node_modules/core-js/library/modules/_iobject.js"),l=Object.assign;e.exports=!l||n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=o(e),l=arguments.length,u=1,c=i.f,d=a.f;l>u;)for(var f,h=s(arguments[u++]),p=c?r(h).concat(c(h)):r(h),m=p.length,g=0;m>g;)d.call(h,f=p[g++])&&(n[f]=h[f]);return n}:l},"./node_modules/core-js/library/modules/_object-create.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-create.js ***!
\****************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),i=n(/*! ./_object-dps */"./node_modules/core-js/library/modules/_object-dps.js"),a=n(/*! ./_enum-bug-keys */"./node_modules/core-js/library/modules/_enum-bug-keys.js"),o=n(/*! ./_shared-key */"./node_modules/core-js/library/modules/_shared-key.js")("IE_PROTO"),s=function(){},l=function(){var e,t=n(/*! ./_dom-create */"./node_modules/core-js/library/modules/_dom-create.js")("iframe"),r=a.length;for(t.style.display="none",n(/*! ./_html */"./node_modules/core-js/library/modules/_html.js").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[a[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:i(n,t)}},"./node_modules/core-js/library/modules/_object-dp.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-dp.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),i=n(/*! ./_ie8-dom-define */"./node_modules/core-js/library/modules/_ie8-dom-define.js"),a=n(/*! ./_to-primitive */"./node_modules/core-js/library/modules/_to-primitive.js"),o=Object.defineProperty;t.f=n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},"./node_modules/core-js/library/modules/_object-dps.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-dps.js ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),i=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),a=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js");e.exports=n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);return e}},"./node_modules/core-js/library/modules/_object-gopd.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-gopd.js ***!
\**************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js"),i=n(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js"),a=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),o=n(/*! ./_to-primitive */"./node_modules/core-js/library/modules/_to-primitive.js"),s=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),l=n(/*! ./_ie8-dom-define */"./node_modules/core-js/library/modules/_ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;t.f=n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js")?u:function(e,t){if(e=a(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},"./node_modules/core-js/library/modules/_object-gopn-ext.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-gopn-ext.js ***!
\******************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),i=n(/*! ./_object-gopn */"./node_modules/core-js/library/modules/_object-gopn.js").f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return i(e)}catch(e){return o.slice()}}(e):i(r(e))}},"./node_modules/core-js/library/modules/_object-gopn.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-gopn.js ***!
\**************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-keys-internal */"./node_modules/core-js/library/modules/_object-keys-internal.js"),i=n(/*! ./_enum-bug-keys */"./node_modules/core-js/library/modules/_enum-bug-keys.js").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},"./node_modules/core-js/library/modules/_object-gops.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-gops.js ***!
\**************************************************************/
/*! no static exports found */function(e,t){t.f=Object.getOwnPropertySymbols},"./node_modules/core-js/library/modules/_object-gpo.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-gpo.js ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),i=n(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),a=n(/*! ./_shared-key */"./node_modules/core-js/library/modules/_shared-key.js")("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},"./node_modules/core-js/library/modules/_object-keys-internal.js":
/*!***********************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-keys-internal.js ***!
\***********************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),i=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),a=n(/*! ./_array-includes */"./node_modules/core-js/library/modules/_array-includes.js")(!1),o=n(/*! ./_shared-key */"./node_modules/core-js/library/modules/_shared-key.js")("IE_PROTO");e.exports=function(e,t){var n,s=i(e),l=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(u,n)||u.push(n));return u}},"./node_modules/core-js/library/modules/_object-keys.js":
/*!**************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-keys.js ***!
\**************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-keys-internal */"./node_modules/core-js/library/modules/_object-keys-internal.js"),i=n(/*! ./_enum-bug-keys */"./node_modules/core-js/library/modules/_enum-bug-keys.js");e.exports=Object.keys||function(e){return r(e,i)}},"./node_modules/core-js/library/modules/_object-pie.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-pie.js ***!
\*************************************************************/
/*! no static exports found */function(e,t){t.f={}.propertyIsEnumerable},"./node_modules/core-js/library/modules/_object-sap.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/library/modules/_object-sap.js ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),i=n(/*! ./_core */"./node_modules/core-js/library/modules/_core.js"),a=n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js");e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*a((function(){n(1)})),"Object",o)}},"./node_modules/core-js/library/modules/_property-desc.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js/library/modules/_property-desc.js ***!
\****************************************************************/
/*! no static exports found */function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"./node_modules/core-js/library/modules/_redefine.js":
/*!***********************************************************!*\
!*** ./node_modules/core-js/library/modules/_redefine.js ***!
\***********************************************************/
/*! no static exports found */function(e,t,n){e.exports=n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js")},"./node_modules/core-js/library/modules/_set-proto.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_set-proto.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js"),i=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),a=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js")(Function.call,n(/*! ./_object-gopd */"./node_modules/core-js/library/modules/_object-gopd.js").f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},"./node_modules/core-js/library/modules/_set-to-string-tag.js":
/*!********************************************************************!*\
!*** ./node_modules/core-js/library/modules/_set-to-string-tag.js ***!
\********************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f,i=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),a=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},"./node_modules/core-js/library/modules/_shared-key.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/library/modules/_shared-key.js ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_shared */"./node_modules/core-js/library/modules/_shared.js")("keys"),i=n(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js");e.exports=function(e){return r[e]||(r[e]=i(e))}},"./node_modules/core-js/library/modules/_shared.js":
/*!*********************************************************!*\
!*** ./node_modules/core-js/library/modules/_shared.js ***!
\*********************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},"./node_modules/core-js/library/modules/_string-at.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_string-at.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-integer */"./node_modules/core-js/library/modules/_to-integer.js"),i=n(/*! ./_defined */"./node_modules/core-js/library/modules/_defined.js");e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}}},"./node_modules/core-js/library/modules/_to-index.js":
/*!***********************************************************!*\
!*** ./node_modules/core-js/library/modules/_to-index.js ***!
\***********************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-integer */"./node_modules/core-js/library/modules/_to-integer.js"),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):a(e,t)}},"./node_modules/core-js/library/modules/_to-integer.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/library/modules/_to-integer.js ***!
\*************************************************************/
/*! no static exports found */function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},"./node_modules/core-js/library/modules/_to-iobject.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/library/modules/_to-iobject.js ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_iobject */"./node_modules/core-js/library/modules/_iobject.js"),i=n(/*! ./_defined */"./node_modules/core-js/library/modules/_defined.js");e.exports=function(e){return r(i(e))}},"./node_modules/core-js/library/modules/_to-length.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_to-length.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-integer */"./node_modules/core-js/library/modules/_to-integer.js"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},"./node_modules/core-js/library/modules/_to-object.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/_to-object.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_defined */"./node_modules/core-js/library/modules/_defined.js");e.exports=function(e){return Object(r(e))}},"./node_modules/core-js/library/modules/_to-primitive.js":
/*!***************************************************************!*\
!*** ./node_modules/core-js/library/modules/_to-primitive.js ***!
\***************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_is-object */"./node_modules/core-js/library/modules/_is-object.js");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/library/modules/_uid.js":
/*!******************************************************!*\
!*** ./node_modules/core-js/library/modules/_uid.js ***!
\******************************************************/
/*! no static exports found */function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},"./node_modules/core-js/library/modules/_wks-define.js":
/*!*************************************************************!*\
!*** ./node_modules/core-js/library/modules/_wks-define.js ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=n(/*! ./_core */"./node_modules/core-js/library/modules/_core.js"),a=n(/*! ./_library */"./node_modules/core-js/library/modules/_library.js"),o=n(/*! ./_wks-ext */"./node_modules/core-js/library/modules/_wks-ext.js"),s=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},"./node_modules/core-js/library/modules/_wks-ext.js":
/*!**********************************************************!*\
!*** ./node_modules/core-js/library/modules/_wks-ext.js ***!
\**********************************************************/
/*! no static exports found */function(e,t,n){t.f=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")},"./node_modules/core-js/library/modules/_wks.js":
/*!******************************************************!*\
!*** ./node_modules/core-js/library/modules/_wks.js ***!
\******************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_shared */"./node_modules/core-js/library/modules/_shared.js")("wks"),i=n(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js"),a=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js").Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},"./node_modules/core-js/library/modules/core.get-iterator-method.js":
/*!**************************************************************************!*\
!*** ./node_modules/core-js/library/modules/core.get-iterator-method.js ***!
\**************************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_classof */"./node_modules/core-js/library/modules/_classof.js"),i=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("iterator"),a=n(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js");e.exports=n(/*! ./_core */"./node_modules/core-js/library/modules/_core.js").getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},"./node_modules/core-js/library/modules/core.get-iterator.js":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/library/modules/core.get-iterator.js ***!
\*******************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),i=n(/*! ./core.get-iterator-method */"./node_modules/core-js/library/modules/core.get-iterator-method.js");e.exports=n(/*! ./_core */"./node_modules/core-js/library/modules/_core.js").getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},"./node_modules/core-js/library/modules/es6.array.from.js":
/*!****************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.array.from.js ***!
\****************************************************************/
/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_ctx */"./node_modules/core-js/library/modules/_ctx.js"),i=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),a=n(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),o=n(/*! ./_iter-call */"./node_modules/core-js/library/modules/_iter-call.js"),s=n(/*! ./_is-array-iter */"./node_modules/core-js/library/modules/_is-array-iter.js"),l=n(/*! ./_to-length */"./node_modules/core-js/library/modules/_to-length.js"),u=n(/*! ./_create-property */"./node_modules/core-js/library/modules/_create-property.js"),c=n(/*! ./core.get-iterator-method */"./node_modules/core-js/library/modules/core.get-iterator-method.js");i(i.S+i.F*!n(/*! ./_iter-detect */"./node_modules/core-js/library/modules/_iter-detect.js")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,d,f=a(e),h="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,y=0,v=c(f);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==v||h==Array&&s(v))for(n=new h(t=l(f.length));t>y;y++)u(n,y,g?m(f[y],y):f[y]);else for(d=v.call(f),n=new h;!(i=d.next()).done;y++)u(n,y,g?o(d,m,[i.value,y],!0):i.value);return n.length=y,n}})},"./node_modules/core-js/library/modules/es6.array.iterator.js":
/*!********************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.array.iterator.js ***!
\********************************************************************/
/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_add-to-unscopables */"./node_modules/core-js/library/modules/_add-to-unscopables.js"),i=n(/*! ./_iter-step */"./node_modules/core-js/library/modules/_iter-step.js"),a=n(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),o=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js");e.exports=n(/*! ./_iter-define */"./node_modules/core-js/library/modules/_iter-define.js")(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},"./node_modules/core-js/library/modules/es6.object.assign.js":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.object.assign.js ***!
\*******************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");r(r.S+r.F,"Object",{assign:n(/*! ./_object-assign */"./node_modules/core-js/library/modules/_object-assign.js")})},"./node_modules/core-js/library/modules/es6.object.create.js":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.object.create.js ***!
\*******************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");r(r.S,"Object",{create:n(/*! ./_object-create */"./node_modules/core-js/library/modules/_object-create.js")})},"./node_modules/core-js/library/modules/es6.object.define-property.js":
/*!****************************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.object.define-property.js ***!
\****************************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");r(r.S+r.F*!n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js"),"Object",{defineProperty:n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js").f})},"./node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js":
/*!****************************************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js ***!
\****************************************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),i=n(/*! ./_object-gopd */"./node_modules/core-js/library/modules/_object-gopd.js").f;n(/*! ./_object-sap */"./node_modules/core-js/library/modules/_object-sap.js")("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(e),t)}}))},"./node_modules/core-js/library/modules/es6.object.keys.js":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.object.keys.js ***!
\*****************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_to-object */"./node_modules/core-js/library/modules/_to-object.js"),i=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js");n(/*! ./_object-sap */"./node_modules/core-js/library/modules/_object-sap.js")("keys",(function(){return function(e){return i(r(e))}}))},"./node_modules/core-js/library/modules/es6.object.set-prototype-of.js":
/*!*****************************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.object.set-prototype-of.js ***!
\*****************************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js");r(r.S,"Object",{setPrototypeOf:n(/*! ./_set-proto */"./node_modules/core-js/library/modules/_set-proto.js").set})},"./node_modules/core-js/library/modules/es6.object.to-string.js":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.object.to-string.js ***!
\**********************************************************************/
/*! no static exports found */function(e,t){},"./node_modules/core-js/library/modules/es6.string.iterator.js":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.string.iterator.js ***!
\*********************************************************************/
/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_string-at */"./node_modules/core-js/library/modules/_string-at.js")(!0);n(/*! ./_iter-define */"./node_modules/core-js/library/modules/_iter-define.js")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},"./node_modules/core-js/library/modules/es6.symbol.js":
/*!************************************************************!*\
!*** ./node_modules/core-js/library/modules/es6.symbol.js ***!
\************************************************************/
/*! no static exports found */function(e,t,n){"use strict";var r=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=n(/*! ./_has */"./node_modules/core-js/library/modules/_has.js"),a=n(/*! ./_descriptors */"./node_modules/core-js/library/modules/_descriptors.js"),o=n(/*! ./_export */"./node_modules/core-js/library/modules/_export.js"),s=n(/*! ./_redefine */"./node_modules/core-js/library/modules/_redefine.js"),l=n(/*! ./_meta */"./node_modules/core-js/library/modules/_meta.js").KEY,u=n(/*! ./_fails */"./node_modules/core-js/library/modules/_fails.js"),c=n(/*! ./_shared */"./node_modules/core-js/library/modules/_shared.js"),d=n(/*! ./_set-to-string-tag */"./node_modules/core-js/library/modules/_set-to-string-tag.js"),f=n(/*! ./_uid */"./node_modules/core-js/library/modules/_uid.js"),h=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js"),p=n(/*! ./_wks-ext */"./node_modules/core-js/library/modules/_wks-ext.js"),m=n(/*! ./_wks-define */"./node_modules/core-js/library/modules/_wks-define.js"),g=n(/*! ./_keyof */"./node_modules/core-js/library/modules/_keyof.js"),y=n(/*! ./_enum-keys */"./node_modules/core-js/library/modules/_enum-keys.js"),v=n(/*! ./_is-array */"./node_modules/core-js/library/modules/_is-array.js"),b=n(/*! ./_an-object */"./node_modules/core-js/library/modules/_an-object.js"),_=n(/*! ./_to-iobject */"./node_modules/core-js/library/modules/_to-iobject.js"),A=n(/*! ./_to-primitive */"./node_modules/core-js/library/modules/_to-primitive.js"),E=n(/*! ./_property-desc */"./node_modules/core-js/library/modules/_property-desc.js"),T=n(/*! ./_object-create */"./node_modules/core-js/library/modules/_object-create.js"),w=n(/*! ./_object-gopn-ext */"./node_modules/core-js/library/modules/_object-gopn-ext.js"),S=n(/*! ./_object-gopd */"./node_modules/core-js/library/modules/_object-gopd.js"),k=n(/*! ./_object-dp */"./node_modules/core-js/library/modules/_object-dp.js"),C=n(/*! ./_object-keys */"./node_modules/core-js/library/modules/_object-keys.js"),x=S.f,R=k.f,L=w.f,I=r.Symbol,P=r.JSON,j=P&&P.stringify,O=h("_hidden"),D=h("toPrimitive"),M={}.propertyIsEnumerable,N=c("symbol-registry"),U=c("symbols"),F=c("op-symbols"),B=Object.prototype,K="function"==typeof I,V=r.QObject,G=!V||!V.prototype||!V.prototype.findChild,H=a&&u((function(){return 7!=T(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=x(B,t);r&&delete B[t],R(e,t,n),r&&e!==B&&R(B,t,r)}:R,Y=function(e){var t=U[e]=T(I.prototype);return t._k=e,t},z=K&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},W=function(e,t,n){return e===B&&W(F,t,n),b(e),t=A(t,!0),b(n),i(U,t)?(n.enumerable?(i(e,O)&&e[O][t]&&(e[O][t]=!1),n=T(n,{enumerable:E(0,!1)})):(i(e,O)||R(e,O,E(1,{})),e[O][t]=!0),H(e,t,n)):R(e,t,n)},$=function(e,t){b(e);for(var n,r=y(t=_(t)),i=0,a=r.length;a>i;)W(e,n=r[i++],t[n]);return e},q=function(e){var t=M.call(this,e=A(e,!0));return!(this===B&&i(U,e)&&!i(F,e))&&(!(t||!i(this,e)||!i(U,e)||i(this,O)&&this[O][e])||t)},X=function(e,t){if(e=_(e),t=A(t,!0),e!==B||!i(U,t)||i(F,t)){var n=x(e,t);return!n||!i(U,t)||i(e,O)&&e[O][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=L(_(e)),r=[],a=0;n.length>a;)i(U,t=n[a++])||t==O||t==l||r.push(t);return r},Q=function(e){for(var t,n=e===B,r=L(n?F:_(e)),a=[],o=0;r.length>o;)!i(U,t=r[o++])||n&&!i(B,t)||a.push(U[t]);return a};K||(s((I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(F,n),i(this,O)&&i(this[O],e)&&(this[O][e]=!1),H(this,e,E(1,n))};return a&&G&&H(B,e,{configurable:!0,set:t}),Y(e)}).prototype,"toString",(function(){return this._k})),S.f=X,k.f=W,n(/*! ./_object-gopn */"./node_modules/core-js/library/modules/_object-gopn.js").f=w.f=J,n(/*! ./_object-pie */"./node_modules/core-js/library/modules/_object-pie.js").f=q,n(/*! ./_object-gops */"./node_modules/core-js/library/modules/_object-gops.js").f=Q,a&&!n(/*! ./_library */"./node_modules/core-js/library/modules/_library.js")&&s(B,"propertyIsEnumerable",q,!0),p.f=function(e){return Y(h(e))}),o(o.G+o.W+o.F*!K,{Symbol:I});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Z.length>ee;)h(Z[ee++]);for(Z=C(h.store),ee=0;Z.length>ee;)m(Z[ee++]);o(o.S+o.F*!K,"Symbol",{for:function(e){return i(N,e+="")?N[e]:N[e]=I(e)},keyFor:function(e){if(z(e))return g(N,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){G=!0},useSimple:function(){G=!1}}),o(o.S+o.F*!K,"Object",{create:function(e,t){return void 0===t?T(e):$(T(e),t)},defineProperty:W,defineProperties:$,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Q}),P&&o(o.S+o.F*(!K||u((function(){var e=I();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))}))),"JSON",{stringify:function(e){if(void 0!==e&&!z(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return"function"==typeof(t=r[1])&&(n=t),!n&&v(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!z(t))return t}),r[1]=t,j.apply(P,r)}}}),I.prototype[D]||n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js")(I.prototype,D,I.prototype.valueOf),d(I,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},"./node_modules/core-js/library/modules/es7.symbol.async-iterator.js":
/*!***************************************************************************!*\
!*** ./node_modules/core-js/library/modules/es7.symbol.async-iterator.js ***!
\***************************************************************************/
/*! no static exports found */function(e,t,n){n(/*! ./_wks-define */"./node_modules/core-js/library/modules/_wks-define.js")("asyncIterator")},"./node_modules/core-js/library/modules/es7.symbol.observable.js":
/*!***********************************************************************!*\
!*** ./node_modules/core-js/library/modules/es7.symbol.observable.js ***!
\***********************************************************************/
/*! no static exports found */function(e,t,n){n(/*! ./_wks-define */"./node_modules/core-js/library/modules/_wks-define.js")("observable")},"./node_modules/core-js/library/modules/web.dom.iterable.js":
/*!******************************************************************!*\
!*** ./node_modules/core-js/library/modules/web.dom.iterable.js ***!
\******************************************************************/
/*! no static exports found */function(e,t,n){n(/*! ./es6.array.iterator */"./node_modules/core-js/library/modules/es6.array.iterator.js");for(var r=n(/*! ./_global */"./node_modules/core-js/library/modules/_global.js"),i=n(/*! ./_hide */"./node_modules/core-js/library/modules/_hide.js"),a=n(/*! ./_iterators */"./node_modules/core-js/library/modules/_iterators.js"),o=n(/*! ./_wks */"./node_modules/core-js/library/modules/_wks.js")("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],l=0;l<5;l++){var u=s[l],c=r[u],d=c&&c.prototype;d&&!d[o]&&i(d,o,u),a[u]=a.Array}},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/components/container/public/style.scss":
/*!*****************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/components/container/public/style.scss ***!
\*****************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".container[data-container] {\n position: absolute;\n background-color: black;\n height: 100%;\n width: 100%;\n max-width: 100%; }\n .container[data-container] .chromeless {\n cursor: default; }\n\n[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled {\n cursor: pointer; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/components/core/public/style.scss":
/*!************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/components/core/public/style.scss ***!
\************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,'[data-player] {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n font-style: normal;\n font-weight: normal;\n text-align: center;\n overflow: hidden;\n font-size: 100%;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-shadow: 0 0 0;\n box-sizing: border-box; }\n [data-player] div, [data-player] span, [data-player] applet, [data-player] object, [data-player] iframe,\n [data-player] h1, [data-player] h2, [data-player] h3, [data-player] h4, [data-player] h5, [data-player] h6, [data-player] p, [data-player] blockquote, [data-player] pre,\n [data-player] a, [data-player] abbr, [data-player] acronym, [data-player] address, [data-player] big, [data-player] cite, [data-player] code,\n [data-player] del, [data-player] dfn, [data-player] em, [data-player] img, [data-player] ins, [data-player] kbd, [data-player] q, [data-player] s, [data-player] samp,\n [data-player] small, [data-player] strike, [data-player] strong, [data-player] sub, [data-player] sup, [data-player] tt, [data-player] var,\n [data-player] b, [data-player] u, [data-player] i, [data-player] center,\n [data-player] dl, [data-player] dt, [data-player] dd, [data-player] ol, [data-player] ul, [data-player] li,\n [data-player] fieldset, [data-player] form, [data-player] label, [data-player] legend,\n [data-player] table, [data-player] caption, [data-player] tbody, [data-player] tfoot, [data-player] thead, [data-player] tr, [data-player] th, [data-player] td,\n [data-player] article, [data-player] aside, [data-player] canvas, [data-player] details, [data-player] embed,\n [data-player] figure, [data-player] figcaption, [data-player] footer, [data-player] header, [data-player] hgroup,\n [data-player] menu, [data-player] nav, [data-player] output, [data-player] ruby, [data-player] section, [data-player] summary,\n [data-player] time, [data-player] mark, [data-player] audio, [data-player] video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline; }\n [data-player] table {\n border-collapse: collapse;\n border-spacing: 0; }\n [data-player] caption, [data-player] th, [data-player] td {\n text-align: left;\n font-weight: normal;\n vertical-align: middle; }\n [data-player] q, [data-player] blockquote {\n quotes: none; }\n [data-player] q:before, [data-player] q:after, [data-player] blockquote:before, [data-player] blockquote:after {\n content: "";\n content: none; }\n [data-player] a img {\n border: none; }\n [data-player]:focus {\n outline: 0; }\n [data-player] * {\n max-width: none;\n box-sizing: inherit;\n float: none; }\n [data-player] div {\n display: block; }\n [data-player].fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0;\n left: 0; }\n [data-player].nocursor {\n cursor: none; }\n\n.clappr-style {\n display: none !important; }\n',""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/base_flash_playback/public/flash.scss":
/*!**************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/base_flash_playback/public/flash.scss ***!
\**************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".clappr-flash-playback[data-flash-playback] {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n pointer-events: none; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/html5_video/public/style.scss":
/*!******************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/html5_video/public/style.scss ***!
\******************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,"[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/html_img/public/style.scss":
/*!***************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/html_img/public/style.scss ***!
\***************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,"[data-html-img] {\n max-width: 100%;\n max-height: 100%; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/no_op/public/style.scss":
/*!************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/no_op/public/style.scss ***!
\************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,"[data-no-op] {\n position: absolute;\n height: 100%;\n width: 100%;\n text-align: center; }\n\n[data-no-op] p[data-no-op-msg] {\n position: absolute;\n text-align: center;\n font-size: 25px;\n left: 0;\n right: 0;\n color: white;\n padding: 10px;\n /* center vertically */\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n max-height: 100%;\n overflow: auto; }\n\n[data-no-op] canvas[data-no-op-canvas] {\n background-color: #777;\n height: 100%;\n width: 100%; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/closed_captions/public/closed_captions.scss":
/*!******************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/closed_captions/public/closed_captions.scss ***!
\******************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".cc-controls[data-cc-controls] {\n float: right;\n position: relative;\n display: none; }\n .cc-controls[data-cc-controls].available {\n display: block; }\n .cc-controls[data-cc-controls] .cc-button {\n padding: 6px !important; }\n .cc-controls[data-cc-controls] .cc-button.enabled {\n display: block;\n opacity: 1.0; }\n .cc-controls[data-cc-controls] .cc-button.enabled:hover {\n opacity: 1.0;\n text-shadow: none; }\n .cc-controls[data-cc-controls] > ul {\n list-style-type: none;\n position: absolute;\n bottom: 25px;\n border: 1px solid black;\n display: none;\n background-color: #e6e6e6; }\n .cc-controls[data-cc-controls] li {\n font-size: 10px; }\n .cc-controls[data-cc-controls] li[data-title] {\n background-color: #c3c2c2;\n padding: 5px; }\n .cc-controls[data-cc-controls] li a {\n color: #444;\n padding: 2px 10px;\n display: block;\n text-decoration: none; }\n .cc-controls[data-cc-controls] li a:hover {\n background-color: #555;\n color: white; }\n .cc-controls[data-cc-controls] li a:hover a {\n color: white;\n text-decoration: none; }\n .cc-controls[data-cc-controls] li.current a {\n color: #f00; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/dvr_controls/public/dvr_controls.scss":
/*!************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/dvr_controls/public/dvr_controls.scss ***!
\************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,'.dvr-controls[data-dvr-controls] {\n display: inline-block;\n float: left;\n color: #fff;\n line-height: 32px;\n font-size: 10px;\n font-weight: bold;\n margin-left: 6px; }\n .dvr-controls[data-dvr-controls] .live-info {\n cursor: default;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-transform: uppercase; }\n .dvr-controls[data-dvr-controls] .live-info:before {\n content: "";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #ff0101; }\n .dvr-controls[data-dvr-controls] .live-info.disabled {\n opacity: 0.3; }\n .dvr-controls[data-dvr-controls] .live-info.disabled:before {\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button {\n cursor: pointer;\n outline: none;\n display: none;\n border: 0;\n color: #fff;\n background-color: transparent;\n height: 32px;\n padding: 0;\n opacity: 0.7;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-transform: uppercase;\n transition: all 0.1s ease; }\n .dvr-controls[data-dvr-controls] .live-button:before {\n content: "";\n display: inline-block;\n position: relative;\n width: 7px;\n height: 7px;\n border-radius: 3.5px;\n margin-right: 3.5px;\n background-color: #fff; }\n .dvr-controls[data-dvr-controls] .live-button:hover {\n opacity: 1;\n text-shadow: rgba(255, 255, 255, 0.75) 0 0 5px; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-info {\n display: none; }\n\n.dvr .dvr-controls[data-dvr-controls] .live-button {\n display: block; }\n\n.dvr.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #005aff; }\n\n.media-control.live[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n background-color: #ff0101; }\n',""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/error_screen/public/error_screen.scss":
/*!************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/error_screen/public/error_screen.scss ***!
\************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,"div.player-error-screen {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n color: #CCCACA;\n position: absolute;\n top: 0;\n height: 100%;\n width: 100%;\n background-color: rgba(0, 0, 0, 0.7);\n z-index: 2000;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center; }\n div.player-error-screen__content[data-error-screen] {\n font-size: 14px;\n color: #CCCACA;\n margin-top: 45px; }\n div.player-error-screen__title[data-error-screen] {\n font-weight: bold;\n line-height: 30px;\n font-size: 18px; }\n div.player-error-screen__message[data-error-screen] {\n width: 90%;\n margin: 0 auto; }\n div.player-error-screen__code[data-error-screen] {\n font-size: 13px;\n margin-top: 15px; }\n div.player-error-screen__reload {\n cursor: pointer;\n width: 30px;\n margin: 15px auto 0; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/media_control/public/media-control.scss":
/*!**************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/media_control/public/media-control.scss ***!
\**************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ../../../../node_modules/css-loader/lib/url/escape.js */"./node_modules/css-loader/lib/url/escape.js");(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".media-control-notransition {\n transition: none !important; }\n\n.media-control[data-media-control] {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 9999;\n pointer-events: none; }\n .media-control[data-media-control].dragging {\n pointer-events: auto;\n cursor: -webkit-grabbing !important;\n cursor: grabbing !important;\n cursor: url("+r(n(/*! ./closed-hand.cur */"./src/plugins/media_control/public/closed-hand.cur"))+"), move; }\n .media-control[data-media-control].dragging * {\n cursor: -webkit-grabbing !important;\n cursor: grabbing !important;\n cursor: url("+r(n(/*! ./closed-hand.cur */"./src/plugins/media_control/public/closed-hand.cur"))+'), move; }\n .media-control[data-media-control] .media-control-background[data-background] {\n position: absolute;\n height: 40%;\n width: 100%;\n bottom: 0;\n background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));\n transition: opacity 0.6s ease-out; }\n .media-control[data-media-control] .media-control-icon {\n line-height: 0;\n letter-spacing: 0;\n speak: none;\n color: #fff;\n opacity: 0.5;\n vertical-align: middle;\n text-align: left;\n transition: all 0.1s ease; }\n .media-control[data-media-control] .media-control-icon:hover {\n color: white;\n opacity: 0.75;\n text-shadow: rgba(255, 255, 255, 0.8) 0 0 5px; }\n .media-control[data-media-control].media-control-hide .media-control-background[data-background] {\n opacity: 0; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] {\n bottom: -50px; }\n .media-control[data-media-control].media-control-hide .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] {\n position: absolute;\n bottom: 7px;\n width: 100%;\n height: 32px;\n font-size: 0;\n vertical-align: middle;\n pointer-events: auto;\n transition: bottom 0.4s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-left-panel[data-media-control] {\n position: absolute;\n top: 0;\n left: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-center-panel[data-media-control] {\n height: 100%;\n text-align: center;\n line-height: 32px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-right-panel[data-media-control] {\n position: absolute;\n top: 0;\n right: 4px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button {\n background-color: transparent;\n border: 0;\n margin: 0 6px;\n padding: 0;\n cursor: pointer;\n display: inline-block;\n width: 32px;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg {\n width: 100%;\n height: 22px; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button:focus {\n outline: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-play] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-pause] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-stop] {\n float: left;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-fullscreen] {\n float: right;\n background-color: transparent;\n border: 0;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator] {\n background-color: transparent;\n border: 0;\n cursor: default;\n display: none;\n float: right;\n height: 100%; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled {\n display: block;\n opacity: 1.0; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-hd-indicator].enabled:hover {\n opacity: 1.0;\n text-shadow: none; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playpause] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] button.media-control-button[data-playstop] {\n float: left; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position], .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n display: inline-block;\n font-size: 10px;\n color: white;\n cursor: default;\n line-height: 32px;\n position: relative; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-position] {\n margin: 0 6px 0 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration] {\n color: rgba(255, 255, 255, 0.5);\n margin-right: 6px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .media-control-indicator[data-duration]:before {\n content: "|";\n margin-right: 7px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] {\n position: absolute;\n top: -20px;\n left: 0;\n display: inline-block;\n vertical-align: middle;\n width: 100%;\n height: 25px;\n cursor: pointer; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {\n width: 100%;\n height: 1px;\n position: relative;\n top: 12px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-1[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-fill-2[data-seekbar] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled {\n cursor: default; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar].seek-disabled:hover .bar-background[data-seekbar] .bar-hover[data-seekbar] {\n opacity: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] {\n position: absolute;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n top: 2px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-scrubber[data-seekbar] .bar-scrubber-icon[data-seekbar] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] {\n float: right;\n display: inline-block;\n height: 32px;\n cursor: pointer;\n margin: 0 6px;\n box-sizing: border-box; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] {\n float: left;\n bottom: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] {\n background-color: transparent;\n border: 0;\n box-sizing: content-box;\n width: 32px;\n height: 32px;\n opacity: 0.5; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume]:hover {\n opacity: 0.75; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg {\n height: 24px;\n position: relative;\n top: 3px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume] svg path {\n fill: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .drawer-icon-container[data-volume] .drawer-icon[data-volume].muted svg {\n margin-left: 2px; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] {\n float: left;\n position: relative;\n overflow: hidden;\n top: 6px;\n width: 42px;\n height: 18px;\n padding: 3px 0;\n transition: width .2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] {\n height: 1px;\n position: relative;\n top: 7px;\n margin: 0 3px;\n background-color: #666666; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-1[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #c2c2c2;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-fill-2[data-volume] {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n background-color: #005aff;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-background[data-volume] .bar-hover[data-volume] {\n opacity: 0;\n position: absolute;\n top: -3px;\n width: 5px;\n height: 7px;\n background-color: rgba(255, 255, 255, 0.5);\n transition: opacity 0.1s ease; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] {\n position: absolute;\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n top: 0px;\n left: 0;\n width: 20px;\n height: 20px;\n opacity: 1;\n transition: all 0.1s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .bar-scrubber[data-volume] .bar-scrubber-icon[data-volume] {\n position: absolute;\n left: 6px;\n top: 6px;\n width: 8px;\n height: 8px;\n border-radius: 10px;\n box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);\n background-color: white; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume] {\n float: left;\n width: 4px;\n padding-left: 2px;\n height: 12px;\n opacity: 0.5;\n box-shadow: inset 2px 0 0 white;\n transition: -webkit-transform .2s ease-out;\n transition: transform .2s ease-out;\n transition: transform .2s ease-out, -webkit-transform .2s ease-out; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume].fill {\n box-shadow: inset 2px 0 0 #fff;\n opacity: 1; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:nth-of-type(1) {\n padding-left: 0; }\n .media-control[data-media-control] .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume] .segmented-bar-element[data-volume]:hover {\n -webkit-transform: scaleY(1.5);\n transform: scaleY(1.5); }\n .media-control[data-media-control].w320 .media-control-layer[data-controls] .drawer-container[data-volume] .bar-container[data-volume].volume-bar-hide {\n width: 0;\n height: 12px;\n top: 9px;\n padding: 0; }\n',""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/poster/public/poster.scss":
/*!************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/poster/public/poster.scss ***!
\************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".player-poster[data-poster] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n position: absolute;\n height: 100%;\n width: 100%;\n z-index: 998;\n top: 0;\n left: 0;\n background-color: #000;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: 50% 50%; }\n .player-poster[data-poster].clickable {\n cursor: pointer; }\n .player-poster[data-poster]:hover .play-wrapper[data-poster] {\n opacity: 1; }\n .player-poster[data-poster] .play-wrapper[data-poster] {\n width: 100%;\n height: 25%;\n margin: 0 auto;\n opacity: 0.75;\n transition: opacity 0.1s ease; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg {\n height: 100%; }\n .player-poster[data-poster] .play-wrapper[data-poster] svg path {\n fill: #fff; }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/seek_time/public/seek_time.scss":
/*!******************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/seek_time/public/seek_time.scss ***!
\******************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,'.seek-time[data-seek-time] {\n position: absolute;\n white-space: nowrap;\n height: 20px;\n line-height: 20px;\n font-size: 0;\n left: -100%;\n bottom: 55px;\n background-color: rgba(2, 2, 2, 0.5);\n z-index: 9999;\n transition: opacity 0.1s ease; }\n .seek-time[data-seek-time].hidden[data-seek-time] {\n opacity: 0; }\n .seek-time[data-seek-time] [data-seek-time] {\n display: inline-block;\n color: white;\n font-size: 10px;\n padding-left: 7px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration] {\n display: inline-block;\n color: rgba(255, 255, 255, 0.5);\n font-size: 10px;\n padding-right: 7px;\n vertical-align: top; }\n .seek-time[data-seek-time] [data-duration]:before {\n content: "|";\n margin-right: 7px; }\n',""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/spinner_three_bounce/public/spinner.scss":
/*!***************************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/spinner_three_bounce/public/spinner.scss ***!
\***************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".spinner-three-bounce[data-spinner] {\n position: absolute;\n margin: 0 auto;\n width: 70px;\n text-align: center;\n z-index: 999;\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n /* center vertically */\n top: 50%;\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%); }\n .spinner-three-bounce[data-spinner] > div {\n width: 18px;\n height: 18px;\n background-color: #FFFFFF;\n border-radius: 100%;\n display: inline-block;\n -webkit-animation: bouncedelay 1.4s infinite ease-in-out;\n animation: bouncedelay 1.4s infinite ease-in-out;\n /* Prevent first frame from flickering when animation starts */\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both; }\n .spinner-three-bounce[data-spinner] [data-bounce1] {\n -webkit-animation-delay: -0.32s;\n animation-delay: -0.32s; }\n .spinner-three-bounce[data-spinner] [data-bounce2] {\n -webkit-animation-delay: -0.16s;\n animation-delay: -0.16s; }\n\n@-webkit-keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0); }\n 40% {\n -webkit-transform: scale(1);\n transform: scale(1); } }\n\n@keyframes bouncedelay {\n 0%, 80%, 100% {\n -webkit-transform: scale(0);\n transform: scale(0); }\n 40% {\n -webkit-transform: scale(1);\n transform: scale(1); } }\n",""])},"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/watermark/public/watermark.scss":
/*!******************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/css-loader!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/watermark/public/watermark.scss ***!
\******************************************************************************************************************************************************************************************************************************/
/*! no static exports found */function(e,t,n){(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,".clappr-watermark[data-watermark] {\n position: absolute;\n min-width: 70px;\n max-width: 200px;\n width: 12%;\n text-align: center;\n z-index: 10; }\n\n.clappr-watermark[data-watermark] a {\n outline: none;\n cursor: pointer; }\n\n.clappr-watermark[data-watermark] img {\n max-width: 100%; }\n\n.clappr-watermark[data-watermark-bottom-left] {\n bottom: 10px;\n left: 10px; }\n\n.clappr-watermark[data-watermark-bottom-right] {\n bottom: 10px;\n right: 42px; }\n\n.clappr-watermark[data-watermark-top-left] {\n top: 10px;\n left: 10px; }\n\n.clappr-watermark[data-watermark-top-right] {\n top: 10px;\n right: 37px; }\n",""])},"./node_modules/css-loader/lib/css-base.js":
/*!*************************************************!*\
!*** ./node_modules/css-loader/lib/css-base.js ***!
\*************************************************/
/*! no static exports found */function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var a=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),o=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[r].concat(o).concat([a]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<e.length;i++){var o=e[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},"./node_modules/css-loader/lib/url/escape.js":
/*!***************************************************!*\
!*** ./node_modules/css-loader/lib/url/escape.js ***!
\***************************************************/
/*! no static exports found */function(e,t){e.exports=function(e){return"string"!=typeof e?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)?'"'+e.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':e)}},"./node_modules/hls.js/dist/hls.js":
/*!*****************************************!*\
!*** ./node_modules/hls.js/dist/hls.js ***!
\*****************************************/
/*! no static exports found */function(e,t,n){var r;"undefined"!=typeof window&&(r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist/",n(n.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":
/*!*********************************************!*\
!*** ./node_modules/eventemitter3/index.js ***!
\*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function a(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,r||e,a),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function l(e,t){0==--e._eventsCount?e._events=new a:delete e._events[t]}function u(){this._events=new a,this._eventsCount=0}Object.create&&(a.prototype=Object.create(null),(new a).__proto__||(i=!1)),u.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},u.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,o=new Array(a);r<a;r++)o[r]=n[r].fn;return o},u.prototype.listenerCount=function(e){var t=i?i+e:e,n=this._events[t];return n?n.fn?1:n.length:0},u.prototype.emit=function(e,t,n,r,a,o){var s=i?i+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,r),!0;case 5:return c.fn.call(c.context,t,n,r,a),!0;case 6:return c.fn.call(c.context,t,n,r,a,o),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var f,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,r);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];c[u].fn.apply(c[u].context,l)}}return!0},u.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},u.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},u.prototype.removeListener=function(e,t,n,r){var a=i?i+e:e;if(!this._events[a])return this;if(!t)return l(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||r&&!o.once||n&&o.context!==n||l(this,a);else{for(var s=0,u=[],c=o.length;s<c;s++)(o[s].fn!==t||r&&!o[s].once||n&&o[s].context!==n)&&u.push(o[s]);u.length?this._events[a]=1===u.length?u[0]:u:l(this,a)}return this},u.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&l(this,t)):(this._events=new a,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,e.exports=u},"./node_modules/url-toolkit/src/url-toolkit.js":
/*!*****************************************************!*\
!*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
\*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){var r,i,a,o,s;r=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,i=/^([^\/?#]*)(.*)$/,a=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,s={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var r=s.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=s.normalizePath(r.path),s.buildURLFromParts(r)}var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=s.normalizePath(a.path),s.buildURLFromParts(a)):t;var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=i.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=o.netLoc,"/"!==a.path[0]))if(a.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=s.normalizePath(d)}else u.path=o.path,a.params||(u.params=o.params,a.query||(u.query=o.query));return null===u.path&&(u.path=n.alwaysNormalize?s.normalizePath(a.path):a.path),s.buildURLFromParts(u)},parseURL:function(e){var t=r.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(a,"");e.length!==(e=e.replace(o,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=s},"./node_modules/webworkify-webpack/index.js":
/*!**************************************************!*\
!*** ./node_modules/webworkify-webpack/index.js ***!
\**************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */function(e,t,n){function r(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n.oe=function(e){throw console.error(e),e};var r=n(n.s=ENTRY_MODULE);return r.default||r}function i(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(e,t,r){var a={};a[r]=[];var o=t.toString(),s=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!s)return a;for(var l,u=s[1],c=new RegExp("(\\\\n|\\W)"+i(u)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");l=c.exec(o);)"dll-reference"!==l[3]&&a[r].push(l[3]);for(c=new RegExp("\\("+i(u)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");l=c.exec(o);)e[l[2]]||(a[r].push(l[1]),e[l[2]]=n(l[1]).m),a[l[2]]=a[l[2]]||[],a[l[2]].push(l[4]);for(var d,f=Object.keys(a),h=0;h<f.length;h++)for(var p=0;p<a[f[h]].length;p++)d=a[f[h]][p],isNaN(1*d)||(a[f[h]][p]=1*a[f[h]][p]);return a}function o(e){return Object.keys(e).reduce((function(t,n){return t||e[n].length>0}),!1)}e.exports=function(e,t){t=t||{};var i={main:n.m},s=t.all?{main:Object.keys(i.main)}:function(e,t){for(var n={main:[t]},r={main:[]},i={main:{}};o(n);)for(var s=Object.keys(n),l=0;l<s.length;l++){var u=s[l],c=n[u].pop();if(i[u]=i[u]||{},!i[u][c]&&e[u][c]){i[u][c]=!0,r[u]=r[u]||[],r[u].push(c);for(var d=a(e,e[u][c],u),f=Object.keys(d),h=0;h<f.length;h++)n[f[h]]=n[f[h]]||[],n[f[h]]=n[f[h]].concat(d[f[h]])}}return r}(i,e),l="";Object.keys(s).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;s[e][t];)t++;s[e].push(t),i[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",l=l+"var "+e+" = ("+r.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s[e].map((function(t){return JSON.stringify(t)+": "+i[e][t].toString()})).join(",")+"});\n"})),l=l+"new (("+r.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s.main.map((function(e){return JSON.stringify(e)+": "+i.main[e].toString()})).join(",")+"}))(self);";var u=new window.Blob([l],{type:"text/javascript"});if(t.bare)return u;var c=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(u),d=new window.Worker(c);return d.objectURL=c,d}},"./src/crypt/decrypter.js":
/*!********************************************!*\
!*** ./src/crypt/decrypter.js + 3 modules ***!
\********************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/hls.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/hls.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/hls.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/hls.ts */function(e,t,n){"use strict";n.r(t);var r=function(){function e(e,t){this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),i=function(){function e(e,t){this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}(),a=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],u=s[1],c=s[2],d=s[3],f=new Uint32Array(256),h=0,p=0,m=0;for(m=0;m<256;m++)f[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,e[h]=g,t[g]=h;var y=f[h],v=f[y],b=f[v],_=257*f[g]^16843008*g;r[h]=_<<24|_>>>8,i[h]=_<<16|_>>>16,a[h]=_<<8|_>>>24,o[h]=_,_=16843009*b^65537*v^257*y^16843008*h,l[g]=_<<24|_>>>8,u[g]=_<<16|_>>>16,c[g]=_<<8|_>>>24,d[g]=_,h?(h=y^f[f[f[b^y]]],p^=f[f[p]]):h=p=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r<t.length&&n;)n=t[r]===this.key[r],r++;if(!n){this.key=t;var i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var a,o,s,l,u=this.ksRows=4*(i+6+1),c=this.keySchedule=new Uint32Array(u),d=this.invKeySchedule=new Uint32Array(u),f=this.sBox,h=this.rcon,p=this.invSubMix,m=p[0],g=p[1],y=p[2],v=p[3];for(a=0;a<u;a++)a<i?s=c[a]=t[a]:(l=s,a%i==0?(l=f[(l=l<<8|l>>>24)>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l],l^=h[a/i|0]<<24):i>6&&a%i==4&&(l=f[l>>>24]<<24|f[l>>>16&255]<<16|f[l>>>8&255]<<8|f[255&l]),c[a]=s=(c[a-i]^l)>>>0);for(o=0;o<u;o++)a=u-o,l=3&o?c[a]:c[a-4],d[o]=o<4||a<=4?l:m[f[l>>>24]]^g[f[l>>>16&255]]^y[f[l>>>8&255]]^v[f[255&l]],d[o]=d[o]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,n,r){for(var i,a,o,s,l,u,c,d,f,h,p,m,g,y,v,b,_,A=this.keySize+6,E=this.invKeySchedule,T=this.invSBox,w=this.invSubMix,S=w[0],k=w[1],C=w[2],x=w[3],R=this.uint8ArrayToUint32Array_(n),L=R[0],I=R[1],P=R[2],j=R[3],O=new Int32Array(e),D=new Int32Array(O.length),M=this.networkToHostOrderSwap;t<O.length;){for(f=M(O[t]),h=M(O[t+1]),p=M(O[t+2]),m=M(O[t+3]),l=f^E[0],u=m^E[1],c=p^E[2],d=h^E[3],g=4,y=1;y<A;y++)i=S[l>>>24]^k[u>>16&255]^C[c>>8&255]^x[255&d]^E[g],a=S[u>>>24]^k[c>>16&255]^C[d>>8&255]^x[255&l]^E[g+1],o=S[c>>>24]^k[d>>16&255]^C[l>>8&255]^x[255&u]^E[g+2],s=S[d>>>24]^k[l>>16&255]^C[u>>8&255]^x[255&c]^E[g+3],l=i,u=a,c=o,d=s,g+=4;i=T[l>>>24]<<24^T[u>>16&255]<<16^T[c>>8&255]<<8^T[255&d]^E[g],a=T[u>>>24]<<24^T[c>>16&255]<<16^T[d>>8&255]<<8^T[255&l]^E[g+1],o=T[c>>>24]<<24^T[d>>16&255]<<16^T[l>>8&255]<<8^T[255&u]^E[g+2],s=T[d>>>24]<<24^T[l>>16&255]<<16^T[u>>8&255]<<8^T[255&c]^E[g+3],g+=3,D[t]=M(i^L),D[t+1]=M(s^I),D[t+2]=M(o^P),D[t+3]=M(a^j),L=f,I=h,P=p,j=m,t+=4}return r?(v=D.buffer,b=v.byteLength,(_=b&&new DataView(v).getUint8(b-1))?v.slice(0,b-_):v):D.buffer},t.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},e}(),o=n("./src/errors.ts"),s=n("./src/utils/logger.js"),l=n("./src/events.js"),u=n("./src/utils/get-self-scope.js"),c=Object(u.getSelfScope)(),d=function(){function e(e,t,n){var r=(void 0===n?{}:n).removePKCS7Padding,i=void 0===r||r;if(this.logEnabled=!0,this.observer=e,this.config=t,this.removePKCS7Padding=i,i)try{var a=c.crypto;a&&(this.subtle=a.subtle||a.webkitSubtle)}catch(e){}this.disableWebCrypto=!this.subtle}var t=e.prototype;return t.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},t.decrypt=function(e,t,n,o){var l=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(s.logger.log("JS AES decrypt"),this.logEnabled=!1);var u=this.decryptor;u||(this.decryptor=u=new a),u.expandKey(t),o(u.decrypt(e,0,n,this.removePKCS7Padding))}else{this.logEnabled&&(s.logger.log("WebCrypto AES decrypt"),this.logEnabled=!1);var c=this.subtle;this.key!==t&&(this.key=t,this.fastAesKey=new i(c,t)),this.fastAesKey.expandKey().then((function(i){new r(c,n).decrypt(e,i).catch((function(r){l.onWebCryptoError(r,e,t,n,o)})).then((function(e){o(e)}))})).catch((function(r){l.onWebCryptoError(r,e,t,n,o)}))}},t.onWebCryptoError=function(e,t,n,r,i){this.config.enableSoftwareAES?(s.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(t,n,r,i)):(s.logger.error("decrypting error : "+e.message),this.observer.trigger(l.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:e.message}))},t.destroy=function(){var e=this.decryptor;e&&(e.destroy(),this.decryptor=void 0)},e}();t.default=d},"./src/demux/demuxer-inline.js":
/*!**************************************************!*\
!*** ./src/demux/demuxer-inline.js + 12 modules ***!
\**************************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/hls.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/hls.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/hls.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/hls.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/hls.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number-isFinite.js because of ./src/hls.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/hls.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/hls.ts */function(e,t,n){"use strict";n.r(t);var r=n("./src/events.js"),i=n("./src/errors.ts"),a=n("./src/crypt/decrypter.js"),o=n("./src/polyfills/number-isFinite.js"),s=n("./src/utils/logger.js"),l=n("./src/utils/get-self-scope.js");function u(e,t){return 255===e[t]&&240==(246&e[t+1])}function c(e,t){return 1&e[t+1]?7:9}function d(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function f(e,t){return!!(t+1<e.length&&u(e,t))}function h(e,t){if(f(e,t)){var n=c(e,t);t+5<e.length&&(n=d(e,t));var r=t+n;if(r===e.length||r+1<e.length&&u(e,r))return!0}return!1}function p(e,t,n,a,o){if(!e.samplerate){var l=function(e,t,n,a){var o,l,u,c,d,f=navigator.userAgent.toLowerCase(),h=a,p=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(o=1+((192&t[n+2])>>>6),!((l=(60&t[n+2])>>>2)>p.length-1))return c=(1&t[n+2])<<2,c|=(192&t[n+3])>>>6,s.logger.log("manifest codec:"+a+",ADTS data:type:"+o+",sampleingIndex:"+l+"["+p[l]+"Hz],channelConfig:"+c),/firefox/i.test(f)?l>=6?(o=5,d=new Array(4),u=l-3):(o=2,d=new Array(2),u=l):-1!==f.indexOf("android")?(o=2,d=new Array(2),u=l):(o=5,d=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&l>=6?u=l-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(l>=6&&1===c||/vivaldi/i.test(f))||!a&&1===c)&&(o=2,d=new Array(2)),u=l)),d[0]=o<<3,d[0]|=(14&l)>>1,d[1]|=(1&l)<<7,d[1]|=c<<3,5===o&&(d[1]|=(14&u)>>1,d[2]=(1&u)<<7,d[2]|=8,d[3]=0),{config:d,samplerate:p[l],channelCount:c,codec:"mp4a.40."+o,manifestCodec:h};e.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}(t,n,a,o);e.config=l.config,e.samplerate=l.samplerate,e.channelCount=l.channelCount,e.codec=l.codec,e.manifestCodec=l.manifestCodec,s.logger.log("parsed codec:"+e.codec+",rate:"+l.samplerate+",nb channel:"+l.channelCount)}}function m(e){return 9216e4/e}function g(e,t,n,r,i){var a=function(e,t,n,r,i){var a,o,s=e.length;if(a=c(e,t),o=d(e,t),(o-=a)>0&&t+a+o<=s)return{headerLength:a,frameLength:o,stamp:n+r*i}}(t,n,r,i,m(e.samplerate));if(a){var o=a.stamp,s=a.headerLength,l=a.frameLength,u={unit:t.subarray(n+s,n+s+l),pts:o,dts:o};return e.samples.push(u),{sample:u,length:l+s}}}var y=n("./src/demux/id3.js"),v=function(){function e(e,t,n){this.observer=e,this.config=n,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,n,r){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:t,duration:r,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){if(!e)return!1;for(var t=(y.default.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(h(e,t))return s.logger.log("ADTS sync word found !"),!0;return!1},t.append=function(e,t,n,r){for(var i=this._audioTrack,a=y.default.getID3Data(e,0)||[],l=y.default.getTimeStamp(a),u=Object(o.isFiniteNumber)(l)?90*l:9e4*t,c=0,d=u,h=e.length,m=a.length,v=[{pts:d,dts:d,data:a}];m<h-1;)if(f(e,m)&&m+5<h){p(i,this.observer,e,m,i.manifestCodec);var b=g(i,e,m,u,c);if(!b){s.logger.log("Unable to parse AAC frame");break}m+=b.length,d=b.sample.pts,c++}else y.default.isHeader(e,m)?(a=y.default.getID3Data(e,m),v.push({pts:d,dts:d,data:a}),m+=a.length):m++;this.remuxer.remux(i,{samples:[]},{samples:v,inputTimeScale:9e4},{samples:[]},t,n,r)},t.destroy=function(){},e}(),b=n("./src/demux/mp4demuxer.js"),_={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(e,t,n,r,i){if(!(n+24>t.length)){var a=this.parseHeader(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength}}}},parseHeader:function(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,a=e[t+2]>>2&3,o=e[t+2]>>1&1;if(1!==n&&0!==i&&15!==i&&3!==a){var s=3===n?3-r:3===r?3:4,l=1e3*_.BitratesMap[14*s+i-1],u=3===n?0:2===n?1:2,c=_.SamplingRateMap[3*u+a],d=e[t+3]>>6==3?1:2,f=_.SamplesCoefficients[n][r],h=_.BytesInSlot[r],p=8*f*h;return{sampleRate:c,channelCount:d,frameLength:parseInt(f*l/c+o,10)*h,samplesPerFrame:p}}},isHeaderPattern:function(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])},isHeader:function(e,t){return!!(t+1<e.length&&this.isHeaderPattern(e,t))},probe:function(e,t){if(t+1<e.length&&this.isHeaderPattern(e,t)){var n=this.parseHeader(e,t),r=4;n&&n.frameLength&&(r=n.frameLength);var i=t+r;if(i===e.length||i+1<e.length&&this.isHeaderPattern(e,i))return!0}return!1}},A=_,E=function(){function e(e){this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},t.skipBits=function(e){var t;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)>>3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;return e>32&&s.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0?this.word<<=t:this.bytesAvailable>0&&this.loadWord(),(t=e-t)>0&&this.bitsAvailable?n<<t|this.readBits(t):n},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){var t,n=8,r=8;for(t=0;t<e;t++)0!==r&&(r=(n+this.readEG()+256)%256),n=0===r?n:r},t.readSPS=function(){var e,t,n,r,i,a,o,s=0,l=0,u=0,c=0,d=this.readUByte.bind(this),f=this.readBits.bind(this),h=this.readUEG.bind(this),p=this.readBoolean.bind(this),m=this.skipBits.bind(this),g=this.skipEG.bind(this),y=this.skipUEG.bind(this),v=this.skipScalingList.bind(this);if(d(),e=d(),f(5),m(3),d(),y(),100===e||110===e||122===e||244===e||44===e||83===e||86===e||118===e||128===e){var b=h();if(3===b&&m(1),y(),y(),m(1),p())for(a=3!==b?8:12,o=0;o<a;o++)p()&&v(o<6?16:64)}y();var _=h();if(0===_)h();else if(1===_)for(m(1),g(),g(),t=h(),o=0;o<t;o++)g();y(),m(1),n=h(),r=h(),0===(i=f(1))&&m(1),m(1),p()&&(s=h(),l=h(),u=h(),c=h());var A=[1,1];if(p()&&p())switch(d()){case 1:A=[1,1];break;case 2:A=[12,11];break;case 3:A=[10,11];break;case 4:A=[16,11];break;case 5:A=[40,33];break;case 6:A=[24,11];break;case 7:A=[20,11];break;case 8:A=[32,11];break;case 9:A=[80,33];break;case 10:A=[18,11];break;case 11:A=[15,11];break;case 12:A=[64,33];break;case 13:A=[160,99];break;case 14:A=[4,3];break;case 15:A=[3,2];break;case 16:A=[2,1];break;case 255:A=[d()<<8|d(),d()<<8|d()]}return{width:Math.ceil(16*(n+1)-2*s-2*l),height:(2-i)*(r+1)*16-(i?2:4)*(u+c),pixelRatio:A}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}(),T=function(){function e(e,t,n,r){this.decryptdata=n,this.discardEPB=r,this.decrypter=new a.default(e,t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e,t){this.decrypter.decrypt(e,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,t)},t.decryptAacSample=function(e,t,n,r){var i=e[t].unit,a=i.subarray(16,i.length-i.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length),s=this;this.decryptBuffer(o,(function(a){a=new Uint8Array(a),i.set(a,16),r||s.decryptAacSamples(e,t+1,n)}))},t.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32)){var r=this.decrypter.isSync();if(this.decryptAacSample(e,t,n,r),!r)return}}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<=e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){t=new Uint8Array(t);for(var n=0,r=32;r<=e.length-16;r+=160,n+=16)e.set(t.subarray(n,n+16),r);return e},t.decryptAvcSample=function(e,t,n,r,i,a){var o=this.discardEPB(i.data),s=this.getAvcEncryptedData(o),l=this;this.decryptBuffer(s.buffer,(function(s){i.data=l.getAvcDecryptedUnit(o,s),a||l.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.length<=48||1!==a.type&&5!==a.type)){var o=this.decrypter.isSync();if(this.decryptAvcSample(e,t,n,r,a,o),!o)return}}}},e}(),w={video:1,audio:2,id3:3,text:4},S=function(){function e(e,t,n,r){this.observer=e,this.config=n,this.typeSupported=r,this.remuxer=t,this.sampleAes=null}var t=e.prototype;return t.setDecryptData=function(e){null!=e&&null!=e.key&&"SAMPLE-AES"===e.method?this.sampleAes=new T(this.observer,this.config,e,this.discardEPB):this.sampleAes=null},e.probe=function(t){var n=e._syncOffset(t);return!(n<0||(n&&s.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n+", junk ahead ?"),0))},e._syncOffset=function(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71===e[n]&&71===e[n+188]&&71===e[n+376])return n;n++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:w[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:"video"===e?0:void 0,isAAC:"audio"===e||void 0,duration:"audio"===e?t:void 0}},t.resetInitSegment=function(t,n,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video",i),this._audioTrack=e.createTrack("audio",i),this._id3Track=e.createTrack("id3",i),this._txtTrack=e.createTrack("text",i),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=n,this.videoCodec=r,this._duration=i},t.resetTimeStamp=function(){},t.append=function(t,n,a,o){var l,u,c,d,f,h=t.length,p=!1;this.contiguous=a;var m=this.pmtParsed,g=this._avcTrack,y=this._audioTrack,v=this._id3Track,b=g.pid,_=y.pid,A=v.pid,E=this._pmtId,T=g.pesData,w=y.pesData,S=v.pesData,k=this._parsePAT,C=this._parsePMT,x=this._parsePES,R=this._parseAVCPES.bind(this),L=this._parseAACPES.bind(this),I=this._parseMPEGPES.bind(this),P=this._parseID3PES.bind(this),j=e._syncOffset(t);for(h-=(h+j)%188,l=j;l<h;l+=188)if(71===t[l]){if(u=!!(64&t[l+1]),c=((31&t[l+1])<<8)+t[l+2],(48&t[l+3])>>4>1){if((d=l+5+t[l+4])===l+188)continue}else d=l+4;switch(c){case b:u&&(T&&(f=x(T))&&R(f,!1),T={data:[],size:0}),T&&(T.data.push(t.subarray(d,l+188)),T.size+=l+188-d);break;case _:u&&(w&&(f=x(w))&&(y.isAAC?L(f):I(f)),w={data:[],size:0}),w&&(w.data.push(t.subarray(d,l+188)),w.size+=l+188-d);break;case A:u&&(S&&(f=x(S))&&P(f),S={data:[],size:0}),S&&(S.data.push(t.subarray(d,l+188)),S.size+=l+188-d);break;case 0:u&&(d+=t[d]+1),E=this._pmtId=k(t,d);break;case E:u&&(d+=t[d]+1);var O=C(t,d,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=O.avc)>0&&(g.pid=b),(_=O.audio)>0&&(y.pid=_,y.isAAC=O.isAAC),(A=O.id3)>0&&(v.pid=A),p&&!m&&(s.logger.log("reparse from beginning"),p=!1,l=j-188),m=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});T&&(f=x(T))?(R(f,!0),g.pesData=null):g.pesData=T,w&&(f=x(w))?(y.isAAC?L(f):I(f),y.pesData=null):(w&&w.size&&s.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=w),S&&(f=x(S))?(P(f),v.pesData=null):v.pesData=S,null==this.sampleAes?this.remuxer.remux(y,g,v,this._txtTrack,n,a,o):this.decryptAndRemux(y,g,v,this._txtTrack,n,a,o)},t.decryptAndRemux=function(e,t,n,r,i,a,o){if(e.samples&&e.isAAC){var s=this;this.sampleAes.decryptAacSamples(e.samples,0,(function(){s.decryptAndRemuxAvc(e,t,n,r,i,a,o)}))}else this.decryptAndRemuxAvc(e,t,n,r,i,a,o)},t.decryptAndRemuxAvc=function(e,t,n,r,i,a,o){if(t.samples){var s=this;this.sampleAes.decryptAvcSamples(t.samples,0,0,(function(){s.remuxer.remux(e,t,n,r,i,a,o)}))}else this.remuxer.remux(e,t,n,r,i,a,o)},t.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},t._parsePAT=function(e,t){return(31&e[t+10])<<8|e[t+11]},t._parsePMT=function(e,t,n,r){var i,a,o={audio:-1,avc:-1,id3:-1,isAAC:!0};for(i=t+3+((15&e[t+1])<<8|e[t+2])-4,t+=12+((15&e[t+10])<<8|e[t+11]);t<i;){switch(a=(31&e[t+1])<<8|e[t+2],e[t]){case 207:if(!r){s.logger.log("unknown stream type:"+e[t]);break}case 15:-1===o.audio&&(o.audio=a);break;case 21:-1===o.id3&&(o.id3=a);break;case 219:if(!r){s.logger.log("unknown stream type:"+e[t]);break}case 27:-1===o.avc&&(o.avc=a);break;case 3:case 4:n?-1===o.audio&&(o.audio=a,o.isAAC=!1):s.logger.log("MPEG audio found, not supported in this browser for now");break;case 36:s.logger.warn("HEVC stream type found, not supported for now");break;default:s.logger.log("unknown stream type:"+e[t])}t+=5+((15&e[t+3])<<8|e[t+4])}return o},t._parsePES=function(e){var t,n,r,i,a,o,l,u,c=0,d=e.data;if(!e||0===e.size)return null;for(;d[0].length<19&&d.length>1;){var f=new Uint8Array(d[0].length+d[1].length);f.set(d[0]),f.set(d[1],d[0].length),d[0]=f,d.splice(1,1)}if(1===((t=d[0])[0]<<16)+(t[1]<<8)+t[2]){if((r=(t[4]<<8)+t[5])&&r>e.size-6)return null;if(192&(n=t[7])&&((o=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2)>4294967295&&(o-=8589934592),64&n?((l=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>4294967295&&(l-=8589934592),o-l>54e5&&(s.logger.warn(Math.round((o-l)/9e4)+"s delta between PTS and DTS, align them"),o=l)):l=o),u=(i=t[8])+9,e.size<=u)return null;e.size-=u,a=new Uint8Array(e.size);for(var h=0,p=d.length;h<p;h++){var m=(t=d[h]).byteLength;if(u){if(u>m){u-=m;continue}t=t.subarray(u),m-=u,u=0}a.set(t,c),c+=m}return r&&(r-=i+3),{data:a,pts:o,dts:l,len:r}}return null},t.pushAccesUnit=function(e,t){if(e.units.length&&e.frame){var n=t.samples,r=n.length;if(isNaN(e.pts)){if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===e.key||t.sps&&(r||this.contiguous)?(e.id=r,n.push(e)):t.dropped++}e.debug.length&&s.logger.log(e.pts+"/"+e.dts+":"+e.debug)},t._parseAVCPES=function(e,t){var n,r,i,a=this,o=this._avcTrack,s=this._parseAVCNALu(e.data),l=this.avcSample,u=!1,c=this.pushAccesUnit.bind(this),d=function(e,t,n,r){return{key:e,pts:t,dts:n,units:[],debug:r}};e.data=null,l&&s.length&&!o.audFound&&(c(l,o),l=this.avcSample=d(!1,e.pts,e.dts,"")),s.forEach((function(t){switch(t.type){case 1:r=!0,l||(l=a.avcSample=d(!0,e.pts,e.dts,"")),l.frame=!0;var s=t.data;if(u&&s.length>4){var f=new E(s).readSliceType();2!==f&&4!==f&&7!==f&&9!==f||(l.key=!0)}break;case 5:r=!0,l||(l=a.avcSample=d(!0,e.pts,e.dts,"")),l.key=!0,l.frame=!0;break;case 6:r=!0,(n=new E(a.discardEPB(t.data))).readUByte();for(var h=0,p=0,m=!1,g=0;!m&&n.bytesAvailable>1;){h=0;do{h+=g=n.readUByte()}while(255===g);p=0;do{p+=g=n.readUByte()}while(255===g);if(4===h&&0!==n.bytesAvailable){if(m=!0,181===n.readUByte()&&49===n.readUShort()&&1195456820===n.readUInt()&&3===n.readUByte()){var v=n.readUByte(),b=31&v,_=[v,n.readUByte()];for(i=0;i<b;i++)_.push(n.readUByte()),_.push(n.readUByte()),_.push(n.readUByte());a._insertSampleInOrder(a._txtTrack.samples,{type:3,pts:e.pts,bytes:_})}}else if(5===h&&0!==n.bytesAvailable){if(m=!0,p>16){var A=[];for(i=0;i<16;i++)A.push(n.readUByte().toString(16)),3!==i&&5!==i&&7!==i&&9!==i||A.push("-");var T=p-16,w=new Uint8Array(T);for(i=0;i<T;i++)w[i]=n.readUByte();a._insertSampleInOrder(a._txtTrack.samples,{pts:e.pts,payloadType:h,uuid:A.join(""),userDataBytes:w,userData:Object(y.utf8ArrayToStr)(w.buffer)})}}else if(p<n.bytesAvailable)for(i=0;i<p;i++)n.readUByte()}break;case 7:if(r=!0,u=!0,!o.sps){var S=(n=new E(t.data)).readSPS();o.width=S.width,o.height=S.height,o.pixelRatio=S.pixelRatio,o.sps=[t.data],o.duration=a._duration;var k=t.data.subarray(1,4),C="avc1.";for(i=0;i<3;i++){var x=k[i].toString(16);x.length<2&&(x="0"+x),C+=x}o.codec=C}break;case 8:r=!0,o.pps||(o.pps=[t.data]);break;case 9:r=!1,o.audFound=!0,l&&c(l,o),l=a.avcSample=d(!1,e.pts,e.dts,"");break;case 12:r=!1;break;default:r=!1,l&&(l.debug+="unknown NAL "+t.type+" ")}l&&r&&l.units.push(t)})),t&&l&&(c(l,o),this.avcSample=null)},t._insertSampleInOrder=function(e,t){var n=e.length;if(n>0){if(t.pts>=e[n-1].pts)e.push(t);else for(var r=n-1;r>=0;r--)if(t.pts<e[r].pts){e.splice(r,0,t);break}}else e.push(t)},t._getLastNalUnit=function(){var e,t=this.avcSample;if(!t||0===t.units.length){var n=this._avcTrack.samples;t=n[n.length-1]}if(t){var r=t.units;e=r[r.length-1]}return e},t._parseAVCNALu=function(e){var t,n,r,i,a=0,o=e.byteLength,s=this._avcTrack,l=s.naluState||0,u=l,c=[],d=-1;for(-1===l&&(d=0,i=31&e[0],l=0,a=1);a<o;)if(t=e[a++],l)if(1!==l)if(t)if(1===t){if(d>=0)r={data:e.subarray(d,a-l-1),type:i},c.push(r);else{var f=this._getLastNalUnit();if(f&&(u&&a<=4-u&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-u)),(n=a-l-1)>0)){var h=new Uint8Array(f.data.byteLength+n);h.set(f.data,0),h.set(e.subarray(0,n),f.data.byteLength),f.data=h}}a<o?(d=a,i=31&e[a],l=0):l=-1}else l=0;else l=3;else l=t?0:2;else l=t?0:1;if(d>=0&&l>=0&&(r={data:e.subarray(d,o),type:i,state:l},c.push(r)),0===c.length){var p=this._getLastNalUnit();if(p){var m=new Uint8Array(p.data.byteLength+e.byteLength);m.set(p.data,0),m.set(e,p.data.byteLength),p.data=m}}return s.naluState=l,c},t.discardEPB=function(e){for(var t,n,r=e.byteLength,i=[],a=1;a<r-2;)0===e[a]&&0===e[a+1]&&3===e[a+2]?(i.push(a+2),a+=2):a++;if(0===i.length)return e;t=r-i.length,n=new Uint8Array(t);var o=0;for(a=0;a<t;o++,a++)o===i[0]&&(o++,i.shift()),n[a]=e[o];return n},t._parseAACPES=function(e){var t,n,a,o,l,u,c,d=this._audioTrack,h=e.data,y=e.pts,v=this.aacOverFlow,b=this.aacLastPTS;if(v){var _=new Uint8Array(v.byteLength+h.byteLength);_.set(v,0),_.set(h,v.byteLength),h=_}for(a=0,l=h.length;a<l-1&&!f(h,a);a++);if(!a||(a<l-1?(u="AAC PES did not start with ADTS header,offset:"+a,c=!1):(u="no ADTS header found in AAC PES",c=!0),s.logger.warn("parsing error:"+u),this.observer.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:c,reason:u}),!c)){if(p(d,this.observer,h,a,this.audioCodec),n=0,t=m(d.samplerate),v&&b){var A=b+t;Math.abs(A-y)>1&&(s.logger.log("AAC: align PTS for overlapping frames by "+Math.round((A-y)/90)),y=A)}for(;a<l;){if(f(h,a)){if(a+5<l){var E=g(d,h,a,y,n);if(E){a+=E.length,o=E.sample.pts,n++;continue}}break}a++}v=a<l?h.subarray(a,l):null,this.aacOverFlow=v,this.aacLastPTS=o}},t._parseMPEGPES=function(e){for(var t=e.data,n=t.length,r=0,i=0,a=e.pts;i<n;)if(A.isHeader(t,i)){var o=A.appendFrame(this._audioTrack,t,i,a,r);if(!o)break;i+=o.length,r++}else i++},t._parseID3PES=function(e){this._id3Track.samples.push(e)},e}(),k=function(){function e(e,t,n){this.observer=e,this.config=n,this.remuxer=t}var t=e.prototype;return t.resetInitSegment=function(e,t,n,r){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:t,duration:r,inputTimeScale:9e4}},t.resetTimeStamp=function(){},e.probe=function(e){var t,n,r=y.default.getID3Data(e,0);if(r&&void 0!==y.default.getTimeStamp(r))for(t=r.length,n=Math.min(e.length-1,t+100);t<n;t++)if(A.probe(e,t))return s.logger.log("MPEG Audio sync word found !"),!0;return!1},t.append=function(e,t,n,r){for(var i=y.default.getID3Data(e,0),a=y.default.getTimeStamp(i),o=a?90*a:9e4*t,s=i.length,l=e.length,u=0,c=0,d=this._audioTrack,f=[{pts:o,dts:o,data:i}];s<l;)if(A.isHeader(e,s)){var h=A.appendFrame(d,e,s,o,u);if(!h)break;s+=h.length,c=h.sample.pts,u++}else y.default.isHeader(e,s)?(i=y.default.getID3Data(e,s),f.push({pts:c,dts:c,data:i}),s+=i.length):s++;this.remuxer.remux(d,{samples:[]},{samples:f,inputTimeScale:9e4},{samples:[]},t,n,r)},t.destroy=function(){},e}(),C=function(){function e(){}return e.getSilentFrame=function(e,t){switch(e){case"mp4a.40.2":if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}(),x=Math.pow(2,32)-1,R=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=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]),r=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]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t,n=Array.prototype.slice.call(arguments,1),r=8,i=n.length,a=i;i--;)r+=n[i].byteLength;for((t=new Uint8Array(r))[0]=r>>24&255,t[1]=r>>16&255,t[2]=r>>8&255,t[3]=255&r,t.set(e,4),i=0,r=8;i<a;i++)t.set(n[i],r),r+=n[i].byteLength;return t},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var r=Math.floor(n/(x+1)),i=Math.floor(n%(x+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var r=Math.floor(n/(x+1)),i=Math.floor(n%(x+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,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 e.box(e.types.mvhd,a)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,a[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return e.box(e.types.sdtp,a)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,r,i,a=[],o=[];for(n=0;n<t.sps.length;n++)i=(r=t.sps[n]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n<t.pps.length;n++)i=(r=t.pps[n]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,u=t.height,c=t.pixelRatio[0],d=t.pixelRatio[1];return e.box(e.types.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,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,d>>24,d>>16&255,d>>8&255,255&d])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?t.isAAC||"mp3"!==t.codec?e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,r=t.duration*t.timescale,i=t.width,a=t.height,o=Math.floor(r/(x+1)),s=Math.floor(r%(x+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,a>>8&255,255&a,0,0]))},e.traf=function(t,n){var r=e.sdtp(t),i=t.id,a=Math.floor(n/(x+1)),o=Math.floor(n%(x+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o])),e.trun(t,r.length+16+20+8+16+8+8),r)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,u=t.samples||[],c=u.length,d=12+16*c,f=new Uint8Array(d);for(n+=8+d,f.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<c;r++)a=(i=u[r]).duration,o=i.size,s=i.flags,l=i.cts,f.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,f)},e.initSegment=function(t){e.types||e.init();var n,r=e.moov(t);return(n=new Uint8Array(e.FTYP.byteLength+r.byteLength)).set(e.FTYP),n.set(r,e.FTYP.byteLength),n},e}();function L(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=e*t*n;return r?Math.round(i):i}function I(e,t){return void 0===t&&(t=!1),L(e,1e3,1/9e4,t)}function P(e,t){return void 0===t&&(t=1),L(e,9e4,1/t)}var j,O=P(10),D=P(.2),M=function(){function e(e,t,n,r){this.observer=e,this.config=t,this.typeSupported=n;var i=navigator.userAgent;this.isSafari=r&&r.indexOf("Apple")>-1&&i&&!i.match("CriOS"),this.ISGenerated=!1}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this._initPTS=this._initDTS=e},t.resetInitSegment=function(){this.ISGenerated=!1},t.remux=function(e,t,n,i,a,o,l){if(this.ISGenerated||this.generateIS(e,t,a),this.ISGenerated){var u=e.samples.length,c=t.samples.length,d=a,f=a;if(u&&c){var h=(e.samples[0].pts-t.samples[0].pts)/t.inputTimeScale;d+=Math.max(0,h),f+=Math.max(0,-h)}if(u){e.timescale||(s.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(e,t,a));var p,m=this.remuxAudio(e,d,o,l);c&&(m&&(p=m.endPTS-m.startPTS),t.timescale||(s.logger.warn("regenerate InitSegment as video detected"),this.generateIS(e,t,a)),this.remuxVideo(t,f,o,p,l))}else if(c){var g=this.remuxVideo(t,f,o,0,l);g&&e.codec&&this.remuxEmptyAudio(e,d,o,g)}}n.samples.length&&this.remuxID3(n,a),i.samples.length&&this.remuxText(i,a),this.observer.trigger(r.default.FRAG_PARSED)},t.generateIS=function(e,t,n){var a,o,l=this.observer,u=e.samples,c=t.samples,d=this.typeSupported,f="audio/mp4",h={},p={tracks:h},m=void 0===this._initPTS;if(m&&(a=o=1/0),e.config&&u.length&&(e.timescale=e.samplerate,s.logger.log("audio sampling rate : "+e.samplerate),e.isAAC||(d.mpeg?(f="audio/mpeg",e.codec=""):d.mp3&&(e.codec="mp3")),h.audio={container:f,codec:e.codec,initSegment:!e.isAAC&&d.mpeg?new Uint8Array:R.initSegment([e]),metadata:{channelCount:e.channelCount}},m&&(a=o=u[0].pts-e.inputTimeScale*n)),t.sps&&t.pps&&c.length){var g=t.inputTimeScale;t.timescale=g,h.video={container:"video/mp4",codec:t.codec,initSegment:R.initSegment([t]),metadata:{width:t.width,height:t.height}},m&&(a=Math.min(a,c[0].pts-g*n),o=Math.min(o,c[0].dts-g*n),this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:a}))}Object.keys(h).length?(l.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,m&&(this._initPTS=a,this._initDTS=o)):l.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},t.remuxVideo=function(e,t,n,a,o){var l,u,c,d,f,h,p,m=8,g=e.timescale,y=e.samples,v=[],b=y.length,_=this._PTSNormalize,A=this._initPTS,E=this.nextAvcDts,T=this.isSafari;if(0!==b){T&&(n|=y.length&&E&&(o&&Math.abs(t-E/g)<.1||Math.abs(y[0].pts-E-A)<g/5)),n||(E=t*g),y.forEach((function(e){e.pts=_(e.pts-A,E),e.dts=_(e.dts-A,E)})),y.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r||e.id-t.id}));var w=y.reduce((function(e,t){return Math.max(Math.min(e,t.pts-t.dts),-1*D)}),0);if(w<0){s.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+I(w,!0)+" ms to overcome this issue");for(var S=0;S<y.length;S++)y[S].dts+=w}var k=y[0];f=Math.max(k.dts,0),d=Math.max(k.pts,0);var C=f-E;n&&C&&(C>1?s.logger.log("AVC: "+I(C,!0)+" ms hole between fragments detected,filling it"):C<-1&&s.logger.log("AVC: "+I(-C,!0)+" ms overlapping between fragments detected"),f=E,y[0].dts=f,d=Math.max(d-C,E),y[0].pts=d,s.logger.log("Video: PTS/DTS adjusted: "+I(d,!0)+"/"+I(f,!0)+", delta: "+I(C,!0)+" ms")),k=y[y.length-1],p=Math.max(k.dts,0),h=Math.max(k.pts,0,p),T&&(l=Math.round((p-f)/(y.length-1)));for(var x=0,L=0,P=0;P<b;P++){for(var j=y[P],O=j.units,M=O.length,N=0,U=0;U<M;U++)N+=O[U].data.length;L+=N,x+=M,j.length=N,j.dts=T?f+P*l:Math.max(j.dts,f),j.pts=Math.max(j.pts,j.dts)}var F=L+4*x+8;try{u=new Uint8Array(F)}catch(e){return void this.observer.trigger(r.default.ERROR,{type:i.ErrorTypes.MUX_ERROR,details:i.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:F,reason:"fail allocating video mdat "+F})}var B=new DataView(u.buffer);B.setUint32(0,F),u.set(R.types.mdat,4);for(var K=0;K<b;K++){for(var V=y[K],G=V.units,H=0,Y=void 0,z=0,W=G.length;z<W;z++){var $=G[z],q=$.data,X=$.data.byteLength;B.setUint32(m,X),m+=4,u.set(q,m),m+=X,H+=4+X}if(T)Y=Math.max(0,l*Math.round((V.pts-V.dts)/l));else{if(K<b-1)l=y[K+1].dts-V.dts;else{var J=this.config,Q=V.dts-y[K>0?K-1:K].dts;if(J.stretchShortVideoTrack){var Z=J.maxBufferHole,ee=Math.floor(Z*g),te=(a?d+a*g:this.nextAudioPts)-V.pts;te>ee?((l=te-Q)<0&&(l=Q),s.logger.log("It is approximately "+I(te,!1)+" ms to the next segment; using duration "+I(l,!1)+" ms for the last video frame.")):l=Q}else l=Q}Y=Math.round(V.pts-V.dts)}v.push({size:H,duration:l,cts:Y,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:V.key?2:1,isNonSync:V.key?0:1}})}this.nextAvcDts=p+l;var ne=e.dropped;if(e.nbNalu=0,e.dropped=0,v.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var re=v[0].flags;re.dependsOn=2,re.isNonSync=0}e.samples=v,c=R.moof(e.sequenceNumber++,f,e),e.samples=[];var ie={data1:c,data2:u,startPTS:d/g,endPTS:(h+l)/g,startDTS:f/g,endDTS:this.nextAvcDts/g,type:"video",hasAudio:!1,hasVideo:!0,nb:v.length,dropped:ne};return this.observer.trigger(r.default.FRAG_PARSING_DATA,ie),ie}},t.remuxAudio=function(e,t,n,a){var o,l,u,c,d,f,h=e.inputTimeScale,p=e.timescale,m=h/p,g=(e.isAAC?1024:1152)*m,y=this._PTSNormalize,v=this._initPTS,b=!e.isAAC&&this.typeSupported.mpeg,_=b?0:8,A=e.samples,E=[],T=this.nextAudioPts;if(n|=A.length&&T&&(a&&Math.abs(t-T/h)<.1||Math.abs(A[0].pts-T-v)<20*g),A.forEach((function(e){e.pts=e.dts=y(e.pts-v,t*h)})),0!==(A=A.filter((function(e){return e.pts>=0}))).length){if(n||(T=a?t*h:A[0].pts),e.isAAC)for(var w=this.config.maxAudioFramesDrift,S=0,k=T;S<A.length;){var x,L=A[S];if((x=L.pts-k)<=-w*g)s.logger.warn("Dropping 1 audio frame @ "+I(k,!0)+" ms due to "+I(x,!0)+" ms overlap."),A.splice(S,1);else if(x>=w*g&&x<O&&k){var P=Math.round(x/g);s.logger.warn("Injecting "+P+" audio frames @ "+I(k,!0)+" ms due to "+I(k,!0)+" ms gap.");for(var j=0;j<P;j++){var D=Math.max(k,0);(l=C.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(s.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),l=L.unit.subarray()),A.splice(S,0,{unit:l,pts:D,dts:D}),k+=g,S++}L.pts=L.dts=k,k+=g,S++}else Math.abs(x),L.pts=L.dts=k,k+=g,S++}for(var M=A.length,N=0;M--;)N+=A[M].unit.byteLength;for(var U=0,F=A.length;U<F;U++){var B=A[U],K=B.unit,V=B.pts;if(void 0!==f)o.duration=Math.round((V-f)/m);else{var G=V-T,H=0;if(n&&e.isAAC&&G){if(G>0&&G<O)H=Math.round((V-T)/g),s.logger.log(I(G,!0)+" ms hole between AAC samples detected,filling it"),H>0&&((l=C.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(l=K.subarray()),N+=H*l.length);else if(G<-12){s.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+I(T,!0)+" ms / "+I(V,!0)+" ms / "+I(-G,!0)+" ms"),N-=K.byteLength;continue}V=T}if(d=V,!(N>0))return;N+=_;try{u=new Uint8Array(N)}catch(e){return void this.observer.trigger(r.default.ERROR,{type:i.ErrorTypes.MUX_ERROR,details:i.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:N,reason:"fail allocating audio mdat "+N})}b||(new DataView(u.buffer).setUint32(0,N),u.set(R.types.mdat,4));for(var Y=0;Y<H;Y++)(l=C.getSilentFrame(e.manifestCodec||e.codec,e.channelCount))||(s.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),l=K.subarray()),u.set(l,_),_+=l.byteLength,o={size:l.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(o)}u.set(K,_);var z=K.byteLength;_+=z,o={size:z,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(o),f=V}var W=0;if((M=E.length)>=2&&(W=E[M-2].duration,o.duration=W),M){this.nextAudioPts=T=f+m*W,e.samples=E,c=b?new Uint8Array:R.moof(e.sequenceNumber++,d/m,e),e.samples=[];var $=d/h,q=T/h,X={data1:c,data2:u,startPTS:$,endPTS:q,startDTS:$,endDTS:q,type:"audio",hasAudio:!0,hasVideo:!1,nb:M};return this.observer.trigger(r.default.FRAG_PARSING_DATA,X),X}return null}},t.remuxEmptyAudio=function(e,t,n,r){var i=e.inputTimeScale,a=i/(e.samplerate?e.samplerate:i),o=this.nextAudioPts,l=(void 0!==o?o:r.startDTS*i)+this._initDTS,u=r.endDTS*i+this._initDTS,c=1024*a,d=Math.ceil((u-l)/c),f=C.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(s.logger.warn("remux empty Audio"),f){for(var h=[],p=0;p<d;p++){var m=l+p*c;h.push({unit:f,pts:m,dts:m})}e.samples=h,this.remuxAudio(e,t,n)}else s.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},t.remuxID3=function(e){var t,n=e.samples.length,i=e.inputTimeScale,a=this._initPTS,o=this._initDTS;if(n){for(var s=0;s<n;s++)(t=e.samples[s]).pts=(t.pts-a)/i,t.dts=(t.dts-o)/i;this.observer.trigger(r.default.FRAG_PARSING_METADATA,{samples:e.samples})}e.samples=[]},t.remuxText=function(e){e.samples.sort((function(e,t){return e.pts-t.pts}));var t,n=e.samples.length,i=e.inputTimeScale,a=this._initPTS;if(n){for(var o=0;o<n;o++)(t=e.samples[o]).pts=(t.pts-a)/i;this.observer.trigger(r.default.FRAG_PARSING_USERDATA,{samples:e.samples})}e.samples=[]},t._PTSNormalize=function(e,t){var n;if(void 0===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e},e}(),N=function(){function e(e){this.observer=e}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(){},t.resetInitSegment=function(){},t.remux=function(e,t,n,i,a,o,s,l){var u=this.observer,c="";e&&(c+="audio"),t&&(c+="video"),u.trigger(r.default.FRAG_PARSING_DATA,{data1:l,startPTS:a,startDTS:a,type:c,hasAudio:!!e,hasVideo:!!t,nb:1,dropped:0}),u.trigger(r.default.FRAG_PARSED)},e}(),U=Object(l.getSelfScope)();try{j=U.performance.now.bind(U.performance)}catch(e){s.logger.debug("Unable to use Performance API on this environment"),j=U.Date.now}var F=function(){function e(e,t,n,r){this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r}var t=e.prototype;return t.destroy=function(){var e=this.demuxer;e&&e.destroy()},t.push=function(e,t,n,i,o,s,l,u,c,d,f,h){var p=this;if(e.byteLength>0&&null!=t&&null!=t.key&&"AES-128"===t.method){var m=this.decrypter;null==m&&(m=this.decrypter=new a.default(this.observer,this.config));var g=j();m.decrypt(e,t.key.buffer,t.iv.buffer,(function(e){var a=j();p.observer.trigger(r.default.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:a}}),p.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),i,o,s,l,u,c,d,f,h)}))}else this.pushDecrypted(new Uint8Array(e),t,new Uint8Array(n),i,o,s,l,u,c,d,f,h)},t.pushDecrypted=function(e,t,n,a,o,s,l,u,c,d,f,h){var p=this.demuxer;if(!p||(l||u)&&!this.probe(e)){for(var m=this.observer,g=this.typeSupported,y=this.config,_=[{demux:S,remux:M},{demux:b.default,remux:N},{demux:v,remux:M},{demux:k,remux:M}],A=0,E=_.length;A<E;A++){var T=_[A],w=T.demux.probe;if(w(e)){var C=this.remuxer=new T.remux(m,y,g,this.vendor);p=new T.demux(m,C,y,g),this.probe=w;break}}if(!p)return void m.trigger(r.default.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=p}var x=this.remuxer;(l||u)&&(p.resetInitSegment(n,a,o,d),x.resetInitSegment()),l&&(p.resetTimeStamp(h),x.resetTimeStamp(h)),"function"==typeof p.setDecryptData&&p.setDecryptData(t),p.append(e,s,c,f)},e}();t.default=F},"./src/demux/demuxer-worker.js":
/*!*************************************!*\
!*** ./src/demux/demuxer-worker.js ***!
\*************************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./src/demux/demuxer.js (referenced with require.resolve) */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../demux/demuxer-inline */"./src/demux/demuxer-inline.js"),i=n(/*! ../events */"./src/events.js"),a=n(/*! ../utils/logger */"./src/utils/logger.js"),o=n(/*! eventemitter3 */"./node_modules/eventemitter3/index.js");t.default=function(e){var t=new o.EventEmitter;t.trigger=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e,e].concat(r))},t.off=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.removeListener.apply(t,[e].concat(r))};var n=function(t,n){e.postMessage({event:t,data:n})};e.addEventListener("message",(function(i){var o=i.data;switch(o.cmd){case"init":var s=JSON.parse(o.config);e.demuxer=new r.default(t,o.typeSupported,s,o.vendor),Object(a.enableLogs)(s.debug),n("init",null);break;case"demux":e.demuxer.push(o.data,o.decryptdata,o.initSegment,o.audioCodec,o.videoCodec,o.timeOffset,o.discontinuity,o.trackSwitch,o.contiguous,o.duration,o.accurateTimeOffset,o.defaultInitPTS)}})),t.on(i.default.FRAG_DECRYPTED,n),t.on(i.default.FRAG_PARSING_INIT_SEGMENT,n),t.on(i.default.FRAG_PARSED,n),t.on(i.default.ERROR,n),t.on(i.default.FRAG_PARSING_METADATA,n),t.on(i.default.FRAG_PARSING_USERDATA,n),t.on(i.default.INIT_PTS_FOUND,n),t.on(i.default.FRAG_PARSING_DATA,(function(t,n){var r=[],i={event:t,data:n};n.data1&&(i.data1=n.data1.buffer,r.push(n.data1.buffer),delete n.data1),n.data2&&(i.data2=n.data2.buffer,r.push(n.data2.buffer),delete n.data2),e.postMessage(i,r)}))}},"./src/demux/id3.js":
/*!**************************!*\
!*** ./src/demux/id3.js ***!
\**************************/
/*! exports provided: default, utf8ArrayToStr */function(e,t,n){"use strict";n.r(t),n.d(t,"utf8ArrayToStr",(function(){return s}));var r,i=n(/*! ../utils/get-self-scope */"./src/utils/get-self-scope.js"),a=function(){function e(){}return e.isHeader=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.isFooter=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},e.getID3Data=function(t,n){for(var r=n,i=0;e.isHeader(t,n);)i+=10,i+=e._readSize(t,n+6),e.isFooter(t,n+10)&&(i+=10),n+=i;if(i>0)return t.subarray(r,r+i)},e._readSize=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,n|=(127&e[t+2])<<7,n|=127&e[t+3]},e.getTimeStamp=function(t){for(var n=e.getID3Frames(t),r=0;r<n.length;r++){var i=n[r];if(e.isTimeStampFrame(i))return e._readTimeStamp(i)}},e.isTimeStampFrame=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},e._getFrameData=function(t){var n=String.fromCharCode(t[0],t[1],t[2],t[3]),r=e._readSize(t,4);return{type:n,size:r,data:t.subarray(10,10+r)}},e.getID3Frames=function(t){for(var n=0,r=[];e.isHeader(t,n);){for(var i=e._readSize(t,n+6),a=(n+=10)+i;n+8<a;){var o=e._getFrameData(t.subarray(n)),s=e._decodeFrame(o);s&&r.push(s),n+=o.size+10}e.isFooter(t,n)&&(n+=10)}return r},e._decodeFrame=function(t){return"PRIV"===t.type?e._decodePrivFrame(t):"T"===t.type[0]?e._decodeTextFrame(t):"W"===t.type[0]?e._decodeURLFrame(t):void 0},e._readTimeStamp=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},e._decodePrivFrame=function(t){if(!(t.size<2)){var n=e._utf8ArrayToStr(t.data,!0),r=new Uint8Array(t.data.subarray(n.length+1));return{key:t.type,info:n,data:r.buffer}}},e._decodeTextFrame=function(t){if(!(t.size<2)){if("TXXX"===t.type){var n=1,r=e._utf8ArrayToStr(t.data.subarray(n),!0);n+=r.length+1;var i=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:r,data:i}}var a=e._utf8ArrayToStr(t.data.subarray(1));return{key:t.type,data:a}}},e._decodeURLFrame=function(t){if("WXXX"===t.type){if(t.size<2)return;var n=1,r=e._utf8ArrayToStr(t.data.subarray(n));n+=r.length+1;var i=e._utf8ArrayToStr(t.data.subarray(n));return{key:t.type,info:r,data:i}}var a=e._utf8ArrayToStr(t.data);return{key:t.type,data:a}},e._utf8ArrayToStr=function(e,t){void 0===t&&(t=!1);var n=o();if(n){var r=n.decode(e);if(t){var i=r.indexOf("\0");return-1!==i?r.substring(0,i):r}return r.replace(/\0/g,"")}for(var a,s,l,u=e.length,c="",d=0;d<u;){if(0===(a=e[d++])&&t)return c;if(0!==a&&3!==a)switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(a);break;case 12:case 13:s=e[d++],c+=String.fromCharCode((31&a)<<6|63&s);break;case 14:s=e[d++],l=e[d++],c+=String.fromCharCode((15&a)<<12|(63&s)<<6|(63&l)<<0)}}return c},e}();function o(){var e=Object(i.getSelfScope)();return r||void 0===e.TextDecoder||(r=new e.TextDecoder("utf-8")),r}var s=a._utf8ArrayToStr;t.default=a},"./src/demux/mp4demuxer.js":
/*!*********************************!*\
!*** ./src/demux/mp4demuxer.js ***!
\*********************************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t);var r=n(/*! ../utils/logger */"./src/utils/logger.js"),i=n(/*! ../events */"./src/events.js"),a=Math.pow(2,32)-1,o=function(){function e(e,t){this.observer=e,this.remuxer=t}var t=e.prototype;return t.resetTimeStamp=function(e){this.initPTS=e},t.resetInitSegment=function(t,n,r,a){if(t&&t.byteLength){var o=this.initData=e.parseInitSegment(t);null==n&&(n="mp4a.40.5"),null==r&&(r="avc1.42e01e");var s={};o.audio&&o.video?s.audiovideo={container:"video/mp4",codec:n+","+r,initSegment:a?t:null}:(o.audio&&(s.audio={container:"audio/mp4",codec:n,initSegment:a?t:null}),o.video&&(s.video={container:"video/mp4",codec:r,initSegment:a?t:null})),this.observer.trigger(i.default.FRAG_PARSING_INIT_SEGMENT,{tracks:s})}else n&&(this.audioCodec=n),r&&(this.videoCodec=r)},e.probe=function(t){return e.findBox({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.bin2str=function(e){return String.fromCharCode.apply(null,e)},e.readUint16=function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<8|e[t+1];return n<0?65536+n:n},e.readUint32=function(e,t){e.data&&(t+=e.start,e=e.data);var n=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return n<0?4294967296+n:n},e.writeUint32=function(e,t,n){e.data&&(t+=e.start,e=e.data),e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},e.findBox=function(t,n){var r,i,a,o,s,l,u=[];if(t.data?(s=t.start,a=t.end,t=t.data):(s=0,a=t.byteLength),!n.length)return null;for(r=s;r<a;)l=(i=e.readUint32(t,r))>1?r+i:a,e.bin2str(t.subarray(r+4,r+8))===n[0]&&(1===n.length?u.push({data:t,start:r+8,end:l}):(o=e.findBox({data:t,start:r+8,end:l},n.slice(1))).length&&(u=u.concat(o))),r=l;return u},e.parseSegmentIndex=function(t){var n,r=e.findBox(t,["moov"])[0],i=r?r.end:null,a=0,o=e.findBox(t,["sidx"]);if(!o||!o[0])return null;n=[];var s=(o=o[0]).data[0];a=0===s?8:16;var l=e.readUint32(o,a);a+=4,a+=0===s?8:16,a+=2;var u=o.end+0,c=e.readUint16(o,a);a+=2;for(var d=0;d<c;d++){var f=a,h=e.readUint32(o,f);f+=4;var p=2147483647&h;if(1==(2147483648&h)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var m=e.readUint32(o,f);f+=4,n.push({referenceSize:p,subsegmentDuration:m,info:{duration:m/l,start:u,end:u+p-1}}),u+=p,a=f+=4}return{earliestPresentationTime:0,timescale:l,version:s,referencesCount:c,references:n,moovEndOffset:i}},e.parseInitSegment=function(t){var n=[];return e.findBox(t,["moov","trak"]).forEach((function(t){var i=e.findBox(t,["tkhd"])[0];if(i){var a=i.data[i.start],o=0===a?12:20,s=e.readUint32(i,o),l=e.findBox(t,["mdia","mdhd"])[0];if(l){o=0===(a=l.data[l.start])?12:20;var u=e.readUint32(l,o),c=e.findBox(t,["mdia","hdlr"])[0];if(c){var d={soun:"audio",vide:"video"}[e.bin2str(c.data.subarray(c.start+8,c.start+12))];if(d){var f=e.findBox(t,["mdia","minf","stbl","stsd"]);if(f.length){f=f[0];var h=e.bin2str(f.data.subarray(f.start+12,f.start+16));r.logger.log("MP4Demuxer:"+d+":"+h+" found")}n[s]={timescale:u,type:d},n[d]={timescale:u,id:s}}}}}})),n},e.getStartDTS=function(t,n){var r,i,a;return r=e.findBox(n,["moof","traf"]),i=[].concat.apply([],r.map((function(n){return e.findBox(n,["tfhd"]).map((function(r){var i,a;return i=e.readUint32(r,4),a=t[i].timescale||9e4,e.findBox(n,["tfdt"]).map((function(t){var n,r;return n=t.data[t.start],r=e.readUint32(t,4),1===n&&(r*=Math.pow(2,32),r+=e.readUint32(t,8)),r}))[0]/a}))}))),a=Math.min.apply(null,i),isFinite(a)?a:0},e.offsetStartDTS=function(t,n,r){e.findBox(n,["moof","traf"]).map((function(n){return e.findBox(n,["tfhd"]).map((function(i){var o=e.readUint32(i,4),s=t[o].timescale||9e4;e.findBox(n,["tfdt"]).map((function(t){var n=t.data[t.start],i=e.readUint32(t,4);if(0===n)e.writeUint32(t,4,i-r*s);else{i*=Math.pow(2,32),i+=e.readUint32(t,8),i-=r*s,i=Math.max(i,0);var o=Math.floor(i/(a+1)),l=Math.floor(i%(a+1));e.writeUint32(t,4,o),e.writeUint32(t,8,l)}}))}))}))},t.append=function(t,n,r,a){var o=this.initData;o||(this.resetInitSegment(t,this.audioCodec,this.videoCodec,!1),o=this.initData);var s,l=this.initPTS;if(void 0===l){var u=e.getStartDTS(o,t);this.initPTS=l=u-n,this.observer.trigger(i.default.INIT_PTS_FOUND,{initPTS:l})}e.offsetStartDTS(o,t,l),s=e.getStartDTS(o,t),this.remuxer.remux(o.audio,o.video,null,null,s,r,a,t)},t.destroy=function(){},e}();t.default=o},"./src/errors.ts":
/*!***********************!*\
!*** ./src/errors.ts ***!
\***********************/
/*! exports provided: ErrorTypes, ErrorDetails */function(e,t,n){"use strict";var r,i;n.r(t),n.d(t,"ErrorTypes",(function(){return r})),n.d(t,"ErrorDetails",(function(){return i})),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(r||(r={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException"}(i||(i={}))},"./src/events.js":
/*!***********************!*\
!*** ./src/events.js ***!
\***********************/
/*! exports provided: default */function(e,t,n){"use strict";n.r(t),t.default={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"}},"./src/hls.ts":
/*!*********************************!*\
!*** ./src/hls.ts + 50 modules ***!
\*********************************/
/*! exports provided: default */
/*! ModuleConcatenation bailout: Cannot concat with ./src/crypt/decrypter.js because of ./src/demux/demuxer-worker.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/demuxer-inline.js because of ./src/demux/demuxer-worker.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/id3.js because of ./src/demux/demuxer-worker.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/demux/mp4demuxer.js because of ./src/demux/demuxer-worker.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/errors.ts because of ./src/demux/demuxer-worker.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/events.js because of ./src/demux/demuxer-worker.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/polyfills/number-isFinite.js because of ./src/demux/demuxer-worker.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/get-self-scope.js because of ./src/demux/demuxer-worker.js */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/logger.js because of ./src/demux/demuxer-worker.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/eventemitter3/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/url-toolkit/src/url-toolkit.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"newCue",(function(){return gt}));var i,a,o=n("./node_modules/url-toolkit/src/url-toolkit.js"),s=n("./src/errors.ts"),l=n("./src/polyfills/number-isFinite.js"),u=n("./src/events.js"),c=n("./src/utils/logger.js"),d={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},f=function(){function e(e){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=e,this.onEvent=this.onEvent.bind(this);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.handledEvents=n,this.useGenericHandler=!0,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){},t.onHandlerDestroyed=function(){},t.isEventHandler=function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent},t.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){if(d[e])throw new Error("Forbidden event-name: "+e);this.hls.on(e,this.onEvent)}),this)},t.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(e){this.hls.off(e,this.onEvent)}),this)},t.onEvent=function(e,t){this.onEventGeneric(e,t)},t.onEventGeneric=function(e,t){try{(function(e,t){var n="on"+e.replace("hls","");if("function"!=typeof this[n])throw new Error("Event "+e+" has no generic handler in this "+this.constructor.name+" class (tried "+n+")");return this[n].bind(this,t)}).call(this,e,t).call()}catch(t){c.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,err:t})}},e}();!function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(i||(i={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(a||(a={}));var h=n("./src/demux/mp4demuxer.js");function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var m,g=function(){function e(e,t){this._uri=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=null,this.baseuri=e,this.reluri=t}var t,n,r;return t=e,(n=[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Object(o.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}])&&p(t.prototype,n),r&&p(t,r),e}();function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}!function(e){e.AUDIO="audio",e.VIDEO="video"}(m||(m={}));var v=function(){function e(){var e;this._url=null,this._byteRange=null,this._decryptdata=null,this._elementaryStreams=((e={})[m.AUDIO]=!1,e[m.VIDEO]=!1,e),this.deltaPTS=0,this.rawProgramDateTime=null,this.programDateTime=null,this.title=null,this.tagList=[],this.cc=void 0,this.type=void 0,this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.start=void 0,this.sn=0,this.urlId=0,this.level=0,this.levelkey=void 0,this.loader=void 0}var t,n,r,i=e.prototype;return i.setByteRange=function(e,t){var n=e.split("@",2),r=[];1===n.length?r[0]=t?t.byteRangeEndOffset:0:r[0]=parseInt(n[1]),r[1]=parseInt(n[0])+r[0],this._byteRange=r},i.addElementaryStream=function(e){this._elementaryStreams[e]=!0},i.hasElementaryStream=function(e){return!0===this._elementaryStreams[e]},i.createInitializationVector=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t},i.setDecryptDataFromLevelKey=function(e,t){var n=e;return e&&e.method&&e.uri&&!e.iv&&((n=new g(e.baseuri,e.reluri)).method=e.method,n.iv=this.createInitializationVector(t)),n},t=e,(n=[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(o.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(e){this._url=e}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&c.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(l.isFiniteNumber)(this.programDateTime))return null;var e=Object(l.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])&&y(t.prototype,n),r&&y(t,r),e}();function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var _=function(){function e(e){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=e,this.version=null}var t,n,r;return t=e,(n=[{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||!Object(l.isFiniteNumber)(this.fragments[0].programDateTime))}}])&&b(t.prototype,n),r&&b(t,r),e}(),A=/^(\d+)x(\d+)$/,E=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,T=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&(this[n]=t[n])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(2*r,2*r+2),16);return n}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.enumeratedString=function(e){return this[e]},t.decimalResolution=function(e){var t=A.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(E.lastIndex=0;null!==(t=E.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}(),w={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function S(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}var k=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,C=/#EXT-X-MEDIA:(.*)/g,x=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),R=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,L=/\.(mp4|m4s|m4v|m4a)$/i,I=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.id===t)return r}},e.convertAVC1ToAVCOTI=function(e){var t,n=e.split(".");return n.length>2?(t=n.shift()+".",t+=parseInt(n.shift()).toString(16),t+=("000"+parseInt(n.shift()).toString(16)).substr(-4)):t=e,t},e.resolve=function(e,t){return o.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[];function a(e,t){["video","audio"].forEach((function(n){var r=e.filter((function(e){return function(e,t){var n=w[t];return!!n&&!0===n[e.slice(0,4)]}(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}for(k.lastIndex=0;null!=(r=k.exec(t));){var o={},s=o.attrs=new T(r[1]);o.url=e.resolve(r[2],n);var l=s.decimalResolution("RESOLUTION");l&&(o.width=l.width,o.height=l.height),o.bitrate=s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),o.name=s.NAME,a([].concat((s.CODECS||"").split(/[ ,]+/)),o),o.videoCodec&&-1!==o.videoCodec.indexOf("avc1")&&(o.videoCodec=e.convertAVC1ToAVCOTI(o.videoCodec)),i.push(o)}return i},e.parseMasterPlaylistMedia=function(t,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(C.lastIndex=0;null!==(a=C.exec(t));){var l=new T(a[1]);if(l.TYPE===r){var u={id:s++,groupId:l["GROUP-ID"],name:l.NAME||l.LANGUAGE,type:r,default:"YES"===l.DEFAULT,autoselect:"YES"===l.AUTOSELECT,forced:"YES"===l.FORCED,lang:l.LANGUAGE};if(l.URI&&(u.url=e.resolve(l.URI,n)),i.length){var c=e.findGroup(i,u.groupId);u.audioCodec=c?c.codec:i[0].codec}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,r,i){var a,o,s,u=0,d=0,f=new _(t),h=0,p=null,m=new v,y=null;for(x.lastIndex=0;null!==(a=x.exec(e));){var b=a[1];if(b){m.duration=parseFloat(b);var A=(" "+a[2]).slice(1);m.title=A||null,m.tagList.push(A?["INF",b,A]:["INF",b])}else if(a[3]){if(Object(l.isFiniteNumber)(m.duration)){var E=u++;m.type=r,m.start=d,s&&(m.levelkey=s),m.sn=E,m.level=n,m.cc=h,m.urlId=i,m.baseurl=t,m.relurl=(" "+a[3]).slice(1),P(m,p),f.fragments.push(m),p=m,d+=m.duration,m=new v}}else if(a[4]){var w=(" "+a[4]).slice(1);p?m.setByteRange(w,p):m.setByteRange(w)}else if(a[5])m.rawProgramDateTime=(" "+a[5]).slice(1),m.tagList.push(["PROGRAM-DATE-TIME",m.rawProgramDateTime]),null===y&&(y=f.fragments.length);else{if(!(a=a[0].match(R))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(o=1;o<a.length&&void 0===a[o];o++);var S=(" "+a[o+1]).slice(1),k=(" "+a[o+2]).slice(1);switch(a[o]){case"#":m.tagList.push(k?[S,k]:[S]);break;case"PLAYLIST-TYPE":f.type=S.toUpperCase();break;case"MEDIA-SEQUENCE":u=f.startSN=parseInt(S);break;case"TARGETDURATION":f.targetduration=parseFloat(S);break;case"VERSION":f.version=parseInt(S);break;case"EXTM3U":break;case"ENDLIST":f.live=!1;break;case"DIS":h++,m.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":h=parseInt(S);break;case"KEY":var C=new T(S),I=C.enumeratedString("METHOD"),j=C.URI,O=C.hexadecimalInteger("IV");I&&(s=new g(t,j),j&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(I)>=0&&(s.method=I,s.key=null,s.iv=O));break;case"START":var D=new T(S).decimalFloatingPoint("TIME-OFFSET");Object(l.isFiniteNumber)(D)&&(f.startTimeOffset=D);break;case"MAP":var M=new T(S);m.relurl=M.URI,M.BYTERANGE&&m.setByteRange(M.BYTERANGE),m.baseurl=t,m.level=n,m.type=r,m.sn="initSegment",f.initSegment=m,(m=new v).rawProgramDateTime=f.initSegment.rawProgramDateTime;break;default:c.logger.warn("line parsed but not handled: "+a)}}}return(m=p)&&!m.relurl&&(f.fragments.pop(),d-=m.duration),f.totalduration=d,f.averagetargetduration=d/f.fragments.length,f.endSN=u-1,f.startCC=f.fragments[0]?f.fragments[0].cc:0,f.endCC=h,!f.initSegment&&f.fragments.length&&f.fragments.every((function(e){return L.test(e.relurl)}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(m=new v).relurl=f.fragments[0].relurl,m.baseurl=t,m.level=n,m.type=r,m.sn="initSegment",f.initSegment=m,f.needSidxRanges=!0),y&&function(e,t){for(var n=e[t],r=t-1;r>=0;r--){var i=e[r];i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(f.fragments,y),f},e}();function P(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Object(l.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}var j=window.performance,O=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADING,u.default.LEVEL_LOADING,u.default.AUDIO_TRACK_LOADING,u.default.SUBTITLE_TRACK_LOADING)||this).loaders={},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.canHaveQualityLevels=function(e){return e!==i.AUDIO_TRACK&&e!==i.SUBTITLE_TRACK},r.mapContextToLevelType=function(e){switch(e.type){case i.AUDIO_TRACK:return a.AUDIO;case i.SUBTITLE_TRACK:return a.SUBTITLE;default:return a.MAIN}},r.getResponseUrl=function(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n};var o=r.prototype;return o.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},o.getInternalLoader=function(e){return this.loaders[e.type]},o.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},o.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},o.destroy=function(){this.destroyInternalLoaders(),e.prototype.destroy.call(this)},o.onManifestLoading=function(e){this.load({url:e.url,type:i.MANIFEST,level:0,id:null,responseType:"text"})},o.onLevelLoading=function(e){this.load({url:e.url,type:i.LEVEL,level:e.level,id:e.id,responseType:"text"})},o.onAudioTrackLoading=function(e){this.load({url:e.url,type:i.AUDIO_TRACK,level:null,id:e.id,responseType:"text"})},o.onSubtitleTrackLoading=function(e){this.load({url:e.url,type:i.SUBTITLE_TRACK,level:null,id:e.id,responseType:"text"})},o.load=function(e){var t=this.hls.config;c.logger.debug("Loading playlist of type "+e.type+", level: "+e.level+", id: "+e.id);var n,r,a,o,s=this.getInternalLoader(e);if(s){var l=s.context;if(l&&l.url===e.url)return c.logger.trace("playlist request ongoing"),!1;c.logger.warn("aborting previous loader for type: "+e.type),s.abort()}switch(e.type){case i.MANIFEST:n=t.manifestLoadingMaxRetry,r=t.manifestLoadingTimeOut,a=t.manifestLoadingRetryDelay,o=t.manifestLoadingMaxRetryTimeout;break;case i.LEVEL:n=0,o=0,a=0,r=t.levelLoadingTimeOut;break;default:n=t.levelLoadingMaxRetry,r=t.levelLoadingTimeOut,a=t.levelLoadingRetryDelay,o=t.levelLoadingMaxRetryTimeout}s=this.createInternalLoader(e);var u={timeout:r,maxRetry:n,retryDelay:a,maxRetryDelay:o},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return c.logger.debug("Calling internal loader delegate for URL: "+e.url),s.load(e,u,d),!0},o.loadsuccess=function(e,t,n,r){if(void 0===r&&(r=null),n.isSidxRequest)return this._handleSidxRequest(e,n),void this._handlePlaylistLoaded(e,t,n,r);if(this.resetInternalLoader(n.type),"string"!=typeof e.data)throw new Error('expected responseType of "text" for PlaylistLoader');var i=e.data;t.tload=j.now(),0===i.indexOf("#EXTM3U")?i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(e,t,n,r):this._handleMasterPlaylist(e,t,n,r):this._handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},o.loaderror=function(e,t,n){void 0===n&&(n=null),this._handleNetworkError(t,n,!1,e)},o.loadtimeout=function(e,t,n){void 0===n&&(n=null),this._handleNetworkError(t,n,!0)},o._handleMasterPlaylist=function(e,t,n,i){var a=this.hls,o=e.data,s=r.getResponseUrl(e,n),l=I.parseMasterPlaylist(o,s);if(l.length){var d=l.map((function(e){return{id:e.attrs.AUDIO,codec:e.audioCodec}})),f=I.parseMasterPlaylistMedia(o,s,"AUDIO",d),h=I.parseMasterPlaylistMedia(o,s,"SUBTITLES");if(f.length){var p=!1;f.forEach((function(e){e.url||(p=!0)})),!1===p&&l[0].audioCodec&&!l[0].attrs.AUDIO&&(c.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}a.trigger(u.default.MANIFEST_LOADED,{levels:l,audioTracks:f,subtitles:h,url:s,stats:t,networkDetails:i})}else this._handleManifestParsingError(e,n,"no level found in manifest",i)},o._handleTrackOrLevelPlaylist=function(e,t,n,a){var o=this.hls,s=n.id,c=n.level,d=n.type,f=r.getResponseUrl(e,n),h=Object(l.isFiniteNumber)(s)?s:0,p=Object(l.isFiniteNumber)(c)?c:h,m=r.mapContextToLevelType(n),g=I.parseLevelPlaylist(e.data,f,p,m,h);if(g.tload=t.tload,d===i.MANIFEST){var y={url:f,details:g};o.trigger(u.default.MANIFEST_LOADED,{levels:[y],audioTracks:[],url:f,stats:t,networkDetails:a})}if(t.tparsed=j.now(),g.needSidxRanges){var v=g.initSegment.url;this.load({url:v,isSidxRequest:!0,type:d,level:c,levelDetails:g,id:s,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else n.levelDetails=g,this._handlePlaylistLoaded(e,t,n,a)},o._handleSidxRequest=function(e,t){if("string"==typeof e.data)throw new Error("sidx request must be made with responseType of array buffer");var n=h.default.parseSegmentIndex(new Uint8Array(e.data));if(n){var r=n.references,i=t.levelDetails;r.forEach((function(e,t){var n=e.info;if(i){var r=i.fragments[t];0===r.byteRange.length&&r.setByteRange(String(1+n.end-n.start)+"@"+String(n.start))}})),i&&i.initSegment.setByteRange(String(n.moovEndOffset)+"@0")}},o._handleManifestParsingError=function(e,t,n,r){this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:e.url,reason:n,networkDetails:r})},o._handleNetworkError=function(e,t,n,r){var a,o;void 0===n&&(n=!1),void 0===r&&(r=null),c.logger.info("A network error occured while loading a "+e.type+"-type playlist");var l=this.getInternalLoader(e);switch(e.type){case i.MANIFEST:a=n?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,o=!0;break;case i.LEVEL:a=n?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,o=!1;break;case i.AUDIO_TRACK:a=n?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,o=!1;break;default:o=!1}l&&(l.abort(),this.resetInternalLoader(e.type));var d={type:s.ErrorTypes.NETWORK_ERROR,details:a,fatal:o,url:e.url,loader:l,context:e,networkDetails:t};r&&(d.response=r),this.hls.trigger(u.default.ERROR,d)},o._handlePlaylistLoaded=function(e,t,n,a){var o=n.type,s=n.level,l=n.id,c=n.levelDetails;if(c&&c.targetduration)if(r.canHaveQualityLevels(n.type))this.hls.trigger(u.default.LEVEL_LOADED,{details:c,level:s||0,id:l||0,stats:t,networkDetails:a});else switch(o){case i.AUDIO_TRACK:this.hls.trigger(u.default.AUDIO_TRACK_LOADED,{details:c,id:l,stats:t,networkDetails:a});break;case i.SUBTITLE_TRACK:this.hls.trigger(u.default.SUBTITLE_TRACK_LOADED,{details:c,id:l,stats:t,networkDetails:a})}else this._handleManifestParsingError(e,n,"invalid target duration",a)},r}(f),D=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.FRAG_LOADING)||this).loaders={},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){var t=this.loaders;for(var n in t){var r=t[n];r&&r.destroy()}this.loaders={},e.prototype.destroy.call(this)},i.onFragLoading=function(e){var t=e.frag,n=t.type,r=this.loaders,i=this.hls.config,a=i.fLoader,o=i.loader;t.loaded=0;var s,u,d,f=r[n];f&&(c.logger.warn("abort previous fragment loader for type: "+n),f.abort()),f=r[n]=t.loader=i.fLoader?new a(i):new o(i),s={url:t.url,frag:t,responseType:"arraybuffer",progressData:!1};var h=t.byteRangeStartOffset,p=t.byteRangeEndOffset;Object(l.isFiniteNumber)(h)&&Object(l.isFiniteNumber)(p)&&(s.rangeStart=h,s.rangeEnd=p),u={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},f.load(s,u,d)},i.loadsuccess=function(e,t,n,r){void 0===r&&(r=null);var i=e.data,a=n.frag;a.loader=void 0,this.loaders[a.type]=void 0,this.hls.trigger(u.default.FRAG_LOADED,{payload:i,frag:a,stats:t,networkDetails:r})},i.loaderror=function(e,t,n){void 0===n&&(n=null);var r=t.frag,i=r.loader;i&&i.abort(),this.loaders[r.type]=void 0,this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t.frag,response:e,networkDetails:n})},i.loadtimeout=function(e,t,n){void 0===n&&(n=null);var r=t.frag,i=r.loader;i&&i.abort(),this.loaders[r.type]=void 0,this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t.frag,networkDetails:n})},i.loadprogress=function(e,t,n,r){void 0===r&&(r=null);var i=t.frag;i.loaded=e.loaded,this.hls.trigger(u.default.FRAG_LOAD_PROGRESS,{frag:i,stats:e,networkDetails:r})},r}(f),M=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.KEY_LOADING)||this).loaders={},n.decryptkey=null,n.decrypturl=null,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){for(var t in this.loaders){var n=this.loaders[t];n&&n.destroy()}this.loaders={},e.prototype.destroy.call(this)},i.onKeyLoading=function(e){var t=e.frag,n=t.type,r=this.loaders[n];if(t.decryptdata){var i=t.decryptdata.uri;if(i!==this.decrypturl||null===this.decryptkey){var a=this.hls.config;if(r&&(c.logger.warn("abort previous key loader for type:"+n),r.abort()),!i)return void c.logger.warn("key uri is falsy");t.loader=this.loaders[n]=new a.loader(a),this.decrypturl=i,this.decryptkey=null;var o={url:i,frag:t,responseType:"arraybuffer"},s={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:a.fragLoadingRetryDelay,maxRetryDelay:a.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};t.loader.load(o,s,l)}else this.decryptkey&&(t.decryptdata.key=this.decryptkey,this.hls.trigger(u.default.KEY_LOADED,{frag:t}))}else c.logger.warn("Missing decryption data on fragment in onKeyLoading")},i.loadsuccess=function(e,t,n){var r=n.frag;r.decryptdata?(this.decryptkey=r.decryptdata.key=new Uint8Array(e.data),r.loader=void 0,delete this.loaders[r.type],this.hls.trigger(u.default.KEY_LOADED,{frag:r})):c.logger.error("after key load, decryptdata unset")},i.loaderror=function(e,t){var n=t.frag,r=n.loader;r&&r.abort(),delete this.loaders[n.type],this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:n,response:e})},i.loadtimeout=function(e,t){var n=t.frag,r=n.loader;r&&r.abort(),delete this.loaders[n.type],this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:n})},r}(f),N="NOT_LOADED",U="APPENDING",F="PARTIAL",B="OK",K=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.BUFFER_APPENDED,u.default.FRAG_BUFFERED,u.default.FRAG_LOADED)||this).bufferPadding=.2,n.fragments=Object.create(null),n.timeRanges=Object.create(null),n.config=t.config,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,f.prototype.destroy.call(this),e.prototype.destroy.call(this)},i.getBufferedFrag=function(e,t){var n=this.fragments,r=Object.keys(n).filter((function(r){var i=n[r];if(i.body.type!==t)return!1;if(!i.buffered)return!1;var a=i.body;return a.startPTS<=e&&e<=a.endPTS}));if(0===r.length)return null;var i=r.pop();return n[i].body},i.detectEvictedFragments=function(e,t){var n,r,i=this;Object.keys(this.fragments).forEach((function(a){var o=i.fragments[a];if(!0===o.buffered){var s=o.range[e];if(s){n=s.time;for(var l=0;l<n.length;l++)if(r=n[l],!1===i.isTimeBuffered(r.startPTS,r.endPTS,t)){i.removeFragment(o.body);break}}}}))},i.detectPartialFragments=function(e){var t=this,n=this.getFragmentKey(e),r=this.fragments[n];r&&(r.buffered=!0,Object.keys(this.timeRanges).forEach((function(n){if(e.hasElementaryStream(n)){var i=t.timeRanges[n];r.range[n]=t.getBufferedTimes(e.startPTS,e.endPTS,i)}})))},i.getBufferedTimes=function(e,t,n){for(var r,i,a=[],o=!1,s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i){a.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))});break}if(e<i&&t>r)a.push({startPTS:Math.max(e,n.start(s)),endPTS:Math.min(t,n.end(s))}),o=!0;else if(t<=r)break}return{time:a,partial:o}},i.getFragmentKey=function(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn},i.getPartialFragment=function(e){var t,n,r,i=this,a=null,o=0;return Object.keys(this.fragments).forEach((function(s){var l=i.fragments[s];i.isPartial(l)&&(n=l.body.startPTS-i.bufferPadding,r=l.body.endPTS+i.bufferPadding,e>=n&&e<=r&&(t=Math.min(e-n,r-e),o<=t&&(a=l.body,o=t)))})),a},i.getState=function(e){var t=this.getFragmentKey(e),n=this.fragments[t],r=N;return void 0!==n&&(r=n.buffered?!0===this.isPartial(n)?F:B:U),r},i.isPartial=function(e){return!0===e.buffered&&(void 0!==e.range.video&&!0===e.range.video.partial||void 0!==e.range.audio&&!0===e.range.audio.partial)},i.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,i=n.end(a)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1},i.onFragLoaded=function(e){var t=e.frag;Object(l.isFiniteNumber)(t.sn)&&!t.bitrateTest&&(this.fragments[this.getFragmentKey(t)]={body:t,range:Object.create(null),buffered:!1})},i.onBufferAppended=function(e){var t=this;this.timeRanges=e.timeRanges,Object.keys(this.timeRanges).forEach((function(e){var n=t.timeRanges[e];t.detectEvictedFragments(e,n)}))},i.onFragBuffered=function(e){this.detectPartialFragments(e.frag)},i.hasFragment=function(e){var t=this.getFragmentKey(e);return void 0!==this.fragments[t]},i.removeFragment=function(e){var t=this.getFragmentKey(e);delete this.fragments[t]},i.removeAllFragments=function(){this.fragments=Object.create(null)},r}(f),V={search:function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null}},G=function(){function e(){}return e.isBuffered=function(e,t){try{if(e)for(var n=e.buffered,r=0;r<n.length;r++)if(t>=n.start(r)&&t<=n.end(r))return!0}catch(e){}return!1},e.bufferInfo=function(e,t,n){try{if(e){var r,i=e.buffered,a=[];for(r=0;r<i.length;r++)a.push({start:i.start(r),end:i.end(r)});return this.bufferedInfo(a,t,n)}}catch(e){}return{len:0,start:t,end:t,nextStart:void 0}},e.bufferedInfo=function(e,t,n){e.sort((function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var r=[];if(n)for(var i=0;i<e.length;i++){var a=r.length;if(a){var o=r[a-1].end;e[i].start-o<n?e[i].end>o&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,u=t,c=t,d=0;d<r.length;d++){var f=r[d].start,h=r[d].end;if(t+n>=f&&t<h)u=f,l=(c=h)-t;else if(t+n<f){s=f;break}}return{len:l,start:u,end:c,nextStart:s}},e}(),H=n("./node_modules/eventemitter3/index.js"),Y=n("./node_modules/webworkify-webpack/index.js"),z=n("./src/demux/demuxer-inline.js");function W(){return window.MediaSource||window.WebKitMediaSource}var $=n("./src/utils/get-self-scope.js"),q=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.trigger=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.emit.apply(this,[e,e].concat(n))},r}(H.EventEmitter),X=Object($.getSelfScope)(),J=W()||{isTypeSupported:function(){return!1}},Q=function(){function e(e,t){var n=this;this.hls=e,this.id=t;var r=this.observer=new q,i=e.config,a=function(t,r){(r=r||{}).frag=n.frag,r.id=n.id,e.trigger(t,r)};r.on(u.default.FRAG_DECRYPTED,a),r.on(u.default.FRAG_PARSING_INIT_SEGMENT,a),r.on(u.default.FRAG_PARSING_DATA,a),r.on(u.default.FRAG_PARSED,a),r.on(u.default.ERROR,a),r.on(u.default.FRAG_PARSING_METADATA,a),r.on(u.default.FRAG_PARSING_USERDATA,a),r.on(u.default.INIT_PTS_FOUND,a);var o={mp4:J.isTypeSupported("video/mp4"),mpeg:J.isTypeSupported("audio/mpeg"),mp3:J.isTypeSupported('audio/mp4; codecs="mp3"')},l=navigator.vendor;if(i.enableWorker&&"undefined"!=typeof Worker){var d;c.logger.log("demuxing in webworker");try{d=this.w=Y(/*! ../demux/demuxer-worker.js */"./src/demux/demuxer-worker.js"),this.onwmsg=this.onWorkerMessage.bind(this),d.addEventListener("message",this.onwmsg),d.onerror=function(t){e.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:t.message+" ("+t.filename+":"+t.lineno+")"}})},d.postMessage({cmd:"init",typeSupported:o,vendor:l,id:t,config:JSON.stringify(i)})}catch(e){c.logger.warn("Error in worker:",e),c.logger.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),d&&X.URL.revokeObjectURL(d.objectURL),this.demuxer=new z.default(r,o,i,l),this.w=void 0}}else this.demuxer=new z.default(r,o,i,l)}var t=e.prototype;return t.destroy=function(){var e=this.w;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.w=null;else{var t=this.demuxer;t&&(t.destroy(),this.demuxer=null)}var n=this.observer;n&&(n.removeAllListeners(),this.observer=null)},t.push=function(e,t,n,r,i,a,o,s){var u=this.w,d=Object(l.isFiniteNumber)(i.startPTS)?i.startPTS:i.start,f=i.decryptdata,h=this.frag,p=!(h&&i.cc===h.cc),m=!(h&&i.level===h.level),g=h&&i.sn===h.sn+1,y=!m&&g;if(p&&c.logger.log(this.id+":discontinuity detected"),m&&c.logger.log(this.id+":switch detected"),this.frag=i,u)u.postMessage({cmd:"demux",data:e,decryptdata:f,initSegment:t,audioCodec:n,videoCodec:r,timeOffset:d,discontinuity:p,trackSwitch:m,contiguous:y,duration:a,accurateTimeOffset:o,defaultInitPTS:s},e instanceof ArrayBuffer?[e]:[]);else{var v=this.demuxer;v&&v.push(e,f,t,n,r,d,p,m,y,a,o,s)}},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":X.URL.revokeObjectURL(this.w.objectURL);break;case u.default.FRAG_PARSING_DATA:t.data.data1=new Uint8Array(t.data1),t.data2&&(t.data.data2=new Uint8Array(t.data2));default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},e}();function Z(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function ee(e,t,n){var r=e[t],i=e[n],a=i.startPTS;Object(l.isFiniteNumber)(a)?n>t?(r.duration=a-r.start,r.duration<0&&c.logger.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!")):(i.duration=r.start-a,i.duration<0&&c.logger.warn("negative duration computed for frag "+i.sn+",level "+i.level+", there should be some duration drift between playlist and fragment!")):i.start=n>t?r.start+r.duration:Math.max(r.start-i.duration,0)}function te(e,t,n,r,i,a){var o=n;if(Object(l.isFiniteNumber)(t.startPTS)){var s=Math.abs(t.startPTS-n);Object(l.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(s,t.deltaPTS):t.deltaPTS=s,o=Math.max(n,t.startPTS),n=Math.min(n,t.startPTS),r=Math.max(r,t.endPTS),i=Math.min(i,t.startDTS),a=Math.max(a,t.endDTS)}var u=n-t.start;t.start=t.startPTS=n,t.maxStartPTS=o,t.endPTS=r,t.startDTS=i,t.endDTS=a,t.duration=r-n;var c,d,f,h=t.sn;if(!e||h<e.startSN||h>e.endSN)return 0;for(c=h-e.startSN,(d=e.fragments)[c]=t,f=c;f>0;f--)ee(d,f,f-1);for(f=c;f<d.length-1;f++)ee(d,f,f+1);return e.PTSKnown=!0,u}function ne(e,t){t.initSegment&&e.initSegment&&(t.initSegment=e.initSegment);var n,r=0;if(re(e,t,(function(e,i){r=e.cc-i.cc,Object(l.isFiniteNumber)(e.startPTS)&&(i.start=i.startPTS=e.startPTS,i.endPTS=e.endPTS,i.duration=e.duration,i.backtracked=e.backtracked,i.dropped=e.dropped,n=i),t.PTSKnown=!0})),t.PTSKnown){if(r){c.logger.log("discontinuity sliding from playlist, take drift into account");for(var i=t.fragments,a=0;a<i.length;a++)i[a].cc+=r}n?te(t,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):function(e,t){var n=t.startSN-e.startSN,r=e.fragments,i=t.fragments;if(!(n<0||n>r.length))for(var a=0;a<i.length;a++)i[a].start+=r[n].start}(e,t),t.PTSKnown=e.PTSKnown}}function re(e,t,n){if(e&&t)for(var r=Math.max(e.startSN,t.startSN)-t.startSN,i=Math.min(e.endSN,t.endSN)-t.startSN,a=t.startSN-e.startSN,o=r;o<=i;o++){var s=e.fragments[a+o],l=t.fragments[o];if(!s||!l)break;n(s,l,o)}}function ie(e,t,n){var r=1e3*(t.averagetargetduration?t.averagetargetduration:t.targetduration),i=r/2;return e&&t.endSN===e.endSN&&(r=i),n&&(r=Math.max(i,r-(window.performance.now()-n))),Math.round(r)}var ae={toString:function(e){for(var t="",n=e.length,r=0;r<n;r++)t+="["+e.start(r).toFixed(3)+","+e.end(r).toFixed(3)+"]";return t}};function oe(e,t){t.fragments.forEach((function(t){if(t){var n=t.start+e;t.start=t.startPTS=n,t.endPTS=n+t.duration}})),t.PTSKnown=!0}function se(e,t,n){!function(e,t,n){if(function(e,t,n){var r=!1;return t&&t.details&&n&&(n.endCC>n.startCC||e&&e.cc<n.startCC)&&(r=!0),r}(e,n,t)){var r=function(e,t){var n=e.fragments,r=t.fragments;if(r.length&&n.length){var i=function(e,t){for(var n=null,r=0;r<e.length;r+=1){var i=e[r];if(i&&i.cc===t){n=i;break}}return n}(n,r[0].cc);if(i&&(!i||i.startPTS))return i;c.logger.log("No frag in previous level to align on")}else c.logger.log("No fragments to align")}(n.details,t);r&&(c.logger.log("Adjusting PTS using last level due to CC increase within current level"),oe(r.start,t))}}(e,n,t),!n.PTSKnown&&t&&function(e,t){if(t&&t.fragments.length){if(!e.hasProgramDateTime||!t.hasProgramDateTime)return;var n=t.fragments[0].programDateTime,r=(e.fragments[0].programDateTime-n)/1e3+t.fragments[0].start;Object(l.isFiniteNumber)(r)&&(c.logger.log("adjusting PTS using programDateTime delta, sliding:"+r.toFixed(3)),oe(r,e))}}(n,t.details)}function le(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!Object(l.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var r=0;r<e.length;++r){var i=e[r];if(de(t,n,i))return i}return null}function ue(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=e?t[e.sn-t[0].sn+1]:null;return i&&!ce(n,r,i)?i:V.search(t,ce.bind(null,n,r))}function ce(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0);var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function de(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}var fe=function(){function e(e,t,n,r){this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var t=e.prototype;return t.poll=function(e){var t=this.config,n=this.media,r=this.stalled,i=n.currentTime,a=n.seeking,o=this.seeking&&!a,s=!this.seeking&&a;if(this.seeking=a,i===e){if((s||o)&&(this.stalled=null),!n.paused&&!n.ended&&0!==n.playbackRate&&n.buffered.length){var l=G.bufferInfo(n,i,0),u=l.len>0,d=l.nextStart||0;if(u||d){if(a){if(l.len>2||!d||d-i>2)return;this.moved=!1}if(!this.moved&&this.stalled){var f=Math.max(d,l.start||0)-i;if(f>0&&f<=2)return void this._trySkipBufferHole(null)}var h=self.performance.now();if(null!==r){var p=h-r;!a&&p>=250&&this._reportStall(l.len);var m=G.bufferInfo(n,i,t.maxBufferHole);this._tryFixBufferStall(m,p)}else this.stalled=h}}}else if(this.moved=!0,null!==r){if(this.stallReported){var g=self.performance.now()-r;c.logger.warn("playback not stuck anymore @"+i+", after "+Math.round(g)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media.currentTime,a=r.getPartialFragment(i);a&&this._trySkipBufferHole(a)||e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(c.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},t._reportStall=function(e){var t=this.hls,n=this.media;this.stallReported||(this.stallReported=!0,c.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer"),t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e}))},t._trySkipBufferHole=function(e){for(var t=this.config,n=this.hls,r=this.media,i=r.currentTime,a=0,o=0;o<r.buffered.length;o++){var l=r.buffered.start(o);if(i+t.maxBufferHole>=a&&i<l){var d=Math.max(l+.05,r.currentTime+.1);return c.logger.warn("skipping hole, adjusting currentTime from "+i+" to "+d),this.moved=!0,this.stalled=null,r.currentTime=d,e&&n.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+i+" to "+d,frag:e}),d}a=r.buffered.end(o)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,n=this.media,r=n.currentTime,i=(this.nudgeRetry||0)+1;if(this.nudgeRetry=i,i<e.nudgeMaxRetry){var a=r+i*e.nudgeOffset;c.logger.warn("Nudging 'currentTime' from "+r+" to "+a),n.currentTime=a,t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else c.logger.error("Playhead still not moving while enough data buffered @"+r+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},e}();function he(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var pe=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return(n=e.call.apply(e,[this,t].concat(i))||this)._boundTick=void 0,n._tickTimer=null,n._tickInterval=null,n._tickCallCount=0,n._boundTick=n.tick.bind(he(n)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},i.hasInterval=function(){return!!this._tickInterval},i.hasNextTick=function(){return!!this._tickTimer},i.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},i.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},i.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},i.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},i.doTick=function(){},r}(f),me="STOPPED",ge="STARTING",ye="IDLE",ve="PAUSED",be="KEY_LOADING",_e="FRAG_LOADING",Ae="FRAG_LOADING_WAITING_RETRY",Ee="WAITING_TRACK",Te="PARSING",we="PARSED",Se="BUFFER_FLUSHING",ke="ENDED",Ce="ERROR",xe="WAITING_INIT_PTS",Re="WAITING_LEVEL",Le=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.doTick=function(){},i.startLoad=function(){},i.stopLoad=function(){var e=this.fragCurrent;e&&(e.loader&&e.loader.abort(),this.fragmentTracker.removeFragment(e)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=me},i._streamEnded=function(e,t){var n=this.fragCurrent,r=this.fragmentTracker;if(!t.live&&n&&!n.backtracked&&n.sn===t.endSN&&!e.nextStart){var i=r.getState(n);return i===F||i===B}return!1},i.onMediaSeeking=function(){var e=this.config,t=this.media,n=this.mediaBuffer,r=this.state,i=t?t.currentTime:null,a=G.bufferInfo(n||t,i,this.config.maxBufferHole);if(Object(l.isFiniteNumber)(i)&&c.logger.log("media seeking to "+i.toFixed(3)),r===_e){var o=this.fragCurrent;if(0===a.len&&o){var s=e.maxFragLookUpTolerance,u=o.start-s,d=o.start+o.duration+s;i<u||i>d?(o.loader&&(c.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),o.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=ye):c.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else r===ke&&(0===a.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=ye);t&&(this.lastCurrentTime=i),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=i),this.tick()},i.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},i.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},i.onHandlerDestroyed=function(){this.state=me,this.fragmentTracker=null},i.computeLivePosition=function(e,t){var n=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*t.targetduration;return e+Math.max(0,t.totalduration-n)},r}(pe);function Ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Pe=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.MANIFEST_LOADING,u.default.MANIFEST_PARSED,u.default.LEVEL_LOADED,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.FRAG_LOAD_EMERGENCY_ABORTED,u.default.FRAG_PARSING_INIT_SEGMENT,u.default.FRAG_PARSING_DATA,u.default.FRAG_PARSED,u.default.ERROR,u.default.AUDIO_TRACK_SWITCHING,u.default.AUDIO_TRACK_SWITCHED,u.default.BUFFER_CREATED,u.default.BUFFER_APPENDED,u.default.BUFFER_FLUSHED)||this).fragmentTracker=n,r.config=t.config,r.audioCodecSwap=!1,r._state=me,r.stallReported=!1,r.gapController=null,r.altAudio=!1,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,o,d,f=r.prototype;return f.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(r=0,this.bitrateTest=!0),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(c.logger.log("override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=ye,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this.forceStartLoad=!0,this.state=me},f.stopLoad=function(){this.forceStartLoad=!1,e.prototype.stopLoad.call(this)},f.doTick=function(){switch(this.state){case Se:this.fragLoadError=0;break;case ye:this._doTickIdle();break;case Re:var e=this.levels[this.level];e&&e.details&&(this.state=ye);break;case Ae:var t=window.performance.now(),n=this.retryDate;(!n||t>=n||this.media&&this.media.seeking)&&(c.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=ye)}this._checkBuffer(),this._checkFragmentChanged()},f._doTickIdle=function(){var e=this.hls,t=e.config,n=this.media;if(void 0!==this.levelLastLoaded&&(n||!this.startFragRequested&&t.startFragPrefetch)){var r;r=this.loadedmetadata?n.currentTime:this.nextLoadPosition;var i=e.nextLoadLevel,a=this.levels[i];if(a){var o,s=a.bitrate;o=s?Math.max(8*t.maxBufferSize/s,t.maxBufferLength):t.maxBufferLength,o=Math.min(o,t.maxMaxBufferLength);var l=G.bufferInfo(this.mediaBuffer?this.mediaBuffer:n,r,t.maxBufferHole),d=l.len;if(!(d>=o)){c.logger.trace("buffer length of "+d.toFixed(3)+" is below max of "+o.toFixed(3)+". checking for more payload ..."),this.level=e.nextLoadLevel=i;var f=a.details;if(!f||f.live&&this.levelLastLoaded!==i)this.state=Re;else{if(this._streamEnded(l,f)){var h={};return this.altAudio&&(h.type="video"),this.hls.trigger(u.default.BUFFER_EOS,h),void(this.state=ke)}this._fetchPayloadOrEos(r,l,f)}}}}},f._fetchPayloadOrEos=function(e,t,n){var r=this.fragPrevious,i=this.level,a=n.fragments,o=a.length;if(0!==o){var s,l=a[0].start,u=a[o-1].start+a[o-1].duration,d=t.end;if(n.initSegment&&!n.initSegment.data)s=n.initSegment;else if(n.live){var f=this.config.initialLiveManifestSize;if(o<f)return void c.logger.warn("Can not start playback of a level, reason: not enough fragments "+o+" < "+f);if(null===(s=this._ensureFragmentAtLivePoint(n,d,l,u,r,a,o)))return}else d<l&&(s=a[0]);s||(s=this._findFragment(l,r,o,a,d,u,n)),s&&(s.encrypted?(c.logger.log("Loading key for "+s.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+i),this._loadKey(s)):(c.logger.log("Loading "+s.sn+" of ["+n.startSN+" ,"+n.endSN+"],level "+i+", currentTime:"+e.toFixed(3)+",bufferEnd:"+d.toFixed(3)),this._loadFragment(s)))}},f._ensureFragmentAtLivePoint=function(e,t,n,r,i,a,o){var s,l=this.hls.config,u=this.media,d=void 0!==l.liveMaxLatencyDuration?l.liveMaxLatencyDuration:l.liveMaxLatencyDurationCount*e.targetduration;if(t<Math.max(n-l.maxFragLookUpTolerance,r-d)){var f=this.liveSyncPosition=this.computeLivePosition(n,e);t=f,u&&!u.paused&&u.readyState&&u.duration>f&&f>u.currentTime&&(c.logger.log("buffer end: "+t.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+f.toFixed(3)),u.currentTime=f),this.nextLoadPosition=f}if(e.PTSKnown&&t>r&&u&&u.readyState)return null;if(this.startFragRequested&&!e.PTSKnown){if(i)if(e.hasProgramDateTime)c.logger.log("live playlist, switching playlist, load frag with same PDT: "+i.programDateTime),s=le(a,i.endProgramDateTime,l.maxFragLookUpTolerance);else{var h=i.sn+1;if(h>=e.startSN&&h<=e.endSN){var p=a[h-e.startSN];i.cc===p.cc&&(s=p,c.logger.log("live playlist, switching playlist, load frag with next SN: "+s.sn))}s||(s=V.search(a,(function(e){return i.cc-e.cc})))&&c.logger.log("live playlist, switching playlist, load frag with same CC: "+s.sn)}s||(s=a[Math.min(o-1,Math.round(o/2))],c.logger.log("live playlist, switching playlist, unknown, load middle frag : "+s.sn))}return s},f._findFragment=function(e,t,n,r,i,a,o){var s,l=this.hls.config;if(s=i<a?ue(t,r,i,i>a-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance):r[n-1]){var u=s.sn-o.startSN,d=t&&s.level===t.level,f=r[u-1],h=r[u+1];if(t&&s.sn===t.sn)if(d&&!s.backtracked)if(s.sn<o.endSN){var p=t.deltaPTS;p&&p>l.maxBufferHole&&t.dropped&&u?(s=f,c.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(s=h,c.logger.log("Re-loading fragment with SN: "+s.sn))}else s=null;else s.backtracked&&(h&&h.backtracked?(c.logger.warn("Already backtracked from fragment "+h.sn+", will not backtrack to fragment "+s.sn+". Loading fragment "+h.sn),s=h):(c.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),s.dropped=0,f?(s=f).backtracked=!0:u&&(s=null)))}return s},f._loadKey=function(e){this.state=be,this.hls.trigger(u.default.KEY_LOADING,{frag:e})},f._loadFragment=function(e){var t=this.fragmentTracker.getState(e);this.fragCurrent=e,"initSegment"!==e.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(e.sn)&&!e.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),e.backtracked||t===N||t===F?(e.autoLevel=this.hls.autoLevelEnabled,e.bitrateTest=this.bitrateTest,this.hls.trigger(u.default.FRAG_LOADING,{frag:e}),this.demuxer||(this.demuxer=new Q(this.hls,"main")),this.state=_e):t===U&&this._reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e)},f.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,a.MAIN)},f.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.endPTS+.5):null},f._checkFragmentChanged=function(){var e,t,n=this.media;if(n&&n.readyState&&!1===n.seeking&&((t=n.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=t),G.isBuffered(n,t)?e=this.getBufferedFrag(t):G.isBuffered(n,t+.1)&&(e=this.getBufferedFrag(t+.1)),e)){var r=e;if(r!==this.fragPlaying){this.hls.trigger(u.default.FRAG_CHANGED,{frag:r});var i=r.level;this.fragPlaying&&this.fragPlaying.level===i||this.hls.trigger(u.default.LEVEL_SWITCHED,{level:i}),this.fragPlaying=r}}},f.immediateLevelSwitch=function(){if(c.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var e,t=this.media;t?(e=t.paused,t.pause()):e=!0,this.previouslyPaused=e}var n=this.fragCurrent;n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},f.immediateLevelSwitchEnd=function(){var e=this.media;e&&e.buffered.length&&(this.immediateSwitch=!1,G.isBuffered(e,e.currentTime)&&(e.currentTime-=1e-4),this.previouslyPaused||e.play())},f.nextLevelSwitch=function(){var e=this.media;if(e&&e.readyState){var t,n,r;if((n=this.getBufferedFrag(e.currentTime))&&n.startPTS>1&&this.flushMainBuffer(0,n.startPTS-1),e.paused)t=0;else{var i=this.hls.nextLoadLevel,a=this.levels[i],o=this.fragLastKbps;t=o&&this.fragCurrent?this.fragCurrent.duration*a.bitrate/(1e3*o)+1:0}if((r=this.getBufferedFrag(e.currentTime+t))&&(r=this.followingBufferedFrag(r))){var s=this.fragCurrent;s&&s.loader&&s.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(r.maxStartPTS,Number.POSITIVE_INFINITY)}}},f.flushMainBuffer=function(e,t){this.state=Se;var n={startOffset:e,endOffset:t};this.altAudio&&(n.type="video"),this.hls.trigger(u.default.BUFFER_FLUSHING,n)},f.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("seeked",this.onvseeked),t.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.hls.startLoad(n.startPosition),this.gapController=new fe(n,t,this.fragmentTracker,this.hls)},f.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(c.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var t=this.levels;t&&t.forEach((function(e){e.details&&e.details.fragments.forEach((function(e){e.backtracked=void 0}))})),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("seeked",this.onvseeked),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},f.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:void 0;Object(l.isFiniteNumber)(t)&&c.logger.log("media seeked to "+t.toFixed(3)),this.tick()},f.onManifestLoading=function(){c.logger.log("trigger BUFFER_RESET"),this.hls.trigger(u.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},f.onManifestParsed=function(e){var t,n=!1,r=!1;e.levels.forEach((function(e){(t=e.audioCodec)&&(-1!==t.indexOf("mp4a.40.2")&&(n=!0),-1!==t.indexOf("mp4a.40.5")&&(r=!0))})),this.audioCodecSwitch=n&&r,this.audioCodecSwitch&&c.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=e.altAudio,this.levels=e.levels,this.startFragRequested=!1;var i=this.config;(i.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(i.startPosition)},f.onLevelLoaded=function(e){var t=e.details,n=e.level,r=this.levels[this.levelLastLoaded],i=this.levels[n],a=t.totalduration,o=0;if(c.logger.log("level "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+a),t.live){var s=i.details;s&&t.fragments.length>0?(ne(s,t),o=t.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(o,s),t.PTSKnown&&Object(l.isFiniteNumber)(o)?c.logger.log("live playlist sliding:"+o.toFixed(3)):(c.logger.log("live playlist - outdated PTS, unknown sliding"),se(this.fragPrevious,r,t))):(c.logger.log("live playlist - first load, unknown sliding"),t.PTSKnown=!1,se(this.fragPrevious,r,t))}else t.PTSKnown=!1;if(i.details=t,this.levelLastLoaded=n,this.hls.trigger(u.default.LEVEL_UPDATED,{details:t,level:n}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var d=t.startTimeOffset;Object(l.isFiniteNumber)(d)?(d<0&&(c.logger.log("negative start time offset "+d+", count from end of last fragment"),d=o+a+d),c.logger.log("start time offset found in playlist, adjust startPosition to "+d),this.startPosition=d):t.live?(this.startPosition=this.computeLivePosition(o,t),c.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===Re&&(this.state=ye),this.tick()},f.onKeyLoaded=function(){this.state===be&&(this.state=ye,this.tick())},f.onFragLoaded=function(e){var t=this.fragCurrent,n=this.hls,r=this.levels,i=this.media,a=e.frag;if(this.state===_e&&t&&"main"===a.type&&a.level===t.level&&a.sn===t.sn){var o=e.stats,s=r[t.level],l=s.details;if(this.bitrateTest=!1,this.stats=o,c.logger.log("Loaded "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level),a.bitrateTest&&n.nextLoadLevel)this.state=ye,this.startFragRequested=!1,o.tparsed=o.tbuffered=window.performance.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:o,frag:t,id:"main"}),this.tick();else if("initSegment"===a.sn)this.state=ye,o.tparsed=o.tbuffered=window.performance.now(),l.initSegment.data=e.payload,n.trigger(u.default.FRAG_BUFFERED,{stats:o,frag:t,id:"main"}),this.tick();else{c.logger.log("Parsing "+t.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+t.level+", cc "+t.cc),this.state=Te,this.pendingBuffering=!0,this.appended=!1,a.bitrateTest&&(a.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:a}));var d=!(i&&i.seeking)&&(l.PTSKnown||!l.live),f=l.initSegment?l.initSegment.data:[],h=this._getAudioCodec(s);(this.demuxer=this.demuxer||new Q(this.hls,"main")).push(e.payload,f,h,s.videoCodec,t,l.totalduration,d)}}this.fragLoadError=0},f.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Te){var r,i,a=e.tracks;if(a.audio&&this.altAudio&&delete a.audio,i=a.audio){var o=this.levels[this.level].audioCodec,s=navigator.userAgent.toLowerCase();o&&this.audioCodecSwap&&(c.logger.log("swapping playlist audio codec"),o=-1!==o.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==i.metadata.channelCount&&-1===s.indexOf("firefox")&&(o="mp4a.40.5"),-1!==s.indexOf("android")&&"audio/mpeg"!==i.container&&(o="mp4a.40.2",c.logger.log("Android: force audio codec to "+o)),i.levelCodec=o,i.id=e.id}for(r in(i=a.video)&&(i.levelCodec=this.levels[this.level].videoCodec,i.id=e.id),this.hls.trigger(u.default.BUFFER_CODECS,a),a){i=a[r],c.logger.log("main track:"+r+",container:"+i.container+",codecs[level/parsed]=["+i.levelCodec+"/"+i.codec+"]");var l=i.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,{type:r,data:l,parent:"main",content:"initSegment"}))}this.tick()}},f.onFragParsingData=function(e){var t=this,n=this.fragCurrent,r=e.frag;if(n&&"main"===e.id&&r.sn===n.sn&&r.level===n.level&&("audio"!==e.type||!this.altAudio)&&this.state===Te){var i=this.levels[this.level],a=n;if(Object(l.isFiniteNumber)(e.endPTS)||(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),!0===e.hasAudio&&a.addElementaryStream(m.AUDIO),!0===e.hasVideo&&a.addElementaryStream(m.VIDEO),c.logger.log("Parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb+",dropped:"+(e.dropped||0)),"video"===e.type)if(a.dropped=e.dropped,a.dropped)if(a.backtracked)c.logger.warn("Already backtracked on this fragment, appending with the gap",a.sn);else{var o=i.details;if(!o||a.sn!==o.startSN)return c.logger.warn("missing video frame(s), backtracking fragment",a.sn),this.fragmentTracker.removeFragment(a),a.backtracked=!0,this.nextLoadPosition=e.startPTS,this.state=ye,this.fragPrevious=a,void this.tick();c.logger.warn("missing video frame(s) on first frag, appending with gap",a.sn)}else a.backtracked=!1;var s=te(i.details,a,e.startPTS,e.endPTS,e.startDTS,e.endDTS),d=this.hls;d.trigger(u.default.LEVEL_PTS_UPDATED,{details:i.details,level:this.level,drift:s,type:e.type,start:e.startPTS,end:e.endPTS}),[e.data1,e.data2].forEach((function(n){n&&n.length&&t.state===Te&&(t.appended=!0,t.pendingBuffering=!0,d.trigger(u.default.BUFFER_APPENDING,{type:e.type,data:n,parent:"main",content:"data"}))})),this.tick()}},f.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"main"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Te&&(this.stats.tparsed=window.performance.now(),this.state=we,this._checkAppendedParsed())},f.onAudioTrackSwitching=function(e){var t=!!e.url,n=e.id;if(!t){if(this.mediaBuffer!==this.media){c.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(c.logger.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=ye}var i=this.hls;i.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),i.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:n}),this.altAudio=!1}},f.onAudioTrackSwitched=function(e){var t=e.id,n=!!this.hls.audioTracks[t].url;if(n){var r=this.videoBuffer;r&&this.mediaBuffer!==r&&(c.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n,this.tick()},f.onBufferCreated=function(e){var t,n,r=e.tracks,i=!1;for(var a in r){var o=r[a];"main"===o.id?(n=a,t=o,"video"===a&&(this.videoBuffer=r[a].buffer)):i=!0}i&&t?(c.logger.log("alternate track found, use "+n+".buffered to schedule main fragment loading"),this.mediaBuffer=t.buffer):this.mediaBuffer=this.media},f.onBufferAppended=function(e){if("main"===e.parent){var t=this.state;t!==Te&&t!==we||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},f._checkAppendedParsed=function(){if(!(this.state!==we||this.appended&&this.pendingBuffering)){var e=this.fragCurrent;if(e){var t=this.mediaBuffer?this.mediaBuffer:this.media;c.logger.log("main buffered : "+ae.toString(t.buffered)),this.fragPrevious=e;var n=this.stats;n.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*n.total/(n.tbuffered-n.tfirst)),this.hls.trigger(u.default.FRAG_BUFFERED,{stats:n,frag:e,id:"main"}),this.state=ye}this.tick()}},f.onError=function(e){var t=e.frag||this.fragCurrent;if(!t||"main"===t.type){var n=!!this.media&&G.isBuffered(this.media,this.media.currentTime)&&G.isBuffered(this.media,this.media.currentTime+.5);switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:if(!e.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var r=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);c.logger.warn("mediaController: frag loading failed, retry in "+r+" ms"),this.retryDate=window.performance.now()+r,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=Ae}else c.logger.error("mediaController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=Ce;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==Ce&&(e.fatal?(this.state=Ce,c.logger.warn("streamController: "+e.details+",switch to "+this.state+" state ...")):e.levelRetry||this.state!==Re||(this.state=ye));break;case s.ErrorDetails.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==Te&&this.state!==we||(n?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=ye):(c.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},f._reduceMaxBufferLength=function(e){var t=this.config;return t.maxMaxBufferLength>=e&&(t.maxMaxBufferLength/=2,c.logger.warn("main:reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},f._checkBuffer=function(){var e=this.media;if(e&&0!==e.readyState){var t=(this.mediaBuffer?this.mediaBuffer:e).buffered;!this.loadedmetadata&&t.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,t)}},f.onFragLoadEmergencyAborted=function(){this.state=ye,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},f.onBufferFlushed=function(){var e=this.mediaBuffer?this.mediaBuffer:this.media;e&&this.fragmentTracker.detectEvictedFragments(m.VIDEO,e.buffered),this.state=ye,this.fragPrevious=null},f.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},f._seekToStartPos=function(){var e=this.media,t=e.currentTime,n=e.seeking?t:this.startPosition;t!==n&&n>=0&&(c.logger.log("target start position not buffered, seek to buffered.start(0) "+n+" from current time "+t+" "),e.currentTime=n)},f._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&(c.logger.log("swapping playlist audio codec"),t&&(t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),t},i=r,(o=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,c.logger.log("main stream-controller: "+t+"->"+e),this.hls.trigger(u.default.STREAM_STATE_TRANSITION,{previousState:t,nextState:e})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var e=this.media;if(e){var t=this.getBufferedFrag(e.currentTime);if(t)return t.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;return e?this.followingBufferedFrag(this.getBufferedFrag(e.currentTime)):null}},{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(e){this._liveSyncPosition=e}}])&&Ie(i.prototype,o),d&&Ie(i,d),r}(Le);function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}window.performance;var Oe,De=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADED,u.default.LEVEL_LOADED,u.default.AUDIO_TRACK_SWITCHED,u.default.FRAG_LOADED,u.default.ERROR)||this).canload=!1,n.currentLevelIndex=null,n.manualLevelIndex=-1,n.timer=null,Oe=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,l=r.prototype;return l.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},l.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},l.startLoad=function(){var e=this._levels;this.canload=!0,this.levelRetryCount=0,e&&e.forEach((function(e){e.loadError=0;var t=e.details;t&&t.live&&(e.details=void 0)})),null!==this.timer&&this.loadLevel()},l.stopLoad=function(){this.canload=!1},l.onManifestLoaded=function(e){var t,n=[],r=[],i={},a=null,o=!1,l=!1;if(e.levels.forEach((function(e){var t=e.attrs;e.loadError=0,e.fragmentError=!1,o=o||!!e.videoCodec,l=l||!!e.audioCodec,Oe&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0),(a=i[e.bitrate])?a.url.push(e.url):(e.url=[e.url],e.urlId=0,i[e.bitrate]=e,n.push(e)),t&&(t.AUDIO&&(l=!0,Z(a||e,"audio",t.AUDIO)),t.SUBTITLES&&Z(a||e,"text",t.SUBTITLES))})),o&&l&&(n=n.filter((function(e){return!!e.videoCodec}))),n=n.filter((function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||S(t,"audio"))&&(!n||S(n,"video"))})),e.audioTracks&&(r=e.audioTracks.filter((function(e){return!e.audioCodec||S(e.audioCodec,"audio")}))).forEach((function(e,t){e.id=t})),n.length>0){t=n[0].bitrate,n.sort((function(e,t){return e.bitrate-t.bitrate})),this._levels=n;for(var d=0;d<n.length;d++)if(n[d].bitrate===t){this._firstLevel=d,c.logger.log("manifest loaded,"+n.length+" level(s) found, first bitrate:"+t);break}this.hls.trigger(u.default.MANIFEST_PARSED,{levels:n,audioTracks:r,firstLevel:this._firstLevel,stats:e.stats,audio:l,video:o,altAudio:r.some((function(e){return!!e.url}))})}else this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},l.setLevelInternal=function(e){var t=this._levels,n=this.hls;if(e>=0&&e<t.length){if(this.clearTimer(),this.currentLevelIndex!==e){c.logger.log("switching to level "+e),this.currentLevelIndex=e;var r=t[e];r.level=e,n.trigger(u.default.LEVEL_SWITCHING,r)}var i=t[e],a=i.details;if(!a||a.live){var o=i.urlId;n.trigger(u.default.LEVEL_LOADING,{url:i.url[o],level:e,id:o})}}else n.trigger(u.default.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:!1,reason:"invalid level idx"})},l.onError=function(e){if(e.fatal)e.type===s.ErrorTypes.NETWORK_ERROR&&this.clearTimer();else{var t,n=!1,r=!1;switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:t=e.frag.level,r=!0;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:t=e.context.level,n=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:t=e.level,n=!0}void 0!==t&&this.recoverLevel(e,t,n,r)}},l.recoverLevel=function(e,t,n,r){var i,a,o,s=this,l=this.hls.config,u=e.details,d=this._levels[t];if(d.loadError++,d.fragmentError=r,n){if(!(this.levelRetryCount+1<=l.levelLoadingMaxRetry))return c.logger.error("level controller, cannot recover from "+u+" error"),this.currentLevelIndex=null,this.clearTimer(),void(e.fatal=!0);a=Math.min(Math.pow(2,this.levelRetryCount)*l.levelLoadingRetryDelay,l.levelLoadingMaxRetryTimeout),this.timer=setTimeout((function(){return s.loadLevel()}),a),e.levelRetry=!0,this.levelRetryCount++,c.logger.warn("level controller, "+u+", retry in "+a+" ms, current retry count is "+this.levelRetryCount)}(n||r)&&((i=d.url.length)>1&&d.loadError<i?(d.urlId=(d.urlId+1)%i,d.details=void 0,c.logger.warn("level controller, "+u+" for level "+t+": switching to redundant URL-id "+d.urlId)):-1===this.manualLevelIndex?(o=0===t?this._levels.length-1:t-1,c.logger.warn("level controller, "+u+": switch to "+o),this.hls.nextAutoLevel=this.currentLevelIndex=o):r&&(c.logger.warn("level controller, "+u+": reload a fragment"),this.currentLevelIndex=null))},l.onFragLoaded=function(e){var t=e.frag;if(void 0!==t&&"main"===t.type){var n=this._levels[t.level];void 0!==n&&(n.fragmentError=!1,n.loadError=0,this.levelRetryCount=0)}},l.onLevelLoaded=function(e){var t=this,n=e.level,r=e.details;if(n===this.currentLevelIndex){var i=this._levels[n];if(i.fragmentError||(i.loadError=0,this.levelRetryCount=0),r.live){var a=ie(i.details,r,e.stats.trequest);c.logger.log("live playlist, reload in "+Math.round(a)+" ms"),this.timer=setTimeout((function(){return t.loadLevel()}),a)}else this.clearTimer()}},l.onAudioTrackSwitched=function(e){var t=this.hls.audioTracks[e.id].groupId,n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=0;i<n.audioGroupIds.length;i++)if(n.audioGroupIds[i]===t){r=i;break}r!==n.urlId&&(n.urlId=r,this.startLoad())}},l.loadLevel=function(){if(c.logger.debug("call to loadLevel"),null!==this.currentLevelIndex&&this.canload){var e=this._levels[this.currentLevelIndex];if("object"==typeof e&&e.url.length>0){var t=this.currentLevelIndex,n=e.urlId,r=e.url[n];c.logger.log("Attempt loading level index "+t+" with URL-id "+n),this.hls.trigger(u.default.LEVEL_LOADING,{url:r,level:t,id:n})}}},i=r,(a=[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;t&&(e=Math.min(e,t.length-1),this.currentLevelIndex===e&&t[e].details||this.setLevelInternal(e))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&je(i.prototype,a),o&&je(i,o),r}(f),Me=n("./src/demux/id3.js");function Ne(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function Ue(e){if(e&&e.cues)for(;e.cues.length>0;)e.removeCue(e.cues[0])}var Fe=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_METADATA,u.default.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,n.media=void 0,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){f.prototype.destroy.call(this)},i.onMediaAttached=function(e){this.media=e.media,this.media},i.onMediaDetaching=function(){Ue(this.id3Track),this.id3Track=void 0,this.media=void 0},i.getID3Track=function(e){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return Ne(n,this.media),n}return this.media.addTextTrack("metadata","id3")},i.onFragParsingMetadata=function(e){var t=e.frag,n=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var r=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,i=0;i<n.length;i++){var a=Me.default.getID3Frames(n[i].data);if(a){var o=n[i].pts,s=i<n.length-1?n[i+1].pts:t.endPTS;o===s?s+=1e-4:o>s&&(c.logger.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),s=o+.25);for(var l=0;l<a.length;l++){var u=a[l];if(!Me.default.isTimeStampFrame(u)){var d=new r(o,s,"");d.value=u,this.id3Track.addCue(d)}}}}},i.onLiveBackBufferReached=function(e){var t=e.bufferEnd,n=this.id3Track;if(n&&n.cues&&n.cues.length){var r=function(e,t){if(t<e[0].endTime)return e[0];if(t>e[e.length-1].endTime)return e[e.length-1];for(var n=0,r=e.length-1;n<=r;){var i=Math.floor((r+n)/2);if(t<e[i].endTime)r=i-1;else{if(!(t>e[i].endTime))return e[i];n=i+1}}return e[n].endTime-t<t-e[r].endTime?e[n]:e[r]}(n.cues,t);if(r)for(;n.cues[0]!==r;)n.removeCue(n.cues[0])}},r}(f),Be=function(){function e(e){this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=0,this.totalWeight_=0}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/e}return this.estimate_},e}(),Ke=function(){function e(e,t,n,r){this.hls=void 0,this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.hls=e,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Be(t),this.fast_=new Be(n)}var t=e.prototype;return t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}();function Ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ge=window.performance,He=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.FRAG_LOADING,u.default.FRAG_LOADED,u.default.FRAG_BUFFERED,u.default.ERROR)||this).lastLoadedFragLevel=0,n._nextAutoLevel=-1,n.hls=t,n.timer=null,n._bwEstimator=null,n.onCheck=n._abandonRulesCheck.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,d=r.prototype;return d.destroy=function(){this.clearTimer(),f.prototype.destroy.call(this)},d.onFragLoading=function(e){var t=e.frag;if("main"===t.type&&(this.timer||(this.fragCurrent=t,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var n,r,i=this.hls,a=i.config,o=t.level;i.levels[o].details.live?(n=a.abrEwmaFastLive,r=a.abrEwmaSlowLive):(n=a.abrEwmaFastVoD,r=a.abrEwmaSlowVoD),this._bwEstimator=new Ke(i,r,n,a.abrEwmaDefaultEstimate)}},d._abandonRulesCheck=function(){var e=this.hls,t=e.media,n=this.fragCurrent;if(n){var r=n.loader,i=e.minAutoLevel;if(!r||r.stats&&r.stats.aborted)return c.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var a=r.stats;if(t&&a&&(!t.paused&&0!==t.playbackRate||!t.readyState)&&n.autoLevel&&n.level){var o=Ge.now()-a.trequest,s=Math.abs(t.playbackRate);if(o>500*n.duration/s){var l=e.levels,d=Math.max(1,a.bw?a.bw/8:1e3*a.loaded/o),f=l[n.level],h=f.realBitrate?Math.max(f.realBitrate,f.bitrate):f.bitrate,p=a.total?a.total:Math.max(a.loaded,Math.round(n.duration*h/8)),m=t.currentTime,g=(p-a.loaded)/d,y=(G.bufferInfo(t,m,e.config.maxBufferHole).end-m)/s;if(y<2*n.duration/s&&g>y){var v;for(v=n.level-1;v>i;v--){var b=l[v].realBitrate?Math.max(l[v].realBitrate,l[v].bitrate):l[v].bitrate;if(n.duration*b/(6.4*d)<y)break}void 0<g&&(c.logger.warn("loading too slow, abort fragment loading and switch to level "+v+":fragLoadedDelay["+v+"]<fragLoadedDelay["+(n.level-1)+"];bufferStarvationDelay:"+(void 0).toFixed(1)+"<"+g.toFixed(1)+":"+y.toFixed(1)),e.nextLoadLevel=v,this._bwEstimator.sample(o,a.loaded),r.abort(),this.clearTimer(),e.trigger(u.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,stats:a}))}}}}},d.onFragLoaded=function(e){var t=e.frag;if("main"===t.type&&Object(l.isFiniteNumber)(t.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var n=this.hls.levels[t.level],r=(n.loaded?n.loaded.bytes:0)+e.stats.loaded,i=(n.loaded?n.loaded.duration:0)+e.frag.duration;n.loaded={bytes:r,duration:i},n.realBitrate=Math.round(8*r/i)}if(e.frag.bitrateTest){var a=e.stats;a.tparsed=a.tbuffered=a.tload,this.onFragBuffered(e)}}},d.onFragBuffered=function(e){var t=e.stats,n=e.frag;if(!0!==t.aborted&&"main"===n.type&&Object(l.isFiniteNumber)(n.sn)&&(!n.bitrateTest||t.tload===t.tbuffered)){var r=t.tparsed-t.trequest;c.logger.log("latency/loading/parsing/append/kbps:"+Math.round(t.tfirst-t.trequest)+"/"+Math.round(t.tload-t.tfirst)+"/"+Math.round(t.tparsed-t.tload)+"/"+Math.round(t.tbuffered-t.tparsed)+"/"+Math.round(8*t.loaded/(t.tbuffered-t.trequest))),this._bwEstimator.sample(r,t.loaded),t.bwEstimate=this._bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=r/1e3:this.bitrateTestDelay=0}},d.onError=function(e){switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){clearInterval(this.timer),this.timer=null},d._findBestLevel=function(e,t,n,r,i,a,o,s,l){for(var u=i;u>=r;u--){var d=l[u];if(d){var f=d.details,h=f?f.totalduration/f.fragments.length:t,p=!!f&&f.live,m=void 0;m=u<=e?o*n:s*n;var g=l[u].realBitrate?Math.max(l[u].realBitrate,l[u].bitrate):l[u].bitrate,y=g*h/m;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+u+"/"+Math.round(m)+"/"+g+"/"+h+"/"+a+"/"+y),m>g&&(!y||p&&!this.bitrateTestDelay||y<a))return u}}return-1},i=r,(a=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this._bwEstimator;if(!(-1===e||t&&t.canEstimate()))return e;var n=this._nextABRAutoLevel;return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}},{key:"_nextABRAutoLevel",get:function(){var e=this.hls,t=e.maxAutoLevel,n=e.levels,r=e.config,i=e.minAutoLevel,a=e.media,o=this.lastLoadedFragLevel,s=this.fragCurrent?this.fragCurrent.duration:0,l=a?a.currentTime:0,u=a&&0!==a.playbackRate?Math.abs(a.playbackRate):1,d=this._bwEstimator?this._bwEstimator.getEstimate():r.abrEwmaDefaultEstimate,f=(G.bufferInfo(a,l,r.maxBufferHole).end-l)/u,h=this._findBestLevel(o,s,d,i,t,f,r.abrBandWidthFactor,r.abrBandWidthUpFactor,n);if(h>=0)return h;c.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=s?Math.min(s,r.maxStarvationDelay):r.maxStarvationDelay,m=r.abrBandWidthFactor,g=r.abrBandWidthUpFactor;if(0===f){var y=this.bitrateTestDelay;y&&(p=(s?Math.min(s,r.maxLoadingDelay):r.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),m=g=1)}return h=this._findBestLevel(o,s,d,i,t,f+p,m,g,n),Math.max(h,0)}}])&&Ve(i.prototype,a),o&&Ve(i,o),r}(f),Ye=W(),ze=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_RESET,u.default.BUFFER_APPENDING,u.default.BUFFER_CODECS,u.default.BUFFER_EOS,u.default.BUFFER_FLUSHING,u.default.LEVEL_PTS_UPDATED,u.default.LEVEL_UPDATED)||this)._msDuration=null,n._levelDuration=null,n._levelTargetDuration=10,n._live=null,n._objectUrl=null,n._needsFlush=!1,n._needsEos=!1,n.config=void 0,n.audioTimestampOffset=void 0,n.bufferCodecEventsExpected=0,n._bufferCodecEventsTotal=0,n.media=null,n.mediaSource=null,n.segments=[],n.parent=void 0,n.appending=!1,n.appended=0,n.appendError=0,n.flushBufferCounter=0,n.tracks={},n.pendingTracks={},n.sourceBuffer={},n.flushRange=[],n._onMediaSourceOpen=function(){c.logger.log("media source opened"),n.hls.trigger(u.default.MEDIA_ATTACHED,{media:n.media});var e=n.mediaSource;e&&e.removeEventListener("sourceopen",n._onMediaSourceOpen),n.checkPendingTracks()},n._onMediaSourceClose=function(){c.logger.log("media source closed")},n._onMediaSourceEnded=function(){c.logger.log("media source ended")},n._onSBUpdateEnd=function(){if(n.audioTimestampOffset&&n.sourceBuffer.audio){var e=n.sourceBuffer.audio;c.logger.warn("change mpeg audio timestamp offset from "+e.timestampOffset+" to "+n.audioTimestampOffset),e.timestampOffset=n.audioTimestampOffset,delete n.audioTimestampOffset}n._needsFlush&&n.doFlush(),n._needsEos&&n.checkEos(),n.appending=!1;var t=n.parent,r=n.segments.reduce((function(e,n){return n.parent===t?e+1:e}),0),i={},a=n.sourceBuffer;for(var o in a){var s=a[o];if(!s)throw Error("handling source buffer update end error: source buffer for "+o+" uninitilized and unable to update buffered TimeRanges.");i[o]=s.buffered}n.hls.trigger(u.default.BUFFER_APPENDED,{parent:t,pending:r,timeRanges:i}),n._needsFlush||n.doAppending(),n.updateMediaElementDuration(),0===r&&n.flushLiveBackBuffer()},n._onSBUpdateError=function(e){c.logger.error("sourceBuffer error:",e),n.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},n.config=t.config,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){f.prototype.destroy.call(this)},i.onLevelPtsUpdated=function(e){var t=e.type,n=this.tracks.audio;if("audio"===t&&n&&"audio/mpeg"===n.container){var r=this.sourceBuffer.audio;if(!r)throw Error("Level PTS Updated and source buffer for audio uninitalized");if(Math.abs(r.timestampOffset-e.start)>.1){var i=r.updating;try{r.abort()}catch(e){c.logger.warn("can not abort audio buffer: "+e)}i?this.audioTimestampOffset=e.start:(c.logger.warn("change mpeg audio timestamp offset from "+r.timestampOffset+" to "+e.start),r.timestampOffset=e.start)}}},i.onManifestParsed=function(e){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=e.altAudio?2:1,c.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},i.onMediaAttaching=function(e){var t=this.media=e.media;if(t&&Ye){var n=this.mediaSource=new Ye;n.addEventListener("sourceopen",this._onMediaSourceOpen),n.addEventListener("sourceended",this._onMediaSourceEnded),n.addEventListener("sourceclose",this._onMediaSourceClose),t.src=window.URL.createObjectURL(n),this._objectUrl=t.src}},i.onMediaDetaching=function(){c.logger.log("media source detaching");var e=this.mediaSource;if(e){if("open"===e.readyState)try{e.endOfStream()}catch(e){c.logger.warn("onMediaDetaching:"+e.message+" while calling endOfStream")}e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):c.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(u.default.MEDIA_DETACHED)},i.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.pendingTracks,n=Object.keys(t).length;(n&&!e||2===n)&&(this.createSourceBuffers(t),this.pendingTracks={},this.doAppending())},i.onBufferReset=function(){var e=this.sourceBuffer;for(var t in e){var n=e[t];try{n&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(n),n.removeEventListener("updateend",this._onSBUpdateEnd),n.removeEventListener("error",this._onSBUpdateError))}catch(e){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},i.onBufferCodecs=function(e){var t=this;Object.keys(this.sourceBuffer).length||(Object.keys(e).forEach((function(n){t.pendingTracks[n]=e[n]})),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},i.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(var r in e)if(!t[r]){var i=e[r];if(!i)throw Error("source buffer exists for track "+r+", however track does not");var a=i.levelCodec||i.codec,o=i.container+";codecs="+a;c.logger.log("creating sourceBuffer("+o+")");try{var l=t[r]=n.addSourceBuffer(o);l.addEventListener("updateend",this._onSBUpdateEnd),l.addEventListener("error",this._onSBUpdateError),this.tracks[r]={buffer:l,codec:a,id:i.id,container:i.container,levelCodec:i.levelCodec}}catch(e){c.logger.error("error while trying to add sourceBuffer:"+e.message),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:e,mimeType:o})}}this.hls.trigger(u.default.BUFFER_CREATED,{tracks:this.tracks})},i.onBufferAppending=function(e){this._needsFlush||(this.segments?this.segments.push(e):this.segments=[e],this.doAppending())},i.onBufferEos=function(e){for(var t in this.sourceBuffer)if(!e.type||e.type===t){var n=this.sourceBuffer[t];n&&!n.ended&&(n.ended=!0,c.logger.log(t+" sourceBuffer now EOS"))}this.checkEos()},i.checkEos=function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var n in e){var r=e[n];if(r){if(!r.ended)return;if(r.updating)return void(this._needsEos=!0)}}c.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){c.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},i.onBufferFlushing=function(e){e.type?this.flushRange.push({start:e.startOffset,end:e.endOffset,type:e.type}):(this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"video"}),this.flushRange.push({start:e.startOffset,end:e.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},i.flushLiveBackBuffer=function(){if(this._live){var e=this.config.liveBackBufferLength;if(isFinite(e)&&!(e<0))if(this.media)for(var t=this.media.currentTime,n=this.sourceBuffer,r=Object.keys(n),i=t-Math.max(e,this._levelTargetDuration),a=r.length-1;a>=0;a--){var o=r[a],s=n[o];if(s){var l=s.buffered;l.length>0&&i>l.start(0)&&this.removeBufferRange(o,s,0,i)&&this.hls.trigger(u.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:i})}}else c.logger.error("flushLiveBackBuffer called without attaching media")}},i.onLevelUpdated=function(e){var t=e.details;t.fragments.length>0&&(this._levelDuration=t.totalduration+t.fragments[0].start,this._levelTargetDuration=t.averagetargetduration||t.targetduration||10,this._live=t.live,this.updateMediaElementDuration())},i.updateMediaElementDuration=function(){var e,t=this.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var n in this.sourceBuffer){var r=this.sourceBuffer[n];if(r&&!0===r.updating)return}e=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===t.liveDurationInfinity?(c.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>e||!Object(l.isFiniteNumber)(e))&&(c.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},i.doFlush=function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,n=this.sourceBuffer;try{for(var r in n){var i=n[r];i&&(t+=i.buffered.length)}}catch(e){c.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this.hls.trigger(u.default.BUFFER_FLUSHED)}},i.doAppending=function(){var e=this.config,t=this.hls,n=this.segments,r=this.sourceBuffer;if(Object.keys(r).length){if(!this.media||this.media.error)return this.segments=[],void c.logger.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var i=n.shift();if(i)try{var a=r[i.type];if(!a)return void this._onSBUpdateEnd();if(a.updating)return void n.unshift(i);a.ended=!1,this.parent=i.parent,a.appendBuffer(i.data),this.appendError=0,this.appended++,this.appending=!0}catch(r){c.logger.error("error while trying to append buffer:"+r.message),n.unshift(i);var o={type:s.ErrorTypes.MEDIA_ERROR,parent:i.parent,details:"",fatal:!1};22===r.code?(this.segments=[],o.details=s.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,o.details=s.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>e.appendErrorMaxRetry&&(c.logger.log("fail "+e.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],o.fatal=!0)),t.trigger(u.default.ERROR,o)}}}},i.flushBuffer=function(e,t,n){var r=this.sourceBuffer;if(!Object.keys(r).length)return!0;var i="null";if(this.media&&(i=this.media.currentTime.toFixed(3)),c.logger.log("flushBuffer,pos/start/end: "+i+"/"+e+"/"+t),this.flushBufferCounter>=this.appended)return c.logger.warn("abort flushing too many retries"),!0;var a=r[n];if(a){if(a.ended=!1,a.updating)return c.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(n,a,e,t))return this.flushBufferCounter++,!1}return c.logger.log("buffer flushed"),!0},i.removeBufferRange=function(e,t,n,r){try{for(var i=0;i<t.buffered.length;i++){var a=t.buffered.start(i),o=t.buffered.end(i),s=Math.max(a,n),l=Math.min(o,r);if(Math.min(l,o)-s>.5){var u="null";return this.media&&(u=this.media.currentTime.toString()),c.logger.log("sb remove "+e+" ["+s+","+l+"], of ["+a+","+o+"], pos:"+u),t.remove(s,l),!0}}}catch(e){c.logger.warn("removeBufferRange failed",e)}return!1},r}(f);function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var $e=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.FPS_DROP_LEVEL_CAPPING,u.default.MEDIA_ATTACHING,u.default.MANIFEST_PARSED,u.default.BUFFER_CODECS,u.default.MEDIA_DETACHING)||this).autoLevelCapping=Number.POSITIVE_INFINITY,n.firstLevel=null,n.levels=[],n.media=null,n.restrictedLevels=[],n.timer=null,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,s=r.prototype;return s.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this.stopCapping())},s.onFpsDropLevelCapping=function(e){r.isLevelAllowed(e.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(e.droppedLevel)},s.onMediaAttaching=function(e){this.media=e.media instanceof window.HTMLVideoElement?e.media:null},s.onManifestParsed=function(e){var t=this.hls;this.restrictedLevels=[],this.levels=e.levels,this.firstLevel=e.firstLevel,t.config.capLevelToPlayerSize&&e.video&&this.startCapping()},s.onBufferCodecs=function(e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},s.onLevelsUpdated=function(e){this.levels=e.levels},s.onMediaDetaching=function(){this.stopCapping()},s.detectPlayerSize=function(){if(this.media){var e=this.levels?this.levels.length:0;if(e){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e-1),t.autoLevelCapping>this.autoLevelCapping&&t.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},s.getMaxLevel=function(e){var t=this;if(!this.levels)return-1;var n=this.levels.filter((function(n,i){return r.isLevelAllowed(i,t.restrictedLevels)&&i<=e}));return r.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)},s.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},s.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},r.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},r.getMaxLevelByMediaSize=function(e,t,n){if(!e||e&&!e.length)return-1;for(var r,i,a=e.length-1,o=0;o<e.length;o+=1){var s=e[o];if((s.width>=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},i=r,o=[{key:"contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){}return e}}],(a=[{key:"mediaWidth",get:function(){var e,t=this.media;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=r.contentScaleFactor),e}},{key:"mediaHeight",get:function(){var e,t=this.media;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=r.contentScaleFactor),e}}])&&We(i.prototype,a),o&&We(i,o),r}(f),qe=window.performance,Xe=function(e){var t,n;function r(t){return e.call(this,t,u.default.MEDIA_ATTACHING)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},i.onMediaAttaching=function(e){var t=this.hls.config;t.capLevelOnFPSDrop&&("function"==typeof(this.video=e.media instanceof window.HTMLVideoElement?e.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),t.fpsDroppedMonitoringPeriod))},i.checkFPS=function(e,t,n){var r=qe.now();if(t){if(this.lastTime){var i=r-this.lastTime,a=n-this.lastDroppedFrames,o=t-this.lastDecodedFrames,s=1e3*a/i,l=this.hls;if(l.trigger(u.default.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),s>0&&a>l.config.fpsDroppedMonitoringThreshold*o){var d=l.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=d)&&(d-=1,l.trigger(u.default.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:l.currentLevel}),l.autoLevelCapping=d,l.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},i.checkFPSInterval=function(){var e=this.video;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},r}(f),Je=window,Qe=Je.performance,Ze=Je.XMLHttpRequest,et=function(){function e(e){e&&e.xhrSetup&&(this.xhrSetup=e.xhrSetup)}var t=e.prototype;return t.destroy=function(){this.abort(),this.loader=null},t.abort=function(){var e=this.loader;e&&4!==e.readyState&&(this.stats.aborted=!0,e.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},t.load=function(e,t,n){this.context=e,this.config=t,this.callbacks=n,this.stats={trequest:Qe.now(),retry:0},this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e,t=this.context;e=this.loader=new Ze;var n=this.stats;n.tfirst=0,n.loaded=0;var r=this.xhrSetup;try{if(r)try{r(e,t.url)}catch(n){e.open("GET",t.url,!0),r(e,t.url)}e.readyState||e.open("GET",t.url,!0)}catch(n){return void this.callbacks.onError({code:e.status,text:n.message},t,e)}t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()},t.readystatechange=function(e){var t=e.currentTarget,n=t.readyState,r=this.stats,i=this.context,a=this.config;if(!r.aborted&&n>=2)if(window.clearTimeout(this.requestTimeout),0===r.tfirst&&(r.tfirst=Math.max(Qe.now(),r.trequest)),4===n){var o=t.status;if(o>=200&&o<300){var s,l;r.tload=Math.max(r.tfirst,Qe.now()),l="arraybuffer"===i.responseType?(s=t.response).byteLength:(s=t.responseText).length,r.loaded=r.total=l;var u={url:t.responseURL,data:s};this.callbacks.onSuccess(u,r,i,t)}else r.retry>=a.maxRetry||o>=400&&o<499?(c.logger.error(o+" while loading "+i.url),this.callbacks.onError({code:o,text:t.statusText},i,t)):(c.logger.warn(o+" while loading "+i.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,a.maxRetryDelay),r.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),a.timeout)},t.loadtimeout=function(){c.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},t.loadprogress=function(e){var t=e.currentTarget,n=this.stats;n.loaded=e.loaded,e.lengthComputable&&(n.total=e.total);var r=this.callbacks.onProgress;r&&r(n,this.context,null,t)},e}();function tt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var nt=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MANIFEST_LOADING,u.default.MANIFEST_PARSED,u.default.AUDIO_TRACK_LOADED,u.default.AUDIO_TRACK_SWITCHED,u.default.LEVEL_LOADED,u.default.ERROR)||this)._trackId=-1,n._selectDefaultTrack=!0,n.tracks=[],n.trackIdBlacklist=Object.create(null),n.audioGroupId=null,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,l=r.prototype;return l.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},l.onManifestParsed=function(e){var t=this.tracks=e.audioTracks||[];this.hls.trigger(u.default.AUDIO_TRACKS_UPDATED,{audioTracks:t}),this._selectAudioGroup(this.hls.nextLoadLevel)},l.onAudioTrackLoaded=function(e){if(e.id>=this.tracks.length)c.logger.warn("Invalid audio track id:",e.id);else{if(c.logger.log("audioTrack "+e.id+" loaded"),this.tracks[e.id].details=e.details,e.details.live&&!this.hasInterval()){var t=1e3*e.details.targetduration;this.setInterval(t)}!e.details.live&&this.hasInterval()&&this.clearInterval()}},l.onAudioTrackSwitched=function(e){var t=this.tracks[e.id].groupId;t&&this.audioGroupId!==t&&(this.audioGroupId=t)},l.onLevelLoaded=function(e){this._selectAudioGroup(e.level)},l.onError=function(e){e.type===s.ErrorTypes.NETWORK_ERROR&&(e.fatal&&this.clearInterval(),e.details===s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(c.logger.warn("Network failure on audio-track id:",e.context.id),this._handleLoadError()))},l._setAudioTrack=function(e){if(this._trackId===e&&this.tracks[this._trackId].details)c.logger.debug("Same id as current audio-track passed, and track details available -> no-op");else if(e<0||e>=this.tracks.length)c.logger.warn("Invalid id passed to audio-track controller");else{var t=this.tracks[e];c.logger.log("Now switching to audio-track index "+e),this.clearInterval(),this._trackId=e;var n=t.url,r=t.type,i=t.id;this.hls.trigger(u.default.AUDIO_TRACK_SWITCHING,{id:i,type:r,url:n}),this._loadTrackDetailsIfNeeded(t)}},l.doTick=function(){this._updateTrack(this._trackId)},l._selectAudioGroup=function(e){var t=this.hls.levels[e];if(t&&t.audioGroupIds){var n=t.audioGroupIds[t.urlId];this.audioGroupId!==n&&(this.audioGroupId=n,this._selectInitialAudioTrack())}},l._selectInitialAudioTrack=function(){var e=this,t=this.tracks;if(t.length){var n=this.tracks[this._trackId],r=null;if(n&&(r=n.name),this._selectDefaultTrack){var i=t.filter((function(e){return e.default}));i.length?t=i:c.logger.warn("No default audio tracks defined")}var a=!1,o=function(){t.forEach((function(t){a||e.audioGroupId&&t.groupId!==e.audioGroupId||r&&r!==t.name||(e._setAudioTrack(t.id),a=!0)}))};o(),a||(r=null,o()),a||(c.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},l._needsTrackLoading=function(e){var t=e.details,n=e.url;return!(t&&!t.live||!n)},l._loadTrackDetailsIfNeeded=function(e){if(this._needsTrackLoading(e)){var t=e.url,n=e.id;c.logger.log("loading audio-track playlist for id: "+n),this.hls.trigger(u.default.AUDIO_TRACK_LOADING,{url:t,id:n})}},l._updateTrack=function(e){if(!(e<0||e>=this.tracks.length)){this.clearInterval(),this._trackId=e,c.logger.log("trying to update audio-track "+e);var t=this.tracks[e];this._loadTrackDetailsIfNeeded(t)}},l._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var e=this._trackId,t=this.tracks[e],n=t.name,r=t.language,i=t.groupId;c.logger.warn("Loading failed on audio track id: "+e+", group-id: "+i+', name/language: "'+n+'" / "'+r+'"');for(var a=e,o=0;o<this.tracks.length;o++)if(!this.trackIdBlacklist[o]&&this.tracks[o].name===n){a=o;break}a!==e?(c.logger.log("Attempting audio-track fallback id:",a,"group-id:",this.tracks[a].groupId),this._setAudioTrack(a)):c.logger.warn('No fallback audio-track found for name/language: "'+n+'" / "'+r+'"')},i=r,(a=[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this._trackId},set:function(e){this._setAudioTrack(e),this._selectDefaultTrack=!1}}])&&tt(i.prototype,a),o&&tt(i,o),r}(pe);function rt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var it=window.performance,at=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.AUDIO_TRACKS_UPDATED,u.default.AUDIO_TRACK_SWITCHING,u.default.AUDIO_TRACK_LOADED,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.FRAG_PARSING_INIT_SEGMENT,u.default.FRAG_PARSING_DATA,u.default.FRAG_PARSED,u.default.ERROR,u.default.BUFFER_RESET,u.default.BUFFER_CREATED,u.default.BUFFER_APPENDED,u.default.BUFFER_FLUSHED,u.default.INIT_PTS_FOUND)||this).fragmentTracker=n,r.config=t.config,r.audioCodecSwap=!1,r._state=me,r.initPTS=[],r.waitingFragment=null,r.videoTrackCC=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,d=r.prototype;return d.onInitPtsFound=function(e){var t=e.id,n=e.frag.cc,r=e.initPTS;"main"===t&&(this.initPTS[n]=r,this.videoTrackCC=n,c.logger.log("InitPTS for cc: "+n+" found from video track: "+r),this.state===xe&&this.tick())},d.startLoad=function(e){if(this.tracks){var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(c.logger.log("audio:override startPosition with lastCurrentTime @"+t.toFixed(3)),this.state=ye):(this.lastCurrentTime=this.startPosition?this.startPosition:e,this.state=ge),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=e,this.state=me},d.doTick=function(){var e,t,n,r=this.hls,i=r.config;switch(this.state){case Ce:case ve:case Se:break;case ge:this.state=Ee,this.loadedmetadata=!1;break;case ye:var a=this.tracks;if(!a)break;if(!this.media&&(this.startFragRequested||!i.startFragPrefetch))break;if(this.loadedmetadata)e=this.media.currentTime;else if(void 0===(e=this.nextLoadPosition))break;var o=this.mediaBuffer?this.mediaBuffer:this.media,s=this.videoBuffer?this.videoBuffer:this.media,d=G.bufferInfo(o,e,i.maxBufferHole),f=G.bufferInfo(s,e,i.maxBufferHole),h=d.len,p=d.end,m=this.fragPrevious,g=Math.min(i.maxBufferLength,i.maxMaxBufferLength),y=Math.max(g,f.len),v=this.audioSwitch,b=this.trackId;if((h<y||v)&&b<a.length){if(void 0===(n=a[b].details)){this.state=Ee;break}if(!v&&this._streamEnded(d,n))return this.hls.trigger(u.default.BUFFER_EOS,{type:"audio"}),void(this.state=ke);var _,A=n.fragments,E=A.length,T=A[0].start,w=A[E-1].start+A[E-1].duration;if(v)if(n.live&&!n.PTSKnown)c.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),p=0;else if(p=e,n.PTSKnown&&e<T){if(!(d.end>T||d.nextStart))return;c.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=T+.05}if(n.initSegment&&!n.initSegment.data)_=n.initSegment;else if(p<=T){if(_=A[0],null!==this.videoTrackCC&&_.cc!==this.videoTrackCC&&(_=function(e,t){return V.search(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}(A,this.videoTrackCC)),n.live&&_.loadIdx&&_.loadIdx===this.fragLoadIdx){var S=d.nextStart?d.nextStart:T;return c.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(S+.05)),void(this.media.currentTime=S+.05)}}else{var k,C=i.maxFragLookUpTolerance,x=m?A[m.sn-A[0].sn+1]:void 0,R=function(e){var t=Math.min(C,e.duration);return e.start+e.duration-t<=p?1:e.start-t>p&&e.start?-1:0};p<w?(p>w-C&&(C=0),k=x&&!R(x)?x:V.search(A,R)):k=A[E-1],k&&(_=k,T=k.start,m&&_.level===m.level&&_.sn===m.sn&&(_.sn<n.endSN?(_=A[_.sn+1-n.startSN],c.logger.log("SN just loaded, load next one: "+_.sn)):_=null))}_&&(_.encrypted?(c.logger.log("Loading key for "+_.sn+" of ["+n.startSN+" ,"+n.endSN+"],track "+b),this.state=be,r.trigger(u.default.KEY_LOADING,{frag:_})):(c.logger.log("Loading "+_.sn+", cc: "+_.cc+" of ["+n.startSN+" ,"+n.endSN+"],track "+b+", currentTime:"+e+",bufferEnd:"+p.toFixed(3)),this.fragCurrent=_,(v||this.fragmentTracker.getState(_)===N)&&("initSegment"!==_.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(_.sn)&&(this.nextLoadPosition=_.start+_.duration),r.trigger(u.default.FRAG_LOADING,{frag:_}),this.state=_e)))}break;case Ee:(t=this.tracks[this.trackId])&&t.details&&(this.state=ye);break;case Ae:var L=it.now(),I=this.retryDate,P=(o=this.media)&&o.seeking;(!I||L>=I||P)&&(c.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=ye);break;case xe:var j=this.videoTrackCC;if(void 0===this.initPTS[j])break;var O=this.waitingFragment;if(O){var D=O.frag.cc;j!==D?(t=this.tracks[this.trackId]).details&&t.details.live&&(c.logger.warn("Waiting fragment CC ("+D+") does not match video track CC ("+j+")"),this.waitingFragment=null,this.state=ye):(this.state=_e,this.onFragLoaded(this.waitingFragment),this.waitingFragment=null)}else this.state=ye}},d.onMediaAttached=function(e){var t=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),t.addEventListener("seeking",this.onvseeking),t.addEventListener("ended",this.onvended);var n=this.config;this.tracks&&n.autoStartLoad&&this.startLoad(n.startPosition)},d.onMediaDetaching=function(){var e=this.media;e&&e.ended&&(c.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},d.onAudioTracksUpdated=function(e){c.logger.log("audio tracks updated"),this.tracks=e.audioTracks},d.onAudioTrackSwitching=function(e){var t=!!e.url;this.trackId=e.id,this.fragCurrent=null,this.state=ve,this.waitingFragment=null,t?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),t&&(this.audioSwitch=!0,this.state=ye),this.tick()},d.onAudioTrackLoaded=function(e){var t=e.details,n=e.id,r=this.tracks[n],i=t.totalduration,a=0;if(c.logger.log("track "+n+" loaded ["+t.startSN+","+t.endSN+"],duration:"+i),t.live){var o=r.details;o&&t.fragments.length>0?(ne(o,t),a=t.fragments[0].start,t.PTSKnown?c.logger.log("live audio playlist sliding:"+a.toFixed(3)):c.logger.log("live audio playlist - outdated PTS, unknown sliding")):(t.PTSKnown=!1,c.logger.log("live audio playlist - first load, unknown sliding"))}else t.PTSKnown=!1;if(r.details=t,!this.startFragRequested){if(-1===this.startPosition){var s=t.startTimeOffset;Object(l.isFiniteNumber)(s)?(c.logger.log("start time offset found in playlist, adjust startPosition to "+s),this.startPosition=s):t.live?(this.startPosition=this.computeLivePosition(a,t),c.logger.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===Ee&&(this.state=ye),this.tick()},d.onKeyLoaded=function(){this.state===be&&(this.state=ye,this.tick())},d.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag;if(this.state===_e&&t&&"audio"===n.type&&n.level===t.level&&n.sn===t.sn){var r=this.tracks[this.trackId],i=r.details,a=i.totalduration,o=t.level,s=t.sn,l=t.cc,d=this.config.defaultAudioCodec||r.audioCodec||"mp4a.40.2",f=this.stats=e.stats;if("initSegment"===s)this.state=ye,f.tparsed=f.tbuffered=it.now(),i.initSegment.data=e.payload,this.hls.trigger(u.default.FRAG_BUFFERED,{stats:f,frag:t,id:"audio"}),this.tick();else{this.state=Te,this.appended=!1,this.demuxer||(this.demuxer=new Q(this.hls,"audio"));var h=this.initPTS[l],p=i.initSegment?i.initSegment.data:[];i.initSegment||void 0!==h?(this.pendingBuffering=!0,c.logger.log("Demuxing "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+o),this.demuxer.push(e.payload,p,d,null,t,a,!1,h)):(c.logger.log("unknown video PTS for continuity counter "+l+", waiting for video PTS before demuxing audio frag "+s+" of ["+i.startSN+" ,"+i.endSN+"],track "+o),this.waitingFragment=e,this.state=xe)}}this.fragLoadError=0},d.onFragParsingInitSegment=function(e){var t=this.fragCurrent,n=e.frag;if(t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Te){var r,i=e.tracks;if(i.video&&delete i.video,r=i.audio){r.levelCodec=r.codec,r.id=e.id,this.hls.trigger(u.default.BUFFER_CODECS,i),c.logger.log("audio track:audio,container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var a=r.initSegment;if(a){var o={type:"audio",data:a,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[o]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(u.default.BUFFER_APPENDING,o))}this.tick()}}},d.onFragParsingData=function(e){var t=this,n=this.fragCurrent,r=e.frag;if(n&&"audio"===e.id&&"audio"===e.type&&r.sn===n.sn&&r.level===n.level&&this.state===Te){var i=this.trackId,a=this.tracks[i],o=this.hls;Object(l.isFiniteNumber)(e.endPTS)||(e.endPTS=e.startPTS+n.duration,e.endDTS=e.startDTS+n.duration),n.addElementaryStream(m.AUDIO),c.logger.log("parsed "+e.type+",PTS:["+e.startPTS.toFixed(3)+","+e.endPTS.toFixed(3)+"],DTS:["+e.startDTS.toFixed(3)+"/"+e.endDTS.toFixed(3)+"],nb:"+e.nb),te(a.details,n,e.startPTS,e.endPTS);var d=this.audioSwitch,f=this.media,h=!1;if(d)if(f&&f.readyState){var p=f.currentTime;c.logger.log("switching audio track : currentTime:"+p),p>=e.startPTS&&(c.logger.log("switching audio track : flushing all audio"),this.state=Se,o.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),h=!0,this.audioSwitch=!1,o.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:i}))}else this.audioSwitch=!1,o.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:i});var g=this.pendingData;if(!g)return c.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void o.trigger(u.default.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([e.data1,e.data2].forEach((function(t){t&&t.length&&g.push({type:e.type,data:t,parent:"audio",content:"data"})})),!h&&g.length&&(g.forEach((function(e){t.state===Te&&(t.pendingBuffering=!0,t.hls.trigger(u.default.BUFFER_APPENDING,e))})),this.pendingData=[],this.appended=!0)),this.tick()}},d.onFragParsed=function(e){var t=this.fragCurrent,n=e.frag;t&&"audio"===e.id&&n.sn===t.sn&&n.level===t.level&&this.state===Te&&(this.stats.tparsed=it.now(),this.state=we,this._checkAppendedParsed())},d.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},d.onBufferCreated=function(e){var t=e.tracks.audio;t&&(this.mediaBuffer=t.buffer,this.loadedmetadata=!0),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},d.onBufferAppended=function(e){if("audio"===e.parent){var t=this.state;t!==Te&&t!==we||(this.pendingBuffering=e.pending>0,this._checkAppendedParsed())}},d._checkAppendedParsed=function(){if(!(this.state!==we||this.appended&&this.pendingBuffering)){var e=this.fragCurrent,t=this.stats,n=this.hls;if(e){this.fragPrevious=e,t.tbuffered=it.now(),n.trigger(u.default.FRAG_BUFFERED,{stats:t,frag:e,id:"audio"});var r=this.mediaBuffer?this.mediaBuffer:this.media;r&&c.logger.log("audio buffered : "+ae.toString(r.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,n.trigger(u.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=ye}this.tick()}},d.onError=function(e){var t=e.frag;if(!t||"audio"===t.type)switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:var n=e.frag;if(n&&"audio"!==n.type)break;if(!e.fatal){var r=this.fragLoadError;r?r++:r=1;var i=this.config;if(r<=i.fragLoadingMaxRetry){this.fragLoadError=r;var a=Math.min(Math.pow(2,r-1)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);c.logger.warn("AudioStreamController: frag loading failed, retry in "+a+" ms"),this.retryDate=it.now()+a,this.state=Ae}else c.logger.error("AudioStreamController: "+e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.state=Ce}break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==Ce&&(this.state=e.fatal?Ce:ye,c.logger.warn("AudioStreamController: "+e.details+" while loading frag, now switching to "+this.state+" state ..."));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===e.parent&&(this.state===Te||this.state===we)){var o=this.mediaBuffer,l=this.media.currentTime;if(o&&G.isBuffered(o,l)&&G.isBuffered(o,l+.5)){var d=this.config;d.maxMaxBufferLength>=d.maxBufferLength&&(d.maxMaxBufferLength/=2,c.logger.warn("AudioStreamController: reduce max buffer length to "+d.maxMaxBufferLength+"s")),this.state=ye}else c.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=Se,this.hls.trigger(u.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},d.onBufferFlushed=function(){var e=this,t=this.pendingData;t&&t.length?(c.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),t.forEach((function(t){e.hls.trigger(u.default.BUFFER_APPENDING,t)})),this.appended=!0,this.pendingData=[],this.state=we):(this.state=ye,this.fragPrevious=null,this.tick())},i=r,(a=[{key:"state",set:function(e){if(this.state!==e){var t=this.state;this._state=e,c.logger.log("audio stream:"+t+"->"+e)}},get:function(){return this._state}}])&&rt(i.prototype,a),o&&rt(i,o),r}(Le),ot=function(){if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var e={"":!0,lr:!0,rl:!0},t={start:!0,middle:!0,end:!0,left:!0,right:!0};function n(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}function r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}function i(t,i,a){var o=this,s={enumerable:!0};o.hasBeenReset=!1;var l="",u=!1,c=t,d=i,f=a,h=null,p="",m=!0,g="auto",y="start",v=50,b="middle",_=50,A="middle";Object.defineProperty(o,"id",r({},s,{get:function(){return l},set:function(e){l=""+e}})),Object.defineProperty(o,"pauseOnExit",r({},s,{get:function(){return u},set:function(e){u=!!e}})),Object.defineProperty(o,"startTime",r({},s,{get:function(){return c},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");c=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"endTime",r({},s,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"text",r({},s,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(o,"region",r({},s,{get:function(){return h},set:function(e){h=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"vertical",r({},s,{get:function(){return p},set:function(t){var n=function(t){return"string"==typeof t&&!!e[t.toLowerCase()]&&t.toLowerCase()}(t);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");p=n,this.hasBeenReset=!0}})),Object.defineProperty(o,"snapToLines",r({},s,{get:function(){return m},set:function(e){m=!!e,this.hasBeenReset=!0}})),Object.defineProperty(o,"line",r({},s,{get:function(){return g},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"lineAlign",r({},s,{get:function(){return y},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"position",r({},s,{get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"positionAlign",r({},s,{get:function(){return b},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(o,"size",r({},s,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(o,"align",r({},s,{get:function(){return A},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");A=t,this.hasBeenReset=!0}})),o.displayState=void 0}return i.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},i}(),st=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};function lt(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new st,this.regionList=[]}function ut(){this.values=Object.create(null)}function ct(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}ut.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var dt=new ot(0,0,0),ft="middle"===dt.align?"middle":"center";function ht(e,t,n){var r=e;function i(){var t=function(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),a(),t.endTime=i(),a(),function(e,t){var r=new ut;ct(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start",ft,"end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start",ft,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",ft,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===dt.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",ft);var a=r.get("position","auto");"auto"===a&&50===dt.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function pt(e){return e.replace(/<br(?: \/)?>/gi,"\n")}lt.prototype={parse:function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=pt(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var i=(r=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!i||!i[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:r=n(),t.state){case"HEADER":/:/.test(r)?ct(r,(function(e,t){}),/:/):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 ot(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{ht(r,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var o=-1!==r.indexOf("--\x3e");if(!r||o&&(a=!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(e){"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(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new Error("Malformed WebVTT signature.")}catch(e){throw e}return this.onflush&&this.onflush(),this}};var mt=lt;function gt(e,t,n,r){for(var i,a,o,s,l,u=window.VTTCue||TextTrackCue,c=0;c<r.rows.length;c++)if(o=!0,s=0,l="",!(i=r.rows[c]).isEmpty()){for(var d=0;d<i.chars.length;d++)i.chars[d].uchar.match(/\s/)&&o?s++:(l+=i.chars[d].uchar,o=!1);i.cueStartTime=t,t===n&&(n+=1e-4),a=new u(t,n,pt(l.trim())),s>=16?s--:s++,navigator.userAgent.match(/Firefox\//)?a.line=c+1:a.line=c>7?c-2:c+1,a.align="left",a.position=Math.max(0,Math.min(100,s/32*100)),e.addCue(a)}}var yt,vt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},bt=function(e){var t=e;return vt.hasOwnProperty(e)&&(t=vt[e]),String.fromCharCode(t)},_t={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},At={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Et={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Tt={25:2,26:4,29:6,30:8,31:10,27:13,28:15},wt=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(yt||(yt={}));var St={verboseFilter:{DATA:3,DEBUG:3,INFO:2,WARNING:2,TEXT:1,ERROR:0},time:null,verboseLevel:0,setTime:function(e){this.time=e},log:function(e,t){this.verboseFilter[e],this.verboseLevel}},kt=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},Ct=function(){function e(e,t,n,r,i){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),xt=function(){function e(e,t,n,r,i,a){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new Ct(t,n,r,i,a)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),Rt=function(){function e(){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.chars=[];for(var e=0;e<100;e++)this.chars.push(new xt);this.pos=0,this.currPenState=new Ct}var t=e.prototype;return t.equals=function(e){for(var t=!0,n=0;n<100;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<100;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<100;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(St.log("ERROR","Negative cursor position "+this.pos),this.pos=0):this.pos>100&&(St.log("ERROR","Too large cursor position "+this.pos),this.pos=100)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){e>=144&&this.backSpace();var t=bt(e);this.pos>=100?St.log("ERROR","Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<100;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<100;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),Lt=function(){function e(){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.rows=[];for(var e=0;e<15;e++)this.rows.push(new Rt);this.currRow=14,this.nrRollUpRows=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){St.log("INFO","setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){St.log("INFO","pacData = "+JSON.stringify(e));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<15;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var a=i.rows[r].cueStartTime;if(a&&St.time&&a<St.time)for(var o=0;o<this.nrRollUpRows;o++)this.rows[t-this.nrRollUpRows+o+1].copy(i.rows[r+o])}}this.currRow=t;var s=this.rows[this.currRow];if(null!==e.indent){var l=e.indent,u=Math.max(l-1,0);s.setCursor(e.indent),e.color=s.chars[u].penState.foreground}var c={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(c)},t.setBkgData=function(e){St.log("INFO","bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){if(null!==this.nrRollUpRows){St.log("TEXT",this.getDisplayText());var e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),St.log("INFO","Rolling up")}else St.log("DEBUG","roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<15;i++){var a=this.rows[i].getTextString();a&&(r=i+1,e?t.push("Row "+r+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),It=function(){function e(e,t){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.lastCueEndTime=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Lt,this.nonDisplayedMemory=new Lt,this.lastOutputScreen=new Lt,this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,St.log("INFO","MODE="+e),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=0;t<e.length;t++)this.writeScreen.insertChar(e[t]);var n=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";St.log("INFO",n+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(St.log("TEXT","DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},t.ccRCL=function(){St.log("INFO","RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){St.log("INFO","BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){St.log("INFO","DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){St.log("INFO","RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){St.log("INFO","FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){St.log("INFO","RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){St.log("INFO","TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){St.log("INFO","RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){St.log("INFO","EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){St.log("INFO","CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){St.log("INFO","ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){if(St.log("INFO","EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,St.log("TEXT","DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},t.ccTO=function(e){St.log("INFO","TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}St.log("INFO","MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=St.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}(),Pt=function(){function e(e,t,n){this.field=void 0,this.outputs=void 0,this.channels=void 0,this.currChNr=void 0,this.lastCmdA=void 0,this.lastCmdB=void 0,this.lastTime=void 0,this.dataCounters=void 0,this.field=e||1,this.outputs=[t,n],this.channels=[new It(1,t),new It(2,n)],this.currChNr=-1,this.lastCmdA=null,this.lastCmdB=null,this.lastTime=null,this.dataCounters={padding:0,char:0,cmd:0,other:0}}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,r,i,a=!1;this.lastTime=e,St.setTime(e);for(var o=0;o<t.length;o+=2)r=127&t[o],i=127&t[o+1],0!==r||0!==i?(St.log("DATA","["+kt([t[o],t[o+1]])+"] -> ("+kt([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),n||(a=this.parseChars(r,i))&&(this.currChNr&&this.currChNr>=0?this.channels[this.currChNr-1].insertChars(a):St.log("WARNING","No channel found yet. TEXT-MODE?")),n?this.dataCounters.cmd+=2:a?this.dataCounters.char+=2:(this.dataCounters.other+=2,St.log("WARNING","Couldn't parse cleaned data "+kt([r,i])+" orig: "+kt([t[o],t[o+1]])))):this.dataCounters.padding+=2},t.parseCmd=function(e,t){var n=null;if(!((20===e||28===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,St.log("DEBUG","Repeated command ("+kt([e,t])+") is dropped"),!0;n=20===e||23===e?1:2;var r=this.channels[n-1];return 20===e||28===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},t.parseMidrow=function(e,t){var n=null;return(17===e||25===e)&&t>=32&&t<=47&&((n=17===e?1:2)!==this.currChNr?(St.log("ERROR","Mismatch channel in midrow parsing"),!1):(this.channels[n-1].ccMIDROW(t),St.log("DEBUG","MIDROW ("+kt([e,t])+")"),!0))},t.parsePAC=function(e,t){var n,r=null;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(e===this.lastCmdA&&t===this.lastCmdB)return this.lastCmdA=null,this.lastCmdB=null,!0;n=e<=23?1:2,r=t>=64&&t<=95?1===n?_t[e]:Et[e]:1===n?At[e]:Tt[e];var i=this.interpretPAC(r,t);return this.channels[n-1].setPAC(i),this.lastCmdA=e,this.lastCmdB=t,this.currChNr=n,!0},t.interpretPAC=function(e,t){var n=t,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n=null,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){var a=t;a=17===i?t+80:18===i?t+112:t+144,St.log("INFO","Special char '"+bt(a)+"' in channel "+n),r=[a]}else e>=32&&e<=127&&(r=0===t?[e]:[e,t]);if(r){var o=kt(r);St.log("DEBUG","Char codes = "+o.join(",")),this.lastCmdA=null,this.lastCmdB=null}return r},t.parseBackgroundAttributes=function(e,t){var n,r,i;return((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47)&&(n={},16===e||24===e?(r=Math.floor((t-32)/2),n.background=wt[r],t%2==1&&(n.background=n.background+"_semi")):45===t?n.background="transparent":(n.foreground="black",47===t&&(n.underline=!0)),i=e<24?1:2,this.channels[i-1].setBkgData(n),this.lastCmdA=null,this.lastCmdB=null,!0)},t.reset=function(){for(var e=0;e<this.channels.length;e++)this.channels[e]&&this.channels[e].reset();this.lastCmdA=null,this.lastCmdB=null},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++)this.channels[t]&&this.channels[t].cueSplitAtTime(e)},e}(),jt=function(){function e(e,t){this.timelineController=void 0,this.trackName=void 0,this.startTime=void 0,this.endTime=void 0,this.screen=void 0,this.timelineController=e,this.trackName=t,this.startTime=null,this.endTime=null,this.screen=null}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen),this.startTime=null)},t.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},e}(),Ot=function(e,t,n){return e.substr(n||0,t.length)===t},Dt=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()},Mt={parse:function(e,t,n,r,i,a){var o,s=Object(Me.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),u="00:00.000",c=0,d=0,f=0,h=[],p=!0,m=!1,g=new mt;g.oncue=function(e){var t=n[r],i=n.ccOffset;t&&t.new&&(void 0!==d?i=n.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;i&&i.new;)e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC];e.presentationOffset=n}(n,r,f)),f&&(i=f-n.presentationOffset),m&&(e.startTime+=i-d,e.endTime+=i-d),e.id=Dt(e.startTime.toString())+Dt(e.endTime.toString())+Dt(e.text),e.text=decodeURIComponent(encodeURIComponent(e.text)),e.endTime>0&&h.push(e)},g.onparsingerror=function(e){o=e},g.onflush=function(){o&&a?a(o):i(h)},s.forEach((function(e){if(p){if(Ot(e,"X-TIMESTAMP-MAP=")){p=!1,m=!0,e.substr(16).split(",").forEach((function(e){Ot(e,"LOCAL:")?u=e.substr(6):Ot(e,"MPEGTS:")&&(c=parseInt(e.substr(7)))}));try{t+(9e4*n[r].start||0)<0&&(t+=8589934592),c-=t,d=function(e){var t=parseInt(e.substr(-3)),n=parseInt(e.substr(-6,2)),r=parseInt(e.substr(-9,2)),i=e.length>9?parseInt(e.substr(0,e.indexOf(":"))):0;if(!(Object(l.isFiniteNumber)(t)&&Object(l.isFiniteNumber)(n)&&Object(l.isFiniteNumber)(r)&&Object(l.isFiniteNumber)(i)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,t+=6e4*r,t+=36e5*i}(u)/1e3,f=c/9e4}catch(e){m=!1,o=e}return}""===e&&(p=!1)}g.parse(e+"\n")})),g.flush()}};function Nt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ut(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}var Ft=function(e){var t,n;function r(t){var n;if((n=e.call(this,t,u.default.MEDIA_ATTACHING,u.default.MEDIA_DETACHING,u.default.FRAG_PARSING_USERDATA,u.default.FRAG_DECRYPTED,u.default.MANIFEST_LOADING,u.default.MANIFEST_LOADED,u.default.FRAG_LOADED,u.default.INIT_PTS_FOUND)||this).media=null,n.config=void 0,n.enabled=!0,n.Cues=void 0,n.textTracks=[],n.tracks=[],n.initPTS=[],n.unparsedVttFrags=[],n.cueRanges=[],n.captionsTracks={},n.captionsProperties=void 0,n.cea608Parser=void 0,n.lastSn=-1,n.prevCC=-1,n.vttCCs=null,n.hls=t,n.config=t.config,n.Cues=t.config.cueHandler,n.captionsProperties={textTrack1:{label:n.config.captionsTextTrack1Label,languageCode:n.config.captionsTextTrack1LanguageCode},textTrack2:{label:n.config.captionsTextTrack2Label,languageCode:n.config.captionsTextTrack2LanguageCode}},n.config.enableCEA708Captions){var r=new jt(Nt(n),"textTrack1"),i=new jt(Nt(n),"textTrack2");n.cea608Parser=new Pt(0,r,i)}return n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addCues=function(e,t,n,r){for(var i,a,o,s,l=this.cueRanges,u=!1,c=l.length;c--;){var d=l[c],f=(i=d[0],a=d[1],o=t,s=n,Math.min(a,s)-Math.max(i,o));if(f>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),u=!0,f/(n-t)>.5))return}u||l.push([t,n]),this.Cues.newCue(this.captionsTracks[e],t,n,r)},i.onInitPtsFound=function(e){var t=this,n=e.frag,r=e.id,i=e.initPTS,a=this.unparsedVttFrags;"main"===r&&(this.initPTS[n.cc]=i),a.length&&(this.unparsedVttFrags=[],a.forEach((function(e){t.onFragLoaded(e)})))},i.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var r=t.textTracks[n];if(r[e])return r}return null},i.createCaptionsTrack=function(e){var t=this.captionsProperties,n=this.captionsTracks,r=this.media,i=t[e],a=i.label,o=i.languageCode;if(!n[e]){var s=this.getExistingTrack(e);if(s)n[e]=s,Ue(n[e]),Ne(n[e],r);else{var l=this.createTextTrack("captions",a,o);l&&(l[e]=!0,n[e]=l)}}},i.createTextTrack=function(e,t,n){var r=this.media;if(r)return r.addTextTrack(e,t,n)},i.destroy=function(){e.prototype.destroy.call(this)},i.onMediaAttaching=function(e){this.media=e.media,this._cleanTracks()},i.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Ue(e[t]),delete e[t]}))},i.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks()},i._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)Ue(t[n])}},i.onManifestLoaded=function(e){var t=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.cueRanges=[],this.config.enableWebVTT){this.tracks=e.subtitles||[];var n=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,r){var i;if(r<n.length){for(var a=null,o=0;o<n.length;o++)if(Ut(n[o],e)){a=n[o];break}a&&(i=a)}i||(i=t.createTextTrack("subtitles",e.name,e.lang)),e.default?i.mode=t.hls.subtitleDisplay?"showing":"hidden":i.mode="disabled",t.textTracks.push(i)}))}},i.onFragLoaded=function(e){var t=e.frag,n=e.payload,r=this.cea608Parser,i=this.initPTS,a=this.lastSn,o=this.unparsedVttFrags;if("main"===t.type){var s=t.sn;t.sn!==a+1&&r&&r.reset(),this.lastSn=s}else if("subtitle"===t.type)if(n.byteLength){if(!Object(l.isFiniteNumber)(i[t.cc]))return o.push(e),void(i.length&&this.hls.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t}));var c=t.decryptdata;null!=c&&null!=c.key&&"AES-128"===c.method||this._parseVTTs(t,n)}else this.hls.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})},i._parseVTTs=function(e,t){var n=this.hls,r=this.prevCC,i=this.textTracks,a=this.vttCCs;a[e.cc]||(a[e.cc]={start:e.start,prevCC:r,new:!0},this.prevCC=e.cc),Mt.parse(t,this.initPTS[e.cc],a,e.cc,(function(t){var r=i[e.level];"disabled"!==r.mode?(t.forEach((function(e){if(!r.cues.getCueById(e.id))try{if(r.addCue(e),!r.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(n){c.logger.debug("Failed occurred on adding cues: "+n);var t=new window.TextTrackCue(e.startTime,e.endTime,e.text);t.id=e.id,r.addCue(t)}})),n.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})):n.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})}),(function(t){c.logger.log("Failed to parse VTT cue: "+t),n.trigger(u.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})}))},i.onFragDecrypted=function(e){var t=e.frag,n=e.payload;if("subtitle"===t.type){if(!Object(l.isFiniteNumber)(this.initPTS[t.cc]))return void this.unparsedVttFrags.push(e);this._parseVTTs(t,n)}},i.onFragParsingUserdata=function(e){if(this.enabled&&this.cea608Parser)for(var t=0;t<e.samples.length;t++){var n=e.samples[t].bytes;if(n){var r=this.extractCea608Data(n);this.cea608Parser.addData(e.samples[t].pts,r)}}},i.extractCea608Data=function(e){for(var t,n,r,i=31&e[0],a=2,o=[],s=0;s<i;s++)t=e[a++],n=127&e[a++],r=127&e[a++],0===n&&0===r||0!=(4&t)&&0==(3&t)&&(o.push(n),o.push(r));return o},r}(f);function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kt(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"subtitles"===r.kind&&r.label&&t.push(e[n])}return t}var Vt,Gt=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.MANIFEST_LOADED,u.default.SUBTITLE_TRACK_LOADED)||this).tracks=[],n.trackId=-1,n.media=null,n.stopped=!0,n.subtitleDisplay=!0,n.queuedDefaultTrack=null,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,s=r.prototype;return s.destroy=function(){f.prototype.destroy.call(this)},s.onMediaAttached=function(e){var t=this;this.media=e.media,this.media&&(Object(l.isFiniteNumber)(this.queuedDefaultTrack)&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=null),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval((function(){t.trackChangeListener()}),500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},s.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),Object(l.isFiniteNumber)(this.subtitleTrack)&&(this.queuedDefaultTrack=this.subtitleTrack),Kt(this.media.textTracks).forEach((function(e){Ue(e)})),this.subtitleTrack=-1,this.media=null)},s.onManifestLoaded=function(e){var t=this,n=e.subtitles||[];this.tracks=n,this.hls.trigger(u.default.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:n}),n.forEach((function(e){e.default&&(t.media?t.subtitleTrack=e.id:t.queuedDefaultTrack=e.id)}))},s.onSubtitleTrackLoaded=function(e){var t=this,n=e.id,r=e.details,i=this.trackId,a=this.tracks,o=a[i];if(n>=a.length||n!==i||!o||this.stopped)this._clearReloadTimer();else if(c.logger.log("subtitle track "+n+" loaded"),r.live){var s=ie(o.details,r,e.stats.trequest);c.logger.log("Reloading live subtitle playlist in "+s+"ms"),this.timer=setTimeout((function(){t._loadCurrentTrack()}),s)}else this._clearReloadTimer()},s.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},s.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},s._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},s._loadCurrentTrack=function(){var e=this.trackId,t=this.tracks,n=this.hls,r=t[e];e<0||!r||r.details&&!r.details.live||(c.logger.log("Loading subtitle track "+e),n.trigger(u.default.SUBTITLE_TRACK_LOADING,{url:r.url,id:e}))},s._toggleTrackModes=function(e){var t=this.media,n=this.subtitleDisplay,r=this.trackId;if(t){var i=Kt(t.textTracks);if(-1===e)[].slice.call(i).forEach((function(e){e.mode="disabled"}));else{var a=i[r];a&&(a.mode="disabled")}var o=i[e];o&&(o.mode=n?"showing":"hidden")}},s._setSubtitleTrackInternal=function(e){var t=this.hls,n=this.tracks;!Object(l.isFiniteNumber)(e)||e<-1||e>=n.length||(this.trackId=e,c.logger.log("Switching to subtitle track "+e),t.trigger(u.default.SUBTITLE_TRACK_SWITCH,{id:e}),this._loadCurrentTrack())},s._onTextTracksChanged=function(){if(this.media){for(var e=-1,t=Kt(this.media.textTracks),n=0;n<t.length;n++)if("hidden"===t[n].mode)e=n;else if("showing"===t[n].mode){e=n;break}this.subtitleTrack=e}},i=r,(a=[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.trackId!==e&&(this._toggleTrackModes(e),this._setSubtitleTrackInternal(e))}}])&&Bt(i.prototype,a),o&&Bt(i,o),r}(f),Ht=n("./src/crypt/decrypter.js"),Yt=window.performance,zt=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHING,u.default.ERROR,u.default.KEY_LOADED,u.default.FRAG_LOADED,u.default.SUBTITLE_TRACKS_UPDATED,u.default.SUBTITLE_TRACK_SWITCH,u.default.SUBTITLE_TRACK_LOADED,u.default.SUBTITLE_FRAG_PROCESSED,u.default.LEVEL_UPDATED)||this).fragmentTracker=n,r.config=t.config,r.state=me,r.tracks=[],r.tracksBuffered=[],r.currentTrackId=-1,r.decrypter=new Ht.default(t,t.config),r.lastAVStart=0,r._onMediaSeeking=r.onMediaSeeking.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r)),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.onSubtitleFragProcessed=function(e){var t=e.frag,n=e.success;if(this.fragPrevious=t,this.state=ye,n){var r=this.tracksBuffered[this.currentTrackId];if(r){for(var i,a=t.start,o=0;o<r.length;o++)if(a>=r[o].start&&a<=r[o].end){i=r[o];break}var s=t.start+t.duration;i?i.end=s:(i={start:a,end:s},r.push(i))}}},i.onMediaAttached=function(e){var t=e.media;this.media=t,t.addEventListener("seeking",this._onMediaSeeking),this.state=ye},i.onMediaDetaching=function(){var e=this;this.media&&(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach((function(t){e.tracksBuffered[t.id]=[]})),this.media=null,this.state=me)},i.onError=function(e){var t=e.frag;t&&"subtitle"===t.type&&(this.state=ye)},i.onSubtitleTracksUpdated=function(e){var t=this;c.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=e.subtitleTracks,this.tracks.forEach((function(e){t.tracksBuffered[e.id]=[]}))},i.onSubtitleTrackSwitch=function(e){if(this.currentTrackId=e.id,this.tracks&&this.tracks.length&&-1!==this.currentTrackId){var t=this.tracks[this.currentTrackId];t&&t.details&&this.setInterval(500)}else this.clearInterval()},i.onSubtitleTrackLoaded=function(e){var t=e.id,n=e.details,r=this.currentTrackId,i=this.tracks,a=i[r];t>=i.length||t!==r||!a||(n.live&&function(e,t,n){void 0===n&&(n=0);var r=-1;re(e,t,(function(e,t,n){t.start=e.start,r=n}));var i=t.fragments;if(r<0)i.forEach((function(e){e.start+=n}));else for(var a=r+1;a<i.length;a++)i[a].start=i[a-1].start+i[a-1].duration}(a.details,n,this.lastAVStart),a.details=n,this.setInterval(500))},i.onKeyLoaded=function(){this.state===be&&(this.state=ye)},i.onFragLoaded=function(e){var t=this.fragCurrent,n=e.frag.decryptdata,r=e.frag,i=this.hls;if(this.state===_e&&t&&"subtitle"===e.frag.type&&t.sn===e.frag.sn&&e.payload.byteLength>0&&n&&n.key&&"AES-128"===n.method){var a=Yt.now();this.decrypter.decrypt(e.payload,n.key.buffer,n.iv.buffer,(function(e){var t=Yt.now();i.trigger(u.default.FRAG_DECRYPTED,{frag:r,payload:e,stats:{tstart:a,tdecrypt:t}})}))}},i.onLevelUpdated=function(e){var t=e.details.fragments;this.lastAVStart=t.length?t[0].start:0},i.doTick=function(){if(this.media)switch(this.state){case ye:var e=this.config,t=this.currentTrackId,n=this.fragmentTracker,r=this.media,i=this.tracks;if(!i||!i[t]||!i[t].details)break;var a,o=e.maxBufferHole,s=e.maxFragLookUpTolerance,l=Math.min(e.maxBufferLength,e.maxMaxBufferLength),d=G.bufferedInfo(this._getBuffered(),r.currentTime,o),f=d.end,h=d.len,p=i[t].details,m=p.fragments,g=m.length,y=m[g-1].start+m[g-1].duration;if(h>l)return;var v=this.fragPrevious;f<y?(v&&p.hasProgramDateTime&&(a=le(m,v.endProgramDateTime,s)),a||(a=ue(v,m,f,s))):a=m[g-1],a&&a.encrypted?(c.logger.log("Loading key for "+a.sn),this.state=be,this.hls.trigger(u.default.KEY_LOADING,{frag:a})):a&&n.getState(a)===N&&(this.fragCurrent=a,this.state=_e,this.hls.trigger(u.default.FRAG_LOADING,{frag:a}))}else this.state=ye},i.stopLoad=function(){this.lastAVStart=0,e.prototype.stopLoad.call(this)},i._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},i.onMediaSeeking=function(){this.fragPrevious=null},r}(Le);!function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(Vt||(Vt={}));var Wt="undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null;function $t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var qt=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,u.default.MEDIA_ATTACHED,u.default.MEDIA_DETACHED,u.default.MANIFEST_PARSED)||this)._widevineLicenseUrl=void 0,n._licenseXhrSetup=void 0,n._emeEnabled=void 0,n._requestMediaKeySystemAccess=void 0,n._config=void 0,n._mediaKeysList=[],n._media=null,n._hasSetMediaKeys=!1,n._requestLicenseFailureCount=0,n._onMediaEncrypted=function(e){c.logger.log('Media is encrypted using "'+e.initDataType+'" init data type'),n._attemptSetMediaKeys(),n._generateRequestWithPreferredKeySession(e.initDataType,e.initData)},n._config=t.config,n._widevineLicenseUrl=n._config.widevineLicenseUrl,n._licenseXhrSetup=n._config.licenseXhrSetup,n._emeEnabled=n._config.emeEnabled,n._requestMediaKeySystemAccess=n._config.requestMediaKeySystemAccessFunc,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o,l=r.prototype;return l.getLicenseServerUrl=function(e){switch(e){case Vt.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+e+'"')},l._attemptKeySystemAccess=function(e,t,n){var r=this,i=function(e,t,n){switch(e){case Vt.WIDEVINE:return function(e,t){var n={videoCapabilities:[]};return t.forEach((function(e){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+e+'"'})})),[n]}(0,n);default:throw new Error("Unknown key-system: "+e)}}(e,0,n);c.logger.log("Requesting encrypted media key-system access"),this.requestMediaKeySystemAccess(e,i).then((function(t){r._onMediaKeySystemAccessObtained(e,t)})).catch((function(t){c.logger.error('Failed to obtain key-system "'+e+'" access:',t)}))},l._onMediaKeySystemAccessObtained=function(e,t){var n=this;c.logger.log('Access for key-system "'+e+'" obtained');var r={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:e};this._mediaKeysList.push(r),t.createMediaKeys().then((function(t){r.mediaKeys=t,c.logger.log('Media-keys created for key-system "'+e+'"'),n._onMediaKeysCreated()})).catch((function(e){c.logger.error("Failed to create media-keys:",e)}))},l._onMediaKeysCreated=function(){var e=this;this._mediaKeysList.forEach((function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),e._onNewMediaKeySession(t.mediaKeysSession))}))},l._onNewMediaKeySession=function(e){var t=this;c.logger.log("New key-system session "+e.sessionId),e.addEventListener("message",(function(n){t._onKeySessionMessage(e,n.message)}),!1)},l._onKeySessionMessage=function(e,t){c.logger.log("Got EME message event, creating license request"),this._requestLicense(t,(function(t){c.logger.log("Received license data (length: "+(t?t.byteLength:t)+"), updating key-session"),e.update(t)}))},l._attemptSetMediaKeys=function(){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys)return c.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});c.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},l._generateRequestWithPreferredKeySession=function(e,t){var n=this,r=this._mediaKeysList[0];if(!r)return c.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(r.mediaKeysSessionInitialized)c.logger.warn("Key-Session already initialized but requested again");else{var i=r.mediaKeysSession;if(!i)return c.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!t)return c.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});c.logger.log('Generating key-session request for "'+e+'" init data type'),r.mediaKeysSessionInitialized=!0,i.generateRequest(e,t).then((function(){c.logger.debug("Key-session generation succeeded")})).catch((function(e){c.logger.error("Error generating key-session request:",e),n.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},l._createLicenseXhr=function(e,t,n){var r=new XMLHttpRequest,i=this._licenseXhrSetup;try{if(i)try{i(r,e)}catch(t){r.open("POST",e,!0),i(r,e)}r.readyState||r.open("POST",e,!0)}catch(e){throw new Error("issue setting up KeySystem license XHR "+e)}return r.responseType="arraybuffer",r.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,r,e,t,n),r},l._onLicenseRequestReadyStageChange=function(e,t,n,r){switch(e.readyState){case 4:if(200===e.status)this._requestLicenseFailureCount=0,c.logger.log("License request succeeded"),"arraybuffer"!==e.responseType&&c.logger.warn("xhr response type was not set to the expected arraybuffer for license request"),r(e.response);else{if(c.logger.error("License Request XHR failed ("+t+"). Status: "+e.status+" ("+e.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var i=3-this._requestLicenseFailureCount+1;c.logger.warn("Retrying license request, "+i+" attempts left"),this._requestLicense(n,r)}}},l._generateLicenseRequestChallenge=function(e,t){switch(e.mediaKeySystemDomain){case Vt.WIDEVINE:return t}throw new Error("unsupported key-system: "+e.mediaKeySystemDomain)},l._requestLicense=function(e,t){c.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n)return c.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var r=this.getLicenseServerUrl(n.mediaKeySystemDomain),i=this._createLicenseXhr(r,e,t);c.logger.log("Sending license request to URL: "+r);var a=this._generateLicenseRequestChallenge(n,e);i.send(a)}catch(e){c.logger.error("Failure requesting DRM license: "+e),this.hls.trigger(u.default.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},l.onMediaAttached=function(e){if(this._emeEnabled){var t=e.media;this._media=t,t.addEventListener("encrypted",this._onMediaEncrypted)}},l.onMediaDetached=function(){this._media&&(this._media.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null)},l.onManifestParsed=function(e){if(this._emeEnabled){var t=e.levels.map((function(e){return e.audioCodec})),n=e.levels.map((function(e){return e.videoCodec}));this._attemptKeySystemAccess(Vt.WIDEVINE,t,n)}},i=r,(a=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&$t(i.prototype,a),o&&$t(i,o),r}(f);function Xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jt=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Xt(e,t,n[t])}))}return e}({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,liveBackBufferLength:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:et,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:He,bufferController:ze,capLevelController:$e,fpsController:Xe,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,requestMediaKeySystemAccessFunc:Wt},{cueHandler:r,enableCEA708Captions:!0,enableWebVTT:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es"},{subtitleStreamController:zt,subtitleTrackController:Gt,timelineController:Ft,audioStreamController:at,audioTrackController:nt,emeController:qt});function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function en(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tn(e,t,n){return t&&en(e.prototype,t),n&&en(e,n),e}n.d(t,"default",(function(){return nn}));var nn=function(e){var t,n;function r(t){var n;void 0===t&&(t={}),(n=e.call(this)||this).config=void 0,n._autoLevelCapping=void 0,n.abrController=void 0,n.capLevelController=void 0,n.levelController=void 0,n.streamController=void 0,n.networkControllers=void 0,n.audioTrackController=void 0,n.subtitleTrackController=void 0,n.emeController=void 0,n.coreComponents=void 0,n.media=null,n.url=null;var i=r.DefaultConfig;if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");n.config=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Qt(e,t,n[t])}))}return e}({},i,t);var a=Zt(n).config;if(void 0!==a.liveMaxLatencyDurationCount&&a.liveMaxLatencyDurationCount<=a.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==a.liveMaxLatencyDuration&&(void 0===a.liveSyncDuration||a.liveMaxLatencyDuration<=a.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(c.enableLogs)(a.debug),n._autoLevelCapping=-1;var o=n.abrController=new a.abrController(Zt(n)),s=new a.bufferController(Zt(n)),l=n.capLevelController=new a.capLevelController(Zt(n)),u=new a.fpsController(Zt(n)),d=new O(Zt(n)),f=new D(Zt(n)),h=new M(Zt(n)),p=new Fe(Zt(n)),m=n.levelController=new De(Zt(n)),g=new K(Zt(n)),y=[m,n.streamController=new Pe(Zt(n),g)],v=a.audioStreamController;v&&y.push(new v(Zt(n),g)),n.networkControllers=y;var b=[d,f,h,o,s,l,u,p,g];if(v=a.audioTrackController){var _=new v(Zt(n));n.audioTrackController=_,b.push(_)}if(v=a.subtitleTrackController){var A=new v(Zt(n));n.subtitleTrackController=A,y.push(A)}if(v=a.emeController){var E=new v(Zt(n));n.emeController=E,b.push(E)}return(v=a.subtitleStreamController)&&y.push(new v(Zt(n),g)),(v=a.timelineController)&&b.push(new v(Zt(n))),n.coreComponents=b,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.isSupported=function(){return function(){var e=W();if(!e)return!1;var t=self.SourceBuffer||self.WebKitSourceBuffer,n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!r}()},tn(r,null,[{key:"version",get:function(){return"0.13.2"}},{key:"Events",get:function(){return u.default}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return r.defaultConfig?r.defaultConfig:Jt},set:function(e){r.defaultConfig=e}}]);var i=r.prototype;return i.destroy=function(){c.logger.log("destroy"),this.trigger(u.default.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach((function(e){e.destroy()})),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1},i.attachMedia=function(e){c.logger.log("attachMedia"),this.media=e,this.trigger(u.default.MEDIA_ATTACHING,{media:e})},i.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(u.default.MEDIA_DETACHING),this.media=null},i.loadSource=function(e){e=o.buildAbsoluteURL(window.location.href,e,{alwaysNormalize:!0}),c.logger.log("loadSource:"+e),this.url=e,this.trigger(u.default.MANIFEST_LOADING,{url:e})},i.startLoad=function(e){void 0===e&&(e=-1),c.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},i.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},i.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},i.recoverMediaError=function(){c.logger.log("recoverMediaError");var e=this.media;this.detachMedia(),e&&this.attachMedia(e)},tn(r,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){c.logger.log("set currentLevel:"+e),this.loadLevel=e,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){c.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){c.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){c.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){c.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){c.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e}},{key:"bandwidthEstimate",get:function(){var e=this.abrController._bwEstimator;return e?e.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var e=this.levels,t=this.config.minAutoBitrate,n=e?e.length:0,r=0;r<n;r++)if((e[r].realBitrate?Math.max(e[r].realBitrate,e[r].bitrate):e[r].bitrate)>t)return r;return 0}},{key:"maxAutoLevel",get:function(){var e=this.levels,t=this.autoLevelCapping;return-1===t&&e&&e.length?e.length-1:t}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}}]),r}(q);nn.defaultConfig=void 0},"./src/polyfills/number-isFinite.js":
/*!******************************************!*\
!*** ./src/polyfills/number-isFinite.js ***!
\******************************************/
/*! exports provided: isFiniteNumber */function(e,t,n){"use strict";n.r(t),n.d(t,"isFiniteNumber",(function(){return r}));var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)}},"./src/utils/get-self-scope.js":
/*!*************************************!*\
!*** ./src/utils/get-self-scope.js ***!
\*************************************/
/*! exports provided: getSelfScope */function(e,t,n){"use strict";function r(){return"undefined"==typeof window?self:window}n.r(t),n.d(t,"getSelfScope",(function(){return r}))},"./src/utils/logger.js":
/*!*****************************!*\
!*** ./src/utils/logger.js ***!
\*****************************/
/*! exports provided: enableLogs, logger */function(e,t,n){"use strict";n.r(t),n.d(t,"enableLogs",(function(){return c})),n.d(t,"logger",(function(){return d}));var r=n(/*! ./get-self-scope */"./src/utils/get-self-scope.js");function i(){}var a={trace:i,debug:i,log:i,warn:i,info:i,error:i},o=a;function s(e,t){return t="["+e+"] > "+t}var l=Object(r.getSelfScope)();function u(e){var t=l.console[e];return t?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];r[0]&&(r[0]=s(e,r[0])),t.apply(l.console,r)}:i}var c=function(e){if(l.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.forEach((function(t){o[t]=e[t]?e[t].bind(e):u(t)}))}(e,"debug","log","info","warn","error");try{o.log()}catch(e){o=a}}else o=a},d=o}}).default},e.exports=r())},"./node_modules/node-libs-browser/node_modules/process/browser.js":
/*!************************************************************************!*\
!*** ./node_modules/node-libs-browser/node_modules/process/browser.js ***!
\************************************************************************/
/*! no static exports found */function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},"./node_modules/style-loader/lib/addStyles.js":
/*!****************************************************!*\
!*** ./node_modules/style-loader/lib/addStyles.js ***!
\****************************************************/
/*! no static exports found */function(e,t,n){var r,i,a={},o=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(e){return document.querySelector(e)},l=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=s.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),u=null,c=0,d=[],f=n(/*! ./urls */"./node_modules/style-loader/lib/urls.js");function h(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=a[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(b(r.parts[o],t))}else{var s=[];for(o=0;o<r.parts.length;o++)s.push(b(r.parts[o],t));a[r.id]={id:r.id,refs:1,parts:s}}}}function p(e,t){for(var n=[],r={},i=0;i<e.length;i++){var a=e[i],o=t.base?a[0]+t.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};r[o]?r[o].parts.push(s):n.push(r[o]={id:o,parts:[s]})}return n}function m(e,t){var n=l(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=l(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,i)}}function g(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function y(e){var t=document.createElement("style");return e.attrs.type="text/css",v(t,e.attrs),m(e,t),t}function v(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,i,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var o=c++;n=u||(u=y(t)),r=E.bind(null,n,o,!1),i=E.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",v(t,e.attrs),m(e,t),t}(t),r=w.bind(null,n,t),i=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),r=T.bind(null,n),i=function(){g(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=o()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return h(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var o=n[i];(s=a[o.id]).refs--,r.push(s)}for(e&&h(p(e,t),t),i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete a[s.id]}}}};var _,A=(_=[],function(e,t){return _[e]=t,_.filter(Boolean).join("\n")});function E(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=A(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function T(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function w(e,t,n){var r=n.css,i=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(r=f(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}},"./node_modules/style-loader/lib/urls.js":
/*!***********************************************!*\
!*** ./node_modules/style-loader/lib/urls.js ***!
\***********************************************/
/*! no static exports found */function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,a=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?e:(i=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},"./src/base/base_object.js":
/*!*********************************!*\
!*** ./src/base/base_object.js ***!
\*********************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=l(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=l(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=l(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=n(/*! ./utils */"./src/base/utils.js");function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a._options=n,a.uniqueId=(0,s.uniqueId)("o"),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"options",get:function(){return this._options}}]),t}(l(n(/*! ./events */"./src/base/events.js")).default);t.default=u,e.exports=t.default},"./src/base/container_plugin.js":
/*!**************************************!*\
!*** ./src/base/container_plugin.js ***!
\**************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=d(n(/*! ./base_object */"./src/base/base_object.js")),u=n(/*! ./utils */"./src/base/utils.js"),c=d(n(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(n){(0,i.default)(this,t);var r=(0,a.default)(this,e.call(this,n.options));return r.container=n,r.enabled=!0,r.bindEvents(),r}return(0,s.default)(t,e),(0,o.default)(t,[{key:"playerError",get:function(){return this.container.playerError}}]),t.prototype.enable=function(){this.enabled||(this.bindEvents(),this.enabled=!0)},t.prototype.disable=function(){this.enabled&&(this.stopListening(),this.enabled=!1)},t.prototype.bindEvents=function(){},t.prototype.destroy=function(){this.stopListening()},t}(l.default);t.default=f,(0,r.default)(f.prototype,c.default),f.extend=function(e){return(0,u.extend)(f,e)},f.type="container",e.exports=t.default},"./src/base/core_plugin.js":
/*!*********************************!*\
!*** ./src/base/core_plugin.js ***!
\*********************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=n(/*! ./utils */"./src/base/utils.js"),u=d(n(/*! ./base_object */"./src/base/base_object.js")),c=d(n(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(n){(0,i.default)(this,t);var r=(0,a.default)(this,e.call(this,n.options));return r.core=n,r.enabled=!0,r.bindEvents(),r}return(0,s.default)(t,e),(0,o.default)(t,[{key:"playerError",get:function(){return this.core.playerError}}]),t.prototype.bindEvents=function(){},t.prototype.enable=function(){this.enabled||(this.bindEvents(),this.enabled=!0)},t.prototype.disable=function(){this.enabled&&(this.stopListening(),this.enabled=!1)},t.prototype.getExternalInterface=function(){return{}},t.prototype.destroy=function(){this.stopListening()},t}(u.default);t.default=f,(0,r.default)(f.prototype,c.default),f.extend=function(e){return(0,l.extend)(f,e)},f.type="core",e.exports=t.default},"./src/base/error_mixin.js":
/*!*********************************!*\
!*** ./src/base/error_mixin.js ***!
\*********************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=o(n(/*! ../plugins/log */"./src/plugins/log/index.js")),a=o(n(/*! ../components/error */"./src/components/error/index.js"));function o(e){return e&&e.__esModule?e:{default:e}}var s={createError:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{useCodePrefix:!0},n=this.constructor&&this.constructor.type||"",o=this.name||n,s=this.i18n||this.core&&this.core.i18n||this.container&&this.container.i18n,l=o+":"+(e&&e.code||"unknown"),u={description:"",level:a.default.Levels.FATAL,origin:o,scope:n,raw:{}},c=(0,r.default)({},u,e,{code:t.useCodePrefix?l:e.code});if(s&&c.level==a.default.Levels.FATAL&&!c.UI){var d={title:s.t("default_error_title"),message:s.t("default_error_message")};c.UI=d}return this.playerError?this.playerError.createError(c):i.default.warn(o,"PlayerError is not defined. Error: ",c),c}};t.default=s,e.exports=t.default},"./src/base/events.js":
/*!****************************!*\
!*** ./src/base/events.js ***!
\****************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),i=l(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=l(n(/*! babel-runtime/helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js")),o=l(n(/*! ../plugins/log */"./src/plugins/log/index.js")),s=n(/*! ./utils */"./src/base/utils.js");function l(e){return e&&e.__esModule?e:{default:e}}var u=Array.prototype.slice,c=/\s+/,d=function(e,t,n,r){if(!n)return!0;if("object"===(void 0===n?"undefined":(0,a.default)(n))){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(c.test(n)){for(var o=n.split(c),s=0,l=o.length;s<l;s++)e[t].apply(e,[o[s]].concat(r));return!1}return!0},f=function(e,t,n,r){var i=void 0,a=-1,s=e.length,l=t[0],u=t[1],c=t[2];!function d(){try{switch(t.length){case 0:for(;++a<s;)(i=e[a]).callback.call(i.ctx);return;case 1:for(;++a<s;)(i=e[a]).callback.call(i.ctx,l);return;case 2:for(;++a<s;)(i=e[a]).callback.call(i.ctx,l,u);return;case 3:for(;++a<s;)(i=e[a]).callback.call(i.ctx,l,u,c);return;default:for(;++a<s;)(i=e[a]).callback.apply(i.ctx,t);return}}catch(e){o.default.error.apply(o.default,[n,"error on event",r,"trigger","-",e]),d()}}()},h=function(){function e(){(0,i.default)(this,e)}return e.prototype.on=function(e,t,n){return d(this,"on",e,[t,n])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:n,ctx:n||this}),this):this},e.prototype.once=function(e,t,n){var r=this,i=void 0;if(!d(this,"once",e,[t,n])||!t)return this;var a=function(){return r.off(e,i)};return i=function(){a(),t.apply(this,arguments)},this.on(e,i,n)},e.prototype.off=function(e,t,n){var i,a,o=void 0,s=void 0,l=void 0,u=void 0,c=void 0,f=void 0;if(!this._events||!d(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events=void 0,this;for(u=0,a=(i=e?[e]:(0,r.default)(this._events)).length;u<a;u++)if(e=i[u],l=this._events[e]){if(this._events[e]=o=[],t||n)for(c=0,f=l.length;c<f;c++)s=l[c],(t&&t!==s.callback&&t!==s.callback._callback||n&&n!==s.context)&&o.push(s);o.length||delete this._events[e]}return this},e.prototype.trigger=function(e){var t=this.name||this.constructor.name;if(o.default.debug.apply(o.default,[t].concat(Array.prototype.slice.call(arguments))),!this._events)return this;var n=u.call(arguments,1);if(!d(this,"trigger",e,n))return this;var r=this._events[e],i=this._events.all;return r&&f(r,n,t,e),i&&f(i,arguments,t,e),this},e.prototype.stopListening=function(e,t,n){var i=this._listeningTo;if(!i)return this;var o=!t&&!n;for(var s in n||"object"!==(void 0===t?"undefined":(0,a.default)(t))||(n=this),e&&((i={})[e._listenId]=e),i)(e=i[s]).off(t,n,this),(o||0===(0,r.default)(e._events).length)&&delete this._listeningTo[s];return this},e.register=function(t){e.Custom||(e.Custom={});var n="string"==typeof t&&t.toUpperCase().trim();n&&!e.Custom[n]?e.Custom[n]=n.toLowerCase().split("_").map((function(e,t){return 0===t?e:e=e[0].toUpperCase()+e.slice(1)})).join(""):o.default.error("Events","Error when register event: "+t)},e.listAvailableCustomEvents=function(){return e.Custom||(e.Custom={}),(0,r.default)(e.Custom).filter((function(t){return"string"==typeof e.Custom[t]}))},e}();t.default=h;var p={listenTo:"on",listenToOnce:"once"};(0,r.default)(p).forEach((function(e){h.prototype[e]=function(t,n,r){return(this._listeningTo||(this._listeningTo={}))[t._listenId||(t._listenId=(0,s.uniqueId)("l"))]=t,r||"object"!==(void 0===n?"undefined":(0,a.default)(n))||(r=this),t[p[e]](n,r,this),this}})),h.PLAYER_READY="ready",h.PLAYER_RESIZE="resize",h.PLAYER_FULLSCREEN="fullscreen",h.PLAYER_PLAY="play",h.PLAYER_PAUSE="pause",h.PLAYER_STOP="stop",h.PLAYER_ENDED="ended",h.PLAYER_SEEK="seek",h.PLAYER_ERROR="playererror",h.ERROR="error",h.PLAYER_TIMEUPDATE="timeupdate",h.PLAYER_VOLUMEUPDATE="volumeupdate",h.PLAYER_SUBTITLE_AVAILABLE="subtitleavailable",h.PLAYBACK_PROGRESS="playback:progress",h.PLAYBACK_TIMEUPDATE="playback:timeupdate",h.PLAYBACK_READY="playback:ready",h.PLAYBACK_BUFFERING="playback:buffering",h.PLAYBACK_BUFFERFULL="playback:bufferfull",h.PLAYBACK_SETTINGSUPDATE="playback:settingsupdate",h.PLAYBACK_LOADEDMETADATA="playback:loadedmetadata",h.PLAYBACK_HIGHDEFINITIONUPDATE="playback:highdefinitionupdate",h.PLAYBACK_BITRATE="playback:bitrate",h.PLAYBACK_LEVELS_AVAILABLE="playback:levels:available",h.PLAYBACK_LEVEL_SWITCH_START="playback:levels:switch:start",h.PLAYBACK_LEVEL_SWITCH_END="playback:levels:switch:end",h.PLAYBACK_PLAYBACKSTATE="playback:playbackstate",h.PLAYBACK_DVR="playback:dvr",h.PLAYBACK_MEDIACONTROL_DISABLE="playback:mediacontrol:disable",h.PLAYBACK_MEDIACONTROL_ENABLE="playback:mediacontrol:enable",h.PLAYBACK_ENDED="playback:ended",h.PLAYBACK_PLAY_INTENT="playback:play:intent",h.PLAYBACK_PLAY="playback:play",h.PLAYBACK_PAUSE="playback:pause",h.PLAYBACK_SEEK="playback:seek",h.PLAYBACK_SEEKED="playback:seeked",h.PLAYBACK_STOP="playback:stop",h.PLAYBACK_ERROR="playback:error",h.PLAYBACK_STATS_ADD="playback:stats:add",h.PLAYBACK_FRAGMENT_LOADED="playback:fragment:loaded",h.PLAYBACK_LEVEL_SWITCH="playback:level:switch",h.PLAYBACK_SUBTITLE_AVAILABLE="playback:subtitle:available",h.PLAYBACK_SUBTITLE_CHANGED="playback:subtitle:changed",h.CORE_CONTAINERS_CREATED="core:containers:created",h.CORE_ACTIVE_CONTAINER_CHANGED="core:active:container:changed",h.CORE_OPTIONS_CHANGE="core:options:change",h.CORE_READY="core:ready",h.CORE_FULLSCREEN="core:fullscreen",h.CORE_RESIZE="core:resize",h.CORE_SCREEN_ORIENTATION_CHANGED="core:screen:orientation:changed",h.CORE_MOUSE_MOVE="core:mousemove",h.CORE_MOUSE_LEAVE="core:mouseleave",h.CONTAINER_PLAYBACKSTATE="container:playbackstate",h.CONTAINER_PLAYBACKDVRSTATECHANGED="container:dvr",h.CONTAINER_BITRATE="container:bitrate",h.CONTAINER_STATS_REPORT="container:stats:report",h.CONTAINER_DESTROYED="container:destroyed",h.CONTAINER_READY="container:ready",h.CONTAINER_ERROR="container:error",h.CONTAINER_LOADEDMETADATA="container:loadedmetadata",h.CONTAINER_SUBTITLE_AVAILABLE="container:subtitle:available",h.CONTAINER_SUBTITLE_CHANGED="container:subtitle:changed",h.CONTAINER_TIMEUPDATE="container:timeupdate",h.CONTAINER_PROGRESS="container:progress",h.CONTAINER_PLAY="container:play",h.CONTAINER_STOP="container:stop",h.CONTAINER_PAUSE="container:pause",h.CONTAINER_ENDED="container:ended",h.CONTAINER_CLICK="container:click",h.CONTAINER_DBLCLICK="container:dblclick",h.CONTAINER_CONTEXTMENU="container:contextmenu",h.CONTAINER_MOUSE_ENTER="container:mouseenter",h.CONTAINER_MOUSE_LEAVE="container:mouseleave",h.CONTAINER_SEEK="container:seek",h.CONTAINER_SEEKED="container:seeked",h.CONTAINER_VOLUME="container:volume",h.CONTAINER_FULLSCREEN="container:fullscreen",h.CONTAINER_STATE_BUFFERING="container:state:buffering",h.CONTAINER_STATE_BUFFERFULL="container:state:bufferfull",h.CONTAINER_SETTINGSUPDATE="container:settingsupdate",h.CONTAINER_HIGHDEFINITIONUPDATE="container:highdefinitionupdate",h.CONTAINER_MEDIACONTROL_SHOW="container:mediacontrol:show",h.CONTAINER_MEDIACONTROL_HIDE="container:mediacontrol:hide",h.CONTAINER_MEDIACONTROL_DISABLE="container:mediacontrol:disable",h.CONTAINER_MEDIACONTROL_ENABLE="container:mediacontrol:enable",h.CONTAINER_STATS_ADD="container:stats:add",h.CONTAINER_OPTIONS_CHANGE="container:options:change",h.MEDIACONTROL_RENDERED="mediacontrol:rendered",h.MEDIACONTROL_FULLSCREEN="mediacontrol:fullscreen",h.MEDIACONTROL_SHOW="mediacontrol:show",h.MEDIACONTROL_HIDE="mediacontrol:hide",h.MEDIACONTROL_MOUSEMOVE_SEEKBAR="mediacontrol:mousemove:seekbar",h.MEDIACONTROL_MOUSELEAVE_SEEKBAR="mediacontrol:mouseleave:seekbar",h.MEDIACONTROL_PLAYING="mediacontrol:playing",h.MEDIACONTROL_NOTPLAYING="mediacontrol:notplaying",h.MEDIACONTROL_CONTAINERCHANGED="mediacontrol:containerchanged",h.MEDIACONTROL_OPTIONS_CHANGE="mediacontrol:options:change",e.exports=t.default},"./src/base/media.js":
/*!***************************!*\
!*** ./src/base/media.js ***!
\***************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.mp4="data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=";t.default={mp4:r}},"./src/base/playback.js":
/*!******************************!*\
!*** ./src/base/playback.js ***!
\******************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=f(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=f(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=f(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=f(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=n(/*! ./utils */"./src/base/utils.js"),u=f(n(/*! ./ui_object */"./src/base/ui_object.js")),c=f(n(/*! ./error_mixin */"./src/base/error_mixin.js")),d=f(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(n,r,o){(0,i.default)(this,t);var s=(0,a.default)(this,e.call(this,n));return s.settings={},s._i18n=r,s.playerError=o,s._consented=!1,s}return(0,s.default)(t,e),(0,o.default)(t,[{key:"isAudioOnly",get:function(){return!1}},{key:"isAdaptive",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"i18n",get:function(){return this._i18n}},{key:"buffering",get:function(){return!1}},{key:"consented",get:function(){return this._consented}}]),t.prototype.consent=function(){this._consented=!0},t.prototype.play=function(){},t.prototype.pause=function(){},t.prototype.stop=function(){},t.prototype.seek=function(e){},t.prototype.seekPercentage=function(e){},t.prototype.getStartTimeOffset=function(){return 0},t.prototype.getDuration=function(){return 0},t.prototype.isPlaying=function(){return!1},t.prototype.getPlaybackType=function(){return t.NO_OP},t.prototype.isHighDefinitionInUse=function(){return!1},t.prototype.volume=function(e){},t.prototype.configure=function(e){this._options=d.default.extend(this._options,e)},t.prototype.attemptAutoPlay=function(){var e=this;this.canAutoPlay((function(t,n){t&&e.play()}))},t.prototype.canAutoPlay=function(e){e(!0,null)},(0,o.default)(t,[{key:"isReady",get:function(){return!1}},{key:"hasClosedCaptionsTracks",get:function(){return this.closedCaptionsTracks.length>0}},{key:"closedCaptionsTracks",get:function(){return[]}},{key:"closedCaptionsTrackId",get:function(){return-1},set:function(e){}}]),t}(u.default);t.default=h,(0,r.default)(h.prototype,c.default),h.extend=function(e){return(0,l.extend)(h,e)},h.canPlay=function(e,t){return!1},h.VOD="vod",h.AOD="aod",h.LIVE="live",h.NO_OP="no_op",h.type="playback",e.exports=t.default},"./src/base/polyfills.js":
/*!*******************************!*\
!*** ./src/base/polyfills.js ***!
\*******************************/
/*! no static exports found */function(e,t,n){"use strict";Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var a=t[i];if(e.call(r,a,i,t))return a;i++}}})},"./src/base/styler.js":
/*!****************************!*\
!*** ./src/base/styler.js ***!
\****************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),i=a(n(/*! ./template */"./src/base/template.js"));function a(e){return e&&e.__esModule?e:{default:e}}var o={getStyleFor:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{baseUrl:""};return(0,r.default)('<style class="clappr-style"></style>').html((0,i.default)(e.toString())(t))}};t.default=o,e.exports=t.default},"./src/base/svg_icons.js":
/*!*******************************!*\
!*** ./src/base/svg_icons.js ***!
\*******************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.volumeMute=t.volume=t.stop=t.reload=t.play=t.pause=t.hd=t.fullscreen=t.exitFullscreen=t.cc=void 0;var r=h(n(/*! ../icons/01-play.svg */"./src/icons/01-play.svg")),i=h(n(/*! ../icons/02-pause.svg */"./src/icons/02-pause.svg")),a=h(n(/*! ../icons/03-stop.svg */"./src/icons/03-stop.svg")),o=h(n(/*! ../icons/04-volume.svg */"./src/icons/04-volume.svg")),s=h(n(/*! ../icons/05-mute.svg */"./src/icons/05-mute.svg")),l=h(n(/*! ../icons/06-expand.svg */"./src/icons/06-expand.svg")),u=h(n(/*! ../icons/07-shrink.svg */"./src/icons/07-shrink.svg")),c=h(n(/*! ../icons/08-hd.svg */"./src/icons/08-hd.svg")),d=h(n(/*! ../icons/09-cc.svg */"./src/icons/09-cc.svg")),f=h(n(/*! ../icons/10-reload.svg */"./src/icons/10-reload.svg"));function h(e){return e&&e.__esModule?e:{default:e}}t.cc=d.default,t.exitFullscreen=u.default,t.fullscreen=l.default,t.hd=c.default,t.pause=i.default,t.play=r.default,t.reload=f.default,t.stop=a.default,t.volume=o.default,t.volumeMute=s.default,t.default={cc:d.default,exitFullscreen:u.default,fullscreen:l.default,hd:c.default,pause:i.default,play:r.default,reload:f.default,stop:a.default,volume:o.default,volumeMute:s.default}},"./src/base/template.js":
/*!******************************!*\
!*** ./src/base/template.js ***!
\******************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},i=/(.)^/,a={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},o=/\\|'|\r|\n|\t|\u2028|\u2029/g,s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},l=new RegExp("[&<>\"']","g"),u=function(e){return null===e?"":(""+e).replace(l,(function(e){return s[e]}))},c=0,d=function(e,t){var n,s=new RegExp([(r.escape||i).source,(r.interpolate||i).source,(r.evaluate||i).source].join("|")+"|$","g"),l=0,d="__p+='";e.replace(s,(function(t,n,r,i,s){return d+=e.slice(l,s).replace(o,(function(e){return"\\"+a[e]})),n&&(d+="'+\n((__t=("+n+"))==null?'':escapeExpr(__t))+\n'"),r&&(d+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(d+="';\n"+i+"\n__p+='"),l=s+t.length,t})),d+="';\n",r.variable||(d="with(obj||{}){\n"+d+"}\n"),d="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+d+"return __p;\n//# sourceURL=/microtemplates/source["+c+++"]";try{n=new Function(r.variable||"obj","escapeExpr",d)}catch(e){throw e.source=d,e}if(t)return n(t,u);var f=function(e){return n.call(this,e,u)};return f.source="function("+(r.variable||"obj")+"){\n"+d+"}",f};d.settings=r,t.default=d,e.exports=t.default},"./src/base/ui_container_plugin.js":
/*!*****************************************!*\
!*** ./src/base/ui_container_plugin.js ***!
\*****************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=n(/*! ./utils */"./src/base/utils.js"),u=d(n(/*! ./ui_object */"./src/base/ui_object.js")),c=d(n(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(n){(0,i.default)(this,t);var r=(0,a.default)(this,e.call(this,n.options));return r.container=n,r.enabled=!0,r.bindEvents(),r}return(0,s.default)(t,e),(0,o.default)(t,[{key:"playerError",get:function(){return this.container.playerError}}]),t.prototype.enable=function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)},t.prototype.disable=function(){this.stopListening(),this.$el.hide(),this.enabled=!1},t.prototype.bindEvents=function(){},t}(u.default);t.default=f,(0,r.default)(f.prototype,c.default),f.extend=function(e){return(0,l.extend)(f,e)},f.type="container",e.exports=t.default},"./src/base/ui_core_plugin.js":
/*!************************************!*\
!*** ./src/base/ui_core_plugin.js ***!
\************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=n(/*! ./utils */"./src/base/utils.js"),u=d(n(/*! ./ui_object */"./src/base/ui_object.js")),c=d(n(/*! ./error_mixin */"./src/base/error_mixin.js"));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(n){(0,i.default)(this,t);var r=(0,a.default)(this,e.call(this,n.options));return r.core=n,r.enabled=!0,r.bindEvents(),r.render(),r}return(0,s.default)(t,e),(0,o.default)(t,[{key:"playerError",get:function(){return this.core.playerError}}]),t.prototype.bindEvents=function(){},t.prototype.getExternalInterface=function(){return{}},t.prototype.enable=function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)},t.prototype.disable=function(){this.stopListening(),this.$el.hide(),this.enabled=!1},t.prototype.render=function(){return this},t}(u.default);t.default=f,(0,r.default)(f.prototype,c.default),f.extend=function(e){return(0,l.extend)(f,e)},f.type="core",e.exports=t.default},"./src/base/ui_object.js":
/*!*******************************!*\
!*** ./src/base/ui_object.js ***!
\*******************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=c(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=c(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),l=n(/*! ./utils */"./src/base/utils.js"),u=c(n(/*! ./base_object */"./src/base/base_object.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=/^(\S+)\s*(.*)$/,f=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.cid=(0,l.uniqueId)("c"),a._ensureElement(),a.delegateEvents(),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"tagName",get:function(){return"div"}},{key:"events",get:function(){return{}}},{key:"attributes",get:function(){return{}}}]),t.prototype.$=function(e){return this.$el.find(e)},t.prototype.render=function(){return this},t.prototype.destroy=function(){return this.$el.remove(),this.stopListening(),this.undelegateEvents(),this},t.prototype.setElement=function(e,t){return this.$el&&this.undelegateEvents(),this.$el=s.default.zepto.isZ(e)?e:(0,s.default)(e),this.el=this.$el[0],!1!==t&&this.delegateEvents(),this},t.prototype.delegateEvents=function(e){if(!e&&!(e=this.events))return this;for(var t in this.undelegateEvents(),e){var n=e[t];if(n&&n.constructor!==Function&&(n=this[e[t]]),n){var r=t.match(d),i=r[1],a=r[2];i+=".delegateEvents"+this.cid,""===a?this.$el.on(i,n.bind(this)):this.$el.on(i,a,n.bind(this))}}return this},t.prototype.undelegateEvents=function(){return this.$el.off(".delegateEvents"+this.cid),this},t.prototype._ensureElement=function(){if(this.el)this.setElement(this.el,!1);else{var e=s.default.extend({},this.attributes);this.id&&(e.id=this.id),this.className&&(e.class=this.className);var t=l.DomRecycler.create(this.tagName).attr(e);this.setElement(t,!1)}},t}(u.default);t.default=f,e.exports=t.default},"./src/base/utils.js":
/*!***************************!*\
!*** ./src/base/utils.js ***!
\***************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SvgIcons=t.DoubleEventHandler=t.DomRecycler=t.cancelAnimationFrame=t.requestAnimationFrame=t.QueryString=t.Config=t.Fullscreen=void 0;var r=p(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=p(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=p(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=p(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=p(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=p(n(/*! babel-runtime/core-js/object/define-property */"./node_modules/babel-runtime/core-js/object/define-property.js")),u=p(n(/*! babel-runtime/core-js/object/get-own-property-descriptor */"./node_modules/babel-runtime/core-js/object/get-own-property-descriptor.js"));t.assign=m,t.extend=g,t.formatTime=y,t.seekStringToSeconds=A,t.uniqueId=T,t.isNumber=w,t.currentScriptUrl=S,t.getBrowserLanguage=x,t.now=R,t.removeArrayItem=L,t.listContainsIgnoreCase=function(e,t){return void 0!==e&&void 0!==t&&void 0!==t.find((function(t){return e.toLowerCase()===t.toLowerCase()}))},t.canAutoPlayMedia=I,n(/*! ./polyfills */"./src/base/polyfills.js");var c=p(n(/*! ../components/browser */"./src/components/browser/index.js")),d=p(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),f=p(n(/*! ./media */"./src/base/media.js")),h=p(n(/*! ./svg_icons */"./src/base/svg_icons.js"));function p(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(t)for(var n in t){var r=(0,u.default)(t,n);r?(0,l.default)(e,n,r):e[n]=t[n]}return e}function g(e,t){var n=function(e){function n(){(0,a.default)(this,n);for(var r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];var l=(0,o.default)(this,e.call.apply(e,[this].concat(i)));return t.initialize&&t.initialize.apply(l,i),l}return(0,s.default)(n,e),n}(e);return m(n.prototype,t),n}function y(e,t){if(!isFinite(e))return"--:--";e*=1e3;var n=(e=parseInt(e/1e3))%60,r=(e=parseInt(e/60))%60,i=(e=parseInt(e/60))%24,a=parseInt(e/24),o="";return a&&a>0&&(o+=a+":",i<1&&(o+="00:")),(i&&i>0||t)&&(o+=("0"+i).slice(-2)+":"),o+=("0"+r).slice(-2)+":",(o+=("0"+n).slice(-2)).trim()}var v=t.Fullscreen={fullscreenElement:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},requestFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.querySelector&&e.querySelector("video")&&e.querySelector("video").webkitEnterFullScreen?e.querySelector("video").webkitEnterFullScreen():e.webkitEnterFullScreen&&e.webkitEnterFullScreen()},cancelFullscreen:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;e.exitFullscreen?e.exitFullscreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen()},fullscreenEnabled:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},b=t.Config=function(){function e(){(0,a.default)(this,e)}return e._defaultConfig=function(){return{volume:{value:100,parse:parseInt}}},e._defaultValueFor=function(e){try{return this._defaultConfig()[e].parse(this._defaultConfig()[e].value)}catch(e){return}},e._createKeyspace=function(e){return"clappr."+document.domain+"."+e},e.restore=function(e){return c.default.hasLocalstorage&&localStorage[this._createKeyspace(e)]?this._defaultConfig()[e].parse(localStorage[this._createKeyspace(e)]):this._defaultValueFor(e)},e.persist=function(e,t){if(c.default.hasLocalstorage)try{return localStorage[this._createKeyspace(e)]=t,!0}catch(e){return!1}},e}(),_=t.QueryString=function(){function e(){(0,a.default)(this,e)}return e.parse=function(e){for(var t=void 0,n=/\+/g,r=/([^&=]+)=?([^&]*)/g,i=function(e){return decodeURIComponent(e.replace(n," "))},a={};t=r.exec(e);)a[i(t[1]).toLowerCase()]=i(t[2]);return a},(0,i.default)(e,null,[{key:"params",get:function(){var e=window.location.search.substring(1);return e!==this.query&&(this._urlParams=this.parse(e),this.query=e),this._urlParams}},{key:"hashParams",get:function(){var e=window.location.hash.substring(1);return e!==this.hash&&(this._hashParams=this.parse(e),this.hash=e),this._hashParams}}]),e}();function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"t",t=0,n=_.params[e]||_.hashParams[e]||"",r=n.match(/[0-9]+[hms]+/g)||[];if(r.length>0){var i={h:3600,m:60,s:1};r.forEach((function(e){if(e){var n=e[e.length-1],r=parseInt(e.slice(0,e.length-1),10);t+=r*i[n]}}))}else n&&(t=parseInt(n,10));return t}var E={};function T(e){return E[e]||(E[e]=0),e+ ++E[e]}function w(e){return e-parseFloat(e)+1>=0}function S(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}var k=t.requestAnimationFrame=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}).bind(window),C=t.cancelAnimationFrame=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);function x(){return window.navigator&&window.navigator.language}function R(){return window.performance&&window.performance.now?performance.now():Date.now()}function L(e,t){var n=e.indexOf(t);n>=0&&e.splice(n,1)}function I(e,t){var n=(t=(0,r.default)({inline:!1,muted:!1,timeout:250,type:"video",source:f.default.mp4,element:null},t)).element?t.element:document.createElement(t.type);n.muted=t.muted,!0===t.muted&&n.setAttribute("muted","muted"),!0===t.inline&&n.setAttribute("playsinline","playsinline"),n.src=t.source;var i=n.play(),a=setTimeout((function(){o(!1,new Error("Timeout "+t.timeout+" ms has been reached"))}),t.timeout),o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;clearTimeout(a),e(t,n)};void 0!==i?i.then((function(){return o(!0)})).catch((function(e){return o(!1,e)})):o(!0)}var P=[],j=t.DomRecycler=function(){function e(){(0,a.default)(this,e)}return e.configure=function(e){this.options=d.default.extend(this.options,e)},e.create=function(e){return this.options.recycleVideo&&"video"===e&&P.length>0?P.shift():(0,d.default)("<"+e+">")},e.garbage=function(e){this.options.recycleVideo&&"VIDEO"===e[0].tagName.toUpperCase()&&(e.children().remove(),P.push(e))},e}();j.options={recycleVideo:!1};var O=t.DoubleEventHandler=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;(0,a.default)(this,e),this.delay=t,this.lastTime=0}return e.prototype.handle=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=(new Date).getTime(),i=r-this.lastTime;i<this.delay&&i>0&&(t(),n&&e.preventDefault()),this.lastTime=r},e}();t.SvgIcons=h.default,t.default={Config:b,Fullscreen:v,QueryString:_,DomRecycler:j,extend:g,formatTime:y,seekStringToSeconds:A,uniqueId:T,currentScriptUrl:S,isNumber:w,requestAnimationFrame:k,cancelAnimationFrame:C,getBrowserLanguage:x,now:R,removeArrayItem:L,canAutoPlayMedia:I,Media:f.default,DoubleEventHandler:O,SvgIcons:h.default}},"./src/components/browser/browser.js":
/*!*******************************************!*\
!*** ./src/components/browser/browser.js ***!
\*******************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDevice=t.getViewportSize=t.getOsData=t.getBrowserData=t.getBrowserInfo=void 0;var r=s(n(/*! babel-runtime/core-js/get-iterator */"./node_modules/babel-runtime/core-js/get-iterator.js")),i=s(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),a=s(n(/*! ./browser_data */"./src/components/browser/browser_data.js")),o=s(n(/*! ./os_data */"./src/components/browser/os_data.js"));function s(e){return e&&e.__esModule?e:{default:e}}var l={},u=t.getBrowserInfo=function(e){var t=e.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[],n=void 0;if(/trident/i.test(t[1]))return n=/\brv[ :]+(\d+)/g.exec(e)||[],{name:"IE",version:parseInt(n[1]||"")};if("Chrome"===t[1]){if(null!=(n=e.match(/\bOPR\/(\d+)/)))return{name:"Opera",version:parseInt(n[1])};if(null!=(n=e.match(/\bEdge\/(\d+)/)))return{name:"Edge",version:parseInt(n[1])}}else/android/i.test(e)&&(n=e.match(/version\/(\d+)/i))&&(t.splice(1,1,"Android WebView"),t.splice(2,1,n[1]));return{name:(t=t[2]?[t[1],t[2]]:[navigator.appName,navigator.appVersion,"-?"])[0],version:parseInt(t[1])}},c=t.getBrowserData=function(){var e={},t=l.userAgent.toLowerCase(),n=!0,i=!1,o=void 0;try{for(var s,u=(0,r.default)(a.default);!(n=(s=u.next()).done);n=!0){var c=s.value,f=new RegExp(c.identifier.toLowerCase()).exec(t);if(null!=f&&f[1]){if(e.name=c.name,e.group=c.group,c.versionIdentifier){var h=new RegExp(c.versionIdentifier.toLowerCase()).exec(t);null!=h&&h[1]&&d(h[1],e)}else d(f[1],e);break}}}catch(e){i=!0,o=e}finally{try{!n&&u.return&&u.return()}finally{if(i)throw o}}return e},d=function(e,t){var n=e.split(".",2);t.fullVersion=e,n[0]&&(t.majorVersion=parseInt(n[0])),n[1]&&(t.minorVersion=parseInt(n[1]))},f=t.getOsData=function(){var e={},t=l.userAgent.toLowerCase(),n=!0,i=!1,a=void 0;try{for(var s,u=(0,r.default)(o.default);!(n=(s=u.next()).done);n=!0){var c=s.value,d=new RegExp(c.identifier.toLowerCase()).exec(t);if(null!=d){if(e.name=c.name,e.group=c.group,c.version)h(c.version,c.versionSeparator?c.versionSeparator:".",e);else if(d[1])h(d[1],c.versionSeparator?c.versionSeparator:".",e);else if(c.versionIdentifier){var f=new RegExp(c.versionIdentifier.toLowerCase()).exec(t);null!=f&&f[1]&&h(f[1],c.versionSeparator?c.versionSeparator:".",e)}break}}}catch(e){i=!0,a=e}finally{try{!n&&u.return&&u.return()}finally{if(i)throw a}}return e},h=function(e,t,n){var r="["==t.substr(0,1)?new RegExp(t,"g"):t,i=e.split(r,2);"."!=t&&(e=e.replace(new RegExp(t,"g"),".")),n.fullVersion=e,i&&i[0]&&(n.majorVersion=parseInt(i[0])),i&&i[1]&&(n.minorVersion=parseInt(i[1]))},p=t.getViewportSize=function(){var e={};return e.width=(0,i.default)(window).width(),e.height=(0,i.default)(window).height(),e},m=t.getDevice=function(e){var t=/\((iP(?:hone|ad|od))?(?:[^;]*; ){0,2}([^)]+(?=\)))/.exec(e);return t&&(t[1]||t[2])||""},g=u(navigator.userAgent);l.isEdge=/edge/i.test(navigator.userAgent),l.isChrome=/chrome|CriOS/i.test(navigator.userAgent)&&!l.isEdge,l.isSafari=/safari/i.test(navigator.userAgent)&&!l.isChrome&&!l.isEdge,l.isFirefox=/firefox/i.test(navigator.userAgent),l.isLegacyIE=!!window.ActiveXObject,l.isIE=l.isLegacyIE||/trident.*rv:1\d/i.test(navigator.userAgent),l.isIE11=/trident.*rv:11/i.test(navigator.userAgent),l.isChromecast=l.isChrome&&/CrKey/i.test(navigator.userAgent),l.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Mobile Safari|Opera Mini/i.test(navigator.userAgent),l.isiOS=/iPad|iPhone|iPod/i.test(navigator.userAgent),l.isAndroid=/Android/i.test(navigator.userAgent),l.isWindowsPhone=/Windows Phone/i.test(navigator.userAgent),l.isWin8App=/MSAppHost/i.test(navigator.userAgent),l.isWiiU=/WiiU/i.test(navigator.userAgent),l.isPS4=/PlayStation 4/i.test(navigator.userAgent),l.hasLocalstorage=function(){try{return localStorage.setItem("clappr","clappr"),localStorage.removeItem("clappr"),!0}catch(e){return!1}}(),l.hasFlash=function(){try{return!!new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){return!(!navigator.mimeTypes||void 0===navigator.mimeTypes["application/x-shockwave-flash"]||!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)}}(),l.name=g.name,l.version=g.version,l.userAgent=navigator.userAgent,l.data=c(),l.os=f(),l.viewport=p(),l.device=m(l.userAgent),void 0!==window.orientation&&function(){switch(window.orientation){case-90:case 90:l.viewport.orientation="landscape";break;default:l.viewport.orientation="portrait"}}(),t.default=l},"./src/components/browser/browser_data.js":
/*!************************************************!*\
!*** ./src/components/browser/browser_data.js ***!
\************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{name:"Chromium",group:"Chrome",identifier:"Chromium/([0-9.]*)"},{name:"Chrome Mobile",group:"Chrome",identifier:"Chrome/([0-9.]*) Mobile",versionIdentifier:"Chrome/([0-9.]*)"},{name:"Chrome",group:"Chrome",identifier:"Chrome/([0-9.]*)"},{name:"Chrome for iOS",group:"Chrome",identifier:"CriOS/([0-9.]*)"},{name:"Android Browser",group:"Chrome",identifier:"CrMo/([0-9.]*)"},{name:"Firefox",group:"Firefox",identifier:"Firefox/([0-9.]*)"},{name:"Opera Mini",group:"Opera",identifier:"Opera Mini/([0-9.]*)"},{name:"Opera",group:"Opera",identifier:"Opera ([0-9.]*)"},{name:"Opera",group:"Opera",identifier:"Opera/([0-9.]*)",versionIdentifier:"Version/([0-9.]*)"},{name:"IEMobile",group:"Explorer",identifier:"IEMobile/([0-9.]*)"},{name:"Internet Explorer",group:"Explorer",identifier:"MSIE ([a-zA-Z0-9.]*)"},{name:"Internet Explorer",group:"Explorer",identifier:"Trident/([0-9.]*)",versionIdentifier:"rv:([0-9.]*)"},{name:"Spartan",group:"Spartan",identifier:"Edge/([0-9.]*)",versionIdentifier:"Edge/([0-9.]*)"},{name:"Safari",group:"Safari",identifier:"Safari/([0-9.]*)",versionIdentifier:"Version/([0-9.]*)"}],e.exports=t.default},"./src/components/browser/index.js":
/*!*****************************************!*\
!*** ./src/components/browser/index.js ***!
\*****************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./browser */"./src/components/browser/browser.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/components/browser/os_data.js":
/*!*******************************************!*\
!*** ./src/components/browser/os_data.js ***!
\*******************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{name:"Windows 2000",group:"Windows",identifier:"Windows NT 5.0",version:"5.0"},{name:"Windows XP",group:"Windows",identifier:"Windows NT 5.1",version:"5.1"},{name:"Windows Vista",group:"Windows",identifier:"Windows NT 6.0",version:"6.0"},{name:"Windows 7",group:"Windows",identifier:"Windows NT 6.1",version:"7.0"},{name:"Windows 8",group:"Windows",identifier:"Windows NT 6.2",version:"8.0"},{name:"Windows 8.1",group:"Windows",identifier:"Windows NT 6.3",version:"8.1"},{name:"Windows 10",group:"Windows",identifier:"Windows NT 10.0",version:"10.0"},{name:"Windows Phone",group:"Windows Phone",identifier:"Windows Phone ([0-9.]*)"},{name:"Windows Phone",group:"Windows Phone",identifier:"Windows Phone OS ([0-9.]*)"},{name:"Windows",group:"Windows",identifier:"Windows"},{name:"Chrome OS",group:"Chrome OS",identifier:"CrOS"},{name:"Android",group:"Android",identifier:"Android",versionIdentifier:"Android ([a-zA-Z0-9.-]*)"},{name:"iPad",group:"iOS",identifier:"iPad",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"iPod",group:"iOS",identifier:"iPod",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"iPhone",group:"iOS",identifier:"iPhone OS",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"Mac OS X High Sierra",group:"Mac OS",identifier:"Mac OS X (10([_|.])13([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Sierra",group:"Mac OS",identifier:"Mac OS X (10([_|.])12([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X El Capitan",group:"Mac OS",identifier:"Mac OS X (10([_|.])11([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Yosemite",group:"Mac OS",identifier:"Mac OS X (10([_|.])10([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Mavericks",group:"Mac OS",identifier:"Mac OS X (10([_|.])9([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Mountain Lion",group:"Mac OS",identifier:"Mac OS X (10([_|.])8([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Lion",group:"Mac OS",identifier:"Mac OS X (10([_|.])7([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Snow Leopard",group:"Mac OS",identifier:"Mac OS X (10([_|.])6([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Leopard",group:"Mac OS",identifier:"Mac OS X (10([_|.])5([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Tiger",group:"Mac OS",identifier:"Mac OS X (10([_|.])4([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Panther",group:"Mac OS",identifier:"Mac OS X (10([_|.])3([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Jaguar",group:"Mac OS",identifier:"Mac OS X (10([_|.])2([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Puma",group:"Mac OS",identifier:"Mac OS X (10([_|.])1([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Cheetah",group:"Mac OS",identifier:"Mac OS X (10([_|.])0([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS",group:"Mac OS",identifier:"Mac OS"},{name:"Ubuntu",group:"Linux",identifier:"Ubuntu",versionIdentifier:"Ubuntu/([0-9.]*)"},{name:"Debian",group:"Linux",identifier:"Debian"},{name:"Gentoo",group:"Linux",identifier:"Gentoo"},{name:"Linux",group:"Linux",identifier:"Linux"},{name:"BlackBerry",group:"BlackBerry",identifier:"BlackBerry"}],e.exports=t.default},"./src/components/container/container.js":
/*!***********************************************!*\
!*** ./src/components/container/container.js ***!
\***********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=h(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=h(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=h(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=h(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=h(n(/*! ../../base/events */"./src/base/events.js")),u=h(n(/*! ../../base/ui_object */"./src/base/ui_object.js")),c=h(n(/*! ../../base/error_mixin */"./src/base/error_mixin.js")),d=n(/*! ../../base/utils */"./src/base/utils.js");n(/*! ./public/style.scss */"./src/components/container/public/style.scss");var f=h(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function h(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(n,r,o){(0,i.default)(this,t);var s=(0,a.default)(this,e.call(this,n));return s._i18n=r,s.currentTime=0,s.volume=100,s.playback=n.playback,s.playerError=o,s.settings=f.default.extend({},s.playback.settings),s.isReady=!1,s.mediaControlDisabled=!1,s.plugins=[s.playback],s.dblTapHandler=new d.DoubleEventHandler(500),s.clickTimer=null,s.clickDelay=200,s.bindEvents(),s}return(0,s.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"Container"}},{key:"attributes",get:function(){return{class:"container","data-container":""}}},{key:"events",get:function(){return{click:"clicked",dblclick:"dblClicked",touchend:"dblTap",contextmenu:"onContextMenu",mouseenter:"mouseEnter",mouseleave:"mouseLeave"}}},{key:"ended",get:function(){return this.playback.ended}},{key:"buffering",get:function(){return this.playback.buffering}},{key:"i18n",get:function(){return this._i18n}},{key:"hasClosedCaptionsTracks",get:function(){return this.playback.hasClosedCaptionsTracks}},{key:"closedCaptionsTracks",get:function(){return this.playback.closedCaptionsTracks}},{key:"closedCaptionsTrackId",get:function(){return this.playback.closedCaptionsTrackId},set:function(e){this.playback.closedCaptionsTrackId=e}}]),t.prototype.bindEvents=function(){this.listenTo(this.playback,l.default.PLAYBACK_PROGRESS,this.onProgress),this.listenTo(this.playback,l.default.PLAYBACK_TIMEUPDATE,this.timeUpdated),this.listenTo(this.playback,l.default.PLAYBACK_READY,this.ready),this.listenTo(this.playback,l.default.PLAYBACK_BUFFERING,this.onBuffering),this.listenTo(this.playback,l.default.PLAYBACK_BUFFERFULL,this.bufferfull),this.listenTo(this.playback,l.default.PLAYBACK_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.playback,l.default.PLAYBACK_LOADEDMETADATA,this.loadedMetadata),this.listenTo(this.playback,l.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.playback,l.default.PLAYBACK_BITRATE,this.updateBitrate),this.listenTo(this.playback,l.default.PLAYBACK_PLAYBACKSTATE,this.playbackStateChanged),this.listenTo(this.playback,l.default.PLAYBACK_DVR,this.playbackDvrStateChanged),this.listenTo(this.playback,l.default.PLAYBACK_MEDIACONTROL_DISABLE,this.disableMediaControl),this.listenTo(this.playback,l.default.PLAYBACK_MEDIACONTROL_ENABLE,this.enableMediaControl),this.listenTo(this.playback,l.default.PLAYBACK_SEEKED,this.onSeeked),this.listenTo(this.playback,l.default.PLAYBACK_ENDED,this.onEnded),this.listenTo(this.playback,l.default.PLAYBACK_PLAY,this.playing),this.listenTo(this.playback,l.default.PLAYBACK_PAUSE,this.paused),this.listenTo(this.playback,l.default.PLAYBACK_STOP,this.stopped),this.listenTo(this.playback,l.default.PLAYBACK_ERROR,this.error),this.listenTo(this.playback,l.default.PLAYBACK_SUBTITLE_AVAILABLE,this.subtitleAvailable),this.listenTo(this.playback,l.default.PLAYBACK_SUBTITLE_CHANGED,this.subtitleChanged)},t.prototype.subtitleAvailable=function(){this.trigger(l.default.CONTAINER_SUBTITLE_AVAILABLE)},t.prototype.subtitleChanged=function(e){this.trigger(l.default.CONTAINER_SUBTITLE_CHANGED,e)},t.prototype.playbackStateChanged=function(e){this.trigger(l.default.CONTAINER_PLAYBACKSTATE,e)},t.prototype.playbackDvrStateChanged=function(e){this.settings=this.playback.settings,this.dvrInUse=e,this.trigger(l.default.CONTAINER_PLAYBACKDVRSTATECHANGED,e)},t.prototype.updateBitrate=function(e){this.trigger(l.default.CONTAINER_BITRATE,e)},t.prototype.statsReport=function(e){this.trigger(l.default.CONTAINER_STATS_REPORT,e)},t.prototype.getPlaybackType=function(){return this.playback.getPlaybackType()},t.prototype.isDvrEnabled=function(){return!!this.playback.dvrEnabled},t.prototype.isDvrInUse=function(){return!!this.dvrInUse},t.prototype.destroy=function(){this.trigger(l.default.CONTAINER_DESTROYED,this,this.name),this.stopListening(),this.plugins.forEach((function(e){return e.destroy()})),this.$el.remove()},t.prototype.setStyle=function(e){this.$el.css(e)},t.prototype.animate=function(e,t){return this.$el.animate(e,t).promise()},t.prototype.ready=function(){this.isReady=!0,this.trigger(l.default.CONTAINER_READY,this.name)},t.prototype.isPlaying=function(){return this.playback.isPlaying()},t.prototype.getStartTimeOffset=function(){return this.playback.getStartTimeOffset()},t.prototype.getCurrentTime=function(){return this.currentTime},t.prototype.getDuration=function(){return this.playback.getDuration()},t.prototype.error=function(e){this.isReady||this.ready(),this.trigger(l.default.CONTAINER_ERROR,e,this.name)},t.prototype.loadedMetadata=function(e){this.trigger(l.default.CONTAINER_LOADEDMETADATA,e)},t.prototype.timeUpdated=function(e){this.currentTime=e.current,this.trigger(l.default.CONTAINER_TIMEUPDATE,e,this.name)},t.prototype.onProgress=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];this.trigger.apply(this,[l.default.CONTAINER_PROGRESS].concat(t,[this.name]))},t.prototype.playing=function(){this.trigger(l.default.CONTAINER_PLAY,this.name)},t.prototype.paused=function(){this.trigger(l.default.CONTAINER_PAUSE,this.name)},t.prototype.play=function(){this.playback.play()},t.prototype.stop=function(){this.playback.stop(),this.currentTime=0},t.prototype.pause=function(){this.playback.pause()},t.prototype.onEnded=function(){this.trigger(l.default.CONTAINER_ENDED,this,this.name),this.currentTime=0},t.prototype.stopped=function(){this.trigger(l.default.CONTAINER_STOP)},t.prototype.clicked=function(){var e=this;this.options.chromeless&&!this.options.allowUserInteraction||(this.clickTimer=setTimeout((function(){e.clickTimer&&e.trigger(l.default.CONTAINER_CLICK,e,e.name)}),this.clickDelay))},t.prototype.cancelClicked=function(){clearTimeout(this.clickTimer),this.clickTimer=null},t.prototype.dblClicked=function(){this.options.chromeless&&!this.options.allowUserInteraction||(this.cancelClicked(),this.trigger(l.default.CONTAINER_DBLCLICK,this,this.name))},t.prototype.dblTap=function(e){var t=this;this.options.chromeless&&!this.options.allowUserInteraction||this.dblTapHandler.handle(e,(function(){t.cancelClicked(),t.trigger(l.default.CONTAINER_DBLCLICK,t,t.name)}))},t.prototype.onContextMenu=function(e){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(l.default.CONTAINER_CONTEXTMENU,e,this.name)},t.prototype.seek=function(e){this.trigger(l.default.CONTAINER_SEEK,e,this.name),this.playback.seek(e)},t.prototype.onSeeked=function(){this.trigger(l.default.CONTAINER_SEEKED,this.name)},t.prototype.seekPercentage=function(e){var t=this.getDuration();if(e>=0&&e<=100){var n=t*(e/100);this.seek(n)}},t.prototype.setVolume=function(e){this.volume=parseFloat(e),this.trigger(l.default.CONTAINER_VOLUME,this.volume,this.name),this.playback.volume(this.volume)},t.prototype.fullscreen=function(){this.trigger(l.default.CONTAINER_FULLSCREEN,this.name)},t.prototype.onBuffering=function(){this.trigger(l.default.CONTAINER_STATE_BUFFERING,this.name)},t.prototype.bufferfull=function(){this.trigger(l.default.CONTAINER_STATE_BUFFERFULL,this.name)},t.prototype.addPlugin=function(e){this.plugins.push(e)},t.prototype.hasPlugin=function(e){return!!this.getPlugin(e)},t.prototype.getPlugin=function(e){return this.plugins.filter((function(t){return t.name===e}))[0]},t.prototype.mouseEnter=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(l.default.CONTAINER_MOUSE_ENTER)},t.prototype.mouseLeave=function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(l.default.CONTAINER_MOUSE_LEAVE)},t.prototype.settingsUpdate=function(){this.settings=this.playback.settings,this.trigger(l.default.CONTAINER_SETTINGSUPDATE)},t.prototype.highDefinitionUpdate=function(e){this.trigger(l.default.CONTAINER_HIGHDEFINITIONUPDATE,e)},t.prototype.isHighDefinitionInUse=function(){return this.playback.isHighDefinitionInUse()},t.prototype.disableMediaControl=function(){this.mediaControlDisabled||(this.mediaControlDisabled=!0,this.trigger(l.default.CONTAINER_MEDIACONTROL_DISABLE))},t.prototype.enableMediaControl=function(){this.mediaControlDisabled&&(this.mediaControlDisabled=!1,this.trigger(l.default.CONTAINER_MEDIACONTROL_ENABLE))},t.prototype.updateStyle=function(){!this.options.chromeless||this.options.allowUserInteraction?this.$el.removeClass("chromeless"):this.$el.addClass("chromeless")},t.prototype.configure=function(e){this._options=f.default.extend(this._options,e),this.updateStyle(),this.playback.configure(this.options),this.trigger(l.default.CONTAINER_OPTIONS_CHANGE)},t.prototype.render=function(){return this.$el.append(this.playback.render().el),this.updateStyle(),this},t}(u.default);t.default=p,(0,r.default)(p.prototype,c.default),e.exports=t.default},"./src/components/container/index.js":
/*!*******************************************!*\
!*** ./src/components/container/index.js ***!
\*******************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./container */"./src/components/container/container.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/components/container/public/style.scss":
/*!****************************************************!*\
!*** ./src/components/container/public/style.scss ***!
\****************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./style.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/components/container/public/style.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/components/container_factory/container_factory.js":
/*!***************************************************************!*\
!*** ./src/components/container_factory/container_factory.js ***!
\***************************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(/*! babel-runtime/helpers/typeof */"./node_modules/babel-runtime/helpers/typeof.js")),i=f(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=f(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=f(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=f(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=f(n(/*! ../../base/base_object */"./src/base/base_object.js")),u=f(n(/*! ../../base/events */"./src/base/events.js")),c=f(n(/*! ../../components/container */"./src/components/container/index.js")),d=f(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function f(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(n,r,o,s){(0,i.default)(this,t);var l=(0,a.default)(this,e.call(this,n));return l._i18n=o,l.loader=r,l.playerError=s,l}return(0,s.default)(t,e),(0,o.default)(t,[{key:"options",get:function(){return this._options},set:function(e){this._options=e}}]),t.prototype.createContainers=function(){var e=this;return d.default.Deferred((function(t){t.resolve(e.options.sources.map((function(t){return e.createContainer(t)})))}))},t.prototype.findPlaybackPlugin=function(e,t){return this.loader.playbackPlugins.filter((function(n){return n.canPlay(e,t)}))[0]},t.prototype.createContainer=function(e){var t=null,n=this.options.mimeType;"object"===(void 0===e?"undefined":(0,r.default)(e))?(t=e.source.toString(),e.mimeType&&(n=e.mimeType)):t=e.toString(),t.match(/^\/\//)&&(t=window.location.protocol+t);var i=d.default.extend({},this.options,{src:t,mimeType:n}),a=new(this.findPlaybackPlugin(t,n))(i,this._i18n,this.playerError);i=d.default.extend({},i,{playback:a});var o=new c.default(i,this._i18n,this.playerError),s=d.default.Deferred();return s.promise(o),this.addContainerPlugins(o),this.listenToOnce(o,u.default.CONTAINER_READY,(function(){return s.resolve(o)})),o},t.prototype.addContainerPlugins=function(e){this.loader.containerPlugins.forEach((function(t){e.addPlugin(new t(e))}))},t}(l.default);t.default=h,e.exports=t.default},"./src/components/container_factory/index.js":
/*!***************************************************!*\
!*** ./src/components/container_factory/index.js ***!
\***************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./container_factory */"./src/components/container_factory/container_factory.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/components/core/core.js":
/*!*************************************!*\
!*** ./src/components/core/core.js ***!
\*************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=A(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=A(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=A(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=A(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=A(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=n(/*! ../../base/utils */"./src/base/utils.js"),u=A(n(/*! ../../base/styler */"./src/base/styler.js")),c=A(n(/*! ../../base/events */"./src/base/events.js")),d=A(n(/*! ../../base/ui_object */"./src/base/ui_object.js")),f=A(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),h=A(n(/*! ../../components/browser */"./src/components/browser/index.js")),p=A(n(/*! ../../components/container_factory */"./src/components/container_factory/index.js")),m=A(n(/*! ../../components/mediator */"./src/components/mediator.js")),g=A(n(/*! ../../components/player_info */"./src/components/player_info.js")),y=A(n(/*! ../../components/error */"./src/components/error/index.js")),v=A(n(/*! ../../base/error_mixin */"./src/base/error_mixin.js")),b=A(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));n(/*! ./public/style.scss */"./src/components/core/public/style.scss");var _=A(n(/*! ./public/fonts.css */"./src/components/core/public/fonts.css"));function A(e){return e&&e.__esModule?e:{default:e}}var E=void 0,T=function(e){function t(n){(0,i.default)(this,t);var r=(0,a.default)(this,e.call(this,n));return r.playerError=new y.default(n,r),r.configureDomRecycler(),r.playerInfo=g.default.getInstance(n.playerId),r.firstResize=!0,r.plugins=[],r.containers=[],r._boundFullscreenHandler=function(){return r.handleFullscreenChange()},(0,b.default)(document).bind("fullscreenchange",r._boundFullscreenHandler),(0,b.default)(document).bind("MSFullscreenChange",r._boundFullscreenHandler),(0,b.default)(document).bind("mozfullscreenchange",r._boundFullscreenHandler),h.default.isMobile&&(0,b.default)(window).bind("resize",(function(e){r.handleWindowResize(e)})),r}return(0,s.default)(t,e),(0,o.default)(t,[{key:"events",get:function(){return{webkitfullscreenchange:"handleFullscreenChange",mousemove:"onMouseMove",mouseleave:"onMouseLeave"}}},{key:"attributes",get:function(){return{"data-player":"",tabindex:9999}}},{key:"isReady",get:function(){return!!this.ready}},{key:"i18n",get:function(){return this.getPlugin("strings")||{t:function(e){return e}}}},{key:"mediaControl",get:function(){return this.getPlugin("media_control")||this.dummyMediaControl}},{key:"dummyMediaControl",get:function(){return this._dummyMediaControl||(this._dummyMediaControl=new f.default(this)),this._dummyMediaControl}},{key:"activeContainer",get:function(){return this._activeContainer},set:function(e){this._activeContainer=e,this.trigger(c.default.CORE_ACTIVE_CONTAINER_CHANGED,this._activeContainer)}},{key:"activePlayback",get:function(){return this.activeContainer&&this.activeContainer.playback}}]),t.prototype.configureDomRecycler=function(){var e=this.options&&this.options.playback&&this.options.playback.recycleVideo;l.DomRecycler.configure({recycleVideo:e})},t.prototype.createContainers=function(e){this.defer=b.default.Deferred(),this.defer.promise(this),this.containerFactory=new p.default(e,e.loader,this.i18n,this.playerError),this.prepareContainers()},t.prototype.prepareContainers=function(){var e=this;this.containerFactory.createContainers().then((function(t){return e.setupContainers(t)})).then((function(t){return e.resolveOnContainersReady(t)}))},t.prototype.updateSize=function(){this.isFullscreen()?this.setFullscreen():this.setPlayerSize()},t.prototype.setFullscreen=function(){h.default.isiOS||(this.$el.addClass("fullscreen"),this.$el.removeAttr("style"),this.playerInfo.previousSize={width:this.options.width,height:this.options.height},this.playerInfo.currentSize={width:(0,b.default)(window).width(),height:(0,b.default)(window).height()})},t.prototype.setPlayerSize=function(){this.$el.removeClass("fullscreen"),this.playerInfo.currentSize=this.playerInfo.previousSize,this.playerInfo.previousSize={width:(0,b.default)(window).width(),height:(0,b.default)(window).height()},this.resize(this.playerInfo.currentSize)},t.prototype.resize=function(e){(0,l.isNumber)(e.height)||(0,l.isNumber)(e.width)?(this.el.style.height=e.height+"px",this.el.style.width=e.width+"px"):(this.el.style.height=""+e.height,this.el.style.width=""+e.width),this.playerInfo.previousSize={width:this.options.width,height:this.options.height},this.options.width=e.width,this.options.height=e.height,this.playerInfo.currentSize=e,this.triggerResize(this.playerInfo.currentSize)},t.prototype.enableResizeObserver=function(){var e=this;this.resizeObserverInterval=setInterval((function(){e.triggerResize({width:e.el.clientWidth,height:e.el.clientHeight})}),500)},t.prototype.triggerResize=function(e){(this.firstResize||this.oldHeight!==e.height||this.oldWidth!==e.width)&&(this.oldHeight=e.height,this.oldWidth=e.width,this.playerInfo.computedSize=e,this.firstResize=!1,m.default.trigger(this.options.playerId+":"+c.default.PLAYER_RESIZE,e),this.trigger(c.default.CORE_RESIZE,e))},t.prototype.disableResizeObserver=function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval)},t.prototype.resolveOnContainersReady=function(e){var t=this;b.default.when.apply(b.default,e).done((function(){t.defer.resolve(t),t.ready=!0,t.trigger(c.default.CORE_READY)}))},t.prototype.addPlugin=function(e){this.plugins.push(e)},t.prototype.hasPlugin=function(e){return!!this.getPlugin(e)},t.prototype.getPlugin=function(e){return this.plugins.filter((function(t){return t.name===e}))[0]},t.prototype.load=function(e,t){this.options.mimeType=t,e=e&&e.constructor===Array?e:[e],this.options.sources=e,this.containers.forEach((function(e){return e.destroy()})),this.containerFactory.options=b.default.extend(this.options,{sources:e}),this.prepareContainers()},t.prototype.destroy=function(){this.disableResizeObserver(),this.containers.forEach((function(e){return e.destroy()})),this.plugins.forEach((function(e){return e.destroy()})),this.$el.remove(),(0,b.default)(document).unbind("fullscreenchange",this._boundFullscreenHandler),(0,b.default)(document).unbind("MSFullscreenChange",this._boundFullscreenHandler),(0,b.default)(document).unbind("mozfullscreenchange",this._boundFullscreenHandler),this.stopListening()},t.prototype.handleFullscreenChange=function(){this.trigger(c.default.CORE_FULLSCREEN,this.isFullscreen()),this.updateSize()},t.prototype.handleWindowResize=function(e){var t=window.innerWidth>window.innerHeight?"landscape":"portrait";this._screenOrientation!==t&&(this._screenOrientation=t,this.triggerResize({width:this.el.clientWidth,height:this.el.clientHeight}),this.trigger(c.default.CORE_SCREEN_ORIENTATION_CHANGED,{event:e,orientation:this._screenOrientation}))},t.prototype.removeContainer=function(e){this.stopListening(e),this.containers=this.containers.filter((function(t){return t!==e}))},t.prototype.setupContainer=function(e){this.listenTo(e,c.default.CONTAINER_DESTROYED,this.removeContainer),this.containers.push(e)},t.prototype.setupContainers=function(e){return e.forEach(this.setupContainer.bind(this)),this.trigger(c.default.CORE_CONTAINERS_CREATED),this.renderContainers(),this.activeContainer=e[0],this.render(),this.appendToParent(),this.containers},t.prototype.renderContainers=function(){var e=this;this.containers.forEach((function(t){return e.el.appendChild(t.render().el)}))},t.prototype.createContainer=function(e,t){var n=this.containerFactory.createContainer(e,t);return this.setupContainer(n),this.el.appendChild(n.render().el),n},t.prototype.getCurrentContainer=function(){return this.activeContainer},t.prototype.getCurrentPlayback=function(){return this.activePlayback},t.prototype.getPlaybackType=function(){return this.activeContainer&&this.activeContainer.getPlaybackType()},t.prototype.isFullscreen=function(){var e=h.default.isiOS&&this.activeContainer&&this.activeContainer.el||this.el;return l.Fullscreen.fullscreenElement()===e},t.prototype.toggleFullscreen=function(){this.isFullscreen()?(l.Fullscreen.cancelFullscreen(),!h.default.isiOS&&this.$el.removeClass("fullscreen nocursor")):(l.Fullscreen.requestFullscreen(h.default.isiOS?this.activeContainer.el:this.el),!h.default.isiOS&&this.$el.addClass("fullscreen"))},t.prototype.onMouseMove=function(e){this.trigger(c.default.CORE_MOUSE_MOVE,e)},t.prototype.onMouseLeave=function(e){this.trigger(c.default.CORE_MOUSE_LEAVE,e)},t.prototype.configure=function(e){var t=this;this._options=b.default.extend(this._options,e),this.configureDomRecycler();var n=e.source||e.sources;n&&this.load(n,e.mimeType||this.options.mimeType),this.trigger(c.default.CORE_OPTIONS_CHANGE,e),this.containers.forEach((function(e){return e.configure(t.options)}))},t.prototype.appendToParent=function(){(!this.$el.parent()||!this.$el.parent().length)&&this.$el.appendTo(this.options.parentElement)},t.prototype.render=function(){E||(E=u.default.getStyleFor(_.default,{baseUrl:this.options.baseUrl})),(0,b.default)("head").append(E),this.options.width=this.options.width||this.$el.width(),this.options.height=this.options.height||this.$el.height();var e={width:this.options.width,height:this.options.height};return this.playerInfo.previousSize=this.playerInfo.currentSize=this.playerInfo.computedSize=e,this.updateSize(),this.previousSize={width:this.$el.width(),height:this.$el.height()},this.enableResizeObserver(),this},t}(d.default);t.default=T,(0,r.default)(T.prototype,v.default),e.exports=t.default},"./src/components/core/index.js":
/*!**************************************!*\
!*** ./src/components/core/index.js ***!
\**************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./core */"./src/components/core/core.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/components/core/public/Roboto.ttf":
/*!***********************************************!*\
!*** ./src/components/core/public/Roboto.ttf ***!
\***********************************************/
/*! no static exports found */function(e,t){e.exports="<%=baseUrl%>/38861cba61c66739c1452c3a71e39852.ttf"},"./src/components/core/public/fonts.css":
/*!**********************************************!*\
!*** ./src/components/core/public/fonts.css ***!
\**********************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! ../../../../node_modules/css-loader/lib/url/escape.js */"./node_modules/css-loader/lib/url/escape.js");(e.exports=n(/*! ../../../../node_modules/css-loader/lib/css-base.js */"./node_modules/css-loader/lib/css-base.js")(!1)).push([e.i,'@font-face {\n font-family: "Roboto";\n font-style: normal;\n font-weight: 400;\n src: local("Roboto"), local("Roboto-Regular"), url('+r(n(/*! ./Roboto.ttf */"./src/components/core/public/Roboto.ttf"))+') format("truetype");\n}\n',""])},"./src/components/core/public/style.scss":
/*!***********************************************!*\
!*** ./src/components/core/public/style.scss ***!
\***********************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./style.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/components/core/public/style.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/components/core_factory/core_factory.js":
/*!*****************************************************!*\
!*** ./src/components/core_factory/core_factory.js ***!
\*****************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=u(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=u(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(n(/*! ../../base/base_object */"./src/base/base_object.js")),l=u(n(/*! ../core */"./src/components/core/index.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this));return a.player=n,a._options=n.options,a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"loader",get:function(){return this.player.loader}}]),t.prototype.create=function(){return this.options.loader=this.loader,this.core=new l.default(this.options),this.addCorePlugins(),this.core.createContainers(this.options),this.core},t.prototype.addCorePlugins=function(){var e=this;return this.loader.corePlugins.forEach((function(t){var n=new t(e.core);e.core.addPlugin(n),e.setupExternalInterface(n)})),this.core},t.prototype.setupExternalInterface=function(e){var t=e.getExternalInterface();for(var n in t)this.player[n]=t[n].bind(e),this.core[n]=t[n].bind(e)},t}(s.default);t.default=c,e.exports=t.default},"./src/components/core_factory/index.js":
/*!**********************************************!*\
!*** ./src/components/core_factory/index.js ***!
\**********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./core_factory */"./src/components/core_factory/core_factory.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/components/error/error.js":
/*!***************************************!*\
!*** ./src/components/error/error.js ***!
\***************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=c(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=c(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(n(/*! ../../base/events */"./src/base/events.js")),l=c(n(/*! ../../base/base_object */"./src/base/base_object.js")),u=c(n(/*! ../../plugins/log */"./src/plugins/log/index.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments[1];(0,r.default)(this,t);var o=(0,i.default)(this,e.call(this,n));return o.core=a,o}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"error"}}],[{key:"Levels",get:function(){return{FATAL:"FATAL",WARN:"WARN",INFO:"INFO"}}}]),t.prototype.createError=function(e){this.core?this.core.trigger(s.default.ERROR,e):u.default.warn(this.name,"Core is not set. Error: ",e)},t}(l.default);t.default=d,e.exports=t.default},"./src/components/error/index.js":
/*!***************************************!*\
!*** ./src/components/error/index.js ***!
\***************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./error */"./src/components/error/error.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/components/loader/index.js":
/*!****************************************!*\
!*** ./src/components/loader/index.js ***!
\****************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./loader */"./src/components/loader/loader.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/components/loader/loader.js":
/*!*****************************************!*\
!*** ./src/components/loader/loader.js ***!
\*****************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=P(n(/*! babel-runtime/core-js/object/create */"./node_modules/babel-runtime/core-js/object/create.js")),i=P(n(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),a=P(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=P(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=P(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=P(n(/*! ../../base/base_object */"./src/base/base_object.js")),u=P(n(/*! ../player_info */"./src/components/player_info.js")),c=P(n(/*! ../../playbacks/html5_video */"./src/playbacks/html5_video/index.js")),d=P(n(/*! ../../playbacks/flash */"./src/playbacks/flash/index.js")),f=P(n(/*! ../../playbacks/html5_audio */"./src/playbacks/html5_audio/index.js")),h=P(n(/*! ../../playbacks/flashls */"./src/playbacks/flashls/index.js")),p=P(n(/*! ../../playbacks/hls */"./src/playbacks/hls/index.js")),m=P(n(/*! ../../playbacks/html_img */"./src/playbacks/html_img/index.js")),g=P(n(/*! ../../playbacks/no_op */"./src/playbacks/no_op/index.js")),y=P(n(/*! ../../plugins/spinner_three_bounce */"./src/plugins/spinner_three_bounce/index.js")),v=P(n(/*! ../../plugins/stats */"./src/plugins/stats/index.js")),b=P(n(/*! ../../plugins/watermark */"./src/plugins/watermark/index.js")),_=P(n(/*! ../../plugins/poster */"./src/plugins/poster/index.js")),A=P(n(/*! ../../plugins/google_analytics */"./src/plugins/google_analytics/index.js")),E=P(n(/*! ../../plugins/click_to_pause */"./src/plugins/click_to_pause/index.js")),T=P(n(/*! ../../plugins/media_control */"./src/plugins/media_control/index.js")),w=P(n(/*! ../../plugins/dvr_controls */"./src/plugins/dvr_controls/index.js")),S=P(n(/*! ../../plugins/closed_captions */"./src/plugins/closed_captions/index.js")),k=P(n(/*! ../../plugins/favicon */"./src/plugins/favicon/index.js")),C=P(n(/*! ../../plugins/seek_time */"./src/plugins/seek_time/index.js")),x=P(n(/*! ../../plugins/sources */"./src/plugins/sources.js")),R=P(n(/*! ../../plugins/end_video */"./src/plugins/end_video.js")),L=P(n(/*! ../../plugins/strings */"./src/plugins/strings.js")),I=P(n(/*! ../../plugins/error_screen */"./src/plugins/error_screen/index.js"));function P(e){return e&&e.__esModule?e:{default:e}}var j=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,a.default)(this,t);var l=(0,o.default)(this,e.call(this));return l.playerId=r,l.playbackPlugins=[],s||(l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[p.default])),l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[c.default,f.default]),s||(l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[d.default,h.default])),l.playbackPlugins=[].concat((0,i.default)(l.playbackPlugins),[m.default,g.default]),l.containerPlugins=[y.default,b.default,_.default,v.default,A.default,E.default],l.corePlugins=[T.default,w.default,S.default,k.default,C.default,x.default,R.default,I.default,L.default],Array.isArray(n)||l.validateExternalPluginsType(n),l.addExternalPlugins(n),l}return(0,s.default)(t,e),t.prototype.groupPluginsByType=function(e){return Array.isArray(e)&&(e=e.reduce((function(e,t){return e[t.type]||(e[t.type]=[]),e[t.type].push(t),e}),{})),e},t.prototype.removeDups=function(e){var t=e.reduceRight((function(e,t){return e[t.prototype.name]&&delete e[t.prototype.name],e[t.prototype.name]=t,e}),(0,r.default)(null)),n=[];for(var i in t)n.unshift(t[i]);return n},t.prototype.addExternalPlugins=function(e){(e=this.groupPluginsByType(e)).playback&&(this.playbackPlugins=this.removeDups(e.playback.concat(this.playbackPlugins))),e.container&&(this.containerPlugins=this.removeDups(e.container.concat(this.containerPlugins))),e.core&&(this.corePlugins=this.removeDups(e.core.concat(this.corePlugins))),u.default.getInstance(this.playerId).playbackPlugins=this.playbackPlugins},t.prototype.validateExternalPluginsType=function(e){["playback","container","core"].forEach((function(t){(e[t]||[]).forEach((function(e){var n="external "+e.type+" plugin on "+t+" array";if(e.type!==t)throw new ReferenceError(n)}))}))},t}(l.default);t.default=j,e.exports=t.default},"./src/components/mediator.js":
/*!************************************!*\
!*** ./src/components/mediator.js ***!
\************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js"));function i(e){return e&&e.__esModule?e:{default:e}}var a=new(i(n(/*! ../base/events */"./src/base/events.js")).default),o=function e(){(0,r.default)(this,e)};t.default=o,o.on=function(e,t,n){a.on(e,t,n)},o.once=function(e,t,n){a.once(e,t,n)},o.off=function(e,t,n){a.off(e,t,n)},o.trigger=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.trigger.apply(a,[e].concat(n))},o.stopListening=function(e,t,n){a.stopListening(e,t,n)},e.exports=t.default},"./src/components/player.js":
/*!**********************************!*\
!*** ./src/components/player.js ***!
\**********************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=v(n(/*! babel-runtime/core-js/object/assign */"./node_modules/babel-runtime/core-js/object/assign.js")),i=v(n(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),a=v(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=v(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=v(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),l=v(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),u=n(/*! ../base/utils */"./src/base/utils.js"),c=v(n(/*! ../base/base_object */"./src/base/base_object.js")),d=v(n(/*! ../base/events */"./src/base/events.js")),f=v(n(/*! ./browser */"./src/components/browser/index.js")),h=v(n(/*! ./core_factory */"./src/components/core_factory/index.js")),p=v(n(/*! ./loader */"./src/components/loader/index.js")),m=v(n(/*! ./player_info */"./src/components/player_info.js")),g=v(n(/*! ../base/error_mixin */"./src/base/error_mixin.js")),y=v(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function v(e){return e&&e.__esModule?e:{default:e}}var b=(0,u.currentScriptUrl)().replace(/\/[^/]+$/,""),_=function(e){function t(n){(0,a.default)(this,t);var r=(0,o.default)(this,e.call(this,n)),i={playerId:(0,u.uniqueId)(""),persistConfig:!0,width:640,height:360,baseUrl:b,allowUserInteraction:f.default.isMobile,playback:{recycleVideo:!0}};return r._options=y.default.extend(i,n),r.options.sources=r._normalizeSources(n),r.options.chromeless||(r.options.allowUserInteraction=!0),r.options.allowUserInteraction||(r.options.disableKeyboardShortcuts=!0),r._registerOptionEventListeners(r.options.events),r._coreFactory=new h.default(r),r.playerInfo=m.default.getInstance(r.options.playerId),r.playerInfo.currentSize={width:n.width,height:n.height},r.playerInfo.options=r.options,r.options.parentId?r.setParentId(r.options.parentId):r.options.parent&&r.attachTo(r.options.parent),r}return(0,l.default)(t,e),(0,s.default)(t,[{key:"loader",set:function(e){this._loader=e},get:function(){return this._loader||(this._loader=new p.default(this.options.plugins||{},this.options.playerId)),this._loader}},{key:"ended",get:function(){return this.core.activeContainer.ended}},{key:"buffering",get:function(){return this.core.activeContainer.buffering}},{key:"isReady",get:function(){return!!this._ready}},{key:"eventsMapping",get:function(){return{onReady:d.default.PLAYER_READY,onResize:d.default.PLAYER_RESIZE,onPlay:d.default.PLAYER_PLAY,onPause:d.default.PLAYER_PAUSE,onStop:d.default.PLAYER_STOP,onEnded:d.default.PLAYER_ENDED,onSeek:d.default.PLAYER_SEEK,onError:d.default.PLAYER_ERROR,onTimeUpdate:d.default.PLAYER_TIMEUPDATE,onVolumeUpdate:d.default.PLAYER_VOLUMEUPDATE,onSubtitleAvailable:d.default.PLAYER_SUBTITLE_AVAILABLE}}}]),t.prototype.setParentId=function(e){var t=document.querySelector(e);return t&&this.attachTo(t),this},t.prototype.attachTo=function(e){return this.options.parentElement=e,this.core=this._coreFactory.create(),this._addEventListeners(),this},t.prototype._addEventListeners=function(){return this.core.isReady?this._onReady():this.listenToOnce(this.core,d.default.CORE_READY,this._onReady),this.listenTo(this.core,d.default.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged),this.listenTo(this.core,d.default.CORE_FULLSCREEN,this._onFullscreenChange),this.listenTo(this.core,d.default.CORE_RESIZE,this._onResize),this},t.prototype._addContainerEventListeners=function(){var e=this.core.activeContainer;return e&&(this.listenTo(e,d.default.CONTAINER_PLAY,this._onPlay),this.listenTo(e,d.default.CONTAINER_PAUSE,this._onPause),this.listenTo(e,d.default.CONTAINER_STOP,this._onStop),this.listenTo(e,d.default.CONTAINER_ENDED,this._onEnded),this.listenTo(e,d.default.CONTAINER_SEEK,this._onSeek),this.listenTo(e,d.default.CONTAINER_ERROR,this._onError),this.listenTo(e,d.default.CONTAINER_TIMEUPDATE,this._onTimeUpdate),this.listenTo(e,d.default.CONTAINER_VOLUME,this._onVolumeUpdate),this.listenTo(e,d.default.CONTAINER_SUBTITLE_AVAILABLE,this._onSubtitleAvailable)),this},t.prototype._registerOptionEventListeners=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,i.default)(t).length>0;return r&&(0,i.default)(n).forEach((function(t){var r=e.eventsMapping[t];r&&e.off(r,n[t])})),(0,i.default)(t).forEach((function(n){var r=e.eventsMapping[n];if(r){var i=t[n];(i="function"==typeof i&&i)&&e.on(r,i)}})),this},t.prototype._containerChanged=function(){this.stopListening(),this._addEventListeners()},t.prototype._onReady=function(){this._ready=!0,this._addContainerEventListeners(),this.trigger(d.default.PLAYER_READY)},t.prototype._onFullscreenChange=function(e){this.trigger(d.default.PLAYER_FULLSCREEN,e)},t.prototype._onVolumeUpdate=function(e){this.trigger(d.default.PLAYER_VOLUMEUPDATE,e)},t.prototype._onSubtitleAvailable=function(){this.trigger(d.default.PLAYER_SUBTITLE_AVAILABLE)},t.prototype._onResize=function(e){this.trigger(d.default.PLAYER_RESIZE,e)},t.prototype._onPlay=function(){this.trigger(d.default.PLAYER_PLAY)},t.prototype._onPause=function(){this.trigger(d.default.PLAYER_PAUSE)},t.prototype._onStop=function(){this.trigger(d.default.PLAYER_STOP,this.getCurrentTime())},t.prototype._onEnded=function(){this.trigger(d.default.PLAYER_ENDED)},t.prototype._onSeek=function(e){this.trigger(d.default.PLAYER_SEEK,e)},t.prototype._onTimeUpdate=function(e){this.trigger(d.default.PLAYER_TIMEUPDATE,e)},t.prototype._onError=function(e){this.trigger(d.default.PLAYER_ERROR,e)},t.prototype._normalizeSources=function(e){var t=e.sources||(void 0!==e.source?[e.source]:[]);return 0===t.length?[{source:"",mimeType:""}]:t},t.prototype.resize=function(e){return this.core.resize(e),this},t.prototype.load=function(e,t,n){return void 0!==n&&this.configure({autoPlay:!!n}),this.core.load(e,t),this},t.prototype.destroy=function(){return this.stopListening(),this.core.destroy(),this},t.prototype.consent=function(){return this.core.getCurrentPlayback().consent(),this},t.prototype.play=function(){return this.core.activeContainer.play(),this},t.prototype.pause=function(){return this.core.activeContainer.pause(),this},t.prototype.stop=function(){return this.core.activeContainer.stop(),this},t.prototype.seek=function(e){return this.core.activeContainer.seek(e),this},t.prototype.seekPercentage=function(e){return this.core.activeContainer.seekPercentage(e),this},t.prototype.mute=function(){return this._mutedVolume=this.getVolume(),this.setVolume(0),this},t.prototype.unmute=function(){return this.setVolume("number"==typeof this._mutedVolume?this._mutedVolume:100),this._mutedVolume=null,this},t.prototype.isPlaying=function(){return this.core.activeContainer.isPlaying()},t.prototype.isDvrEnabled=function(){return this.core.activeContainer.isDvrEnabled()},t.prototype.isDvrInUse=function(){return this.core.activeContainer.isDvrInUse()},t.prototype.configure=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._registerOptionEventListeners(e.events,this.options.events),this.core.configure(e),this},t.prototype.getPlugin=function(e){return this.core.plugins.concat(this.core.activeContainer.plugins).filter((function(t){return t.name===e}))[0]},t.prototype.getCurrentTime=function(){return this.core.activeContainer.getCurrentTime()},t.prototype.getStartTimeOffset=function(){return this.core.activeContainer.getStartTimeOffset()},t.prototype.getDuration=function(){return this.core.activeContainer.getDuration()},t}(c.default);t.default=_,(0,r.default)(_.prototype,g.default),e.exports=t.default},"./src/components/player_info.js":
/*!***************************************!*\
!*** ./src/components/player_info.js ***!
\***************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js"),a=(r=i)&&r.__esModule?r:{default:r},o=function e(){(0,a.default)(this,e),this.options={},this.playbackPlugins=[],this.currentSize={width:0,height:0}};o._players={},o.getInstance=function(e){return o._players[e]||(o._players[e]=new o)},t.default=o,e.exports=t.default},"./src/icons/01-play.svg":
/*!*******************************!*\
!*** ./src/icons/01-play.svg ***!
\*******************************/
/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M1.425.35L14.575 8l-13.15 7.65V.35z"></path></svg>'},"./src/icons/02-pause.svg":
/*!********************************!*\
!*** ./src/icons/02-pause.svg ***!
\********************************/
/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 14.76H6.43V1.24H1.71v13.52zm7.86-13.52v13.52h4.716V1.24H9.573z"></path></svg>'},"./src/icons/03-stop.svg":
/*!*******************************!*\
!*** ./src/icons/03-stop.svg ***!
\*******************************/
/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M1.712 1.24h12.6v13.52h-12.6z"></path></svg>'},"./src/icons/04-volume.svg":
/*!*********************************!*\
!*** ./src/icons/04-volume.svg ***!
\*********************************/
/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M11.5 11h-.002v1.502L7.798 10H4.5V6h3.297l3.7-2.502V4.5h.003V11zM11 4.49L7.953 6.5H5v3h2.953L11 11.51V4.49z"></path></svg>'},"./src/icons/05-mute.svg":
/*!*******************************!*\
!*** ./src/icons/05-mute.svg ***!
\*******************************/
/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M9.75 11.51L6.7 9.5H3.75v-3H6.7L9.75 4.49v.664l.497.498V3.498L6.547 6H3.248v4h3.296l3.7 2.502v-2.154l-.497.5v.662zm3-5.165L12.404 6l-1.655 1.653L9.093 6l-.346.345L10.402 8 8.747 9.654l.346.347 1.655-1.653L12.403 10l.348-.346L11.097 8l1.655-1.655z"></path></svg>'},"./src/icons/06-expand.svg":
/*!*********************************!*\
!*** ./src/icons/06-expand.svg ***!
\*********************************/
/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M7.156 8L4 11.156V8.5H3V13h4.5v-1H4.844L8 8.844 7.156 8zM8.5 3v1h2.657L8 7.157 8.846 8 12 4.844V7.5h1V3H8.5z"></path></svg>'},"./src/icons/07-shrink.svg":
/*!*********************************!*\
!*** ./src/icons/07-shrink.svg ***!
\*********************************/
/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M13.5 3.344l-.844-.844L9.5 5.656V3h-1v4.5H13v-1h-2.656L13.5 3.344zM3 9.5h2.656L2.5 12.656l.844.844L6.5 10.344V13h1V8.5H3v1z"></path></svg>'},"./src/icons/08-hd.svg":
/*!*****************************!*\
!*** ./src/icons/08-hd.svg ***!
\*****************************/
/*! no static exports found */function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#010101" d="M5.375 7.062H2.637V4.26H.502v7.488h2.135V8.9h2.738v2.848h2.133V4.26H5.375v2.802zm5.97-2.81h-2.84v7.496h2.798c2.65 0 4.195-1.607 4.195-3.77v-.022c0-2.162-1.523-3.704-4.154-3.704zm2.06 3.758c0 1.21-.81 1.896-2.03 1.896h-.83V6.093h.83c1.22 0 2.03.696 2.03 1.896v.02z"></path></svg>'},"./src/icons/09-cc.svg":
/*!*****************************!*\
!*** ./src/icons/09-cc.svg ***!
\*****************************/
/*! no static exports found */function(e,t){e.exports='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 49 41.8" style="enable-background:new 0 0 49 41.8;" xml:space="preserve"><path d="M47.1,0H3.2C1.6,0,0,1.2,0,2.8v31.5C0,35.9,1.6,37,3.2,37h11.9l3.2,1.9l4.7,2.7c0.9,0.5,2-0.1,2-1.1V37h22.1 c1.6,0,1.9-1.1,1.9-2.7V2.8C49,1.2,48.7,0,47.1,0z M7.2,18.6c0-4.8,3.5-9.3,9.9-9.3c4.8,0,7.1,2.7,7.1,2.7l-2.5,4 c0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2c0,0-2.7,2.9-7.6,2.9 C10.8,27.9,7.2,23.5,7.2,18.6z M36.9,27.9c-6.4,0-9.9-4.4-9.9-9.3c0-4.8,3.5-9.3,9.9-9.3C41.7,9.3,44,12,44,12l-2.5,4 c0,0-1.7-1.7-4.2-1.7c-2.8,0-4.3,2.1-4.3,4.3c0,2.1,1.5,4.4,4.5,4.4c2.5,0,4.9-2.1,4.9-2.1l2.2,4.2C44.5,25,41.9,27.9,36.9,27.9z"></path></svg>'},"./src/icons/10-reload.svg":
/*!*********************************!*\
!*** ./src/icons/10-reload.svg ***!
\*********************************/
/*! no static exports found */function(e,t){e.exports='<svg fill="#FFFFFF" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg>'},"./src/main.js":
/*!*********************!*\
!*** ./src/main.js ***!
\*********************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=B(n(/*! ./components/player */"./src/components/player.js")),i=B(n(/*! ./base/utils */"./src/base/utils.js")),a=B(n(/*! ./base/events */"./src/base/events.js")),o=B(n(/*! ./base/playback */"./src/base/playback.js")),s=B(n(/*! ./base/container_plugin */"./src/base/container_plugin.js")),l=B(n(/*! ./base/core_plugin */"./src/base/core_plugin.js")),u=B(n(/*! ./base/ui_core_plugin */"./src/base/ui_core_plugin.js")),c=B(n(/*! ./base/ui_container_plugin */"./src/base/ui_container_plugin.js")),d=B(n(/*! ./base/base_object */"./src/base/base_object.js")),f=B(n(/*! ./base/ui_object */"./src/base/ui_object.js")),h=B(n(/*! ./components/browser */"./src/components/browser/index.js")),p=B(n(/*! ./components/container */"./src/components/container/index.js")),m=B(n(/*! ./components/core */"./src/components/core/index.js")),g=B(n(/*! ./components/error */"./src/components/error/index.js")),y=B(n(/*! ./components/loader */"./src/components/loader/index.js")),v=B(n(/*! ./components/mediator */"./src/components/mediator.js")),b=B(n(/*! ./components/player_info */"./src/components/player_info.js")),_=B(n(/*! ./playbacks/base_flash_playback */"./src/playbacks/base_flash_playback/index.js")),A=B(n(/*! ./playbacks/flash */"./src/playbacks/flash/index.js")),E=B(n(/*! ./playbacks/flashls */"./src/playbacks/flashls/index.js")),T=B(n(/*! ./playbacks/hls */"./src/playbacks/hls/index.js")),w=B(n(/*! ./playbacks/html5_audio */"./src/playbacks/html5_audio/index.js")),S=B(n(/*! ./playbacks/html5_video */"./src/playbacks/html5_video/index.js")),k=B(n(/*! ./playbacks/html_img */"./src/playbacks/html_img/index.js")),C=B(n(/*! ./playbacks/no_op */"./src/playbacks/no_op/index.js")),x=B(n(/*! ./plugins/media_control */"./src/plugins/media_control/index.js")),R=B(n(/*! ./plugins/click_to_pause */"./src/plugins/click_to_pause/index.js")),L=B(n(/*! ./plugins/dvr_controls */"./src/plugins/dvr_controls/index.js")),I=B(n(/*! ./plugins/favicon */"./src/plugins/favicon/index.js")),P=B(n(/*! ./plugins/log */"./src/plugins/log/index.js")),j=B(n(/*! ./plugins/poster */"./src/plugins/poster/index.js")),O=B(n(/*! ./plugins/spinner_three_bounce */"./src/plugins/spinner_three_bounce/index.js")),D=B(n(/*! ./plugins/watermark */"./src/plugins/watermark/index.js")),M=B(n(/*! ./base/styler */"./src/base/styler.js")),N=B(n(/*! ./vendor */"./src/vendor/index.js")),U=B(n(/*! ./base/template */"./src/base/template.js")),F=B(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function B(e){return e&&e.__esModule?e:{default:e}}t.default={Player:r.default,Mediator:v.default,Events:a.default,Browser:h.default,PlayerInfo:b.default,MediaControl:x.default,ContainerPlugin:s.default,UIContainerPlugin:c.default,CorePlugin:l.default,UICorePlugin:u.default,Playback:o.default,Container:p.default,Core:m.default,PlayerError:g.default,Loader:y.default,BaseObject:d.default,UIObject:f.default,Utils:i.default,BaseFlashPlayback:_.default,Flash:A.default,FlasHLS:E.default,HLS:T.default,HTML5Audio:w.default,HTML5Video:S.default,HTMLImg:k.default,NoOp:C.default,ClickToPausePlugin:R.default,DVRControls:L.default,Favicon:I.default,Log:P.default,Poster:j.default,SpinnerThreeBouncePlugin:O.default,WaterMarkPlugin:D.default,Styler:M.default,Vendor:N.default,version:"0.3.13",template:U.default,$:F.default},e.exports=t.default},"./src/playbacks/base_flash_playback/base_flash_playback.js":
/*!******************************************************************!*\
!*** ./src/playbacks/base_flash_playback/base_flash_playback.js ***!
\******************************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(n(/*! ../../base/playback */"./src/base/playback.js")),l=d(n(/*! ../../base/template */"./src/base/template.js")),u=d(n(/*! ../../components/browser */"./src/components/browser/index.js")),c=d(n(/*! ./public/flash.html */"./src/playbacks/base_flash_playback/public/flash.html"));function d(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/flash.scss */"./src/playbacks/base_flash_playback/public/flash.scss");var f=function(e){function t(){return(0,r.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,o.default)(t,e),t.prototype.setElement=function(e){this.$el=e,this.el=e[0]},t.prototype.render=function(){return this.$el.attr("data",this.swfPath),this.$el.html(this.template({cid:this.cid,swfPath:this.swfPath,baseUrl:this.baseUrl,playbackId:this.uniqueId,wmode:this.wmode,callbackName:"window.Clappr.flashlsCallbacks."+this.cid})),u.default.isIE&&(this.$("embed").remove(),u.default.isLegacyIE&&this.$el.attr("classid","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000")),this.el.id=this.cid,this},(0,i.default)(t,[{key:"tagName",get:function(){return"object"}},{key:"swfPath",get:function(){return""}},{key:"wmode",get:function(){return"transparent"}},{key:"template",get:function(){return(0,l.default)(c.default)}},{key:"attributes",get:function(){var e="application/x-shockwave-flash";return u.default.isLegacyIE&&(e=""),{class:"clappr-flash-playback",type:e,width:"100%",height:"100%",data:this.swfPath,"data-flash-playback":this.name}}}]),t}(s.default);t.default=f,e.exports=t.default},"./src/playbacks/base_flash_playback/index.js":
/*!****************************************************!*\
!*** ./src/playbacks/base_flash_playback/index.js ***!
\****************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=n(/*! ./base_flash_playback */"./src/playbacks/base_flash_playback/base_flash_playback.js"),e.exports=t.default},"./src/playbacks/base_flash_playback/public/flash.html":
/*!*************************************************************!*\
!*** ./src/playbacks/base_flash_playback/public/flash.html ***!
\*************************************************************/
/*! no static exports found */function(e,t){e.exports='<param name="movie" value="<%= swfPath %>">\n<param name="quality" value="autohigh">\n<param name="swliveconnect" value="true">\n<param name="allowScriptAccess" value="always">\n<param name="bgcolor" value="#000000">\n<param name="allowFullScreen" value="false">\n<param name="wmode" value="<%= wmode %>">\n<param name="tabindex" value="1">\n<param name="FlashVars" value="playbackId=<%= playbackId %>&callback=<%= callbackName %>">\n<embed\n name="<%= cid %>"\n type="application/x-shockwave-flash"\n disabled="disabled"\n tabindex="-1"\n enablecontextmenu="false"\n allowScriptAccess="always"\n quality="autohigh"\n pluginspage="http://www.macromedia.com/go/getflashplayer"\n wmode="<%= wmode %>"\n swliveconnect="true"\n allowfullscreen="false"\n bgcolor="#000000"\n FlashVars="playbackId=<%= playbackId %>&callback=<%= callbackName %>"\n data="<%= swfPath %>"\n src="<%= swfPath %>"\n width="100%"\n height="100%">\n</embed>\n'},"./src/playbacks/base_flash_playback/public/flash.scss":
/*!*************************************************************!*\
!*** ./src/playbacks/base_flash_playback/public/flash.scss ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./flash.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/base_flash_playback/public/flash.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/playbacks/flash/flash.js":
/*!**************************************!*\
!*** ./src/playbacks/flash/flash.js ***!
\**************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=g(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=g(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=g(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=g(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=n(/*! ../../base/utils */"./src/base/utils.js"),l=g(n(/*! ../../playbacks/base_flash_playback */"./src/playbacks/base_flash_playback/index.js")),u=g(n(/*! ../../components/browser */"./src/components/browser/index.js")),c=g(n(/*! ../../components/mediator */"./src/components/mediator.js")),d=g(n(/*! ../../base/template */"./src/base/template.js")),f=g(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),h=g(n(/*! ../../base/events */"./src/base/events.js")),p=g(n(/*! ../../base/playback */"./src/base/playback.js")),m=g(n(/*! ./public/Player.swf */"./src/playbacks/flash/public/Player.swf"));function g(e){return e&&e.__esModule?e:{default:e}}var y=function(e){function t(){(0,r.default)(this,t);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=(0,i.default)(this,e.call.apply(e,[this].concat(a)));return s._src=s.options.src,s._baseUrl=s.options.baseUrl,s._autoPlay=s.options.autoPlay,s.settings={default:["seekbar"]},s.settings.left=["playpause","position","duration"],s.settings.right=["fullscreen","volume"],s.settings.seekEnabled=!0,s._isReadyState=!1,s._addListeners(),s}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"flash"}},{key:"swfPath",get:function(){return(0,d.default)(m.default)({baseUrl:this._baseUrl})}},{key:"ended",get:function(){return"ENDED"===this._currentState}},{key:"buffering",get:function(){return!!this._bufferingState&&"ENDED"!==this._currentState}}]),t.prototype._bootstrap=function(){var e=this;this.el.playerPlay?(this.el.width="100%",this.el.height="100%","PLAYING"===this._currentState?this._firstPlay():(this._currentState="IDLE",this._autoPlay&&this.play()),(0,f.default)('<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%" />').insertAfter(this.$el),this.getDuration()>0?this._metadataLoaded():c.default.once(this.uniqueId+":timeupdate",this._metadataLoaded,this)):(this._attempts=this._attempts||0,++this._attempts<=60?setTimeout((function(){return e._bootstrap()}),50):this.trigger(h.default.PLAYBACK_ERROR,{message:"Max number of attempts reached"},this.name))},t.prototype._metadataLoaded=function(){this._isReadyState=!0,this.trigger(h.default.PLAYBACK_READY,this.name),this.trigger(h.default.PLAYBACK_SETTINGSUPDATE,this.name)},t.prototype.getPlaybackType=function(){return p.default.VOD},t.prototype.isHighDefinitionInUse=function(){return!1},t.prototype._updateTime=function(){this.trigger(h.default.PLAYBACK_TIMEUPDATE,{current:this.el.getPosition(),total:this.el.getDuration()},this.name)},t.prototype._addListeners=function(){c.default.on(this.uniqueId+":progress",this._progress,this),c.default.on(this.uniqueId+":timeupdate",this._updateTime,this),c.default.on(this.uniqueId+":statechanged",this._checkState,this),c.default.on(this.uniqueId+":flashready",this._bootstrap,this)},t.prototype.stopListening=function(){e.prototype.stopListening.call(this),c.default.off(this.uniqueId+":progress"),c.default.off(this.uniqueId+":timeupdate"),c.default.off(this.uniqueId+":statechanged"),c.default.off(this.uniqueId+":flashready")},t.prototype._checkState=function(){this._isIdle||"PAUSED"===this._currentState||("PLAYING_BUFFERING"!==this._currentState&&"PLAYING_BUFFERING"===this.el.getState()?(this._bufferingState=!0,this.trigger(h.default.PLAYBACK_BUFFERING,this.name),this._currentState="PLAYING_BUFFERING"):"PLAYING"===this.el.getState()?(this._bufferingState=!1,this.trigger(h.default.PLAYBACK_BUFFERFULL,this.name),this._currentState="PLAYING"):"IDLE"===this.el.getState()?this._currentState="IDLE":"ENDED"===this.el.getState()&&(this.trigger(h.default.PLAYBACK_ENDED,this.name),this.trigger(h.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.el.getDuration()},this.name),this._currentState="ENDED",this._isIdle=!0))},t.prototype._progress=function(){"IDLE"!==this._currentState&&"ENDED"!==this._currentState&&this.trigger(h.default.PLAYBACK_PROGRESS,{start:0,current:this.el.getBytesLoaded(),total:this.el.getBytesTotal()})},t.prototype._firstPlay=function(){var e=this;this.el.playerPlay?(this._isIdle=!1,this.el.playerPlay(this._src),this.listenToOnce(this,h.default.PLAYBACK_BUFFERFULL,(function(){return e._checkInitialSeek()})),this._currentState="PLAYING"):this.listenToOnce(this,h.default.PLAYBACK_READY,this._firstPlay)},t.prototype._checkInitialSeek=function(){var e=(0,s.seekStringToSeconds)(window.location.href);0!==e&&this.seekSeconds(e)},t.prototype.play=function(){this.trigger(h.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState||"PLAYING_BUFFERING"===this._currentState?(this._currentState="PLAYING",this.el.playerResume(),this.trigger(h.default.PLAYBACK_PLAY,this.name)):"PLAYING"!==this._currentState&&(this._firstPlay(),this.trigger(h.default.PLAYBACK_PLAY,this.name))},t.prototype.volume=function(e){var t=this;this.isReady?this.el.playerVolume(e):this.listenToOnce(this,h.default.PLAYBACK_BUFFERFULL,(function(){return t.volume(e)}))},t.prototype.pause=function(){this._currentState="PAUSED",this.el.playerPause(),this.trigger(h.default.PLAYBACK_PAUSE,this.name)},t.prototype.stop=function(){this.el.playerStop(),this.trigger(h.default.PLAYBACK_STOP),this.trigger(h.default.PLAYBACK_TIMEUPDATE,{current:0,total:0},this.name)},t.prototype.isPlaying=function(){return!!(this.isReady&&this._currentState.indexOf("PLAYING")>-1)},t.prototype.getDuration=function(){return this.el.getDuration()},t.prototype.seekPercentage=function(e){var t=this;if(this.el.getDuration()>0){var n=this.el.getDuration()*(e/100);this.seek(n)}else this.listenToOnce(this,h.default.PLAYBACK_BUFFERFULL,(function(){return t.seekPercentage(e)}))},t.prototype.seek=function(e){var t=this;this.isReady&&this.el.playerSeek?(this.el.playerSeek(e),this.trigger(h.default.PLAYBACK_TIMEUPDATE,{current:e,total:this.el.getDuration()},this.name),"PAUSED"===this._currentState&&this.el.playerPause()):this.listenToOnce(this,h.default.PLAYBACK_BUFFERFULL,(function(){return t.seek(e)}))},t.prototype.destroy=function(){clearInterval(this.bootstrapId),e.prototype.stopListening.call(this),this.$el.remove()},(0,a.default)(t,[{key:"isReady",get:function(){return this._isReadyState}}]),t}(l.default);t.default=y,y.canPlay=function(e){if(u.default.hasFlash&&e&&e.constructor===String){var t=e.split("?")[0].match(/.*\.(.*)$/)||[];return t.length>1&&!u.default.isMobile&&t[1].toLowerCase().match(/^(mp4|mov|f4v|3gpp|3gp)$/)}return!1},e.exports=t.default},"./src/playbacks/flash/index.js":
/*!**************************************!*\
!*** ./src/playbacks/flash/index.js ***!
\**************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./flash */"./src/playbacks/flash/flash.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/playbacks/flash/public/Player.swf":
/*!***********************************************!*\
!*** ./src/playbacks/flash/public/Player.swf ***!
\***********************************************/
/*! no static exports found */function(e,t){e.exports="<%=baseUrl%>/4b76590b32dab62bc95c1b7951efae78.swf"},"./src/playbacks/flashls/flashls.js":
/*!******************************************!*\
!*** ./src/playbacks/flashls/flashls.js ***!
\******************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=y(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=y(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=y(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=y(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=y(n(/*! ../../playbacks/base_flash_playback */"./src/playbacks/base_flash_playback/index.js")),l=y(n(/*! ../../base/events */"./src/base/events.js")),u=y(n(/*! ../../base/template */"./src/base/template.js")),c=y(n(/*! ../../base/playback */"./src/base/playback.js")),d=y(n(/*! ../../components/mediator */"./src/components/mediator.js")),f=y(n(/*! ../../components/browser */"./src/components/browser/index.js")),h=y(n(/*! ../../components/error */"./src/components/error/index.js")),p=y(n(/*! ./flashls_events */"./src/playbacks/flashls/flashls_events.js")),m=y(n(/*! ./public/HLSPlayer.swf */"./src/playbacks/flashls/public/HLSPlayer.swf")),g=y(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function y(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){(0,r.default)(this,t);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=(0,i.default)(this,e.call.apply(e,[this].concat(a)));return s._src=s.options.src,s._baseUrl=s.options.baseUrl,s._initHlsParameters(s.options),s.highDefinition=!1,s._autoPlay=s.options.autoPlay,s._loop=s.options.loop,s._defaultSettings={left:["playstop"],default:["seekbar"],right:["fullscreen","volume","hd-indicator"],seekEnabled:!1},s.settings=g.default.extend({},s._defaultSettings),s._playbackType=c.default.LIVE,s._hasEnded=!1,s._addListeners(),s}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"flashls"}},{key:"swfPath",get:function(){return(0,u.default)(m.default)({baseUrl:this._baseUrl})}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?-1:this._currentLevel},set:function(e){this._currentLevel=e,this.trigger(l.default.PLAYBACK_LEVEL_SWITCH_START),this.el.playerSetCurrentLevel(e)}},{key:"ended",get:function(){return this._hasEnded}},{key:"buffering",get:function(){return!!this._bufferingState&&!this._hasEnded}}]),t.prototype._initHlsParameters=function(e){this._autoStartLoad=void 0===e.autoStartLoad||e.autoStartLoad,this._capLevelToStage=void 0!==e.capLevelToStage&&e.capLevelToStage,this._maxLevelCappingMode=void 0===e.maxLevelCappingMode?"downscale":e.maxLevelCappingMode,this._minBufferLength=void 0===e.minBufferLength?-1:e.minBufferLength,this._minBufferLengthCapping=void 0===e.minBufferLengthCapping?-1:e.minBufferLengthCapping,this._maxBufferLength=void 0===e.maxBufferLength?120:e.maxBufferLength,this._maxBackBufferLength=void 0===e.maxBackBufferLength?30:e.maxBackBufferLength,this._lowBufferLength=void 0===e.lowBufferLength?3:e.lowBufferLength,this._mediaTimePeriod=void 0===e.mediaTimePeriod?100:e.mediaTimePeriod,this._fpsDroppedMonitoringPeriod=void 0===e.fpsDroppedMonitoringPeriod?5e3:e.fpsDroppedMonitoringPeriod,this._fpsDroppedMonitoringThreshold=void 0===e.fpsDroppedMonitoringThreshold?.2:e.fpsDroppedMonitoringThreshold,this._capLevelonFPSDrop=void 0!==e.capLevelonFPSDrop&&e.capLevelonFPSDrop,this._smoothAutoSwitchonFPSDrop=void 0===e.smoothAutoSwitchonFPSDrop?this.capLevelonFPSDrop:e.smoothAutoSwitchonFPSDrop,this._switchDownOnLevelError=void 0===e.switchDownOnLevelError||e.switchDownOnLevelError,this._seekMode=void 0===e.seekMode?"ACCURATE":e.seekMode,this._keyLoadMaxRetry=void 0===e.keyLoadMaxRetry?3:e.keyLoadMaxRetry,this._keyLoadMaxRetryTimeout=void 0===e.keyLoadMaxRetryTimeout?64e3:e.keyLoadMaxRetryTimeout,this._fragmentLoadMaxRetry=void 0===e.fragmentLoadMaxRetry?3:e.fragmentLoadMaxRetry,this._fragmentLoadMaxRetryTimeout=void 0===e.fragmentLoadMaxRetryTimeout?4e3:e.fragmentLoadMaxRetryTimeout,this._fragmentLoadSkipAfterMaxRetry=void 0===e.fragmentLoadSkipAfterMaxRetry||e.fragmentLoadSkipAfterMaxRetry,this._maxSkippedFragments=void 0===e.maxSkippedFragments?5:e.maxSkippedFragments,this._flushLiveURLCache=void 0!==e.flushLiveURLCache&&e.flushLiveURLCache,this._initialLiveManifestSize=void 0===e.initialLiveManifestSize?1:e.initialLiveManifestSize,this._manifestLoadMaxRetry=void 0===e.manifestLoadMaxRetry?3:e.manifestLoadMaxRetry,this._manifestLoadMaxRetryTimeout=void 0===e.manifestLoadMaxRetryTimeout?64e3:e.manifestLoadMaxRetryTimeout,this._manifestRedundantLoadmaxRetry=void 0===e.manifestRedundantLoadmaxRetry?3:e.manifestRedundantLoadmaxRetry,this._startFromBitrate=void 0===e.startFromBitrate?-1:e.startFromBitrate,this._startFromLevel=void 0===e.startFromLevel?-1:e.startFromLevel,this._autoStartMaxDuration=void 0===e.autoStartMaxDuration?-1:e.autoStartMaxDuration,this._seekFromLevel=void 0===e.seekFromLevel?-1:e.seekFromLevel,this._useHardwareVideoDecoder=void 0!==e.useHardwareVideoDecoder&&e.useHardwareVideoDecoder,this._hlsLogEnabled=void 0===e.hlsLogEnabled||e.hlsLogEnabled,this._logDebug=void 0!==e.logDebug&&e.logDebug,this._logDebug2=void 0!==e.logDebug2&&e.logDebug2,this._logWarn=void 0===e.logWarn||e.logWarn,this._logError=void 0===e.logError||e.logError,this._hlsMinimumDvrSize=void 0===e.hlsMinimumDvrSize?60:e.hlsMinimumDvrSize},t.prototype._addListeners=function(){var e=this;d.default.on(this.cid+":flashready",(function(){return e._bootstrap()})),d.default.on(this.cid+":timeupdate",(function(t){return e._updateTime(t)})),d.default.on(this.cid+":playbackstate",(function(t){return e._setPlaybackState(t)})),d.default.on(this.cid+":levelchanged",(function(t){return e._levelChanged(t)})),d.default.on(this.cid+":error",(function(t,n,r){return e._flashPlaybackError(t,n,r)})),d.default.on(this.cid+":fragmentloaded",(function(t){return e._onFragmentLoaded(t)})),d.default.on(this.cid+":levelendlist",(function(t){return e._onLevelEndlist(t)}))},t.prototype.stopListening=function(){e.prototype.stopListening.call(this),d.default.off(this.cid+":flashready"),d.default.off(this.cid+":timeupdate"),d.default.off(this.cid+":playbackstate"),d.default.off(this.cid+":levelchanged"),d.default.off(this.cid+":playbackerror"),d.default.off(this.cid+":fragmentloaded"),d.default.off(this.cid+":manifestloaded"),d.default.off(this.cid+":levelendlist")},t.prototype._bootstrap=function(){var e=this;if(this.el.playerLoad)this.el.width="100%",this.el.height="100%",this._isReadyState=!0,this._srcLoaded=!1,this._currentState="IDLE",this._setFlashSettings(),this._updatePlaybackType(),(this._autoPlay||this._shouldPlayOnManifestLoaded)&&this.play(),this.trigger(l.default.PLAYBACK_READY,this.name);else if(this._bootstrapAttempts=this._bootstrapAttempts||0,++this._bootstrapAttempts<=60)setTimeout((function(){return e._bootstrap()}),50);else{var t=this.createError({code:"playerLoadFail_maxNumberAttemptsReached",description:this.name+" error: Max number of attempts reached",level:h.default.Levels.FATAL,raw:{}});this.trigger(l.default.PLAYBACK_ERROR,t)}},t.prototype._setFlashSettings=function(){this.el.playerSetAutoStartLoad(this._autoStartLoad),this.el.playerSetCapLevelToStage(this._capLevelToStage),this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode),this.el.playerSetMinBufferLength(this._minBufferLength),this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping),this.el.playerSetMaxBufferLength(this._maxBufferLength),this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength),this.el.playerSetLowBufferLength(this._lowBufferLength),this.el.playerSetMediaTimePeriod(this._mediaTimePeriod),this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod),this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold),this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop),this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop),this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError),this.el.playerSetSeekMode(this._seekMode),this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry),this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout),this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry),this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout),this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry),this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments),this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache),this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize),this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry),this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout),this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry),this.el.playerSetStartFromBitrate(this._startFromBitrate),this.el.playerSetStartFromLevel(this._startFromLevel),this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration),this.el.playerSetSeekFromLevel(this._seekFromLevel),this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder),this.el.playerSetLogInfo(this._hlsLogEnabled),this.el.playerSetLogDebug(this._logDebug),this.el.playerSetLogDebug2(this._logDebug2),this.el.playerSetLogWarn(this._logWarn),this.el.playerSetLogError(this._logError)},t.prototype.setAutoStartLoad=function(e){this._autoStartLoad=e,this.el.playerSetAutoStartLoad(this._autoStartLoad)},t.prototype.setCapLevelToStage=function(e){this._capLevelToStage=e,this.el.playerSetCapLevelToStage(this._capLevelToStage)},t.prototype.setMaxLevelCappingMode=function(e){this._maxLevelCappingMode=e,this.el.playerSetMaxLevelCappingMode(this._maxLevelCappingMode)},t.prototype.setSetMinBufferLength=function(e){this._minBufferLength=e,this.el.playerSetMinBufferLength(this._minBufferLength)},t.prototype.setMinBufferLengthCapping=function(e){this._minBufferLengthCapping=e,this.el.playerSetMinBufferLengthCapping(this._minBufferLengthCapping)},t.prototype.setMaxBufferLength=function(e){this._maxBufferLength=e,this.el.playerSetMaxBufferLength(this._maxBufferLength)},t.prototype.setMaxBackBufferLength=function(e){this._maxBackBufferLength=e,this.el.playerSetMaxBackBufferLength(this._maxBackBufferLength)},t.prototype.setLowBufferLength=function(e){this._lowBufferLength=e,this.el.playerSetLowBufferLength(this._lowBufferLength)},t.prototype.setMediaTimePeriod=function(e){this._mediaTimePeriod=e,this.el.playerSetMediaTimePeriod(this._mediaTimePeriod)},t.prototype.setFpsDroppedMonitoringPeriod=function(e){this._fpsDroppedMonitoringPeriod=e,this.el.playerSetFpsDroppedMonitoringPeriod(this._fpsDroppedMonitoringPeriod)},t.prototype.setFpsDroppedMonitoringThreshold=function(e){this._fpsDroppedMonitoringThreshold=e,this.el.playerSetFpsDroppedMonitoringThreshold(this._fpsDroppedMonitoringThreshold)},t.prototype.setCapLevelonFPSDrop=function(e){this._capLevelonFPSDrop=e,this.el.playerSetCapLevelonFPSDrop(this._capLevelonFPSDrop)},t.prototype.setSmoothAutoSwitchonFPSDrop=function(e){this._smoothAutoSwitchonFPSDrop=e,this.el.playerSetSmoothAutoSwitchonFPSDrop(this._smoothAutoSwitchonFPSDrop)},t.prototype.setSwitchDownOnLevelError=function(e){this._switchDownOnLevelError=e,this.el.playerSetSwitchDownOnLevelError(this._switchDownOnLevelError)},t.prototype.setSeekMode=function(e){this._seekMode=e,this.el.playerSetSeekMode(this._seekMode)},t.prototype.setKeyLoadMaxRetry=function(e){this._keyLoadMaxRetry=e,this.el.playerSetKeyLoadMaxRetry(this._keyLoadMaxRetry)},t.prototype.setKeyLoadMaxRetryTimeout=function(e){this._keyLoadMaxRetryTimeout=e,this.el.playerSetKeyLoadMaxRetryTimeout(this._keyLoadMaxRetryTimeout)},t.prototype.setFragmentLoadMaxRetry=function(e){this._fragmentLoadMaxRetry=e,this.el.playerSetFragmentLoadMaxRetry(this._fragmentLoadMaxRetry)},t.prototype.setFragmentLoadMaxRetryTimeout=function(e){this._fragmentLoadMaxRetryTimeout=e,this.el.playerSetFragmentLoadMaxRetryTimeout(this._fragmentLoadMaxRetryTimeout)},t.prototype.setFragmentLoadSkipAfterMaxRetry=function(e){this._fragmentLoadSkipAfterMaxRetry=e,this.el.playerSetFragmentLoadSkipAfterMaxRetry(this._fragmentLoadSkipAfterMaxRetry)},t.prototype.setMaxSkippedFragments=function(e){this._maxSkippedFragments=e,this.el.playerSetMaxSkippedFragments(this._maxSkippedFragments)},t.prototype.setFlushLiveURLCache=function(e){this._flushLiveURLCache=e,this.el.playerSetFlushLiveURLCache(this._flushLiveURLCache)},t.prototype.setInitialLiveManifestSize=function(e){this._initialLiveManifestSize=e,this.el.playerSetInitialLiveManifestSize(this._initialLiveManifestSize)},t.prototype.setManifestLoadMaxRetry=function(e){this._manifestLoadMaxRetry=e,this.el.playerSetManifestLoadMaxRetry(this._manifestLoadMaxRetry)},t.prototype.setManifestLoadMaxRetryTimeout=function(e){this._manifestLoadMaxRetryTimeout=e,this.el.playerSetManifestLoadMaxRetryTimeout(this._manifestLoadMaxRetryTimeout)},t.prototype.setManifestRedundantLoadmaxRetry=function(e){this._manifestRedundantLoadmaxRetry=e,this.el.playerSetManifestRedundantLoadmaxRetry(this._manifestRedundantLoadmaxRetry)},t.prototype.setStartFromBitrate=function(e){this._startFromBitrate=e,this.el.playerSetStartFromBitrate(this._startFromBitrate)},t.prototype.setStartFromLevel=function(e){this._startFromLevel=e,this.el.playerSetStartFromLevel(this._startFromLevel)},t.prototype.setAutoStartMaxDuration=function(e){this._autoStartMaxDuration=e,this.el.playerSetAutoStartMaxDuration(this._autoStartMaxDuration)},t.prototype.setSeekFromLevel=function(e){this._seekFromLevel=e,this.el.playerSetSeekFromLevel(this._seekFromLevel)},t.prototype.setUseHardwareVideoDecoder=function(e){this._useHardwareVideoDecoder=e,this.el.playerSetUseHardwareVideoDecoder(this._useHardwareVideoDecoder)},t.prototype.setSetLogInfo=function(e){this._hlsLogEnabled=e,this.el.playerSetLogInfo(this._hlsLogEnabled)},t.prototype.setLogDebug=function(e){this._logDebug=e,this.el.playerSetLogDebug(this._logDebug)},t.prototype.setLogDebug2=function(e){this._logDebug2=e,this.el.playerSetLogDebug2(this._logDebug2)},t.prototype.setLogWarn=function(e){this._logWarn=e,this.el.playerSetLogWarn(this._logWarn)},t.prototype.setLogError=function(e){this._logError=e,this.el.playerSetLogError(this._logError)},t.prototype._levelChanged=function(e){var t=this.el.getLevels()[e];t&&(this.highDefinition=t.height>=720||t.bitrate/1e3>=2e3,this.trigger(l.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this._levels&&0!==this._levels.length||this._fillLevels(),this.trigger(l.default.PLAYBACK_BITRATE,{height:t.height,width:t.width,bandwidth:t.bitrate,bitrate:t.bitrate,level:e}),this.trigger(l.default.PLAYBACK_LEVEL_SWITCH_END))},t.prototype._updateTime=function(e){if("IDLE"!==this._currentState){var t=this._normalizeDuration(e.duration),n=Math.min(Math.max(e.position,0),t),r=this._dvrEnabled,i=this._playbackType===c.default.LIVE;this._dvrEnabled=i&&t>this._hlsMinimumDvrSize,100!==t&&void 0!==i&&(this._dvrEnabled!==r&&(this._updateSettings(),this.trigger(l.default.PLAYBACK_SETTINGSUPDATE,this.name)),i&&!this._dvrEnabled&&(n=t),this.trigger(l.default.PLAYBACK_TIMEUPDATE,{current:n,total:t},this.name))}},t.prototype.play=function(){this.trigger(l.default.PLAYBACK_PLAY_INTENT),"PAUSED"===this._currentState?this.el.playerResume():this._srcLoaded||"PLAYING"===this._currentState?this.el.playerPlay():this._firstPlay()},t.prototype.getPlaybackType=function(){return this._playbackType?this._playbackType:null},t.prototype.getCurrentTime=function(){return this.el.getPosition()},t.prototype.getCurrentLevelIndex=function(){return this._currentLevel},t.prototype.getCurrentLevel=function(){return this.levels[this.currentLevel]},t.prototype.getCurrentBitrate=function(){return this.levels[this.currentLevel].bitrate},t.prototype.setCurrentLevel=function(e){this.currentLevel=e},t.prototype.isHighDefinitionInUse=function(){return this.highDefinition},t.prototype.getLevels=function(){return this.levels},t.prototype._setPlaybackState=function(e){["PLAYING_BUFFERING","PAUSED_BUFFERING"].indexOf(e)>=0?(this._bufferingState=!0,this.trigger(l.default.PLAYBACK_BUFFERING,this.name),this._updateCurrentState(e)):["PLAYING","PAUSED"].indexOf(e)>=0?(["PLAYING_BUFFERING","PAUSED_BUFFERING","IDLE"].indexOf(this._currentState)>=0&&(this._bufferingState=!1,this.trigger(l.default.PLAYBACK_BUFFERFULL,this.name)),this._updateCurrentState(e)):"IDLE"===e&&(this._srcLoaded=!1,this._loop&&["PLAYING_BUFFERING","PLAYING"].indexOf(this._currentState)>=0?(this.play(),this.seek(0)):(this._updateCurrentState(e),this._hasEnded=!0,this.trigger(l.default.PLAYBACK_TIMEUPDATE,{current:0,total:this.getDuration()},this.name),this.trigger(l.default.PLAYBACK_ENDED,this.name)))},t.prototype._updateCurrentState=function(e){this._currentState=e,"IDLE"!==e&&(this._hasEnded=!1),this._updatePlaybackType(),"PLAYING"===e?this.trigger(l.default.PLAYBACK_PLAY,this.name):"PAUSED"===e&&this.trigger(l.default.PLAYBACK_PAUSE,this.name)},t.prototype._updatePlaybackType=function(){this._playbackType=this.el.getType(),this._playbackType&&(this._playbackType=this._playbackType.toLowerCase(),this._playbackType===c.default.VOD?this._startReportingProgress():this._stopReportingProgress()),this.trigger(l.default.PLAYBACK_PLAYBACKSTATE,{type:this._playbackType})},t.prototype._startReportingProgress=function(){this._reportingProgress||(this._reportingProgress=!0)},t.prototype._stopReportingProgress=function(){this._reportingProgress=!1},t.prototype._onFragmentLoaded=function(e){if(this.trigger(l.default.PLAYBACK_FRAGMENT_LOADED,e),this._reportingProgress&&this.getCurrentTime()){var t=this.getCurrentTime()+this.el.getbufferLength();this.trigger(l.default.PLAYBACK_PROGRESS,{start:this.getCurrentTime(),current:t,total:this.el.getDuration()})}},t.prototype._onLevelEndlist=function(){this._updatePlaybackType()},t.prototype._firstPlay=function(){var e=this;this._shouldPlayOnManifestLoaded=!0,this.el.playerLoad&&(d.default.once(this.cid+":manifestloaded",(function(t,n){return e._manifestLoaded(t,n)})),this._setFlashSettings(),this.el.playerLoad(this._src),this._srcLoaded=!0)},t.prototype.volume=function(e){var t=this;this.isReady?this.el.playerVolume(e):this.listenToOnce(this,l.default.PLAYBACK_BUFFERFULL,(function(){return t.volume(e)}))},t.prototype.pause=function(){(this._playbackType!==c.default.LIVE||this._dvrEnabled)&&(this.el.playerPause(),this._playbackType===c.default.LIVE&&this._dvrEnabled&&this._updateDvr(!0))},t.prototype.stop=function(){this._srcLoaded=!1,this.el.playerStop(),this.trigger(l.default.PLAYBACK_STOP),this.trigger(l.default.PLAYBACK_TIMEUPDATE,{current:0,total:0},this.name)},t.prototype.isPlaying=function(){return!!this._currentState&&!!this._currentState.match(/playing/i)},t.prototype.getDuration=function(){return this._normalizeDuration(this.el.getDuration())},t.prototype._normalizeDuration=function(e){return this._playbackType===c.default.LIVE&&(e=Math.max(0,e-10)),e},t.prototype.seekPercentage=function(e){var t=this.el.getDuration(),n=0;e>0&&(n=t*e/100),this.seek(n)},t.prototype.seek=function(e){var t=this.getDuration();if(this._playbackType===c.default.LIVE){var n=t-e>3;this._updateDvr(n)}this.el.playerSeek(e),this.trigger(l.default.PLAYBACK_TIMEUPDATE,{current:e,total:t},this.name)},t.prototype._updateDvr=function(e){var t=!!this._dvrInUse;this._dvrInUse=e,this._dvrInUse!==t&&(this._updateSettings(),this.trigger(l.default.PLAYBACK_DVR,this._dvrInUse),this.trigger(l.default.PLAYBACK_STATS_ADD,{dvr:this._dvrInUse}))},t.prototype._flashPlaybackError=function(e,t,n){var r={code:e,description:n,level:h.default.Levels.FATAL,raw:{code:e,url:t,message:n}},i=this.createError(r);this.trigger(l.default.PLAYBACK_ERROR,i),this.trigger(l.default.PLAYBACK_STOP)},t.prototype._manifestLoaded=function(e,t){this._shouldPlayOnManifestLoaded&&(this._shouldPlayOnManifestLoaded=!1,this.el.playerPlay()),this._fillLevels(),this.trigger(l.default.PLAYBACK_LOADEDMETADATA,{duration:e,data:t})},t.prototype._fillLevels=function(){var e=this.el.getLevels(),t=e.length;this._levels=[];for(var n=0;n<t;n++)this._levels.push({id:n,label:e[n].height+"p",level:e[n]});this.trigger(l.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},t.prototype.destroy=function(){this.stopListening(),this.$el.remove()},t.prototype._updateSettings=function(){this.settings=g.default.extend({},this._defaultSettings),this._playbackType===c.default.VOD||this._dvrInUse?(this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=!0):this._dvrEnabled?(this.settings.left=["playpause"],this.settings.seekEnabled=!0):this.settings.seekEnabled=!1},t.prototype._createCallbacks=function(){var e=this;window.Clappr||(window.Clappr={}),window.Clappr.flashlsCallbacks||(window.Clappr.flashlsCallbacks={}),this.flashlsEvents=new p.default(this.cid),window.Clappr.flashlsCallbacks[this.cid]=function(t,n){e.flashlsEvents[t].apply(e.flashlsEvents,n)}},t.prototype.render=function(){return e.prototype.render.call(this),this._createCallbacks(),this},(0,a.default)(t,[{key:"isReady",get:function(){return this._isReadyState}},{key:"dvrEnabled",get:function(){return!!this._dvrEnabled}}]),t}(s.default);t.default=v,v.canPlay=function(e,t){var n=e.split("?")[0].match(/.*\.(.*)$/)||[];return f.default.hasFlash&&(n.length>1&&"m3u8"===n[1].toLowerCase()||"application/x-mpegURL"===t||"application/vnd.apple.mpegurl"===t)},e.exports=t.default},"./src/playbacks/flashls/flashls_events.js":
/*!*************************************************!*\
!*** ./src/playbacks/flashls/flashls_events.js ***!
\*************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=a(n(/*! ../../components/mediator */"./src/components/mediator.js"));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(){function e(t){(0,r.default)(this,e),this.instanceId=t}return e.prototype.ready=function(){i.default.trigger(this.instanceId+":flashready")},e.prototype.videoSize=function(e,t){i.default.trigger(this.instanceId+":videosizechanged",e,t)},e.prototype.complete=function(){i.default.trigger(this.instanceId+":complete")},e.prototype.error=function(e,t,n){i.default.trigger(this.instanceId+":error",e,t,n)},e.prototype.manifest=function(e,t){i.default.trigger(this.instanceId+":manifestloaded",e,t)},e.prototype.audioLevelLoaded=function(e){i.default.trigger(this.instanceId+":audiolevelloaded",e)},e.prototype.levelLoaded=function(e){i.default.trigger(this.instanceId+":levelloaded",e)},e.prototype.levelEndlist=function(e){i.default.trigger(this.instanceId+":levelendlist",e)},e.prototype.fragmentLoaded=function(e){i.default.trigger(this.instanceId+":fragmentloaded",e)},e.prototype.fragmentPlaying=function(e){i.default.trigger(this.instanceId+":fragmentplaying",e)},e.prototype.position=function(e){i.default.trigger(this.instanceId+":timeupdate",e)},e.prototype.state=function(e){i.default.trigger(this.instanceId+":playbackstate",e)},e.prototype.seekState=function(e){i.default.trigger(this.instanceId+":seekstate",e)},e.prototype.switch=function(e){i.default.trigger(this.instanceId+":levelchanged",e)},e.prototype.audioTracksListChange=function(e){i.default.trigger(this.instanceId+":audiotracklistchanged",e)},e.prototype.audioTrackChange=function(e){i.default.trigger(this.instanceId+":audiotrackchanged",e)},e}();t.default=o,e.exports=t.default},"./src/playbacks/flashls/index.js":
/*!****************************************!*\
!*** ./src/playbacks/flashls/index.js ***!
\****************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./flashls */"./src/playbacks/flashls/flashls.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/playbacks/flashls/public/HLSPlayer.swf":
/*!****************************************************!*\
!*** ./src/playbacks/flashls/public/HLSPlayer.swf ***!
\****************************************************/
/*! no static exports found */function(e,t){e.exports="<%=baseUrl%>/8fa12a459188502b9f0d39b8a67d9e6c.swf"},"./src/playbacks/hls/hls.js":
/*!**********************************!*\
!*** ./src/playbacks/hls/hls.js ***!
\**********************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=y(n(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),i=y(n(/*! babel-runtime/core-js/json/stringify */"./node_modules/babel-runtime/core-js/json/stringify.js")),a=y(n(/*! babel-runtime/helpers/extends */"./node_modules/babel-runtime/helpers/extends.js")),o=y(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),s=y(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),l=y(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),u=y(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),c=y(n(/*! ../../playbacks/html5_video */"./src/playbacks/html5_video/index.js")),d=y(n(/*! hls.js */"./node_modules/hls.js/dist/hls.js")),f=y(n(/*! ../../base/events */"./src/base/events.js")),h=y(n(/*! ../../base/playback */"./src/base/playback.js")),p=n(/*! ../../base/utils */"./src/base/utils.js"),m=y(n(/*! ../../plugins/log */"./src/plugins/log/index.js")),g=y(n(/*! ../../components/error */"./src/components/error/index.js"));function y(e){return e&&e.__esModule?e:{default:e}}var v=function(e){function t(){(0,o.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var l=(0,s.default)(this,e.call.apply(e,[this].concat(r)));return l.options.playback=(0,a.default)({},l.options,l.options.playback),l._minDvrSize=void 0===l.options.hlsMinimumDvrSize?60:l.options.hlsMinimumDvrSize,l._extrapolatedWindowNumSegments=l.options.playback&&void 0!==l.options.playback.extrapolatedWindowNumSegments?l.options.playback.extrapolatedWindowNumSegments:2,l._playbackType=h.default.VOD,l._lastTimeUpdate={current:0,total:0},l._lastDuration=null,l._playableRegionStartTime=0,l._localStartTimeCorrelation=null,l._localEndTimeCorrelation=null,l._playableRegionDuration=0,l._programDateTime=0,l._durationExcludesAfterLiveSyncPoint=!1,l._segmentTargetDuration=null,l._playlistType=null,l._recoverAttemptsRemaining=l.options.hlsRecoverAttempts||16,l}return(0,u.default)(t,e),(0,l.default)(t,[{key:"name",get:function(){return"hls"}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?-1:this._currentLevel},set:function(e){this._currentLevel=e,this.trigger(f.default.PLAYBACK_LEVEL_SWITCH_START),this.options.playback.hlsUseNextLevel?this._hls.nextLevel=this._currentLevel:this._hls.currentLevel=this._currentLevel}},{key:"isReady",get:function(){return this._isReadyState}},{key:"_startTime",get:function(){return this._playbackType===h.default.LIVE&&"EVENT"!==this._playlistType?this._extrapolatedStartTime:this._playableRegionStartTime}},{key:"_now",get:function(){return(0,p.now)()}},{key:"_extrapolatedStartTime",get:function(){if(!this._localStartTimeCorrelation)return this._playableRegionStartTime;var e=this._localStartTimeCorrelation,t=this._now-e.local,n=(e.remote+t)/1e3;return Math.min(n,this._playableRegionStartTime+this._extrapolatedWindowDuration)}},{key:"_extrapolatedEndTime",get:function(){var e=this._playableRegionStartTime+this._playableRegionDuration;if(!this._localEndTimeCorrelation)return e;var t=this._localEndTimeCorrelation,n=this._now-t.local,r=(t.remote+n)/1e3;return Math.max(e-this._extrapolatedWindowDuration,Math.min(r,e))}},{key:"_duration",get:function(){return this._extrapolatedEndTime-this._startTime}},{key:"_extrapolatedWindowDuration",get:function(){return null===this._segmentTargetDuration?0:this._extrapolatedWindowNumSegments*this._segmentTargetDuration}}],[{key:"HLSJS",get:function(){return d.default}}]),t.prototype._setup=function(){var e=this;this._ccIsSetup=!1,this._ccTracksUpdated=!1,this._hls=new d.default((0,p.assign)({},this.options.playback.hlsjsConfig)),this._hls.on(d.default.Events.MEDIA_ATTACHED,(function(){return e._hls.loadSource(e.options.src)})),this._hls.on(d.default.Events.LEVEL_LOADED,(function(t,n){return e._updatePlaybackType(t,n)})),this._hls.on(d.default.Events.LEVEL_UPDATED,(function(t,n){return e._onLevelUpdated(t,n)})),this._hls.on(d.default.Events.LEVEL_SWITCHING,(function(t,n){return e._onLevelSwitch(t,n)})),this._hls.on(d.default.Events.FRAG_LOADED,(function(t,n){return e._onFragmentLoaded(t,n)})),this._hls.on(d.default.Events.ERROR,(function(t,n){return e._onHLSJSError(t,n)})),this._hls.on(d.default.Events.SUBTITLE_TRACK_LOADED,(function(t,n){return e._onSubtitleLoaded(t,n)})),this._hls.on(d.default.Events.SUBTITLE_TRACKS_UPDATED,(function(){return e._ccTracksUpdated=!0})),this._hls.attachMedia(this.el)},t.prototype.render=function(){return this._ready(),e.prototype.render.call(this)},t.prototype._ready=function(){this._isReadyState=!0,this.trigger(f.default.PLAYBACK_READY,this.name)},t.prototype._recover=function(e,t,n){if(this._recoveredDecodingError)if(this._recoveredAudioCodecError){m.default.error("hlsjs: failed to recover",{evt:e,data:t}),n.level=g.default.Levels.FATAL;var r=this.createError(n);this.trigger(f.default.PLAYBACK_ERROR,r),this.stop()}else this._recoveredAudioCodecError=!0,this._hls.swapAudioCodec(),this._hls.recoverMediaError();else this._recoveredDecodingError=!0,this._hls.recoverMediaError()},t.prototype._setupSrc=function(e){},t.prototype._startTimeUpdateTimer=function(){var e=this;this._timeUpdateTimer||(this._timeUpdateTimer=setInterval((function(){e._onDurationChange(),e._onTimeUpdate()}),100))},t.prototype._stopTimeUpdateTimer=function(){this._timeUpdateTimer&&(clearInterval(this._timeUpdateTimer),this._timeUpdateTimer=null)},t.prototype.getProgramDateTime=function(){return this._programDateTime},t.prototype.getDuration=function(){return this._duration},t.prototype.getCurrentTime=function(){return Math.max(0,this.el.currentTime-this._startTime)},t.prototype.getStartTimeOffset=function(){return this._startTime},t.prototype.seekPercentage=function(e){var t=this._duration;e>0&&(t=this._duration*(e/100)),this.seek(t)},t.prototype.seek=function(t){t<0&&(m.default.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),t=this.getDuration()),this.dvrEnabled&&this._updateDvr(t<this.getDuration()-3),t+=this._startTime,e.prototype.seek.call(this,t)},t.prototype.seekToLivePoint=function(){this.seek(this.getDuration())},t.prototype._updateDvr=function(e){this.trigger(f.default.PLAYBACK_DVR,e),this.trigger(f.default.PLAYBACK_STATS_ADD,{dvr:e})},t.prototype._updateSettings=function(){this._playbackType===h.default.VOD?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(f.default.PLAYBACK_SETTINGSUPDATE)},t.prototype._onHLSJSError=function(e,t){var n={code:t.type+"_"+t.details,description:this.name+" error: type: "+t.type+", details: "+t.details,raw:t},r=void 0;if(t.response&&(n.description+=", response: "+(0,i.default)(t.response)),t.fatal)if(this._recoverAttemptsRemaining>0)switch(this._recoverAttemptsRemaining-=1,t.type){case d.default.ErrorTypes.NETWORK_ERROR:switch(t.details){case d.default.ErrorDetails.MANIFEST_LOAD_ERROR:case d.default.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case d.default.ErrorDetails.MANIFEST_PARSING_ERROR:case d.default.ErrorDetails.LEVEL_LOAD_ERROR:case d.default.ErrorDetails.LEVEL_LOAD_TIMEOUT:m.default.error("hlsjs: unrecoverable network fatal error.",{evt:e,data:t}),r=this.createError(n),this.trigger(f.default.PLAYBACK_ERROR,r),this.stop();break;default:m.default.warn("hlsjs: trying to recover from network error.",{evt:e,data:t}),n.level=g.default.Levels.WARN,this.createError(n),this._hls.startLoad()}break;case d.default.ErrorTypes.MEDIA_ERROR:m.default.warn("hlsjs: trying to recover from media error.",{evt:e,data:t}),n.level=g.default.Levels.WARN,this.createError(n),this._recover(e,t,n);break;default:m.default.error("hlsjs: could not recover from error.",{evt:e,data:t}),r=this.createError(n),this.trigger(f.default.PLAYBACK_ERROR,r),this.stop()}else m.default.error("hlsjs: could not recover from error after maximum number of attempts.",{evt:e,data:t}),r=this.createError(n),this.trigger(f.default.PLAYBACK_ERROR,r),this.stop();else{if(this.options.playback.triggerFatalErrorOnResourceDenied&&this._keyIsDenied(t))return m.default.error("hlsjs: could not load decrypt key.",{evt:e,data:t}),r=this.createError(n),this.trigger(f.default.PLAYBACK_ERROR,r),void this.stop();n.level=g.default.Levels.WARN,this.createError(n),m.default.warn("hlsjs: non-fatal error occurred",{evt:e,data:t})}},t.prototype._keyIsDenied=function(e){return e.type===d.default.ErrorTypes.NETWORK_ERROR&&e.details===d.default.ErrorDetails.KEY_LOAD_ERROR&&e.response&&e.response.code>=400},t.prototype._onTimeUpdate=function(){var e={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:this.getProgramDateTime()};this._lastTimeUpdate&&e.current===this._lastTimeUpdate.current&&e.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=e,this.trigger(f.default.PLAYBACK_TIMEUPDATE,e,this.name))},t.prototype._onDurationChange=function(){var t=this.getDuration();this._lastDuration!==t&&(this._lastDuration=t,e.prototype._onDurationChange.call(this))},t.prototype._onProgress=function(){if(this.el.buffered.length){for(var e=[],t=0,n=0;n<this.el.buffered.length;n++)e=[].concat((0,r.default)(e),[{start:Math.max(0,this.el.buffered.start(n)-this._playableRegionStartTime),end:Math.max(0,this.el.buffered.end(n)-this._playableRegionStartTime)}]),this.el.currentTime>=e[n].start&&this.el.currentTime<=e[n].end&&(t=n);var i={start:e[t].start,current:e[t].end,total:this.getDuration()};this.trigger(f.default.PLAYBACK_PROGRESS,i,e)}},t.prototype.play=function(){this._hls||this._setup(),e.prototype.play.call(this),this._startTimeUpdateTimer()},t.prototype.pause=function(){this._hls&&(e.prototype.pause.call(this),this.dvrEnabled&&this._updateDvr(!0))},t.prototype.stop=function(){this._stopTimeUpdateTimer(),this._hls&&(e.prototype.stop.call(this),this._hls.destroy(),delete this._hls)},t.prototype.destroy=function(){this._stopTimeUpdateTimer(),this._hls&&(this._hls.destroy(),delete this._hls),e.prototype.destroy.call(this)},t.prototype._updatePlaybackType=function(e,t){this._playbackType=t.details.live?h.default.LIVE:h.default.VOD,this._onLevelUpdated(e,t),this._ccTracksUpdated&&this._playbackType===h.default.LIVE&&this.hasClosedCaptionsTracks&&this._onSubtitleLoaded()},t.prototype._fillLevels=function(){this._levels=this._hls.levels.map((function(e,t){return{id:t,level:e,label:e.bitrate/1e3+"Kbps"}})),this.trigger(f.default.PLAYBACK_LEVELS_AVAILABLE,this._levels)},t.prototype._onLevelUpdated=function(e,t){this._segmentTargetDuration=t.details.targetduration,this._playlistType=t.details.type||null;var n=!1,r=!1,i=t.details.fragments,a=this._playableRegionStartTime,o=this._playableRegionDuration;if(0!==i.length){if(i[0].rawProgramDateTime&&(this._programDateTime=i[0].rawProgramDateTime),this._playableRegionStartTime!==i[0].start&&(n=!0,this._playableRegionStartTime=i[0].start),n)if(this._localStartTimeCorrelation){var s=this._localStartTimeCorrelation,l=this._now-s.local,u=(s.remote+l)/1e3;u<i[0].start?this._localStartTimeCorrelation={local:this._now,remote:1e3*i[0].start}:u>a+this._extrapolatedWindowDuration&&(this._localStartTimeCorrelation={local:this._now,remote:1e3*Math.max(i[0].start,a+this._extrapolatedWindowDuration)})}else this._localStartTimeCorrelation={local:this._now,remote:1e3*(i[0].start+this._extrapolatedWindowDuration/2)};var c=t.details.totalduration;if(this._playbackType===h.default.LIVE){var f=t.details.targetduration*((this.options.playback.hlsjsConfig||{}).liveSyncDurationCount||d.default.DefaultConfig.liveSyncDurationCount);f<=c?(c-=f,this._durationExcludesAfterLiveSyncPoint=!0):this._durationExcludesAfterLiveSyncPoint=!1}c!==this._playableRegionDuration&&(r=!0,this._playableRegionDuration=c);var p=i[0].start+c,m=a+o;if(p!==m)if(this._localEndTimeCorrelation){var g=this._localEndTimeCorrelation,y=this._now-g.local,v=(g.remote+y)/1e3;v>p?this._localEndTimeCorrelation={local:this._now,remote:1e3*p}:v<p-this._extrapolatedWindowDuration?this._localEndTimeCorrelation={local:this._now,remote:1e3*(p-this._extrapolatedWindowDuration)}:v>m&&(this._localEndTimeCorrelation={local:this._now,remote:1e3*m})}else this._localEndTimeCorrelation={local:this._now,remote:1e3*p};r&&this._onDurationChange(),n&&this._onProgress()}},t.prototype._onFragmentLoaded=function(e,t){this.trigger(f.default.PLAYBACK_FRAGMENT_LOADED,t)},t.prototype._onSubtitleLoaded=function(){if(!this._ccIsSetup){this.trigger(f.default.PLAYBACK_SUBTITLE_AVAILABLE);var e=this._playbackType===h.default.LIVE?-1:this.closedCaptionsTrackId;this.closedCaptionsTrackId=e,this._ccIsSetup=!0}},t.prototype._onLevelSwitch=function(e,t){this.levels.length||this._fillLevels(),this.trigger(f.default.PLAYBACK_LEVEL_SWITCH_END),this.trigger(f.default.PLAYBACK_LEVEL_SWITCH,t);var n=this._hls.levels[t.level];n&&(this.highDefinition=n.height>=720||n.bitrate/1e3>=2e3,this.trigger(f.default.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(f.default.PLAYBACK_BITRATE,{height:n.height,width:n.width,bandwidth:n.bitrate,bitrate:n.bitrate,level:t.level}))},t.prototype.getPlaybackType=function(){return this._playbackType},t.prototype.isSeekEnabled=function(){return this._playbackType===h.default.VOD||this.dvrEnabled},(0,l.default)(t,[{key:"dvrEnabled",get:function(){return this._durationExcludesAfterLiveSyncPoint&&this._duration>=this._minDvrSize&&this.getPlaybackType()===h.default.LIVE}}]),t}(c.default);t.default=v,v.canPlay=function(e,t){var n=e.split("?")[0].match(/.*\.(.*)$/)||[],r=n.length>1&&"m3u8"===n[1].toLowerCase()||(0,p.listContainsIgnoreCase)(t,["application/vnd.apple.mpegurl","application/x-mpegURL"]);return!(!d.default.isSupported()||!r)},e.exports=t.default},"./src/playbacks/hls/index.js":
/*!************************************!*\
!*** ./src/playbacks/hls/index.js ***!
\************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./hls */"./src/playbacks/hls/hls.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/playbacks/html5_audio/html5_audio.js":
/*!**************************************************!*\
!*** ./src/playbacks/html5_audio/html5_audio.js ***!
\**************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=c(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=c(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(n(/*! ../../base/events */"./src/base/events.js")),l=c(n(/*! ../../base/playback */"./src/base/playback.js")),u=c(n(/*! ../../playbacks/html5_video */"./src/playbacks/html5_video/index.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){return(0,r.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,o.default)(t,e),t.prototype.updateSettings=function(){this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(s.default.PLAYBACK_SETTINGSUPDATE)},t.prototype.getPlaybackType=function(){return l.default.AOD},(0,i.default)(t,[{key:"name",get:function(){return"html5_audio"}},{key:"tagName",get:function(){return"audio"}},{key:"isAudioOnly",get:function(){return!0}}]),t}(u.default);t.default=d,d.canPlay=function(e,t){return u.default._canPlay("audio",{wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},e,t)},e.exports=t.default},"./src/playbacks/html5_audio/index.js":
/*!********************************************!*\
!*** ./src/playbacks/html5_audio/index.js ***!
\********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./html5_audio */"./src/playbacks/html5_audio/html5_audio.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/playbacks/html5_video/html5_video.js":
/*!**************************************************!*\
!*** ./src/playbacks/html5_video/html5_video.js ***!
\**************************************************/
/*! no static exports found */function(e,t,n){"use strict";(function(r){Object.defineProperty(t,"__esModule",{value:!0});var i=_(n(/*! babel-runtime/core-js/array/from */"./node_modules/babel-runtime/core-js/array/from.js")),a=_(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=_(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=_(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),l=_(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),u=_(n(/*! babel-runtime/helpers/toConsumableArray */"./node_modules/babel-runtime/helpers/toConsumableArray.js")),c=_(n(/*! babel-runtime/core-js/object/keys */"./node_modules/babel-runtime/core-js/object/keys.js")),d=n(/*! ../../base/utils */"./src/base/utils.js"),f=_(n(/*! ../../base/playback */"./src/base/playback.js")),h=_(n(/*! ../../components/browser */"./src/components/browser/index.js")),p=_(n(/*! ../../components/error */"./src/components/error/index.js")),m=_(n(/*! ../../base/events */"./src/base/events.js")),g=_(n(/*! ../../plugins/log */"./src/plugins/log/index.js")),y=_(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),v=_(n(/*! ../../base/template */"./src/base/template.js")),b=_(n(/*! ./public/tracks.html */"./src/playbacks/html5_video/public/tracks.html"));function _(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/style.scss */"./src/playbacks/html5_video/public/style.scss");var A={mp4:["avc1.42E01E","avc1.58A01E","avc1.4D401E","avc1.64001E","mp4v.20.8","mp4v.20.240","mp4a.40.2"].map((function(e){return'video/mp4; codecs="'+e+', mp4a.40.2"'})),ogg:['video/ogg; codecs="theora, vorbis"','video/ogg; codecs="dirac"','video/ogg; codecs="theora, speex"'],"3gpp":['video/3gpp; codecs="mp4v.20.8, samr"'],webm:['video/webm; codecs="vp8, vorbis"'],mkv:['video/x-matroska; codecs="theora, vorbis"'],m3u8:["application/x-mpegurl"]};A.ogv=A.ogg,A["3gp"]=A["3gpp"];var E={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},T=(0,c.default)(E).reduce((function(e,t){return[].concat((0,u.default)(e),(0,u.default)(E[t]))}),[]),w={code:"unknown",message:"unknown"},S=function(e){function t(){(0,a.default)(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var s=(0,o.default)(this,e.call.apply(e,[this].concat(r)));s._destroyed=!1,s._loadStarted=!1,s._isBuffering=!1,s._playheadMoving=!1,s._playheadMovingTimer=null,s._stopped=!1,s._ccTrackId=-1,s._setupSrc(s.options.src),s.options.playback||(s.options.playback=s.options||{}),s.options.playback.disableContextMenu=s.options.playback.disableContextMenu||s.options.disableVideoTagContextMenu;var l=s.options.playback,u=l.preload||(h.default.isSafari?"auto":s.options.preload),c=void 0;return s.options.poster&&("string"==typeof s.options.poster?c=s.options.poster:"string"==typeof s.options.poster.url&&(c=s.options.poster.url)),y.default.extend(s.el,{muted:s.options.mute,defaultMuted:s.options.mute,loop:s.options.loop,poster:c,preload:u||"metadata",controls:(l.controls||s.options.useVideoTagDefaultControls)&&"controls",crossOrigin:l.crossOrigin,"x-webkit-playsinline":l.playInline}),l.playInline&&s.$el.attr({playsinline:"playsinline"}),l.crossOrigin&&s.$el.attr({crossorigin:l.crossOrigin}),s.settings={default:["seekbar"]},s.settings.left=["playpause","position","duration"],s.settings.right=["fullscreen","volume","hd-indicator"],l.externalTracks&&s._setupExternalTracks(l.externalTracks),s.options.autoPlay&&s.attemptAutoPlay(),s}return(0,l.default)(t,e),(0,s.default)(t,[{key:"name",get:function(){return"html5_video"}},{key:"tagName",get:function(){return this.isAudioOnly?"audio":"video"}},{key:"isAudioOnly",get:function(){var e=this.options.src,n=t._mimeTypesForUrl(e,E,this.options.mimeType);return this.options.playback&&this.options.playback.audioOnly||this.options.audioOnly||T.indexOf(n[0])>=0}},{key:"attributes",get:function(){return{"data-html5-video":""}}},{key:"events",get:function(){return{canplay:"_onCanPlay",canplaythrough:"_handleBufferingEvents",durationchange:"_onDurationChange",ended:"_onEnded",error:"_onError",loadeddata:"_onLoadedData",loadedmetadata:"_onLoadedMetadata",pause:"_onPause",playing:"_onPlaying",progress:"_onProgress",seeking:"_onSeeking",seeked:"_onSeeked",stalled:"_handleBufferingEvents",timeupdate:"_onTimeUpdate",waiting:"_onWaiting"}}},{key:"ended",get:function(){return this.el.ended}},{key:"buffering",get:function(){return this._isBuffering}}]),t.prototype.configure=function(t){e.prototype.configure.call(this,t),this.el.loop=!!t.loop},t.prototype.attemptAutoPlay=function(){var e=this;this.canAutoPlay((function(t,n){n&&g.default.warn(e.name,"autoplay error.",{result:t,error:n}),t&&r.nextTick((function(){return!e._destroyed&&e.play()}))}))},t.prototype.canAutoPlay=function(e){this.options.disableCanAutoPlay&&e(!0,null);var t={timeout:this.options.autoPlayTimeout||500,inline:this.options.playback.playInline||!1,muted:this.options.mute||!1};h.default.isMobile&&d.DomRecycler.options.recycleVideo&&(t.element=this.el),(0,d.canAutoPlayMedia)(e,t)},t.prototype._setupExternalTracks=function(e){this._externalTracks=e.map((function(e){return{kind:e.kind||"subtitles",label:e.label,lang:e.lang,src:e.src}}))},t.prototype._setupSrc=function(e){this.el.src!==e&&(this._ccIsSetup=!1,this.el.src=e,this._src=this.el.src)},t.prototype._onLoadedMetadata=function(e){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_LOADEDMETADATA,{duration:e.target.duration,data:e}),this._updateSettings();var t=void 0===this._options.autoSeekFromUrl||this._options.autoSeekFromUrl;this.getPlaybackType()!==f.default.LIVE&&t&&this._checkInitialSeek()},t.prototype._onDurationChange=function(){this._updateSettings(),this._onTimeUpdate(),this._onProgress()},t.prototype._updateSettings=function(){this.getPlaybackType()===f.default.VOD||this.getPlaybackType()===f.default.AOD?this.settings.left=["playpause","position","duration"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(m.default.PLAYBACK_SETTINGSUPDATE)},t.prototype.isSeekEnabled=function(){return isFinite(this.getDuration())},t.prototype.getPlaybackType=function(){var e="audio"===this.tagName?f.default.AOD:f.default.VOD;return[0,void 0,1/0].indexOf(this.el.duration)>=0?f.default.LIVE:e},t.prototype.isHighDefinitionInUse=function(){return!1},t.prototype.consent=function(){this.isPlaying()||(e.prototype.consent.call(this),this.el.load())},t.prototype.play=function(){this.trigger(m.default.PLAYBACK_PLAY_INTENT),this._stopped=!1,this._setupSrc(this._src),this._handleBufferingEvents();var e=this.el.play();e&&e.catch&&e.catch((function(){}))},t.prototype.pause=function(){this.el.pause()},t.prototype.stop=function(){this.pause(),this._stopped=!0,this.el.removeAttribute("src"),this.el.load(),this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_STOP)},t.prototype.volume=function(e){0===e?(this.$el.attr({muted:"true"}),this.el.muted=!0):(this.$el.attr({muted:null}),this.el.muted=!1,this.el.volume=e/100)},t.prototype.mute=function(){this.el.muted=!0},t.prototype.unmute=function(){this.el.muted=!1},t.prototype.isMuted=function(){return!0===this.el.muted||0===this.el.volume},t.prototype.isPlaying=function(){return!this.el.paused&&!this.el.ended},t.prototype._startPlayheadMovingChecks=function(){null===this._playheadMovingTimer&&(this._playheadMovingTimeOnCheck=null,this._determineIfPlayheadMoving(),this._playheadMovingTimer=setInterval(this._determineIfPlayheadMoving.bind(this),500))},t.prototype._stopPlayheadMovingChecks=function(){null!==this._playheadMovingTimer&&(clearInterval(this._playheadMovingTimer),this._playheadMovingTimer=null,this._playheadMoving=!1)},t.prototype._determineIfPlayheadMoving=function(){var e=this._playheadMovingTimeOnCheck,t=this.el.currentTime;this._playheadMoving=e!==t,this._playheadMovingTimeOnCheck=t,this._handleBufferingEvents()},t.prototype._onWaiting=function(){this._loadStarted=!0,this._handleBufferingEvents()},t.prototype._onLoadedData=function(){this._loadStarted=!0,this._handleBufferingEvents()},t.prototype._onCanPlay=function(){this._handleBufferingEvents()},t.prototype._onPlaying=function(){this._checkForClosedCaptions(),this._startPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_PLAY)},t.prototype._onPause=function(){this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_PAUSE)},t.prototype._onSeeking=function(){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_SEEK)},t.prototype._onSeeked=function(){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_SEEKED)},t.prototype._onEnded=function(){this._handleBufferingEvents(),this.trigger(m.default.PLAYBACK_ENDED,this.name)},t.prototype._handleBufferingEvents=function(){var e=!this.el.ended&&!this.el.paused,t=this._loadStarted&&!this.el.ended&&!this._stopped&&(e&&!this._playheadMoving||this.el.readyState<this.el.HAVE_FUTURE_DATA);this._isBuffering!==t&&(this._isBuffering=t,t?this.trigger(m.default.PLAYBACK_BUFFERING,this.name):this.trigger(m.default.PLAYBACK_BUFFERFULL,this.name))},t.prototype._onError=function(){var e=this.el.error||w,t=e.code,n=e.message,r=t===w.code,i=this.createError({code:t,description:n,raw:this.el.error,level:r?p.default.Levels.WARN:p.default.Levels.FATAL});r?g.default.warn(this.name,"HTML5 unknown error: ",i):this.trigger(m.default.PLAYBACK_ERROR,i)},t.prototype.destroy=function(){this._destroyed=!0,this.handleTextTrackChange&&this.el.textTracks.removeEventListener("change",this.handleTextTrackChange),e.prototype.destroy.call(this),this.el.removeAttribute("src"),this.el.load(),this._src=null,d.DomRecycler.garbage(this.$el)},t.prototype.seek=function(e){this.el.currentTime=e},t.prototype.seekPercentage=function(e){var t=this.el.duration*(e/100);this.seek(t)},t.prototype._checkInitialSeek=function(){var e=(0,d.seekStringToSeconds)();0!==e&&this.seek(e)},t.prototype.getCurrentTime=function(){return this.el.currentTime},t.prototype.getDuration=function(){return this.el.duration},t.prototype._onTimeUpdate=function(){this.getPlaybackType()===f.default.LIVE?this.trigger(m.default.PLAYBACK_TIMEUPDATE,{current:1,total:1},this.name):this.trigger(m.default.PLAYBACK_TIMEUPDATE,{current:this.el.currentTime,total:this.el.duration},this.name)},t.prototype._onProgress=function(){if(this.el.buffered.length){for(var e=[],t=0,n=0;n<this.el.buffered.length;n++)e=[].concat((0,u.default)(e),[{start:this.el.buffered.start(n),end:this.el.buffered.end(n)}]),this.el.currentTime>=e[n].start&&this.el.currentTime<=e[n].end&&(t=n);var r={start:e[t].start,current:e[t].end,total:this.el.duration};this.trigger(m.default.PLAYBACK_PROGRESS,r,e)}},t.prototype._typeFor=function(e){var n=t._mimeTypesForUrl(e,A,this.options.mimeType);return 0===n.length&&(n=t._mimeTypesForUrl(e,E,this.options.mimeType)),(n[0]||"").split(";")[0]},t.prototype._ready=function(){this._isReadyState||(this._isReadyState=!0,this.trigger(m.default.PLAYBACK_READY,this.name))},t.prototype._checkForClosedCaptions=function(){if(this.isHTML5Video&&!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(m.default.PLAYBACK_SUBTITLE_AVAILABLE);var e=this.closedCaptionsTrackId;this.closedCaptionsTrackId=e,this.handleTextTrackChange=this._handleTextTrackChange.bind(this),this.el.textTracks.addEventListener("change",this.handleTextTrackChange)}this._ccIsSetup=!0}},t.prototype._handleTextTrackChange=function(){var e=this.closedCaptionsTracks.find((function(e){return"showing"===e.track.mode}))||{id:-1};this._ccTrackId!==e.id&&(this._ccTrackId=e.id,this.trigger(m.default.PLAYBACK_SUBTITLE_CHANGED,{id:e.id}))},t.prototype.render=function(){return this.options.playback.disableContextMenu&&this.$el.on("contextmenu",(function(){return!1})),this._externalTracks&&this._externalTracks.length>0&&this.$el.html(this.template({tracks:this._externalTracks})),this._ready(),this},(0,s.default)(t,[{key:"isReady",get:function(){return this._isReadyState}},{key:"isHTML5Video",get:function(){return this.name===t.prototype.name}},{key:"closedCaptionsTracks",get:function(){var e=0;return(this.el.textTracks?(0,i.default)(this.el.textTracks):[]).filter((function(e){return"subtitles"===e.kind||"captions"===e.kind})).map((function(t){return{id:e++,name:t.label,track:t}}))}},{key:"closedCaptionsTrackId",get:function(){return this._ccTrackId},set:function(e){if((0,d.isNumber)(e)){var t=this.closedCaptionsTracks,n=void 0;if(-1!==e){if(!(n=t.find((function(t){return t.id===e}))))return;if("showing"===n.track.mode)return}t.filter((function(e){return"hidden"!==e.track.mode})).forEach((function(e){return e.track.mode="hidden"})),n&&(n.track.mode="showing"),this._ccTrackId=e,this.trigger(m.default.PLAYBACK_SUBTITLE_CHANGED,{id:e})}}},{key:"template",get:function(){return(0,v.default)(b.default)}}]),t}(f.default);t.default=S,S._mimeTypesForUrl=function(e,t,n){var r=(e.split("?")[0].match(/.*\.(.*)$/)||[])[1],i=n||r&&t[r.toLowerCase()]||[];return i.constructor===Array?i:[i]},S._canPlay=function(e,t,n,r){var i=S._mimeTypesForUrl(n,t,r),a=document.createElement(e);return!!i.filter((function(e){return!!a.canPlayType(e).replace(/no/,"")}))[0]},S.canPlay=function(e,t){return S._canPlay("audio",E,e,t)||S._canPlay("video",A,e,t)},e.exports=t.default}).call(this,n(/*! ./../../../node_modules/node-libs-browser/node_modules/process/browser.js */"./node_modules/node-libs-browser/node_modules/process/browser.js"))},"./src/playbacks/html5_video/index.js":
/*!********************************************!*\
!*** ./src/playbacks/html5_video/index.js ***!
\********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./html5_video */"./src/playbacks/html5_video/html5_video.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/playbacks/html5_video/public/style.scss":
/*!*****************************************************!*\
!*** ./src/playbacks/html5_video/public/style.scss ***!
\*****************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./style.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/html5_video/public/style.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/playbacks/html5_video/public/tracks.html":
/*!******************************************************!*\
!*** ./src/playbacks/html5_video/public/tracks.html ***!
\******************************************************/
/*! no static exports found */function(e,t){e.exports='<% for (var i = 0; i < tracks.length; i++) { %>\n <track data-html5-video-track="<%= i %>" kind="<%= tracks[i].kind %>" label="<%= tracks[i].label %>" srclang="<%= tracks[i].lang %>" src="<%= tracks[i].src %>" />\n<% }; %>\n'},"./src/playbacks/html_img/html_img.js":
/*!********************************************!*\
!*** ./src/playbacks/html_img/html_img.js ***!
\********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=u(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=u(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(n(/*! ../../base/playback */"./src/base/playback.js")),l=u(n(/*! ../../base/events */"./src/base/events.js"));function u(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/style.scss */"./src/playbacks/html_img/public/style.scss");var c=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.el.src=n.src,a}return(0,o.default)(t,e),t.prototype.getPlaybackType=function(){return s.default.NO_OP},(0,a.default)(t,[{key:"name",get:function(){return"html_img"}},{key:"tagName",get:function(){return"img"}},{key:"attributes",get:function(){return{"data-html-img":""}}},{key:"events",get:function(){return{load:"_onLoad",abort:"_onError",error:"_onError"}}}]),t.prototype.render=function(){return this.trigger(l.default.PLAYBACK_READY,this.name),this},t.prototype._onLoad=function(){this.trigger(l.default.PLAYBACK_ENDED,this.name)},t.prototype._onError=function(e){var t="error"===e.type?"load error":"loading aborted";this.trigger(l.default.PLAYBACK_ERROR,{message:t},this.name)},t}(s.default);t.default=c,c.canPlay=function(e){return/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(e)},e.exports=t.default},"./src/playbacks/html_img/index.js":
/*!*****************************************!*\
!*** ./src/playbacks/html_img/index.js ***!
\*****************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./html_img */"./src/playbacks/html_img/html_img.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/playbacks/html_img/public/style.scss":
/*!**************************************************!*\
!*** ./src/playbacks/html_img/public/style.scss ***!
\**************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./style.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/html_img/public/style.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/playbacks/no_op/index.js":
/*!**************************************!*\
!*** ./src/playbacks/no_op/index.js ***!
\**************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./no_op */"./src/playbacks/no_op/no_op.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/playbacks/no_op/no_op.js":
/*!**************************************!*\
!*** ./src/playbacks/no_op/no_op.js ***!
\**************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=f(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=f(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=f(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=n(/*! ../../base/utils */"./src/base/utils.js"),l=f(n(/*! ../../base/playback */"./src/base/playback.js")),u=f(n(/*! ../../base/template */"./src/base/template.js")),c=f(n(/*! ../../base/events */"./src/base/events.js")),d=f(n(/*! ./public/error.html */"./src/playbacks/no_op/public/error.html"));function f(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/style.scss */"./src/playbacks/no_op/public/style.scss");var h=function(e){function t(){(0,r.default)(this,t);for(var n=arguments.length,a=Array(n),o=0;o<n;o++)a[o]=arguments[o];var s=(0,i.default)(this,e.call.apply(e,[this].concat(a)));return s._noiseFrameNum=-1,s}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"no_op"}},{key:"template",get:function(){return(0,u.default)(d.default)}},{key:"attributes",get:function(){return{"data-no-op":""}}}]),t.prototype.render=function(){var e=this.options.playbackNotSupportedMessage||this.i18n.t("playback_not_supported");this.$el.html(this.template({message:e})),this.trigger(c.default.PLAYBACK_READY,this.name);var t=!(!this.options.poster||!this.options.poster.showForNoOp);return!this.options.autoPlay&&t||this._animate(),this},t.prototype._noise=function(){if(this._noiseFrameNum=(this._noiseFrameNum+1)%5,!this._noiseFrameNum){var e=this.context.createImageData(this.context.canvas.width,this.context.canvas.height),t=void 0;try{t=new Uint32Array(e.data.buffer)}catch(i){t=new Uint32Array(this.context.canvas.width*this.context.canvas.height*4);for(var n=e.data,r=0;r<n.length;r++)t[r]=n[r]}for(var i=t.length,a=6*Math.random()+4,o=0,s=0,l=0;l<i;)o<0&&(o=a*Math.random(),s=255*Math.pow(Math.random(),.4)<<24),o-=1,t[l++]=s;this.context.putImageData(e,0,0)}},t.prototype._loop=function(){var e=this;this._stop||(this._noise(),this._animationHandle=(0,s.requestAnimationFrame)((function(){return e._loop()})))},t.prototype.destroy=function(){this._animationHandle&&((0,s.cancelAnimationFrame)(this._animationHandle),this._stop=!0)},t.prototype._animate=function(){this.canvas=this.$el.find("canvas[data-no-op-canvas]")[0],this.context=this.canvas.getContext("2d"),this._loop()},t}(l.default);t.default=h,h.canPlay=function(e){return!0},e.exports=t.default},"./src/playbacks/no_op/public/error.html":
/*!***********************************************!*\
!*** ./src/playbacks/no_op/public/error.html ***!
\***********************************************/
/*! no static exports found */function(e,t){e.exports="<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%><p>\n"},"./src/playbacks/no_op/public/style.scss":
/*!***********************************************!*\
!*** ./src/playbacks/no_op/public/style.scss ***!
\***********************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./style.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/playbacks/no_op/public/style.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/plugins/click_to_pause/click_to_pause.js":
/*!******************************************************!*\
!*** ./src/plugins/click_to_pause/click_to_pause.js ***!
\******************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=c(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=c(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(n(/*! ../../base/container_plugin */"./src/base/container_plugin.js")),l=c(n(/*! ../../base/events */"./src/base/events.js")),u=c(n(/*! ../../base/playback */"./src/base/playback.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(n){return(0,r.default)(this,t),(0,i.default)(this,e.call(this,n))}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"click_to_pause"}}]),t.prototype.bindEvents=function(){this.listenTo(this.container,l.default.CONTAINER_CLICK,this.click),this.listenTo(this.container,l.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate)},t.prototype.click=function(){(this.container.getPlaybackType()!==u.default.LIVE||this.container.isDvrEnabled())&&(this.container.isPlaying()?this.container.pause():this.container.play())},t.prototype.settingsUpdate=function(){var e=this.container.getPlaybackType()!==u.default.LIVE||this.container.isDvrEnabled();if(e!==this.pointerEnabled){var t=e?"addClass":"removeClass";this.container.$el[t]("pointer-enabled"),this.pointerEnabled=e}},t}(s.default);t.default=d,e.exports=t.default},"./src/plugins/click_to_pause/index.js":
/*!*********************************************!*\
!*** ./src/plugins/click_to_pause/index.js ***!
\*********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./click_to_pause */"./src/plugins/click_to_pause/click_to_pause.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/closed_captions/closed_captions.js":
/*!********************************************************!*\
!*** ./src/plugins/closed_captions/closed_captions.js ***!
\********************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=f(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=f(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=f(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=f(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),l=f(n(/*! ../../base/template */"./src/base/template.js")),u=f(n(/*! ../../base/events */"./src/base/events.js")),c=n(/*! ../../base/utils */"./src/base/utils.js"),d=f(n(/*! ./public/closed_captions.html */"./src/plugins/closed_captions/public/closed_captions.html"));function f(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/closed_captions.scss */"./src/plugins/closed_captions/public/closed_captions.scss");var h=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n)),o=n.options.closedCaptionsConfig;return a._title=o&&o.title?o.title:null,a._ariaLabel=o&&o.ariaLabel?o.ariaLabel:"cc-button",a._labelCb=o&&o.labelCallback&&"function"==typeof o.labelCallback?o.labelCallback:function(e){return e.name},a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"closed_captions"}},{key:"template",get:function(){return(0,l.default)(d.default)}},{key:"events",get:function(){return{"click [data-cc-button]":"toggleContextMenu","click [data-cc-select]":"onTrackSelect"}}},{key:"attributes",get:function(){return{class:"cc-controls","data-cc-controls":""}}}]),t.prototype.bindEvents=function(){this.listenTo(this.core,u.default.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,u.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,u.default.MEDIACONTROL_HIDE,this.hideContextMenu),this.container=this.core.getCurrentContainer(),this.container&&(this.listenTo(this.container,u.default.CONTAINER_SUBTITLE_AVAILABLE,this.onSubtitleAvailable),this.listenTo(this.container,u.default.CONTAINER_SUBTITLE_CHANGED,this.onSubtitleChanged),this.listenTo(this.container,u.default.CONTAINER_STOP,this.onContainerStop))},t.prototype.onContainerStop=function(){this.ccAvailable(!1)},t.prototype.containerChanged=function(){this.ccAvailable(!1),this.stopListening(),this.bindEvents()},t.prototype.onSubtitleAvailable=function(){this.renderCcButton(),this.ccAvailable(!0)},t.prototype.onSubtitleChanged=function(e){this.setCurrentContextMenuElement(e.id)},t.prototype.onTrackSelect=function(e){var t=parseInt(e.target.dataset.ccSelect,10);return this.container.closedCaptionsTrackId=t,this.hideContextMenu(),e.stopPropagation(),!1},t.prototype.ccAvailable=function(e){var t=e?"addClass":"removeClass";this.$el[t]("available")},t.prototype.toggleContextMenu=function(){this.$el.find("ul").toggle()},t.prototype.hideContextMenu=function(){this.$el.find("ul").hide()},t.prototype.contextMenuElement=function(e){return this.$el.find("ul a"+(isNaN(e)?"":'[data-cc-select="'+e+'"]')).parent()},t.prototype.setCurrentContextMenuElement=function(e){if(this._trackId!==e){this.contextMenuElement().removeClass("current"),this.contextMenuElement(e).addClass("current");var t=e>-1?"addClass":"removeClass";this.$ccButton[t]("enabled"),this._trackId=e}},t.prototype.renderCcButton=function(){for(var e=this.container?this.container.closedCaptionsTracks:[],t=0;t<e.length;t++)e[t].label=this._labelCb(e[t]);this.$el.html(this.template({ariaLabel:this._ariaLabel,disabledLabel:this.core.i18n.t("disabled"),title:this._title,tracks:e})),this.$ccButton=this.$el.find("button.cc-button[data-cc-button]"),this.$ccButton.append(c.SvgIcons.cc),this.$el.append(this.style)},t.prototype.render=function(){this.renderCcButton();var e=this.core.mediaControl.$el.find("button[data-fullscreen]");return e[0]?this.$el.insertAfter(e):this.core.mediaControl.$el.find(".media-control-right-panel[data-media-control]").prepend(this.$el),this},t}(s.default);t.default=h,e.exports=t.default},"./src/plugins/closed_captions/index.js":
/*!**********************************************!*\
!*** ./src/plugins/closed_captions/index.js ***!
\**********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./closed_captions */"./src/plugins/closed_captions/closed_captions.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/closed_captions/public/closed_captions.html":
/*!*****************************************************************!*\
!*** ./src/plugins/closed_captions/public/closed_captions.html ***!
\*****************************************************************/
/*! no static exports found */function(e,t){e.exports='<button type="button" class="cc-button media-control-button media-control-icon" data-cc-button aria-label="<%= ariaLabel %>"></button>\n<ul>\n <% if (title) { %>\n <li data-title><%= title %></li>\n <% }; %>\n <li><a href="#" data-cc-select="-1"><%= disabledLabel %></a></li>\n <% for (var i = 0; i < tracks.length; i++) { %>\n <li><a href="#" data-cc-select="<%= tracks[i].id %>"><%= tracks[i].label %></a></li>\n <% }; %>\n</ul>\n'},"./src/plugins/closed_captions/public/closed_captions.scss":
/*!*****************************************************************!*\
!*** ./src/plugins/closed_captions/public/closed_captions.scss ***!
\*****************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./closed_captions.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/closed_captions/public/closed_captions.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/plugins/dvr_controls/dvr_controls.js":
/*!**************************************************!*\
!*** ./src/plugins/dvr_controls/dvr_controls.js ***!
\**************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=f(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=f(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=f(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=f(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=f(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),l=f(n(/*! ../../base/template */"./src/base/template.js")),u=f(n(/*! ../../base/playback */"./src/base/playback.js")),c=f(n(/*! ../../base/events */"./src/base/events.js")),d=f(n(/*! ./public/index.html */"./src/plugins/dvr_controls/public/index.html"));function f(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/dvr_controls.scss */"./src/plugins/dvr_controls/public/dvr_controls.scss");var h=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.settingsUpdate(),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"template",get:function(){return(0,l.default)(d.default)}},{key:"name",get:function(){return"dvr_controls"}},{key:"events",get:function(){return{"click .live-button":"click"}}},{key:"attributes",get:function(){return{class:"dvr-controls","data-dvr-controls":""}}}]),t.prototype.bindEvents=function(){this.listenTo(this.core.mediaControl,c.default.MEDIACONTROL_CONTAINERCHANGED,this.containerChanged),this.listenTo(this.core.mediaControl,c.default.MEDIACONTROL_RENDERED,this.settingsUpdate),this.listenTo(this.core,c.default.CORE_OPTIONS_CHANGE,this.render),this.core.getCurrentContainer()&&(this.listenToOnce(this.core.getCurrentContainer(),c.default.CONTAINER_TIMEUPDATE,this.render),this.listenTo(this.core.getCurrentContainer(),c.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.dvrChanged))},t.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},t.prototype.dvrChanged=function(e){this.core.getPlaybackType()===u.default.LIVE&&(this.settingsUpdate(),this.core.mediaControl.$el.addClass("live"),e?(this.core.mediaControl.$el.addClass("dvr"),this.core.mediaControl.$el.find(".media-control-indicator[data-position], .media-control-indicator[data-duration]").hide()):this.core.mediaControl.$el.removeClass("dvr"))},t.prototype.click=function(){var e=this.core.mediaControl,t=e.container;t.isPlaying()||t.play(),e.$el.hasClass("dvr")&&t.seek(t.getDuration())},t.prototype.settingsUpdate=function(){var e=this;this.stopListening(),this.core.mediaControl.$el.removeClass("live"),this.shouldRender()&&(this.render(),this.$el.click((function(){return e.click()}))),this.bindEvents()},t.prototype.shouldRender=function(){return(void 0===this.core.options.useDvrControls||!!this.core.options.useDvrControls)&&this.core.getPlaybackType()===u.default.LIVE},t.prototype.render=function(){return this.$el.html(this.template({live:this.core.i18n.t("live"),backToLive:this.core.i18n.t("back_to_live")})),this.shouldRender()&&(this.core.mediaControl.$el.addClass("live"),this.core.mediaControl.$(".media-control-left-panel[data-media-control]").append(this.$el)),this},t}(s.default);t.default=h,e.exports=t.default},"./src/plugins/dvr_controls/index.js":
/*!*******************************************!*\
!*** ./src/plugins/dvr_controls/index.js ***!
\*******************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./dvr_controls */"./src/plugins/dvr_controls/dvr_controls.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/dvr_controls/public/dvr_controls.scss":
/*!***********************************************************!*\
!*** ./src/plugins/dvr_controls/public/dvr_controls.scss ***!
\***********************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./dvr_controls.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/dvr_controls/public/dvr_controls.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/plugins/dvr_controls/public/index.html":
/*!****************************************************!*\
!*** ./src/plugins/dvr_controls/public/index.html ***!
\****************************************************/
/*! no static exports found */function(e,t){e.exports='<div class="live-info"><%= live %></div>\n<button type="button" class="live-button" aria-label="<%= backToLive %>"><%= backToLive %></button>\n'},"./src/plugins/end_video.js":
/*!**********************************!*\
!*** ./src/plugins/end_video.js ***!
\**********************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=l(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=l(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=l(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=l(n(/*! ../base/events */"./src/base/events.js"));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(){return(0,r.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,o.default)(t,e),t.prototype.bindEvents=function(){this.listenTo(this.core,s.default.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged);var e=this.core.activeContainer;e&&(this.listenTo(e,s.default.CONTAINER_ENDED,this.ended),this.listenTo(e,s.default.CONTAINER_STOP,this.ended))},t.prototype.containerChanged=function(){this.stopListening(),this.bindEvents()},t.prototype.ended=function(){(void 0===this.core.options.exitFullscreenOnEnd||this.core.options.exitFullscreenOnEnd)&&this.core.isFullscreen()&&this.core.toggleFullscreen()},(0,i.default)(t,[{key:"name",get:function(){return"end_video"}}]),t}(l(n(/*! ../base/core_plugin */"./src/base/core_plugin.js")).default);t.default=u,e.exports=t.default},"./src/plugins/error_screen/error_screen.js":
/*!**************************************************!*\
!*** ./src/plugins/error_screen/error_screen.js ***!
\**************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=h(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=h(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=h(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=h(n(/*! ../../base/events */"./src/base/events.js")),l=h(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),u=h(n(/*! ../../base/template */"./src/base/template.js")),c=h(n(/*! ../../components/error/ */"./src/components/error/index.js")),d=n(/*! ../../base/utils */"./src/base/utils.js"),f=h(n(/*! ./public/error_screen.html */"./src/plugins/error_screen/public/error_screen.html"));function h(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/error_screen.scss */"./src/plugins/error_screen/public/error_screen.scss");var p=function(e){function t(n){var a;(0,r.default)(this,t);var o=(0,i.default)(this,e.call(this,n));return o.options.disableErrorScreen?(a=o.disable(),(0,i.default)(o,a)):o}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"error_screen"}},{key:"template",get:function(){return(0,u.default)(f.default)}},{key:"container",get:function(){return this.core.getCurrentContainer()}},{key:"attributes",get:function(){return{class:"player-error-screen","data-error-screen":""}}}]),t.prototype.bindEvents=function(){this.listenTo(this.core,s.default.ERROR,this.onError),this.listenTo(this.core,s.default.CORE_ACTIVE_CONTAINER_CHANGED,this.onContainerChanged)},t.prototype.bindReload=function(){this.reloadButton=this.$el.find(".player-error-screen__reload"),this.reloadButton&&this.reloadButton.on("click",this.reload.bind(this))},t.prototype.reload=function(){var e=this;this.listenToOnce(this.core,s.default.CORE_READY,(function(){return e.container.play()})),this.core.load(this.options.sources,this.options.mimeType),this.unbindReload()},t.prototype.unbindReload=function(){this.reloadButton&&this.reloadButton.off("click")},t.prototype.onContainerChanged=function(){this.err=null,this.unbindReload(),this.hide()},t.prototype.onError=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.level===c.default.Levels.FATAL&&(this.err=e,this.container.disableMediaControl(),this.container.stop(),this.show())},t.prototype.show=function(){this.render(),this.$el.show()},t.prototype.hide=function(){this.$el.hide()},t.prototype.render=function(){if(this.err)return this.$el.html(this.template({title:this.err.UI.title,message:this.err.UI.message,code:this.err.code,icon:this.err.UI.icon||"",reloadIcon:d.SvgIcons.reload})),this.core.$el.append(this.el),this.bindReload(),this},t}(l.default);t.default=p,e.exports=t.default},"./src/plugins/error_screen/index.js":
/*!*******************************************!*\
!*** ./src/plugins/error_screen/index.js ***!
\*******************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./error_screen */"./src/plugins/error_screen/error_screen.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/error_screen/public/error_screen.html":
/*!***********************************************************!*\
!*** ./src/plugins/error_screen/public/error_screen.html ***!
\***********************************************************/
/*! no static exports found */function(e,t){e.exports='<div class="player-error-screen__content" data-error-screen>\n <% if (icon) { %>\n <div class="player-error-screen__icon" data-error-screen><%= icon %></div>\n <% } %>\n <div class="player-error-screen__title" data-error-screen><%= title %></div>\n <div class="player-error-screen__message" data-error-screen><%= message %></div>\n <div class="player-error-screen__code" data-error-screen>Error code: <%= code %></div>\n <div class="player-error-screen__reload" data-error-screen><%= reloadIcon %></div>\n</div>\n'},"./src/plugins/error_screen/public/error_screen.scss":
/*!***********************************************************!*\
!*** ./src/plugins/error_screen/public/error_screen.scss ***!
\***********************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./error_screen.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/error_screen/public/error_screen.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/plugins/favicon/favicon.js":
/*!****************************************!*\
!*** ./src/plugins/favicon/favicon.js ***!
\****************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(n(/*! ../../base/core_plugin */"./src/base/core_plugin.js")),l=d(n(/*! ../../base/events */"./src/base/events.js")),u=d(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js")),c=n(/*! ../../base/utils */"./src/base/utils.js");function d(e){return e&&e.__esModule?e:{default:e}}var f=(0,u.default)('link[rel="shortcut icon"]'),h=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a._container=null,a.configure(),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"favicon"}},{key:"oldIcon",get:function(){return f}}]),t.prototype.configure=function(){this.core.options.changeFavicon?this.enabled||(this.stopListening(this.core,l.default.CORE_OPTIONS_CHANGE),this.enable()):this.enabled&&(this.disable(),this.listenTo(this.core,l.default.CORE_OPTIONS_CHANGE,this.configure))},t.prototype.bindEvents=function(){this.listenTo(this.core,l.default.CORE_OPTIONS_CHANGE,this.configure),this.listenTo(this.core,l.default.CORE_ACTIVE_CONTAINER_CHANGED,this.containerChanged),this.core.activeContainer&&this.containerChanged()},t.prototype.containerChanged=function(){this._container&&this.stopListening(this._container),this._container=this.core.activeContainer,this.listenTo(this._container,l.default.CONTAINER_PLAY,this.setPlayIcon),this.listenTo(this._container,l.default.CONTAINER_PAUSE,this.setPauseIcon),this.listenTo(this._container,l.default.CONTAINER_STOP,this.resetIcon),this.listenTo(this._container,l.default.CONTAINER_ENDED,this.resetIcon),this.listenTo(this._container,l.default.CONTAINER_ERROR,this.resetIcon),this.resetIcon()},t.prototype.disable=function(){e.prototype.disable.call(this),this.resetIcon()},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.resetIcon()},t.prototype.createIcon=function(e){var t=(0,u.default)("<canvas/>");t[0].width=16,t[0].height=16;var n=t[0].getContext("2d");n.fillStyle="#000";var r=(0,u.default)(e).find("path").attr("d"),i=new Path2D(r);n.fill(i);var a=(0,u.default)('<link rel="shortcut icon" type="image/png"/>');return a.attr("href",t[0].toDataURL("image/png")),a},t.prototype.setPlayIcon=function(){this.playIcon||(this.playIcon=this.createIcon(c.SvgIcons.play)),this.changeIcon(this.playIcon)},t.prototype.setPauseIcon=function(){this.pauseIcon||(this.pauseIcon=this.createIcon(c.SvgIcons.pause)),this.changeIcon(this.pauseIcon)},t.prototype.resetIcon=function(){(0,u.default)('link[rel="shortcut icon"]').remove(),(0,u.default)("head").append(this.oldIcon)},t.prototype.changeIcon=function(e){e&&((0,u.default)('link[rel="shortcut icon"]').remove(),(0,u.default)("head").append(e))},t}(s.default);t.default=h,e.exports=t.default},"./src/plugins/favicon/index.js":
/*!**************************************!*\
!*** ./src/plugins/favicon/index.js ***!
\**************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./favicon.js */"./src/plugins/favicon/favicon.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/google_analytics/google_analytics.js":
/*!**********************************************************!*\
!*** ./src/plugins/google_analytics/google_analytics.js ***!
\**********************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=u(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=u(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(n(/*! ../../base/container_plugin */"./src/base/container_plugin.js")),l=u(n(/*! ../../base/events */"./src/base/events.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.container.options.gaAccount&&(a.account=a.container.options.gaAccount,a.trackerName=a.container.options.gaTrackerName?a.container.options.gaTrackerName+".":"Clappr.",a.domainName=a.container.options.gaDomainName,a.currentHDState=void 0,a.embedScript()),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"google_analytics"}}]),t.prototype.embedScript=function(){var e=this;if(window._gat)this.addEventListeners();else{var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("async","async"),t.setAttribute("src","//www.google-analytics.com/ga.js"),t.onload=function(){return e.addEventListeners()},document.body.appendChild(t)}},t.prototype.addEventListeners=function(){var e=this;this.container&&(this.listenTo(this.container,l.default.CONTAINER_READY,this.onReady),this.listenTo(this.container,l.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,l.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,l.default.CONTAINER_PAUSE,this.onPause),this.listenTo(this.container,l.default.CONTAINER_ENDED,this.onEnded),this.listenTo(this.container,l.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,l.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,l.default.CONTAINER_ERROR,this.onError),this.listenTo(this.container,l.default.CONTAINER_PLAYBACKSTATE,this.onPlaybackChanged),this.listenTo(this.container,l.default.CONTAINER_VOLUME,(function(t){return e.onVolumeChanged(t)})),this.listenTo(this.container,l.default.CONTAINER_SEEK,(function(t){return e.onSeek(t)})),this.listenTo(this.container,l.default.CONTAINER_FULL_SCREEN,this.onFullscreen),this.listenTo(this.container,l.default.CONTAINER_HIGHDEFINITIONUPDATE,this.onHD),this.listenTo(this.container,l.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.onDVR)),_gaq.push([this.trackerName+"_setAccount",this.account]),this.domainName&&_gaq.push([this.trackerName+"_setDomainName",this.domainName])},t.prototype.onReady=function(){this.push(["Video","Playback",this.container.playback.name])},t.prototype.onPlay=function(){this.push(["Video","Play",this.container.playback.src])},t.prototype.onStop=function(){this.push(["Video","Stop",this.container.playback.src])},t.prototype.onEnded=function(){this.push(["Video","Ended",this.container.playback.src])},t.prototype.onBuffering=function(){this.push(["Video","Buffering",this.container.playback.src])},t.prototype.onBufferFull=function(){this.push(["Video","Bufferfull",this.container.playback.src])},t.prototype.onError=function(){this.push(["Video","Error",this.container.playback.src])},t.prototype.onHD=function(e){var t=e?"ON":"OFF";t!==this.currentHDState&&(this.currentHDState=t,this.push(["Video","HD - "+t,this.container.playback.src]))},t.prototype.onPlaybackChanged=function(e){null!==e.type&&this.push(["Video","Playback Type - "+e.type,this.container.playback.src])},t.prototype.onDVR=function(e){var t=e?"ON":"OFF";this.push(["Interaction","DVR - "+t,this.container.playback.src])},t.prototype.onPause=function(){this.push(["Video","Pause",this.container.playback.src])},t.prototype.onSeek=function(){this.push(["Video","Seek",this.container.playback.src])},t.prototype.onVolumeChanged=function(){this.push(["Interaction","Volume",this.container.playback.src])},t.prototype.onFullscreen=function(){this.push(["Interaction","Fullscreen",this.container.playback.src])},t.prototype.push=function(e){var t=[this.trackerName+"_trackEvent"].concat(e);_gaq.push(t)},t}(s.default);t.default=c,e.exports=t.default},"./src/plugins/google_analytics/index.js":
/*!***********************************************!*\
!*** ./src/plugins/google_analytics/index.js ***!
\***********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./google_analytics */"./src/plugins/google_analytics/google_analytics.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/log/index.js":
/*!**********************************!*\
!*** ./src/plugins/log/index.js ***!
\**********************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./log */"./src/plugins/log/log.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/log/log.js":
/*!********************************!*\
!*** ./src/plugins/log/log.js ***!
\********************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js"),a=(r=i)&&r.__esModule?r:{default:r},o=n(/*! ../../vendor */"./src/vendor/index.js"),s="font-weight: bold; font-size: 13px;",l="color: #ff8000;"+s,u="color: #ff0000;"+s,c=["color: #0000ff;font-weight: bold; font-size: 13px;","color: #006600;font-weight: bold; font-size: 13px;",l,u,u],d=["debug","info","warn","error","disabled"],f=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;(0,a.default)(this,e),this.kibo=new o.Kibo,this.kibo.down(["ctrl shift d"],(function(){return t.onOff()})),this.BLACKLIST=["timeupdate","playback:timeupdate","playback:progress","container:hover","container:timeupdate","container:progress"],this.level=n,this.offLevel=r}return e.prototype.debug=function(e){this.log(e,0,Array.prototype.slice.call(arguments,1))},e.prototype.info=function(e){this.log(e,1,Array.prototype.slice.call(arguments,1))},e.prototype.warn=function(e){this.log(e,2,Array.prototype.slice.call(arguments,1))},e.prototype.error=function(e){this.log(e,3,Array.prototype.slice.call(arguments,1))},e.prototype.onOff=function(){this.level===this.offLevel?this.level=this.previousLevel:(this.previousLevel=this.level,this.level=this.offLevel),window.console&&window.console.log&&window.console.log("%c[Clappr.Log] set log level to "+d[this.level],l)},e.prototype.level=function(e){this.level=e},e.prototype.log=function(e,t,n){if(!(this.BLACKLIST.indexOf(n[0])>=0||t<this.level)){n||(n=e,e=null);var r=c[t],i="";e&&(i="["+e+"]"),window.console&&window.console.log&&window.console.log.apply(console,["%c["+d[t]+"]"+i,r].concat(n))}},e}();t.default=f,f.LEVEL_DEBUG=0,f.LEVEL_INFO=1,f.LEVEL_WARN=2,f.LEVEL_ERROR=3,f.getInstance=function(){return void 0===this._instance&&(this._instance=new this,this._instance.previousLevel=this._instance.level,this._instance.level=this._instance.offLevel),this._instance},f.setLevel=function(e){this.getInstance().level=e},f.debug=function(){this.getInstance().debug.apply(this.getInstance(),arguments)},f.info=function(){this.getInstance().info.apply(this.getInstance(),arguments)},f.warn=function(){this.getInstance().warn.apply(this.getInstance(),arguments)},f.error=function(){this.getInstance().error.apply(this.getInstance(),arguments)},e.exports=t.default},"./src/plugins/media_control/index.js":
/*!********************************************!*\
!*** ./src/plugins/media_control/index.js ***!
\********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./media_control */"./src/plugins/media_control/media_control.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/media_control/media_control.js":
/*!****************************************************!*\
!*** ./src/plugins/media_control/media_control.js ***!
\****************************************************/
/*! no static exports found */function(e,t,n){"use strict";(function(r){Object.defineProperty(t,"__esModule",{value:!0});var i=b(n(/*! babel-runtime/core-js/json/stringify */"./node_modules/babel-runtime/core-js/json/stringify.js")),a=b(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),o=b(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),s=b(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),l=b(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),u=n(/*! ../../base/utils */"./src/base/utils.js"),c=n(/*! ../../vendor */"./src/vendor/index.js"),d=b(n(/*! ../../base/events */"./src/base/events.js")),f=b(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),h=b(n(/*! ../../components/browser */"./src/components/browser/index.js")),p=b(n(/*! ../../components/mediator */"./src/components/mediator.js")),m=b(n(/*! ../../base/template */"./src/base/template.js")),g=b(n(/*! ../../base/playback */"./src/base/playback.js")),y=b(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));n(/*! ./public/media-control.scss */"./src/plugins/media_control/public/media-control.scss");var v=b(n(/*! ./public/media-control.html */"./src/plugins/media_control/public/media-control.html"));function b(e){return e&&e.__esModule?e:{default:e}}var _=function(e){function t(n){(0,a.default)(this,t);var r=(0,o.default)(this,e.call(this,n));return r.persistConfig=r.options.persistConfig,r.currentPositionValue=null,r.currentDurationValue=null,r.keepVisible=!1,r.fullScreenOnVideoTagSupported=null,r.setInitialVolume(),r.settings={left:["play","stop","pause"],right:["volume"],default:["position","seekbar","duration"]},r.kibo=new c.Kibo(r.options.focusElement),r.bindKeyEvents(),r.container?y.default.isEmptyObject(r.container.settings)||(r.settings=y.default.extend({},r.container.settings)):r.settings={},r.userDisabled=!1,(r.container&&r.container.mediaControlDisabled||r.options.chromeless)&&r.disable(),r.stopDragHandler=function(e){return r.stopDrag(e)},r.updateDragHandler=function(e){return r.updateDrag(e)},(0,y.default)(document).bind("mouseup",r.stopDragHandler),(0,y.default)(document).bind("mousemove",r.updateDragHandler),r}return(0,l.default)(t,e),(0,s.default)(t,[{key:"name",get:function(){return"media_control"}},{key:"disabled",get:function(){var e=this.container&&this.container.getPlaybackType()===g.default.NO_OP;return this.userDisabled||e}},{key:"container",get:function(){return this.core&&this.core.activeContainer}},{key:"playback",get:function(){return this.core&&this.core.activePlayback}},{key:"attributes",get:function(){return{class:"media-control","data-media-control":""}}},{key:"events",get:function(){return{"click [data-play]":"play","click [data-pause]":"pause","click [data-playpause]":"togglePlayPause","click [data-stop]":"stop","click [data-playstop]":"togglePlayStop","click [data-fullscreen]":"toggleFullscreen","click .bar-container[data-seekbar]":"seek","click .bar-container[data-volume]":"onVolumeClick","click .drawer-icon[data-volume]":"toggleMute","mouseenter .drawer-container[data-volume]":"showVolumeBar","mouseleave .drawer-container[data-volume]":"hideVolumeBar","mousedown .bar-container[data-volume]":"startVolumeDrag","mousemove .bar-container[data-volume]":"mousemoveOnVolumeBar","mousedown .bar-scrubber[data-seekbar]":"startSeekDrag","mousemove .bar-container[data-seekbar]":"mousemoveOnSeekBar","mouseleave .bar-container[data-seekbar]":"mouseleaveOnSeekBar","mouseenter .media-control-layer[data-controls]":"setUserKeepVisible","mouseleave .media-control-layer[data-controls]":"resetUserKeepVisible"}}},{key:"template",get:function(){return(0,m.default)(v.default)}},{key:"volume",get:function(){return this.container&&this.container.isReady?this.container.volume:this.intendedVolume}},{key:"muted",get:function(){return 0===this.volume}}]),t.prototype.getExternalInterface=function(){var e=this;return{setVolume:this.setVolume,getVolume:function(){return e.volume}}},t.prototype.bindEvents=function(){var e=this;this.stopListening(),this.listenTo(this.core,d.default.CORE_ACTIVE_CONTAINER_CHANGED,this.onActiveContainerChanged),this.listenTo(this.core,d.default.CORE_MOUSE_MOVE,this.show),this.listenTo(this.core,d.default.CORE_MOUSE_LEAVE,(function(){return e.hide(e.options.hideMediaControlDelay)})),this.listenTo(this.core,d.default.CORE_FULLSCREEN,this.show),this.listenTo(this.core,d.default.CORE_OPTIONS_CHANGE,this.configure),p.default.on(this.options.playerId+":"+d.default.PLAYER_RESIZE,this.playerResize,this),this.bindContainerEvents()},t.prototype.bindContainerEvents=function(){this.container&&(this.listenTo(this.container,d.default.CONTAINER_PLAY,this.changeTogglePlay),this.listenTo(this.container,d.default.CONTAINER_PAUSE,this.changeTogglePlay),this.listenTo(this.container,d.default.CONTAINER_STOP,this.changeTogglePlay),this.listenTo(this.container,d.default.CONTAINER_DBLCLICK,this.toggleFullscreen),this.listenTo(this.container,d.default.CONTAINER_TIMEUPDATE,this.onTimeUpdate),this.listenTo(this.container,d.default.CONTAINER_PROGRESS,this.updateProgressBar),this.listenTo(this.container,d.default.CONTAINER_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.container,d.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.settingsUpdate),this.listenTo(this.container,d.default.CONTAINER_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.container,d.default.CONTAINER_MEDIACONTROL_DISABLE,this.disable),this.listenTo(this.container,d.default.CONTAINER_MEDIACONTROL_ENABLE,this.enable),this.listenTo(this.container,d.default.CONTAINER_ENDED,this.ended),this.listenTo(this.container,d.default.CONTAINER_VOLUME,this.onVolumeChanged),this.listenTo(this.container,d.default.CONTAINER_OPTIONS_CHANGE,this.setInitialVolume),"video"===this.container.playback.el.nodeName.toLowerCase()&&this.listenToOnce(this.container,d.default.CONTAINER_LOADEDMETADATA,this.onLoadedMetadataOnVideoTag))},t.prototype.disable=function(){this.userDisabled=!0,this.hide(),this.unbindKeyEvents(),this.$el.hide()},t.prototype.enable=function(){this.options.chromeless||(this.userDisabled=!1,this.bindKeyEvents(),this.show())},t.prototype.play=function(){this.container&&this.container.play()},t.prototype.pause=function(){this.container&&this.container.pause()},t.prototype.stop=function(){this.container&&this.container.stop()},t.prototype.setInitialVolume=function(){var e=this.persistConfig?u.Config.restore("volume"):100,t=this.container&&this.container.options||this.options;this.setVolume(t.mute?0:e,!0)},t.prototype.onVolumeChanged=function(){this.updateVolumeUI()},t.prototype.onLoadedMetadataOnVideoTag=function(){var e=this.playback&&this.playback.el;!u.Fullscreen.fullscreenEnabled()&&e.webkitSupportsFullscreen&&(this.fullScreenOnVideoTagSupported=!0,this.settingsUpdate())},t.prototype.updateVolumeUI=function(){if(this.rendered){this.$volumeBarContainer.find(".bar-fill-2").css({});var e=this.$volumeBarContainer.width(),t=this.$volumeBarBackground.width(),n=(e-t)/2,r=t*this.volume/100+n;this.$volumeBarFill.css({width:this.volume+"%"}),this.$volumeBarScrubber.css({left:r}),this.$volumeBarContainer.find(".segmented-bar-element").removeClass("fill");var i=Math.ceil(this.volume/10);this.$volumeBarContainer.find(".segmented-bar-element").slice(0,i).addClass("fill"),this.$volumeIcon.html(""),this.$volumeIcon.removeClass("muted"),this.muted?(this.$volumeIcon.append(u.SvgIcons.volumeMute),this.$volumeIcon.addClass("muted")):this.$volumeIcon.append(u.SvgIcons.volume),this.applyButtonStyle(this.$volumeIcon)}},t.prototype.changeTogglePlay=function(){this.$playPauseToggle.html(""),this.$playStopToggle.html(""),this.container&&this.container.isPlaying()?(this.$playPauseToggle.append(u.SvgIcons.pause),this.$playStopToggle.append(u.SvgIcons.stop),this.trigger(d.default.MEDIACONTROL_PLAYING)):(this.$playPauseToggle.append(u.SvgIcons.play),this.$playStopToggle.append(u.SvgIcons.play),this.trigger(d.default.MEDIACONTROL_NOTPLAYING),h.default.isMobile&&this.show()),this.applyButtonStyle(this.$playPauseToggle),this.applyButtonStyle(this.$playStopToggle)},t.prototype.mousemoveOnSeekBar=function(e){if(this.settings.seekEnabled){var t=e.pageX-this.$seekBarContainer.offset().left-this.$seekBarHover.width()/2;this.$seekBarHover.css({left:t})}this.trigger(d.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,e)},t.prototype.mouseleaveOnSeekBar=function(e){this.trigger(d.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,e)},t.prototype.onVolumeClick=function(e){this.setVolume(this.getVolumeFromUIEvent(e))},t.prototype.mousemoveOnVolumeBar=function(e){this.draggingVolumeBar&&this.setVolume(this.getVolumeFromUIEvent(e))},t.prototype.playerResize=function(e){this.$fullscreenToggle.html("");var t=this.core.isFullscreen()?u.SvgIcons.exitFullscreen:u.SvgIcons.fullscreen;this.$fullscreenToggle.append(t),this.applyButtonStyle(this.$fullscreenToggle),0!==this.$el.find(".media-control").length&&this.$el.removeClass("w320"),(e.width<=320||this.options.hideVolumeBar)&&this.$el.addClass("w320")},t.prototype.togglePlayPause=function(){return this.container.isPlaying()?this.container.pause():this.container.play(),!1},t.prototype.togglePlayStop=function(){this.container.isPlaying()?this.container.stop():this.container.play()},t.prototype.startSeekDrag=function(e){this.settings.seekEnabled&&(this.draggingSeekBar=!0,this.$el.addClass("dragging"),this.$seekBarLoaded.addClass("media-control-notransition"),this.$seekBarPosition.addClass("media-control-notransition"),this.$seekBarScrubber.addClass("media-control-notransition"),e&&e.preventDefault())},t.prototype.startVolumeDrag=function(e){this.draggingVolumeBar=!0,this.$el.addClass("dragging"),e&&e.preventDefault()},t.prototype.stopDrag=function(e){this.draggingSeekBar&&this.seek(e),this.$el.removeClass("dragging"),this.$seekBarLoaded.removeClass("media-control-notransition"),this.$seekBarPosition.removeClass("media-control-notransition"),this.$seekBarScrubber.removeClass("media-control-notransition dragging"),this.draggingSeekBar=!1,this.draggingVolumeBar=!1},t.prototype.updateDrag=function(e){if(this.draggingSeekBar){e.preventDefault();var t=(e.pageX-this.$seekBarContainer.offset().left)/this.$seekBarContainer.width()*100;t=Math.min(100,Math.max(t,0)),this.setSeekPercentage(t)}else this.draggingVolumeBar&&(e.preventDefault(),this.setVolume(this.getVolumeFromUIEvent(e)))},t.prototype.getVolumeFromUIEvent=function(e){return(e.pageX-this.$volumeBarContainer.offset().left)/this.$volumeBarContainer.width()*100},t.prototype.toggleMute=function(){if(this.muted)return this.setVolume(this._mutedVolume||100),void(this._mutedVolume=null);this._mutedVolume=this.volume,this.setVolume(0)},t.prototype.setVolume=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e=Math.min(100,Math.max(e,0)),this.intendedVolume=e,this.persistConfig&&!n&&u.Config.persist("volume",e);var r=function(){t.container&&t.container.isReady?t.container.setVolume(e):t.listenToOnce(t.container,d.default.CONTAINER_READY,(function(){t.container.setVolume(e)}))};this.container?r():this.listenToOnce(this,d.default.MEDIACONTROL_CONTAINERCHANGED,(function(){return r()}))},t.prototype.toggleFullscreen=function(){this.trigger(d.default.MEDIACONTROL_FULLSCREEN,this.name),this.container.fullscreen(),this.core.toggleFullscreen(),this.resetUserKeepVisible()},t.prototype.onActiveContainerChanged=function(){this.fullScreenOnVideoTagSupported=null,p.default.off(this.options.playerId+":"+d.default.PLAYER_RESIZE,this.playerResize,this),this.bindEvents(),this.setInitialVolume(),this.changeTogglePlay(),this.bindContainerEvents(),this.settingsUpdate(),this.container&&this.container.trigger(d.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.container.isDvrInUse()),this.container&&this.container.mediaControlDisabled&&this.disable(),this.trigger(d.default.MEDIACONTROL_CONTAINERCHANGED)},t.prototype.showVolumeBar=function(){this.hideVolumeId&&clearTimeout(this.hideVolumeId),this.$volumeBarContainer.removeClass("volume-bar-hide")},t.prototype.hideVolumeBar=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:400;this.$volumeBarContainer&&(this.draggingVolumeBar?this.hideVolumeId=setTimeout((function(){return e.hideVolumeBar()}),t):(this.hideVolumeId&&clearTimeout(this.hideVolumeId),this.hideVolumeId=setTimeout((function(){return e.$volumeBarContainer.addClass("volume-bar-hide")}),t)))},t.prototype.ended=function(){this.changeTogglePlay()},t.prototype.updateProgressBar=function(e){var t=e.start/e.total*100,n=e.current/e.total*100;this.$seekBarLoaded.css({left:t+"%",width:n-t+"%"})},t.prototype.onTimeUpdate=function(e){if(!this.draggingSeekBar){var t=e.current<0?e.total:e.current;this.currentPositionValue=t,this.currentDurationValue=e.total,this.renderSeekBar()}},t.prototype.renderSeekBar=function(){if(null!==this.currentPositionValue&&null!==this.currentDurationValue){this.currentSeekBarPercentage=100,this.container&&(this.container.getPlaybackType()!==g.default.LIVE||this.container.isDvrInUse())&&(this.currentSeekBarPercentage=this.currentPositionValue/this.currentDurationValue*100),this.setSeekPercentage(this.currentSeekBarPercentage);var e=(0,u.formatTime)(this.currentPositionValue),t=(0,u.formatTime)(this.currentDurationValue);e!==this.displayedPosition&&(this.$position.text(e),this.displayedPosition=e),t!==this.displayedDuration&&(this.$duration.text(t),this.displayedDuration=t)}},t.prototype.seek=function(e){if(this.settings.seekEnabled){var t=(e.pageX-this.$seekBarContainer.offset().left)/this.$seekBarContainer.width()*100;return t=Math.min(100,Math.max(t,0)),this.container&&this.container.seekPercentage(t),this.setSeekPercentage(t),!1}},t.prototype.setKeepVisible=function(){this.keepVisible=!0},t.prototype.resetKeepVisible=function(){this.keepVisible=!1},t.prototype.setUserKeepVisible=function(){this.userKeepVisible=!0},t.prototype.resetUserKeepVisible=function(){this.userKeepVisible=!1},t.prototype.isVisible=function(){return!this.$el.hasClass("media-control-hide")},t.prototype.show=function(e){var t=this;if(!this.disabled){var n=e&&e.clientX!==this.lastMouseX&&e.clientY!==this.lastMouseY;(!e||n||navigator.userAgent.match(/firefox/i))&&(clearTimeout(this.hideId),this.$el.show(),this.trigger(d.default.MEDIACONTROL_SHOW,this.name),this.container&&this.container.trigger(d.default.CONTAINER_MEDIACONTROL_SHOW,this.name),this.$el.removeClass("media-control-hide"),this.hideId=setTimeout((function(){return t.hide()}),2e3),e&&(this.lastMouseX=e.clientX,this.lastMouseY=e.clientY)),this.updateCursorStyle(!0)}},t.prototype.hide=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.isVisible()){var n=t||2e3;if(clearTimeout(this.hideId),this.disabled||!1!==this.options.hideMediaControl){var r=this.userKeepVisible||this.keepVisible,i=this.draggingSeekBar||this.draggingVolumeBar;if(!this.disabled&&(t||r||i))this.hideId=setTimeout((function(){return e.hide()}),n);else{this.trigger(d.default.MEDIACONTROL_HIDE,this.name),this.container&&this.container.trigger(d.default.CONTAINER_MEDIACONTROL_HIDE,this.name),this.$el.addClass("media-control-hide"),this.hideVolumeBar(0);var a=!1;this.updateCursorStyle(a)}}}},t.prototype.updateCursorStyle=function(e){e?this.core.$el.removeClass("nocursor"):this.core.isFullscreen()&&this.core.$el.addClass("nocursor")},t.prototype.settingsUpdate=function(){var e=this.getSettings();!e||this.fullScreenOnVideoTagSupported||u.Fullscreen.fullscreenEnabled()||(e.default&&(0,u.removeArrayItem)(e.default,"fullscreen"),e.left&&(0,u.removeArrayItem)(e.left,"fullscreen"),e.right&&(0,u.removeArrayItem)(e.right,"fullscreen")),(0,i.default)(this.settings)!==(0,i.default)(e)&&(this.settings=e,this.render())},t.prototype.getSettings=function(){return y.default.extend(!0,{},this.container&&this.container.settings)},t.prototype.highDefinitionUpdate=function(e){this.isHD=e;var t=e?"addClass":"removeClass";this.$hdIndicator[t]("enabled")},t.prototype.createCachedElements=function(){var e=this.$el.find(".media-control-layer");this.$duration=e.find(".media-control-indicator[data-duration]"),this.$fullscreenToggle=e.find("button.media-control-button[data-fullscreen]"),this.$playPauseToggle=e.find("button.media-control-button[data-playpause]"),this.$playStopToggle=e.find("button.media-control-button[data-playstop]"),this.$position=e.find(".media-control-indicator[data-position]"),this.$seekBarContainer=e.find(".bar-container[data-seekbar]"),this.$seekBarHover=e.find(".bar-hover[data-seekbar]"),this.$seekBarLoaded=e.find(".bar-fill-1[data-seekbar]"),this.$seekBarPosition=e.find(".bar-fill-2[data-seekbar]"),this.$seekBarScrubber=e.find(".bar-scrubber[data-seekbar]"),this.$volumeBarContainer=e.find(".bar-container[data-volume]"),this.$volumeContainer=e.find(".drawer-container[data-volume]"),this.$volumeIcon=e.find(".drawer-icon[data-volume]"),this.$volumeBarBackground=this.$el.find(".bar-background[data-volume]"),this.$volumeBarFill=this.$el.find(".bar-fill-1[data-volume]"),this.$volumeBarScrubber=this.$el.find(".bar-scrubber[data-volume]"),this.$hdIndicator=this.$el.find("button.media-control-button[data-hd-indicator]"),this.resetIndicators(),this.initializeIcons()},t.prototype.resetIndicators=function(){this.displayedPosition=this.$position.text(),this.displayedDuration=this.$duration.text()},t.prototype.initializeIcons=function(){var e=this.$el.find(".media-control-layer");e.find("button.media-control-button[data-play]").append(u.SvgIcons.play),e.find("button.media-control-button[data-pause]").append(u.SvgIcons.pause),e.find("button.media-control-button[data-stop]").append(u.SvgIcons.stop),this.$playPauseToggle.append(u.SvgIcons.play),this.$playStopToggle.append(u.SvgIcons.play),this.$volumeIcon.append(u.SvgIcons.volume),this.$fullscreenToggle.append(u.SvgIcons.fullscreen),this.$hdIndicator.append(u.SvgIcons.hd)},t.prototype.setSeekPercentage=function(e){e=Math.max(Math.min(e,100),0),this.displayedSeekBarPercentage!==e&&(this.displayedSeekBarPercentage=e,this.$seekBarPosition.removeClass("media-control-notransition"),this.$seekBarScrubber.removeClass("media-control-notransition"),this.$seekBarPosition.css({width:e+"%"}),this.$seekBarScrubber.css({left:e+"%"}))},t.prototype.seekRelative=function(e){if(this.settings.seekEnabled){var t=this.container.getCurrentTime(),n=this.container.getDuration(),r=Math.min(Math.max(t+e,0),n);r=Math.min(100*r/n,100),this.container.seekPercentage(r)}},t.prototype.bindKeyAndShow=function(e,t){var n=this;this.kibo.down(e,(function(){return n.show(),t()}))},t.prototype.bindKeyEvents=function(){var e=this;h.default.isMobile||this.options.disableKeyboardShortcuts||(this.unbindKeyEvents(),this.kibo=new c.Kibo(this.options.focusElement||this.options.parentElement),this.bindKeyAndShow("space",(function(){return e.togglePlayPause()})),this.bindKeyAndShow("left",(function(){return e.seekRelative(-5)})),this.bindKeyAndShow("right",(function(){return e.seekRelative(5)})),this.bindKeyAndShow("shift left",(function(){return e.seekRelative(-10)})),this.bindKeyAndShow("shift right",(function(){return e.seekRelative(10)})),this.bindKeyAndShow("shift ctrl left",(function(){return e.seekRelative(-15)})),this.bindKeyAndShow("shift ctrl right",(function(){return e.seekRelative(15)})),["1","2","3","4","5","6","7","8","9","0"].forEach((function(t){e.bindKeyAndShow(t,(function(){e.settings.seekEnabled&&e.container&&e.container.seekPercentage(10*t)}))})))},t.prototype.unbindKeyEvents=function(){this.kibo&&(this.kibo.off("space"),this.kibo.off("left"),this.kibo.off("right"),this.kibo.off("shift left"),this.kibo.off("shift right"),this.kibo.off("shift ctrl left"),this.kibo.off("shift ctrl right"),this.kibo.off(["1","2","3","4","5","6","7","8","9","0"]))},t.prototype.parseColors=function(){if(this.options.mediacontrol){this.buttonsColor=this.options.mediacontrol.buttons;var e=this.options.mediacontrol.seekbar;this.$el.find(".bar-fill-2[data-seekbar]").css("background-color",e),this.$el.find(".media-control-icon svg path").css("fill",this.buttonsColor),this.$el.find(".segmented-bar-element[data-volume]").css("boxShadow","inset 2px 0 0 "+this.buttonsColor)}},t.prototype.applyButtonStyle=function(e){this.buttonsColor&&e&&(0,y.default)(e).find("svg path").css("fill",this.buttonsColor)},t.prototype.destroy=function(){(0,y.default)(document).unbind("mouseup",this.stopDragHandler),(0,y.default)(document).unbind("mousemove",this.updateDragHandler),this.unbindKeyEvents(),this.stopListening(),e.prototype.destroy.call(this)},t.prototype.configure=function(e){this.options.chromeless||e.source||e.sources?this.disable():this.enable(),this.trigger(d.default.MEDIACONTROL_OPTIONS_CHANGE)},t.prototype.render=function(){var e=this,t=this.options.hideMediaControlDelay||2e3;this.settings&&this.$el.html(this.template({settings:this.settings})),this.createCachedElements(),this.$playPauseToggle.addClass("paused"),this.$playStopToggle.addClass("stopped"),this.changeTogglePlay(),this.container&&(this.hideId=setTimeout((function(){return e.hide()}),t),this.disabled&&this.hide()),h.default.isSafari&&h.default.isMobile&&(h.default.version<10?this.$volumeContainer.css("display","none"):this.$volumeBarContainer.css("display","none")),this.$seekBarPosition.addClass("media-control-notransition"),this.$seekBarScrubber.addClass("media-control-notransition");var n=0;return this.displayedSeekBarPercentage&&(n=this.displayedSeekBarPercentage),this.displayedSeekBarPercentage=null,this.setSeekPercentage(n),r.nextTick((function(){!e.settings.seekEnabled&&e.$seekBarContainer.addClass("seek-disabled"),!h.default.isMobile&&!e.options.disableKeyboardShortcuts&&e.bindKeyEvents(),e.playerResize({width:e.options.width,height:e.options.height}),e.hideVolumeBar(0)})),this.parseColors(),this.highDefinitionUpdate(this.isHD),this.core.$el.append(this.el),this.rendered=!0,this.updateVolumeUI(),this.trigger(d.default.MEDIACONTROL_RENDERED),this},t}(f.default);t.default=_,_.extend=function(e){return(0,u.extend)(_,e)},e.exports=t.default}).call(this,n(/*! ./../../../node_modules/node-libs-browser/node_modules/process/browser.js */"./node_modules/node-libs-browser/node_modules/process/browser.js"))},"./src/plugins/media_control/public/closed-hand.cur":
/*!**********************************************************!*\
!*** ./src/plugins/media_control/public/closed-hand.cur ***!
\**********************************************************/
/*! no static exports found */function(e,t){e.exports="<%=baseUrl%>/a8c874b93b3d848f39a71260c57e3863.cur"},"./src/plugins/media_control/public/media-control.html":
/*!*************************************************************!*\
!*** ./src/plugins/media_control/public/media-control.html ***!
\*************************************************************/
/*! no static exports found */function(e,t){e.exports='<div class="media-control-background" data-background></div>\n<div class="media-control-layer" data-controls>\n <% var renderBar = function(name) { %>\n <div class="bar-container" data-<%= name %>>\n <div class="bar-background" data-<%= name %>>\n <div class="bar-fill-1" data-<%= name %>></div>\n <div class="bar-fill-2" data-<%= name %>></div>\n <div class="bar-hover" data-<%= name %>></div>\n </div>\n <div class="bar-scrubber" data-<%= name %>>\n <div class="bar-scrubber-icon" data-<%= name %>></div>\n </div>\n </div>\n <% }; %>\n <% var renderSegmentedBar = function(name, segments) {\n segments = segments || 10; %>\n <div class="bar-container" data-<%= name %>>\n <% for (var i = 0; i < segments; i++) { %>\n <div class="segmented-bar-element" data-<%= name %>></div>\n <% } %>\n </div>\n <% }; %>\n <% var renderDrawer = function(name, renderContent) { %>\n <div class="drawer-container" data-<%= name %>>\n <div class="drawer-icon-container" data-<%= name %>>\n <div class="drawer-icon media-control-icon" data-<%= name %>></div>\n <span class="drawer-text" data-<%= name %>></span>\n </div>\n <% renderContent(name); %>\n </div>\n <% }; %>\n <% var renderIndicator = function(name) { %>\n <div class="media-control-indicator" data-<%= name %>></div>\n <% }; %>\n <% var renderButton = function(name) { %>\n <button type="button" class="media-control-button media-control-icon" data-<%= name %> aria-label="<%= name %>"></button>\n <% }; %>\n <% var templates = {\n bar: renderBar,\n segmentedBar: renderSegmentedBar,\n };\n var render = function(settingsList) {\n settingsList.forEach(function(setting) {\n if(setting === "seekbar") {\n renderBar(setting);\n } else if (setting === "volume") {\n renderDrawer(setting, settings.volumeBarTemplate ? templates[settings.volumeBarTemplate] : function(name) { return renderSegmentedBar(name); });\n } else if (setting === "duration" || setting === "position") {\n renderIndicator(setting);\n } else {\n renderButton(setting);\n }\n });\n }; %>\n <% if (settings.default && settings.default.length) { %>\n <div class="media-control-center-panel" data-media-control>\n <% render(settings.default); %>\n </div>\n <% } %>\n <% if (settings.left && settings.left.length) { %>\n <div class="media-control-left-panel" data-media-control>\n <% render(settings.left); %>\n </div>\n <% } %>\n <% if (settings.right && settings.right.length) { %>\n <div class="media-control-right-panel" data-media-control>\n <% render(settings.right); %>\n </div>\n <% } %>\n</div>\n'},"./src/plugins/media_control/public/media-control.scss":
/*!*************************************************************!*\
!*** ./src/plugins/media_control/public/media-control.scss ***!
\*************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./media-control.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/media_control/public/media-control.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/plugins/poster/index.js":
/*!*************************************!*\
!*** ./src/plugins/poster/index.js ***!
\*************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./poster */"./src/plugins/poster/poster.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/poster/poster.js":
/*!**************************************!*\
!*** ./src/plugins/poster/poster.js ***!
\**************************************/
/*! no static exports found */function(e,t,n){"use strict";(function(r){Object.defineProperty(t,"__esModule",{value:!0});var i=m(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),a=m(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=m(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),s=m(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),l=m(n(/*! ../../base/ui_container_plugin */"./src/base/ui_container_plugin.js")),u=m(n(/*! ../../base/events */"./src/base/events.js")),c=m(n(/*! ../../base/template */"./src/base/template.js")),d=m(n(/*! ../../base/playback */"./src/base/playback.js")),f=m(n(/*! ../../components/error/error */"./src/components/error/error.js")),h=m(n(/*! ./public/poster.html */"./src/plugins/poster/public/poster.html")),p=n(/*! ../../base/utils */"./src/base/utils.js");function m(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/poster.scss */"./src/plugins/poster/public/poster.scss");var g=function(e){function t(n){(0,i.default)(this,t);var o=(0,a.default)(this,e.call(this,n));return o.hasStartedPlaying=!1,o.playRequested=!1,o.render(),r.nextTick((function(){return o.update()})),o}return(0,s.default)(t,e),(0,o.default)(t,[{key:"name",get:function(){return"poster"}},{key:"template",get:function(){return(0,c.default)(h.default)}},{key:"shouldRender",get:function(){var e=!(!this.options.poster||!this.options.poster.showForNoOp);return"html_img"!==this.container.playback.name&&(this.container.playback.getPlaybackType()!==d.default.NO_OP||e)}},{key:"attributes",get:function(){return{class:"player-poster","data-poster":""}}},{key:"events",get:function(){return{click:"clicked"}}},{key:"showOnVideoEnd",get:function(){return!this.options.poster||this.options.poster.showOnVideoEnd||void 0===this.options.poster.showOnVideoEnd}}]),t.prototype.bindEvents=function(){this.listenTo(this.container,u.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,u.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,u.default.CONTAINER_STATE_BUFFERING,this.update),this.listenTo(this.container,u.default.CONTAINER_STATE_BUFFERFULL,this.update),this.listenTo(this.container,u.default.CONTAINER_OPTIONS_CHANGE,this.render),this.listenTo(this.container,u.default.CONTAINER_ERROR,this.onError),this.showOnVideoEnd&&this.listenTo(this.container,u.default.CONTAINER_ENDED,this.onStop)},t.prototype.onError=function(e){this.hasFatalError=e.level===f.default.Levels.FATAL,this.hasFatalError&&(this.hasStartedPlaying=!1,this.playRequested=!1,this.showPlayButton())},t.prototype.onPlay=function(){this.hasStartedPlaying=!0,this.update()},t.prototype.onStop=function(){this.hasStartedPlaying=!1,this.playRequested=!1,this.update()},t.prototype.updatePlayButton=function(e){!e||this.options.chromeless&&!this.options.allowUserInteraction?this.hidePlayButton():this.showPlayButton()},t.prototype.showPlayButton=function(){this.hasFatalError&&!this.options.disableErrorScreen||(this.$playButton.show(),this.$el.addClass("clickable"))},t.prototype.hidePlayButton=function(){this.$playButton.hide(),this.$el.removeClass("clickable")},t.prototype.clicked=function(){if(!this.hasStartedPlaying)return this.options.chromeless&&!this.options.allowUserInteraction||(this.playRequested=!0,this.update(),this.container.play()),!1},t.prototype.shouldHideOnPlay=function(){return!this.container.playback.isAudioOnly},t.prototype.update=function(){if(this.shouldRender){var e=!this.playRequested&&!this.hasStartedPlaying&&!this.container.buffering;this.updatePlayButton(e),this.updatePoster()}},t.prototype.updatePoster=function(){this.hasStartedPlaying?this.hidePoster():this.showPoster()},t.prototype.showPoster=function(){this.container.disableMediaControl(),this.$el.show()},t.prototype.hidePoster=function(){this.container.enableMediaControl(),this.shouldHideOnPlay()&&this.$el.hide()},t.prototype.render=function(){if(this.shouldRender){if(this.$el.html(this.template()),this.options.poster&&void 0===this.options.poster.custom){var e=this.options.poster.url||this.options.poster;this.$el.css({"background-image":"url("+e+")"})}else this.options.poster&&this.$el.css({background:this.options.poster.custom});this.container.$el.append(this.el),this.$playWrapper=this.$el.find(".play-wrapper"),this.$playWrapper.append(p.SvgIcons.play),this.$playButton=this.$playWrapper.find("svg"),this.$playButton.addClass("poster-icon"),this.$playButton.attr("data-poster","");var t=this.options.mediacontrol&&this.options.mediacontrol.buttons;return t&&this.$el.find("svg path").css("fill",t),this.options.mediacontrol&&this.options.mediacontrol.buttons&&(t=this.options.mediacontrol.buttons,this.$playButton.css("color",t)),this.update(),this}},t}(l.default);t.default=g,e.exports=t.default}).call(this,n(/*! ./../../../node_modules/node-libs-browser/node_modules/process/browser.js */"./node_modules/node-libs-browser/node_modules/process/browser.js"))},"./src/plugins/poster/public/poster.html":
/*!***********************************************!*\
!*** ./src/plugins/poster/public/poster.html ***!
\***********************************************/
/*! no static exports found */function(e,t){e.exports='<div class="play-wrapper" data-poster></div>\n'},"./src/plugins/poster/public/poster.scss":
/*!***********************************************!*\
!*** ./src/plugins/poster/public/poster.scss ***!
\***********************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./poster.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/poster/public/poster.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/plugins/seek_time/index.js":
/*!****************************************!*\
!*** ./src/plugins/seek_time/index.js ***!
\****************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./seek_time */"./src/plugins/seek_time/seek_time.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/seek_time/public/seek_time.html":
/*!*****************************************************!*\
!*** ./src/plugins/seek_time/public/seek_time.html ***!
\*****************************************************/
/*! no static exports found */function(e,t){e.exports="<span data-seek-time></span>\n<span data-duration></span>\n"},"./src/plugins/seek_time/public/seek_time.scss":
/*!*****************************************************!*\
!*** ./src/plugins/seek_time/public/seek_time.scss ***!
\*****************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./seek_time.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/seek_time/public/seek_time.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/plugins/seek_time/seek_time.js":
/*!********************************************!*\
!*** ./src/plugins/seek_time/seek_time.js ***!
\********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=h(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=h(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=h(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=h(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=n(/*! ../../base/utils */"./src/base/utils.js"),l=h(n(/*! ../../base/ui_core_plugin */"./src/base/ui_core_plugin.js")),u=h(n(/*! ../../base/template */"./src/base/template.js")),c=h(n(/*! ../../base/events */"./src/base/events.js")),d=h(n(/*! ../../base/playback */"./src/base/playback.js")),f=h(n(/*! ./public/seek_time.html */"./src/plugins/seek_time/public/seek_time.html"));function h(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/seek_time.scss */"./src/plugins/seek_time/public/seek_time.scss");var p=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.hoveringOverSeekBar=!1,a.hoverPosition=null,a.duration=null,a.firstFragDateTime=null,a.actualLiveTime=!!a.mediaControl.options.actualLiveTime,a.actualLiveTime&&(a.mediaControl.options.actualLiveServerTime?a.actualLiveServerTimeDiff=(new Date).getTime()-new Date(a.mediaControl.options.actualLiveServerTime).getTime():a.actualLiveServerTimeDiff=0),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"seek_time"}},{key:"template",get:function(){return(0,u.default)(f.default)}},{key:"attributes",get:function(){return{class:"seek-time","data-seek-time":""}}},{key:"mediaControl",get:function(){return this.core.mediaControl}},{key:"mediaControlContainer",get:function(){return this.mediaControl.container}},{key:"isLiveStreamWithDvr",get:function(){return this.mediaControlContainer&&this.mediaControlContainer.getPlaybackType()===d.default.LIVE&&this.mediaControlContainer.isDvrEnabled()}},{key:"durationShown",get:function(){return this.isLiveStreamWithDvr&&!this.actualLiveTime}},{key:"useActualLiveTime",get:function(){return this.actualLiveTime&&this.isLiveStreamWithDvr}}]),t.prototype.bindEvents=function(){this.listenTo(this.mediaControl,c.default.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this.showTime),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this.hideTime),this.listenTo(this.mediaControl,c.default.MEDIACONTROL_CONTAINERCHANGED,this.onContainerChanged),this.mediaControlContainer&&(this.listenTo(this.mediaControlContainer,c.default.CONTAINER_PLAYBACKDVRSTATECHANGED,this.update),this.listenTo(this.mediaControlContainer,c.default.CONTAINER_TIMEUPDATE,this.updateDuration))},t.prototype.onContainerChanged=function(){this.stopListening(),this.bindEvents()},t.prototype.updateDuration=function(e){this.duration=e.total,this.firstFragDateTime=e.firstFragDateTime,this.update()},t.prototype.showTime=function(e){this.hoveringOverSeekBar=!0,this.calculateHoverPosition(e),this.update()},t.prototype.hideTime=function(){this.hoveringOverSeekBar=!1,this.update()},t.prototype.calculateHoverPosition=function(e){var t=e.pageX-this.mediaControl.$seekBarContainer.offset().left;this.hoverPosition=Math.min(1,Math.max(t/this.mediaControl.$seekBarContainer.width(),0))},t.prototype.getSeekTime=function(){var e=void 0,t=void 0,n=void 0,r=void 0;return this.useActualLiveTime?(this.firstFragDateTime?(r=new Date(this.firstFragDateTime),(n=new Date(this.firstFragDateTime)).setHours(0,0,0,0),t=(r.getTime()-n.getTime())/1e3+this.duration):(n=new Date((new Date).getTime()-this.actualLiveServerTimeDiff),t=((r=new Date(n))-n.setHours(0,0,0,0))/1e3),(e=t-this.duration+this.hoverPosition*this.duration)<0&&(e+=86400)):e=this.hoverPosition*this.duration,{seekTime:e,secondsSinceMidnight:t}},t.prototype.update=function(){if(this.rendered)if(this.shouldBeVisible()){var e=this.getSeekTime(),t=(0,s.formatTime)(e.seekTime,this.useActualLiveTime);if(t!==this.displayedSeekTime&&(this.$seekTimeEl.text(t),this.displayedSeekTime=t),this.durationShown){this.$durationEl.show();var n=(0,s.formatTime)(this.actualLiveTime?e.secondsSinceMidnight:this.duration,this.actualLiveTime);n!==this.displayedDuration&&(this.$durationEl.text(n),this.displayedDuration=n)}else this.$durationEl.hide();this.$el.show();var r=this.mediaControl.$seekBarContainer.width(),i=this.$el.width(),a=this.hoverPosition*r;a-=i/2,a=Math.max(0,Math.min(a,r-i)),this.$el.css("left",a)}else this.$el.hide(),this.$el.css("left","-100%")},t.prototype.shouldBeVisible=function(){return this.mediaControlContainer&&this.mediaControlContainer.settings.seekEnabled&&this.hoveringOverSeekBar&&null!==this.hoverPosition&&null!==this.duration},t.prototype.render=function(){this.rendered=!0,this.displayedDuration=null,this.displayedSeekTime=null,this.$el.html(this.template()),this.$el.hide(),this.mediaControl.$el.append(this.el),this.$seekTimeEl=this.$el.find("[data-seek-time]"),this.$durationEl=this.$el.find("[data-duration]"),this.$durationEl.hide(),this.update()},t}(l.default);t.default=p,e.exports=t.default},"./src/plugins/sources.js":
/*!********************************!*\
!*** ./src/plugins/sources.js ***!
\********************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),a=u(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),o=u(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=u(n(/*! ../base/core_plugin */"./src/base/core_plugin.js")),l=u(n(/*! ../base/events */"./src/base/events.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,r.default)(this,t),(0,a.default)(this,e.apply(this,arguments))}return(0,o.default)(t,e),t.prototype.bindEvents=function(){this.listenTo(this.core,l.default.CORE_CONTAINERS_CREATED,this.onContainersCreated)},t.prototype.onContainersCreated=function(){var e=this.core.containers.filter((function(e){return"no_op"!==e.playback.name}))[0]||this.core.containers[0];e&&this.core.containers.forEach((function(t){t!==e&&t.destroy()}))},(0,i.default)(t,[{key:"name",get:function(){return"sources"}}]),t}(s.default);t.default=c,e.exports=t.default},"./src/plugins/spinner_three_bounce/index.js":
/*!***************************************************!*\
!*** ./src/plugins/spinner_three_bounce/index.js ***!
\***************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./spinner_three_bounce */"./src/plugins/spinner_three_bounce/spinner_three_bounce.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/spinner_three_bounce/public/spinner.html":
/*!**************************************************************!*\
!*** ./src/plugins/spinner_three_bounce/public/spinner.html ***!
\**************************************************************/
/*! no static exports found */function(e,t){e.exports="<div data-bounce1></div><div data-bounce2></div><div data-bounce3></div>\n"},"./src/plugins/spinner_three_bounce/public/spinner.scss":
/*!**************************************************************!*\
!*** ./src/plugins/spinner_three_bounce/public/spinner.scss ***!
\**************************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./spinner.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/spinner_three_bounce/public/spinner.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/plugins/spinner_three_bounce/spinner_three_bounce.js":
/*!******************************************************************!*\
!*** ./src/plugins/spinner_three_bounce/spinner_three_bounce.js ***!
\******************************************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(n(/*! ../../base/ui_container_plugin */"./src/base/ui_container_plugin.js")),l=d(n(/*! ../../base/events */"./src/base/events.js")),u=d(n(/*! ../../base/template */"./src/base/template.js")),c=d(n(/*! ./public/spinner.html */"./src/plugins/spinner_three_bounce/public/spinner.html"));function d(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/spinner.scss */"./src/plugins/spinner_three_bounce/public/spinner.scss");var f=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.template=(0,u.default)(c.default),a.showTimeout=null,a.listenTo(a.container,l.default.CONTAINER_STATE_BUFFERING,a.onBuffering),a.listenTo(a.container,l.default.CONTAINER_STATE_BUFFERFULL,a.onBufferFull),a.listenTo(a.container,l.default.CONTAINER_STOP,a.onStop),a.listenTo(a.container,l.default.CONTAINER_ENDED,a.onStop),a.listenTo(a.container,l.default.CONTAINER_ERROR,a.onStop),a.render(),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"spinner"}},{key:"attributes",get:function(){return{"data-spinner":"",class:"spinner-three-bounce"}}}]),t.prototype.onBuffering=function(){this.show()},t.prototype.onBufferFull=function(){this.hide()},t.prototype.onStop=function(){this.hide()},t.prototype.show=function(){var e=this;null===this.showTimeout&&(this.showTimeout=setTimeout((function(){return e.$el.show()}),300))},t.prototype.hide=function(){null!==this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null),this.$el.hide()},t.prototype.render=function(){return this.$el.html(this.template()),this.container.$el.append(this.$el),this.$el.hide(),this.container.buffering&&this.onBuffering(),this},t}(s.default);t.default=f,e.exports=t.default},"./src/plugins/stats/index.js":
/*!************************************!*\
!*** ./src/plugins/stats/index.js ***!
\************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./stats */"./src/plugins/stats/stats.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/stats/stats.js":
/*!************************************!*\
!*** ./src/plugins/stats/stats.js ***!
\************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=c(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=c(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=c(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=c(n(/*! ../../base/container_plugin */"./src/base/container_plugin.js")),l=c(n(/*! ../../base/events */"./src/base/events.js")),u=c(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.setInitialAttrs(),a.reportInterval=a.options.reportInterval||5e3,a.state="IDLE",a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"stats"}}]),t.prototype.bindEvents=function(){this.listenTo(this.container.playback,l.default.PLAYBACK_PLAY,this.onPlay),this.listenTo(this.container,l.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,l.default.CONTAINER_ENDED,this.onStop),this.listenTo(this.container,l.default.CONTAINER_DESTROYED,this.onStop),this.listenTo(this.container,l.default.CONTAINER_STATE_BUFFERING,this.onBuffering),this.listenTo(this.container,l.default.CONTAINER_STATE_BUFFERFULL,this.onBufferFull),this.listenTo(this.container,l.default.CONTAINER_STATS_ADD,this.onStatsAdd),this.listenTo(this.container,l.default.CONTAINER_BITRATE,this.onStatsAdd),this.listenTo(this.container.playback,l.default.PLAYBACK_STATS_ADD,this.onStatsAdd)},t.prototype.setInitialAttrs=function(){this.firstPlay=!0,this.startupTime=0,this.rebufferingTime=0,this.watchingTime=0,this.rebuffers=0,this.externalMetrics={}},t.prototype.onPlay=function(){this.state="PLAYING",this.watchingTimeInit=Date.now(),this.intervalId||(this.intervalId=setInterval(this.report.bind(this),this.reportInterval))},t.prototype.onStop=function(){clearInterval(this.intervalId),this.report(),this.intervalId=void 0,this.state="STOPPED"},t.prototype.onBuffering=function(){this.firstPlay?this.startupTimeInit=Date.now():this.rebufferingTimeInit=Date.now(),this.state="BUFFERING",this.rebuffers++},t.prototype.onBufferFull=function(){this.firstPlay&&this.startupTimeInit?(this.firstPlay=!1,this.startupTime=Date.now()-this.startupTimeInit,this.watchingTimeInit=Date.now()):this.rebufferingTimeInit&&(this.rebufferingTime+=this.getRebufferingTime()),this.rebufferingTimeInit=void 0,this.state="PLAYING"},t.prototype.getRebufferingTime=function(){return Date.now()-this.rebufferingTimeInit},t.prototype.getWatchingTime=function(){return Date.now()-this.watchingTimeInit-this.rebufferingTime},t.prototype.isRebuffering=function(){return!!this.rebufferingTimeInit},t.prototype.onStatsAdd=function(e){u.default.extend(this.externalMetrics,e)},t.prototype.getStats=function(){var e={startupTime:this.startupTime,rebuffers:this.rebuffers,rebufferingTime:this.isRebuffering()?this.rebufferingTime+this.getRebufferingTime():this.rebufferingTime,watchingTime:this.isRebuffering()?this.getWatchingTime()-this.getRebufferingTime():this.getWatchingTime()};return u.default.extend(e,this.externalMetrics),e},t.prototype.report=function(){this.container.statsReport(this.getStats())},t}(s.default);t.default=d,e.exports=t.default},"./src/plugins/strings.js":
/*!********************************!*\
!*** ./src/plugins/strings.js ***!
\********************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=u(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=u(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=u(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=n(/*! ../base/utils */"./src/base/utils.js"),l=u(n(/*! clappr-zepto */"./node_modules/clappr-zepto/zepto.js"));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a._initializeMessages(),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"strings"}}]),t.prototype.t=function(e){var t=this._language(),n=this._messages.en;return(t&&this._messages[t]||n)[e]||n[e]||e},t.prototype._language=function(){return this.core.options.language||(0,s.getBrowserLanguage)()},t.prototype._initializeMessages=function(){this._messages=l.default.extend(!0,{en:{live:"live",back_to_live:"back to live",disabled:"Disabled",playback_not_supported:"Your browser does not support the playback of this video. Please try using a different browser.",default_error_title:"Could not play video.",default_error_message:"There was a problem trying to load the video."},pt:{live:"ao vivo",back_to_live:"voltar para o ao vivo",disabled:"Desativado",playback_not_supported:"Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente.",default_error_title:"Não foi possível reproduzir o vídeo.",default_error_message:"Ocorreu um problema ao tentar carregar o vídeo."},es:{live:"vivo",back_to_live:"volver en vivo",disabled:"Discapacitado",playback_not_supported:"Su navegador no soporta la reproducción de un video. Por favor, trate de usar un navegador diferente."},ru:{live:"прямой эфир",back_to_live:"к прямому эфиру",disabled:"Отключено",playback_not_supported:"Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер."},fr:{live:"en direct",back_to_live:"retour au direct",disabled:"Désactivé",playback_not_supported:"Votre navigateur ne supporte pas la lecture de cette vidéo. Merci de tenter sur un autre navigateur.",default_error_title:"Impossible de lire la vidéo.",default_error_message:"Un problème est survenu lors du chargement de la vidéo."},tr:{live:"canlı",back_to_live:"canlı yayına dön",disabled:"Engelli",playback_not_supported:"Tarayıcınız bu videoyu oynatma desteğine sahip değil. Lütfen farklı bir tarayıcı ile deneyin."},et:{live:"Otseülekanne",back_to_live:"Tagasi otseülekande juurde",disabled:"Keelatud",playback_not_supported:"Teie brauser ei toeta selle video taasesitust. Proovige kasutada muud brauserit."},ar:{live:"مباشر",back_to_live:"الرجوع إلى المباشر",disabled:"معطّل",playback_not_supported:"المتصفح الذي تستخدمه لا يدعم تشغيل هذا الفيديو. الرجاء إستخدام متصفح آخر.",default_error_title:"غير قادر الى التشغيل.",default_error_message:"حدثت مشكلة أثناء تحميل الفيديو."}},this.core.options.strings||{}),this._messages["pt-BR"]=this._messages.pt,this._messages["en-US"]=this._messages.en,this._messages["es-419"]=this._messages.es,this._messages["fr-FR"]=this._messages.fr,this._messages["tr-TR"]=this._messages.tr,this._messages["et-EE"]=this._messages.et,this._messages["ar-IQ"]=this._messages.ar},t}(u(n(/*! ../base/core_plugin */"./src/base/core_plugin.js")).default);t.default=c,e.exports=t.default},"./src/plugins/watermark/index.js":
/*!****************************************!*\
!*** ./src/plugins/watermark/index.js ***!
\****************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./watermark */"./src/plugins/watermark/watermark.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},"./src/plugins/watermark/public/watermark.html":
/*!*****************************************************!*\
!*** ./src/plugins/watermark/public/watermark.html ***!
\*****************************************************/
/*! no static exports found */function(e,t){e.exports='<div class="clappr-watermark" data-watermark data-watermark-<%=position %>>\n<% if(typeof imageLink !== \'undefined\') { %>\n<a target=_blank href="<%= imageLink %>">\n<% } %>\n<img src="<%= imageUrl %>">\n<% if(typeof imageLink !== \'undefined\') { %>\n</a>\n<% } %>\n</div>\n'},"./src/plugins/watermark/public/watermark.scss":
/*!*****************************************************!*\
!*** ./src/plugins/watermark/public/watermark.scss ***!
\*****************************************************/
/*! no static exports found */function(e,t,n){var r=n(/*! !../../../../node_modules/css-loader!../../../../node_modules/postcss-loader/lib!../../../../node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./watermark.scss */"./node_modules/css-loader/index.js!./node_modules/postcss-loader/lib/index.js!./node_modules/sass-loader/lib/loader.js?includePaths[]=/Users/joaopaulo/Workstation/JS/clappr/src/base/scss!./src/plugins/watermark/public/watermark.scss");"string"==typeof r&&(r=[[e.i,r,""]]);var i={singleton:!0,hmr:!0,transform:void 0,insertInto:void 0};n(/*! ../../../../node_modules/style-loader/lib/addStyles.js */"./node_modules/style-loader/lib/addStyles.js")(r,i),r.locals&&(e.exports=r.locals)},"./src/plugins/watermark/watermark.js":
/*!********************************************!*\
!*** ./src/plugins/watermark/watermark.js ***!
\********************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=d(n(/*! babel-runtime/helpers/classCallCheck */"./node_modules/babel-runtime/helpers/classCallCheck.js")),i=d(n(/*! babel-runtime/helpers/possibleConstructorReturn */"./node_modules/babel-runtime/helpers/possibleConstructorReturn.js")),a=d(n(/*! babel-runtime/helpers/createClass */"./node_modules/babel-runtime/helpers/createClass.js")),o=d(n(/*! babel-runtime/helpers/inherits */"./node_modules/babel-runtime/helpers/inherits.js")),s=d(n(/*! ../../base/ui_container_plugin */"./src/base/ui_container_plugin.js")),l=d(n(/*! ../../base/events */"./src/base/events.js")),u=d(n(/*! ../../base/template */"./src/base/template.js")),c=d(n(/*! ./public/watermark.html */"./src/plugins/watermark/public/watermark.html"));function d(e){return e&&e.__esModule?e:{default:e}}n(/*! ./public/watermark.scss */"./src/plugins/watermark/public/watermark.scss");var f=function(e){function t(n){(0,r.default)(this,t);var a=(0,i.default)(this,e.call(this,n));return a.configure(),a}return(0,o.default)(t,e),(0,a.default)(t,[{key:"name",get:function(){return"watermark"}},{key:"template",get:function(){return(0,u.default)(c.default)}}]),t.prototype.bindEvents=function(){this.listenTo(this.container,l.default.CONTAINER_PLAY,this.onPlay),this.listenTo(this.container,l.default.CONTAINER_STOP,this.onStop),this.listenTo(this.container,l.default.CONTAINER_OPTIONS_CHANGE,this.configure)},t.prototype.configure=function(){this.position=this.options.position||"bottom-right",this.options.watermark?(this.imageUrl=this.options.watermark,this.imageLink=this.options.watermarkLink,this.render()):this.$el.remove()},t.prototype.onPlay=function(){this.hidden||this.$el.show()},t.prototype.onStop=function(){this.$el.hide()},t.prototype.render=function(){this.$el.hide();var e={position:this.position,imageUrl:this.imageUrl,imageLink:this.imageLink};return this.$el.html(this.template(e)),this.container.$el.append(this.$el),this},t}(s.default);t.default=f,e.exports=t.default},"./src/vendor/index.js":
/*!*****************************!*\
!*** ./src/vendor/index.js ***!
\*****************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(/*! ./kibo */"./src/vendor/kibo.js"),a=(r=i)&&r.__esModule?r:{default:r};t.default={Kibo:a.default},e.exports=t.default},"./src/vendor/kibo.js":
/*!****************************!*\
!*** ./src/vendor/kibo.js ***!
\****************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.element=e||window.document,this.initialize()};r.KEY_NAMES_BY_CODE={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"caps_lock",27:"esc",32:"space",37:"left",38:"up",39:"right",40:"down",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12"},r.KEY_CODES_BY_NAME={},function(){for(var e in r.KEY_NAMES_BY_CODE)Object.prototype.hasOwnProperty.call(r.KEY_NAMES_BY_CODE,e)&&(r.KEY_CODES_BY_NAME[r.KEY_NAMES_BY_CODE[e]]=+e)}(),r.MODIFIERS=["shift","ctrl","alt"],r.registerEvent=document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:document.attachEvent?function(e,t,n){e.attachEvent("on"+t,n)}:void 0,r.unregisterEvent=document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:document.detachEvent?function(e,t,n){e.detachEvent("on"+t,n)}:void 0,r.stringContains=function(e,t){return-1!==e.indexOf(t)},r.neatString=function(e){return e.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")},r.capitalize=function(e){return e.toLowerCase().replace(/^./,(function(e){return e.toUpperCase()}))},r.isString=function(e){return r.stringContains(Object.prototype.toString.call(e),"String")},r.arrayIncludes=Array.prototype.indexOf?function(e,t){return-1!==e.indexOf(t)}:function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return!0;return!1},r.extractModifiers=function(e){var t,n;for(t=[],n=0;n<r.MODIFIERS.length;n++)r.stringContains(e,r.MODIFIERS[n])&&t.push(r.MODIFIERS[n]);return t},r.extractKey=function(e){var t,n;for(t=r.neatString(e).split(" "),n=0;n<t.length;n++)if(!r.arrayIncludes(r.MODIFIERS,t[n]))return t[n]},r.modifiersAndKey=function(e){var t,n;return r.stringContains(e,"any")?r.neatString(e).split(" ").slice(0,2).join(" "):(t=r.extractModifiers(e),(n=r.extractKey(e))&&!r.arrayIncludes(r.MODIFIERS,n)&&t.push(n),t.join(" "))},r.keyName=function(e){return r.KEY_NAMES_BY_CODE[e+""]},r.keyCode=function(e){return+r.KEY_CODES_BY_NAME[e]},r.prototype.initialize=function(){var e,t=this;for(this.lastKeyCode=-1,this.lastModifiers={},e=0;e<r.MODIFIERS.length;e++)this.lastModifiers[r.MODIFIERS[e]]=!1;this.keysDown={any:[]},this.keysUp={any:[]},this.downHandler=this.handler("down"),this.upHandler=this.handler("up"),r.registerEvent(this.element,"keydown",this.downHandler),r.registerEvent(this.element,"keyup",this.upHandler),r.registerEvent(window,"unload",(function e(){r.unregisterEvent(t.element,"keydown",t.downHandler),r.unregisterEvent(t.element,"keyup",t.upHandler),r.unregisterEvent(window,"unload",e)}))},r.prototype.handler=function(e){var t=this;return function(n){var i,a,o;for(n=n||window.event,t.lastKeyCode=n.keyCode,i=0;i<r.MODIFIERS.length;i++)t.lastModifiers[r.MODIFIERS[i]]=n[r.MODIFIERS[i]+"Key"];for(r.arrayIncludes(r.MODIFIERS,r.keyName(t.lastKeyCode))&&(t.lastModifiers[r.keyName(t.lastKeyCode)]=!0),a=t["keys"+r.capitalize(e)],i=0;i<a.any.length;i++)!1===a.any[i](n)&&n.preventDefault&&n.preventDefault();if(a[o=t.lastModifiersAndKey()])for(i=0;i<a[o].length;i++)!1===a[o][i](n)&&n.preventDefault&&n.preventDefault()}},r.prototype.registerKeys=function(e,t,n){var i,a,o=this["keys"+r.capitalize(e)];for(r.isString(t)&&(t=[t]),i=0;i<t.length;i++)a=t[i],o[a=r.modifiersAndKey(a+"")]?o[a].push(n):o[a]=[n];return this},r.prototype.unregisterKeys=function(e,t,n){var i,a,o,s=this["keys"+r.capitalize(e)];for(r.isString(t)&&(t=[t]),i=0;i<t.length;i++)if(o=t[i],o=r.modifiersAndKey(o+""),null===n)delete s[o];else if(s[o])for(a=0;a<s[o].length;a++)if(String(s[o][a])===String(n)){s[o].splice(a,1);break}return this},r.prototype.off=function(e){return this.unregisterKeys("down",e,null)},r.prototype.delegate=function(e,t,n){return null!==n||void 0!==n?this.registerKeys(e,t,n):this.unregisterKeys(e,t,n)},r.prototype.down=function(e,t){return this.delegate("down",e,t)},r.prototype.up=function(e,t){return this.delegate("up",e,t)},r.prototype.lastKey=function(e){return e?this.lastModifiers[e]:r.keyName(this.lastKeyCode)},r.prototype.lastModifiersAndKey=function(){var e,t;for(e=[],t=0;t<r.MODIFIERS.length;t++)this.lastKey(r.MODIFIERS[t])&&e.push(r.MODIFIERS[t]);return r.arrayIncludes(e,this.lastKey())||e.push(this.lastKey()),e.join(" ")},t.default=r,e.exports=t.default}})},e.exports=r()},function(e,t,n){var r;window,r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="dist/",n(n.s="./src/clappr-dash-shaka-playback.js")}({"./node_modules/shaka-player/dist/shaka-player.compiled.js":
/*!*****************************************************************!*\
!*** ./node_modules/shaka-player/dist/shaka-player.compiled.js ***!
\*****************************************************************/
/*! no static exports found */function(e,t,n){(function(e,n){!function(){var r="undefined"!=typeof window?window:e,i={};for(var a in function(e,t){var r,i="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){e!=Array.prototype&&e!=Object.prototype&&(e[t]=n.value)},a=void 0!==e&&e===this?this:void 0!==t&&null!=t?t:this;function o(){o=function(){},a.Symbol||(a.Symbol=l)}var s,l=(s=0,function(e){return"jscomp_symbol_"+(e||"")+s++});function u(){o();var e=a.Symbol.iterator;e||(e=a.Symbol.iterator=a.Symbol("iterator")),"function"!=typeof Array.prototype[e]&&i(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return c(this)}}),u=function(){}}function c(e){var t=0;return d((function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}))}function d(e){return u(),(e={next:e})[a.Symbol.iterator]=function(){return this},e}function f(e){u();var t=e[Symbol.iterator];return t?t.call(e):c(e)}function h(e,t){if(t){for(var n=a,r=e.split("."),o=0;o<r.length-1;o++){var s=r[o];s in n||(n[s]={}),n=n[s]}(s=t(o=n[r=r[r.length-1]]))!=o&&null!=s&&i(n,r,{configurable:!0,writable:!0,value:s})}}function p(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise((function(r,i){!function e(a){a.done?r(a.value):Promise.resolve(a.value).then(t,n).then(e,i)}(e.next())}))}(e())}h("Promise",(function(e){function t(e){this.b=0,this.g=void 0,this.a=[];var t=this.c();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.a=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.b=function(e){null==this.a&&(this.a=[],this.f()),this.a.push(e)},n.prototype.f=function(){var e=this;this.c((function(){e.h()}))};var i=a.setTimeout;n.prototype.c=function(e){i(e,0)},n.prototype.h=function(){for(;this.a&&this.a.length;){var e=this.a;this.a=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.g(e)}}}this.a=null},n.prototype.g=function(e){this.c((function(){throw e}))},t.prototype.c=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.s),reject:e(this.f)}},t.prototype.s=function(e){if(e===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.u(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.m(e):this.h(e)}},t.prototype.m=function(e){var t=void 0;try{t=e.then}catch(e){return void this.f(e)}"function"==typeof t?this.B(t,e):this.h(e)},t.prototype.f=function(e){this.i(2,e)},t.prototype.h=function(e){this.i(1,e)},t.prototype.i=function(e,t){if(0!=this.b)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.b);this.b=e,this.g=t,this.l()},t.prototype.l=function(){if(null!=this.a){for(var e=0;e<this.a.length;++e)o.b(this.a[e]);this.a=null}};var o=new n;return t.prototype.u=function(e){var t=this.c();e.cc(t.resolve,t.reject)},t.prototype.B=function(e,t){var n=this.c();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){a(e)}}:t}var i,a,o=new t((function(e,t){i=e,a=t}));return this.cc(r(e,i),r(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.cc=function(e,t){function n(){switch(r.b){case 1:e(r.g);break;case 2:t(r.g);break;default:throw Error("Unexpected state: "+r.b)}}var r=this;null==this.a?o.b(n):this.a.push(n)},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var i=f(e),a=i.next();!a.done;a=i.next())r(a.value).cc(t,n)}))},t.all=function(e){var n=f(e),i=n.next();return i.done?r([]):new t((function(e,t){function a(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,r(i.value).cc(a(o.length-1),t),i=n.next()}while(!i.done)}))},t})),h("Promise.prototype.finally",(function(e){return e||function(e){return this.then((function(t){return Promise.resolve(e()).then((function(){return t}))}),(function(t){return Promise.resolve(e()).then((function(){throw t}))}))}}));var m,g="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)m=Object.setPrototypeOf;else{var y;e:{var v={};try{v.__proto__={Ae:!0},y=v.Ae;break e}catch(s){}y=!1}m=y?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var b=m;function _(e,t){if(e.prototype=g(t.prototype),e.prototype.constructor=e,b)b(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.tg=t.prototype}function A(){this.g=!1,this.c=null,this.o=void 0,this.j=1,this.b=this.f=0,this.i=this.a=null}function E(e){if(e.g)throw new TypeError("Generator is already running");e.g=!0}function T(e,t){e.a={Ld:t,Wd:!0},e.j=e.f||e.b}function w(e,t,n){return e.j=n,{value:t}}function S(e){e.j=0}function k(e,t,n){e.f=t,null!=n&&(e.b=n)}function C(e,t){e.f=0,e.b=t||0}function x(e,t){e.j=t,e.f=0}function R(e){e.f=0;var t=e.a.Ld;return e.a=null,t}function L(e){e.i=[e.a],e.f=0,e.b=0}function I(e,t){var n=e.i.splice(0)[0];(n=e.a=e.a||n)?n.Wd?e.j=e.f||e.b:null!=n.A&&e.b<n.A?(e.j=n.A,e.a=null):e.j=e.b:e.j=t}function P(e){this.a=new A,this.b=e}function j(e,t,n,r){try{var i=t.call(e.a.c,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.a.g=!1,i;var a=i.value}catch(t){return e.a.c=null,T(e.a,t),O(e)}return e.a.c=null,r.call(e.a,a),O(e)}function O(e){for(;e.a.j;)try{var t=e.b(e.a);if(t)return e.a.g=!1,{value:t.value,done:!1}}catch(t){e.a.o=void 0,T(e.a,t)}if(e.a.g=!1,e.a.a){if(t=e.a.a,e.a.a=null,t.Wd)throw t.Ld;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function D(e){this.next=function(t){return E(e.a),e.a.c?t=j(e,e.a.c.next,t,e.a.h):(e.a.h(t),t=O(e)),t},this.throw=function(t){return E(e.a),e.a.c?t=j(e,e.a.c.throw,t,e.a.h):(T(e.a,t),t=O(e)),t},this.return=function(t){return function(e,t){E(e.a);var n=e.a.c;return n?j(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.a.return):(e.a.return(t),O(e))}(e,t)},u(),this[Symbol.iterator]=function(){return this}}function M(e,t){return D.prototype=e.prototype,new D(new P(t))}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var a=e[i];if(t.call(n,a,i,e))return{Td:i,ve:a}}return{Td:-1,ve:void 0}}function F(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}A.prototype.h=function(e){this.o=e},A.prototype.return=function(e){this.a={return:e},this.j=this.b},A.prototype.A=function(e){this.j=e},h("WeakMap",(function(e){function t(e){if(this.a=(s+=Math.random()+1).toString(),e){o(),u(),e=f(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(e){N(e,a)||i(e,a,{value:{}})}function r(e){var t=Object[e];t&&(Object[e]=function(e){return n(e),t(e)})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),r=new e([[t,2],[n,3]]);return 2==r.get(t)&&3==r.get(n)&&(r.delete(t),r.set(n,4),!r.has(t)&&4==r.get(n))}catch(e){return!1}}())return e;var a="$jscomp_hidden_"+Math.random();r("freeze"),r("preventExtensions"),r("seal");var s=0;return t.prototype.set=function(e,t){if(n(e),!N(e,a))throw Error("WeakMap key fail: "+e);return e[a][this.a]=t,this},t.prototype.get=function(e){return N(e,a)?e[a][this.a]:void 0},t.prototype.has=function(e){return N(e,a)&&N(e[a],this.a)},t.prototype.delete=function(e){return!(!N(e,a)||!N(e[a],this.a))&&delete e[a][this.a]},t})),h("Map",(function(e){function t(){var e={};return e.Fa=e.next=e.head=e}function n(e,t){var n=e.a;return d((function(){if(n){for(;n.head!=e.a;)n=n.Fa;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function r(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++s,a.set(t,n)):n="p_"+t;var r=e.b[n];if(r&&N(e.b,n))for(var i=0;i<r.length;i++){var o=r[i];if(t!=t&&o.key!=o.key||t===o.key)return{id:n,list:r,index:i,X:o}}return{id:n,list:r,index:-1,X:void 0}}function i(e){if(this.b={},this.a=t(),this.size=0,e){e=f(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(f([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&"s"==i.value[1]&&!((i=r.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!r.next().done)}catch(e){return!1}}())return e;o(),u();var a=new WeakMap;i.prototype.set=function(e,t){var n=r(this,e);return n.list||(n.list=this.b[n.id]=[]),n.X?n.X.value=t:(n.X={next:this.a,Fa:this.a.Fa,head:this.a,key:e,value:t},n.list.push(n.X),this.a.Fa.next=n.X,this.a.Fa=n.X,this.size++),this},i.prototype.delete=function(e){return!(!(e=r(this,e)).X||!e.list||(e.list.splice(e.index,1),e.list.length||delete this.b[e.id],e.X.Fa.next=e.X.next,e.X.next.Fa=e.X.Fa,e.X.head=null,this.size--,0))},i.prototype.clear=function(){this.b={},this.a=this.a.Fa=t(),this.size=0},i.prototype.has=function(e){return!!r(this,e).X},i.prototype.get=function(e){return(e=r(this,e).X)&&e.value},i.prototype.entries=function(){return n(this,(function(e){return[e.key,e.value]}))},i.prototype.keys=function(){return n(this,(function(e){return e.key}))},i.prototype.values=function(){return n(this,(function(e){return e.value}))},i.prototype.forEach=function(e,t){for(var n,r=this.entries();!(n=r.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var s=0;return i})),h("Set",(function(e){function t(e){if(this.a=new Map,e){e=f(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.a.size}return function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(f([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&i.value[1]==t&&!(i=r.next()).done&&i.value[0]!=t&&4==i.value[0].x&&i.value[1]==i.value[0]&&r.next().done}catch(e){return!1}}()?e:(o(),u(),t.prototype.add=function(e){return this.a.set(e,e),this.size=this.a.size,this},t.prototype.delete=function(e){return e=this.a.delete(e),this.size=this.a.size,e},t.prototype.clear=function(){this.a.clear(),this.size=0},t.prototype.has=function(e){return this.a.has(e)},t.prototype.entries=function(){return this.a.entries()},t.prototype.values=function(){return this.a.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.a.forEach((function(r){return e.call(t,r,r,n)}))},t)})),h("Array.prototype.findIndex",(function(e){return e||function(e,t){return U(this,e,t).Td}})),h("Array.prototype.keys",(function(e){return e||function(){return function(e,t){u(),e instanceof String&&(e+="");var n=0,r={next:function(){if(n<e.length){var i=n++;return{value:t(i,e[i]),done:!1}}return r.next=function(){return{done:!0,value:void 0}},r.next()}};return r[Symbol.iterator]=function(){return r},r}(this,(function(e){return e}))}})),h("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),h("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length,i=t||0;for(0>i&&(i=Math.max(i+r,0));i<r;i++){var a=n[i];if(a===e||Object.is(a,e))return!0}return!1}})),h("String.prototype.includes",(function(e){return e||function(e,t){return-1!==F(this,e,"includes").indexOf(e,t||0)}})),h("Array.from",(function(e){return e||function(e,t,n){u(),t=null!=t?t:function(e){return e};var r=[],i=e[Symbol.iterator];if("function"==typeof i)for(e=i.call(e);!(i=e.next()).done;)r.push(t.call(n,i.value));else{i=e.length;for(var a=0;a<i;a++)r.push(t.call(n,e[a]))}return r}})),h("String.prototype.startsWith",(function(e){return e||function(e,t){for(var n=F(this,e,"startsWith"),r=n.length,i=e.length,a=Math.max(0,Math.min(0|t,n.length)),o=0;o<i&&a<r;)if(n[a++]!=e[o++])return!1;return o>=i}})),h("Array.prototype.find",(function(e){return e||function(e,t){return U(this,e,t).ve}}));var B="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)N(r,i)&&(e[i]=r[i])}return e};h("Object.assign",(function(e){return e||B}));var K=this;function V(e,t){var n,r=e.split("."),i=K;r[0]in i||!i.execScript||i.execScript("var "+r[0]);for(;r.length&&(n=r.shift());)r.length||void 0===t?i=i[n]?i[n]:i[n]={}:i[n]=t}function G(e,t){function n(){}n.prototype=t.prototype,e.tg=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.Eg=function(e,n,r){return t.prototype[n].apply(e,Array.prototype.slice.call(arguments,2))}}function H(e){this.c=Math.exp(Math.log(.5)/e),this.b=this.a=0}function Y(e,t,n){var r=Math.pow(e.c,t);n=n*(1-r)+r*e.a,isNaN(n)||(e.a=n,e.b+=t)}function z(e){return e.a/(1-Math.pow(e.c,e.b))}function W(){this.b=new H(2),this.c=new H(5),this.a=0}function $(){}function q(){}function X(){}K.a=!0,W.prototype.getBandwidthEstimate=function(e){return 128e3>this.a?e:Math.min(z(this.b),z(this.c))},e.console&&e.console.log.bind&&(q=console.warn.bind(console),$=console.error.bind(console));var J=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Q(e){var t;e instanceof Q?(Z(this,e.ta),this.bb=e.bb,this.sa=e.sa,ee(this,e.Ab),this.ja=e.ja,te(this,e.a.clone()),this.Sa=e.Sa):e&&(t=String(e).match(J))?(Z(this,t[1]||"",!0),this.bb=ne(t[2]||""),this.sa=ne(t[3]||"",!0),ee(this,t[4]),this.ja=ne(t[5]||"",!0),te(this,t[6]||"",!0),this.Sa=ne(t[7]||"")):this.a=new ce(null)}function Z(e,t,n){e.ta=n?ne(t,!0):t,e.ta&&(e.ta=e.ta.replace(/:$/,""))}function ee(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Ab=t}else e.Ab=null}function te(e,t,n){t instanceof ce?e.a=t:(n||(t=re(t,le)),e.a=new ce(t))}function ne(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function re(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,ie),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ie(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(r=Q.prototype).ta="",r.bb="",r.sa="",r.Ab=null,r.ja="",r.Sa="",r.toString=function(){var e=[],t=this.ta;if(t&&e.push(re(t,ae,!0),":"),t=this.sa){e.push("//");var n=this.bb;n&&e.push(re(n,ae,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Ab)&&e.push(":",String(t))}return(t=this.ja)&&(this.sa&&"/"!=t.charAt(0)&&e.push("/"),e.push(re(t,"/"==t.charAt(0)?se:oe,!0))),(t=this.a.toString())&&e.push("?",t),(t=this.Sa)&&e.push("#",re(t,ue)),e.join("")},r.resolve=function(e){var t=this.clone();"data"===t.ta&&(t=new Q);var n=!!e.ta;n?Z(t,e.ta):n=!!e.bb,n?t.bb=e.bb:n=!!e.sa,n?t.sa=e.sa:n=null!=e.Ab;var r=e.ja;if(n)ee(t,e.Ab);else if(n=!!e.ja){if("/"!=r.charAt(0))if(this.sa&&!this.ja)r="/"+r;else{var i=t.ja.lastIndexOf("/");-1!=i&&(r=t.ja.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o<r.length;){var s=r[o++];"."==s?i&&o==r.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),i&&o==r.length&&a.push("")):(a.push(s),i=!0)}r=a.join("/")}}return n?t.ja=r:n=""!==e.a.toString(),n?te(t,e.a.clone()):n=!!e.Sa,n&&(t.Sa=e.Sa),t},r.clone=function(){return new Q(this)};var ae=/[#\/\?@]/g,oe=/[#\?:]/g,se=/[#\?]/g,le=/[#\?@]/g,ue=/#/g;function ce(e){this.a=e||null}function de(e){this.b=e,this.a=null}function fe(e){this.b=e,this.a=null}function he(e,t){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0};this.i=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.f=null==e.baseDelay?n.baseDelay:e.baseDelay,this.h=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.g=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.a=0,this.b=this.f,(this.c=void 0!==t&&t)&&(this.a=1)}function pe(e){return p((function t(){var n,r;return M(t,(function(t){switch(t.j){case 1:if(e.a>=e.i){if(!e.c)return t.return(Promise.reject());e.a=1,e.b=e.f}return n=e.a,e.a++,0==n?t.return():(r=e.b*(1+(2*Math.random()-1)*e.h),w(t,new Promise((function(e){new fe(e).R(r/1e3)})),2));case 2:e.b*=e.g,S(t)}}))}))}function me(e,t,n,r){for(var i=[],a=3;a<arguments.length;++a)i[a-3]=arguments[a];this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1}function ge(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function ye(e,t){this.promise=e,this.Zd=t,this.a=!1}function ve(e){return new ye(Promise.reject(e),(function(){return Promise.resolve()}))}function be(){var e=Promise.reject(new me(2,7,7001));return e.catch((function(){})),new ye(e,(function(){return Promise.resolve()}))}function _e(e){return new ye(Promise.resolve(e),(function(){return Promise.resolve()}))}function Ae(e){return new ye(e,(function(){return e.catch((function(){}))}))}function Ee(e){return new ye(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function Te(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then((function(){})).catch((function(){}))})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}function we(t,n){for(var r in n=void 0===n?{}:n)this[r]=n[r];this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.a=!1}function Se(){this.a={}}function ke(){this.Jc=new Se,this.$b=this}function Ce(e){var t=new Set;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var r=n.constructor==Array;if(n.constructor!=Object&&!r)return null;t.add(n);var i,a=r?[]:{};for(i in n)a[i]=e(n[i]);return r&&(a.length=n.length),a}}(e)}function xe(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function Re(e,t){var n=e.indexOf(t);-1<n&&e.splice(n,1)}function Le(e,t,n){if(n||(n=xe),e.length!=t.length)return!1;t=t.slice();for(var r={},i=(e=f(e)).next();!i.done;r={item:r.item},i=e.next()){if(r.item=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.item,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function Ie(){this.a=[]}function Pe(e,t){e.a.push(t.finally((function(){Re(e.a,t)})))}function je(e){ke.call(this),this.f=!1,this.g=new Ie,this.a=new Set,this.b=new Set,this.c=e||null}(r=ce.prototype).ha=null,r.fc=null,r.add=function(e,t){if(!this.ha&&(this.ha={},this.fc=0,this.a))for(var n=this.a.split("&"),r=0;r<n.length;r++){var i=n[r].indexOf("="),a=null;if(0<=i){var o=n[r].substring(0,i);a=n[r].substring(i+1)}else o=n[r];o=decodeURIComponent(o.replace(/\+/g," ")),a=a||"",this.add(o,decodeURIComponent(a.replace(/\+/g," ")))}return this.a=null,(n=this.ha.hasOwnProperty(e)&&this.ha[e])||(this.ha[e]=n=[]),n.push(t),this.fc++,this},r.toString=function(){if(this.a)return this.a;if(!this.ha)return"";var e,t=[];for(e in this.ha)for(var n=encodeURIComponent(e),r=this.ha[e],i=0;i<r.length;i++){var a=n;""!==r[i]&&(a+="="+encodeURIComponent(r[i])),t.push(a)}return this.a=t.join("&")},r.clone=function(){var e=new ce;if(e.a=this.a,this.ha){var t,n={};for(t in this.ha)n[t]=this.ha[t].concat();e.ha=n,e.fc=this.fc}return e},de.prototype.R=function(t){var n=this;this.stop();var r=!0,i=null;return this.a=function(){e.clearTimeout(i),r=!1},i=e.setTimeout((function(){r&&n.b()}),1e3*t),this},de.prototype.stop=function(){this.a&&(this.a(),this.a=null)},V("shaka.util.Timer",fe),fe.prototype.yc=function(){return this.stop(),this.b(),this},fe.prototype.tickNow=fe.prototype.yc,fe.prototype.R=function(e){var t=this;return this.stop(),this.a=new de((function(){t.b()})).R(e),this},fe.prototype.tickAfter=fe.prototype.R,fe.prototype.Na=function(e){var t=this;return this.stop(),this.a=new de((function(){t.a.R(e),t.b()})).R(e),this},fe.prototype.tickEvery=fe.prototype.Na,fe.prototype.stop=function(){this.a&&(this.a.stop(),this.a=null)},fe.prototype.stop=fe.prototype.stop,V("shaka.util.Error",me),me.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},me.Severity={RECOVERABLE:1,CRITICAL:2},me.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9},me.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013},ge.prototype.resolve=function(){},ge.prototype.reject=function(){},V("shaka.util.AbortableOperation",ye),ye.failed=ve,ye.aborted=be,ye.completed=_e,ye.notAbortable=Ae,ye.prototype.abort=function(){return this.a=!0,this.Zd()},ye.prototype.abort=ye.prototype.abort,ye.all=Ee,ye.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},ye.prototype.finally=ye.prototype.finally,ye.prototype.U=function(e,t){function n(){return i.reject(new me(2,7,7001)),r.abort()}var r=this,i=new ge;return this.promise.then((function(t){r.a?i.reject(new me(2,7,7001)):e?n=Te(e,t,i):i.resolve(t)}),(function(e){t?n=Te(t,e,i):i.reject(e)})),new ye(i,(function(){return n()}))},ye.prototype.chain=ye.prototype.U,we.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},we.prototype.stopImmediatePropagation=function(){this.a=!0},we.prototype.stopPropagation=function(){},(r=Se.prototype).push=function(e,t){this.a.hasOwnProperty(e)?this.a[e].push(t):this.a[e]=[t]},r.get=function(e){return(e=this.a[e])?e.slice():null},r.getAll=function(){var e,t=[];for(e in this.a)t.push.apply(t,this.a[e]);return t},r.remove=function(e,t){var n=this.a[e];if(n)for(var r=0;r<n.length;++r)n[r]==t&&(n.splice(r,1),--r)},r.forEach=function(e){for(var t in this.a)e(t,this.a[t])},ke.prototype.addEventListener=function(e,t){this.Jc.push(e,t)},ke.prototype.removeEventListener=function(e,t){this.Jc.remove(e,t)},ke.prototype.dispatchEvent=function(e){for(var t=this.Jc.get(e.type)||[],n=0;n<t.length;++n){e.target=this.$b,e.currentTarget=this.$b;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(e){}if(e.a)break}return e.defaultPrevented},Ie.prototype.destroy=function(){var e=[];return this.a.forEach((function(t){t.promise.catch((function(){})),e.push(t.abort())})),this.a=[],Promise.all(e)},G(je,ke),V("shaka.net.NetworkingEngine",je),je.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4},je.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Oe={};function De(e,t,n){n=n||3;var r=Oe[e];(!r||n>=r.priority)&&(Oe[e]={priority:n,Rf:t})}function Me(e,t){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null}}function Ne(){this.a=0}function Ue(e,t,n){ye.call(this,e,t),this.b=n}function Fe(){}function Be(){this.a=new Se}function Ke(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.a=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!n.has(e)})),function(e){var t=Ve;if(null==t){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch(e){t=!1}Ve=t}return t||!1}(e)?t:t.capture||!1}(e,r),this.target.addEventListener(t,n,this.a)}je.registerScheme=De,je.unregisterScheme=function(e){delete Oe[e]},je.prototype.Tf=function(e){this.a.add(e)},je.prototype.registerRequestFilter=je.prototype.Tf,je.prototype.vg=function(e){this.a.delete(e)},je.prototype.unregisterRequestFilter=je.prototype.vg,je.prototype.Ie=function(){this.a.clear()},je.prototype.clearAllRequestFilters=je.prototype.Ie,je.prototype.Uf=function(e){this.b.add(e)},je.prototype.registerResponseFilter=je.prototype.Uf,je.prototype.wg=function(e){this.b.delete(e)},je.prototype.unregisterResponseFilter=je.prototype.wg,je.prototype.Je=function(){this.b.clear()},je.prototype.clearAllResponseFilters=je.prototype.Je,je.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0}},je.makeRequest=Me,je.prototype.destroy=function(){return this.f=!0,this.a.clear(),this.b.clear(),this.g.destroy()},je.prototype.destroy=je.prototype.destroy,je.prototype.request=function(e,t){var n=this,r=new Ne;if(this.f){var i=Promise.reject(new me(2,7,7001));return i.catch((function(){})),new Ue(i,(function(){return Promise.resolve()}),r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Ce(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},t.uris=Ce(t.uris);var a=(i=function(e,t,n){for(var r=_e(void 0),i={},a=(e=f(e.a)).next();!a.done;i={qd:i.qd},a=e.next())i.qd=a.value,r=r.U(function(e){return function(){return e.qd(t,n)}}(i));return r.U(void 0,(function(e){if(e&&7001==e.code)throw e;throw new me(2,1,1006,e)}))}(this,e,t)).U((function(){return function e(t,n,r,i,a,o,s){var l=new Q(r.uris[a]),u=l.ta,c=!1;u||(u=(u=location.protocol).slice(0,-1),Z(l,u),r.uris[a]=l.toString()),u=u.toLowerCase();var d,f=(u=Oe[u])?u.Rf:null;return f?Ae(pe(i)).U((function(){return t.f?be():(d=Date.now(),f(r.uris[a],r,n,(function(e,r,i){t.c&&1==n&&(t.c(e,r),c=!0,s.a=i)})))})).U((function(e){return null==e.timeMs&&(e.timeMs=Date.now()-d),{response:e,qf:c}}),(function(l){if(l&&7001==l.code)throw l;if(t.f)return be();if(l&&1==l.severity)return t.dispatchEvent(new we("retry",{error:l instanceof me?l:null})),a=(a+1)%r.uris.length,e(t,n,r,i,a,l,s);throw l||o})):ve(new me(2,1,1e3,l))}(n,e,t,new he(t.retryParameters,!1),0,null,r)})),o=a.U((function(t){return function(e,t,n){for(var r=_e(void 0),i=(e=f(e.b)).next();!i.done;i=e.next())r=r.U(i.value.bind(null,t,n.response));return r.U((function(){return n}),(function(e){if(e&&7001==e.code)throw e;var t=2;throw e instanceof me&&(t=e.severity),new me(t,1,1007,e)}))}(n,e,t)})),s=Date.now(),l=0;i.promise.then((function(){l=Date.now()-s}),(function(){}));var u=0;return a.promise.then((function(){u=Date.now()}),(function(){})),i=new Ue((i=o.U((function(t){var r=Date.now()-u,i=t.response;return i.timeMs+=l,i.timeMs+=r,t.qf||!n.c||i.fromCache||1!=e||n.c(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}))).promise,i.Zd,r),Pe(this.g,i),i},je.prototype.request=je.prototype.request,je.NumBytesRemainingClass=Ne,_(Ue,ye),je.PendingRequest=Ue,Ue.all=Ee,Ue.notAbortable=Ae,Ue.completed=_e,Ue.aborted=be,Ue.failed=ve,V("shaka.util.IReleasable",Fe),Fe.prototype.release=function(){},V("shaka.util.EventManager",Be),Be.prototype.release=function(){this.$a(),this.a=null},Be.prototype.release=Be.prototype.release,Be.prototype.w=function(e,t,n,r){this.a&&(e=new Ke(e,t,n,r),this.a.push(t,e))},Be.prototype.listen=Be.prototype.w,Be.prototype.da=function(e,t,n,r){var i=this;this.w(e,t,(function r(a){i.ea(e,t,r),n(a)}),r)},Be.prototype.listenOnce=Be.prototype.da,Be.prototype.ea=function(e,t,n){if(this.a)for(var r=this.a.get(t)||[],i=(r=f(r)).next();!i.done;i=r.next())(i=i.value).target!=e||n!=i.listener&&n||(i.ea(),this.a.remove(t,i))},Be.prototype.unlisten=Be.prototype.ea,Be.prototype.$a=function(){if(this.a){for(var e=this.a.getAll(),t=(e=f(e)).next();!t.done;t=e.next())t.value.ea();this.a.a={}}},Be.prototype.removeAll=Be.prototype.$a,Ke.prototype.ea=function(){this.target.removeEventListener(this.type,this.listener,this.a),this.listener=this.target=null,this.a=!1},Ke.prototype.unlisten=Ke.prototype.ea;var Ve=void 0;function Ge(e){if(e=new Uint8Array(e),new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");return new Q(e=st(e.subarray(4),!0)).sa}function He(e,t,n){function r(e){new DataView(a.buffer).setUint32(o,e.byteLength,!0),o+=4,i(e)}function i(e){a.set(e,o),o+=e.byteLength}if(!n||!n.byteLength)throw new me(2,6,6015);t="string"==typeof t?new Uint8Array(ct(t,!0)):new Uint8Array(t);var a=new Uint8Array(8+e.byteLength+t.byteLength+n.byteLength),o=0;return i(new Uint8Array(e)),r(t),r(new Uint8Array(n)),a}function Ye(e,t){for(var n=[],r=f(e),i=r.next();!i.done;i=r.next())n.push(t(i.value));return n}function ze(e,t){for(var n=f(e),r=n.next();!r.done;r=n.next())if(!t(r.value))return!1;return!0}function We(e){var t=new Map;return Object.keys(e).forEach((function(n){t.set(n,e[n])})),t}function $e(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function qe(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function Xe(e){var t=(e=e.split("."))[0];return e.pop(),[t,e.join(".")]}V("shaka.util.FairPlayUtils.defaultGetContentId",Ge),V("shaka.util.FairPlayUtils.initDataTransform",He);var Je=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Qe(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function Ze(e){return""!=rt().canPlayType(e)}function et(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!nt("Tizen")}function tt(){if(!et())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function nt(e){return(navigator.userAgent||"").includes(e)}function rt(){return at||(it||(it=new fe((function(){at=null}))),(at=document.querySelector("video")||document.querySelector("audio"))||(at=document.createElement("video")),it.R(1),at)}var it=null,at=null;function ot(e){if(!e)return"";239==(e=new Uint8Array(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),e=dt(e),e=escape(e);try{return decodeURIComponent(e)}catch(e){throw new me(2,2,2004)}}function st(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new me(2,2,2004);if(e instanceof ArrayBuffer)var r=e;else(n=new Uint8Array(e.byteLength)).set(new Uint8Array(e)),r=n.buffer;e=Math.floor(e.byteLength/2),n=new Uint16Array(e),r=new DataView(r);for(var i=0;i<e;i++)n[i]=r.getUint16(2*i,t);return dt(n)}function lt(e){var t=new Uint8Array(e);if(239==t[0]&&187==t[1]&&191==t[2])return ot(t);if(254==t[0]&&255==t[1])return st(t.subarray(2),!1);if(255==t[0]&&254==t[1])return st(t.subarray(2),!0);var n=function(e,t){return e.byteLength<=t||32<=e[t]&&126>=e[t]}.bind(null,t);if(0==t[0]&&0==t[2])return st(e,!1);if(0==t[1]&&0==t[3])return st(e,!0);if(n(0)&&n(1)&&n(2)&&n(3))return ot(e);throw new me(2,2,2003)}function ut(e){e=encodeURIComponent(e),e=unescape(e);for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t.buffer}function ct(e,t){for(var n=new Uint8Array(2*e.length),r=new DataView(n.buffer),i=0;i<e.length;++i)r.setUint16(2*i,e.charCodeAt(i),t);return n.buffer}function dt(e){if(!ft)for(var t=function(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}},n={size:65536};0<n.size;(n={size:n.size}).size/=2)if(t(n.size)){ft=function(e){return function(t){for(var n="",r=0;r<t.length;r+=e.size)n+=String.fromCharCode.apply(null,t.subarray(r,r+e.size));return n}}(n);break}return ft(e)}V("shaka.util.StringUtils.fromUTF8",ot),V("shaka.util.StringUtils.fromUTF16",st),V("shaka.util.StringUtils.fromBytesAutoDetect",lt),V("shaka.util.StringUtils.toUTF8",ut),V("shaka.util.StringUtils.toUTF16",ct);var ft=null;V("shaka.util.StringUtils.resetFromCharCode",(function(){ft=null}));var ht={zc:function(t,n){var r=dt(t);return n=null==n||n,r=e.btoa(r).replace(/\+/g,"-").replace(/\//g,"_"),n?r:r.replace(/=*$/,"")}};function pt(e){var t=this;this.B=e,this.u=new Set,this.h=this.l=null,this.S=!1,this.K=0,this.a=null,this.i=new Be,this.b=new Map,this.s=[],this.m=new ge,this.f=null,this.g=function(n){t.m.reject(n),e.onError(n)},this.pa=new Map,this.W=new Map,this.O=new fe((function(){return function(e){var t=e.pa,n=e.W;n.clear(),t.forEach((function(e,t){return n.set(t,e)})),(t=Array.from(n.values())).length&&t.every((function(e){return"expired"==e}))&&e.g(new me(2,6,6014)),e.B.qc($e(n))}(t)})),this.c=!1,this.na=new ge,this.D=!1,this.F=[],this.oa=!1,this.$=new fe((function(){!function(e){e.b.forEach((function(t,n){var r=t.hd,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.B.onExpirationUpdated(n.sessionId,i),t.hd=i)}))}(t)})).Na(1),this.m.catch((function(){}))}function mt(e,t,n){return e.s=n,e.D=0<n.length,gt(e,t)}function gt(t,n){var r=function(t){if(0==(t=We(t.f.clearKeys)).size)return null;var n=[],r=[];t.forEach((function(e,t){var i=ht.Qc(t),a=ht.Qc(e);i={kty:"oct",kid:ht.zc(i,!1),k:ht.zc(a,!1)},n.push(i),r.push(i.kid)})),t=JSON.stringify({keys:n});var i=JSON.stringify({kids:r});return i=[{initData:new Uint8Array(ut(i)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:i,keyIds:[]}}(t);if(r)for(var i=f(n),a=i.next();!a.done;a=i.next())a.value.drmInfos=[r];for((r=n.some((function(e){return 0<e.drmInfos.length})))||function(e,t){var n=[];t.forEach((function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})}));for(var r=f(e),i=r.next();!i.done;i=r.next())i.value.drmInfos=n}(n,a=We(t.f.servers)),a=(i=f(n)).next();!a.done;a=i.next())for(var o=(a=f(a.value.drmInfos)).next();!o.done;o=a.next())jt(o.value,We(t.f.servers),We(t.f.advanced||{}));return(a=function(e,t){for(var n=new Set,r=f(t),i=r.next();!i.done;i=r.next()){var a=f(i.value.drmInfos);for(i=a.next();!i.done;i=a.next())n.add(i.value)}for(r=f(n),i=r.next();!i.done;i=r.next())jt(i.value,We(e.f.servers),We(e.f.advanced||{}));a=e.D?"required":"optional";var o=e.D?["persistent-license"]:["temporary"];for(r=new Map,n=f(n),i=n.next();!i.done;i=n.next())i=i.value,r.set(i.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:a,sessionTypes:o,label:i.keySystem,drmInfos:[]});for(n=f(t),i=n.next();!i.done;i=n.next()){i=i.value,a=i.audio,o=i.video;var s=a?qe(a.mimeType,a.codecs):"",l=o?qe(o.mimeType,o.codecs):"",u=f(i.drmInfos);for(i=u.next();!i.done;i=u.next()){i=i.value;var c=r.get(i.keySystem);c.drmInfos.push(i),i.distinctiveIdentifierRequired&&(c.distinctiveIdentifier="required"),i.persistentStateRequired&&(c.persistentState="required"),a&&c.audioCapabilities.push({robustness:i.audioRobustness||"",contentType:s}),o&&c.videoCapabilities.push({robustness:i.videoRobustness||"",contentType:l})}}return r}(t,n)).size?(a=Tt(t,a),r?a:a.catch((function(){}))):(t.S=!0,Promise.resolve())}function yt(e){return p((function t(){var n;return M(t,(function(t){switch(t.j){case 1:if(!(e.l&&e.a&&e.a.serverCertificate&&e.a.serverCertificate.length)){t.A(0);break}return k(t,3),w(t,e.l.setServerCertificate(e.a.serverCertificate),5);case 5:x(t,0);break;case 3:return n=R(t),t.return(Promise.reject(new me(2,6,6004,n.message)))}}))}))}function vt(e){var t=e.a?e.a.initData:[];return t.forEach((function(t){return St(e,t.initDataType,t.initData)})),e.s.forEach((function(t){return wt(e,t)})),t.length||e.s.length||e.m.resolve(),e.m}function bt(e,t,n){for(var r=e.b.values(),i=(r=f(r)).next();!i.done;i=r.next())if(ht.za(n,i.value.initData)&&!nt("Tizen 2"))return;St(e,t,n)}function _t(e){return e?e.keySystem:""}function At(e,t){return!!nt("Edge/")||e.u.has(t)}function Et(e){return e=Ye(e=e.b.keys(),(function(e){return e.sessionId})),Array.from(e)}function Tt(e,t){if(1==t.size&&t.has(""))return Promise.reject(new me(2,6,6e3));for(var n=f(t.values()),r=n.next();!r.done;r=n.next())0==(r=r.value).audioCapabilities.length&&delete r.audioCapabilities,0==r.videoCapabilities.length&&delete r.videoCapabilities;var i=n=new ge;return[!0,!1].forEach(function(e){var n=this;t.forEach((function(t,r){t.drmInfos.some((function(e){return!!e.licenseServerUri}))==e&&(i=i.catch(function(){if(!this.c)return navigator.requestMediaKeySystemAccess(r,[t])}.bind(n)))}))}.bind(e)),i=(i=i.catch((function(){return Promise.reject(new me(2,6,6001))}))).then(function(e){if(this.c)return Promise.reject();this.u.clear();var n=e.getConfiguration(),r=n.videoCapabilities||[],i=f(n.audioCapabilities||[]);for(n=i.next();!n.done;n=i.next())this.u.add(n.value.contentType);for(n=(r=f(r)).next();!n.done;n=r.next())this.u.add(n.value.contentType);r=e.keySystem,i=[];var a=[],o=[],s=[];return function(e,t,n,r,i){e.forEach((function(e){if(t.includes(e.licenseServerUri)||t.push(e.licenseServerUri),e.serverCertificate&&(n.some((function(t){return ht.za(t,e.serverCertificate)}))||n.push(e.serverCertificate)),e.initData&&e.initData.forEach((function(e){r.some((function(t){return!(!t.keyId||t.keyId!=e.keyId)||t.initDataType==e.initDataType&&ht.za(t.initData,e.initData)}))||r.push(e)})),e.keyIds)for(var a=0;a<e.keyIds.length;++a)i.includes(e.keyIds[a])||i.push(e.keyIds[a])}))}((n=t.get(e.keySystem)).drmInfos,i,a,o,s),this.a={keySystem:r,licenseServerUri:i[0],distinctiveIdentifierRequired:"required"==n.distinctiveIdentifier,persistentStateRequired:"required"==n.persistentState,audioRobustness:(n.audioCapabilities?n.audioCapabilities[0].robustness:"")||"",videoRobustness:(n.videoCapabilities?n.videoCapabilities[0].robustness:"")||"",serverCertificate:a[0],initData:o,keyIds:s},this.a.licenseServerUri?e.createMediaKeys():Promise.reject(new me(2,6,6012,this.a.keySystem))}.bind(e)).then(function(e){if(this.c)return Promise.reject();this.l=e,this.S=!0}.bind(e)).catch(function(e){if(!this.c)return this.a=null,this.u.clear(),e instanceof me?Promise.reject(e):Promise.reject(new me(2,6,6002,e.message))}.bind(e)),n.reject(),i}function wt(e,t){try{var n=e.l.createSession("persistent-license")}catch(t){var r=new me(2,6,6005,t.message);return e.g(r),Promise.reject(r)}e.i.w(n,"message",e.fe.bind(e)),e.i.w(n,"keystatuseschange",e.de.bind(e));var i={initData:null,loaded:!1,hd:1/0,ya:null};return e.b.set(n,i),n.load(t).then(function(e){return this.c?Promise.reject():e?(i.loaded=!0,Pt(this)&&this.m.resolve(),n):(this.b.delete(n),void this.g(new me(2,6,6013)))}.bind(e),function(e){this.c||(this.b.delete(n),this.g(new me(2,6,6005,e.message)))}.bind(e))}function St(e,t,n){try{var r=e.D?e.l.createSession("persistent-license"):e.l.createSession()}catch(t){return void e.g(new me(2,6,6005,t.message))}e.i.w(r,"message",e.fe.bind(e)),e.i.w(r,"keystatuseschange",e.de.bind(e)),e.b.set(r,{initData:n,loaded:!1,hd:1/0,ya:null});try{n=e.f.initDataTransform(n,e.a)}catch(n){return t=n,n instanceof me||(t=new me(2,6,6016,n)),void e.g(t)}r.generateRequest(t,n.buffer).catch((function(t){if(!e.c){if(e.b.delete(r),t.errorCode&&t.errorCode.systemCode){var n=t.errorCode.systemCode;0>n&&(n+=Math.pow(2,32)),n="0x"+n.toString(16)}e.g(new me(2,6,6006,t.message,t,n))}}))}function kt(e,t){if(_t(t).startsWith("com.apple.fps")){var n=t.serverCertificate;e=He(e,Ge(e),n)}return e}function Ct(e,t){var n=t.target,r=e.b.get(n),i=e.a.licenseServerUri,a=e.f.advanced[e.a.keySystem];"individualization-request"==t.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),(i=Me([i],e.f.retryParameters)).body=t.message,i.method="POST",i.licenseRequestType=t.messageType,i.sessionId=n.sessionId,"com.microsoft.playready"!=e.a.keySystem&&"com.chromecast.playready"!=e.a.keySystem||function(e){var t=st(e.body,!0,!0);if(t.includes("PlayReadyKeyMessage")){for(var n=(t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader"),r=0;r<n.length;++r)e.headers[n[r].querySelector("name").textContent]=n[r].querySelector("value").textContent;e.body=ht.Ba(t.querySelector("Challenge").textContent).buffer}else e.headers["Content-Type"]="text/xml; charset=utf-8"}(i),e.a.keySystem.startsWith("com.apple.fps")&&e.f.fairPlayTransform&&function(e){var t=new Uint8Array(e.body);t="spc="+ht.zc(t),e.headers["Content-Type"]="application/x-www-form-urlencoded",e.body=ut(t)}(i);var o=Date.now();e.B.ub.request(2,i).promise.then(function(e){return this.c?Promise.reject():(this.a.keySystem.startsWith("com.apple.fps")&&this.f.fairPlayTransform&&function(e){try{var t=ot(e.data)}catch(e){return}"<ckc>"===(t=t.trim()).substr(0,5)&&"</ckc>"===t.substr(-6)&&(t=t.slice(5,-6));try{t=JSON.parse(t).ckc}catch(e){}e.data=ht.Ba(t).buffer}(e),this.K+=(Date.now()-o)/1e3,n.update(e.data).then(function(){var e=this;this.B.onEvent(new we("drmsessionupdate")),r&&(r.ya&&r.ya.resolve(),new fe((function(){r.loaded=!0,Pt(e)&&e.m.resolve()})).R(Ot))}.bind(this)))}.bind(e),function(e){this.c||(e=new me(2,6,6007,e),this.g(e),r&&r.ya&&r.ya.reject(e))}.bind(e)).catch(function(e){this.c||(e=new me(2,6,6008,e.message),this.g(e),r&&r.ya&&r.ya.reject(e))}.bind(e))}function xt(){var e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],t=[{videoCapabilities:e,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:e}],n=new Map;return e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").map((function(e){return function(e){return p((function r(){var i,a,o;return M(r,(function(r){switch(r.j){case 1:return k(r,2),w(r,navigator.requestMediaKeySystemAccess(e,t),4);case 4:return i=r.o,o=!!(a=i.getConfiguration().sessionTypes)&&a.includes("persistent-license"),nt("Tizen 3")&&(o=!1),n.set(e,{persistentState:o}),w(r,i.createMediaKeys(),5);case 5:x(r,0);break;case 2:R(r),n.set(e,null),S(r)}}))}))}(e)})),Promise.all(e).then((function(){return $e(n)}))}function Rt(e,t){var n=t.audio,r=t.video;if(n&&n.encrypted&&!At(e,qe(n.mimeType,n.codecs))||r&&r.encrypted&&!At(e,qe(r.mimeType,r.codecs)))return!1;var i=_t(e.a);return 0==t.drmInfos.length||t.drmInfos.some((function(e){return e.keySystem==i}))}function Lt(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],r=0;r<e.length;r++)for(var i=0;i<t.length;i++)if(e[r].keySystem==t[i].keySystem){var a=e[r];i=t[i];var o=[];o=(o=o.concat(a.initData||[])).concat(i.initData||[]);var s=[];s=(s=s.concat(a.keyIds)).concat(i.keyIds),n.push({keySystem:a.keySystem,licenseServerUri:a.licenseServerUri||i.licenseServerUri,distinctiveIdentifierRequired:a.distinctiveIdentifierRequired||i.distinctiveIdentifierRequired,persistentStateRequired:a.persistentStateRequired||i.persistentStateRequired,videoRobustness:a.videoRobustness||i.videoRobustness,audioRobustness:a.audioRobustness||i.audioRobustness,serverCertificate:a.serverCertificate||i.serverCertificate,initData:o,keyIds:s});break}return n}function It(e){return p((function t(){var n;return M(t,(function(t){switch(t.j){case 1:return n=Array.from(e.b.keys()),e.b.clear(),w(t,Promise.all(n.map((function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return k(t,2),w(t,Promise.all([e.close(),e.closed]),4);case 4:x(t,0);break;case 2:R(t),S(t)}}))}))}))),0)}}))}))}function Pt(e){return ze(e=e.b.values(),(function(e){return e.loaded}))}function jt(t,n,r){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(n.size&&(n=n.get(t.keySystem)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=[]),(r=r.get(t.keySystem))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=r.persistentStateRequired),t.videoRobustness||(t.videoRobustness=r.videoRobustness),t.audioRobustness||(t.audioRobustness=r.audioRobustness),t.serverCertificate||(t.serverCertificate=r.serverCertificate)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}V("shaka.util.Uint8ArrayUtils.toBase64",ht.zc),ht.Ba=function(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n},V("shaka.util.Uint8ArrayUtils.fromBase64",ht.Ba),ht.Qc=function(t){for(var n=new Uint8Array(t.length/2),r=0;r<t.length;r+=2)n[r/2]=e.parseInt(t.substr(r,2),16);return n},V("shaka.util.Uint8ArrayUtils.fromHex",ht.Qc),ht.Ac=function(e){for(var t="",n=0;n<e.length;++n){var r=e[n].toString(16);1==r.length&&(r="0"+r),t+=r}return t},V("shaka.util.Uint8ArrayUtils.toHex",ht.Ac),ht.za=function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!=t[n])return!1;return!0},V("shaka.util.Uint8ArrayUtils.equal",ht.za),ht.concat=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];for(var r=n=0;r<t.length;++r)n+=t[r].length;n=new Uint8Array(n);for(var i=r=0;i<t.length;++i)n.set(t[i],r),r+=t[i].length;return n},V("shaka.util.Uint8ArrayUtils.concat",ht.concat),(r=pt.prototype).destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.c?w(t,e.na,0):(e.c=!0,w(t,function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.i.release(),e.i=null,e.m.reject(),e.$.stop(),e.$=null,e.O.stop(),e.O=null,w(t,It(e),2);case 2:if(!e.h){t.A(3);break}return k(t,4),w(t,e.h.setMediaKeys(null),6);case 6:x(t,5);break;case 4:R(t);case 5:e.h=null;case 3:e.a=null,e.u.clear(),e.l=null,e.s=[],e.f=null,e.g=null,e.B=null,S(t)}}))}))}(e),4));case 4:e.na.resolve(),t.A(0)}}))}))},r.configure=function(e){this.f=e},r.Hb=function(e){var t=this;if(!this.l)return this.i.da(e,"encrypted",(function(){t.g(new me(2,6,6010))})),Promise.resolve();this.h=e,this.i.da(this.h,"play",(function(){for(var e=0;e<t.F.length;e++)Ct(t,t.F[e]);t.oa=!0,t.F=[]})),"webkitCurrentPlaybackTargetIsWireless"in this.h&&this.i.w(this.h,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return It(t)})),e=(e=this.h.setMediaKeys(this.l)).catch((function(e){return Promise.reject(new me(2,6,6003,e.message))}));var n=yt(this);return Promise.all([e,n]).then((function(){if(t.c)return Promise.reject();vt(t),t.a.initData.length||t.s.length||t.i.w(t.h,"encrypted",(function(e){return bt(t,e.initDataType,new Uint8Array(e.initData))}))})).catch((function(e){if(!t.c)return Promise.reject(e)}))},r.Lb=function(){for(var e=1/0,t=this.b.keys(),n=(t=f(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},r.fe=function(e){this.h&&this.f.delayLicenseRequestUntilPlayed&&this.h.paused&&!this.oa?this.F.push(e):Ct(this,e)},r.de=function(e){e=e.target;var t=this.b.get(e),n=!1;e.keyStatuses.forEach(function(e,r){if("string"==typeof r){var i=r;r=e,e=i}if("com.microsoft.playready"==this.a.keySystem&&16==r.byteLength&&!nt("Tizen")&&!nt("VITIS")){var a=(i=new DataView(r)).getUint32(0,!0),o=i.getUint16(4,!0),s=i.getUint16(6,!0);i.setUint32(0,a,!1),i.setUint16(4,o,!1),i.setUint16(6,s,!1)}"com.microsoft.playready"==this.a.keySystem&&"status-pending"==e&&(e="usable"),"status-pending"!=e&&(t.loaded=!0),"expired"==e&&(n=!0),i=ht.Ac(new Uint8Array(r)),this.pa.set(i,e)}.bind(this));var r=e.expiration-Date.now();(0>r||n&&1e3>r)&&t&&!t.ya&&(this.b.delete(e),e.close().catch((function(){}))),Pt(this)&&(this.m.resolve(),this.O.R(Dt))};var Ot=5,Dt=.5;function Mt(){this.a=new muxjs.mp4.CaptionParser,this.g=[],this.f={}}function Nt(){}function Ut(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Ft(e,t,n){return n=void 0===n?0:n,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+n>=e.start(0)}function Bt(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,r=e.length-1;0<=r&&e.end(r)>t;--r)n+=e.end(r)-Math.max(e.start(r),t);return n}function Kt(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}Mt.prototype.init=function(e){var t=muxjs.mp4.probe;e=new Uint8Array(e),this.g=t.videoTrackIds(e),this.f=t.timescale(e),this.a.init()},Mt.prototype.b=function(e,t){var n=new Uint8Array(e);(n=this.a.parse(n,this.g,this.f))&&n.captions&&t(n.captions),this.a.clearParsedCaptions()},Mt.prototype.c=function(){this.a.resetCaptionStream()},Nt.prototype.init=function(){},Nt.prototype.b=function(){},Nt.prototype.c=function(){};var Vt={Ke:function(e,t){return e.reduce(function(e,t,n){return t.catch(e.bind(null,n))}.bind(null,t),Promise.reject())},Gc:function(e,t){return e.concat(t)},oc:function(){},Ia:function(e){return null!=e}};function Gt(e,t){if(0==t.length)return e;var n=t.map((function(e){return new Q(e)}));return e.map((function(e){return new Q(e)})).map((function(e){return n.map(e.resolve.bind(e))})).reduce(Vt.Gc,[]).map((function(e){return e.toString()}))}function Ht(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:t||[],keyIds:[]}}var Yt={Pa:"video",Eb:"audio",ra:"text",Cg:"image",Ag:"application"};function zt(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.b=null,this.g=[],this.c=[],this.f=!1,this.a.on("data",this.i.bind(this)),this.a.on("done",this.h.bind(this))}function Wt(t,n){return!(!e.muxjs||"mp2t"!=t.toLowerCase().split(";")[0].split("/")[1])&&(n?MediaSource.isTypeSupported($t(n,t)):MediaSource.isTypeSupported($t("audio",t))||MediaSource.isTypeSupported($t("video",t)))}function $t(e,t){var n=t.replace(/mp2t/i,"mp4");"audio"==e&&(n=n.replace("video","audio"));var r=/avc1\.(66|77|100)\.(\d+)/.exec(n);if(r){var i="avc1.",a=r[1],o=Number(r[2]);i=("66"==a?i+"4200":"77"==a?i+"4d00":i+"6400")+(o>>4).toString(16),i+=(15&o).toString(16),n=n.replace(r[0],i)}return n}function qt(e,t,n){this.startTime=e,this.direction=tn,this.endTime=t,this.payload=n,this.region=new cn,this.position=null,this.positionAlign=Xt,this.size=100,this.textAlign=Jt,this.writingMode=nn,this.lineInterpretation=rn,this.line=null,this.lineHeight="",this.lineAlign=an,this.displayAlign=Zt,this.fontSize=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=sn,this.fontStyle=ln,this.fontFamily="",this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.spacer=!1}zt.prototype.destroy=function(){return this.a.dispose(),this.a=null,Promise.resolve()},zt.prototype.i=function(e){this.c=e.captions;var t=new Uint8Array(e.data.byteLength+e.initSegment.byteLength);t.set(e.initSegment,0),t.set(e.data,e.initSegment.byteLength),this.g.push(t)},zt.prototype.h=function(){var e={data:ht.concat.apply(null,this.g),captions:this.c};this.b.resolve(e),this.f=!1},V("shaka.text.Cue",qt);var Xt="auto";qt.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Xt};var Jt="center",Qt={LEFT:"left",RIGHT:"right",CENTER:Jt,START:"start",END:"end"};qt.textAlign=Qt;var Zt="after",en={BEFORE:"before",CENTER:"center",AFTER:Zt};qt.displayAlign=en;var tn="ltr";qt.direction={HORIZONTAL_LEFT_TO_RIGHT:tn,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var nn="horizontal-tb";qt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:nn,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var rn=0;qt.lineInterpretation={LINE_NUMBER:rn,PERCENTAGE:1};var an="start",on={CENTER:"center",START:an,END:"end"};qt.lineAlign=on;var sn=400;qt.fontWeight={NORMAL:sn,BOLD:700};var ln="normal",un={NORMAL:ln,ITALIC:"italic",OBLIQUE:"oblique"};function cn(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=dn,this.scroll=fn}qt.fontStyle=un,qt.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},V("shaka.text.CueRegion",cn);var dn=1;cn.units={PX:0,PERCENTAGE:dn,LINES:2};var fn="";function hn(e){this.g=null,this.c=e,this.f=this.m=0,this.h=1/0,this.b=this.a=null,this.l="",this.i=new Map}cn.scrollMode={NONE:fn,UP:"up"};var pn={};function mn(t){return!!(pn[t]||e.muxjs&&"application/cea-608"==t)}function gn(e,t){"application/cea-608"!=t&&(e.g=new pn[t])}function yn(e,t,n,r,i){for(var a=n+" "+r,o=new Map,s=(t=f(t)).next();!s.done;s=t.next()){var l=s.value;s=l.stream,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),l.startTime+=i,l.endTime+=i,l.startTime>=e.f&&l.startTime<e.h&&(l=new qt(l.startTime,l.endTime,l.text),o.get(s).get(a).push(l),s==e.l&&e.c.append([l]))}for(a=(i=f(o.keys())).next();!a.done;a=i.next())for(a=a.value,e.i.has(a)||e.i.set(a,new Map),s=(t=f(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,l=o.get(a).get(s),e.i.get(a).set(s,l);e.a=null==e.a?Math.max(n,e.f):Math.min(e.a,Math.max(n,e.f)),e.b=Math.max(e.b,Math.min(r,e.h))}function vn(e,t,n){this.f=e,this.g=n,this.b={},this.a=null,this.c={},this.i=new Be,this.u=!1,this.l={},this.m=t,e=this.s=new ge,t=new MediaSource,this.i.da(t,"sourceopen",e.resolve),this.f.src=bn(t),this.h=t}V("shaka.text.TextEngine.registerParser",(function(e,t){pn[e]=t})),V("shaka.text.TextEngine.unregisterParser",(function(e){delete pn[e]})),hn.prototype.destroy=function(){return this.c=this.g=null,this.i.clear(),Promise.resolve()},hn.prototype.kc=function(e){try{return this.g.parseMedia(new Uint8Array(e),{periodStart:0,segmentStart:null,segmentEnd:0})[0].startTime}catch(e){throw new me(2,2,2009,e)}},hn.prototype.remove=function(e,t){return Promise.resolve().then(function(){!this.c||!this.c.remove(e,t)||null==this.a||t<=this.a||e>=this.b||(e<=this.a&&t>=this.b?this.a=this.b=null:e<=this.a&&t<this.b?this.a=t:e>this.a&&t>=this.b&&(this.b=e))}.bind(this))};var bn=e.URL.createObjectURL;function _n(e){var t=qe(e.mimeType,e.codecs),n=function(e){var t=[e.mimeType];return Je.forEach((function(n,r){var i=e[r];i&&t.push(n+'="'+i+'"')})),t.join(";")}(e);return mn(t)||MediaSource.isTypeSupported(n)||Wt(t,e.type)}function An(e,t){e.a||(e.a=new hn(e.g)),gn(e.a,t)}function En(e){return!e.h||"ended"==e.h.readyState}function Tn(e,t){if("text"==t)var n=e.a.a;else n=!(n=Sn(e,t))||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function wn(e,t){return"text"==t?e.a.b:Ut(Sn(e,t))}function Sn(e,t){try{return e.b[t].buffered}catch(e){return null}}function kn(t,n,r,i,a,o){return"text"==n?function(e,t,n,r){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==n||null==r)this.g.parseInit(new Uint8Array(t));else{var e={periodStart:this.m,segmentStart:n,segmentEnd:r};e=this.g.parseMedia(new Uint8Array(t),e).filter(function(e){return e.startTime>=this.f&&e.startTime<this.h}.bind(this)),this.c.append(e),null==this.a&&(this.a=Math.max(n,this.f)),this.b=Math.min(r,this.h)}}.bind(e))}(t.a,r,i,a):t.l[n]?function(e,t){e.f=!0,e.b=new ge,e.g=[],e.c=[];var n=new Uint8Array(t);return e.a.push(n),e.a.flush(),e.f&&e.b.reject(new me(2,3,3018)),e.b}(t.l[n],r).then(function(e){return this.a||An(this,"text/vtt"),e.captions&&e.captions.length&&yn(this.a,e.captions,i,a,this.b.video.timestampOffset),Rn(this,n,this.re.bind(this,n,e.data.buffer))}.bind(t)):(o&&e.muxjs&&(t.a||An(t,"text/vtt"),null==i&&null==a?t.m.init(r):t.m.b(r,(function(e){e.length&&yn(t.a,e,i,a,t.b.video.timestampOffset)}))),Rn(t,n,t.re.bind(t,n,r)))}function Cn(e,t){var n=wn(e,"video")||0;!function(e,t,n){if(e.l=t,t=e.i.get(t))for(var r=f(t.keys()),i=r.next();!i.done;i=r.next())(i=t.get(i.value).filter((function(e){return e.endTime<=n})))&&e.c.append(i)}(e.a,t,n)}function xn(e,t){return"text"==t?e.a?(e.m.c(),e.a.remove(0,1/0)):Promise.resolve():Rn(e,t,e.se.bind(e,t,0,e.h.duration))}function Rn(e,t,n){if(e.u)return Promise.reject();if(n={start:n,p:new ge},e.c[t].push(n),1==e.c[t].length)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new me(2,3,3017,t)):n.p.reject(new me(2,3,3015,r)),In(e,t)}return n.p}function Ln(e,t){if(e.u)return Promise.reject();var n,r=[];for(n in e.b){var i=new ge,a={start:function(e){e.resolve()}.bind(null,i),p:i};e.c[n].push(a),r.push(i),1==e.c[n].length&&a.start()}return Promise.all(r).then(function(){try{t()}catch(t){var e=Promise.reject(new me(2,3,3015,t))}for(var n in this.b)In(this,n);return e}.bind(e),function(e){throw e}.bind(e))}function In(e,t){e.c[t].shift();var n=e.c[t][0];if(n)try{n.start()}catch(r){n.p.reject(new me(2,3,3015,r)),In(e,t)}}function Pn(e,t){return e=On(e),t=On(t),e.split("-")[0]==t.split("-")[0]}function jn(e,t){e=On(e),t=On(t);var n=e.split("-"),r=t.split("-");return n[0]==r[0]&&1==n.length&&2==r.length}function On(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=Nn.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function Dn(e){return e.language?On(e.language):e.audio&&e.audio.language?On(e.audio.language):e.video&&e.video.language?On(e.video.language):"und"}function Mn(e,t){for(var n=On(e),r=new Set,i=f(t),a=i.next();!a.done;a=i.next())r.add(On(a.value));for(a=(i=f(r)).next();!a.done;a=i.next())if((a=a.value)==n)return a;for(a=(i=f(r)).next();!a.done;a=i.next())if(jn(a=a.value,n))return a;for(a=(i=f(r)).next();!a.done;a=i.next()){var o=a=a.value,s=n;if(o=On(o),s=On(s),o=o.split("-"),s=s.split("-"),2==o.length&&2==s.length&&o[0]==s[0])return a}for(a=(r=f(r)).next();!a.done;a=r.next())if(jn(n,i=a.value))return i;return null}(r=vn.prototype).destroy=function(){var e=this;this.u=!0;var t,n=[];for(t in this.c){var r=this.c[t],i=r[0];for(this.c[t]=r.slice(0,1),i&&n.push(i.p.catch(Vt.oc)),i=1;i<r.length;++i)r[i].p.reject()}for(var a in this.a&&n.push(this.a.destroy()),this.g&&n.push(this.g.destroy()),this.l)n.push(this.l[a].destroy());return Promise.all(n).then((function(){e.i&&(e.i.release(),e.i=null),e.f&&(e.f.removeAttribute("src"),e.f.load(),e.f=null),e.h=null,e.a=null,e.g=null,e.b={},e.l={},e.m=null,e.c={}}))},r.init=function(e,t){var n=this;return p((function r(){var i;return M(r,(function(r){switch(r.j){case 1:return i=Yt,w(r,n.s,2);case 2:e.forEach((function(e,r){var a=qe(e.mimeType,e.codecs);r==i.ra?An(n,a):(!t&&MediaSource.isTypeSupported(a)||!Wt(a,r)||(n.l[r]=new zt,a=$t(r,a)),a=n.h.addSourceBuffer(a),n.i.w(a,"error",n.lg.bind(n,r)),n.i.w(a,"updateend",n.xb.bind(n,r)),n.b[r]=a,n.c[r]=[])})),S(r)}}))}))},r.Sc=function(e){if(e.total=Kt(this.f.buffered),e.audio=Kt(Sn(this,"audio")),e.video=Kt(Sn(this,"video")),e.text=[],this.a){var t=this.a.a,n=this.a.b;null!=t&&null!=n&&e.text.push({start:t,end:n})}},r.remove=function(e,t,n){return"text"==e?this.a.remove(t,n):Rn(this,e,this.se.bind(this,e,t,n))},r.flush=function(e){return"text"==e?Promise.resolve():Rn(this,e,this.Pe.bind(this,e))},r.endOfStream=function(e){return Ln(this,function(){En(this)||(e?this.h.endOfStream(e):this.h.endOfStream())}.bind(this))},r.xa=function(e){return Ln(this,function(){this.h.duration=e}.bind(this))},r.Y=function(){return this.h.duration},r.re=function(e,t){this.b[e].appendBuffer(t)},r.se=function(e,t,n){n<=t?this.xb(e):this.b[e].remove(t,n)},r.Be=function(e){var t=this.b[e].appendWindowStart,n=this.b[e].appendWindowEnd;this.b[e].abort(),this.b[e].appendWindowStart=t,this.b[e].appendWindowEnd=n,this.xb(e)},r.Pe=function(e){this.f.currentTime-=.001,this.xb(e)},r.kg=function(e,t){0>t&&(t+=.001),this.b[e].timestampOffset=t,this.xb(e)},r.hg=function(e,t,n){this.b[e].appendWindowStart=0,this.b[e].appendWindowEnd=n,this.b[e].appendWindowStart=t,this.xb(e)},r.lg=function(e){this.c[e][0].p.reject(new me(2,3,3014,this.f.error?this.f.error.code:0))},r.xb=function(e){var t=this.c[e][0];t&&(t.p.resolve(),In(this,e))};var Nn=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]),Un={bd:function(e,t,n){function r(e,t,n){return e>=t&&e<=n}var i=e.video;return!(i&&i.width&&i.height&&(!r(i.width,t.minWidth,Math.min(t.maxWidth,n.width))||!r(i.height,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.frameRate&&!r(e.frameRate,t.minFrameRate,t.maxFrameRate)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))},Gd:function(e,t,n){var r=!1;return e.forEach((function(e){var i=e.allowedByApplication;e.allowedByApplication=Un.bd(e,t,n),i!=e.allowedByApplication&&(r=!0)})),r},filterNewPeriod:function(e,t,n,r){r.variants=r.variants.filter((function(r){if(e&&e.S&&!Rt(e,r))return!1;var i=r.audio;return r=r.video,!(i&&!_n(i)||r&&!_n(r)||i&&t&&!Un.Hd(i,t)||r&&n&&!Un.Hd(r,n))})),r.textStreams=r.textStreams.filter((function(e){return mn(qe(e.mimeType,e.codecs))}))},Hd:function(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]},Ed:function(e){var t=e.audio,n=e.video,r=t?t.codecs:null,i=n?n.codecs:null,a=[];i&&a.push(i),r&&a.push(r);var o=[];n&&o.push(n.mimeType),t&&o.push(t.mimeType),o=o[0]||null;var s=[];t&&s.push(t.kind),n&&s.push(n.kind),s=s[0]||null;var l=new Set;return t&&t.roles.forEach((function(e){return l.add(e)})),n&&n.roles.forEach((function(e){return l.add(e)})),e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:s,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:o,codecs:a.join(", "),audioCodec:r,videoCodec:i,primary:e.primary,roles:Array.from(l),audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null),t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.label=t.label,e.audioRoles=t.roles),e},xc:function(e){return{id:e.id,active:!1,type:"text",bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId}},Wc:function(e){return e.__shaka_id||(e.__shaka_id=Un.yf++),e.__shaka_id},yf:0,sf:function(e){var t=Un.Sd(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),t},rf:function(e){var t=Un.Sd(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind?(t.primary=!0,t.roles=["main"],t.audioRoles=["main"]):t.audioRoles=[],t},Sd:function(e){return{id:Un.Wc(e),active:!1,type:"",bandwidth:0,language:On(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null}},rb:function(e){return e.allowedByApplication&&e.allowedByKeySystem},df:function(e){return e.filter((function(e){return Un.rb(e)}))},Nd:function(e,t){for(var n=e.filter((function(e){return e.audio&&e.audio.channelsCount})),r=new Map,i=(n=f(n)).next();!i.done;i=n.next()){var a=(i=i.value).audio.channelsCount;r.has(a)||r.set(a,[]),r.get(a).push(i)}return 0==(n=Array.from(r.keys())).length?e:(i=n.filter((function(e){return e<=t}))).length?r.get(Math.max.apply(null,i)):r.get(Math.min.apply(null,n))},Jb:function(e,t,n){var r=e,i=e.filter((function(e){return e.primary}));i.length&&(r=i);var a=r.length?r[0].language:"";if(r=r.filter((function(e){return e.language==a})),t){var o=Mn(On(t),e.map((function(e){return e.language})));o&&(r=e.filter((function(e){return On(e.language)==o})))}if(n){if((e=Un.Md(r,n)).length)return e}else if((e=r.filter((function(e){return 0==e.roles.length}))).length)return e;return(e=r.map((function(e){return e.roles})).reduce(Vt.Gc,[])).length?Un.Md(r,e[0]):r},Md:function(e,t){return e.filter((function(e){return e.roles.includes(t)}))},Qd:function(e,t,n){for(var r=0;r<n.length;r++)if(n[r].audio==e&&n[r].video==t)return n[r];return null},tf:function(e){return"audio"==e.type},wf:function(e){return"video"==e.type},nf:function(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t},Gg:function(e){return Un.tf(e)?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:Un.wf(e)?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}};function Fn(){this.h=null,this.f=!1,this.b=new W,this.c=[],this.i=!1,this.a=this.g=null}function Bn(e,t){return e&&(t=t.filter((function(t){return Un.bd(t,e,{width:1/0,height:1/0})}))),t.sort((function(e,t){return e.bandwidth-t.bandwidth}))}function Kn(e,t){this.a=e,this.b=t}function Vn(e,t){var n=new Kn(2,6),r=Yn,i=r.a,a=n.b-i.b;(0<(n.a-i.a||a)?r.c:r.b)(r.a,n,e,t)}function Gn(e,t,n,r){q([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function Hn(e,t,n,r){$([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(""))}V("shaka.abr.SimpleAbrManager",Fn),Fn.prototype.stop=function(){this.h=null,this.f=!1,this.c=[],this.g=null},Fn.prototype.stop=Fn.prototype.stop,Fn.prototype.init=function(e){this.h=e},Fn.prototype.init=Fn.prototype.init,Fn.prototype.chooseVariant=function(){var e=Bn(this.a.restrictions,this.c),t=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!e.length&&(e=[(e=Bn(null,this.c))[0]]);for(var n=e[0]||null,r=0;r<e.length;++r){var i=e[r],a=(e[r+1]||{bandwidth:1/0}).bandwidth/this.a.bandwidthUpgradeTarget;t>=i.bandwidth/this.a.bandwidthDowngradeTarget&&t<=a&&(n=i)}return this.g=Date.now(),n},Fn.prototype.chooseVariant=Fn.prototype.chooseVariant,Fn.prototype.enable=function(){this.f=!0},Fn.prototype.enable=Fn.prototype.enable,Fn.prototype.disable=function(){this.f=!1},Fn.prototype.disable=Fn.prototype.disable,Fn.prototype.segmentDownloaded=function(e,t){var n=this.b;if(!(16e3>t)){var r=8e3*t/e,i=e/1e3;n.a+=t,Y(n.b,i,r),Y(n.c,i,r)}if(null!=this.g&&this.f)e:{if(this.i){if(Date.now()-this.g<1e3*this.a.switchInterval)break e}else{if(!(128e3<=this.b.a))break e;this.i=!0}n=this.chooseVariant(),this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate),this.h(n)}},Fn.prototype.segmentDownloaded=Fn.prototype.segmentDownloaded,Fn.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)},Fn.prototype.getBandwidthEstimate=Fn.prototype.getBandwidthEstimate,Fn.prototype.setVariants=function(e){this.c=e},Fn.prototype.setVariants=Fn.prototype.setVariants,Fn.prototype.configure=function(e){this.a=e},Fn.prototype.configure=Fn.prototype.configure,Kn.prototype.toString=function(){return"v"+this.a+"."+this.b};var Yn=null,zn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Wn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),$n=["loop","playbackRate"],qn=["pause","play"],Xn="abrstatuschanged adaptation buffering drmsessionupdate emsg error expirationupdated largegap loading manifestparsed onstatechange onstateidle streaming textchanged texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged".split(" "),Jn={getAssetUri:2,getAudioLanguages:2,getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2,getLoadMode:10},Qn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Zn=[["getConfiguration","configure"]],er=[["isTextTrackVisible","setTextTrackVisibility"]],tr="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(" "),nr=["attach","detach","load","unload"];function rr(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof we){var n,r={};for(n in t){var i=t[n];i&&"object"==typeof i?"detail"==n&&(r[n]=i):n in Event||(r[n]=i)}return r}if(t instanceof TimeRanges)for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=0;n<t.length;++n)r.start.push(t.start(n)),r.end.push(t.end(n));else r=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return r}}))}function ir(e){return JSON.parse(e,(function(e,t){return"NaN"==t?NaN:"-Infinity"==t?-1/0:"Infinity"==t?1/0:t&&"object"==typeof t&&"TimeRanges"==t.__type__?function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t):t&&"object"==typeof t&&"Uint8Array"==t.__type__?new Uint8Array(t.entries):t}))}function ar(e,t,n,r,i,a){this.O=e,this.f=new fe(t),this.S=n,this.l=!1,this.F=r,this.K=i,this.B=a,this.b=this.h=!1,this.D="",this.i=null,this.m=this.ce.bind(this),this.s=this.Ff.bind(this),this.a={video:{},player:{}},this.u=0,this.c={},this.g=null,pr.add(this)}var or=!1,sr=null;function lr(e){for(var t=f(pr),n=t.next();!n.done;n=t.next())ur(n.value,e)}function ur(e,t){var n=e.B();e.g=new ge,e.l=!0,e.kd(n,t)}function cr(e){for(var t=f(pr),n=t.next();!n.done;n=t.next())n=n.value,or="available"==e,n.f.yc()}function dr(e){var t=sr;t.removeUpdateListener(e.m),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.s)}function fr(e){for(var t in e.c){var n=e.c[t];delete e.c[t],n.reject(new me(1,7,7e3))}}function hr(e){e=rr(e),sr.sendMessage("urn:x-cast:com.google.shaka.v2",e,(function(){}),X)}(r=ar.prototype).destroy=function(){return pr.delete(this),fr(this),sr&&dr(this),this.f&&(this.f.stop(),this.f=null),this.K=this.F=null,this.b=this.h=!1,this.s=this.m=this.g=this.c=this.a=this.i=null,Promise.resolve()},r.ga=function(){return this.b},r.nd=function(){return this.D},r.init=function(){if(e.chrome&&chrome.cast&&chrome.cast.isAvailable&&this.O.length){this.h=!0,this.f.yc();var t=new chrome.cast.SessionRequest(this.O);t=new chrome.cast.ApiConfig(t,lr.bind(this),cr.bind(this),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),or&&this.f.R(.02),(t=sr)&&t.status!=chrome.cast.SessionStatus.STOPPED?ur(this,t):sr=null}},r.ud=function(e){this.i=e,this.b&&hr({type:"appData",appData:this.i})},r.cast=function(e){return this.h?or?this.b?Promise.reject(new me(1,8,8002)):(this.g=new ge,chrome.cast.requestSession(this.kd.bind(this,e),this.be.bind(this)),this.g):Promise.reject(new me(1,8,8001)):Promise.reject(new me(1,8,8e3))},r.Kb=function(){this.b&&(fr(this),sr&&(dr(this),sr.stop((function(){}),(function(){})),sr=null))},r.get=function(e,t){if("video"==e){if(qn.includes(t))return this.le.bind(this,e,t)}else if("player"==e){if(Qn[t]&&!this.get("player","isLive")())return function(){};if(tr.includes(t))return this.le.bind(this,e,t);if(nr.includes(t))return this.Wf.bind(this,e,t);if(Jn[t])return this.ie.bind(this,e,t)}return this.ie(e,t)},r.set=function(e,t,n){this.a[e][t]=n,hr({type:"set",targetName:e,property:t,value:n})},r.kd=function(e,t){sr=t,t.addUpdateListener(this.m),t.addMessageListener("urn:x-cast:com.google.shaka.v2",this.s),this.ce(),hr({type:"init",initState:e,appData:this.i}),this.g.resolve()},r.be=function(e){var t=8003;switch(e.code){case"cancel":t=8004;break;case"timeout":t=8005;break;case"receiver_unavailable":t=8006}this.g.reject(new me(2,8,t,e))},r.ie=function(e,t){return this.a[e][t]},r.le=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];hr({type:"call",targetName:e,methodName:t,args:r})},r.Wf=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];i=new ge;var a=this.u.toString();return this.u++,this.c[a]=i,hr({type:"asyncCall",targetName:e,methodName:t,args:r,id:a}),i},r.ce=function(){var e=!!sr&&"connected"==sr.status;if(this.b&&!e){for(var t in this.K(),this.a)this.a[t]={};fr(this)}this.D=(this.b=e)?sr.receiver.friendlyName:"",this.f.yc()},r.Ff=function(e,t){var n=ir(t);switch(n.type){case"event":var r=n.event;this.F(n.targetName,new we(r.type,r));break;case"update":for(var i in r=n.update)for(var a in n=this.a[i]||{},r[i])n[a]=r[i][a];this.l&&(this.S(),this.l=!1);break;case"asyncComplete":if(i=n.id,n=n.error,a=this.c[i],delete this.c[i],a)if(n){for(r in i=new me(n.severity,n.category,n.code),n)i[r]=n[r];a.reject(i)}else a.resolve()}};var pr=new Set;function mr(e,t,n){var r=this;ke.call(this),this.c=e,this.b=t,this.i=this.g=this.f=this.l=this.h=null,this.s=n,this.m=new Map,this.a=new ar(n,(function(){return vr(r)}),(function(){return br(r)}),(function(e,t){return Ar(r,e,t)}),(function(){return _r(r)}),(function(){return yr(r)})),function(e){for(var t in e.a.init(),e.i=new Be,zn.forEach(function(e){this.i.w(this.c,e,this.D.bind(this))}.bind(e)),Xn.forEach(function(e){this.i.w(this.b,e,this.u.bind(this))}.bind(e)),e.h={},e.c)Object.defineProperty(e.h,t,{configurable:!1,enumerable:!0,get:e.B.bind(e,t),set:e.F.bind(e,t)});e.l={},gr(e,(function(t){Object.defineProperty(e.l,t,{configurable:!1,enumerable:!0,get:function(){return function e(t,n){if(t.m.has(n)&&(n=t.m.get(n)),"addEventListener"==n)return t.g.addEventListener.bind(t.g);if("removeEventListener"==n)return t.g.removeEventListener.bind(t.g);if("getMediaElement"==n)return function(){return this.h}.bind(t);if("getSharedConfiguration"==n)return t.a.get("player","getConfiguration");if("getNetworkingEngine"==n)return t.b.Mb.bind(t.b);if(t.a.ga()){if("getManifest"==n||"drmInfo"==n)return function(){return q(n+"() does not work while casting!"),null};if("getManifestUri"==n)return Vn("getManifestUri",'Please use "getAssetUri" instead.'),e(t,"getAssetUri");if("attach"==n||"detach"==n)return function(){return q(n+"() does not work while casting!"),Promise.resolve()}}return t.a.ga()&&0==Object.keys(t.a.a.video).length&&Jn[n]||!t.a.ga()?t.b[n].bind(t.b):t.a.get("player",n)}(e,t)}})})),function(e){var t=new Map;gr(e,(function(n,r){if(t.has(r)){var i=t.get(r);n.length<i.length?e.m.set(n,i):e.m.set(i,n)}else t.set(r,n)}))}(e),e.f=new ke,e.f.$b=e.h,e.g=new ke,e.g.$b=e.l}(this)}function gr(e,t){function n(e){return"constructor"!=e&&"function"==typeof r[e]&&!i.has(e)}var r=e.b,i=new Set;for(a in r)n(a)&&(i.add(a),t(a,r[a]));for(var a=Object.getPrototypeOf(r),o=Object.getPrototypeOf({});a&&a!=o;){for(var s=f(Object.getOwnPropertyNames(a)),l=s.next();!l.done;l=s.next())n(l=l.value)&&(i.add(l),t(l,r[l]));a=Object.getPrototypeOf(a)}}function yr(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.b.hc(),startTime:null};return e.c.pause(),$n.forEach(function(e){t.video[e]=this.c[e]}.bind(e)),e.c.ended||(t.startTime=e.c.currentTime),Zn.forEach(function(e){var n=e[1];e=this.b[e[0]](),t.player[n]=e}.bind(e)),er.forEach(function(e){var n=e[1];e=this.b[e[0]](),t.playerAfterLoad[n]=e}.bind(e)),t}function vr(e){e.dispatchEvent(new we("caststatuschanged"))}function br(e){e.f.dispatchEvent(new we(e.h.paused?"pause":"play"))}function _r(e){Zn.forEach(function(e){var t=e[1];e=this.a.get("player",e[0])(),this.b[t](e)}.bind(e));var t=e.a.get("player","getAssetUri")(),n=e.a.get("video","ended"),r=Promise.resolve(),i=e.c.autoplay,a=null;n||(a=e.a.get("video","currentTime")),t&&(e.c.autoplay=!1,r=e.b.load(t,a));var o={};$n.forEach(function(e){o[e]=this.a.get("video",e)}.bind(e)),r.then((function(){e.c&&($n.forEach(function(e){this.c[e]=o[e]}.bind(e)),er.forEach(function(e){var t=e[1];e=this.a.get("player",e[0])(),this.b[t](e)}.bind(e)),e.c.autoplay=i,t&&e.c.play())}),(function(t){e.b.dispatchEvent(new we("error",{detail:t}))}))}function Ar(e,t,n){e.a.ga()&&("video"==t?e.f.dispatchEvent(n):"player"==t&&e.g.dispatchEvent(n))}function Er(e,t,n,r){var i=this;ke.call(this),this.a=e,this.b=t,this.c=new Be,this.D={video:e,player:t},this.s=n||function(){},this.F=r||function(e){return e},this.u=!1,this.h=!0,this.g=0,this.m=!1,this.l=!0,this.i=this.f=null,this.B=new fe((function(){wr(i)})),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=e.ee.bind(e),t.onSenderDisconnected=e.ee.bind(e),t.onSystemVolumeChanged=e.Oe.bind(e),e.i=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.i.onMessage=e.Af.bind(e),e.f=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.f.onMessage=e.Kf.bind(e),t.start(),zn.forEach(function(e){this.c.w(this.a,e,this.je.bind(this,"video"))}.bind(e)),Xn.forEach(function(e){this.c.w(this.b,e,this.je.bind(this,"player"))}.bind(e)),cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.b.vd(3840,2160):e.b.vd(1920,1080),e.c.w(e.a,"loadeddata",function(){this.m=!0}.bind(e)),e.c.w(e.b,"loading",function(){this.h=!1,Tr(this)}.bind(e)),e.c.w(e.a,"playing",function(){this.h=!1,Tr(this)}.bind(e)),e.c.w(e.a,"pause",function(){Tr(this)}.bind(e)),e.c.w(e.b,"unloading",function(){this.h=!0,Tr(this)}.bind(e)),e.c.w(e.a,"ended",function(){var e=this;new fe((function(){e.a&&e.a.ended&&(e.h=!0,Tr(e))})).R(5)}.bind(e))}(this)}function Tr(e){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new we("caststatuschanged")),Sr(this)||xr(this,0))}.bind(e))}function wr(e){e.B.R(.5);var t={video:{},player:{}};if(Wn.forEach(function(e){t.video[e]=this.a[e]}.bind(e)),e.b.V())for(var n in Qn)0==e.g%Qn[n]&&(t.player[n]=e.b[n]());for(var r in Jn)0==e.g%Jn[r]&&(t.player[r]=e.b[r]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),e.m&&(e.g+=1),Cr(e,{type:"update",update:t},e.f),Sr(e)}function Sr(e){return!(!e.l||!e.a.duration&&!e.b.V()||(kr(e),e.l=!1,0))}function kr(e){var t={contentId:e.b.hc(),streamType:e.b.V()?"LIVE":"BUFFERED",duration:e.a.duration,contentType:""};xr(e,0,t)}function Cr(e,t,n,r){e.u&&(e=rr(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function xr(e,t,n){var r=e.a.playbackRate,i=Rr;r={mediaSessionId:0,playbackRate:r,playerState:i=e.h?i.IDLE:e.b.Xc()?i.we:e.a.paused?i.ye:i.ze,currentTime:e.a.currentTime,supportedMediaCommands:15,volume:{level:e.a.volume,muted:e.a.muted}},n&&(r.media=n),Cr(e,{requestId:t,type:"MEDIA_STATUS",status:[r]},e.i)}e.__onGCastApiAvailable=function(e){if(e)for(var t=(e=f(pr)).next();!t.done;t=e.next())t.value.init()},G(mr,ke),V("shaka.cast.CastProxy",mr),mr.prototype.destroy=function(e){return e&&this.a.Kb(),this.i&&(this.i.release(),this.i=null),e=[],this.b&&(e.push(this.b.destroy()),this.b=null),this.a&&(e.push(this.a.destroy()),this.a=null),this.l=this.h=this.c=null,Promise.all(e)},mr.prototype.destroy=mr.prototype.destroy,mr.prototype.pf=function(){return this.h},mr.prototype.getVideo=mr.prototype.pf,mr.prototype.ff=function(){return this.l},mr.prototype.getPlayer=mr.prototype.ff,mr.prototype.Ee=function(){return this.a.h&&or},mr.prototype.canCast=mr.prototype.Ee,mr.prototype.ga=function(){return this.a.ga()},mr.prototype.isCasting=mr.prototype.ga,mr.prototype.nd=function(){return this.a.nd()},mr.prototype.receiverName=mr.prototype.nd,mr.prototype.cast=function(){var e=yr(this);return this.a.cast(e).then(function(){if(this.b)return this.b.Cd()}.bind(this))},mr.prototype.cast=mr.prototype.cast,mr.prototype.ud=function(e){this.a.ud(e)},mr.prototype.setAppData=mr.prototype.ud,mr.prototype.sg=function(){var e=this.a;if(e.b){var t=e.B();chrome.cast.requestSession(e.kd.bind(e,t),e.be.bind(e))}},mr.prototype.suggestDisconnect=mr.prototype.sg,mr.prototype.He=function(e){var t=this;return p((function n(){return M(n,(function(n){switch(n.j){case 1:return e==t.s?n.return():(t.s=e,t.a.Kb(),w(n,t.a.destroy(),2));case 2:t.a=null,t.a=new ar(e,(function(){return vr(t)}),(function(){return br(t)}),(function(e,n){return Ar(t,e,n)}),(function(){return _r(t)}),(function(){return yr(t)})),t.a.init(),S(n)}}))}))},mr.prototype.changeReceiverId=mr.prototype.He,mr.prototype.Kb=function(){this.a.Kb()},mr.prototype.forceDisconnect=mr.prototype.Kb,mr.prototype.B=function(e){if("addEventListener"==e)return this.f.addEventListener.bind(this.f);if("removeEventListener"==e)return this.f.removeEventListener.bind(this.f);if(this.a.ga()&&0==Object.keys(this.a.a.video).length){var t=this.c[e];if("function"!=typeof t)return t}return this.a.ga()?this.a.get("video",e):("function"==typeof(e=this.c[e])&&(e=e.bind(this.c)),e)},mr.prototype.F=function(e,t){this.a.ga()?this.a.set("video",e,t):this.c[e]=t},mr.prototype.D=function(e){this.a.ga()||this.f.dispatchEvent(new we(e.type,e))},mr.prototype.u=function(e){this.a.ga()||this.g.dispatchEvent(e)},G(Er,ke),V("shaka.cast.CastReceiver",Er),Er.prototype.isConnected=function(){return this.u},Er.prototype.isConnected=Er.prototype.isConnected,Er.prototype.vf=function(){return this.h},Er.prototype.isIdle=Er.prototype.vf,Er.prototype.destroy=function(){var e=this;return p((function t(){var n;return M(t,(function(t){switch(t.j){case 1:return e.c&&(e.c.release(),e.c=null),n=[],e.b&&(n.push(e.b.destroy()),e.b=null),e.B&&(e.B.stop(),e.B=null),e.a=null,e.D=null,e.s=null,e.u=!1,e.h=!0,e.f=null,e.i=null,w(t,Promise.all(n),2);case 2:cast.receiver.CastReceiverManager.getInstance().stop(),S(t)}}))}))},Er.prototype.destroy=Er.prototype.destroy,(r=Er.prototype).ee=function(){this.g=0,this.l=!0,this.u=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Tr(this)},r.je=function(e,t){this.b&&(wr(this),Cr(this,{type:"event",targetName:e,event:t},this.f))},r.Oe=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Cr(this,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},this.f),Cr(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)},r.Kf=function(e){var t=ir(e.data);switch(t.type){case"init":this.g=0,this.m=!1,this.l=!0,function(e,t,n){for(var r in t.player)e.b[r](t.player[r]);e.s(n),n=Promise.resolve();var i=e.a.autoplay;t.manifest&&(e.a.autoplay=!1,n=e.b.load(t.manifest,t.startTime)),n.then((function(){if(e.b){for(var n in t.video)e.a[n]=t.video[n];for(var r in t.playerAfterLoad)e.b[r](t.playerAfterLoad[r]);e.a.autoplay=i,t.manifest&&(e.a.play(),xr(e,0))}}),(function(t){e.b.dispatchEvent(new we("error",{detail:t}))}))}(this,t.initState,t.appData),wr(this);break;case"appData":this.s(t.appData);break;case"set":var n=t.targetName,r=t.property;if(t=t.value,"video"==n){var i=cast.receiver.CastReceiverManager.getInstance();if("volume"==r){i.setSystemVolumeLevel(t);break}if("muted"==r){i.setSystemVolumeMuted(t);break}}this.D[n][r]=t;break;case"call":(n=this.D[t.targetName])[t.methodName].apply(n,t.args);break;case"asyncCall":n=t.targetName,r=t.methodName,"player"==n&&"load"==r&&(this.g=0,this.m=!1),i=t.id,e=e.senderId;var a=this.D[n];t=a[r].apply(a,t.args),"player"==n&&"load"==r&&(t=t.then(function(){this.l=!0}.bind(this))),t.then(this.oe.bind(this,e,i,null),this.oe.bind(this,e,i))}},r.Af=function(e){var t=ir(e.data);switch(t.type){case"PLAY":this.a.play(),xr(this,0);break;case"PAUSE":this.a.pause(),xr(this,0);break;case"SEEK":e=t.currentTime;var n=t.resumeState;null!=e&&(this.a.currentTime=Number(e)),n&&"PLAYBACK_START"==n?(this.a.play(),xr(this,0)):n&&"PLAYBACK_PAUSE"==n&&(this.a.pause(),xr(this,0));break;case"STOP":this.b.Cd().then(function(){this.b&&xr(this,0)}.bind(this));break;case"GET_STATUS":xr(this,Number(t.requestId));break;case"VOLUME":e=(n=t.volume).level,n=n.muted;var r=this.a.volume,i=this.a.muted;null!=e&&(this.a.volume=Number(e)),null!=n&&(this.a.muted=n),r==this.a.volume&&i==this.a.muted||xr(this,0);break;case"LOAD":this.g=0,this.l=this.m=!1,e=t.media,n=t.currentTime,r=this.F(e.contentId),i=t.autoplay||!0,this.s(e.customData),i&&(this.a.autoplay=!0),this.b.load(r,n).then(function(){this.b&&kr(this)}.bind(this)).catch(function(e){var n="LOAD_FAILED";7==e.category&&7e3==e.code&&(n="LOAD_CANCELLED"),Cr(this,{requestId:Number(t.requestId),type:n},this.i)}.bind(this));break;default:Cr(this,{requestId:Number(t.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}},r.oe=function(e,t,n){this.b&&Cr(this,{type:"asyncComplete",id:t,error:n},this.f,e)};var Rr={IDLE:"IDLE",ze:"PLAYING",we:"BUFFERING",ye:"PAUSED"};function Lr(e,t){this.J=e,this.b=t==Ir,this.a=0}V("shaka.util.DataViewReader",Lr);var Ir=1;function Pr(){throw new me(2,3,3e3)}function jr(){this.c=[],this.b=[],this.a=!1}function Or(e){for(var t=null!=e.flags?12:8;e.reader.ua()&&!e.parser.a;)e.parser.sc(e.start+t,e.reader,e.partialOkay)}function Dr(e){for(var t=null!=e.flags?12:8,n=e.reader.G();0<n&&!e.parser.a;--n)e.parser.sc(e.start+t,e.reader,e.partialOkay)}function Mr(e){return function(t){e(t.reader.Za(t.reader.J.byteLength-t.reader.ca()))}}function Nr(e){for(var t=0,n=0;n<e.length;n++)t=t<<8|e.charCodeAt(n);return t}function Ur(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Fr(e){var t=this;this.a=[],this.b=[],this.data=[],(new jr).H("moov",Or).fa("pssh",(function(e){if(!(1<e.version)){var n=e.reader.J;if(n=new Uint8Array(n.buffer,n.byteOffset-12,e.size),t.data.push(n),t.a.push(ht.Ac(e.reader.Za(16))),0<e.version){n=e.reader.G();for(var r=0;r<n;++r){var i=ht.Ac(e.reader.Za(16));t.b.push(i)}}}})).parse(e)}Lr.Endianness={Bg:0,Dg:Ir},Lr.prototype.ua=function(){return this.a<this.J.byteLength},Lr.prototype.hasMoreData=Lr.prototype.ua,Lr.prototype.ca=function(){return this.a},Lr.prototype.getPosition=Lr.prototype.ca,Lr.prototype.Ve=function(){return this.J.byteLength},Lr.prototype.getLength=Lr.prototype.Ve,Lr.prototype.la=function(){try{var e=this.J.getUint8(this.a);return this.a+=1,e}catch(e){Pr()}},Lr.prototype.readUint8=Lr.prototype.la,Lr.prototype.Tb=function(){try{var e=this.J.getUint16(this.a,this.b);return this.a+=2,e}catch(e){Pr()}},Lr.prototype.readUint16=Lr.prototype.Tb,Lr.prototype.G=function(){try{var e=this.J.getUint32(this.a,this.b);return this.a+=4,e}catch(e){Pr()}},Lr.prototype.readUint32=Lr.prototype.G,Lr.prototype.ke=function(){try{var e=this.J.getInt32(this.a,this.b);return this.a+=4,e}catch(e){Pr()}},Lr.prototype.readInt32=Lr.prototype.ke,Lr.prototype.Bb=function(){try{if(this.b)var e=this.J.getUint32(this.a,!0),t=this.J.getUint32(this.a+4,!0);else t=this.J.getUint32(this.a,!1),e=this.J.getUint32(this.a+4,!1)}catch(e){Pr()}if(2097151<t)throw new me(2,3,3001);return this.a+=8,t*Math.pow(2,32)+e},Lr.prototype.readUint64=Lr.prototype.Bb,Lr.prototype.Za=function(e){this.a+e>this.J.byteLength&&Pr();var t=new Uint8Array(this.J.buffer,this.J.byteOffset+this.a,e);return this.a+=e,t},Lr.prototype.readBytes=Lr.prototype.Za,Lr.prototype.M=function(e){this.a+e>this.J.byteLength&&Pr(),this.a+=e},Lr.prototype.skip=Lr.prototype.M,Lr.prototype.me=function(e){this.a<e&&Pr(),this.a-=e},Lr.prototype.rewind=Lr.prototype.me,Lr.prototype.seek=function(e){(0>e||e>this.J.byteLength)&&Pr(),this.a=e},Lr.prototype.seek=Lr.prototype.seek,Lr.prototype.md=function(){for(var e=this.a;this.ua()&&0!=this.J.getUint8(this.a);)this.a+=1;return e=new Uint8Array(this.J.buffer,this.J.byteOffset+e,this.a-e),this.a+=1,ot(e)},Lr.prototype.readTerminatedString=Lr.prototype.md,V("shaka.util.Mp4Parser",jr),jr.prototype.H=function(e,t){var n=Nr(e);return this.c[n]=0,this.b[n]=t,this},jr.prototype.box=jr.prototype.H,jr.prototype.fa=function(e,t){var n=Nr(e);return this.c[n]=1,this.b[n]=t,this},jr.prototype.fullBox=jr.prototype.fa,jr.prototype.stop=function(){this.a=!0},jr.prototype.stop=jr.prototype.stop,jr.prototype.parse=function(e,t){var n=new Uint8Array(e);for(n=new Lr(new DataView(n.buffer,n.byteOffset,n.byteLength),0),this.a=!1;n.ua()&&!this.a;)this.sc(0,n,t)},jr.prototype.parse=jr.prototype.parse,jr.prototype.sc=function(e,t,n){var r=t.ca(),i=t.G(),a=t.G();switch(i){case 0:i=t.J.byteLength-r;break;case 1:i=t.Bb()}var o=this.b[a];if(o){var s=null,l=null;1==this.c[a]&&(s=(l=t.G())>>>24,l&=16777215),a=r+i,n&&a>t.J.byteLength&&(a=t.J.byteLength),a-=t.ca(),t=0<a?t.Za(a):new Uint8Array(0),o({parser:this,partialOkay:n||!1,version:s,flags:l,reader:t=new Lr(new DataView(t.buffer,t.byteOffset,t.byteLength),0),size:i,start:r+e})}else t.M(Math.min(r+i-t.ca(),t.J.byteLength-t.ca()))},jr.prototype.parseNext=jr.prototype.sc,jr.children=Or,jr.sampleDescription=Dr,jr.allData=Mr,jr.typeToString=Ur;var Br={gc:function(e,t){var n=Br.P(e,t);return 1!=n.length?null:n[0]},Oc:function(e,t,n){return 1!=(e=Br.Od(e,t,n)).length?null:e[0]},P:function(e,t){return Array.prototype.filter.call(e.childNodes,(function(e){return e instanceof Element&&e.tagName==t}))},Od:function(e,t,n){return Array.prototype.filter.call(e.childNodes,(function(e){return e instanceof Element&&e.localName==n&&e.namespaceURI==t}))},getAttributeNS:function(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null},ic:function(e){return Array.prototype.every.call(e.childNodes,(function(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}))?e.textContent.trim():null},I:function(e,t,n,r){r=void 0===r?null:r;var i=null;return null!=(e=e.getAttribute(t))&&(i=n(e)),null==i?r:i},Of:function(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:Math.floor(e/1e3)):null},Ea:function(e){return e&&(e=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(e))?(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null):null},uc:function(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null},parseInt:function(e){return 0==(e=Number(e))%1?e:null},tc:function(e){return 0==(e=Number(e))%1&&0<e?e:null},yb:function(e){return 0==(e=Number(e))%1&&0<=e?e:null},parseFloat:function(e){return e=Number(e),isNaN(e)?null:e},Me:function(e){var t;return e=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e),isNaN(e)?null:e},he:function(e,t){var n=new DOMParser;try{var r=n.parseFromString(e,"text/xml")}catch(e){}if(r&&r.documentElement.tagName==t)var i=r.documentElement;return i&&0<i.getElementsByTagName("parsererror").length?null:i},ge:function(e,t){try{var n=ot(e);return Br.he(n,t)}catch(e){}}},Kr=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");function Vr(e,t,n){var r=function(e){for(var t=[],n=(e=f(e)).next();!n.done;n=e.next())(n=Yr(n.value))&&t.push(n);return t}(e),i=null;e=[];var a=[],o=new Set(r.map((function(e){return e.keyId})));if(o.delete(null),1<o.size)throw new me(2,4,4010);if(n||(a=r.filter((function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.ne||(i=e.init||i,!1)}))).length&&0==(e=function(e,t,n){for(var r=[],i=(n=f(n)).next();!i.done;i=n.next()){i=i.value;var a=Kr.get(i.ne);if(a){var o;if(o=Br.Oc(i.node,"urn:microsoft:playready","pro")){o=ht.Ba(o.textContent);var s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),l=o.length,u=s.length+16+l,c=new ArrayBuffer(u),d=new Uint8Array(c);c=new DataView(c);var h=0;c.setUint32(h,u),h+=4,c.setUint32(h,1886614376),h+=4,c.setUint32(h,0),h+=4,d.set(s,h),h+=s.length,c.setUint32(h,l),h+=4,d.set(o,h),o=[{initData:d,initDataType:"cenc",keyId:i.keyId}]}else o=null;o=Ht(a,i.init||e||o),(a=Hr.get(a))&&(o.licenseServerUri=a(i)),r.push(o)}else for(i=f(i=t(i.node)||[]),a=i.next();!a.done;a=i.next())r.push(a.value)}return r}(i,t,a)).length&&(e=[Ht("",i)]),r.length&&(n||!a.length))for(e=[],n=(t=f(Kr.values())).next();!n.done;n=t.next())"org.w3.clearkey"!=(n=n.value)&&e.push(Ht(n,i));if(o=Array.from(o)[0]||null)for(n=(t=f(e)).next();!n.done;n=t.next())for(r=(n=f(n.value.initData)).next();!r.done;r=n.next())r.value.keyId=o;return{Kd:o,Fg:i,drmInfos:e,Pd:!0}}var Gr,Hr=(new Map).set("com.widevine.alpha",(function(e){return(e=Br.Oc(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",(function(e){return(e=Br.Oc(e.node,"urn:microsoft:playready","pro"))&&(e=function(e){var t=0,n=new DataView(e).getUint32(t,!0);if(n!==e.byteLength)return[];t+=6,n=[];for(var r=new DataView(e);t<e.byteLength-1;){var i=r.getUint16(t,!0);t+=2;var a=r.getUint16(t,!0);t+=2;var o=new Uint8Array(e,t,a);n.push({type:i,value:o}),t+=a}return n}((e=ht.Ba(e.textContent)).buffer).filter((function(e){return 1===e.type}))[0])?(e=st(e.value,!0),(e=Br.he(e,"WRMHEADER"))?function(e){return(e=e.querySelector("DATA > LA_URL"))?e.textContent:""}(e):""):""}));function Yr(e){var t=e.getAttribute("schemeIdUri"),n=Br.getAttributeNS(e,"urn:mpeg:cenc:2013","default_KID"),r=Br.Od(e,"urn:mpeg:cenc:2013","pssh").map(Br.ic);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new me(2,4,4009);var i=[];try{i=r.map((function(e){return{initDataType:"cenc",initData:ht.Ba(e),keyId:null}}))}catch(e){throw new me(2,4,4007)}return{node:e,ne:t,keyId:n,init:0<i.length?i:null}}function zr(t,n,r,i,a){var o={RepresentationID:n,Number:r,Bandwidth:i,Time:a};return t.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,n,r,i){if("$$"==t)return"$";var a=o[n];if(null==a)return t;switch("RepresentationID"==n&&r&&(r=void 0),"Time"==n&&(a=Math.round(a)),i){case void 0:case"d":case"i":case"u":t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase();break;default:t=a.toString()}return r=e.parseInt(r,10)||1,Array(Math.max(0,r-t.length)+1).join("0")+t}))}function Wr(e,t){var n=$r(e,t,"timescale"),r=1;n&&(r=Br.tc(n)||1),n=$r(e,t,"duration"),(n=Br.tc(n||""))&&(n/=r);var i=$r(e,t,"startNumber"),a=Number($r(e,t,"presentationTimeOffset"))||0,o=Br.yb(i||"");null!=i&&null!=o||(o=1);var s=qr(e,t,"SegmentTimeline");if(i=null,s){i=r;var l=e.T.duration||1/0;s=Br.P(s,"S");for(var u=[],c=0,d=0;d<s.length;++d){var f=s[d],h=Br.I(f,"t",Br.yb),p=Br.I(f,"d",Br.yb);if(f=Br.I(f,"r",Br.parseInt),null!=h&&(h-=a),!p)break;if(h=null!=h?h:c,0>(f=f||0))if(d+1<s.length){if(null==(f=Br.I(s[d+1],"t",Br.yb)))break;if(h>=f)break;f=Math.ceil((f-h)/p)-1}else{if(1/0==l)break;if(h/i>=l)break;f=Math.ceil((l*i-h)/p)-1}0<u.length&&h!=c&&(u[u.length-1].end=h/i);for(var m=0;m<=f;++m)c=h+p,u.push({start:h/i,end:c/i,xg:h}),h=c}i=u}return{timescale:r,Z:n,ab:o,ma:a/r||0,Dd:a,N:i}}function $r(e,t,n){return[t(e.C),t(e.aa),t(e.ka)].filter(Vt.Ia).map((function(e){return e.getAttribute(n)})).reduce((function(e,t){return e||t}))}function qr(e,t,n){return[t(e.C),t(e.aa),t(e.ka)].filter(Vt.Ia).map((function(e){return Br.gc(e,n)})).reduce((function(e,t){return e||t}))}function Xr(e,t,n,r,i,a){if(a=void 0===a?0:a,Br.getAttributeNS(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,r,i,a){for(var o=Br.getAttributeNS(e,"http://www.w3.org/1999/xlink","href"),s=Br.getAttributeNS(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<e.attributes.length;l++){var u=e.attributes[l];"http://www.w3.org/1999/xlink"==u.namespaceURI&&(e.removeAttributeNS(u.namespaceURI,u.localName),--l)}if(5<=a)return ve(new me(2,4,4028));if("onLoad"!=s)return ve(new me(2,4,4027));var c=Gt([r],[o]);return i.request(0,Me(c,t)).U((function(r){if(!(r=Br.ge(r.data,e.tagName)))return ve(new me(2,4,4001,o));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;r.childNodes.length;){var s=r.childNodes[0];r.removeChild(s),e.appendChild(s)}for(s=0;s<r.attributes.length;s++){var l=r.attributes[s].nodeName,u=r.getAttribute(l);e.setAttribute(l,u)}return Xr(e,t,n,c[0],i,a+1)}))}(e,t,n,r,i,a);return n&&(o=o.U(void 0,(function(){return Xr(e,t,n,r,i,a)}))),o}o=[];for(var s=0;s<e.childNodes.length;s++){var l=e.childNodes[s];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Br.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(e.removeChild(l),--s):"SegmentTimeline"!=l.tagName&&o.push(Xr(l,t,n,r,i,a)))}return Ee(o).U((function(){return e}))}function Jr(e,t,n){this.c=e,this.b=t,this.a=n}function Qr(e,t,n,r,i,a){this.position=e,this.startTime=t,this.endTime=n,this.c=r,this.b=i,this.a=a}function Zr(e,t,n,r){var i,a=(new jr).fa("sidx",(function(e){i=function(e,t,n,r){var i=[];r.reader.M(4);var a=r.reader.G();if(0==a)throw new me(2,3,3005);if(0==r.version)var o=r.reader.G(),s=r.reader.G();else o=r.reader.Bb(),s=r.reader.Bb();r.reader.M(2);var l=r.reader.Tb();for(e=e+r.size+s,s=0;s<l;s++){var u=r.reader.G(),c=(2147483648&u)>>>31;u&=2147483647;var d=r.reader.G();if(r.reader.M(4),1==c)throw new me(2,3,3006);i.push(new Qr(i.length,o/a-t,(o+d)/a-t,(function(){return n}),e,e+u-1)),o+=d,e+=u}return r.parser.stop(),i}(t,r,n,e)}));if(e&&a.parse(e),i)return i;throw new me(2,3,3004)}function ei(e){this.a=e}function ti(e,t){for(;e.a.length&&e.a[e.a.length-1].startTime>=t;)e.a.pop();for(;e.a.length&&0>=e.a[0].endTime;)e.a.shift();if(0!=e.a.length){var n=e.a[e.a.length-1];e.a[e.a.length-1]=new Qr(n.position,n.startTime,t,n.c,n.b,n.a)}}function ni(e){this.b=e,this.a=new Lr(e,0),Gr||(Gr=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function ri(e){var t=ii(e);if(7<t.length)throw new me(2,3,3002);for(var n=0,r=0;r<t.length;r++)n=256*n+t[r];t=n,n=ii(e);e:{r=ht.za;for(var i=0;i<Gr.length;i++)if(r(n,Gr[i])){r=!0;break e}r=!1}if(r)n=e.b.byteLength-e.a.ca();else{if(8==n.length&&224&n[1])throw new me(2,3,3001);for(r=n[0]&(1<<8-n.length)-1,i=1;i<n.length;i++)r=256*r+n[i];n=r}return n=e.a.ca()+n<=e.b.byteLength?n:e.b.byteLength-e.a.ca(),r=new DataView(e.b.buffer,e.b.byteOffset+e.a.ca(),n),e.a.M(n),new ai(t,r)}function ii(e){var t,n=e.a.la();for(t=1;8>=t&&!(n&1<<8-t);t++);if(8<t)throw new me(2,3,3002);var r=new Uint8Array(t);for(r[0]=n,n=1;n<t;n++)r[n]=e.a.la();return r}function ai(e,t){this.id=e,this.a=t}function oi(e){if(8<e.a.byteLength)throw new me(2,3,3002);if(8==e.a.byteLength&&224&e.a.getUint8(0))throw new me(2,3,3001);for(var t=0,n=0;n<e.a.byteLength;n++)t=256*t+e.a.getUint8(n);return t}function si(){}function li(e){var t=new ni(e.a);if(179!=(e=ri(t)).id)throw new me(2,3,3013);if(e=oi(e),183!=(t=ri(t)).id)throw new me(2,3,3012);t=new ni(t.a);for(var n=0;t.ua();){var r=ri(t);if(241==r.id){n=oi(r);break}}return{yg:e,Vf:n}}function ui(e,t){var n=qr(e,t,"Initialization");if(!n)return null;var r=e.C.qa,i=n.getAttribute("sourceURL");i&&(r=Gt(e.C.qa,[i])),i=0;var a=null;return(n=Br.I(n,"range",Br.uc))&&(i=n.start,a=n.end),new Jr((function(){return r}),i,a)}function ci(e,t,n,r,i,a,o,s){var l=e.presentationTimeline,u=!e.mb||!e.T.Zc,c=e.T.start,d=e.T.duration,f=t,h=null;return{createSegmentIndex:function(){var e=[f(r,i,a),"webm"==o?f(n.c(),n.b,n.a):null];return f=null,Promise.all(e).then((function(e){var t=e[0];e=e[1]||null,t="mp4"==o?Zr(t,i,r,s):(new si).parse(t,e,r,s),l.vb(t,c),h=new ei(t),u&&ti(h,d)}))},findSegmentPosition:function(e){return h.find(e)},getSegmentReference:function(e){return h.get(e)}}}function di(e){return e.Ub}function fi(e,t){var n=ui(e,hi),r=function(e){return[e.C.La,e.aa.La,e.ka.La].filter(Vt.Ia).map((function(e){return Br.P(e,"SegmentURL")})).reduce((function(e,t){return 0<e.length?e:t})).map((function(t){return t.getAttribute("indexRange")&&!e.Vd&&(e.Vd=!0),{xf:t.getAttribute("media"),start:(t=Br.I(t,"mediaRange",Br.uc,{start:0,end:null})).start,end:t.end}}))}(e),i=Wr(e,hi),a=i.ab;0==a&&(a=1);var o=0;if(i.Z?o=i.Z*(a-1):i.N&&0<i.N.length&&(o=i.N[0].start),!(r={Z:i.Z,startTime:o,ab:a,ma:i.ma,N:i.N,tb:r}).Z&&!r.N&&1<r.tb.length)throw new me(2,4,4002);if(!r.Z&&!e.T.duration&&!r.N&&1==r.tb.length)throw new me(2,4,4002);if(r.N&&0==r.N.length)throw new me(2,4,4002);return a=i=null,e.ka.id&&e.C.id&&(i=t[a=e.ka.id+","+e.C.id]),o=function(e,t,n,r){var i=r.tb.length;r.N&&r.N.length!=r.tb.length&&(i=Math.min(r.N.length,r.tb.length));for(var a=[],o=r.startTime,s=0;s<i;s++){var l,u=r.tb[s],c=Gt(n,[u.xf]);l=null!=r.Z?o+r.Z:r.N?r.N[s].end:o+e,a.push(new Qr(s+t,o,l,function(e){return e}.bind(null,c),u.start,u.end)),o=l}return a}(e.T.duration,r.ab,e.C.qa,r),i?(i.cd(o),a=e.presentationTimeline.Ob(),i.Lc(a-e.T.start)):(e.presentationTimeline.vb(o,e.T.start),i=new ei(o),a&&e.mb&&(t[a]=i)),e.mb&&e.T.Zc||ti(i,e.T.duration),{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:i.find.bind(i),getSegmentReference:i.get.bind(i),initSegmentReference:n,ma:r.ma}}function hi(e){return e.La}function pi(e,t,n,r){var i=function(e){var t=$r(e,mi,"initialization");if(!t)return null;var n=e.C.id,r=e.bandwidth||null,i=e.C.qa;return new Jr((function(){var e=zr(t,n,null,r,null);return Gt(i,[e])}),0,null)}(e),a=Wr(e,mi),o=$r(e,mi,"media"),s=$r(e,mi,"index");if(o=(a={Z:a.Z,timescale:a.timescale,ab:a.ab,ma:a.ma,Dd:a.Dd,N:a.N,ad:o,Qb:s}).Qb?1:0,o+=a.N?1:0,0==(o+=a.Z?1:0))throw new me(2,4,4002);if(1!=o&&(a.Qb&&(a.N=null),a.Z=null),!a.Qb&&!a.ad)throw new me(2,4,4002);if(a.Qb){if("mp4"!=(n=e.C.mimeType.split("/")[1])&&"webm"!=n)throw new me(2,4,4006);if("webm"==n&&!i)throw new me(2,4,4005);r=zr(a.Qb,e.C.id,null,e.bandwidth||null,null),e=ci(e,t,i,r=Gt(e.C.qa,[r]),0,null,n,a.ma)}else a.Z?(r||(e.presentationTimeline.ed(a.Z),e.presentationTimeline.fd(e.T.start)),e=function(e,t){var n=e.T.duration,r=t.Z,i=t.ab,a=t.timescale,o=t.ad,s=e.bandwidth||null,l=e.C.id,u=e.C.qa;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(e){return 0>e||n&&e>=n?null:Math.floor(e/r)},getSegmentReference:function(e){var t=e*r,c=t+r;return n&&(c=Math.min(c,n)),0>c||n&&t>=n?null:new Qr(e,t,c,(function(){var n=zr(o,l,e+i,s,t*a);return Gt(u,[n])}),0,null)}}}(e,a)):(o=t=null,e.ka.id&&e.C.id&&(t=n[o=e.ka.id+","+e.C.id]),s=function(e,t){for(var n=[],r=0;r<t.N.length;r++){var i=r+t.ab;n.push(new Qr(i,t.N[r].start,t.N[r].end,function(e,t,n,r,i,a){return Gt(r,[e=zr(e,t,i,n,a)]).map((function(e){return e.toString()}))}.bind(null,t.ad,e.C.id,e.bandwidth||null,e.C.qa,i,t.N[r].xg+t.Dd),0,null))}return n}(e,a),r=!e.mb||!e.T.Zc,t?(r&&ti(new ei(s),e.T.duration),t.cd(s),n=e.presentationTimeline.Ob(),t.Lc(n-e.T.start)):(e.presentationTimeline.vb(s,e.T.start),t=new ei(s),o&&e.mb&&(n[o]=t)),r&&ti(t,e.T.duration),e={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:t.find.bind(t),getSegmentReference:t.get.bind(t)});return{createSegmentIndex:e.createSegmentIndex,findSegmentPosition:e.findSegmentPosition,getSegmentReference:e.getSegmentReference,initSegmentReference:i,ma:a.ma}}function mi(e){return e.Wb}V("shaka.media.InitSegmentReference",Jr),Jr.prototype.Ic=function(){return this.c()},Jr.prototype.createUris=Jr.prototype.Ic,Jr.prototype.Uc=function(){return this.b},Jr.prototype.getStartByte=Jr.prototype.Uc,Jr.prototype.Tc=function(){return this.a},Jr.prototype.getEndByte=Jr.prototype.Tc,V("shaka.media.SegmentReference",Qr),Qr.prototype.ca=function(){return this.position},Qr.prototype.getPosition=Qr.prototype.ca,Qr.prototype.kc=function(){return this.startTime},Qr.prototype.getStartTime=Qr.prototype.kc,Qr.prototype.Te=function(){return this.endTime},Qr.prototype.getEndTime=Qr.prototype.Te,Qr.prototype.Ic=function(){return this.c()},Qr.prototype.createUris=Qr.prototype.Ic,Qr.prototype.Uc=function(){return this.b},Qr.prototype.getStartByte=Qr.prototype.Uc,Qr.prototype.Tc=function(){return this.a},Qr.prototype.getEndByte=Qr.prototype.Tc,V("shaka.media.SegmentIndex",ei),ei.prototype.destroy=function(){return this.a=null,Promise.resolve()},ei.prototype.destroy=ei.prototype.destroy,ei.prototype.find=function(e){for(var t=this.a.length-1;0<=t;--t){var n=this.a[t];if(e>=n.startTime&&e<n.endTime)return n.position}return this.a.length&&e<this.a[0].startTime?this.a[0].position:null},ei.prototype.find=ei.prototype.find,ei.prototype.get=function(e){return 0==this.a.length||0>(e-=this.a[0].position)||e>=this.a.length?null:this.a[e]},ei.prototype.get=ei.prototype.get,ei.prototype.offset=function(e){for(var t=0;t<this.a.length;++t)this.a[t].startTime+=e,this.a[t].endTime+=e},ei.prototype.offset=ei.prototype.offset,ei.prototype.cd=function(e){for(var t=[],n=0,r=0;n<this.a.length&&r<e.length;){var i=this.a[n],a=e[r];i.startTime<a.startTime?(t.push(i),n++):(i.startTime>a.startTime?0==n&&t.push(a):(.1<Math.abs(i.endTime-a.endTime)?t.push(new Qr(i.position,a.startTime,a.endTime,a.c,a.b,a.a)):t.push(i),n++),r++)}for(;n<this.a.length;)t.push(this.a[n++]);if(t.length)for(n=t[t.length-1].position+1;r<e.length;)i=new Qr(n++,(i=e[r++]).startTime,i.endTime,i.c,i.b,i.a),t.push(i);else t=e;this.a=t},ei.prototype.merge=ei.prototype.cd,ei.prototype.Lc=function(e){for(var t=0;t<this.a.length;++t)if(this.a[t].endTime>e)return void this.a.splice(0,t);this.a=[]},ei.prototype.evict=ei.prototype.Lc,ni.prototype.ua=function(){return this.a.ua()},si.prototype.parse=function(e,t,n,r){var i;if(440786851!=ri(t=new ni(new DataView(t))).id)throw new me(2,3,3008);var a=ri(t);if(408125543!=a.id)throw new me(2,3,3009);for(t=a.a.byteOffset,a=new ni(a.a),i=null;a.ua();){var o=ri(a);if(357149030==o.id){i=o;break}}if(!i)throw new me(2,3,3010);for(a=new ni(i.a),i=1e6,o=null;a.ua();){var s=ri(a);if(2807729==s.id)i=oi(s);else if(17545==s.id)if(4==(o=s).a.byteLength)o=o.a.getFloat32(0);else{if(8!=o.a.byteLength)throw new me(2,3,3003);o=o.a.getFloat64(0)}}if(null==o)throw new me(2,3,3011);if(i=o*(a=i/1e9),475249515!=(e=ri(new ni(new DataView(e)))).id)throw new me(2,3,3007);return function(e,t,n,r,i,a){function o(){return i}var s=[];e=new ni(e.a);for(var l=null,u=null;e.ua();){var c=ri(e);if(187==c.id){var d=li(c);d&&(c=n*d.yg,d=t+d.Vf,null!=l&&s.push(new Qr(s.length,l-a,c-a,o,u,d-1)),l=c,u=d)}}return null!=l&&s.push(new Qr(s.length,l-a,r-a,o,u,null)),s}(e,t,a,i,n,r)};var gi={zb:{},Sb:{},pd:function(e,t){gi.Sb[e]=t}};function yi(e,t,n){this.f=e,this.vc=t,this.h=this.g=1/0,this.a=1,this.b=this.c=null,this.l=0,this.m=!0,this.i=0,this.s=void 0===n||n}function vi(e,t,n,r){return e=Me(e,r),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function bi(){var e=this;this.b=this.a=null,this.f=[],this.c=null,this.l=[],this.h=1,this.m={},this.s=0,this.u=new H(5),this.i=new fe((function(){!function(e){p((function t(){var n,r;return M(t,(function(t){switch(t.j){case 1:return n=0,k(t,2),w(t,_i(e),4);case 4:n=t.o,x(t,3);break;case 2:r=R(t),e.b&&(r.severity=1,e.b.onError(r));case 3:if(!e.b)return t.return();wi(e,n),S(t)}}))}))}(e)})),this.g=new Ie}function _i(e){var t=Date.now(),n=e.b.networkingEngine.request(0,Me(e.f,e.a.retryParameters));return Pe(e.g,n),n.promise.then((function(t){if(e.b)return t.uri&&!e.f.includes(t.uri)&&e.f.unshift(t.uri),function(e,t,n){if(!(t=Br.ge(t,"MPD")))throw new me(2,4,4001,n);return t=Xr(t,e.a.retryParameters,e.a.dash.xlinkFailGracefully,n,e.b.networkingEngine),Pe(e.g,t),t.promise.then((function(t){return function(e,t,n){return p((function r(){var i,a,o,s,l,u,c,d,f,h,p,m,g,y,v,b,_,A,E,T,k,C,x,R;return M(r,(function(r){switch(r.j){case 1:s=Vt,u=[n],0<(c=(l=Br).P(t,"Location").map(l.ic).filter(s.Ia)).length&&(d=Gt(u,c),u=e.f=d),f=l.P(t,"BaseURL").map(l.ic),h=Gt(u,f),p=e.a.dash.ignoreMinBufferTime,m=0,p||(m=l.I(t,"minBufferTime",l.Ea)),e.s=l.I(t,"minimumUpdatePeriod",l.Ea,-1),g=l.I(t,"availabilityStartTime",l.Of),y=l.I(t,"timeShiftBufferDepth",l.Ea),v=l.I(t,"maxSegmentDuration",l.Ea),b=t.getAttribute("type")||"static",_=e.a.dash.ignoreSuggestedPresentationDelay,A=null,_||(A=l.I(t,"suggestedPresentationDelay",l.Ea)),e.c?E=e.c.presentationTimeline:(T=Math.max(e.a.dash.defaultPresentationDelay,1.5*m),E=new yi(g,null!=A?A:T,e.a.dash.autoCorrectDrift));for(var L={mb:"static"!=b,presentationTimeline:E,ka:null,T:null,aa:null,C:null,bandwidth:0,Vd:!1},I=h,P=Br.I(t,"mediaPresentationDuration",Br.Ea),j=[],O=0,D=Br.P(t,"Period"),M=0;M<D.length;M++){var N=D[M];O=Br.I(N,"start",Br.Ea,O);var U=Br.I(N,"duration",Br.Ea),F=null;if(M!=D.length-1){var B=Br.I(D[M+1],"start",Br.Ea);null!=B&&(F=B-O)}else null!=P&&(F=P-O);if(null==F&&(F=U),N=Ai(e,L,I,{start:O,duration:F,node:N,Zc:null==F||M==D.length-1}),j.push(N),U=L.ka.id,e.l.includes(U)||(e.l.push(U),e.c&&(e.b.filterNewPeriod(N),e.c.periods.push(N))),null==F){O=null;break}O+=F}if(null==e.c&&e.b.filterAllPeriods(j),null!=P?(i=j,a=P,o=!1):(i=j,a=O,o=!0),k=a,C=i,E.Xb("static"==b),"static"!=b&&o||E.xa(k||1/0),E.V()&&!isNaN(e.a.availabilityWindowOverride)&&(y=e.a.availabilityWindowOverride),null==y&&(y=1/0),E.xd(y),E.ed(v||1),e.c){r.A(0);break}if(e.c={presentationTimeline:E,periods:C,offlineSessionIds:[],minBufferTime:m||0},!E.ue()){r.A(0);break}return x=l.P(t,"UTCTiming"),w(r,function(e,t,n){n=n.map((function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}}));var r=e.a.dash.clockSyncUri;return!n.length&&r&&n.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),Vt.Ke(n,function(e){var n=e.scheme;switch(e=e.value,n){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return ki(this,t,e,"HEAD");case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return ki(this,t,e,"GET");case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return n=Date.parse(e),isNaN(n)?0:n-Date.now();case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":return q("NTP UTCTiming scheme is not supported"),Promise.reject();default:return q("Unrecognized scheme in UTCTiming element",n),Promise.reject()}}.bind(e)).catch((function(){return q("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),0}))}(e,h,x),4);case 4:if(R=r.o,!e.b)return r.return();E.pe(R),S(r)}}))}))}(e,t,n)}))}(e,t.data,t.uri)})).then((function(){var n=(Date.now()-t)/1e3;return Y(e.u,1,n),n}))}function Ai(e,t,n,r){if(t.ka=Si(r.node,null,n),t.T=r,t.ka.id||(t.ka.id="__shaka_period_"+r.start),Br.P(r.node,"EventStream").forEach(e.Pf.bind(e,r.start,r.duration)),n=Br.P(r.node,"AdaptationSet").map(e.Nf.bind(e,t)).filter(Vt.Ia),t.mb){t=[];for(var i=f(n),a=i.next();!a.done;a=i.next())for(var o=(a=f(a.value.Yf)).next();!o.done;o=a.next())t.push(o.value);if(t.length!=new Set(t).size)throw new me(2,4,4018)}var s=n.filter((function(e){return!e.Bd}));if(n.filter((function(e){return e.Bd})).forEach((function(e){var t=e.streams[0],n=e.Bd;s.forEach((function(e){e.id==n&&e.streams.forEach((function(e){e.trickModeVideo=t}))}))})),t=Ei(s,"video"),i=Ei(s,"audio"),!t.length&&!i.length)throw new me(2,4,4004);for(n=e.a.disableAudio,i.length&&!n||(i=[null]),n=e.a.disableVideo,t.length&&!n||(t=[null]),n=[],a=0;a<i.length;a++)for(o=0;o<t.length;o++)Ti(e,i[a],t[o],n);if(t=[],!e.a.disableText)for(e=Ei(s,"text"),i=0;i<e.length;i++)t.push.apply(t,e[i].streams);return{startTime:r.start,textStreams:t,variants:n}}function Ei(e,t){return e.filter((function(e){return e.contentType==t}))}function Ti(e,t,n,r){if(t||n)if(t&&n){var i=t.drmInfos,a=n.drmInfos;if(!i.length||!a.length||0<Lt(i,a).length){a=Lt(t.drmInfos,n.drmInfos);for(var o=0;o<t.streams.length;o++)for(var s=0;s<n.streams.length;s++)i=(n.streams[s].bandwidth||0)+(t.streams[o].bandwidth||0),i={id:e.h++,language:t.language,primary:t.$c||n.$c,audio:t.streams[o],video:n.streams[s],bandwidth:i,drmInfos:a,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}}else for(a=t||n,o=0;o<a.streams.length;o++)i=a.streams[o].bandwidth||0,i={id:e.h++,language:a.language||"und",primary:a.$c,audio:t?a.streams[o]:null,video:n?a.streams[o]:null,bandwidth:i,drmInfos:a.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},r.push(i)}function wi(e,t){0>e.s||e.i.R(Math.max(3,e.s-t,z(e.u)))}function Si(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,gd:null,audioSamplingRate:null},n=n||t.qa;var r=Br.yb,i=Br.Me,a=Br.P(e,"BaseURL").map(Br.ic),o=e.getAttribute("contentType")||t.contentType,s=e.getAttribute("mimeType")||t.mimeType,l=e.getAttribute("codecs")||t.codecs;i=Br.I(e,"frameRate",i)||t.frameRate;for(var u=e.getAttribute("par")||t.pixelAspectRatio,c=Br.P(e,"InbandEventStream"),d=t.emsgSchemeIdUris.slice(),h=(c=f(c)).next();!h.done;h=c.next())h=h.value.getAttribute("schemeIdUri"),d.includes(h)||d.push(h);return c=function(e){for(var t=0;t<e.length;++t){var n=e[t],r=n.getAttribute("schemeIdUri");if(r&&(n=n.getAttribute("value")))switch(r){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(r=parseInt(n,10)))continue;return r;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(r=parseInt(n,16)){for(e=0;r;)1&r&&++e,r>>=1;return e}}}return null}(c=Br.P(e,"AudioChannelConfiguration"))||t.gd,h=Br.I(e,"audioSamplingRate",r)||t.audioSamplingRate,o||(o=Ci(s,l)),{qa:Gt(n,a),Ub:Br.gc(e,"SegmentBase")||t.Ub,La:Br.gc(e,"SegmentList")||t.La,Wb:Br.gc(e,"SegmentTemplate")||t.Wb,width:Br.I(e,"width",r)||t.width,height:Br.I(e,"height",r)||t.height,contentType:o,mimeType:s,codecs:l,frameRate:i,pixelAspectRatio:u,emsgSchemeIdUris:d,id:e.getAttribute("id"),gd:c,audioSamplingRate:h}}function ki(e,t,n,r){return(t=Me(t=Gt(t,[n]),e.a.retryParameters)).method=r,t=e.b.networkingEngine.request(4,t),Pe(e.g,t),t.promise.then((function(e){if("HEAD"==r){if(!e.headers||!e.headers.date)return 0;e=e.headers.date}else e=ot(e.data);return e=Date.parse(e),isNaN(e)?0:e-Date.now()}))}function Ci(e,t){return mn(qe(e,t))?"text":e.split("/")[0]}function xi(e,t,n,r){this.b=e,this.type=t,this.a=n,this.segments=r||null}function Ri(e,t,n,r){this.id=e,this.name=t,this.a=n,this.value=void 0===r?null:r}function Li(e,t){this.name=e,this.value=t}function Ii(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function Pi(e,t){this.b=t,this.a=e}V("shaka.media.ManifestParser.registerParserByExtension",gi.pd),gi.Cb=function(e,t){gi.zb[e]=t},V("shaka.media.ManifestParser.registerParserByMime",gi.Cb),gi.Sf=function(){var e={};if(Qe()){for(var t in gi.zb)e[t]=!0;for(var n in gi.Sb)e[n]=!0}t={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var r=(n=f(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!r.done;r=n.next())e[r=r.value]=Qe()?!!gi.zb[r]:Ze(r);for(var i in t)e[i]=Qe()?!!gi.Sb[i]:Ze(t[i]);return e},gi.create=function(e,t,n,r){return p((function i(){var a,o;return M(i,(function(i){switch(i.j){case 1:return k(i,2),w(i,gi.Ue(e,t,n,r),4);case 4:return a=i.o,i.return(new a);case 2:throw(o=R(i)).severity=2,o}}))}))},gi.Ue=function(e,t,n,r){return p((function i(){var a,o,s,l,u;return M(i,(function(i){switch(i.j){case 1:if(a=gi,r&&(o=a.zb[r.toLowerCase()]))return i.return(o);if((s=a.getExtension(e))&&(l=a.Sb[s]))return i.return(l);if(r){i.A(2);break}return w(i,a.bf(e,t,n),3);case 3:if((r=i.o)&&(u=gi.zb[r]))return i.return(u);case 2:throw new me(2,4,4e3,e)}}))}))},gi.bf=function(e,t,n){return p((function r(){var i,a,o;return M(r,(function(r){switch(r.j){case 1:return(i=Me([e],n)).method="HEAD",w(r,t.request(0,i).promise,2);case 2:return a=r.o,o=a.headers["content-type"],r.return(o?o.toLowerCase().split(";").shift():"")}}))}))},gi.getExtension=function(e){return 1==(e=new Q(e).ja.split("/").pop().split(".")).length?"":e.pop().toLowerCase()},gi.isSupported=function(e,t){return!!Qe()&&(t in gi.zb||gi.getExtension(e)in gi.Sb)},V("shaka.media.PresentationTimeline",yi),yi.prototype.Y=function(){return this.g},yi.prototype.getDuration=yi.prototype.Y,yi.prototype.$e=function(){return this.a},yi.prototype.getMaxSegmentDuration=yi.prototype.$e,yi.prototype.xa=function(e){this.g=e},yi.prototype.setDuration=yi.prototype.xa,yi.prototype.hf=function(){return this.f},yi.prototype.getPresentationStartTime=yi.prototype.hf,yi.prototype.pe=function(e){this.l=e},yi.prototype.setClockOffset=yi.prototype.pe,yi.prototype.Xb=function(e){this.m=e},yi.prototype.setStatic=yi.prototype.Xb,yi.prototype.xd=function(e){this.h=e},yi.prototype.setSegmentAvailabilityDuration=yi.prototype.xd,yi.prototype.ig=function(e){this.vc=e},yi.prototype.setDelay=yi.prototype.ig,yi.prototype.Se=function(){return this.vc},yi.prototype.getDelay=yi.prototype.Se,yi.prototype.vb=function(e,t){if(0!=e.length){var n=e[e.length-1].endTime+t;this.fd(e[0].startTime+t),this.a=e.reduce((function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.a),this.b=Math.max(this.b,n),null!=this.f&&this.s&&(this.f=(Date.now()+this.l)/1e3-this.b-this.a)}},yi.prototype.notifySegments=yi.prototype.vb,yi.prototype.fd=function(e){this.c=null==this.c?e:Math.min(this.c,e)},yi.prototype.notifyMinSegmentStartTime=yi.prototype.fd,yi.prototype.ed=function(e){this.a=Math.max(this.a,e)},yi.prototype.notifyMaxSegmentDuration=yi.prototype.ed,yi.prototype.offset=function(e){null!=this.c&&(this.c+=e),null!=this.b&&(this.b+=e)},yi.prototype.offset=yi.prototype.offset,yi.prototype.V=function(){return 1/0==this.g&&!this.m},yi.prototype.isLive=yi.prototype.V,yi.prototype.Xa=function(){return 1/0!=this.g&&!this.m},yi.prototype.isInProgress=yi.prototype.Xa,yi.prototype.Ob=function(){if(1/0==this.h)return this.i;var e=this.pb()-this.h;return Math.max(this.i,e)},yi.prototype.getSegmentAvailabilityStart=yi.prototype.Ob,yi.prototype.qe=function(e){this.i=e},yi.prototype.setUserSeekStart=yi.prototype.qe,yi.prototype.pb=function(){return this.V()||this.Xa()?Math.min(Math.max(0,(Date.now()+this.l)/1e3-this.a-this.f),this.g):this.g},yi.prototype.getSegmentAvailabilityEnd=yi.prototype.pb,yi.prototype.Nb=function(e){var t=Math.max(this.c,this.i);if(1/0==this.h)return t;var n=this.pb()-this.h;return e=Math.min(n+e,this.Ca()),Math.max(t,e)},yi.prototype.getSafeSeekRangeStart=yi.prototype.Nb,yi.prototype.ob=function(){return this.Nb(0)},yi.prototype.getSeekRangeStart=yi.prototype.ob,yi.prototype.Ca=function(){var e=this.V()||this.Xa()?this.vc:0;return Math.max(0,this.pb()-e)},yi.prototype.getSeekRangeEnd=yi.prototype.Ca,yi.prototype.ue=function(){return!(null==this.f||null!=this.b&&this.s)},yi.prototype.usingPresentationStartTime=yi.prototype.ue,V("shaka.dash.DashParser",bi),(r=bi.prototype).configure=function(e){this.a=e},r.start=function(e,t){var n=this;return p((function r(){var i;return M(r,(function(r){switch(r.j){case 1:return n.f=[e],n.b=t,w(r,_i(n),2);case 2:if(i=r.o,n.b&&wi(n,i),!n.b)throw new me(2,7,7001);return r.return(n.c)}}))}))},r.stop=function(){return this.a=this.b=null,this.f=[],this.c=null,this.l=[],this.m={},null!=this.i&&(this.i.stop(),this.i=null),this.g.destroy()},r.update=function(){_i(this).catch(function(e){this.b&&this.b.onError(e)}.bind(this))},r.onExpirationUpdated=function(){},r.Nf=function(e,t){if(e.aa=Si(t,e.ka,null),"image"==e.aa.contentType)return null;var n=!1,r=Br.P(t,"Role"),i=r.map((function(e){return e.getAttribute("value")})).filter(Vt.Ia),a=void 0,o="text"==e.aa.contentType;o&&(a="subtitle");for(var s=0;s<r.length;s++){var l=r[s].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=r[s].getAttribute("value"),l){case"main":n=!0;break;case"caption":case"subtitle":a=l}}var u=null,c=!1;Br.P(t,"EssentialProperty").forEach((function(e){"http://dashif.org/guidelines/trickmode"==e.getAttribute("schemeIdUri")?u=e.getAttribute("value"):c=!0})),s=Br.P(t,"Accessibility");var d=new Map;for(r={},l=(s=f(s)).next();!l.done;r={Ib:r.Ib},l=s.next()){var h=l.value;l=h.getAttribute("schemeIdUri"),h=h.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==l||"urn:scte:dash:cc:cea-708:2015"==l?(r.Ib=1,null!=h?h.split(";").forEach(function(e){return function(t){if(t.includes("=")){var n=(t=t.split("="))[0].startsWith("CC")?t[0]:"CC"+t[0];t=t[1].split(",")[0].split(":").pop()}else n="CC"+e.Ib,e.Ib+=2;d.set(n,On(t))}}(r)):d.set("CC1","und")):"urn:mpeg:dash:role:2011"==l&&null!=h&&(i.push(h),"captions"==h&&(a="caption"))}if(c)return null;var p=Vr(r=Br.P(t,"ContentProtection"),this.a.dash.customScheme,this.a.dash.ignoreDrmInfo);if(r=On(t.getAttribute("lang")||"und"),s=t.getAttribute("label"),(l=Br.P(t,"Label"))&&l.length&&(l=l[0]).textContent&&(s=l.textContent),0==(i=(l=Br.P(t,"Representation")).map(this.Qf.bind(this,e,p,a,r,s,n,i,d)).filter((function(e){return!!e}))).length){if(this.a.dash.ignoreEmptyAdaptationSet||o)return null;throw new me(2,4,4003)}return e.aa.contentType&&"application"!=e.aa.contentType||(e.aa.contentType=Ci(i[0].mimeType,i[0].codecs),i.forEach((function(t){t.type=e.aa.contentType}))),i.forEach((function(e){p.drmInfos.forEach((function(t){e.keyId&&t.keyIds.push(e.keyId)}))})),o=l.map((function(e){return e.getAttribute("id")})).filter(Vt.Ia),{id:e.aa.id||"__fake__"+this.h++,contentType:e.aa.contentType,language:r,$c:n,streams:i,drmInfos:p.drmInfos,Bd:u,Yf:o}},r.Qf=function(e,t,n,r,i,a,o,s,l){if(e.C=Si(l,e.aa,null),!function(e){var t=e.Ub?1:0;return t+=e.La?1:0,0==(t+=e.Wb?1:0)?"text"==e.contentType||"application"==e.contentType:(1!=t&&(e.Ub&&(e.La=null),e.Wb=null),!0)}(e.C))return null;e.bandwidth=Br.I(l,"bandwidth",Br.tc)||0;var u=e.C.contentType;u="text"==u||"application"==u;try{var c=this.Zf.bind(this);if(e.C.Ub)var d=function(e,t){var n=Number($r(e,di,"presentationTimeOffset"))||0,r=$r(e,di,"timescale"),i=1;r&&(i=Br.tc(r)||1),n=n/i||0,r=ui(e,di);var a=e.C.contentType;if(i=e.C.mimeType.split("/")[1],"text"!=a&&"mp4"!=i&&"webm"!=i)throw new me(2,4,4006);if("webm"==i&&!r)throw new me(2,4,4005);a=qr(e,di,"RepresentationIndex");var o=$r(e,di,"indexRange"),s=e.C.qa;if(o=Br.uc(o||""),a){var l=a.getAttribute("sourceURL");l&&(s=Gt(e.C.qa,[l])),o=Br.I(a,"range",Br.uc,o)}if(!o)throw new me(2,4,4002);return{createSegmentIndex:(i=ci(e,t,r,s,o.start,o.end,i,n)).createSegmentIndex,findSegmentPosition:i.findSegmentPosition,getSegmentReference:i.getSegmentReference,initSegmentReference:r,ma:n}}(e,c);else if(e.C.La)d=fi(e,this.m);else if(e.C.Wb)d=pi(e,c,this.m,!!this.c);else{var f=e.C.qa,h=e.T.duration||0;d={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(e){return 0<=e&&e<h?1:null},getSegmentReference:function(e){return 1!=e?null:new Qr(1,0,h,(function(){return f}),0,null)},initSegmentReference:null,ma:0}}}catch(e){if(u&&4002==e.code)return null;throw e}return l=function(e,t,n,r){var i=Vr(e,t,r);if(n.Pd)e=1==n.drmInfos.length&&!n.drmInfos[0].keySystem,t=0==i.drmInfos.length,(0==n.drmInfos.length||e&&!t)&&(n.drmInfos=i.drmInfos),n.Pd=!1;else if(0<i.drmInfos.length&&(n.drmInfos=n.drmInfos.filter((function(e){return i.drmInfos.some((function(t){return t.keySystem==e.keySystem}))})),0==n.drmInfos.length))throw new me(2,4,4008);return i.Kd||n.Kd}(l=Br.P(l,"ContentProtection"),this.a.dash.customScheme,t,this.a.dash.ignoreDrmInfo),{id:this.h++,originalId:e.C.id,createSegmentIndex:d.createSegmentIndex,findSegmentPosition:d.findSegmentPosition,getSegmentReference:d.getSegmentReference,initSegmentReference:d.initSegmentReference,presentationTimeOffset:d.ma,mimeType:e.C.mimeType,codecs:e.C.codecs,frameRate:e.C.frameRate,pixelAspectRatio:e.C.pixelAspectRatio,bandwidth:e.bandwidth,width:e.C.width,height:e.C.height,kind:n,encrypted:0<t.drmInfos.length,keyId:l,language:r,label:i,type:e.aa.contentType,primary:a,trickModeVideo:null,emsgSchemeIdUris:e.C.emsgSchemeIdUris,roles:o,channelsCount:e.C.gd,audioSamplingRate:e.C.audioSamplingRate,closedCaptions:s}},r.Pf=function(e,t,n){var r=Br.yb,i=n.getAttribute("schemeIdUri")||"",a=n.getAttribute("value")||"",o=Br.I(n,"timescale",r)||1;Br.P(n,"Event").forEach(function(n){var s=Br.I(n,"presentationTime",r)||0,l=Br.I(n,"duration",r)||0;l=(s=s/o+e)+l/o,null!=t&&(s=Math.min(s,e+t),l=Math.min(l,e+t)),n={schemeIdUri:i,value:a,startTime:s,endTime:l,id:n.getAttribute("id")||"",eventElement:n},this.b.onTimelineRegionAdded(n)}.bind(this))},r.Zf=function(e,t,n){return e=vi(e,t,n,this.a.retryParameters),e=this.b.networkingEngine.request(1,e),Pe(this.g,e),e.promise.then((function(e){return e.data}))},gi.pd("mpd",bi),gi.Cb("application/dash+xml",bi),gi.Cb("video/vnd.mpeg.dash.mpd",bi),Ri.prototype.toString=function(){var e="#"+this.name,t=this.a?this.a.map((function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&t.unshift(this.value),0<t.length&&(e+=":"+t.join(",")),e},Ri.prototype.getAttribute=function(e){var t=this.a.filter((function(t){return t.name==e}));return t.length?t[0]:null};var ji={nb:function(e,t){return e.filter((function(e){return e.name==t}))},Ta:function(e,t){var n=ji.nb(e,t);return n.length?n[0]:null},Pc:function(e,t,n){return e.filter((function(e){var r=e.getAttribute("TYPE");return e=e.getAttribute("GROUP-ID"),r.value==t&&e.value==n}))},Hc:function(e,t){return Gt([e],[t])[0]},Yc:function(e){return/^#(?!EXT)/m.test(e)}};function Oi(e){this.b=e,this.a=0}function Di(e){Mi(e,/[ \t]+/gm)}function Mi(e,t){t.lastIndex=e.a;var n=t.exec(e.b);return n=null==n?null:{position:n.index,length:n[0].length,ag:n},e.a==e.b.length||null==n||n.position!=e.a?null:(e.a+=n.length,n.ag)}function Ni(e){return e.a==e.b.length?null:(e=Mi(e,/[^ \t\n]*/gm))?e[0]:null}function Ui(){this.a=0}function Fi(e,t,n){var r=(t=(t=ot(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(r[0]))throw new me(2,4,4015);t=0;for(var i=1;i<r.length;i++)if(!ji.Yc(r[i])){var a=Ki(e,r[i]);if(--e.a,Vi.includes(a.name)){t=1;break}"EXT-X-STREAM-INF"==a.name&&(i+=1)}for(i=[],a=1;a<r.length;)if(ji.Yc(r[a]))a+=1;else{var o=Ki(e,r[a]);if(Gi.includes(o.name)){if(1!=t)throw new me(2,4,4017);return new xi(n,t,i,e=Bi(e,n,r=r.splice(a,r.length-a),i))}i.push(o),a+=1,"EXT-X-STREAM-INF"==o.name&&(o.a.push(new Li("URI",r[a])),a+=1)}return new xi(n,t,i)}function Bi(e,t,n,r){var i=[],a=[];return n.forEach((function(n){if(/^(#EXT)/.test(n))n=Ki(e,n),Vi.includes(n.name)?r.push(n):a.push(n);else{if(ji.Yc(n))return[];n=ji.Hc(t,n.trim()),i.push(new Pi(n,a)),a=[]}})),i}function Ki(e,t){var n=e.a++,r=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!r)throw new me(2,4,4016,t);var i,a=r[1],o=r[2];if(r=[],o){var s;(s=Mi(o=new Oi(o),/^([^,=]+)(?:,|$)/g))&&(i=s[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;s=Mi(o,l);)r.push(new Li(s[1],s[2]||s[3]))}return new Ri(n,a,r,i)}var Vi="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Gi="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function Hi(e){try{var t=Hi.parse(e);return _e({uri:e,ld:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return ve(e)}}function Yi(){var e=this;this.a=this.f=null,this.$=1,this.D=new Map,this.S=new Set,this.b=new Map,this.c=null,this.u="",this.s=new Ui,this.O=0,this.h=new fe((function(){!function(e){p((function t(){var n,r;return M(t,(function(t){switch(t.j){case 1:return e.f?(k(t,2),w(t,e.update(),4)):t.return();case 4:n=e.O,e.h.R(n),x(t,0);break;case 2:if(r=R(t),!e.f)return t.return();r.severity=1,e.f.onError(r),e.h.R(.1),S(t)}}))}))}(e)})),this.g=da,this.m=null,this.B=0,this.F=1/0,this.i=new Ie,this.K=[],this.l=new Map,this.W=!1}function zi(e,t){return p((function n(){var r,i,a,o,s,l,u,c,d,f;return M(n,(function(n){switch(n.j){case 1:return r=ji,i=fa,a=t.Ce,w(n,ua(e,Me([a],e.a.retryParameters),0),2);case 2:if(o=n.o,1!=(s=Fi(e.s,o.data,o.uri)).type)throw new me(2,4,4017);return u=(l=r.Ta(s.a,"EXT-X-MEDIA-SEQUENCE"))?Number(l.value):0,c=t.stream,w(n,ea(e,t.Bc,s,u,c.mimeType,c.codecs),3);case 3:d=n.o,t.Vb.a=d,f=d[d.length-1],r.Ta(s.a,"EXT-X-ENDLIST")&&(la(e,i.Qa),e.c.xa(f.endTime)),S(n)}}))}))}function Wi(e){e.forEach((function(e){if(e){var t=e.stream.codecs.split(",");t=t.filter((function(e){return"mp4a.40.34"!=e})),e.stream.codecs=t.join(",")}}))}function $i(e,t,n,r,i){return{id:e.$++,language:t?t.language:"und",primary:!!t&&t.primary||!!n&&n.primary,audio:t,video:n,bandwidth:r,drmInfos:i,allowedByApplication:!0,allowedByKeySystem:!0}}function qi(e,t,n){return p((function r(){var i,a,o,s,l,u,c,d,f;return M(r,(function(r){switch(r.j){case 1:if(i=ra(t,"URI"),e.b.has(i))return r.return(e.b.get(i));if(a=ra(t,"TYPE").toLowerCase(),o=Yt,"subtitles"==a&&(a=o.ra),s=On(Ii(t,"LANGUAGE","und")),l=Ii(t,"NAME"),u=t.getAttribute("DEFAULT"),c=t.getAttribute("AUTOSELECT"),d=Ii(t,"CHANNELS"),"audio"==a)if(d){var h=d.split("/")[0];h=parseInt(h,10)}else h=null;else h=null;return w(r,Xi(e,i,n,a,s,!!u||!!c,l,h,null),2);case 2:return f=r.o,e.b.has(i)?r.return(e.b.get(i)):null==f?r.return(null):(e.D.set(t.id,f),e.b.set(i,f),r.return(f))}}))}))}function Xi(e,t,n,r,i,a,o,s,l){return p((function u(){var c,d,h,m,g,y,v,b,_,A,E,T,S,C,L,I,P,j,O,D,N,U,F,B,K,V;return M(u,(function(u){switch(u.j){case 1:return d=(c=ji).Hc(e.u,t),w(u,ua(e,Me([d],e.a.retryParameters),0),2);case 2:if(h=u.o,d=h.uri,1!=(m=Fi(e.s,h.data,d)).type)throw new me(2,4,4017);g=[],m.segments.forEach((function(e){e=c.nb(e.b,"EXT-X-KEY"),g.push.apply(g,e)})),y=!1,v=[],b=null;for(var G=f(g),H=G.next();!H.done;H=G.next())if(_=H.value,"NONE"!=(A=ra(_,"METHOD"))){if(y=!0,"AES-128"==A)return e.W=!0,u.return(null);E=ra(_,"KEYFORMAT"),(S=(T=ca[E])?T(_):null)&&(S.keyIds.length&&(b=S.keyIds[0]),v.push(S))}if(y&&!v.length)throw new me(2,4,4026);return function(e,t){var n=fa,r=ji.Ta(t.a,"EXT-X-PLAYLIST-TYPE"),i=ji.Ta(t.a,"EXT-X-ENDLIST");i=r&&"VOD"==r.value||i,r=r&&"EVENT"==r.value&&!i,r=!i&&!r,i?la(e,n.Qa):(la(e,r?n.Fd:n.xe),n=ia(t.a,"EXT-X-TARGETDURATION"),n=Number(n.value),e.B=Math.max(n,e.B),e.F=Math.min(n,e.F))}(e,m),C=function(e,t){if(1==t.length)return t[0];var n=na(e,t);if(null!=n)return n;throw new me(2,4,4025,t)}(r,n),w(u,function(e,t,n,r){return p((function i(){var a,o,s,l,u,c,d,f,h;return M(i,(function(i){switch(i.j){case 1:return a=Yt,o=r.segments[0].a,s=new Q(o),l=s.ja.split(".").pop(),u=sa[t],(c=u[l])?i.return(c):t==a.ra?n&&"vtt"!=n?i.return("application/mp4"):i.return("text/vtt"):((d=Me([o],e.a.retryParameters)).method="HEAD",w(i,ua(e,d,1),2));case 2:if(f=i.o,!(h=f.headers["content-type"]))throw new me(2,4,4021,l);return i.return(h.split(";")[0])}}))}))}(e,r,C,m),3);case 3:return L=u.o,oa.includes(L)&&(C=""),P=(I=c.Ta(m.a,"EXT-X-MEDIA-SEQUENCE"))?Number(I.value):0,k(u,4),w(u,ea(e,t,m,P,L,C),6);case 6:j=u.o,x(u,5);break;case 4:if(4035==(O=R(u)).code)return q("Skipping unsupported HLS stream",L,t),u.return(null);throw O;case 5:return D=j[0].startTime,N=j[j.length-1].endTime,U=N-D,F=new ei(j),B=Ji(m),K=void 0,"text"==r&&(K="subtitle"),V={id:e.$++,originalId:o,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:F.find.bind(F),getSegmentReference:F.get.bind(F),initSegmentReference:B,presentationTimeOffset:0,mimeType:L,codecs:C,kind:K,encrypted:y,keyId:b,language:i,label:o,type:r,primary:a,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:s,audioSamplingRate:null,closedCaptions:l},u.return({stream:V,Vb:F,drmInfos:v,Bc:t,Ce:d,dd:D,Hg:N,duration:U})}}))}))}function Ji(e){var t=ji.nb(e.a,"EXT-X-MAP");if(!t.length)return null;if(1<t.length)throw new me(2,4,4020);var n=ra(t=t[0],"URI"),r=ji.Hc(e.b,n);return e=0,n=null,(t=Ii(t,"BYTERANGE"))&&(e=t.split("@"),t=Number(e[0]),n=(e=Number(e[1]))+t-1),new Jr((function(){return[r]}),e,n)}function Qi(e,t,n,r){var i=t.b,a=t.a;t=ia(i,"EXTINF").value.split(","),t=r+Number(t[0]);var o=0,s=null;return(i=ji.Ta(i,"EXT-X-BYTERANGE"))&&(o=i.value.split("@"),i=Number(o[0]),s=(o=o[1]?Number(o[1]):e.a+1)+i-1),new Qr(n,r,t,(function(){return[a]}),o,s)}function Zi(e){e.c&&(e.K.forEach((function(t){e.c.vb(t,0)})),e.K=[])}function ea(e,t,n,r,i,a){return p((function o(){var s,l,u,c,d,f,h,m,g,y;return M(o,(function(o){switch(o.j){case 1:return s=n.segments,l=[],u=s[0].a,c=Qi(null,s[0],r,0),d=Ji(n),w(o,function(e,t,n,r,i,a){return p((function o(){var s,l,u,c,d,f,h,p,m;return M(o,(function(o){switch(o.j){case 1:if(e.m&&(s=e.b.get(t),l=s.Vb,u=l.get(r.position)))return o.return(u.startTime);if(i=i.toLowerCase(),oa.includes(i))throw q("Raw formats are not yet supported. Skipping "+i),new me(1,4,4035);if("video/webm"==i)throw q("WebM in HLS is not yet supported. Skipping."),new me(1,4,4035);if("video/mp4"!=i&&"audio/mp4"!=i){o.A(2);break}return c=[ta(e,r)],n&&c.push(ta(e,n)),w(o,Promise.all(c),3);case 3:return d=o.o,f=d[0],h=d[1]||d[0],o.return(function(e,t,n,r){var i=0;if((new jr).H("moov",Or).H("trak",Or).H("mdia",Or).fa("mdhd",(function(e){e.reader.M(0==e.version?8:16),i=e.reader.G(),e.parser.stop()})).parse(r,!0),!i)throw new me(2,4,4030,e,t);var a=0,o=!1;if((new jr).H("moof",Or).H("traf",Or).fa("tfdt",(function(e){a=(0==e.version?e.reader.G():e.reader.Bb())/i,o=!0,e.parser.stop()})).parse(n,!0),!o)throw new me(2,4,4030,e,t);return a}(t,f.uri,f.data,h.data));case 2:if("video/mp2t"!=i){o.A(4);break}return w(o,ta(e,r),5);case 5:return p=o.o,o.return(function(e,t,n){function r(){throw new me(2,4,4030,e,t)}n=new Lr(new DataView(n),0);for(var i=0,a=0;;){if(i=n.ca(),71!=(a=n.la())&&r(),16384&n.Tb()||r(),0!=(a=(48&n.la())>>4)&&2!=a||r(),3==a&&(a=n.la(),n.M(a)),1==n.G()>>8)return n.M(3),0!=(i=n.la()>>6)&&1!=i||r(),0==n.la()&&r(),i=n.la(),a=n.Tb(),n=n.Tb(),(1073741824*((14&i)>>1)+((65534&a)<<14|(65534&n)>>1))/9e4;n.seek(i+188),71!=(a=n.la())&&(n.seek(i+192),a=n.la()),71!=a&&(n.seek(i+204),a=n.la()),71!=a&&r(),n.me(1)}}(t,p.uri,p.data));case 4:if("application/mp4"!=i&&!i.startsWith("text/")){o.A(6);break}return w(o,ta(e,r),7);case 7:return m=o.o,o.return(function(e,t,n){return mn(e=qe(e,t))?(gn(t=new hn(null),e),t.kc(n)):0}(i,a,m.data));case 6:throw new me(2,4,4030,t)}}))}))}(e,t,d,c,i,a),2);case 2:f=o.o,u.split("/").pop();for(var v=0;v<s.length;++v)h=s[v],m=l[l.length-1],g=0==v?f:m.endTime,y=Qi(m,h,r+v,g),l.push(y);return e.K.push(l),Zi(e),o.return(l)}}))}))}function ta(e,t){return p((function n(){var r,i,a,o,s,l;return M(n,(function(n){switch(n.j){case 1:return r=1,i=vi(t.c(),t.b,t.b+2048-1,e.a.retryParameters),a=vi(t.c(),t.b,t.a,e.a.retryParameters),k(n,2),w(n,ua(e,i,r),4);case 4:return o=n.o,n.return(o);case 2:if(7001==(s=R(n)).code)throw s;return q("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",i.uris[0]),w(n,ua(e,a,r),5);case 5:return l=n.o,n.return(l)}}))}))}function na(e,t){for(var n=aa[e],r=0;r<n.length;r++)for(var i=0;i<t.length;i++)if(n[r].test(t[i].trim()))return t[i].trim();return"text"==e?"":null}function ra(e,t){var n=e.getAttribute(t);if(!n)throw new me(2,4,4023,t);return n.value}function ia(e,t){var n=ji.Ta(e,t);if(!n)throw new me(2,4,4024,t);return n}V("shaka.net.DataUriPlugin",Hi),Hi.parse=function(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new me(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new me(2,1,1004,t);var r=n[0];n=e.decodeURIComponent(n.slice(1).join(","));var i=null;if(1<(r=r.split(";")).length&&(i=r[1]),"base64"==i)t=ht.Ba(n).buffer;else{if(i)throw new me(2,1,1005,t);t=ut(n)}return{data:t,contentType:r[0]}},De("data",Hi),V("shaka.hls.HlsParser",Yi),(r=Yi.prototype).configure=function(e){this.a=e},r.start=function(e,t){var n=this;return p((function r(){var i,a;return M(r,(function(r){switch(r.j){case 1:return n.f=t,w(r,ua(n,Me([e],n.a.retryParameters),0),2);case 2:return i=r.o,n.u=i.uri,w(r,function(e,t){return p((function n(){var r,i,a,o,s,l,u,c,d,h,m;return M(n,(function(n){switch(n.j){case 1:if(0!=(r=Fi(e.s,t,e.u)).type)throw new me(2,4,4022);return w(n,function(e,t){return p((function n(){var r,i,a,o,s,l,u,c,d,h,m,g;return M(n,(function(n){switch(n.j){case 1:return r=ji,i=Vt,a=t.a,o=r.nb(t.a,"EXT-X-MEDIA"),s=o.filter(function(e){return"SUBTITLES"==ra(e,"TYPE")}.bind(e)),l=s.map(function(e){var t=this;return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return t.a.disableText?n.return(null):(k(n,2),w(n,function(e,t){return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return ra(t,"TYPE"),w(n,qi(e,t,[]),2);case 2:return r=n.o,n.return(r.stream)}}))}))}(t,e),4));case 4:return n.return(n.o);case 2:if(r=R(n),t.a.hls.ignoreTextStreamFailures)return n.return(null);throw r}}))}))}.bind(e)),u=o.filter((function(e){return"CLOSED-CAPTIONS"==ra(e,"TYPE")})),function(e,t){for(var n=f(t),r=n.next();!r.done;r=n.next()){ra(r=r.value,"TYPE");var i=Ii(r,"LANGUAGE")||"und";i=On(i);var a=ra(r,"GROUP-ID");r=ra(r,"INSTREAM-ID"),e.l.get(a)||e.l.set(a,new Map),e.l.get(a).set(r,i)}}(e,u),w(n,Promise.all(l),2);case 2:return c=n.o,d=r.nb(a,"EXT-X-STREAM-INF"),h=d.map(function(e){return function(e,t,n){return p((function r(){var i,a,o,s,l,u,c,d,h,m,g,y,v,b,_,A,E,T,S,k,C,x,R,L,I,P,j;return M(r,(function(r){switch(r.j){case 1:return i=Yt,a=ji,o=Ii(t,"CODECS","avc1.42E01E,mp4a.40.2"),s=function(e){for(var t=new Set,n=[],r=(e=f(e)).next();!r.done;r=e.next()){var i=Xe(r=r.value)[0];t.has(i)||(n.push(r),t.add(i))}return n}(o.split(/\s*,\s*/)),l=t.getAttribute("RESOLUTION"),c=u=null,d=Ii(t,"FRAME-RATE"),h=Number(ra(t,"BANDWIDTH")),l&&(m=l.value.split("x"),u=m[0],c=m[1]),g=(g=(g=a.nb(n.a,"EXT-X-MEDIA")).filter((function(e){return"CLOSED-CAPTIONS"!=ra(e,"TYPE")}))).filter((function(e){var t=Ii(e,"URI")||"";return"SUBTITLES"==(Ii(e,"TYPE")||"")||""!=t})),y=Ii(t,"AUDIO"),v=Ii(t,"VIDEO"),y?g=a.Pc(g,"AUDIO",y):v&&(g=a.Pc(g,"VIDEO",v)),(b=na(i.ra,s))&&((_=Ii(t,"SUBTITLES"))&&(A=a.Pc(g,"SUBTITLES",_)).length&&(E=e.D.get(A[0].id))&&(E.stream.codecs=b),Re(s,b)),T=g.map(function(e){return qi(this,e,s)}.bind(e)),S=[],k=[],w(r,Promise.all(T),2);case 2:if(x=(x=r.o).filter((function(e){return null!=e})),y?S=x:v&&(k=x),L=!1,S.length||k.length?S.length?(P=ra(t,"URI"),j=S[0].Bc,P==j?(R=i.Eb,L=!0):R=i.Pa):R=i.Eb:1==s.length?(I=na(i.Pa,s),R=l||d||I?i.Pa:i.Eb):(R=i.Pa,s=[s.join(",")]),L){r.A(3);break}return w(r,function(e,t,n,r){return p((function i(){var a,o,s,l,u;return M(i,(function(i){switch(i.j){case 1:return a=Yt,o=ra(t,"URI"),e.b.has(o)?i.return(e.b.get(o)):(s=Ii(t,"CLOSED-CAPTIONS"),l=null,r==a.Pa&&s&&"NONE"!=s&&(l=e.l.get(s)),w(i,Xi(e,o,n,r,"und",!1,null,null,l),2));case 2:return null==(u=i.o)?i.return(null):e.b.has(o)?i.return(e.b.get(o)):(e.b.set(o,u),i.return(u))}}))}))}(e,t,s,R),4);case 4:C=r.o;case 3:if(C)C.stream.type==i.Eb?S=[C]:k=[C];else if(null===C)return r.return([]);return k&&Wi(k),S&&Wi(S),r.return(function(e,t,n,r,i,a,o){n.forEach(function(e){(e=e.stream)&&(e.width=Number(i)||void 0,e.height=Number(a)||void 0,e.frameRate=Number(o)||void 0)}.bind(e));var s=!!e.a&&e.a.disableAudio;t.length&&!s||(t=[null]),s=!!e.a&&e.a.disableVideo,(!n.length||s)&&(n=[null]),s=[];for(var l=(t=f(t)).next();!l.done;l=t.next()){l=l.value;for(var u=f(n),c=u.next();!c.done;c=u.next()){var d=c.value;c=l?l.stream:null;var h=d?d.stream:null,p=l?l.drmInfos:null,m=d?d.drmInfos:null;d=(d?d.Bc:"")+" - "+(l?l.Bc:"");var g=void 0;if(c&&h){if(p.length&&m.length&&!(0<Lt(p,m).length))continue;g=Lt(p,m)}else c?g=p:h&&(g=m);e.S.has(d)||(c=$i(e,c,h,r,g),s.push(c),e.S.add(d))}}return s}(e,S,k,h,u,c,d))}}))}))}(this,e,t)}.bind(e)),w(n,Promise.all(h),3);case 3:return m=n.o,g=(g=m.reduce(i.Gc,[])).filter((function(e){return null!=e})),n.return({startTime:0,variants:g,textStreams:c.filter((function(e){return null!=e}))})}}))}))}(e,r),2);case 2:if(i=n.o,!e.f)throw new me(2,7,7001);if(e.W&&0==i.variants.length)throw new me(2,4,4034);e.f.filterAllPeriods([i]),a=1/0,o=0,s=1/0;for(var g=f(e.b.values()),y=g.next();!y.done;y=g.next())l=y.value,a=Math.min(a,l.dd),o=Math.max(o,l.dd),"text"!=l.stream.type&&(s=Math.min(s,l.duration));if(e.g!=fa.Qa?(e.c=new yi(0,3*e.B),e.c.Xb(!1)):(e.c=new yi(null,0),e.c.Xb(!0)),Zi(e),e.g!=fa.Qa){for(e.O=e.F,u=fa,e.g==u.Fd&&(c=e.c.vc,isNaN(e.a.availabilityWindowOverride)||(c=e.a.availabilityWindowOverride),e.c.xd(c)),d=0;95443.7176888889<=o;)d+=95443.7176888889,o-=95443.7176888889;if(d)for(y=(g=f(e.b.values())).next();!y.done;y=g.next())95443.7176888889>(h=y.value).dd&&(h.stream.presentationTimeOffset=-d,h.Vb.offset(d))}else for(e.c.xa(s),e.c.offset(-a),y=(g=f(e.b.values())).next();!y.done;y=g.next())(m=y.value).stream.presentationTimeOffset=a,m.Vb.offset(-a),ti(m.Vb,s);e.m={presentationTimeline:e.c,periods:[i],offlineSessionIds:[],minBufferTime:0},S(n)}}))}))}(n,i.data),3);case 3:return 0<(a=n.O)&&n.h.R(a),r.return(n.m)}}))}))},r.stop=function(){this.h&&(this.h.stop(),this.h=null);var e=[];return this.i&&(e.push(this.i.destroy()),this.i=null),this.a=this.f=null,this.D.clear(),this.S.clear(),this.b.clear(),this.m=null,Promise.all(e)},r.update=function(){if(this.g!=fa.Qa){for(var e=[],t=f(this.b.values()),n=t.next();!n.done;n=t.next())e.push(zi(this,n.value));return Promise.all(e)}},r.onExpirationUpdated=function(){};var aa={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},oa=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],sa={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};function la(e,t){e.g=t,e.c&&e.c.Xb(e.g==fa.Qa),e.g!=fa.Qa||e.h.stop()}function ua(e,t,n){if(!e.i)throw new me(2,7,7001);return t=e.f.networkingEngine.request(n,t),Pe(e.i,t),t.promise}var ca={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=ra(e,"METHOD");return Vn("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227"),["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(t)?(t=ra(e,"URI"),t=Hi.parse(t),t=Ht("com.widevine.alpha",[{initDataType:"cenc",initData:t=new Uint8Array(t.data)}]),(e=Ii(e,"KEYID"))&&(t.keyIds=[e.substr(2).toLowerCase()]),t):null}},da="VOD",fa={Qa:da,xe:"EVENT",Fd:"LIVE"};function ha(){this.a=new Map}function pa(e,t,n){ma(e,t).text=n}function ma(e,t){return e.a.has(t)||e.a.set(t,new ga),e.a.get(t)}function ga(){this.text=this.variant=null}function ya(e,t){this.a=e,this.b=new Set([e]);for(var n=f(t=t||[]),r=n.next();!r.done;r=n.next())this.add(r.value)}function va(e,t){var n;if(!(n=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(n=e.audio&&t.audio)){n=e.audio;var r=t.audio;n=!(n.channelsCount==r.channelsCount&&ba(n,r)&&_a(n.roles,r.roles))}return!n&&(n=e.video&&t.video)&&(n=!(ba(n=e.video,r=t.video)&&_a(n.roles,r.roles))),!n}function ba(e,t){if(e.mimeType!=t.mimeType)return!1;var n=e.codecs.split(",").map((function(e){return Xe(e)[0]})),r=t.codecs.split(",").map((function(e){return Xe(e)[0]}));if(n.length!=r.length)return!1;n.sort(),r.sort();for(var i=0;i<n.length;i++)if(n[i]!=r[i])return!1;return!0}function _a(e,t){var n=new Set(e),r=new Set(t);if(n.delete("main"),r.delete("main"),n.size!=r.size)return!1;for(var i=(n=f(n)).next();!i.done;i=n.next())if(!r.has(i.value))return!1;return!0}function Aa(e){this.a=e,this.b=new Ea(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function Ea(e,t,n,r,i){this.f=e,this.c=t,this.a=n,this.b=void 0===r?"":r,this.g=void 0===i?"":i}function Ta(){this.a=ka,this.b=(new Map).set(ka,2).set(Sa,1)}function wa(e,t,n){e.b.set(ka,n).set(Sa,t)}gi.pd("m3u8",Yi),gi.Cb("application/x-mpegurl",Yi),gi.Cb("application/vnd.apple.mpegurl",Yi),ya.prototype.add=function(e){return!!va(this.a,e)&&(this.b.add(e),!0)},ya.prototype.values=function(){return this.b.values()},Aa.prototype.create=function(e){var t=this,n=e.filter((function(e){return va(t.a,e)}));return n.length?new ya(n[0],n):this.b.create(e)},Ea.prototype.create=function(e){var t=[];t=function(e,t){var n=Mn(On(t),e.map((function(e){return Dn(e)})));return n?e.filter((function(e){return n==Dn(e)})):[]}(e,this.f);var n=e.filter((function(e){return e.primary}));for(t=t.length?t:n.length?n:e,this.c&&(e=function(e,t,n){return e.filter((function(e){if(n){var r=e[n];return r&&r.roles.includes(t)}return r=e.audio,e=e.video,r&&0<=r.roles.indexOf(t)||e&&0<=e.roles.indexOf(t)}))}(t,this.c,this.g)).length&&(t=e),this.a&&(e=Un.Nd(t,this.a)).length&&(t=e),this.b&&(e=function(e,t){return e.filter((function(e){return!!e.audio&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(t,this.b)).length&&(t=e),e=new ya(t[0]),n=(t=f(t)).next();!n.done;n=t.next())n=n.value,va(e.a,n)&&e.add(n);return e};var Sa=0,ka=1;function Ca(e,t){this.g=e,this.h=Ra(e),this.a=e.a.currentTime,this.f=Date.now()/1e3,this.b=!1,this.i=t,this.c=function(){}}function xa(e){this.a=e}function Ra(e){if(e.a.paused||0==e.a.playbackRate||null==e.a.buffered)var t=!1;else e:{t=e.a.buffered,e=e.a.currentTime;for(var n=0;n<t.length;n++){var r=t.start(n),i=t.end(n);if(!(e<r||e>i-.5)){t=!0;break e}}t=!1}return t}function La(e,t,n,r,i){var a=this;this.a=e,this.u=t,this.s=n,this.l=i,this.f=new Be,this.i=!1,this.m=e.readyState,this.c=!1,this.b=r,this.h=!1,this.f.w(e,"waiting",(function(){return Ia(a)})),this.g=new fe((function(){Ia(a)})).Na(.25)}function Ia(e){if(0!=e.a.readyState){if(e.a.seeking){if(!e.i)return}else e.i=!1;if(!e.a.paused){e.a.readyState!=e.m&&(e.c=!1,e.m=e.a.readyState);var t=e.s.smallGapLimit,n=e.a.currentTime,r=e.a.buffered;e:{if(r&&r.length&&!(1==r.length&&1e-6>r.end(0)-r.start(0)))for(var i=nt("Edge/")||nt("Trident/")||nt("Tizen")||nt("CrKey")?.5:.1,a=0;a<r.length;a++)if(r.start(a)>n&&(0==a||r.end(a-1)-n<=i)){i=a;break e}i=null}if(null==i)e.b&&(n=Ra(r=(e=e.b).g),i=r.a.currentTime,a=Date.now()/1e3,e.a==i&&e.h==n||(e.f=a,e.a=i,e.h=n,e.b=!1),(i=a-e.f)>=e.i&&n&&!e.b&&(e.c(e.a,i),e.b=!0,e.a=r.a.currentTime));else if(0!=i||e.h){a=r.start(i);var o=e.u.Ca();if(!(a>=o)){t=(o=a-n)<=t;var s=!1;.001>o||(t||e.c||(e.c=!0,(n=new we("largegap",{currentTime:n,gapSize:o})).cancelable=!0,e.l(n),e.s.jumpLargeGaps&&!n.defaultPrevented&&(s=!0)),!t&&!s)||(0!=i&&r.end(i-1),e.a.currentTime=a)}}}}}function Pa(e){var t=this;this.c=e,this.a=new Set,this.b=new fe((function(){ja(t,!1)})).Na(.25)}function ja(e,t){for(var n=f(e.a),r=n.next();!r.done;r=n.next())r.value.g(e.c.currentTime,t)}function Oa(e){for(var t=[],n=(e=f(e)).next();!n.done;n=e.next())for(var r=(n=f(n.value.variants)).next();!r.done;r=n.next())t.push(r.value);return t}function Da(e,t){for(var n=null,r=f(e),i=r.next();!i.done;i=r.next())t>=(i=i.value).startTime&&(n=i);return n}function Ma(e){this.c=e,this.a=null,this.b=function(){}}function Na(e){var t=this;this.a=e,this.f=!1,this.c=this.a.jc(),this.b=new fe((function(){t.a.Yd(.25*t.c)}))}function Ua(e){e.b.stop();var t=e.f?0:e.c;if(0<=t)try{return void(e.a.jc()!=t&&e.a.wd(t))}catch(e){}e.b.Na(.25),0!=e.a.jc()&&e.a.wd(0)}function Fa(e,t,n){this.a=e,this.f=t,this.g=n,this.h=!1,this.b=new Be,this.c=new Ha(e),0<e.readyState?Va(this,n):Ka(this,n)}function Ba(e){return e.h?e.a.currentTime:e.g}function Ka(e,t){e.g=t,e.b.ea(e.a,"loadedmetadata"),e.b.da(e.a,"loadedmetadata",(function(){Va(e,t)}))}function Va(e,t){.001>Math.abs(e.a.currentTime-t)?Ga(e):(e.b.da(e.a,"seeking",(function(){Ga(e)})),Ya(e.c,0==e.a.currentTime?t:e.a.currentTime))}function Ga(e){e.h=!0,e.b.w(e.a,"seeking",(function(){return e.f()}))}function Ha(e){var t=this;this.b=e,this.h=10,this.g=this.f=this.c=0,this.a=new fe((function(){0>=t.c||t.b.currentTime!=t.f?t.a.stop():(t.b.currentTime=t.g,t.c--)}))}function Ya(e,t){e.f=e.b.currentTime,e.g=t,e.c=e.h,e.b.currentTime=t,e.a.Na(.1)}function za(e){function t(){null==n.c?n.f=!0:(n.b.da(n.a,"seeking",(function(){n.f=!0})),n.a.currentTime=Math.max(0,n.a.currentTime+n.c))}var n=this;this.a=e,this.f=!1,this.c=null,this.b=new Be,0==this.a.readyState?this.b.da(this.a,"loadeddata",t):t()}function Wa(e,t,n,r,i,a){var o=this;this.b=e,this.a=t.presentationTimeline,this.B=t.minBufferTime||0,this.g=n,this.u=i,this.l=null,this.f=new La(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,r=new Ca(new xa(e),t.stallThreshold);return function(e,t){e.c=t}(r,(function(){e.currentTime+=n})),r}(e,n),a),this.c=new Fa(e,(function(){var e=o.f;e.i=!0,e.h=!1,e.c=!1;var t=Ba(o.c);return e=qa(o,t),.001<Math.abs(e-t)&&(t=(new Date).getTime()/1e3,!o.l||o.l<t-1)?(o.l=t,0<(t=o.c).a.readyState?Ya(t.c,e):Ka(t,e),e=void 0):(o.u(),e=void 0),e}),function(e,t){return null==t?t=1/0>e.a.Y()?e.a.ob():e.a.Ca():0>t&&(t=e.a.Ca()+t),$a(e,Xa(e,t))}(this,r)),this.i=new fe((function(){if(0!=o.b.readyState&&!o.b.paused){var e=o.b.currentTime,t=o.a.ob(),n=o.a.Ca();3>n-t&&(t=n-3),e<t&&(e=qa(o,e),o.b.currentTime=e)}})).Na(.25)}function $a(e,t){var n=e.a.Y();return t>=n?n-e.g.durationBackoff:t}function qa(e,t){var n=Ft.bind(null,e.b.buffered),r=Math.max(e.B,e.g.rebufferingGoal),i=e.g.safeSeekOffset,a=e.a.ob(),o=e.a.Ca(),s=e.a.Y();3>o-a&&(a=o-3);var l=e.a.Nb(r),u=e.a.Nb(i);return r=e.a.Nb(r+i),t>=s?$a(e,t):t>o?o:t<a?n(u)?u:r:t>=l||n(t)?t:r}function Xa(e,t){var n=e.a.ob();return t<n||t>(n=e.a.Ca())?n:t}function Ja(){this.b=function(){},this.a=new Set}function Qa(e){var t=this;this.h=e,this.f=new Map,this.a=function(){},this.b=function(){},this.c=function(){},this.i=[{eb:null,cb:eo,Wa:function(e,n){return t.a(e,n)}},{eb:Za,cb:eo,Wa:function(e,n){return t.a(e,n)}},{eb:to,cb:eo,Wa:function(e,n){return t.a(e,n)}},{eb:eo,cb:Za,Wa:function(e,n){return t.b(e,n)}},{eb:eo,cb:to,Wa:function(e,n){return t.b(e,n)}},{eb:Za,cb:to,Wa:function(e,n){return t.c(e,n)}},{eb:to,cb:Za,Wa:function(e,n){return t.c(e,n)}}]}Ca.prototype.release=function(){this.g=null,this.c=function(){}},La.prototype.release=function(){this.f&&(this.f.release(),this.f=null),null!=this.g&&(this.g.stop(),this.g=null),this.b&&(this.b.release(),this.b=null),this.a=this.u=this.l=null},La.prototype.jd=function(){this.h=!0,Ia(this)},Pa.prototype.release=function(){this.b.stop();for(var e=f(this.a),t=e.next();!t.done;t=e.next())t.value.release();this.a.clear()},Ma.prototype.release=function(){this.a=this.c=null,this.b=function(){}},Ma.prototype.g=function(e){var t=this.a,n=this.c.periods;t!=(e=Da(n,e)||n[0])&&this.b(e),this.a=e},Na.prototype.release=function(){this.b&&(this.b.stop(),this.b=null),this.a=null},Na.prototype.set=function(e){this.c=e,Ua(this)},Fa.prototype.release=function(){this.b&&(this.b.release(),this.b=null),null!=this.c&&(this.c.release(),this.c=null),this.f=function(){},this.a=null},Ha.prototype.release=function(){this.a&&(this.a.stop(),this.a=null),this.b=null},za.prototype.release=function(){this.b&&(this.b.release(),this.b=null),this.a=null},za.prototype.m=function(e){this.c=this.f?this.c:e},za.prototype.h=function(){return(this.f?this.a.currentTime:this.c)||0},za.prototype.s=function(){},Wa.prototype.release=function(){this.c&&(this.c.release(),this.c=null),this.f&&(this.f.release(),this.f=null),this.i&&(this.i.stop(),this.i=null),this.b=this.c=this.a=this.g=null,this.u=function(){}},Wa.prototype.m=function(e){var t=this.c;0<t.a.readyState?Ya(t.c,e):Ka(t,e)},Wa.prototype.h=function(){var e=Ba(this.c);return 0<this.b.readyState&&!this.b.paused?Xa(this,e):e},Wa.prototype.s=function(){this.f.jd()},Ja.prototype.release=function(){this.b=function(){},this.a.clear()},Qa.prototype.release=function(){this.h=null,this.f.clear(),this.a=function(){},this.b=function(){},this.c=function(){}},Qa.prototype.g=function(e,t){for(var n=f(this.h.a),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.f.get(r),a=e<r.startTime?Za:e>r.endTime?to:eo;this.f.set(r,a);for(var o=f(this.i),s=o.next();!s.done;s=o.next())(s=s.value).eb==i&&s.cb==a&&s.Wa(r,t)}};var Za=1,eo=2,to=3;function no(e,t){this.a=t,this.c=e,this.g=null,this.l=1,this.u=Promise.resolve(),this.h=[],this.i=new Map,this.b=new Map,this.s=!1,this.F=null,this.D=this.f=this.m=!1,this.B=0}function ro(e){return ao(e,"audio")}function io(e){return ao(e,"video")}function ao(e,t){var n=e.b.get(t);return n?n.Ka||n.stream:null}function oo(e,t){return p((function n(){var r,i,a,o,s,l,u,c,d;return M(n,(function(n){switch(n.j){case 1:return r=Yt,w(n,xn(e.a.L,r.ra),2);case 2:return e.B++,e.D=!1,i=e.B,a=e.a.L,o=new Map,s=new Set,o.set(r.ra,t),s.add(t),w(n,a.init(o,!1),3);case 3:return e.f?n.return():w(n,mo(e,s),4);case 4:if(e.f)return n.return();l=e.a.L.g.isTextVisible()||e.g.alwaysStreamText,e.B!=i||e.b.has(r.ra)||e.D||!l||(u=e.a.Ua(),c=Eo(e,u),d=ho(t,c,0),e.b.set(r.ra,d),ko(e,d,0)),S(n)}}))}))}function so(e,t){var n=e.b.get("video");if(n){var r=n.stream;if(r)if(t){var i=r.trickModeVideo;i&&!n.Ka&&(uo(e,i,!1,0,!1),n.Ka=r)}else(r=n.Ka)&&(n.Ka=null,uo(e,r,!0,0,!1))}}function lo(e,t,n,r){var i=!1;if(t.video){var a=uo(e,t.video,n,r,!1);i=i||a}return t.audio&&(e=uo(e,t.audio,n,r,!1),i=i||e),i}function uo(e,t,n,r,i){var a=e.b.get(t.type);if(!a&&"text"==t.type&&e.g.ignoreTextStreamFailures)return oo(e,t),!0;if(!a)return!1;var o=To(e,t),s=Array.from(e.b.values()).every((function(e){return e.ia==a.ia}));return n&&o!=a.ia&&s?(e.b.forEach((function(t){co(e,t)})),!0):(a.Ka&&(t.trickModeVideo?(a.Ka=t,t=t.trickModeVideo):a.Ka=null),!(!(s=e.h[o])||!s.Db||!(s=e.i.get(t.id))||!s.Db||a.stream==t&&!i||("text"==t.type&&An(e.a.L,qe(t.mimeType,t.codecs)),a.stream=t,a.nc=!0,function(e,t,n){if(!t.Rb)return!1;var r=e.a.Ua(),i=wn(e.a.L,t.type),a=vo(e,t,r,i,n);return n=a&&a.a?a.a-a.b:null,a&&!n&&(n=(a.endTime-a.kc())*t.stream.bandwidth/8),!isNaN(n)&&((a=t.stream.initSegmentReference)&&(n+=(a.a?a.a-a.b:null)||0),a=e.a.getBandwidthEstimate(),8*n/a<i-r-Math.max(e.c.minBufferTime||0,e.g.rebufferingGoal)||t.Rb.b.a>n)}(e,a,o)&&a.Rb.abort(),n&&(a.Ra?a.Cc=!0:a.Ja?(a.Oa=!0,a.dc=r,a.Cc=!0):(Co(a),So(e,a,!0,r).catch((function(t){e.a&&e.a.onError(t)})))),0)))}function co(e,t){t.Ra||t.Oa||(t.Ja?(t.Oa=!0,t.dc=0):null==Tn(e.a.L,t.type)?null==t.Ga&&ko(e,t,0):(Co(t),So(e,t,!1,0).catch((function(t){e.a&&e.a.onError(t)}))))}function fo(e,t,n,r,i){return p((function a(){var o,s,l,u,c,d,f;return M(a,(function(a){switch(a.j){case 1:return o=e.a.Ua(),s=Eo(e,o),l=Yt,u=new Map,c=new Set,t&&(u.set(l.Eb,t),c.add(t)),n&&(u.set(l.Pa,n),c.add(n)),r&&(u.set(l.ra,r),c.add(r)),d=e.a.L,f=e.g.forceTransmuxTS,w(a,d.init(u,f),2);case 2:return e.f?a.return():(function(e){var t=e.c.presentationTimeline.Y();1/0>t?e.a.L.xa(t):e.a.L.xa(Math.pow(2,32))}(e),w(a,mo(e,c),3));case 3:if(e.f)return a.return();u.forEach((function(t,n){if(!e.b.has(n)){var r=ho(t,s,i);e.b.set(n,r),ko(e,r,0)}})),S(a)}}))}))}function ho(e,t,n){return{stream:e,type:e.type,sb:null,Da:null,Ka:null,nc:!0,ia:t,endOfStream:!1,Ja:!1,Ga:null,Oa:!1,dc:0,Cc:!1,Ra:!1,od:!1,Pb:!1,rd:n||0,Rb:null}}function po(e,t){var n=e.h[t];if(n)return n.promise;n={promise:new ge,Db:!1},e.h[t]=n;for(var r=new Set,i=f(e.c.periods[t].variants),a=i.next();!a.done;a=i.next())(a=a.value).video&&r.add(a.video),a.video&&a.video.trickModeVideo&&r.add(a.video.trickModeVideo),a.audio&&r.add(a.audio);for(a=(i=f(e.c.periods[t].textStreams)).next();!a.done;a=i.next())r.add(a.value);return e.u=e.u.then(function(){if(!this.f)return mo(this,r)}.bind(e)).then(function(){this.f||(this.h[t].promise.resolve(),this.h[t].Db=!0)}.bind(e)).catch(function(e){this.f||(this.h[t].promise.catch((function(){})),this.h[t].promise.reject(),delete this.h[t],this.a.onError(e))}.bind(e)),n.promise}function mo(e,t){return p((function n(){var r,i,a,o,s,l,u;return M(n,(function(n){switch(n.j){case 1:r=[];for(var c=f(t),d=c.next();!d.done;d=c.next())i=d.value,(a=e.i.get(i.id))?r.push(a.promise):(e.i.set(i.id,{promise:new ge,Db:!1}),r.push(i.createSegmentIndex()));return k(n,2),w(n,Promise.all(r),4);case 4:if(e.f)return n.return();x(n,3);break;case 2:if(o=R(n),e.f)return n.return();for(d=(n=f(t)).next();!d.done;d=n.next())s=d.value,e.i.get(s.id).promise.catch((function(){})),e.i.get(s.id).promise.reject(),e.i.delete(s.id);throw o;case 3:for(d=(c=f(t)).next();!d.done;d=c.next())l=d.value,(u=e.i.get(l.id)).Db||(u.promise.resolve(),u.Db=!0);S(n)}}))}))}function go(e,t){if(!e.f&&!t.Ja&&null!=t.Ga&&!t.Ra)if(t.Ga=null,t.Oa)So(e,t,t.Cc,t.dc);else{try{var n=function(e,t){if(_o(t))return Cn(e.a.L,t.stream.originalId||""),null;var n=e.a.Ua(),r=yo(e,t,n),i=To(e,t.stream),a=Eo(e,r),o=function(e,t,n){return"text"==t?null==(e=e.a).b||e.b<n?0:e.b-Math.max(n,e.a):Bt(e=Sn(e,t),n)}(e.a.L,t.type,n),s=Math.max(e.c.minBufferTime||0,e.g.rebufferingGoal,e.g.bufferingGoal)*e.l;if(r>=e.c.presentationTimeline.Y())return t.endOfStream=!0,"video"==t.type&&(r=e.b.get("text"))&&"application/cea-608"==r.stream.mimeType&&(r.endOfStream=!0),null;if(t.endOfStream=!1,t.ia=a,a!=i)return null;if(o>=s)return.5;if(a=wn(e.a.L,t.type),!(a=vo(e,t,n,a,i)))return 1;var l=1/0;return Array.from(e.b.values()).forEach((function(t){_o(t)||(t=yo(e,t,n),l=Math.min(l,t))})),r>=l+e.c.presentationTimeline.a?1:(t.rd=0,function(e,t,n,r,i){var a=e.c.periods[r],o=t.stream,s=e.c.presentationTimeline.Y(),l=e.c.periods[r+1];r=function(e,t,n,r,i){return t.nc?(n=function(e,t,n,r,i){return"text"==t?(e.a.m=n,(e=e.a).f=r,e.h=i,Promise.resolve()):Promise.all([Rn(e,t,e.Be.bind(e,t)),Rn(e,t,e.kg.bind(e,t,n)),Rn(e,t,e.hg.bind(e,t,r,i))])}(e.a.L,t.type,e.c.periods[n].startTime-t.stream.presentationTimeOffset,r,i),t.stream.initSegmentReference?(e=wo(e,t,t.stream.initSegmentReference).then(function(e){if(!this.f)return kn(this.a.L,t.type,e,null,null,t.stream.closedCaptions&&0<t.stream.closedCaptions.size)}.bind(e)).catch((function(e){return t.nc=!0,Promise.reject(e)})),Promise.all([n,e])):n):Promise.resolve()}(e,t,r,Math.max(0,a.startTime-.1),l?l.startTime+.01:s),t.Ja=!0,t.nc=!1,s=wo(e,t,i),Promise.all([r,s]).then(function(e){if(!this.f&&!this.m)return function(e,t,n,r,i,a,o){var s=i.closedCaptions&&0<i.closedCaptions.size;return null!=i.emsgSchemeIdUris&&0<i.emsgSchemeIdUris.length&&(new jr).fa("emsg",e.K.bind(e,r,a,i.emsgSchemeIdUris)).parse(o),function(e,t,n){var r=Math.max(e.g.bufferBehind,e.c.presentationTimeline.a),i=Tn(e.a.L,t.type);return null==i||0>=(n=n-i-r)?Promise.resolve():e.a.L.remove(t.type,i,i+n).then(function(){}.bind(e))}(e,t,n).then(function(){if(!this.f)return kn(this.a.L,t.type,o,a.startTime+r.startTime,a.endTime+r.startTime,s)}.bind(e)).then(function(){if(!this.f)return t.sb=i,t.Da=a,Promise.resolve()}.bind(e))}(this,t,n,a,o,i,e[1])}.bind(e)).then(function(){this.f||this.m||(t.Ja=!1,t.od=!1,t.Oa||this.a.jd(),ko(this,t,0),function(e,t){if(!e.s){var n=Array.from(e.b.values());if(1==n.length&&"text"==n[0].type||(e.s=n.every((function(e){return"text"==e.type||!e.Oa&&!e.Ra&&e.Da}))),e.s){for(n=To(e,t),e.h[n]||po(e,n).then(function(){this.f||this.a.$d()}.bind(e)).catch(Vt.oc),n=0;n<e.c.periods.length;++n)po(e,n).catch(Vt.oc);e.a.Lf&&e.a.Lf()}}}(this,o))}.bind(e)).catch(function(e){this.f||this.m||(t.Ja=!1,"text"==t.type&&this.g.ignoreTextStreamFailures?this.b.delete("text"):7001==e.code?(t.Ja=!1,t.Ga=null,ko(this,t,0)):3017==e.code?function(e,t,n){if(!Array.from(e.b.values()).some((function(e){return e!=t&&e.od}))){var r=Math.round(100*e.l);if(20<r)e.l-=.2;else{if(!(4<r))return t.Pb=!0,e.m=!0,void e.a.onError(n);e.l-=.04}t.od=!0}ko(e,t,4)}(this,t,e):(t.Pb=!0,e.severity=2,xo(this,e)))}.bind(e))}(e,t,n,i,a),null)}(e,t);null!=n&&(ko(e,t,n),t.Pb=!1)}catch(t){return void xo(e,t)}n=Array.from(e.b.values()),function(e,t){var n=To(e,t.stream);if(t.ia!=n){var r=t.ia,i=Array.from(e.b.values());i.every((function(e){return e.ia==r||_o(e)}))&&i.every(Ao)&&po(e,r).then(function(){if(!this.f&&i.every(function(e){var t=Ao(e),n=To(this,e.stream);return!!_o(e)||t&&e.ia==r&&n!=r}.bind(this))){var e=this.c.periods[r],t=this.a.ae(e),n=new Map;t.variant&&t.variant.video&&n.set("video",t.variant.video),t.variant&&t.variant.audio&&n.set("audio",t.variant.audio),t.text&&n.set("text",t.text);for(var a=(t=f(this.b.keys())).next();!a.done;a=t.next())if(a=a.value,!n.has(a)&&"text"!=a)return void this.a.onError(new me(2,5,5005));for(a=(t=f(Array.from(n.keys()))).next();!a.done;a=t.next())if(a=a.value,!this.b.has(a)){if("text"!=a)return void this.a.onError(new me(2,5,5005));fo(this,null,null,n.get("text"),e.startTime),n.delete(a)}for(a=(t=f(Array.from(this.b.keys()))).next();!a.done;a=t.next()){a=a.value;var o=this.b.get(a),s=n.get(a);if(s){var l=_o(o);l&&(o.ia=r,o.rd=e.startTime),uo(this,s,!1,0,!1),l&&_o(o)||ko(this,this.b.get(a),0)}else this.b.delete(a)}this.a.$d()}}.bind(e)).catch(Vt.oc)}}(e,t),e.s&&n.every((function(e){return e.endOfStream}))&&e.a.L.endOfStream().then(function(){if(!this.f){var e=this.a.L.Y();0!=e&&e<this.c.presentationTimeline.Y()&&this.c.presentationTimeline.xa(e)}}.bind(e))}}function yo(e,t,n){return t.sb&&t.Da?(n=To(e,t.sb),e.c.periods[n].startTime+t.Da.endTime):Math.max(n,t.rd)}function vo(e,t,n,r,i){if(t.Da&&t.stream==t.sb)return bo(e,t,i,t.Da.position+1);if(t.Da?(n=To(e,t.sb),n=t.stream.findSegmentPosition(Math.max(0,e.c.periods[n].startTime+t.Da.endTime-e.c.periods[i].startTime))):n=t.stream.findSegmentPosition(Math.max(0,(r||n)-e.c.periods[i].startTime)),null==n)return null;var a=null;return null==r&&(a=bo(e,t,i,Math.max(0,n-1))),a||bo(e,t,i,n)}function bo(e,t,n,r){return n=e.c.periods[n],(t=t.stream.getSegmentReference(r))?(e=(r=e.c.presentationTimeline).Ob(),r=r.pb(),n.startTime+t.endTime<e||n.startTime+t.startTime>r?null:t):null}function _o(e){return e&&"text"==e.type&&"application/cea-608"==e.stream.mimeType}function Ao(e){return!e.Ja&&null==e.Ga&&!e.Oa&&!e.Ra}function Eo(e,t){var n=Da(e.c.periods,t+1/15);return n?e.c.periods.indexOf(n):0}function To(e,t){for(var n=e.c.periods,r=0;r<n.length;r++){for(var i=n[r],a=new Set,o=f(i.variants),s=o.next();!s.done;s=o.next())(s=s.value).audio&&a.add(s.audio),s.video&&a.add(s.video),s.video&&s.video.trickModeVideo&&a.add(s.video.trickModeVideo);for(o=(i=f(i.textStreams)).next();!o.done;o=i.next())a.add(o.value);if(a.has(t))return r}return-1}function wo(e,t,n){return n=vi(n.c(),n.b,n.a,e.g.retryParameters),e=e.a.ub.request(1,n),t.Rb=e,e.promise.then((function(e){return t.Rb=null,e.data}))}function So(e,t,n,r){return p((function i(){var a,o,s;return M(i,(function(i){switch(i.j){case 1:return t.Oa=!1,t.Cc=!1,t.dc=0,t.Ra=!0,r?(o=e.a.Ua(),s=e.a.L.Y(),a=e.a.L.remove(t.type,o+r,s)):a=xn(e.a.L,t.type).then(function(){if(!this.f&&n)return this.a.L.flush(t.type)}.bind(e)),w(i,a,2);case 2:if(e.f)return i.return();t.sb=null,t.Da=null,t.Ra=!1,t.endOfStream=!1,ko(e,t,0),S(i)}}))}))}function ko(e,t,n){t.Ga=new de((function(){return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return k(n,2),w(n,go(e,t),4);case 4:x(n,0);break;case 2:r=R(n),e.a&&e.a.onError(r),S(n)}}))}))})).R(n)}function Co(e){null!=e.Ga&&(e.Ga.stop(),e.Ga=null)}function xo(e,t){pe(e.F).then(function(){this.f||(this.a.onError(t),t.handled||this.g.failureCallback(t))}.bind(e))}function Ro(e,t,n,r,i,a){if(200<=n&&299>=n&&202!=n)return{uri:i||r,ld:r,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=lt(t)}catch(e){}throw new me(401==n||403==n?2:1,1,1001,r,n,i,e,a)}function Lo(e,t,n,r){var i=new Lo.b;We(t.headers).forEach((function(e,t){i.append(t,e)}));var a=new Lo.a,o={Id:!1,te:!1};if(e=new ye(e=Lo.l(e,n,{body:t.body||void 0,headers:i,method:t.method,signal:a.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},o,r),(function(){return o.Id=!0,a.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var s=new fe((function(){o.te=!0,a.abort()}));s.R(t/1e3),e.finally((function(){s.stop()}))}return e}function Io(e,t,n,r){var i=new Io.f,a=Date.now(),o=0;return new ye(new Promise((function(s,l){for(var u in i.open(t.method,e,!0),i.responseType="arraybuffer",i.timeout=t.retryParameters.timeout,i.withCredentials=t.allowCrossSiteCredentials,i.onabort=function(){l(new me(1,1,7001,e,n))},i.onload=function(t){for(var r=(t=t.target).getAllResponseHeaders().trim().split("\r\n"),i={},a=(r=f(r)).next();!a.done;a=r.next())i[(a=a.value.split(": "))[0].toLowerCase()]=a.slice(1).join(": ");try{var o=Ro(i,t.response,t.status,e,t.responseURL,n);s(o)}catch(e){l(e)}},i.onerror=function(t){l(new me(1,1,1002,e,t,n))},i.ontimeout=function(){l(new me(1,1,1003,e,n))},i.onprogress=function(e){var t=Date.now();(100<t-a||e.lengthComputable&&e.loaded==e.total)&&(r(t-a,e.loaded-o,e.total-e.loaded),o=e.loaded,a=t)},t.headers)i.setRequestHeader(u.toLowerCase(),t.headers[u]);i.send(t.body)})),(function(){return i.abort(),Promise.resolve()}))}function Po(){this.a=this.f=this.b=0,this.c=new Map,this.g=0}function jo(e,t,n){this.h=e,this.b=new Map,this.c=!1,this.g=t,this.f=n,this.a=new Po}function Oo(e,t,n,r,i,a){var o=function(e,t){e.b+=t;var n=e.g;return e.g++,e.c.set(n,t),n}(e.a,r);r=e.b.get(t)||Promise.resolve(),e.b.set(t,r.then((function(){return p((function t(){var r,s,l,u,c,d;return M(t,(function(t){switch(t.j){case 1:return w(t,function(e,t){return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return w(n,e.h.request(1,t).promise,2);case 2:return r=n.o,n.return(r.data)}}))}))}(e,n),2);case 2:if(r=t.o,e.c)throw new me(2,9,7001);if(i)for(var f in s=new Uint8Array(r),(l=new Fr(s)).data)u=Number(f),c=l.data[u],d=l.a[u],e.f(c,d);return e.a.close(o,r.byteLength),f=e.a,e.g(0==f.b?0:f.f/f.b,e.a.a),t.return(a(r))}}))}))})))}function Do(e,t){var n=this;this.c=e,this.b=e.objectStore(t),this.a=new ge,e.onabort=function(e){e.preventDefault(),n.a.reject()},e.onerror=function(e){e.preventDefault(),n.a.reject()},e.oncomplete=function(){n.a.resolve()}}function Mo(e,t){return new Promise((function(n,r){var i=e.b.openCursor();i.onerror=r,i.onsuccess=function(e){if(!(e=e.target.result))return n();t(e.key,e.value,e),e.continue()}}))}function No(e){this.b=e,this.a=[]}function Uo(e,t){return Fo(e,t,"readwrite")}function Fo(e,t,n){var r=new Do(n=e.b.transaction([t],n),t);return e.a.push(r),r.promise().then((function(){Re(e.a,r)}),(function(){Re(e.a,r)})),r}function Bo(e,t,n){this.b=new No(e),this.c=t,this.a=n}function Ko(e){return Promise.reject(new me(2,9,9011,"Cannot add new value to "+e))}function Vo(e,t,n,r){t=(e=Uo(e.b,t)).store();for(var i={},a=(n=f(n)).next();!a.done;i={key:i.key},a=n.next())i.key=a.value,t.delete(i.key).onsuccess=function(e){return function(){return r(e.key)}}(i);return e.promise()}function Go(e,t,n){return p((function r(){var i,a,o,s,l,u,c;return M(r,(function(r){switch(r.j){case 1:for(i=Fo(e.b,t,"readonly"),a=i.store(),o={},s=[],l={},u=f(n),c=u.next();!c.done;l={request:l.request,key:l.key},c=u.next())l.key=c.value,l.request=a.get(l.key),l.request.onsuccess=function(e){return function(){null==e.request.result&&s.push(e.key),o[e.key]=e.request.result}}(l);return w(r,i.promise(),2);case 2:if(s.length)throw new me(2,9,9012,"Could not find values for "+s);return r.return(n.map((function(e){return o[e]})))}}))}))}function Ho(e){this.a=new No(e)}function Yo(){this.a=new Map}function zo(e,t,n){if(!(e=e.a.get(t)))throw new me(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new me(2,9,9013,"Could not find cell with name "+n);return t}function Wo(e,t){$o.set(e,t)}no.prototype.destroy=function(){for(var e=f(this.b.values()),t=e.next();!t.done;t=e.next())Co(t.value);return this.b.clear(),this.i.clear(),this.g=this.h=this.u=this.c=this.a=null,this.f=!0,Promise.resolve()},no.prototype.configure=function(e){this.g=e,this.F=new he({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0},!0)},no.prototype.start=function(){var e=this;return p((function t(){var n,r,i;return M(t,(function(t){switch(t.j){case 1:return n=e.a.Ua(),r=Eo(e,n),(i=e.a.ae(e.c.periods[r])).variant||i.text?w(t,fo(e,i.variant?i.variant.audio:null,i.variant?i.variant.video:null,i.text,n),2):t.return(new me(2,5,5005));case 2:if(e.f)return t.return();e.a&&e.a.Cf&&e.a.Cf(),S(t)}}))}))},no.prototype.K=function(e,t,n,r){var i=r.reader.md(),a=r.reader.md(),o=r.reader.G(),s=r.reader.G(),l=r.reader.G(),u=r.reader.G();r=r.reader.Za(r.reader.J.byteLength-r.reader.ca()),e=e.startTime+t.startTime+s/o,n.includes(i)&&("urn:mpeg:dash:event:2012"==i?this.a.Df():this.a.onEvent(new we("emsg",{detail:{startTime:e,endTime:e+l/o,schemeIdUri:i,value:a,timescale:o,presentationTimeDelta:s,eventDuration:l,id:u,messageData:r}})))},V("shaka.net.HttpFetchPlugin",Lo),Lo.l=function(e,t,n,r,i){return p((function a(){var o,s,l,u,c,d,f,h,m,g,y,v;return M(a,(function(a){switch(a.j){case 1:return o=Lo.g,s=Lo.c,d=c=0,f=Date.now(),k(a,2),w(a,o(e,n),4);case 4:return l=a.o,h=l.clone().body.getReader(),g=(m=l.headers.get("Content-Length"))?parseInt(m,10):0,new s({start:function(e){!function t(){return p((function n(){var r,a;return M(n,(function(n){switch(n.j){case 1:return k(n,2),w(n,h.read(),4);case 4:r=n.o,x(n,3);break;case 2:return R(n),n.return();case 3:r.done||(c+=r.value.byteLength),(100<(a=Date.now())-f||r.done)&&(i(a-f,c-d,g-c),d=c,f=a),r.done?e.close():(e.enqueue(r.value),t()),S(n)}}))}))}()}}),w(a,l.arrayBuffer(),5);case 5:u=a.o,x(a,3);break;case 2:if(y=R(a),r.Id)throw new me(1,1,7001,e,t);if(r.te)throw new me(1,1,1003,e,t);throw new me(1,1,1002,e,y,t);case 3:return v={},l.headers.forEach((function(e,t){v[t.trim()]=e})),a.return(Ro(v,u,l.status,e,l.url,t))}}))}))},Lo.isSupported=function(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)},Lo.isSupported=Lo.isSupported,Lo.g=e.fetch,Lo.a=e.AbortController,Lo.c=e.ReadableStream,Lo.b=e.Headers,Lo.isSupported()&&(De("http",Lo,2),De("https",Lo,2)),V("shaka.net.HttpXHRPlugin",Io),Io.f=e.XMLHttpRequest,De("http",Io,1),De("https",Io,1),Po.prototype.close=function(e,t){if(this.c.has(e)){var n=this.c.get(e);this.c.delete(e),this.f+=n,this.a+=t}},jo.prototype.destroy=function(){return this.c=!0,Promise.all(this.b.values()).then((function(){}),(function(){}))},Do.prototype.abort=function(){try{this.c.abort()}catch(e){}return this.a.catch((function(){}))},Do.prototype.store=function(){return this.b},Do.prototype.promise=function(){return this.a},No.prototype.destroy=function(){return Promise.all(this.a.map((function(e){return e.abort()})))},(r=Bo.prototype).destroy=function(){return this.b.destroy()},r.hasFixedKeySpace=function(){return!0},r.addSegments=function(){return Ko(this.c)},r.removeSegments=function(e,t){return Vo(this,this.c,e,t)},r.getSegments=function(e){var t=this;return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return w(n,Go(t,t.c,e),2);case 2:return r=n.o,n.return(r.map((function(e){return t.Jd(e)})))}}))}))},r.addManifests=function(){return Ko(this.a)},r.updateManifestExpiration=function(e,t){var n=Uo(this.b,this.a),r=n.store();return r.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,r.put(n,e))},n.promise()},r.removeManifests=function(e,t){return Vo(this,this.a,e,t)},r.getManifests=function(e){var t=this;return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return w(n,Go(t,t.a,e),2);case 2:return r=n.o,n.return(r.map((function(e){return t.ec(e)})))}}))}))},r.getAllManifests=function(){var e=this;return p((function t(){var n,r;return M(t,(function(t){switch(t.j){case 1:return n=Fo(e.b,e.a,"readonly"),r=new Map,w(t,Mo(n,(function(t,n){r.set(t,e.ec(n))})),2);case 2:return w(t,n.promise(),3);case 3:return t.return(r)}}))}))},r.Jd=function(e){return e},r.ec=function(e){return e},r.add=function(e,t){var n=this;return p((function r(){var i,a,o,s;return M(r,(function(r){switch(r.j){case 1:i=Uo(n.b,e),a=i.store(),o=[];for(var l=f(t),u=l.next();!u.done;u=l.next())s=u.value,a.add(s).onsuccess=function(e){o.push(e.target.result)};return w(r,i.promise(),2);case 2:return r.return(o)}}))}))},Ho.prototype.destroy=function(){return this.a.destroy()},Ho.prototype.getAll=function(){var e=this;return p((function t(){var n,r;return M(t,(function(t){switch(t.j){case 1:return n=Fo(e.a,"session-ids","readonly"),r=[],w(t,Mo(n,(function(e,t){r.push(t)})),2);case 2:return w(t,n.promise(),3);case 3:return t.return(r)}}))}))},Ho.prototype.add=function(e){for(var t=Uo(this.a,"session-ids"),n=t.store(),r=(e=f(e)).next();!r.done;r=e.next())n.add(r.value);return t.promise()},Ho.prototype.remove=function(e){var t=this;return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return w(n,Mo(r=Uo(t.a,"session-ids"),(function(t,n,r){0<=e.indexOf(n.sessionId)&&r.delete()})),2);case 2:return w(n,r.promise(),0)}}))}))},Yo.prototype.destroy=function(){for(var e=[],t=f(this.a.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.a.clear(),Promise.all(e)},Yo.prototype.init=function(){var e=this;$o.forEach((function(t,n){var r=t();r&&e.a.set(n,r)}));for(var t=[],n=f(this.a.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)},Yo.prototype.erase=function(){var e=this;return p((function t(){var n,r;return M(t,(function(t){switch(t.j){case 1:return n=Array.from(e.a.values()),(r=0<n.length)||$o.forEach((function(e){(e=e())&&n.push(e)})),w(t,Promise.all(n.map((function(e){return e.erase()}))),2);case 2:if(!r)return w(t,Promise.all(n.map((function(e){return e.destroy()}))),0);t.A(0)}}))}))},V("shaka.offline.StorageMuxer.register",Wo),V("shaka.offline.StorageMuxer.unregister",(function(e){$o.delete(e)}));var $o=new Map;function qo(e){Bo.apply(this,arguments)}function Xo(e){return function(e){var t=e.streams.filter((function(e){return"audio"==e.contentType})),n=e.streams.filter((function(e){return"video"==e.contentType}));if(!t.every((function(e){return e.variantIds}))||!n.every((function(e){return e.variantIds}))){t.forEach((function(e){e.variantIds=[]})),n.forEach((function(e){e.variantIds=[]}));var r=0;if(n.length&&!t.length){var i=r++;n.forEach((function(e){e.variantIds.push(i)}))}if(!n.length&&t.length){var a=r++;t.forEach((function(e){e.variantIds.push(a)}))}n.length&&t.length&&t.forEach((function(e){n.forEach((function(t){var n=r++;e.variantIds.push(n),t.variantIds.push(n)}))}))}}(e),e.streams.forEach((function(){})),{startTime:e.startTime,streams:e.streams.map(Jo)}}function Jo(e){var t=e.initSegmentUri?Zo(e.initSegmentUri):null;return{id:e.id,originalId:null,primary:e.primary,presentationTimeOffset:e.presentationTimeOffset,contentType:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,initSegmentKey:t,encrypted:e.encrypted,keyId:e.keyId,segments:e.segments.map(Qo),variantIds:e.variantIds}}function Qo(e){var t=Zo(e.uri);return{startTime:e.startTime,endTime:e.endTime,dataKey:t}}function Zo(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new me(2,9,9004,"Could not parse uri "+e)}function es(e,t,n,r){Bo.call(this,e,t,n),this.f=r}function ts(){this.g=this.c=this.b=this.a=this.f=null}function ns(e,t,n,r){this.a=e,this.g=t,this.f=n,this.c=r,this.b=["offline:",e,"/",t,"/",n,"/",r].join("")}function rs(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var r=e[3];return r&&null!=t?new ns(t,n,r,Number(e[4])):null}function is(e,t){this.b=e,this.a=t}function as(e,t,n){var r=t.streams.filter((function(e){return"audio"==e.contentType})),i=t.streams.filter((function(e){return"video"==e.contentType}));return r=function(e,t,n){for(var r=new Set,i=f(t),a=i.next();!a.done;a=i.next()){var o=f(a.value.variantIds);for(a=o.next();!a.done;a=o.next())r.add(a.value)}for(i=f(n),a=i.next();!a.done;a=i.next())for(o=f(a.value.variantIds),a=o.next();!a.done;a=o.next())r.add(a.value);for(i=new Map,r=f(r),a=r.next();!a.done;a=r.next())a=a.value,i.set(a,{id:a,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});for(t=f(t),r=t.next();!r.done;r=t.next())for(r=r.value,a=os(e,r),o=f(r.variantIds),r=o.next();!r.done;r=o.next())(r=i.get(r.value)).language=a.language,r.primary=r.primary||a.primary,r.audio=a;for(n=f(n),t=n.next();!t.done;t=n.next())for(r=t.value,t=os(e,r),a=f(r.variantIds),r=a.next();!r.done;r=a.next())(r=i.get(r.value)).primary=r.primary||t.primary,r.video=t;return i}(e,r,i),i=t.streams.filter((function(e){return"text"==e.contentType})).map((function(t){return os(e,t)})),t.streams.forEach((function(r){r=r.segments.map((function(t,n){return ss(e,n,t)})),n.vb(r,t.startTime)})),{startTime:t.startTime,variants:Array.from(r.values()),textStreams:i}}function os(e,t){var n=t.segments.map((function(t,n){return ss(e,n,t)})),r=new ei(n);return n={id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(e){return r.find(e)},getSegmentReference:function(e){return r.get(e)},initSegmentReference:null,presentationTimeOffset:t.presentationTimeOffset,mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate||void 0,pixelAspectRatio:t.pixelAspectRatio||void 0,kind:t.kind,encrypted:t.encrypted,keyId:t.keyId,language:t.language,label:t.label||null,type:t.contentType,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},null!=t.initSegmentKey&&(n.initSegmentReference=function(e,t){var n=new ns("segment",e.b,e.a,t);return new Jr((function(){return[n.toString()]}),0,null)}(e,t.initSegmentKey)),n}function ss(e,t,n){var r=new ns("segment",e.b,e.a,n.dataKey);return new Qr(t,n.startTime,n.endTime,(function(){return[r.toString()]}),0,null)}function ls(){this.a=null}function us(e){var t=rs(e);return t&&"manifest"==t.a?us.h(e):t&&"segment"==t.a?us.i(t.key(),t):ve(new me(2,1,9004,e))}function cs(e,t,n){return p((function r(){var i,a,o,s,l,u;return M(r,(function(r){switch(r.j){case 1:i=[];for(var c=[],d=f(n),h=d.next();!h.done;h=d.next()){h=h.value;for(var m=!1,g=f(c),y=g.next();!y.done;y=g.next())if(ds((y=y.value).info,h)){y.sessionIds.push(h.sessionId),m=!0;break}m||c.push({info:h,sessionIds:[h.sessionId]})}a=f(c),o=a.next();case 2:if(o.done){r.A(4);break}return s=o.value,l=function(e,t,n){return p((function r(){var i,a;return M(r,(function(r){switch(r.j){case 1:return i=new pt({ub:t,onError:function(){},qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),k(r,2),i.configure(e),w(r,function(e,t,n,r,i,a){var o=new Map;return o.set(t,{audioCapabilities:i,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t,drmInfos:[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,initData:null,keyIds:null}]}),Tt(e,o)}(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:x(r,3);break;case 2:return R(r),w(r,i.destroy(),5);case 5:return r.return([]);case 3:return k(r,6),w(r,yt(i),8);case 8:x(r,7);break;case 6:return R(r),w(r,i.destroy(),9);case 9:return r.return([]);case 7:return a=[],w(r,Promise.all(n.sessionIds.map((function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return k(t,2),w(t,function(e,t){return p((function n(){var r,i,a;return M(n,(function(n){switch(n.j){case 1:return w(n,wt(e,t),2);case 2:return(r=n.o)?(i=[],(a=e.b.get(r))&&(a.ya=new ge,i.push(a.ya)),i.push(r.remove()),w(n,Promise.all(i),0)):n.return()}}))}))}(i,e),4);case 4:a.push(e),x(t,0);break;case 2:R(t),S(t)}}))}))}))),10);case 10:return w(r,i.destroy(),11);case 11:return r.return(a)}}))}))}(e,t,s),w(r,l,5);case 5:u=r.o,i=i.concat(u),o=a.next(),r.A(2);break;case 4:return r.return(i)}}))}))}function ds(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Le(e.audioCapabilities,t.audioCapabilities,n)&&Le(e.videoCapabilities,t.videoCapabilities,n)}function fs(e,t){var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},r=this;this.g=t,this.c=e,this.i=n,this.h=null,this.f=[],this.b=this.a=null,this.l=!0,this.m=Promise.resolve().then((function(){return function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:if(e.l){if(0==e.f.length||e.a&&!e.a.Va)var n=!1;else{e.a&&(e.a.va.Ya(),e.a=null);var r=(n=e.f.shift()).create(e.i);r?(n.va.wb(),e.a={node:r.node,payload:r.payload,Va:r.Va,va:n.va}):n.va.rc(),n=!0}return n?n=Promise.resolve():e.a?n=function(e){return p((function t(){var n,r;return M(t,(function(t){switch(t.j){case 1:return e.c=e.g.cf(e.c,e.i,e.a.node,e.a.payload),k(t,2),e.b=e.g.Le(e.c,e.i,e.a.payload),w(t,e.b.promise,4);case 4:e.b=null,e.c==e.a.node&&(e.a.va.pc(),e.a=null),x(t,0);break;case 2:return 7001==(n=R(t)).code?e.a.va.Ya():e.a.va.onError(n),e.a=null,e.b=null,r=e,w(t,e.g.handleError(e.i,n),5);case 5:r.c=t.o,S(t)}}))}))}(e):(e.g.Bf(e.c),e.h=new ge,n=e.h),w(t,n,1)}t.A(0)}}))}))}(r)}))}function hs(e,t){var n={wb:function(){},pc:function(){},Ya:function(){},onError:function(){},rc:function(){},Jg:function(){}};return e.f.push({create:t,va:n}),e.b&&e.b.abort(),ps(e),n}function ps(e){e.h&&(e.h.resolve(),e.h=null)}function ms(e){this.a=null;for(var t=0;t<e.textTracks.length;++t){var n=e.textTracks[t];n.mode="disabled","Shaka Player TextTrack"==n.label&&(this.a=n)}this.a||(this.a=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.a.mode="hidden"}function gs(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,t.size=e.size;try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function ys(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var r=e.cues,i=r.length-1;0<=i;i--){var a=r[i];a&&t(a)&&e.removeCue(a)}e.mode=n}function vs(e,t,n,r,i){var a,o=i in r,s=!0;for(a in t){var l=i+"."+a,u=o?r[i]:n[a];o||a in n?void 0===t[a]?void 0===u||o?delete e[a]:e[a]=Ce(u):u.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=Ce(u)),l=vs(e[a],t[a],u,r,l),s=s&&l):typeof t[a]!=typeof u||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=u.constructor?($("Invalid config, wrong type for "+l),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&q("Unexpected number of arguments for "+l),e[a]=t[a]):($("Invalid config, unrecognized key "+l),s=!1)}return s}function bs(e,t){for(var n={},r=n,i=0,a=0;!(0>(i=e.indexOf(".",i)));)0!=i&&"\\"==e[i-1]||(r[a=e.substring(a,i).replace(/\\\./g,".")]={},r=r[a],a=i+1),i+=1;return r[e.substring(a).replace(/\\\./g,".")]=t,n}function _s(){}function As(){var e=5e5,t=1/0;navigator.connection&&(e=1e6*navigator.connection.downlink,navigator.connection.saveData&&(t=360));var n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:kt,fairPlayTransform:!0},r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,dash:{customScheme:function(e){if(e)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1},hls:{ignoreTextStreamFailures:!1}},i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:0},failureCallback:function(e){return[e]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0};nt("Web0S")&&(i.stallEnabled=!1);var a={trackSelectionCallback:function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return t.return(e)}}))}))},progressCallback:function(e,t){return[e,t]},usePersistentLicense:!0},o={drm:n,manifest:r,streaming:i,offline:a,abrFactory:Fn,abr:{enabled:!0,defaultBandwidthEstimate:e,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return a.trackSelectionCallback=function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return t.return(function(e,t){var n=e.filter((function(e){return"variant"==e.type})),r=[],i=Mn(t,n.map((function(e){return e.language})));i&&(r=n.filter((function(e){return On(e.language)==i}))),0==r.length&&(r=n.filter((function(e){return e.primary}))),0==r.length&&(n.map((function(e){return e.language})),r=n);var a=r.filter((function(e){return e.height&&480>=e.height}));if(a.length&&(a.sort((function(e,t){return t.height-e.height})),r=a.filter((function(e){return e.height==a[0].height}))),n=[],r.length){var o=Math.floor(r.length/2);r.sort((function(e,t){return e.bandwidth-t.bandwidth})),n.push(r[o])}for(r=f(e),o=r.next();!o.done;o=r.next())"text"==(o=o.value).type&&n.push(o);return n}(e,o.preferredAudioLanguage))}}))}))},o}function Es(e,t,n){var r={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}};return vs(e,t,n||As(),r,"")}function Ts(){this.a=null,this.b=[]}function ws(e,t){if(null==e.a)e.a={timestamp:Date.now()/1e3,state:t,duration:0};else{var n=Date.now()/1e3;e.a.duration=n-e.a.timestamp,e.a.state!=t&&(e.b.push(e.a),e.a={timestamp:n,state:t,duration:0})}}function Ss(e,t){var n=0;e.a&&e.a.state==t&&(n+=e.a.duration);for(var r=f(e.b),i=r.next();!i.done;i=r.next())n+=(i=i.value).state==t?i.duration:0;return n}function ks(){this.b=this.c=null,this.a=[]}function Cs(){this.f=this.s=this.h=this.b=this.i=this.l=this.m=this.g=this.u=NaN,this.a=new Ts,this.c=new ks}function xs(t,n){var r=this;ke.call(this),this.i=pl,this.a=null,this.gb=!1,this.g=new Be,this.Dc=this.l=this.Fb=this.b=this.s=this.f=this.Yb=this.B=this.Zb=this.W=this.ib=this.m=this.D=this.h=this.K=null,this.Xd=1e9,this.ac=new Set,this.kb=!0,this.pa=null,this.Ud=!1,this.Rd=0,this.oa=null,this.$=new ha,this.c=Us(this),this.bc={width:1/0,height:1/0},this.u=null,this.Gb=new Ea(this.c.preferredAudioLanguage,this.c.preferredVariantRole,this.c.preferredAudioChannelCount),this.na=this.c.preferredTextLanguage,this.fb=this.c.preferredTextRole,n&&n(this),this.K=function(e){return new je((function(t,n){e.l&&e.l.segmentDownloaded(t,n)}))}(this),this.g.w(e,"online",(function(){r.sd()})),this.F={name:"detach"},this.O={name:"attach"},this.Ha={name:"unload"},this.Mc={name:"manifest-parser"},this.Kc={name:"manifest"},this.hb={name:"media-source"},this.Ec={name:"drm-engine"},this.S={name:"load"},this.Rc={name:"src-equals-drm-engine"},this.jb={name:"src-equals"};var i=new Map;i.set(this.O,(function(e,t){return Ae(function(e,t,n){return null==t.v&&(t.v=n.v,e.g.w(t.v,"error",(function(){var t=el(e);t&&e.Ma(t)}))),e.a=t.v,Promise.resolve()}(r,e,t))})),i.set(this.F,(function(e){return e.v&&(r.g.ea(e.v,"error"),e.v=null),r.a=null,Ae(e=Promise.resolve())})),i.set(this.Ha,(function(e){return Ae(Ps(r,e))})),i.set(this.hb,(function(t){return Ae(t=function(t,n){return p((function r(){var i,a,o,s;return M(r,(function(r){switch(r.j){case 1:return i=e.muxjs?new Mt:new Nt,a=t.c.textDisplayFactory,o=new a,t.Fc=a,w(r,(s=new vn(n.v,i,o)).s,2);case 2:t.D=s,S(r)}}))}))}(r,t))})),i.set(this.Mc,(function(e,t){return Ae(function(e,t,n){return p((function r(){var i,a,o,s;return M(r,(function(r){switch(r.j){case 1:if(t.Aa=n.Aa,t.mimeType=n.mimeType,t.uri=n.uri,i=t.uri,a=e.K,e.Fb=i,t.Aa){e.s=t.Aa(),r.A(2);break}return o=e,w(r,gi.create(i,a,e.c.manifest.retryParameters,t.mimeType),3);case 3:o.s=r.o;case 2:s=Ce(e.c.manifest),n.v&&"AUDIO"===n.v.nodeName&&(s.disableVideo=!0),e.s.configure(s),S(r)}}))}))}(r,e,t))})),i.set(this.Kc,(function(e){return function(e,t){var n=t.uri,r=e.K;e.Yb=new Ja,function(e,t){e.b=t}(e.Yb,(function(t){Zs(e,"timelineregionadded",t)}));var i={networkingEngine:r,filterNewPeriod:function(t){return e.Nc(t)},filterAllPeriods:function(t){return Fs(e,t)},onTimelineRegionAdded:function(t){var n=e.Yb;e:{for(var r=f(n.a),i=r.next();!i.done;i=r.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){r=i;break e}r=null}null==r&&(n.a.add(t),n.b(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return e.Ma(t)}};return new ye(Promise.resolve().then((function(){return p((function t(){var r;return M(t,(function(t){switch(t.j){case 1:return r=e,w(t,e.s.start(n,i),2);case 2:if(r.b=t.o,e.dispatchEvent(new we("manifestparsed")),0==e.b.periods.length)throw new me(2,4,4014);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.some((function(e){return e.variants.some(t)}))&&e.forEach((function(e){e.variants=e.variants.filter(t)}))}(e.b.periods),S(t)}}))}))})),(function(){return e.s.stop()}))}(r,e)})),i.set(this.Ec,(function(){return Ae(function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.h=new pt({ub:e.K,onError:function(t){e.Ma(t)},qc:function(t){tl(e,t)},onExpirationUpdated:function(t,n){nl(e,t,n)},onEvent:function(t){e.dispatchEvent(t)}}),e.h.configure(e.c.drm),w(t,mt(e.h,Oa(e.b.periods),e.b.offlineSessionIds),2);case 2:Fs(e,e.b.periods),S(t)}}))}))}(r))})),i.set(this.S,(function(e,t){return Ae(function(e,t,n){return p((function r(){var i,a,o,s,l,u,c,d,h;return M(r,(function(r){switch(r.j){case 1:return t.startTime=n.startTime,i=t.v,a=t.uri,e.Fb=a,e.u=new Cs,o=function(){return Gs(e)},s=function(){var t=e.a.playbackRate;0!=t&&e.W.set(t)},e.g.w(i,"playing",o),e.g.w(i,"pause",o),e.g.w(i,"ended",o),e.g.w(i,"ratechange",s),l=e.c.abrFactory,e.l&&e.Dc==l||(e.Dc=l,e.l=new l,e.l.configure(e.c.abr)),function(e,t){for(var n=0;n<t.length;n++){for(var r=t[n],i=new Map,a=f(r.variants),o=a.next();!o.done;o=a.next())if((o=o.value).video&&o.video.closedCaptions)for(var s=f((o=o.video).closedCaptions.keys()),l=s.next();!l.done;l=s.next())if(l=l.value,!i.has(l)){var u={id:e.Xd++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",codecs:"",kind:"caption",encrypted:!1,keyId:null,language:o.closedCaptions.get(l),label:null,type:"text",primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:o.roles,channelsCount:null,audioSamplingRate:null,closedCaptions:null};i.set(l,u)}for(i=f(i.values()),a=i.next();!a.done;a=i.next())r.textStreams.push(a.value)}}(e,e.b.periods),e.Gb=new Ea(e.c.preferredAudioLanguage,e.c.preferredVariantRole,e.c.preferredAudioChannelCount),e.na=e.c.preferredTextLanguage,function(e,t,n){0<t&&(e.V()||e.qe(t)),n<e.Y()&&(e.V()||e.xa(n))}(e.b.presentationTimeline,e.c.playRangeStart,e.c.playRangeEnd),w(r,e.h.Hb(i),2);case 2:return e.l.init((function(t,n,r){n=void 0!==n&&n,r=void 0===r?0:r;e:{for(var i=f(e.b.periods),a=i.next();!a.done;a=i.next())if((a=a.value).variants.includes(t)){i=a;break e}i=null}Ms(e,i,t,!0),e.f&&lo(e.f,t,n,r)&&Ws(e)})),e.m=function(e,t){return new Wa(e.a,e.b,e.c.streaming,t,(function(){e.ib&&ja(e.ib,!0),e.f&&function(e){function t(t){var i=e.a.L;return t="text"==t?null!=(t=i.a).a&&null!=t.b&&n>=t.a&&n<t.b:Ft(t=Sn(i,t),n,r)}var n=e.a.Ua(),r=e.g.smallGapLimit,i=Eo(e,n);if(ze(e.b.values(),(function(e){return e.ia==i})))for(var a=f(e.b.keys()),o=a.next();!o.done;o=a.next())t(o=o.value)||co(e,e.b.get(o));else ze(e.b.keys(),t)||e.b.forEach((function(t){co(e,t)}))}(e.f),e.B&&Os(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t.startTime),e.ib=function(e){var t=new Ma(e.b);!function(e,t){e.b=t}(t,(function(){$s(e)}));var n=new Qa(e.Yb);!function(e,t,n,r){e.a=t,e.b=n,e.c=r}(n,(function(t){Zs(e,"timelineregionenter",t)}),(function(t){Zs(e,"timelineregionexit",t)}),(function(t,n){n||(Zs(e,"timelineregionenter",t),Zs(e,"timelineregionexit",t))}));var r=new Pa(e.a);return r.a.add(t),r.a.add(n),r}(e),e.W=new Na({jc:function(){return t.v.playbackRate},wd:function(e){t.v.playbackRate=e},Yd:function(e){t.v.currentTime+=e}}),u=Math.max(e.b.minBufferTime,e.c.streaming.rebufferingGoal),js(e,u),e.f=function(e){return new no(e.b,{Ua:function(){return e.m.h()},getBandwidthEstimate:function(){return e.l.getBandwidthEstimate()},L:e.D,ub:e.K,ae:e.zf.bind(e),$d:e.Fe.bind(e),onError:e.Ma.bind(e),onEvent:function(t){return e.dispatchEvent(t)},Df:e.Ef.bind(e),jd:e.Jf.bind(e)})}(e),e.f.configure(e.c.streaming),function(e){function t(e){var t="";e.video&&(t=Xe(e.video.codecs)[0]);var n="";return e.audio&&(n=Xe(e.audio.codecs)[0]),t+"-"+n}var n=e.b.periods.reduce((function(e,t){return e.concat(t.variants)}),[]);n=Un.Nd(n,e.c.preferredAudioChannelCount);var r=new Se;n.forEach((function(e){var n=t(e);r.push(n,e)}));var i=null,a=1/0;r.forEach((function(e,t){var n=0,r=0;t.forEach((function(e){n+=e.bandwidth||0,++r}));var o=n/r;o<a&&(i=e,a=o)})),e.b.periods.forEach((function(e){e.variants=e.variants.filter((function(e){return t(e)==i}))}))}(e),e.i=ml,e.dispatchEvent(new we("streaming")),w(r,e.f.start(),3);case 3:e.c.streaming.startAtSegmentBoundary&&(c=e.m.h(),d=function(e,t){function n(e,t){if(!e)return null;var n=e.findSegmentPosition(t-a.startTime);return null==n?null:(n=e.getSegmentReference(n))?n.startTime+a.startTime:null}var r=ro(e.f),i=io(e.f),a=ll(e);return r=n(r,t),null!=(i=n(i,t))&&null!=r?Math.max(i,r):null!=i?i:null!=r?r:t}(e,c),e.m.m(d)),e.b.periods.forEach(e.Nc.bind(e)),$s(e),Ws(e),(h=ll(e)||e.b.periods[0]).variants.some((function(e){return e.primary})),Hs(e,h.variants),e.g.da(i,"loadeddata",(function(){e.u.b=Date.now()/1e3-n.zd})),S(r)}}))}))}(r,e,t))})),i.set(this.Rc,(function(e){return Ae(e=function(e,t){return p((function n(){var r,i;return M(n,(function(n){switch(n.j){case 1:return r=Yt,e.h=new pt({ub:e.K,onError:function(t){e.Ma(t)},qc:function(t){tl(e,t)},onExpirationUpdated:function(t,n){nl(e,t,n)},onEvent:function(t){e.dispatchEvent(t)}}),e.h.configure(e.c.drm),i={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"video/mp4",codecs:"",encrypted:!0,keyId:null,language:"und",label:null,type:r.Pa,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0},w(n,mt(e.h,[i],[]),2);case 2:return w(n,e.h.Hb(t.v),0)}}))}))}(r,e))})),i.set(this.jb,(function(e,t){return function(e,t,n){function r(){return Gs(e)}if(t.uri=n.uri,t.startTime=n.startTime,e.Fb=t.uri,e.u=new Cs,e.m=new za(t.v),null!=t.startTime&&e.m.m(t.startTime),e.W=new Na({jc:function(){return t.v.playbackRate},wd:function(e){t.v.playbackRate=e},Yd:function(e){t.v.currentTime+=e}}),js(e,e.c.streaming.rebufferingGoal),e.g.w(t.v,"playing",r),e.g.w(t.v,"pause",r),e.g.w(t.v,"ended",r),e.g.da(t.v,"loadeddata",(function(){e.u.b=Date.now()/1e3-n.zd})),e.a.audioTracks&&(e.g.w(e.a.audioTracks,"addtrack",(function(){return $s(e)})),e.g.w(e.a.audioTracks,"removetrack",(function(){return $s(e)})),e.g.w(e.a.audioTracks,"change",(function(){return $s(e)}))),e.a.textTracks){var i=e.a.textTracks;e.g.w(i,"addtrack",(function(){return $s(e)})),e.g.w(i,"removetrack",(function(){return $s(e)})),e.g.w(i,"change",(function(){return $s(e)}))}t.v.src=t.uri,e.i=gl,e.dispatchEvent(new we("streaming"));var a=new ge;return e.a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?a.resolve():e.a.error?a.reject(el(e)):(e.g.da(e.a,"loadeddata",(function(){a.resolve()})),e.g.da(e.a,"error",(function(){a.reject(el(e))}))),new ye(a,(function(){return a.reject(new me(2,7,7001)),Promise.resolve()}))}(r,e,t)})),this.lb=new fs(this.F,{cf:function(e,t,n,i){var a=null;return e==r.F&&(a=n==r.F?r.F:r.O),e==r.O&&(a=n==r.F||t.v!=i.v?r.F:n==r.O?r.O:n==r.hb||n==r.S?r.hb:n==r.jb?r.Rc:null),e==r.hb&&(a=n==r.S&&t.v==i.v?r.Mc:r.Ha),e==r.Mc&&(a=dl(r.S,r.Kc,r.Ha,n,t,i)),e==r.Kc&&(a=dl(r.S,r.Ec,r.Ha,n,t,i)),e==r.Ec&&(a=dl(r.S,r.S,r.Ha,n,t,i)),e==r.Rc&&(a=n==r.jb&&t.v==i.v?r.jb:r.Ha),e!=r.S&&e!=r.jb||(a=r.Ha),e==r.Ha&&(a=i.v&&t.v==i.v?r.O:r.F),a},Le:function(e,t,n){return r.dispatchEvent(new we("onstatechange",{state:e.name})),i.get(e)(t,n)},handleError:function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return w(t,Ps(r,e),2);case 2:return t.return(e.v?r.O:r.F)}}))}))},Bf:function(e){r.dispatchEvent(new we("onstateidle",{state:e.name}))}}),t&&this.Hb(t,!0)}_(qo,Bo),qo.prototype.updateManifestExpiration=function(e,t){var n=Uo(this.b,this.a),r=n.store(),i=new ge;return r.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,r.put(n),i.resolve()):i.reject(new me(2,9,9012,"Could not find values for "+e))},n.promise().then((function(){return i}))},qo.prototype.ec=function(e){return{originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,periods:e.periods.map(Xo),sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata}},qo.prototype.Jd=function(e){return{data:e.data}},_(es,Bo),es.prototype.hasFixedKeySpace=function(){return this.f},es.prototype.addSegments=function(e){return this.f?Ko(this.c):this.add(this.c,e)},es.prototype.addManifests=function(e){return this.f?Ko(this.a):this.add(this.a,e)},es.prototype.ec=function(e){return null==e.expiration&&(e.expiration=1/0),e},(r=ts.prototype).init=function(){var t=this,n=new ge,r=e.indexedDB.open("shaka_offline_db",4);return r.onsuccess=function(e){e=e.target.result,t.f=e;var r=e.objectStoreNames;r=r.contains("manifest")&&r.contains("segment")?new qo(e,"segment","manifest"):null,t.a=r,r=(r=e.objectStoreNames).contains("manifest-v2")&&r.contains("segment-v2")?new es(e,"segment-v2","manifest-v2",!0):null,t.b=r,r=(r=e.objectStoreNames).contains("manifest-v3")&&r.contains("segment-v3")?new es(e,"segment-v3","manifest-v3",!1):null,t.c=r,e=e.objectStoreNames.contains("session-ids")?new Ho(e):null,t.g=e,n.resolve()},r.onupgradeneeded=function(e){e=e.target.result;for(var t=f(["segment-v3","manifest-v3","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},r.onerror=function(e){n.reject(new me(2,9,9001,r.error)),e.preventDefault()},n},r.destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:if(!e.a){t.A(2);break}return w(t,e.a.destroy(),2);case 2:if(!e.b){t.A(4);break}return w(t,e.b.destroy(),4);case 4:if(!e.c){t.A(6);break}return w(t,e.c.destroy(),6);case 6:if(!e.g){t.A(8);break}return w(t,e.g.destroy(),8);case 8:e.f&&e.f.close(),S(t)}}))}))},r.getCells=function(){var e=new Map;return this.a&&e.set("v1",this.a),this.b&&e.set("v2",this.b),this.c&&e.set("v3",this.c),e},r.getEmeSessionCell=function(){return this.g},r.erase=function(){var t=this;return p((function n(){return M(n,(function(n){switch(n.j){case 1:if(!t.a){n.A(2);break}return w(n,t.a.destroy(),2);case 2:if(!t.b){n.A(4);break}return w(n,t.b.destroy(),4);case 4:if(!t.c){n.A(6);break}return w(n,t.c.destroy(),6);case 6:return t.f&&t.f.close(),w(n,function(){var t=new ge,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new me(2,9,9001,n.error)),e.preventDefault()},t}(),8);case 8:return t.f=null,t.a=null,t.b=null,t.c=null,w(n,t.init(),0)}}))}))},Wo("idb",(function(){return e.indexedDB?new ts:null})),ns.prototype.wa=function(){return this.g},ns.prototype.ba=function(){return this.f},ns.prototype.key=function(){return this.c},ns.prototype.toString=function(){return this.b},(r=ls.prototype).configure=function(){},r.start=function(e){var t=this;return p((function n(){var r,i,a,o,s;return M(n,(function(n){switch(n.j){case 1:return r=rs(e),t.a=r,null==r||"manifest"!=r.a?n.return(Promise.reject(new me(2,1,9004,r))):(i=new Yo,C(n,2),w(n,i.init(),4));case 4:return w(n,zo(i,r.wa(),r.ba()),5);case 5:return w(n,n.o.getManifests([r.key()]),6);case 6:return a=n.o,o=a[0],s=new is(r.wa(),r.ba()),n.return(function(e,t){var n=new yi(null,0);n.xa(t.duration);var r=t.periods.map((function(t){return as(e,t,n)})),i=t.drmInfo?[t.drmInfo]:[];return t.drmInfo&&r.forEach((function(e){e.variants.forEach((function(e){e.drmInfos=i}))})),{presentationTimeline:n,minBufferTime:2,offlineSessionIds:t.sessionIds,periods:r}}(s,o));case 2:return L(n),w(n,i.destroy(),7);case 7:I(n,0)}}))}))},r.stop=function(){return Promise.resolve()},r.update=function(){},r.onExpirationUpdated=function(e,t){var n=this;return p((function r(){var i,a,o,s,l,u,c;return M(r,(function(r){switch(r.j){case 1:return i=n.a,a=new Yo,k(r,2,3),w(r,a.init(),5);case 5:return w(r,zo(a,i.wa(),i.ba()),6);case 6:return w(r,(o=r.o).getManifests([i.key()]),7);case 7:if(s=r.o,l=s[0],u=l.sessionIds.includes(e),c=null==l.expiration||l.expiration>t,!u||!c){r.A(3);break}return w(r,o.updateManifestExpiration(i.key(),t),3);case 3:return L(r),w(r,a.destroy(),10);case 10:I(r,0);break;case 2:R(r),r.A(3)}}))}))},gi.Cb("application/x-offline-manifest",ls),V("shaka.offline.OfflineScheme",us),us.h=function(e){return _e(e={uri:e,ld:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}})},us.i=function(e,t){var n=new Yo;return _e(void 0).U((function(){return n.init()})).U((function(){return zo(n,t.wa(),t.ba())})).U((function(e){return e.getSegments([t.key()])})).U((function(e){return{uri:t,ld:t,data:e[0].data,headers:{}}})).finally((function(){return n.destroy()}))},De("offline",us),fs.prototype.destroy=function(){var e=this;return p((function t(){return M(t,(function(t){switch(t.j){case 1:return e.l=!1,e.b&&e.b.abort(),ps(e),w(t,e.m,2);case 2:e.a&&e.a.va.Ya();for(var n=f(e.f),r=n.next();!r.done;r=n.next())r.value.va.Ya();e.a=null,e.f=[],e.g=null,S(t)}}))}))},V("shaka.text.SimpleTextDisplayer",ms),ms.prototype.remove=function(e,t){return!!this.a&&(ys(this.a,(function(n){return n.startTime<t&&n.endTime>e})),!0)},ms.prototype.remove=ms.prototype.remove,ms.prototype.append=function(e){for(var t=gs,n=[],r=0;r<e.length;r++){var i=t(e[r]);i&&n.push(i)}n.slice().sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:n.indexOf(t)-n.indexOf(e)})).forEach(function(e){this.a.addCue(e)}.bind(this))},ms.prototype.append=ms.prototype.append,ms.prototype.destroy=function(){return this.a&&ys(this.a,(function(){return!0})),this.a=null,Promise.resolve()},ms.prototype.destroy=ms.prototype.destroy,ms.prototype.isTextVisible=function(){return"showing"==this.a.mode},ms.prototype.isTextVisible=ms.prototype.isTextVisible,ms.prototype.setTextVisibility=function(e){this.a.mode=e?"showing":"hidden"},ms.prototype.setTextVisibility=ms.prototype.setTextVisibility,V("shaka.util.ConfigUtils.mergeConfigObjects",vs),V("shaka.util.ConfigUtils.convertToConfigObject",bs),V("shaka.util.PlayerConfiguration",_s),_s.mergeConfigObjects=Es,G(xs,ke),V("shaka.Player",xs),xs.prototype.destroy=function(){var e=this;return p((function t(){var n;return M(t,(function(t){switch(t.j){case 1:return e.i==hl?t.return():(e.i=hl,n=hs(e.lb,(function(){return{node:e.F,payload:{Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},Va:!1}})),w(t,new Promise((function(t){n.wb=function(){},n.pc=function(){t(),e.dispatchEvent(new we("loaded"))},n.Ya=function(){t()},n.onError=function(){t()},n.rc=function(){t()}})),2));case 2:return w(t,e.lb.destroy(),3);case 3:if(e.g&&(e.g.release(),e.g=null),e.Dc=null,e.l=null,e.c=null,!e.K){t.A(0);break}return w(t,e.K.destroy(),5);case 5:e.K=null,S(t)}}))}))},xs.prototype.destroy=xs.prototype.destroy,xs.version="v2.5.10";var Rs=["2","5"];Yn=new function(e){this.a=e,this.c=Gn,this.b=Hn}(new Kn(Number(Rs[0]),Number(Rs[1])));var Ls=["output-restricted","internal-error"],Is={};function Ps(e,t){return p((function n(){return M(n,(function(n){switch(n.j){case 1:if(e.i!=hl&&(e.i=pl),e.dispatchEvent(new we("unloading")),t.Aa=null,t.mimeType=null,t.startTime=null,t.uri=null,t.v&&(e.g.ea(t.v,"loadeddata"),e.g.ea(t.v,"playing"),e.g.ea(t.v,"pause"),e.g.ea(t.v,"ended"),e.g.ea(t.v,"ratechange")),e.ib&&(e.ib.release(),e.ib=null),e.Zb&&(e.Zb.stop(),e.Zb=null),!e.s){n.A(2);break}return w(n,e.s.stop(),3);case 3:e.s=null;case 2:if(!e.l){n.A(4);break}return w(n,e.l.stop(),4);case 4:if(!e.f){n.A(6);break}return w(n,e.f.destroy(),7);case 7:e.f=null;case 6:if(e.m&&(e.m.release(),e.m=null),!e.D){n.A(8);break}return w(n,e.D.destroy(),9);case 9:e.D=null;case 8:if(!t.v||!t.v.src){n.A(10);break}return w(n,new Promise((function(e){return new fe(e).R(.1)})),11);case 11:t.v.removeAttribute("src"),t.v.load();case 10:if(!e.h){n.A(12);break}return w(n,e.h.destroy(),13);case 13:e.h=null;case 12:e.$.a.clear(),e.Fb=null,e.B=null,e.ac.clear(),e.b=null,e.u=null,e.Fc=null,e.kb=!0,Vs(e),S(n)}}))}))}function js(e,t){e.B=new Ta,e.B.a=Sa,wa(e.B,t,Math.min(.5,t/2)),Vs(e),e.Zb=new fe((function(){Os(e)})).Na(.25)}function Os(e){switch(e.i){case gl:var t=!!e.a.ended||Ut(e.a.buffered)>=e.a.duration-1;break;case ml:e:if(e.a.ended||En(e.D))t=!0;else{if(e.b.presentationTimeline.V()){var n=e.b.presentationTimeline.pb();if(Ut(e.a.buffered)>=n){t=!0;break e}}t=!1}break;default:t=!1}var r=Bt(e.a.buffered,e.a.currentTime),i=t,a=(n=e.B).b.get(n.a);t=n.a,r=i||r>=a?ka:Sa,n.a=r,t!=r&&Vs(e)}function Ds(e){if(e.s){var t=Ce(e.c.manifest);e.a&&"AUDIO"===e.a.nodeName&&(t.disableVideo=!0),e.s.configure(t)}if(e.h&&e.h.configure(e.c.drm),e.f){e.f.configure(e.c.streaming);try{e.b.periods.forEach(e.Nc.bind(e))}catch(t){e.Ma(t)}var n=ro(e.f),r=io(e.f);t=ll(e),n=Un.Qd(n,r,t.variants),e.l&&n&&n.allowedByApplication&&n.allowedByKeySystem?Hs(e,t.variants):Ys(e,t)}if(e.D&&(t=e.c.textDisplayFactory,e.Fc!=t)){n=new t;var i=(r=e.D).g;r.g=n,i&&(n.setTextVisibility(i.isTextVisible()),i.destroy()),r.a&&(r.a.c=n),e.Fc=t,e.f&&(n=(t=e.f).b.get("text"))&&uo(t,n.stream,!0,0,!0)}e.l&&(e.l.configure(e.c.abr),e.c.abr.enabled&&!e.kb?e.l.enable():e.l.disable(),Qs(e)),e.B&&(t=e.c.streaming.rebufferingGoal,e.b&&(t=Math.max(t,e.b.minBufferTime)),wa(e.B,t,Math.min(.5,t/2)))}function Ms(e,t,n,r){ma(e.$,t).variant=n,(e=e.u.c).c!=n&&(e.c=n,e.a.push({timestamp:Date.now()/1e3,id:n.id,type:"variant",fromAdaptation:r,bandwidth:n.bandwidth}))}function Ns(e,t,n,r){pa(e.$,t,n),(e=e.u.c).b!=n&&(e.b=n,e.a.push({timestamp:Date.now()/1e3,id:n.id,type:"text",fromAdaptation:r,bandwidth:null}))}function Us(e){var t=As();return t.streaming.failureCallback=function(t){e.V()&&[1001,1002,1003].includes(t.code)&&(t.severity=1,e.sd())},t.textDisplayFactory=function(){return new ms(e.a)},t}function Fs(e,t){var n=e.f?ro(e.f):null,r=e.f?io(e.f):null;if(t.forEach(Un.filterNewPeriod.bind(null,e.h,n,r)),0==(n=function(e,t){var n=0;return e.forEach((function(e){n+=t(e)?1:0})),n}(t,(function(e){return e.variants.some(Un.rb)}))))throw new me(2,4,4032);if(n<t.length)throw new me(2,4,4011);t.forEach(function(e){Un.Gd(e.variants,this.c.restrictions,this.bc)&&this.f&&ll(this)==e&&$s(this),rl(this,e.variants)}.bind(e))}function Bs(e,t,n,r){return n=void 0!==n&&n,r=void 0===r?0:r,e.kb?(e.pa=t,e.Ud=n,e.Rd=r,!0):((t=lo(e.f,t,n,r))&&qs(e),t)}function Ks(e,t){if(e.kb)return e.oa=t,!0;var n=uo(e.f,t,!0,0,!1);return n&&Xs(e),n}function Vs(e){var t=e.Xc();if(e.u&&e.B&&e.m){var n=e.W;n.f=t,Ua(n),Gs(e)}e.dispatchEvent(new we("buffering",{buffering:t}))}function Gs(e){if(e.u&&e.B){var t=e.u.a;e.B.a==Sa?ws(t,"buffering"):e.a.paused?ws(t,"paused"):e.a.ended?ws(t,"ended"):ws(t,"playing")}}function Hs(e,t){try{rl(e,t)}catch(t){return e.Ma(t),null}var n=t.filter((function(e){return Un.rb(e)}));return n=e.Gb.create(n),e.l.setVariants(Array.from(n.values())),e.l.chooseVariant()}function Ys(e,t){var n=zs(e,t,!1),r=Un.Jb(t.textStreams,e.na,e.fb)[0]||null,i=!1;r&&(e.c.streaming.alwaysStreamText||e.mc())&&(Ns(e,t,r,!0),i=Ks(e,r)),(n||i)&&Ws(e)}function zs(e,t,n){n=void 0===n||n;var r=Hs(e,t.variants),i=!1;return r&&(Ms(e,t,r,!0),i=Bs(e,r,!0)),n&&i&&Ws(e),i}function Ws(e){il(e,new we("adaptation"))}function $s(e){il(e,new we("trackschanged"))}function qs(e){il(e,new we("variantchanged"))}function Xs(e){il(e,new we("textchanged"))}function Js(e){il(e,new we("texttrackvisibility"))}function Qs(e){il(e,new we("abrstatuschanged",{Ig:e.c.abr.enabled}))}function Zs(e,t,n){e.dispatchEvent(new we(t,{detail:{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}}))}function el(e){if(!e.a.error)return null;var t=e.a.error.code;if(1==t)return null;var n=e.a.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new me(2,3,3016,t,n,e.a.error.message)}function tl(e,t){if(e.f){var n=ll(e),r=!1,i=Object.keys(t),a=1==i.length&&"00"==i[0];i.length&&e.b.periods.forEach((function(e){e.variants.forEach((function(e){Un.nf(e).forEach((function(n){var i=e.allowedByKeySystem;n.keyId&&(n=t[a?"00":n.keyId],e.allowedByKeySystem=!!n&&!Ls.includes(n)),i!=e.allowedByKeySystem&&(r=!0)}))}))})),i=ro(e.f);var o=io(e.f);(i=Un.Qd(i,o,n.variants))&&!i.allowedByKeySystem&&zs(e,n),r&&($s(e),Hs(e,n.variants))}}function nl(e,t,n){e.s&&e.s.onExpirationUpdated&&e.s.onExpirationUpdated(t,n),e.dispatchEvent(new we("expirationupdated"))}function rl(e,t){var n=e.h?$e(e.h.W):{},r=Object.keys(n);r=r.length&&"00"==r[0];for(var i=!1,a=!1,o=[],s=[],l=f(t),u=l.next();!u.done;u=l.next()){var c=[];(u=u.value).audio&&c.push(u.audio),u.video&&c.push(u.video);for(var d=(c=f(c)).next();!d.done;d=c.next())if((d=d.value).keyId){var h=n[r?"00":d.keyId];h?Ls.includes(h)&&(s.includes(h)||s.push(h)):o.includes(d.keyId)||o.push(d.keyId)}u.allowedByApplication?u.allowedByKeySystem&&(i=!0):a=!0}if(!i)throw new me(2,4,4012,{hasAppRestrictions:a,missingKeys:o,restrictedKeyStatuses:s})}function il(e,t){p((function n(){return M(n,(function(n){switch(n.j){case 1:return w(n,Promise.resolve(),2);case 2:e.i!=hl&&e.dispatchEvent(t),S(n)}}))}))}function al(e){for(var t=new Set,n=(e=f(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(On(n.language)):t.add("und");return t}function ol(e){for(var t=new Map,n=(e=f(e)).next();!n.done;n=e.next()){var r=n.value;n="und";var i=[];for(r.language&&(n=On(r.language)),(i="variant"==r.type?r.audioRoles:r.roles)&&i.length||(i=[""]),t.has(n)||t.set(n,new Set),i=(r=f(i)).next();!i.done;i=r.next())i=i.value,t.get(n).add(i)}var a=[];return t.forEach((function(e,t){for(var n=f(e),r=n.next();!r.done;r=n.next())a.push({language:t,role:r.value})})),a}function sl(e){return null==(e=ll(e))?[]:e.variants.filter((function(e){return Un.rb(e)}))}function ll(e){for(var t=e.m.h(),n=null,r=(e=f(e.b.periods)).next();!r.done;r=e.next())(r=r.value).startTime<=t&&(n=r);return n}function ul(e){var t=ll(e);return ma(e.$,t).variant}function cl(){return new me(2,7,7e3)}function dl(e,t,n,r,i,a){return r==e&&i.v==a.v&&i.uri==a.uri&&i.mimeType==a.mimeType&&i.Aa==a.Aa?t:n}function fl(e){return new Promise((function(t,n){e.Ya=function(){return n(cl())},e.pc=function(){return t()},e.onError=function(e){return n(e)},e.rc=function(){return n(cl())}}))}xs.registerSupportPlugin=function(e,t){Is[e]=t},xs.isBrowserSupported=function(){if(!(e.Promise&&e.Uint8Array&&Array.prototype.forEach))return!1;var t=tt();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!Qe()||Ze("application/x-mpegurl"))},xs.probeSupport=function(){return xt().then((function(e){for(var t=gi.Sf(),n={},r=f('video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",")),i=r.next();!i.done;i=r.next()){n[i=i.value]=Qe()?!!mn(i)||MediaSource.isTypeSupported(i)||Wt(i):Ze(i);var a=i.split(";")[0];n[a]=n[a]||n[i]}for(var o in e={manifest:t,media:n,drm:e},Is)e[o]=Is[o]();return e}))},xs.prototype.Hb=function(e,t){if(t=void 0===t||t,this.i==hl)return Promise.reject(cl());var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null};n.v=e,Qe()||(t=!1);var r=t?this.hb:this.O,i=hs(this.lb,(function(){return{node:r,payload:n,Va:!1}}));return i.wb=function(){},fl(i)},xs.prototype.attach=xs.prototype.Hb,xs.prototype.detach=function(){var e=this;if(this.i==hl)return Promise.reject(cl());var t=hs(this.lb,(function(){return{node:e.F,payload:{Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},Va:!1}}));return t.wb=function(){},fl(t)},xs.prototype.detach=xs.prototype.detach,xs.prototype.Cd=function(e){var t=this;if(e=void 0===e||e,this.i==hl)return Promise.reject(cl());Qe()||(e=!1);var n={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null},r=hs(this.lb,(function(r){var i=r.v&&e?t.hb:r.v?t.O:t.F;return n.v=r.v,{node:i,payload:n,Va:!1}}));return r.wb=function(){},fl(r)},xs.prototype.unload=xs.prototype.Cd,xs.prototype.load=function(e,t,n){if(this.i==hl)return Promise.reject(cl());this.dispatchEvent(new we("loading"));var r={Aa:null,v:null,mimeType:null,startTime:null,zd:null,uri:null};r.uri=e,r.zd=Date.now()/1e3,n&&"string"!=typeof n&&(Vn("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),r.Aa=function(){return new n}),n&&"string"==typeof n&&(r.mimeType=n),void 0!==t&&(r.startTime=t);var i=function(e,t){if(t.Aa)return!1;if(!Qe())return!0;var n=t.mimeType,r=t.uri||"";return n||(n={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"}[gi.getExtension(r)]),!!n&&""!=(t.v||rt()).canPlayType(n)&&(!gi.isSupported(r,n)||et()&&e.c.streaming.useNativeHlsOnSafari)}(this,r)?this.jb:this.S,a=hs(this.lb,(function(e){return null==e.v?null:(r.v=e.v,{node:i,payload:r,Va:!0})}));return a.wb=function(){},new Promise((function(e,t){a.rc=function(){return t(new me(2,7,7002))},a.pc=function(){return e()},a.Ya=function(){return t(cl())},a.onError=function(e){return t(e)}}))},xs.prototype.load=xs.prototype.load,xs.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=bs(e,t));var n=Es(this.c,e,Us(this));return Ds(this),n},xs.prototype.configure=xs.prototype.configure,xs.prototype.getConfiguration=function(){var e=Us(this);return Es(e,this.c,Us(this)),e},xs.prototype.getConfiguration=xs.prototype.getConfiguration,xs.prototype.$f=function(){for(var e in this.c)delete this.c[e];Es(this.c,Us(this),Us(this)),Ds(this)},xs.prototype.resetConfiguration=xs.prototype.$f,xs.prototype.We=function(){return this.i},xs.prototype.getLoadMode=xs.prototype.We,xs.prototype.af=function(){return this.a},xs.prototype.getMediaElement=xs.prototype.af,xs.prototype.Mb=function(){return this.K},xs.prototype.getNetworkingEngine=xs.prototype.Mb,xs.prototype.hc=function(){return this.Fb},xs.prototype.getAssetUri=xs.prototype.hc,xs.prototype.Ze=function(){return Vn("getManifestUri",'Please use "getAssetUri" instead.'),this.hc()},xs.prototype.getManifestUri=xs.prototype.Ze,xs.prototype.V=function(){return this.b?this.b.presentationTimeline.V():!(!this.a||!this.a.src)&&1/0==this.a.duration},xs.prototype.isLive=xs.prototype.V,xs.prototype.Xa=function(){return!!this.b&&this.b.presentationTimeline.Xa()},xs.prototype.isInProgress=xs.prototype.Xa,xs.prototype.uf=function(){if(this.b){if(!this.b.periods.length)return!1;var e=this.b.periods[0].variants;return!!e.length&&!e[0].video}return!(!this.a||!this.a.src)&&(this.a.videoTracks?0==this.a.videoTracks.length:0==this.a.videoHeight)},xs.prototype.isAudioOnly=xs.prototype.uf,xs.prototype.bg=function(){if(this.b){var e=this.b.presentationTimeline;return{start:e.ob(),end:e.Ca()}}return this.a&&this.a.src&&(e=this.a.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},xs.prototype.seekRange=xs.prototype.bg,xs.prototype.keySystem=function(){return _t(this.drmInfo())},xs.prototype.keySystem=xs.prototype.keySystem,xs.prototype.drmInfo=function(){return this.h?this.h.a:null},xs.prototype.drmInfo=xs.prototype.drmInfo,xs.prototype.Lb=function(){return this.h?this.h.Lb():1/0},xs.prototype.getExpiration=xs.prototype.Lb,xs.prototype.Xc=function(){return!!this.B&&this.B.a==Sa},xs.prototype.isBuffering=xs.prototype.Xc,xs.prototype.ef=function(){if(this.W){var e=this.W;e=e.f?0:e.c}else e=0;return e},xs.prototype.getPlaybackRate=xs.prototype.ef,xs.prototype.ug=function(e){0==e?q("A trick play rate of 0 is unsupported!"):(this.a.paused&&this.a.play(),this.W.set(e),this.i==ml&&so(this.f,1<Math.abs(e)))},xs.prototype.trickPlay=xs.prototype.ug,xs.prototype.Ge=function(){this.i==gl&&this.W.set(1),this.i==ml&&(this.W.set(1),so(this.f,!1))},xs.prototype.cancelTrickPlay=xs.prototype.Ge,xs.prototype.Vc=function(){if(this.b&&this.m){for(var e=ul(this),t=[],n=f(sl(this)),r=n.next();!r.done;r=n.next()){r=r.value;var i=Un.Ed(r);i.active=r==e,t.push(i)}return t}return this.a&&this.a.audioTracks?Array.from(this.a.audioTracks).map((function(e){return Un.rf(e)})):[]},xs.prototype.getVariantTracks=xs.prototype.Vc,xs.prototype.qb=function(){if(this.b&&this.m){for(var e=function(e){var t=ll(e);if(null==t)return null;if(!ma(e.$,t).text){var n=Un.Jb(t.textStreams,e.na,e.fb);n.length&&pa(e.$,t,n[0])}return ma(e.$,t).text}(this),t=[],n=f(function(e){var t=ll(e);return null==t?[]:t.textStreams.filter((function(t){return!e.ac.has(t)}))}(this)),r=n.next();!r.done;r=n.next()){r=r.value;var i=Un.xc(r);i.active=r==e,t.push(i)}return t}return this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).map((function(e){return Un.sf(e)})):[]},xs.prototype.getTextTracks=xs.prototype.qb,xs.prototype.td=function(e){if(this.b&&this.f){var t=ll(this),n=t.textStreams.find((function(t){return t.id==e.id}));n&&(Ns(this,t,n,!1),Ks(this,n),this.na=n.language)}else if(this.a&&this.a.src&&this.a.textTracks){for(n=(t=f(t=Array.from(this.a.textTracks))).next();!n.done;n=t.next())n=n.value,Un.Wc(n)==e.id?n.mode=this.gb?"showing":"hidden":n.mode="disabled";Xs(this)}},xs.prototype.selectTextTrack=xs.prototype.td,xs.prototype.dg=function(){Vn("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var e=this.qb().filter((function(e){return"application/cea-608"==e.mimeType}));0<e.length&&this.td(e[0])},xs.prototype.selectEmbeddedTextTrack=xs.prototype.dg,xs.prototype.zg=function(){Vn("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var e=this.qb().filter((function(e){return e.active}))[0];return!!e&&"application/cea-608"==e.mimeType},xs.prototype.usingEmbeddedTextTrack=xs.prototype.zg,xs.prototype.fg=function(e,t,n){if(n=void 0===n?0:n,this.b&&this.f){var r=ll(this);this.c.abr.enabled&&q("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var i=r.variants.find((function(t){return t.id==e.id}));i&&Un.rb(i)&&(Ms(this,r,i,!1),Bs(this,i,t,n),this.Gb=new Aa(i),Hs(this,r.variants))}else if(this.a&&this.a.audioTracks){for(n=(t=f(t=Array.from(this.a.audioTracks))).next();!n.done;n=t.next())n=n.value,Un.Wc(n)==e.id&&(n.enabled=!0);qs(this)}},xs.prototype.selectVariantTrack=xs.prototype.fg,xs.prototype.Re=function(){return ol(this.Vc())},xs.prototype.getAudioLanguagesAndRoles=xs.prototype.Re,xs.prototype.mf=function(){return ol(this.qb())},xs.prototype.getTextLanguagesAndRoles=xs.prototype.mf,xs.prototype.Qe=function(){return Array.from(al(this.Vc()))},xs.prototype.getAudioLanguages=xs.prototype.Qe,xs.prototype.lf=function(){return Array.from(al(this.qb()))},xs.prototype.getTextLanguages=xs.prototype.lf,xs.prototype.cg=function(e,t){if(this.b&&this.m){var n=ll(this);this.Gb=new Ea(e,t||"",0,"","audio"),zs(this,n)}else if(this.a&&this.a.audioTracks){for(var r=(n=f(n=Array.from(this.a.audioTracks))).next();!r.done;r=n.next())(r=r.value).language==e&&(r.enabled=!0);qs(this)}},xs.prototype.selectAudioLanguage=xs.prototype.cg,xs.prototype.eg=function(e,t){if(this.b&&this.m){var n=ll(this);this.na=e,this.fb=t||"";var r=Un.Jb(n.textStreams,this.na,this.fb)[0]||null;r&&(Ns(this,n,r,!1),(this.c.streaming.alwaysStreamText||this.mc())&&Ks(this,r))}else(n=this.qb().filter((function(t){return t.language==e}))[0])&&this.td(n)},xs.prototype.selectTextLanguage=xs.prototype.eg,xs.prototype.gg=function(e){if(this.b&&this.m){for(var t=ll(this),n=null,r=f(sl(this)),i=r.next();!i.done;i=r.next())if((i=i.value).audio.label==e){n=i;break}null!=n&&(this.Gb=new Ea(n.language,"",0,e),zs(this,t))}},xs.prototype.selectVariantsByLabel=xs.prototype.gg,xs.prototype.mc=function(){var e=this.gb;return this.D?this.D.g.isTextVisible():this.a&&this.a.src&&this.a.textTracks?Array.from(this.a.textTracks).some((function(e){return"showing"==e.mode})):e},xs.prototype.isTextTrackVisible=xs.prototype.mc,xs.prototype.jg=function(e){var t=this;return p((function n(){var r,i,a,o;return M(n,(function(n){switch(n.j){case 1:if(t.gb==(r=!!e))return n.return();if(t.gb=r,t.i!=ml){if(t.a&&t.a.src&&t.a.textTracks)for(var s=f(Array.from(t.a.textTracks)),l=s.next();!l.done;l=s.next())"disabled"!=(i=l.value).mode&&(i.mode=r?"showing":"hidden");n.A(2);break}if(t.D.g.setTextVisibility(r),t.c.streaming.alwaysStreamText){n.A(2);break}if(!r){(s=t.f).D=!0,(l=s.b.get("text"))&&(Co(l),s.b.delete("text")),n.A(2);break}if(a=ll(t),!(0<(o=Un.Jb(a.textStreams,t.na,t.fb)).length)){n.A(2);break}return w(n,oo(t.f,o[0]),2);case 2:Js(t),S(n)}}))}))},xs.prototype.setTextTrackVisibility=xs.prototype.jg,xs.prototype.gf=function(){if(!this.V())return null;if(this.b)return new Date(1e3*(this.b.presentationTimeline.f+this.a.currentTime));if(this.a&&this.a.getStartDate){var e=this.a.getStartDate();return isNaN(e.getTime())?null:new Date(e.getTime()+1e3*this.a.currentTime)}return null},xs.prototype.getPlayheadTimeAsDate=xs.prototype.gf,xs.prototype.jf=function(){if(!this.V())return null;if(this.b)return new Date(1e3*this.b.presentationTimeline.f);if(this.a&&this.a.getStartDate){var e=this.a.getStartDate();return isNaN(e.getTime())?null:e}return null},xs.prototype.getPresentationStartTimeAsDate=xs.prototype.jf,xs.prototype.Sc=function(){var e={total:[],audio:[],video:[],text:[]};return this.i==gl&&(e.total=Kt(this.a.buffered)),this.i==ml&&this.D.Sc(e),e},xs.prototype.getBufferedInfo=xs.prototype.Sc,xs.prototype.getStats=function(){if(this.i!=ml&&this.i!=gl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,switchHistory:[],stateHistory:[]};Gs(this);var e=this.a;if(e.getVideoPlaybackQuality){e=e.getVideoPlaybackQuality();var t=this.u,n=Number(e.totalVideoFrames);t.m=Number(e.droppedVideoFrames),t.l=n,this.u.i=Number(e.corruptedVideoFrames)}e=this.h&&(e=this.h).K?e.K:NaN,this.u.h=e,this.i==ml&&((e=ul(this))&&(this.u.s=e.bandwidth),e&&e.video&&(t=this.u,n=e.video.height||NaN,t.u=e.video.width||NaN,t.g=n),e=this.l.getBandwidthEstimate(),this.u.f=e);var r=this.u;e=r.u,t=r.g,n=r.s;for(var i=r.l,a=r.m,o=r.i,s=r.f,l=r.b,u=Ss(r.a,"playing"),c=Ss(r.a,"paused"),d=Ss(r.a,"buffering"),h=r.h,p=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],r=f(e.b),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.a&&n.push(t(e.a)),n}(r.a),m=[],g=(r=f(r.c.a)).next();!g.done;g=r.next())g=g.value,m.push({timestamp:g.timestamp,id:g.id,type:g.type,fromAdaptation:g.fromAdaptation,bandwidth:g.bandwidth});return{width:e,height:t,streamBandwidth:n,decodedFrames:i,droppedFrames:a,corruptedFrames:o,estimatedBandwidth:s,loadLatency:l,playTime:u,pauseTime:c,bufferingTime:d,licenseTime:h,stateHistory:p,switchHistory:m}},xs.prototype.getStats=xs.prototype.getStats,xs.prototype.addTextTrack=function(e,t,n,r,i,a){var o=this;return p((function s(){var l,u,c,d,f,h,p,m,g;return M(s,(function(s){switch(s.j){case 1:if(o.i==gl)throw Error("State error!");if(o.i!=ml)throw Error("State error!");if(l=ll(o),u=Yt,c=o.b.periods.indexOf(l),f=(d=c+1)>=o.b.periods.length?o.b.presentationTimeline.Y():o.b.periods[d].startTime,1/0==(h=f-l.startTime))throw new me(1,4,4033);return p=new Qr(1,0,h,(function(){return[e]}),0,null),m={id:o.Xd++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(e){return 1==e?p:null},initSegmentReference:null,presentationTimeOffset:0,mimeType:r,codecs:i||"",kind:n,encrypted:!1,keyId:null,language:t,label:a||null,type:u.ra,primary:!1,frameRate:void 0,pixelAspectRatio:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,audioSamplingRate:null,closedCaptions:null},o.ac.add(m),l.textStreams.push(m),w(s,oo(o.f,m),2);case 2:return(g=ao(o.f,"text"))&&pa(o.$,l,g),o.ac.delete(m),Ys(o,l),$s(o),s.return(Un.xc(m))}}))}))},xs.prototype.addTextTrack=xs.prototype.addTextTrack,xs.prototype.vd=function(e,t){this.bc.width=e,this.bc.height=t},xs.prototype.setMaxHardwareResolution=xs.prototype.vd,xs.prototype.sd=function(){if(this.i==ml){var e=this.f;if(e.f)e=!1;else if(e.m)e=!1;else{for(var t=f(e.b.values()),n=t.next();!n.done;n=t.next())(n=n.value).Pb&&(n.Pb=!1,ko(e,n,.1));e=!0}}else e=!1;return e},xs.prototype.retryStreaming=xs.prototype.sd,xs.prototype.Xe=function(){return this.b},xs.prototype.getManifest=xs.prototype.Xe,xs.prototype.Ye=function(){return this.s?this.s.constructor:null},xs.prototype.getManifestParserFactory=xs.prototype.Ye,(r=xs.prototype).Nc=function(e){var t=this.f?ro(this.f):null,n=this.f?io(this.f):null;if(Un.filterNewPeriod(this.h,t,n,e),!(t=e.variants).some(Un.rb))throw new me(2,4,4011);if(rl(this,e.variants),Un.Gd(t,this.c.restrictions,this.bc)&&this.f&&ll(this)==e&&$s(this),e=this.h?this.h.a:null)for(n=(t=f(t)).next();!n.done;n=t.next())for(var r=(n=f(n.value.drmInfos)).next();!r.done;r=n.next())if((r=r.value).keySystem==e.keySystem)for(var i=(r=f(r.initData||[])).next();!i.done;i=r.next())i=i.value,bt(this.h,i.initDataType,i.initData)},r.zf=function(e){try{this.kb=!0,this.l.disable(),Qs(this);var t=Hs(this,e.variants),n=Un.Jb(e.textStreams,this.na,this.fb)[0]||null;this.pa&&(e.variants.includes(this.pa)&&(t=this.pa),this.pa=null),this.oa&&(e.textStreams.includes(this.oa)&&(n=this.oa),this.oa=null),t&&Ms(this,e,t,!0),n&&Ns(this,e,n,!0);var r=this.f,i=r.b.get("video");if(i)var a=r.c.periods[i.ia];else{var o=r.b.get("audio");a=o?r.c.periods[o.ia]:null}var s=t?t.audio:null;if(!a&&n){var l;if(l=s){e=n;var u=On(this.c.preferredTextLanguage),c=On(s.language),d=On(e.language);l=Pn(d,u)&&!Pn(c,d)}l&&(this.gb=!0),this.gb&&this.D.g.setTextVisibility(!0),Js(this)}return this.c.streaming.alwaysStreamText||this.mc()?{variant:t,text:n}:{variant:t,text:null}}catch(e){return this.Ma(e),{variant:null,text:null}}},r.Fe=function(){this.kb=!1,this.c.abr.enabled&&(this.l.enable(),Qs(this)),this.pa&&(lo(this.f,this.pa,this.Ud,this.Rd),qs(this),this.pa=null),this.oa&&(uo(this.f,this.oa,!0,0,!1),Xs(this),this.oa=null)},r.Ef=function(){this.s&&this.s.update&&this.s.update()},r.Jf=function(){this.m&&this.m.s()},r.Ma=function(e){if(this.i!=hl){var t=new we("error",{detail:e});this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)}};var hl=0,pl=1,ml=2,gl=3;function yl(e,t){var n=as(new is(e.wa(),e.ba()),t.periods[0],new yi(null,0)),r=t.appMetadata||{};return n=vl(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r}}function vl(e){for(var t=[],n=Un.df(e.variants),r=(n=f(n)).next();!r.done;r=n.next())t.push(Un.Ed(r.value));for(n=(e=f(e.textStreams)).next();!n.done;n=e.next())t.push(Un.xc(n.value));return t}function bl(){this.a={}}function _l(e,t){var n=t.audio,r=t.video;if(n&&!r&&(e.a[n.id]=n.bandwidth||t.bandwidth),!n&&r&&(e.a[r.id]=r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,a=r.bandwidth||t.bandwidth-i;0>=a&&(a=t.bandwidth),e.a[n.id]=i,e.a[r.id]=a}}function Al(e,t){var n=e.a[t];return null==n&&(n=0),n}function El(e){this.a=!1,this.b=new ge,this.c=e}function Tl(e){var t=new Sl;e.periods.forEach((function(e,n){var r=Cl(e.variants);if(0==n)for(var i=(r=f(r.a)).next();!i.done;i=r.next())t.add(i.value);else!function(e,t){e.a=e.a.filter((function(e){return kl(t,e)}))}(t,r)}));for(var n=(e=f(e.periods)).next();!n.done;n=e.next())(n=n.value).variants=n.variants.filter((function(e){return kl(t,new wl(e))}))}function wl(e){var t=e.audio;e=e.video,this.b=t?t.mimeType:null,this.a=t?t.codecs.split(".")[0]:null,this.f=e?e.mimeType:null,this.c=e?e.codecs.split(".")[0]:null}function Sl(){this.a=[]}function kl(e,t){return e.a.some((function(e){return t.b==e.b&&t.a==e.a&&t.f==e.f&&t.c==e.c}))}function Cl(e){for(var t=new Sl,n=(e=f(e)).next();!n.done;n=e.next())t.add(new wl(n.value));return t}function xl(e){var t=this;if(e&&e.constructor!=xs)throw new me(2,9,9008);this.b=this.a=null,e?(this.a=e.c,this.b=e.Mb()):(this.a=As(),this.b=new je),this.f=!1,this.c=[],this.g=[];var n=!e;this.h=new El((function(){return p((function e(){var r;return M(e,(function(e){switch(e.j){case 1:return r=function(){},w(e,Promise.all(t.g.map((function(e){return e.then(r,r)}))),2);case 2:if(!n){e.A(3);break}return w(e,t.b.destroy(),3);case 3:t.a=null,t.b=null,S(e)}}))}))}))}function Rl(){if(Qe())e:{for(var e=f($o.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function Ll(e,t){for(var n=[],r=f(e.periods),i=r.next();!i.done;i=r.next())for(var a=(i=f(i.value.streams)).next();!a.done;a=i.next())a=a.value,t&&"video"==a.contentType?n.push({contentType:qe(a.mimeType,a.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=a.contentType||n.push({contentType:qe(a.mimeType,a.codecs),robustness:e.drmInfo.audioRobustness});return n}function Il(e,t,n){return p((function r(){return M(r,(function(r){switch(r.j){case 1:return w(r,function(e,t,n,r){return p((function i(){var a,o,s;return M(i,(function(i){switch(i.j){case 1:return r.drmInfo?(a=function(e){var t=Array.from(e.a.keys());if(!t.length)throw new me(2,9,9e3,"No supported storage mechanisms found");return e.a.get(t[0]).getEmeSessionCell()}(n),o=r.sessionIds.map((function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:Ll(r,!1),videoCapabilities:Ll(r,!0)}})),w(i,cs(t,e,o),2)):i.return();case 2:return s=i.o,w(i,a.remove(s),3);case 3:return w(i,a.add(o.filter((function(e){return-1==s.indexOf(e.sessionId)}))),0)}}))}))}(e.b,e.a.drm,n,t),0)}}))}))}function Pl(e,t,n,r){function i(){s+=1,e.a.offline.progressCallback(l,s/o)}var a=function(e){var t=[];return e.periods.forEach((function(e){e.streams.forEach((function(e){null!=e.initSegmentKey&&t.push(e.initSegmentKey),e.segments.forEach((function(e){t.push(e.dataKey)}))}))})),t}(r),o=a.length+1,s=0,l=yl(n,r);return Promise.all([t.removeSegments(a,i),t.removeManifests([n.key()],i)])}function jl(e,t,n,r,i,a){var o={id:a.id,originalId:a.originalId,primary:a.primary,presentationTimeOffset:a.presentationTimeOffset||0,contentType:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,initSegmentKey:null,encrypted:a.encrypted,keyId:a.keyId,segments:[],variantIds:[]};i=i.presentationTimeline.Ob();var s=a.id,l=a.initSegmentReference;return l&&(l=vi(l.c(),l.b,l.a,e.a.streaming.retryParameters),Oo(t,s,l,.5*Al(r,a.id),!0,(function(t){return p((function r(){var i;return M(r,(function(r){switch(r.j){case 1:return w(r,n.addSegments([{data:t}]),2);case 2:i=r.o,e.c.push(i[0]),o.initSegmentKey=i[0],S(r)}}))}))}))),function(e,t,n){for(var r=null==(t=e.findSegmentPosition(t))?null:e.getSegmentReference(t);r;)n(r),r=e.getSegmentReference(++t)}(a,i,(function(i){var l=vi(i.c(),i.b,i.a,e.a.streaming.retryParameters);Oo(t,s,l,function(e,t,n){return n=n.endTime-n.startTime,Al(e,t)*n}(r,a.id,i),!1,(function(t){return p((function r(){var a;return M(r,(function(r){switch(r.j){case 1:return w(r,n.addSegments([{data:t}]),2);case 2:a=r.o,e.c.push(a[0]),o.segments.push({startTime:i.startTime,endTime:i.endTime,dataKey:a[0]}),S(r)}}))}))}))})),o}function Ol(e){if(e.h.a)throw new me(2,9,7001)}function Dl(){if(!Rl())throw new me(2,9,9e3)}function Ml(e,t){return p((function n(){return M(n,(function(n){switch(n.j){case 1:return e.g.push(t),C(n,2),w(n,t,4);case 4:return n.return(n.o);case 2:L(n),Re(e.g,t),I(n,0)}}))}))}function Nl(e){e.variants.map((function(e){return e.video}));var t=new Set(e.variants.map((function(e){return e.audio})));e=e.textStreams;for(var n=f(t),r=n.next();!r.done;r=n.next())for(var i=(r=f(t)).next();!i.done;i=r.next());for(n=(t=f(e)).next();!n.done;n=t.next())for(r=(n=f(e)).next();!r.done;r=n.next());}xs.LoadMode={DESTROYED:hl,NOT_LOADED:pl,MEDIA_SOURCE:ml,SRC_EQUALS:gl},El.prototype.destroy=function(){var e=this;return this.a?this.b:(this.a=!0,this.c().then((function(){e.b.resolve()}),(function(){e.b.resolve()})))},Sl.prototype.add=function(e){kl(this,e)||this.a.push(e)},V("shaka.offline.Storage",xl),xl.support=Rl,xl.prototype.destroy=function(){return this.h.destroy()},xl.prototype.destroy=xl.prototype.destroy,xl.prototype.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=bs(e,t));var n=e,r=!1;return null!=n.trackSelectionCallback&&(r=!0,n.offline=n.offline||{},n.offline.trackSelectionCallback=n.trackSelectionCallback,delete n.trackSelectionCallback),null!=n.progressCallback&&(r=!0,n.offline=n.offline||{},n.offline.progressCallback=n.progressCallback,delete n.progressCallback),null!=n.usePersistentLicense&&(r=!0,n.offline=n.offline||{},n.offline.usePersistentLicense=n.usePersistentLicense,delete n.usePersistentLicense),r&&Vn("Storage.configure with OfflineConfig","Please configure storage with a player configuration."),Es(this.a,e)},xl.prototype.configure=xl.prototype.configure,xl.prototype.getConfiguration=function(){var e=As();return Es(e,this.a,As()),e},xl.prototype.getConfiguration=xl.prototype.getConfiguration,xl.prototype.Mb=function(){return this.b},xl.prototype.getNetworkingEngine=xl.prototype.Mb,xl.prototype.store=function(e,t,n){var r=this;return Ml(this,function(e,t,n,r){return p((function i(){var a,o,s,l,u,c,d,h,m;return M(i,(function(i){switch(i.j){case 1:return Dl(),e.f?i.return(Promise.reject(new me(2,9,9006))):(e.f=!0,w(i,function(e,t,n){return p((function r(){var i,a,o,s,l,u;return M(r,(function(r){switch(r.j){case 1:return i=null,a=e.b,o={networkingEngine:a,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e}},w(r,n(),2);case 2:return(s=r.o).configure(e.a.manifest),Ol(e),C(r,3),w(r,s.start(t,o),5);case 5:return l=r.o,Ol(e),u=function(e){for(var t=new Set,n=(e=f(e.periods)).next();!n.done;n=e.next()){for(var r=f((n=n.value).textStreams),i=r.next();!i.done;i=r.next())t.add(i.value);for(n=f(n.variants),r=n.next();!r.done;r=n.next())(r=r.value).audio&&t.add(r.audio),r.video&&t.add(r.video)}return t}(l),w(r,Promise.all(Ye(u,(function(e){return e.createSegmentIndex()}))),6);case 6:if(Ol(e),i)throw i;return r.return(l);case 3:return L(r),w(r,s.stop(),7);case 7:I(r,0)}}))}))}(e,t,r),2));case 2:if(a=i.o,Ol(e),a.presentationTimeline.V()||a.presentationTimeline.Xa())throw new me(2,9,9005,t);return o=null,s=new Yo,u=l=null,k(i,3,4),w(i,function(e,t,n){return p((function r(){var i,a,o;return M(r,(function(r){switch(r.j){case 1:return i=new pt({ub:e.b,onError:n,qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),a=Oa(t.periods),o=e.a,i.configure(o.drm),w(r,function(e,t,n){return e.s=[],e.D=n,gt(e,t)}(i,a,o.offline.usePersistentLicense),2);case 2:return w(r,yt(i),3);case 3:return w(r,vt(i),4);case 4:return r.return(i)}}))}))}(e,a,(function(e){u=u||e})),6);case 6:if(o=i.o,Ol(e),u)throw u;return w(i,function(e,t,n){return p((function r(){var i;return M(r,(function(r){switch(r.j){case 1:return i={width:1/0,height:1/0},function(e,t,n){for(var r=(e=f(e.periods)).next();!r.done;r=e.next())(r=r.value).variants=r.variants.filter((function(e){return Un.bd(e,t,n)}))}(t,e.a.restrictions,i),function(e){for(var t=(e=f(e.periods)).next();!t.done;t=e.next())(t=t.value).variants=t.variants.filter((function(e){var t=!0;return e.audio&&(t=t&&_n(e.audio)),e.video&&(t=t&&_n(e.video)),t}))}(t),function(e,t){for(var n=f(e.periods),r=n.next();!r.done;r=n.next())(r=r.value).variants=r.variants.filter((function(e){return Rt(t,e)}))}(t,n),Tl(t),w(r,function(e,t){return p((function n(){var r,i,a,o;return M(n,(function(n){switch(n.j){case 1:r=null,i=f(e.periods),a=i.next();case 2:if(a.done){n.A(0);break}return o=a.value,r&&(o.variants=o.variants.filter((function(e){return kl(r,new wl(e))}))),w(n,t(o),5);case 5:r=Cl(o.variants),a=i.next(),n.A(2)}}))}))}(t,(function(t){return p((function n(){var r,i,a,o,s,l,u,c;return M(n,(function(n){switch(n.j){case 1:r=Un,i=[];for(var d=f(t.variants),h=d.next();!h.done;h=d.next())a=h.value,i.push(r.Ed(a));for(h=(d=f(t.textStreams)).next();!h.done;h=d.next())o=h.value,i.push(r.xc(o));return w(n,e.a.offline.trackSelectionCallback(i),2);case 2:for(s=n.o,l=new Set,u=new Set,h=(d=f(s)).next();!h.done;h=d.next())"variant"==(c=h.value).type&&l.add(c.id),"text"==c.type&&u.add(c.id);t.variants=t.variants.filter((function(e){return l.has(e.id)})),t.textStreams=t.textStreams.filter((function(e){return u.has(e.id)})),S(n)}}))}))})),2);case 2:(function(e){if(0==e.periods.length)throw new me(2,4,4014);for(var t=(e=f(e.periods)).next();!t.done;t=e.next())Nl(t.value)})(t),S(r)}}))}))}(e,a,o),7);case 7:return w(i,s.init(),8);case 8:return Ol(e),w(i,function(e){var t=null;if(e.a.forEach((function(e,n){e.getCells().forEach((function(e,r){e.hasFixedKeySpace()||t||(t={path:{wa:n,ba:r},ba:e})}))})),t)return t;throw new me(2,9,9013,"Could not find a cell that supports add-operations")}(s),9);case 9:return l=i.o,Ol(e),w(i,function(e,t,n,r,i,a){return p((function o(){var s,l,u,c,d,h,m,g,y,v;return M(o,(function(o){switch(o.j){case 1:return s=function(e,t,n){var r=null==t.expiration?1/0:t.expiration;return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.Y(),size:0,expiration:r,tracks:t=vl(t.periods[0]),appMetadata:n}}(i,r,a),l=r.periods.some((function(e){return e.variants.some((function(e){return e.drmInfos&&e.drmInfos.length}))})),u=r.periods.some((function(e){return e.variants.some((function(e){return e.drmInfos.some((function(e){return e.initData&&e.initData.length}))}))})),d=null,(c=l&&!u)&&(h=n.a,d=Ul.get(h.keySystem)),m=new jo(e.b,(function(t,n){s.size=n,e.a.offline.progressCallback(s,t)}),(function(t,r){c&&e.a.offline.usePersistentLicense&&d==r&&bt(n,"cenc",t)})),C(o,2),y=g=function(e,t,n,r,i,a,o){var s=new bl,l=i.periods.map((function(r){return function(e,t,n,r,i,a){for(var o=f(a.variants),s=o.next();!s.done;s=o.next())_l(r,s.value);for(o=f(a.textStreams),s=o.next();!s.done;s=o.next())r.a[s.value.id]=52;o=function(e){for(var t=new Set,n=f(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(e=f(e.variants),n=e.next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}(a);var l=new Map;for(o=f(o),s=o.next();!s.done;s=o.next()){s=s.value;var u=jl(e,t,n,r,i,s);l.set(s.id,u)}return a.variants.forEach((function(e){e.audio&&l.get(e.audio.id).variantIds.push(e.id),e.video&&l.get(e.video.id).variantIds.push(e.id)})),{startTime:a.startTime,streams:Array.from(l.values())}}(e,t,n,s,i,r)})),u=r.a,c=e.a.offline.usePersistentLicense;return u&&c&&(u.initData=[]),{originalManifestUri:a,duration:i.presentationTimeline.Y(),size:0,expiration:r.Lb(),periods:l,sessionIds:c?Et(r):[],drmInfo:u,appMetadata:o}}(e,m,t,n,r,i,a),w(o,function(e){return p((function t(){return M(t,(function(t){switch(t.j){case 1:return w(t,Promise.all(e.b.values()),2);case 2:return t.return(e.a.a)}}))}))}(m),4);case 4:if(y.size=o.o,g.expiration=n.Lb(),v=Et(n),g.sessionIds=e.a.offline.usePersistentLicense?v:[],l&&e.a.offline.usePersistentLicense&&!v.length)throw new me(2,9,9007);return o.return(g);case 2:return L(o),w(o,m.destroy(),5);case 5:I(o,0)}}))}))}(e,l.ba,o,a,t,n),10);case 10:if(c=i.o,Ol(e),u)throw u;return w(i,l.ba.addManifests([c]),11);case 11:return d=i.o,Ol(e),h=new ns("manifest",l.path.wa,l.path.ba,d[0]),i.return(yl(h,c));case 4:return L(i),e.f=!1,e.c=[],w(i,s.destroy(),12);case 12:if(!o){i.A(13);break}return w(i,o.destroy(),13);case 13:I(i,0);break;case 3:if(m=R(i),!l){i.A(15);break}return w(i,l.ba.removeSegments(e.c,(function(){})),15);case 15:throw u||m}}))}))}(this,e,t||{},(function(){return p((function t(){var i,a;return M(t,(function(t){switch(t.j){case 1:return n&&"string"!=typeof n?(Vn("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),i=n,t.return(new i)):w(t,gi.create(e,r.b,r.a.manifest.retryParameters,n),2);case 2:return a=t.o,t.return(a)}}))}))})))},xl.prototype.store=xl.prototype.store,xl.prototype.kf=function(){return this.f},xl.prototype.getStoreInProgress=xl.prototype.kf,xl.prototype.remove=function(e){return Ml(this,function(e,t){return p((function n(){var r,i,a,o,s,l;return M(n,(function(n){switch(n.j){case 1:return Dl(),null==(r=rs(t))||"manifest"!=r.a?n.return(Promise.reject(new me(2,9,9004,t))):(i=r,a=new Yo,C(n,2),w(n,a.init(),4));case 4:return w(n,zo(a,i.wa(),i.ba()),5);case 5:return w(n,(o=n.o).getManifests([i.key()]),6);case 6:return s=n.o,l=s[0],w(n,Promise.all([Il(e,l,a),Pl(e,o,i,l)]),2);case 2:return L(n),w(n,a.destroy(),8);case 8:I(n,0)}}))}))}(this,e))},xl.prototype.remove=xl.prototype.remove,xl.prototype.Xf=function(){return Ml(this,function(e){return p((function t(){var n,r,i,a,o,s,l,u,c;return M(t,(function(t){switch(t.j){case 1:return Dl(),n=e.b,r=e.a.drm,i=new Yo,a=!1,C(t,2),w(t,i.init(),4);case 4:for(o=[],function(e,t){e.a.forEach((function(e){t(e.getEmeSessionCell())}))}(i,(function(e){return o.push(e)})),s=Promise.resolve(),l={},u=f(o),c=u.next();!c.done;l={wc:l.wc},c=u.next())l.wc=c.value,s=s.then(function(e){return function(){return p((function t(){var i,o;return M(t,(function(t){switch(t.j){case 1:return w(t,e.wc.getAll(),2);case 2:return i=t.o,w(t,cs(r,n,i),3);case 3:return o=t.o,w(t,e.wc.remove(o),4);case 4:o.length!=i.length&&(a=!0),S(t)}}))}))}}(l));return w(t,s,2);case 2:return L(t),w(t,i.destroy(),6);case 6:I(t,3);break;case 3:return t.return(!a)}}))}))}(this))},xl.prototype.removeEmeSessions=xl.prototype.Xf,xl.prototype.list=function(){return Ml(this,p((function e(){var t,n,r;return M(e,(function(e){switch(e.j){case 1:return Dl(),t=[],n=new Yo,C(e,2),w(e,n.init(),4);case 4:return r=Promise.resolve(),function(e,t){e.a.forEach((function(e,n){e.getCells().forEach((function(e,r){t({wa:n,ba:r},e)}))}))}(n,(function(e,n){r=r.then((function(){return p((function r(){return M(r,(function(r){switch(r.j){case 1:return w(r,n.getAllManifests(),2);case 2:r.o.forEach((function(n,r){var i=yl(new ns("manifest",e.wa,e.ba,r),n);t.push(i)})),S(r)}}))}))}))})),w(e,r,2);case 2:return L(e),w(e,n.destroy(),6);case 6:I(e,3);break;case 3:return e.return(t)}}))})))},xl.prototype.list=xl.prototype.list,xl.deleteAll=function(){return p((function e(){var t;return M(e,(function(e){switch(e.j){case 1:return t=new Yo,C(e,2),w(e,t.erase(),2);case 2:return L(e),w(e,t.destroy(),5);case 5:I(e,0)}}))}))};var Ul=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");Is.offline=Rl,V("shaka.polyfill.installAll",(function(){for(var e=0;e<Kl.length;++e)try{Kl[e].De()}catch(e){q("Error installing polyfill!",e)}}));var Fl,Bl,Kl=[];function Vl(e,t){for(var n={priority:t=t||0,De:e},r=0;r<Kl.length;r++)if(Kl[r].priority<t)return void Kl.splice(r,0,n);Kl.push(n)}function Gl(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"==typeof Event)var n=new Event(t,e);else(n=document.createEvent("Event")).initEvent(t,e.bubbles,e.cancelable);e.target.dispatchEvent(n)}function Hl(e,t,n){if("input"==e)switch(this.type){case"range":e="change"}HTMLInputElement.prototype.originalAddEventListener.call(this,e,t,n)}function Yl(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];return(n=e.apply(this,n)).abort=function(){},n}}function zl(e,t){try{var n=new Wl(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Wl(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(var n=f(t),r=n.next();!r.done;r=n.next()){var i=r.value;if("required"==i.persistentState)r=null;else{r={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label};var a=!1,o=!1;if(i.audioCapabilities)for(var s=f(i.audioCapabilities),l=s.next();!l.done;l=s.next())if((l=l.value).contentType){a=!0;var u=l.contentType.split(";")[0];WebKitMediaKeys.isTypeSupported(this.keySystem,u)&&(r.audioCapabilities.push(l),o=!0)}if(i.videoCapabilities)for(l=(i=f(i.videoCapabilities)).next();!l.done;l=i.next())(s=l.value).contentType&&(a=!0,l=s.contentType.split(";")[0],WebKitMediaKeys.isTypeSupported(this.keySystem,l)&&(r.videoCapabilities.push(s),o=!0));a||(o=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),r=o?r:null}if(r)return void(this.a=r)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function $l(e){var t=this.mediaKeys;return t&&t!=e&&Xl(t,null),delete this.mediaKeys,(this.mediaKeys=e)?Xl(e,this):Promise.resolve()}function ql(e){this.b=new WebKitMediaKeys(e),this.a=new Be}function Xl(e,t){if(e.a.$a(),!t)return Promise.resolve();e.a.w(t,"webkitneedkey",Ql);try{return 1<=t.readyState?t.webkitSetMediaKeys(e.b):e.a.da(t,"loadedmetadata",(function(){t.webkitSetMediaKeys(e.b)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function Jl(e){ke.call(this),this.b=null,this.g=e,this.c=this.a=null,this.f=new Be,this.sessionId="",this.expiration=NaN,this.closed=new ge,this.keyStatuses=new eu}function Ql(e){var t=new Event("encrypted");t.initDataType="cenc",t.initData=e.initData,this.dispatchEvent(t)}function Zl(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.a=t,e.dispatchEvent(new we("keystatuseschange"))}function eu(){this.size=0,this.a=void 0}function tu(e,t){try{var n=new nu(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function nu(e,t){this.keySystem=e;for(var n=!1,r=0;r<t.length;++r){var i=t[r],a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label},o=!1;if(i.audioCapabilities)for(var s=0;s<i.audioCapabilities.length;++s){var l=i.audioCapabilities[s];if(l.contentType){o=!0;var u=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,u)&&(a.audioCapabilities.push(l),n=!0)}}if(i.videoCapabilities)for(s=0;s<i.videoCapabilities.length;++s)(l=i.videoCapabilities[s]).contentType&&(o=!0,u=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,u)&&(a.videoCapabilities.push(l),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==i.persistentState&&(n=!1),n)return void(this.a=a)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function ru(e){var t=this.mediaKeys;return t&&t!=e&&au(t,null),delete this.mediaKeys,(this.mediaKeys=e)?au(e,this):Promise.resolve()}function iu(e){this.a=new MSMediaKeys(e),this.b=new Be}function au(e,t){if(e.b.$a(),!t)return Promise.resolve();e.b.w(t,"msneedkey",su);var n=e;try{return 1<=t.readyState?t.msSetMediaKeys(e.a):t.addEventListener("loadedmetadata",(function e(){t.msSetMediaKeys(n.a),t.removeEventListener("loadedmetadata",e)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function ou(e){ke.call(this),this.c=null,this.g=e,this.b=this.a=null,this.f=new Be,this.sessionId="",this.expiration=NaN,this.closed=new ge,this.keyStatuses=new uu}function su(e){if(e.initData){var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="cenc",t.initData=function(e){if(!e)return e;var t=new Fr(e);if(1>=t.data.length)return e;e=[];for(var n={},r=(t=f(t.data)).next();!r.done;n={lc:n.lc},r=t.next())n.lc=r.value,e.some(function(e){return function(t){return ht.za(t,e.lc)}}(n))||e.push(n.lc);return ht.concat.apply(ht,e instanceof Array?e:function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(f(e)))}(e.initData),this.dispatchEvent(t)}}function lu(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.a=t,e.dispatchEvent(new we("keystatuseschange"))}function uu(){this.size=0,this.a=void 0}function cu(){return Promise.reject(Error("The key system specified is not supported."))}function du(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function fu(){throw new TypeError("Illegal constructor.")}function hu(){throw new TypeError("Illegal constructor.")}V("shaka.polyfill.register",Vl),Vl((function(){wc()}),-1),Vl((function(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitExitFullscreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Gl),document.addEventListener("webkitfullscreenerror",Gl),document.addEventListener("mozfullscreenchange",Gl),document.addEventListener("mozfullscreenerror",Gl),document.addEventListener("MSFullscreenChange",Gl),document.addEventListener("MSFullscreenError",Gl)}})),Vl((function(){var t=!1;if(nt("CrKey"))t=!0;else try{e.indexedDB&&(t=!1)}catch(e){t=!0}t&&delete e.indexedDB})),Vl((function(){nt("Trident/")&&!HTMLInputElement.prototype.originalAddEventListener&&(HTMLInputElement.prototype.originalAddEventListener=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Hl)})),Vl((function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:function(){return navigator.language?[navigator.language]:["en"]}})})),Vl((function(){})),Vl((function(){var t=tt();e.MediaSource&&(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?function(){var e=MediaSource.isTypeSupported,t=/^dv(?:h[e1]|a[v1])\./;MediaSource.isTypeSupported=function(n){for(var r=n.split(/ *; */),i=r[0],a={},o=1;o<r.length;++o){var s=r[o].split("="),l=s[0];s=s[1].replace(/"(.*)"/,"$1"),a[l]=s}if(!(r=a.codecs))return e(n);var u=!1,c=!1;for(var d in n=r.split(",").filter((function(e){return t.test(e)&&(c=!0),/^(hev|hvc)1\.2/.test(e)&&(u=!0),!0})),c&&(u=!1),a.codecs=n.join(","),u&&(a.eotf="smpte2084"),a)i+="; "+d+'="'+a[d]+'"';return cast.__platform__.canDisplayType(i)}}():t?(function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1].toLowerCase()&&e(t)}}(),12>=t?(Yl(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):Yl()):nt("Tizen")&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=Xe(t)[0]&&e(t)}}())})),Wl.prototype.createMediaKeys=function(){var e=new ql(this.keySystem);return Promise.resolve(e)},Wl.prototype.getConfiguration=function(){return this.a},ql.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Jl(this.b,e)},ql.prototype.setServerCertificate=function(e){return e&&new Uint8Array(e),Promise.resolve(!0)},G(Jl,ke),(r=Jl.prototype).generateRequest=function(e,t){this.a=new ge;try{this.b=this.g.createSession("video/mp4",new Uint8Array(t)),this.sessionId=this.b.sessionId||"",this.f.w(this.b,"webkitkeymessage",this.og.bind(this)),this.f.w(this.b,"webkitkeyadded",this.mg.bind(this)),this.f.w(this.b,"webkitkeyerror",this.ng.bind(this)),Zl(this,"status-pending")}catch(e){this.a.reject(e)}return this.a},r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},r.update=function(e){this.c=new ge;try{this.b.update(new Uint8Array(e))}catch(e){this.c.reject(e)}return this.c},r.close=function(){try{this.b.close(),this.closed.resolve(),this.f.$a()}catch(e){this.closed.reject(e)}return this.closed},r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},r.og=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new we("message",{messageType:null==this.keyStatuses.a?"license-request":"license-renewal",message:e.message.buffer}))},r.mg=function(){this.c&&(Zl(this,"usable"),this.c.resolve(),this.c=null)},r.ng=function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=this.b.error,null!=this.a)this.a.reject(e),this.a=null;else if(null!=this.c)this.c.reject(e),this.c=null;else switch(this.b.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Zl(this,"output-not-allowed");break;default:Zl(this,"internal-error")}},(r=eu.prototype).forEach=function(e){this.a&&e(this.a,Fl)},r.get=function(e){if(this.has(e))return this.a},r.has=function(e){var t=Fl;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},r.entries=function(){},r.keys=function(){},r.values=function(){},Vl((function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(Fl=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=$l,e.MediaKeys=ql,e.MediaKeySystemAccess=Wl,navigator.requestMediaKeySystemAccess=zl)})),nu.prototype.createMediaKeys=function(){var e=new iu(this.keySystem);return Promise.resolve(e)},nu.prototype.getConfiguration=function(){return this.a},iu.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new ou(this.a,e)},iu.prototype.setServerCertificate=function(){return Promise.resolve(!1)},G(ou,ke),(r=ou.prototype).generateRequest=function(e,t){this.a=new ge;try{this.c=this.g.createSession("video/mp4",new Uint8Array(t),null),this.f.w(this.c,"mskeymessage",this.If.bind(this)),this.f.w(this.c,"mskeyadded",this.Gf.bind(this)),this.f.w(this.c,"mskeyerror",this.Hf.bind(this)),lu(this,"status-pending")}catch(e){this.a.reject(e)}return this.a},r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},r.update=function(e){this.b=new ge;try{this.c.update(new Uint8Array(e))}catch(e){this.b.reject(e)}return this.b},r.close=function(){try{this.c.close(),this.closed.resolve(),this.f.$a()}catch(e){this.closed.reject(e)}return this.closed},r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},r.If=function(e){this.a&&(this.a.resolve(),this.a=null),this.dispatchEvent(new we("message",{messageType:null==this.keyStatuses.a?"license-request":"license-renewal",message:e.message.buffer}))},r.Gf=function(){this.a?(lu(this,"usable"),this.a.resolve(),this.a=null):this.b&&(lu(this,"usable"),this.b.resolve(),this.b=null)},r.Hf=function(){var e=Error("EME PatchedMediaKeysMs key error");if(e.errorCode=this.c.error,null!=this.a)this.a.reject(e),this.a=null;else if(null!=this.b)this.b.reject(e),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:lu(this,"output-not-allowed");break;default:lu(this,"internal-error")}},(r=uu.prototype).forEach=function(e){this.a&&e(this.a,Bl)},r.get=function(e){if(this.has(e))return this.a},r.has=function(e){var t=Bl;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},r.entries=function(){},r.keys=function(){},r.values=function(){},Vl((function(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(Bl=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ru,e.MediaKeys=iu,e.MediaKeySystemAccess=nu,navigator.requestMediaKeySystemAccess=tu)})),fu.prototype.createSession=function(){},fu.prototype.setServerCertificate=function(){},hu.prototype.getConfiguration=function(){},hu.prototype.createMediaKeys=function(){},Vl((function(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=cu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=du,e.MediaKeys=fu,e.MediaKeySystemAccess=hu)}),-10);var pu,mu="";function gu(e){return mu?mu+e.charAt(0).toUpperCase()+e.slice(1):e}function yu(e,t){try{var n=new bu(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function vu(e){var t=this.mediaKeys;return t&&t!=e&&Au(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&Au(e,this),Promise.resolve()}function bu(e,t){this.a=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.a="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var a=0;a<t.length;++a){var o=t[a],s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},l=!1;if(o.audioCapabilities)for(var u=0;u<o.audioCapabilities.length;++u){var c=o.audioCapabilities[u];if(c.contentType){l=!0;var d=c.contentType.split(";")[0];i.canPlayType(d,this.a)&&(s.audioCapabilities.push(c),r=!0)}}if(o.videoCapabilities)for(u=0;u<o.videoCapabilities.length;++u)(c=o.videoCapabilities[u]).contentType&&(l=!0,i.canPlayType(c.contentType,this.a)&&(s.videoCapabilities.push(c),r=!0));if(l||(r=i.canPlayType("video/mp4",this.a)||i.canPlayType("video/webm",this.a)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):r=!1),r)return void(this.b=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(n=Error(n)).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function _u(e){this.g=e,this.b=null,this.a=new Be,this.c=[],this.f={}}function Au(e,t){e.b=t,e.a.$a();var n=mu;t&&(e.a.w(t,n+"needkey",e.Mf.bind(e)),e.a.w(t,n+"keymessage",e.rg.bind(e)),e.a.w(t,n+"keyadded",e.pg.bind(e)),e.a.w(t,n+"keyerror",e.qg.bind(e)))}function Eu(e,t){var n=e.f[t];return n||((n=e.c.shift())?(n.sessionId=t,e.f[t]=n):null)}function Tu(e,t,n){ke.call(this),this.f=e,this.h=!1,this.a=this.b=null,this.c=t,this.g=n,this.sessionId="",this.expiration=NaN,this.closed=new ge,this.keyStatuses=new ku}function wu(e,t,n){if(e.h)return Promise.reject(Error("The session is already initialized."));e.h=!0;try{if("persistent-license"==e.g)if(n)var r=new Uint8Array(ut("LOAD_SESSION|"+n));else{var i=ut("PERSISTENT|"),a=new Uint8Array(i.byteLength+t.byteLength);a.set(new Uint8Array(i),0),a.set(new Uint8Array(t),i.byteLength),r=a}else r=new Uint8Array(t)}catch(e){return Promise.reject(e)}e.b=new ge;var o=gu("generateKeyRequest");try{e.f[o](e.c,r)}catch(t){if("InvalidStateError"!=t.name)return e.b=null,Promise.reject(t);new fe((function(){try{e.f[o](e.c,r)}catch(t){e.b.reject(t),e.b=null}})).R(.01)}return e.b}function Su(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.a=t,e.dispatchEvent(new we("keystatuseschange"))}function ku(){this.size=0,this.a=void 0}function Cu(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function xu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Ru(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function Lu(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Iu(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Pu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function ju(t,n,r){return new e.TextTrackCue(t,n,r)}function Ou(t,n,r){return new e.TextTrackCue(t+"-"+n+"-"+r,t,n,r)}function Du(){}bu.prototype.createMediaKeys=function(){var e=new _u(this.a);return Promise.resolve(e)},bu.prototype.getConfiguration=function(){return this.b},(r=_u.prototype).createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.b||document.createElement("video");return t.src||(t.src="about:blank"),e=new Tu(t,this.g,e),this.c.push(e),e},r.setServerCertificate=function(){return Promise.resolve(!1)},r.Mf=function(e){var t=document.createEvent("CustomEvent");t.initCustomEvent("encrypted",!1,!1,null),t.initDataType="webm",t.initData=e.initData,this.b.dispatchEvent(t)},r.rg=function(e){var t=Eu(this,e.sessionId);t&&(e=new we("message",{messageType:null==t.keyStatuses.a?"licenserequest":"licenserenewal",message:e.message}),t.b&&(t.b.resolve(),t.b=null),t.dispatchEvent(e))},r.pg=function(e){(e=Eu(this,e.sessionId))&&(Su(e,"usable"),e.a&&e.a.resolve(),e.a=null)},r.qg=function(e){var t=Eu(this,e.sessionId);t&&t.handleError(e)},G(Tu,ke),(r=Tu.prototype).handleError=function(e){var t=Error("EME v0.1b key error");t.errorCode=e.errorCode,t.errorCode.systemCode=e.systemCode,!e.sessionId&&this.b?(t.method="generateRequest",45==e.systemCode&&(t.message="Unsupported session type."),this.b.reject(t),this.b=null):e.sessionId&&this.a?(t.method="update",this.a.reject(t),this.a=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?Su(this,"output-restricted"):Su(this,1==t?"expired":"internal-error"))},r.yd=function(e,t){if(this.a)this.a.then(this.yd.bind(this,e,t)).catch(this.yd.bind(this,e,t));else{if(this.a=e,"webkit-org.w3.clearkey"==this.c){var n=ot(t),r=JSON.parse(n);"oct"!=r.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null),n=ht.Ba(r.keys[0].k),r=ht.Ba(r.keys[0].kid)}else n=new Uint8Array(t),r=null;var i=gu("addKey");try{this.f[i](this.c,n,r,this.sessionId)}catch(e){this.a.reject(e),this.a=null}}},r.generateRequest=function(e,t){return wu(this,t,null)},r.load=function(e){return"persistent-license"==this.g?wu(this,null,e):Promise.reject(Error("Not a persistent session."))},r.update=function(e){var t=new ge;return this.yd(t,e),t},r.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=gu("cancelKeyRequest");try{this.f[e](this.c,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},r.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()},(r=ku.prototype).forEach=function(e){this.a&&e(this.a,pu)},r.get=function(e){if(this.has(e))return this.a},r.has=function(e){var t=pu;return!(!this.a||!ht.za(new Uint8Array(e),new Uint8Array(t)))},r.entries=function(){},r.keys=function(){},r.values=function(){},Vl((function(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)mu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;pu=new Uint8Array([0]).buffer,navigator.requestMediaKeySystemAccess=yu,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=vu,e.MediaKeys=_u,e.MediaKeySystemAccess=bu}})),Vl((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=xu,Object.defineProperty(t,"disablePictureInPicture",{get:Lu,set:Iu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Ru,document.addEventListener("webkitpresentationmodechanged",Cu,!0))}})),Vl((function(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}})),Vl((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=Pu)}})),Vl((function(){if(!e.VTTCue&&e.TextTrackCue){var t=TextTrackCue.length;if(3==t)e.VTTCue=ju;else if(6==t)e.VTTCue=Ou;else{try{var n=!!ju(1,2,"")}catch(e){n=!1}n&&(e.VTTCue=ju)}}})),V("shaka.text.TtmlTextParser",Du),Du.prototype.parseInit=function(){},Du.prototype.parseInit=Du.prototype.parseInit,Du.prototype.parseMedia=function(e,t){var n=ot(e),r=[],i=new DOMParser,a=null;if(""==n)return r;try{a=i.parseFromString(n,"text/xml")}catch(e){throw new me(2,2,2005,"Failed to parse TTML.")}if(a){if(n=a.getElementsByTagName("parsererror")[0])throw new me(2,2,2005,n.textContent);if(!(i=a.getElementsByTagName("tt")[0]))throw new me(2,2,2005,"TTML does not contain <tt> tag.");var o=Br.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRate"),s=Br.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),l=Br.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),u=Br.getAttributeNS(i,"http://www.w3.org/ns/ttml#parameter","tickRate");if(a=i.getAttribute("xml:space")||"default",n=i.getAttribute("tts:extent"),"default"!=a&&"preserve"!=a)throw new me(2,2,2005,"Invalid xml:space value: "+a);a="default"==a,o=new ic(o,s,l,u),s=qu(i.getElementsByTagName("metadata")[0]),l=qu(i.getElementsByTagName("styling")[0]),u=qu(i.getElementsByTagName("layout")[0]);for(var c=[],d=0;d<u.length;d++){var h,p,m=u[d],g=l,y=n,v=new cn,b=m.getAttribute("xml:id");b?(v.id=b,b=null,y&&(b=Uu.exec(y)||Bu.exec(y)),y=b?Number(b[1]):null,b=b?Number(b[2]):null,(h=Zu(m,g,"extent"))&&null!=(h=(p=Uu.exec(h))||Bu.exec(h))&&(v.width=null!=y?100*Number(h[1])/y:Number(h[1]),v.height=null!=b?100*Number(h[2])/b:Number(h[2]),v.widthUnits=p||null!=y?dn:0,v.heightUnits=p||null!=b?dn:0),(m=Zu(m,g,"origin"))&&null!=(h=(p=Uu.exec(m))||Bu.exec(m))&&(v.viewportAnchorX=null!=b?100*Number(h[1])/b:Number(h[1]),v.viewportAnchorY=null!=y?100*Number(h[2])/y:Number(h[2]),v.viewportAnchorUnits=p||null!=y?dn:0)):v=null,v&&c.push(v)}for(n=(n=i.getElementsByTagName("body")[0])?Array.from(n.querySelectorAll("[begin]")):[],i=(n=f(n)).next();!i.done;i=n.next())(i=Xu(i.value,t.periodStart,o,s,l,u,c,a,!1))&&r.push(i)}return r},Du.prototype.parseMedia=Du.prototype.parseMedia;var Mu,Nu,Uu=/^(\d{1,2}(?:\.\d+)?|100)% (\d{1,2}(?:\.\d+)?|100)%$/,Fu=/^(\d+px|\d+em)$/,Bu=/^(\d+)px (\d+)px$/,Ku=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Vu=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Gu=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Hu=/^(\d*(?:\.\d*)?)f$/,Yu=/^(\d*(?:\.\d*)?)t$/,zu=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Wu={left:an,center:"center",right:"end",start:an,end:"end"},$u={left:"line-left",center:"center",right:"line-right"};function qu(e){var t=[];if(!e)return t;for(var n=f(e.childNodes),r=n.next();!r.done;r=n.next())(r=r.value).nodeType==Node.ELEMENT_NODE&&"br"!==r.nodeName&&(r=qu(r),t=t.concat(r));return t.length||t.push(e),t}function Xu(e,t,n,r,i,a,o,s,l){if(l&&"br"==e.nodeName)return(e=new qt(0,0,"")).spacer=!0,e;var u=/^[\s\n]*$/.test(e.textContent),c=e.nodeType==Node.ELEMENT_NODE&&!e.hasAttribute("begin")&&!e.hasAttribute("end");if(e.nodeType!=Node.ELEMENT_NODE||c&&u||c&&!l)return null;u=nc(e.getAttribute("begin"),n),c=nc(e.getAttribute("end"),n);var d=nc(e.getAttribute("dur"),n);if(null==c&&null!=d&&(c=u+d),!l&&(null==u||null==c))throw new me(2,2,2001);if(u+=t,c+=t,d="",l=[],Array.from(e.childNodes).find((function(e){return e.nodeType===Node.TEXT_NODE&&/\w+/.test(e.textContent)})))d=function e(t,n){for(var r="",i=f(t.childNodes),a=i.next();!a.done;a=i.next())"br"==(a=a.value).nodeName&&t.childNodes[0]!==a?r+="\n":a.childNodes&&0<a.childNodes.length?r+=e(a,n):r+=n?a=(a=a.textContent.trim()).replace(/\s+/g," "):a.textContent;return r}(e,s);else for(var h=f(e.childNodes),p=h.next();!p.done;p=h.next())(p=Xu(p.value,t,n,r,i,a,o,s,!0))&&l.push(p);if((t=new qt(u,c,d)).nestedCues=l,(a=tc(e,"region",a,"")[0])&&a.getAttribute("xml:id")){var m=a.getAttribute("xml:id");t.region=o.filter((function(e){return e.id==m}))[0]}return function(e,t,n,r,i){"rtl"==Qu(t,n,i,"direction")&&(e.direction="rtl");var a=Qu(t,n,i,"writingMode");if("tb"==a||"tblr"==a?e.writingMode="vertical-lr":"tbrl"==a?e.writingMode="vertical-rl":"rltb"==a||"rl"==a?e.direction="rtl":a&&(e.direction=tn),(a=Qu(t,n,i,"textAlign"))?(e.positionAlign=$u[a],e.lineAlign=Wu[a],e.textAlign=Qt[a.toUpperCase()]):e.textAlign="start",(a=Qu(t,n,i,"displayAlign"))&&(e.displayAlign=en[a.toUpperCase()]),(a=Qu(t,n,i,"color"))&&(e.color=a),(a=Qu(t,n,i,"backgroundColor"))&&(e.backgroundColor=a),(a=Qu(t,n,i,"fontFamily"))&&(e.fontFamily=a),(a=Qu(t,n,i,"fontWeight"))&&"bold"==a&&(e.fontWeight=700),(a=Qu(t,n,i,"wrapOption"))&&"noWrap"==a&&(e.wrapLine=!1),(a=Qu(t,n,i,"lineHeight"))&&a.match(Fu)&&(e.lineHeight=a),(a=Qu(t,n,i,"fontSize"))&&a.match(Fu)&&(e.fontSize=a),(a=Qu(t,n,i,"fontStyle"))&&(e.fontStyle=un[a.toUpperCase()]),r){a=r.getAttribute("imagetype");var o=r.getAttribute("encoding");r=r.textContent.trim(),"PNG"==a&&"Base64"==o&&r&&(e.backgroundImage="data:image/png;base64,"+r)}(n=Zu(n,i,"textDecoration"))&&Ju(e,n),(t=ec(t,i,"textDecoration"))&&Ju(e,t)}(t,e,a,r=tc(e,"smpte:backgroundImage",r,"#")[0],i),t}function Ju(e,t){for(var n=t.split(" "),r=0;r<n.length;r++)switch(n[r]){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&&Re(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&Re(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Re(e.textDecoration,"overline")}}function Qu(e,t,n,r){return(e=ec(e,n,r))?e:Zu(t,n,r)}function Zu(e,t,n){for(var r=qu(e),i=0;i<r.length;i++){var a=Br.getAttributeNS(r[i],"http://www.w3.org/ns/ttml#styling",n);if(a)return a}return(e=tc(e,"style",t,"")[0])?Br.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",n):null}function ec(e,t,n){var r=Br.getAttributeNS(e,"http://www.w3.org/ns/ttml#styling",n);if(r)return r;for(e=tc(e,"style",t,""),t=null,r=0;r<e.length;r++){var i=Br.getAttributeNS(e[r],"http://www.w3.org/ns/ttml#styling",n);i&&(t=i)}return t}function tc(e,t,n,r){var i=[];if(!e||1>n.length)return i;var a=e;for(e=null;a&&!(e=a.getAttribute(t))&&(a=a.parentNode)instanceof Element;);if(t=e)for(e=(t=f(t=t.split(" "))).next();!e.done;e=t.next()){e=e.value;for(var o=(a=f(n)).next();!o.done;o=a.next())if(r+(o=o.value).getAttribute("xml:id")==e){i.push(o);break}}return i}function nc(e,t){var n=null;if(Ku.test(e)){n=Ku.exec(e);var r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=Number(n[4]);n=(a+=(o+=(Number(n[5])||0)/t.b)/t.frameRate)+60*i+3600*r}else Vu.test(e)?n=rc(Vu,e):Gu.test(e)?n=rc(Gu,e):Hu.test(e)?(n=Hu.exec(e),n=Number(n[1])/t.frameRate):Yu.test(e)?(n=Yu.exec(e),n=Number(n[1])/t.a):zu.test(e)&&(n=rc(zu,e));return n}function rc(e,t){var n=e.exec(t);return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function ic(e,t,n,r){this.frameRate=Number(e)||30,this.b=Number(t)||1,this.a=Number(r),0==this.a&&(this.a=e?this.frameRate*this.b:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}function ac(){this.a=new Du}function oc(){}function sc(e,t,n){var r;(r=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=r[1],e.textAlign="middle"==t?Jt:Qt[t.toUpperCase()]):(r=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==r[1]?"vertical-lr":"vertical-rl":(r=/^size:([\d.]+)%$/.exec(t))?e.size=Number(r[1]):(r=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))?(e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center")):(r=/^region:(.*)$/.exec(t))?(t=function(e,t){var n=e.filter((function(e){return e.id==t}));return n.length?n[0]:null}(n,r[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=on[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=rn,e.line=Number(n[1]),n[2]&&(e.lineAlign=on[n[2].toUpperCase()]))}function lc(e){if(null==(e=Mi(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function uc(){this.a=null}function cc(e,t,n){var r,i,a;return(new jr).H("payl",Mr((function(e){r=ot(e)}))).H("iden",Mr((function(e){i=ot(e)}))).H("sttg",Mr((function(e){a=ot(e)}))).parse(e),r?function(e,t,n,r,i){if(e=new qt(r,i,e),t&&(e.id=t),n)for(t=new Oi(n),n=Ni(t);n;)sc(e,n,[]),Di(t),n=Ni(t);return e}(r,i,a,t,n):null}
/*
@license
EME Encryption Scheme Polyfill
Copyright 2019 Google LLC
SPDX-License-Identifier: Apache-2.0
*/
function dc(){}function fc(){Mu?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Mu=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=hc):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function hc(e,t){var n=this;return p((function r(){var i;return M(r,(function(r){switch(r.j){case 1:return console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),w(r,Mu.call(n,e,t),2);case 2:return Ec(i=r.o)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Mu,r.return(i)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=pc,r.return(pc.call(n,e,t)))}}))}))}function pc(e,t){var n=this;return p((function r(){var i,a,o,s,l,u,c,d;return M(r,(function(r){switch(r.j){case 1:console.assert(n==navigator,'bad "this" for requestMediaKeySystemAccess'),i=Ac(e),a=[];for(var h=f(t),p=h.next();!p.done;p=h.next())o=p.value,s=mc(o.videoCapabilities,i),l=mc(o.audioCapabilities,i),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!l.length||((u=Object.assign({},o)).videoCapabilities=s,u.audioCapabilities=l,a.push(u));if(!a.length)throw(c=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",c.code=DOMException.NOT_SUPPORTED_ERR,c;return w(r,Mu.call(n,e,a),2);case 2:return d=r.o,r.return(new _c(d,i))}}))}))}function mc(e,t){return e?e.filter((function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function gc(){}function yc(){navigator.mediaCapabilities?(Nu=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=vc):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function vc(e){var t=this;return p((function n(){var r;return M(n,(function(n){switch(n.j){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),w(n,Nu.call(t,e),2);case 2:return r=n.o,e.keySystemConfiguration?Ec(r.keySystemAccess)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=Nu,n.return(r)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=bc,n.return(bc.call(t,e))):n.return(r)}}))}))}function bc(e){var t=this;return p((function n(){var r,i,a,o,s,l,u;return M(n,(function(n){switch(n.j){case 1:return console.assert(t==navigator.mediaCapabilities,'bad "this" for decodingInfo'),r=null,e.keySystemConfiguration&&(i=e.keySystemConfiguration,a=i.keySystem,o=i.audio&&i.audio.encryptionScheme,s=i.video&&i.video.encryptionScheme,r=Ac(a),l={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},o&&o!=r||s&&s!=r)?n.return(l):w(n,Nu.call(t,e),2);case 2:return(u=n.o).keySystemAccess&&(u.keySystemAccess=new _c(u.keySystemAccess,r)),n.return(u)}}))}))}function _c(e,t){this.b=e,this.a=t,this.keySystem=e.keySystem}function Ac(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function Ec(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function Tc(){}function wc(){fc(),yc()}pn["application/ttml+xml"]=Du,V("shaka.text.Mp4TtmlParser",ac),ac.prototype.parseInit=function(e){var t=!1;if((new jr).H("moov",Or).H("trak",Or).H("mdia",Or).H("minf",Or).H("stbl",Or).fa("stsd",Dr).H("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new me(2,2,2007)},ac.prototype.parseInit=ac.prototype.parseInit,ac.prototype.parseMedia=function(e,t){var n=!1,r=[];if((new jr).H("mdat",Mr(function(e){n=!0,r=r.concat(this.a.parseMedia(e,t))}.bind(this))).parse(e),!n)throw new me(2,2,2007);return r},ac.prototype.parseMedia=ac.prototype.parseMedia,pn['application/mp4; codecs="stpp"']=ac,pn['application/mp4; codecs="stpp.ttml.im1t"']=ac,pn['application/mp4; codecs="stpp.TTML.im1t"']=ac,V("shaka.text.VttTextParser",oc),oc.prototype.parseInit=function(){},oc.prototype.parseInit=oc.prototype.parseInit,oc.prototype.parseMedia=function(e,t){var n=ot(e);if(n=(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m),!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new me(2,2,2e3);var r=t.segmentStart;if(null==r&&(r=0,n[0].includes("X-TIMESTAMP-MAP"))){var i=n[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),a=n[0].match(/MPEGTS:(\d+)/m);if(i&&a){if(null==(r=lc(new Oi(i[1]))))throw new me(2,2,2e3);r=t.periodStart+(Number(a[1])/9e4-r)}}a=[];var o=n[0].split("\n");for(i=1;i<o.length;i++)if(/^Region:/.test(o[i])){var s=new Oi(o[i]),l=new cn;Ni(s),Di(s);for(var u=Ni(s);u;){var c=l,d=u;(u=/^id=(.*)$/.exec(d))?c.id=u[1]:(u=/^width=(\d{1,2}|100)%$/.exec(d))?c.width=Number(u[1]):(u=/^lines=(\d+)$/.exec(d))?(c.height=Number(u[1]),c.heightUnits=2):(u=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.regionAnchorX=Number(u[1]),c.regionAnchorY=Number(u[2])):(u=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.viewportAnchorX=Number(u[1]),c.viewportAnchorY=Number(u[2])):/^scroll=up$/.exec(d)&&(c.scroll="up"),Di(s),u=Ni(s)}a.push(l)}for(i=[],s=1;s<n.length;s++){if(u=o=n[s].split("\n"),d=r,o=a,1==u.length&&!u[0]||/^NOTE($|[ \t])/.test(u[0])||"STYLE"==u[0])o=null;else{l=null,u[0].includes("--\x3e")||(l=u[0],u.splice(0,1));var f=lc(c=new Oi(u[0])),h=Mi(c,/[ \t]+--\x3e[ \t]+/g),p=lc(c);if(null==f||null==h||null==p)throw new me(2,2,2001);for(u=new qt(f+d,p+d,u.slice(1).join("\n").trim()),Di(c),d=Ni(c);d;)sc(u,d,o),Di(c),d=Ni(c);null!=l&&(u.id=l),o=u}o&&i.push(o)}return i},oc.prototype.parseMedia=oc.prototype.parseMedia,pn["text/vtt"]=oc,pn['text/vtt; codecs="vtt"']=oc,V("shaka.text.Mp4VttParser",uc),uc.prototype.parseInit=function(e){var t=!1;if((new jr).H("moov",Or).H("trak",Or).H("mdia",Or).fa("mdhd",function(e){0==e.version?(e.reader.M(4),e.reader.M(4),this.a=e.reader.G(),e.reader.M(4)):(e.reader.M(8),e.reader.M(8),this.a=e.reader.G(),e.reader.M(8)),e.reader.M(4)}.bind(this)).H("minf",Or).H("stbl",Or).fa("stsd",Dr).H("wvtt",(function(){t=!0})).parse(e),!this.a)throw new me(2,2,2008);if(!t)throw new me(2,2,2008)},uc.prototype.parseInit=uc.prototype.parseInit,uc.prototype.parseMedia=function(e,t){var n=this;if(!this.a)throw new me(2,2,2008);var r,i=0,a=[],o=[],s=!1,l=!1,u=!1,c=null;if((new jr).H("moof",Or).H("traf",Or).fa("tfdt",(function(e){s=!0,i=0==e.version?e.reader.G():e.reader.Bb()})).fa("tfhd",(function(e){var t=e.flags;(e=e.reader).M(4),1&t&&e.M(8),2&t&&e.M(4),c=8&t?e.G():null})).fa("trun",(function(e){l=!0;var t=e.version,n=e.flags,r=(e=e.reader).G();1&n&&e.M(4),4&n&&e.M(4);for(var i=[],o=0;o<r;o++){var s={duration:null,sampleSize:null,Ad:null};256&n&&(s.duration=e.G()),512&n&&(s.sampleSize=e.G()),1024&n&&e.M(4),2048&n&&(s.Ad=0==t?e.G():e.ke()),i.push(s)}a=i})).H("mdat",Mr((function(e){u=!0,r=e}))).parse(e),!u&&!s&&!l)throw new me(2,2,2008);var d=i,f=new Lr(new DataView(r.buffer,r.byteOffset,r.byteLength),0);return a.forEach((function(e){var r=e.duration||c,a=e.Ad?i+e.Ad:d;d=a+(r||0);var s=0;do{var l=f.G();s+=l;var u=null;"vttc"==Ur(f.G())?8<l&&(u=f.Za(l-8)):f.M(l-8),r&&u&&o.push(cc(u,t.periodStart+a/n.a,t.periodStart+d/n.a))}while(e.sampleSize&&s<e.sampleSize)})),o.filter(Vt.Ia)},uc.prototype.parseMedia=uc.prototype.parseMedia,pn['application/mp4; codecs="wvtt"']=uc,V("shaka.util.Dom.createHTMLElement",(function(e){return document.createElement(e)})),V("shaka.util.Dom.createVideoElement",(function(){var e=document.createElement("video");return e.muted=!0,e.width=600,e.height=400,e})),V("shaka.util.Dom.asHTMLElement",(function(e){return e})),V("shaka.util.Dom.asHTMLMediaElement",(function(e){return e})),V("shaka.util.Dom.removeAllChildren",(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)})),V("EmeEncryptionSchemePolyfill",dc),dc.install=fc,V("McEncryptionSchemePolyfill",gc),gc.install=yc,_c.prototype.getConfiguration=function(){var e=this.b.getConfiguration();if(e.videoCapabilities)for(var t=f(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.a;if(e.audioCapabilities)for(n=(t=f(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.a;return e},_c.prototype.createMediaKeys=function(){return this.b.createMediaKeys()},V("EncryptionSchemePolyfills",Tc),Tc.install=wc,n.Ne&&(n.Ne=Tc)}.call(i,r,r),i.shaka)t[a]=i.shaka[a]}()}).call(this,n(/*! ./../../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"),n(/*! ./../../webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e))},"./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
!*** (webpack)/buildin/global.js ***!
\***********************************/
/*! no static exports found */function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"./node_modules/webpack/buildin/module.js":
/*!***********************************!*\
!*** (webpack)/buildin/module.js ***!
\***********************************/
/*! no static exports found */function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./src/clappr-dash-shaka-playback.js":
/*!*******************************************!*\
!*** ./src/clappr-dash-shaka-playback.js ***!
\*******************************************/
/*! no static exports found */function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in i)return i.value;var o=i.get;return void 0!==o?o.call(r):void 0},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(/*! clappr */"clappr"),s=n(/*! shaka-player */"./node_modules/shaka-player/dist/shaka-player.compiled.js"),l=(r=s)&&r.__esModule?r:{default:r};function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e;u(this,t);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));return a._levels=[],a._pendingAdaptationEvent=!1,a._isShakaReadyState=!1,a._minDvrSize=void 0===a.options.shakaMinimumDvrSize?60:a.options.shakaMinimumDvrSize,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"getDuration",value:function(){return this._duration}},{key:"getCurrentTime",value:function(){return this.shakaPlayerInstance.getMediaElement().currentTime-this.seekRange.start}},{key:"name",get:function(){return"dash_shaka_playback"}},{key:"shakaVersion",get:function(){return l.default.player.Player.version}},{key:"shakaPlayerInstance",get:function(){return this._player}},{key:"levels",get:function(){return this._levels}},{key:"seekRange",get:function(){return this.shakaPlayerInstance.seekRange()}},{key:"currentLevel",set:function(e){var t=this;this._currentLevelId=e;var n=-1===this._currentLevelId;this.trigger(o.Events.PLAYBACK_LEVEL_SWITCH_START),n?(this._player.configure({abr:{enabled:!0}}),this.trigger(o.Events.PLAYBACK_LEVEL_SWITCH_END)):(this._player.configure({abr:{enabled:!1}}),this._pendingAdaptationEvent=!0,this.selectTrack(this.videoTracks.filter((function(e){return e.id===t._currentLevelId}))[0]))},get:function(){return this._currentLevelId||-1}},{key:"dvrEnabled",get:function(){return this._duration>=this._minDvrSize&&"live"===this.getPlaybackType()}},{key:"_duration",get:function(){return this.shakaPlayerInstance?this.seekRange.end-this.seekRange.start:0}},{key:"_startTime",get:function(){return this.seekRange.start}},{key:"presentationTimeline",get:function(){var e=this.shakaPlayerInstance.getManifest();return e?e.presentationTimeline:null}},{key:"bandwidthEstimate",get:function(){if(this.shakaPlayerInstance)return this.shakaPlayerInstance.getStats().estimatedBandwidth}}],[{key:"canPlay",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";l.default.polyfill.installAll();var n=l.default.Player.isBrowserSupported(),r=e.split("?")[0].match(/.*\.(.*)$/)||[];return n&&("mpd"===r[1]||t.indexOf("application/dash+xml")>-1)}},{key:"Events",get:function(){return{SHAKA_READY:"shaka:ready"}}}]),a(t,[{key:"getProgramDateTime",value:function(){var e=this.presentationTimeline;return e?new Date(1e3*(e.getPresentationStartTime()+this.seekRange.start)):null}},{key:"_updateDvr",value:function(e){this.trigger(o.Events.PLAYBACK_DVR,e),this.trigger(o.Events.PLAYBACK_STATS_ADD,{dvr:e})}},{key:"seek",value:function(e){e<0&&(o.Log.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this._duration),this.dvrEnabled&&this._updateDvr(e<this._duration-3),e+=this._startTime,i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"seek",this).call(this,e)}},{key:"pause",value:function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"pause",this).call(this),this.dvrEnabled&&this._updateDvr(!0)}},{key:"play",value:function(){this._player||this._setup(),this.isReady?(this._stopped=!1,this._src=this.el.src,i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"play",this).call(this),this._startTimeUpdateTimer()):this.once(t.Events.SHAKA_READY,this.play)}},{key:"_startTimeUpdateTimer",value:function(){var e=this;this._stopTimeUpdateTimer(),this._timeUpdateTimer=setInterval((function(){e._onTimeUpdate()}),100)}},{key:"_stopTimeUpdateTimer",value:function(){this._timeUpdateTimer&&clearInterval(this._timeUpdateTimer)}},{key:"_setupSrc",value:function(){}},{key:"_ready",value:function(){}},{key:"_onShakaReady",value:function(){this._isShakaReadyState=!0,this.trigger(t.Events.SHAKA_READY),this.trigger(o.Events.PLAYBACK_READY,this.name)}},{key:"error",value:function(e){o.Log.error("an error was raised by the video tag",e,this.el.error)}},{key:"isHighDefinitionInUse",value:function(){return!1}},{key:"stop",value:function(){var e=this;this._stopTimeUpdateTimer(),clearInterval(this.sendStatsId),this._stopped=!0,this._player?(this._sendStats(),this._player.unload().then((function(){i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stop",e).call(e),e._player=null,e._isShakaReadyState=!1})).catch((function(){o.Log.error("shaka could not be unloaded")}))):i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stop",this).call(this)}},{key:"getPlaybackType",value:function(){return(this.isReady&&this._player.isLive()?"live":"vod")||""}},{key:"selectAudioLanguage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._player.selectAudioLanguage(e,t)}},{key:"selectTrack",value:function(e){if("text"===e.type)this._player.selectTextTrack(e);else{if("variant"!==e.type)throw new Error("Unhandled track type:",e.type);this._player.selectVariantTrack(e),e.mimeType.startsWith("video/")&&this._onAdaptation()}}},{key:"_enableShakaTextTrack",value:function(e){this.el.textTracks&&(this._shakaTTVisible=e,Array.from(this.el.textTracks).filter((function(e){return"subtitles"===e.kind})).forEach((function(t){return t.mode=!0===e?"showing":"hidden"})))}},{key:"_checkForClosedCaptions",value:function(){if(!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(o.Events.PLAYBACK_SUBTITLE_AVAILABLE);var e=this.closedCaptionsTrackId;this.closedCaptionsTrackId=e}this._ccIsSetup=!0}}},{key:"destroy",value:function(){var e=this;this._stopTimeUpdateTimer(),clearInterval(this.sendStatsId),this._player?this._player.destroy().then((function(){return e._destroy()})).catch((function(){e._destroy(),o.Log.error("shaka could not be destroyed")})):this._destroy(),i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"destroy",this).call(this)}},{key:"_setup",value:function(){var e=this;this._isShakaReadyState=!1,this._ccIsSetup=!1,this._player=this._createPlayer(),this._options.shakaConfiguration&&this._player.configure(this._options.shakaConfiguration),this._options.shakaOnBeforeLoad&&this._options.shakaOnBeforeLoad(this._player),this._player.load(this._options.src).then((function(){return e._loaded()})).catch((function(t){return e._setupError(t)}))}},{key:"_createPlayer",value:function(){var e=new l.default.Player(this.el);return e.addEventListener("error",this._onError.bind(this)),e.addEventListener("adaptation",this._onAdaptation.bind(this)),e.addEventListener("buffering",this._onBuffering.bind(this)),e}},{key:"_onTimeUpdate",value:function(){if(this.shakaPlayerInstance){var e=this.getProgramDateTime();if(e){var t={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:e};this._lastTimeUpdate&&t.current===this._lastTimeUpdate.current&&t.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=t,this.trigger(o.Events.PLAYBACK_TIMEUPDATE,t,this.name))}}}},{key:"_onBuffering",value:function(e){if(!this._stopped){var t=e.buffering?o.Events.PLAYBACK_BUFFERING:o.Events.PLAYBACK_BUFFERFULL;this.trigger(t)}}},{key:"_loaded",value:function(){this._onShakaReady(),this._startToSendStats(),this._fillLevels(),this._checkForClosedCaptions()}},{key:"_fillLevels",value:function(){0===this._levels.length&&(this._levels=this.videoTracks.slice(0).reverse(),this.trigger(o.Events.PLAYBACK_LEVELS_AVAILABLE,this.levels))}},{key:"_startToSendStats",value:function(){var e=this,t=this._options.shakaSendStatsInterval||3e4;this.sendStatsId=setInterval((function(){return e._sendStats()}),t)}},{key:"_sendStats",value:function(){this.trigger(o.Events.PLAYBACK_STATS_ADD,this._player.getStats())}},{key:"_setupError",value:function(e){this._onError(e)}},{key:"_onError",value:function(e){var n={shakaError:e,videoError:this.el.error},r=n.shakaError.detail||n.shakaError,a=r.category,s=r.code,u=r.severity;if(n.videoError||!s&&!a)return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_onError",this).call(this);var c={code:a+"_"+s,description:"Category: "+a+", code: "+s+", severity: "+u,level:u===l.default.util.Error.Severity.CRITICAL?o.PlayerError.Levels.FATAL:o.PlayerError.Levels.WARN,raw:e},d=this.createError(c);o.Log.error("Shaka error event:",d),this.trigger(o.Events.PLAYBACK_ERROR,d)}},{key:"_onAdaptation",value:function(){var e=this.videoTracks.filter((function(e){return!0===e.active}))[0];this._fillLevels(),this._sendStats(),this._pendingAdaptationEvent&&(this.trigger(o.Events.PLAYBACK_LEVEL_SWITCH_END),this._pendingAdaptationEvent=!1),o.Log.debug("an adaptation has happened:",e),this.highDefinition=e.height>=720,this.trigger(o.Events.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(o.Events.PLAYBACK_BITRATE,{bandwidth:e.bandwidth,width:e.width,height:e.height,language:e.language,level:e.id,bitrate:e.videoBandwidth})}},{key:"_updateSettings",value:function(){"vod"===this.getPlaybackType()?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(o.Events.PLAYBACK_SETTINGSUPDATE)}},{key:"_destroy",value:function(){this._isShakaReadyState=!1,o.Log.debug("shaka was destroyed")}},{key:"isReady",get:function(){return this._isShakaReadyState}},{key:"textTracks",get:function(){return this.isReady&&this._player.getTextTracks()}},{key:"audioLanguages",get:function(){return this.isReady&&this._player.getAudioLanguages()}},{key:"audioTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter((function(e){return e.mimeType.startsWith("audio/")}))}},{key:"videoTracks",get:function(){return this.isReady&&this._player.getVariantTracks().filter((function(e){return e.mimeType.startsWith("video/")}))}},{key:"closedCaptionsTracks",get:function(){var e=0;return(this.textTracks||[]).filter((function(e){return"subtitle"===e.kind})).map((function(t){return{id:e++,name:t.label||t.language,track:t}}))}},{key:"closedCaptionsTrackId",get:function(){return i(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"closedCaptionsTrackId",this)},set:function(e){if(this._player){var t=this.closedCaptionsTracks,n=void 0;if(-1!==e){if(!(n=t.find((function(t){return t.id===e}))))return void o.Log.warn('Track id "'+e+'" not found');if(this._shakaTTVisible&&!0===n.track.active)return void o.Log.info('Track id "'+e+'" already showing')}n?(this._player.selectTextTrack(n.track),this._player.setTextTrackVisibility(!0),this._enableShakaTextTrack(!0)):(this._player.setTextTrackVisibility(!1),this._enableShakaTextTrack(!1)),this._ccTrackId=e,this.trigger(o.Events.PLAYBACK_SUBTITLE_CHANGED,{id:e})}}}]),t}(o.HTML5Video);t.default=d,e.exports=t.default},clappr:
/*!******************************************************************************************!*\
!*** external {"amd":"clappr","commonjs":"clappr","commonjs2":"clappr","root":"Clappr"} ***!
\******************************************************************************************/
/*! no static exports found */function(t,n){t.exports=e}})},e.exports=r(n(0))},function(e,t,n){var r;"undefined"!=typeof self&&self,r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="<%=baseUrl%>/",n(n.s=40)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(10),i=n(29),a=n(15),o=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(11)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(2),i=n(12);e.exports=n(3)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(56),i=n(17);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(22)("wks"),i=n(14),a=n(0).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){var r=n(0),i=n(1),a=n(28),o=n(5),s=n(4),l=function(e,t,n){var u,c,d,f=e&l.F,h=e&l.G,p=e&l.S,m=e&l.P,g=e&l.B,y=e&l.W,v=h?i:i[t]||(i[t]={}),b=v.prototype,_=h?r:p?r[t]:(r[t]||{}).prototype;for(u in h&&(n=t),n)(c=!f&&_&&void 0!==_[u])&&s(v,u)||(d=c?_[u]:n[u],v[u]=h&&"function"!=typeof _[u]?n[u]:g&&c?a(d,r):y&&_[u]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?a(Function.call,d):d,m&&((v.virtual||(v.virtual={}))[u]=d,e&l.R&&b&&!b[u]&&o(b,u,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){var r=n(6);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=!0},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(6);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports={}},function(e,t,n){var r=n(10),i=n(55),a=n(23),o=n(21)("IE_PROTO"),s=function(){},l=function(){var e,t=n(30)("iframe"),r=a.length;for(t.style.display="none",n(60).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[a[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(34),i=n(23);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(22)("keys"),i=n(14);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(1),i=n(0),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(13)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(2).f,i=n(4),a=n(8)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){t.f=n(8)},function(e,t,n){var r=n(0),i=n(1),a=n(13),o=n(25),s=n(2).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(48);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){e.exports=!n(3)&&!n(11)((function(){return 7!=Object.defineProperty(n(30)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(6),i=n(0).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(50)),i=o(n(66)),a="function"==typeof i.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function o(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===a(r.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":a(e)}},function(e,t,n){"use strict";var r=n(13),i=n(9),a=n(33),o=n(5),s=n(18),l=n(54),u=n(24),c=n(61),d=n(8)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,p,m,g,y){l(n,t,p);var v,b,_,A=function(e){if(!f&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",T="values"==m,w=!1,S=e.prototype,k=S[d]||S["@@iterator"]||m&&S[m],C=k||A(m),x=m?T?A("entries"):C:void 0,R="Array"==t&&S.entries||k;if(R&&(_=c(R.call(new e)))!==Object.prototype&&_.next&&(u(_,E,!0),r||"function"==typeof _[d]||o(_,d,h)),T&&k&&"values"!==k.name&&(w=!0,C=function(){return k.call(this)}),r&&!y||!f&&!w&&S[d]||o(S,d,C),s[t]=C,s[E]=h,m)if(v={values:T?C:A("values"),keys:g?C:A("keys"),entries:x},y)for(b in v)b in S||a(S,b,v[b]);else i(i.P+i.F*(f||w),t,v);return v}},function(e,t,n){e.exports=n(5)},function(e,t,n){var r=n(4),i=n(7),a=n(57)(!1),o=n(21)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),l=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(u,n)||u.push(n));return u}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(17);e.exports=function(e){return Object(r(e))}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(34),i=n(23).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(27),i=n(12),a=n(7),o=n(15),s=n(4),l=n(29),u=Object.getOwnPropertyDescriptor;t.f=n(3)?u:function(e,t){if(e=a(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(41),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";(function(r){Object.defineProperty(t,"__esModule",{value:!0});var i=d(n(43)),a=d(n(44)),o=d(n(49)),s=d(n(76)),l=n(84),u=d(n(85)),c=d(n(86));function d(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(){return(0,i.default)(this,t),(0,o.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.bindEvents=function(){this.listenTo(this.core,l.Events.CORE_READY,this.bindPlaybackEvents),l.Events.CORE_ACTIVE_CONTAINER_CHANGED?this.listenTo(this.core,l.Events.CORE_ACTIVE_CONTAINER_CHANGED,this.reload):this.listenTo(this.core.mediaControl,l.Events.MEDIACONTROL_CONTAINERCHANGED,this.reload),this.listenTo(this.core.mediaControl,l.Events.MEDIACONTROL_RENDERED,this.render),this.listenTo(this.core.mediaControl,l.Events.MEDIACONTROL_HIDE,this.hideSelectLevelMenu)},t.prototype.bindPlaybackEvents=function(){this.playback&&(this.listenTo(this.playback,l.Events.PLAYBACK_LEVELS_AVAILABLE,this.fillLevels),this.listenTo(this.playback,l.Events.PLAYBACK_LEVEL_SWITCH_START,this.startLevelSwitch),this.listenTo(this.playback,l.Events.PLAYBACK_LEVEL_SWITCH_END,this.stopLevelSwitch),this.listenTo(this.playback,l.Events.PLAYBACK_BITRATE,this.updateCurrentLevel),this.playback.levels&&this.playback.levels.length>0&&this.fillLevels(this.playback.levels))},t.prototype.reload=function(){var e=this;this.stopListening(),r.nextTick((function(){e.bindEvents(),e.bindPlaybackEvents()}))},t.prototype.shouldRender=function(){if(!this.container||!this.playback)return!1;var e=void 0!==this.playback.currentLevel,t=!!(this.levels&&this.levels.length>1);return e&&t},t.prototype.render=function(){if(this.shouldRender()){var e=l.Styler.getStyleFor(c.default,{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({levels:this.levels,title:this.getTitle()})),this.$el.append(e),this.core.mediaControl.$(".media-control-right-panel").append(this.el),this.$(".level_selector ul").css("max-height",.8*this.core.el.offsetHeight),this.highlightCurrentLevel()}return this},t.prototype.fillLevels=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;void 0===this.selectedLevelId&&(this.selectedLevelId=t);var n=this.core.options&&this.core.options.levelSelectorConfig&&this.core.options.levelSelectorConfig.onLevelsAvailable;if(n){if("function"!=typeof n)throw new TypeError("onLevelsAvailable must be a function");e=n(e.slice())}this.levels=e,this.configureLevelsLabels(),this.render()},t.prototype.configureLevelsLabels=function(){if(void 0!==this.core.options.levelSelectorConfig){var e=this.core.options.levelSelectorConfig.labelCallback;if(e&&"function"!=typeof e)throw new TypeError("labelCallback must be a function");var t=this.core.options.levelSelectorConfig.labels,n=t?this.core.options.levelSelectorConfig.labels:{};if(e||t){var r=void 0,i=void 0;for(var a in this.levels)i=n[(r=this.levels[a]).id],e?r.label=e(r,i):i&&(r.label=i)}}},t.prototype.findLevelBy=function(e){var t=void 0;return this.levels.forEach((function(n){n.id===e&&(t=n)})),t},t.prototype.onLevelSelect=function(e){return this.selectedLevelId=parseInt(e.target.dataset.levelSelectorSelect,10),this.playback.currentLevel==this.selectedLevelId||(this.playback.currentLevel=this.selectedLevelId,this.toggleContextMenu(),e.stopPropagation()),!1},t.prototype.onShowLevelSelectMenu=function(){this.toggleContextMenu()},t.prototype.hideSelectLevelMenu=function(){this.$(".level_selector ul").hide()},t.prototype.toggleContextMenu=function(){this.$(".level_selector ul").toggle()},t.prototype.buttonElement=function(){return this.$(".level_selector button")},t.prototype.levelElement=function(e){return this.$(".level_selector ul a"+(isNaN(e)?"":'[data-level-selector-select="'+e+'"]')).parent()},t.prototype.getTitle=function(){return(this.core.options.levelSelectorConfig||{}).title},t.prototype.startLevelSwitch=function(){this.buttonElement().addClass("changing")},t.prototype.stopLevelSwitch=function(){this.buttonElement().removeClass("changing")},t.prototype.updateText=function(e){-1===e?this.buttonElement().text(this.currentLevel?"AUTO ("+this.currentLevel.label+")":"AUTO"):this.buttonElement().text(this.findLevelBy(e).label)},t.prototype.updateCurrentLevel=function(e){var t=this.findLevelBy(e.level);this.currentLevel=t||null,this.highlightCurrentLevel()},t.prototype.highlightCurrentLevel=function(){var e=this;this.levelElement().removeClass("current"),this.currentLevel&&this.levelElement(this.currentLevel.id).addClass("current"),this.updateText(this.selectedLevelId);var t=this.currentLevel&&this.currentLevel.language;t&&(this.levelElement().removeClass("hidden"),this.levels.forEach((function(n){n.language!=t&&e.levelElement(n.id).addClass("hidden")})))},(0,a.default)(t,[{key:"name",get:function(){return"level_selector"}},{key:"template",get:function(){return(0,l.template)(u.default)}},{key:"attributes",get:function(){return{class:this.name,"data-level-selector":""}}},{key:"events",get:function(){return{"click [data-level-selector-select]":"onLevelSelect","click [data-level-selector-button]":"onShowLevelSelectMenu"}}},{key:"container",get:function(){return this.core.activeContainer?this.core.activeContainer:this.core.mediaControl.container}},{key:"playback",get:function(){return this.core.activePlayback?this.core.activePlayback:this.core.getCurrentPlayback()}}],[{key:"version",get:function(){return VERSION}}]),t}(l.UICorePlugin);t.default=f,e.exports=t.default}).call(t,n(42))},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(45),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,a.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t,n){e.exports={default:n(46),__esModule:!0}},function(e,t,n){n(47);var r=n(1).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(9);r(r.S+r.F*!n(3),"Object",{defineProperty:n(2).f})},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(31),a=(r=i)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,a.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){e.exports={default:n(51),__esModule:!0}},function(e,t,n){n(52),n(62),e.exports=n(25).f("iterator")},function(e,t,n){"use strict";var r=n(53)(!0);n(32)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(16),i=n(17);e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(19),i=n(12),a=n(24),o={};n(5)(o,n(8)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(2),i=n(10),a=n(20);e.exports=n(3)?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){var r=n(35);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(7),i=n(58),a=n(59);e.exports=function(e){return function(t,n,o){var s,l=r(t),u=i(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){var r=n(16),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(16),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):a(e,t)}},function(e,t,n){var r=n(0).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(4),i=n(36),a=n(21)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){n(63);for(var r=n(0),i=n(5),a=n(18),o=n(8)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var u=s[l],c=r[u],d=c&&c.prototype;d&&!d[o]&&i(d,o,u),a[u]=a.Array}},function(e,t,n){"use strict";var r=n(64),i=n(65),a=n(18),o=n(7);e.exports=n(32)(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(67),__esModule:!0}},function(e,t,n){n(68),n(73),n(74),n(75),e.exports=n(1).Symbol},function(e,t,n){"use strict";var r=n(0),i=n(4),a=n(3),o=n(9),s=n(33),l=n(69).KEY,u=n(11),c=n(22),d=n(24),f=n(14),h=n(8),p=n(25),m=n(26),g=n(70),y=n(71),v=n(10),b=n(6),_=n(36),A=n(7),E=n(15),T=n(12),w=n(19),S=n(72),k=n(39),C=n(37),x=n(2),R=n(20),L=k.f,I=x.f,P=S.f,j=r.Symbol,O=r.JSON,D=O&&O.stringify,M=h("_hidden"),N=h("toPrimitive"),U={}.propertyIsEnumerable,F=c("symbol-registry"),B=c("symbols"),K=c("op-symbols"),V=Object.prototype,G="function"==typeof j&&!!C.f,H=r.QObject,Y=!H||!H.prototype||!H.prototype.findChild,z=a&&u((function(){return 7!=w(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=L(V,t);r&&delete V[t],I(e,t,n),r&&e!==V&&I(V,t,r)}:I,W=function(e){var t=B[e]=w(j.prototype);return t._k=e,t},$=G&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},q=function(e,t,n){return e===V&&q(K,t,n),v(e),t=E(t,!0),v(n),i(B,t)?(n.enumerable?(i(e,M)&&e[M][t]&&(e[M][t]=!1),n=w(n,{enumerable:T(0,!1)})):(i(e,M)||I(e,M,T(1,{})),e[M][t]=!0),z(e,t,n)):I(e,t,n)},X=function(e,t){v(e);for(var n,r=g(t=A(t)),i=0,a=r.length;a>i;)q(e,n=r[i++],t[n]);return e},J=function(e){var t=U.call(this,e=E(e,!0));return!(this===V&&i(B,e)&&!i(K,e))&&(!(t||!i(this,e)||!i(B,e)||i(this,M)&&this[M][e])||t)},Q=function(e,t){if(e=A(e),t=E(t,!0),e!==V||!i(B,t)||i(K,t)){var n=L(e,t);return!n||!i(B,t)||i(e,M)&&e[M][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=P(A(e)),r=[],a=0;n.length>a;)i(B,t=n[a++])||t==M||t==l||r.push(t);return r},ee=function(e){for(var t,n=e===V,r=P(n?K:A(e)),a=[],o=0;r.length>o;)!i(B,t=r[o++])||n&&!i(V,t)||a.push(B[t]);return a};G||(s((j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===V&&t.call(K,n),i(this,M)&&i(this[M],e)&&(this[M][e]=!1),z(this,e,T(1,n))};return a&&Y&&z(V,e,{configurable:!0,set:t}),W(e)}).prototype,"toString",(function(){return this._k})),k.f=Q,x.f=q,n(38).f=S.f=Z,n(27).f=J,C.f=ee,a&&!n(13)&&s(V,"propertyIsEnumerable",J,!0),p.f=function(e){return W(h(e))}),o(o.G+o.W+o.F*!G,{Symbol:j});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)h(te[ne++]);for(var re=R(h.store),ie=0;re.length>ie;)m(re[ie++]);o(o.S+o.F*!G,"Symbol",{for:function(e){return i(F,e+="")?F[e]:F[e]=j(e)},keyFor:function(e){if(!$(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),o(o.S+o.F*!G,"Object",{create:function(e,t){return void 0===t?w(e):X(w(e),t)},defineProperty:q,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:ee});var ae=u((function(){C.f(1)}));o(o.S+o.F*ae,"Object",{getOwnPropertySymbols:function(e){return C.f(_(e))}}),O&&o(o.S+o.F*(!G||u((function(){var e=j();return"[null]"!=D([e])||"{}"!=D({a:e})||"{}"!=D(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!$(e))return y(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!$(t))return t}),r[1]=t,D.apply(O,r)}}),j.prototype[N]||n(5)(j.prototype,N,j.prototype.valueOf),d(j,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(e,t,n){var r=n(14)("meta"),i=n(6),a=n(4),o=n(2).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(11)((function(){return l(Object.preventExtensions({}))})),c=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&d.NEED&&l(e)&&!a(e,r)&&c(e),e}}},function(e,t,n){var r=n(20),i=n(37),a=n(27);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),l=a.f,u=0;s.length>u;)l.call(e,o=s[u++])&&t.push(o);return t}},function(e,t,n){var r=n(35);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(7),i=n(38).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return i(e)}catch(e){return o.slice()}}(e):i(r(e))}},function(e,t){},function(e,t,n){n(26)("asyncIterator")},function(e,t,n){n(26)("observable")},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(77)),i=o(n(81)),a=o(n(31));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,a.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){e.exports={default:n(78),__esModule:!0}},function(e,t,n){n(79),e.exports=n(1).Object.setPrototypeOf},function(e,t,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(80).set})},function(e,t,n){var r=n(6),i=n(10),a=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(28)(Function.call,n(39).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t,n){e.exports={default:n(82),__esModule:!0}},function(e,t,n){n(83);var r=n(1).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(9);r(r.S,"Object",{create:n(19)})},function(t,n){t.exports=e},function(e,t){e.exports='<button data-level-selector-button>\n Auto\n</button>\n<ul>\n <% if (title) { %>\n <li data-title><%= title %></li>\n <% }; %>\n <li><a href="#" data-level-selector-select="-1">AUTO</a></li>\n <% for (var i = 0; i < levels.length; i++) { %>\n <li><a href="#" data-level-selector-select="<%= levels[i].id %>"><%= levels[i].label %></a></li>\n <% }; %>\n</ul>\n'},function(e,t,n){var r=n(87);"string"==typeof r&&(r=[[e.i,r,""]]),n(89)(r,{singleton:!0}),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(88)(!1)).push([e.i,'.level_selector[data-level-selector] {\n float: right;\n position: relative;\n height: 100%; }\n .level_selector[data-level-selector] button {\n background-color: transparent;\n color: #fff;\n font-family: Roboto,"Open Sans",Arial,sans-serif;\n -webkit-font-smoothing: antialiased;\n border: none;\n font-size: 12px;\n height: 100%; }\n .level_selector[data-level-selector] button:hover {\n color: #c9c9c9; }\n .level_selector[data-level-selector] button.changing {\n -webkit-animation: pulse 0.5s infinite alternate; }\n .level_selector[data-level-selector] > ul {\n overflow-x: hidden;\n overflow-y: auto;\n list-style-type: none;\n position: absolute;\n bottom: 100%;\n display: none;\n background-color: rgba(28, 28, 28, 0.9);\n white-space: nowrap; }\n .level_selector[data-level-selector] li {\n font-size: 12px;\n color: #eee; }\n .level_selector[data-level-selector] li[data-title] {\n background-color: #333;\n padding: 8px 25px; }\n .level_selector[data-level-selector] li a {\n color: #eee;\n padding: 5px 18px;\n display: block;\n text-decoration: none; }\n .level_selector[data-level-selector] li a:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: #fff; }\n .level_selector[data-level-selector] li a:hover a {\n color: #fff;\n text-decoration: none; }\n .level_selector[data-level-selector] li.current a {\n color: #2ecc71; }\n .level_selector[data-level-selector] li.hidden {\n display: none; }\n',""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var a=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),o=i.sources.map((function(e){return"/*# sourceURL="+i.sourceRoot+e+" */"}));return[r].concat(o).concat([a]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];"number"==typeof a&&(r[a]=!0)}for(i=0;i<e.length;i++){var o=e[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),t.push(o))}},t}},function(e,t){var n={},r=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}},i=r((function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())})),a=r((function(){return document.head||document.getElementsByTagName("head")[0]})),o=null,s=0;function l(e,t){for(var r=0;r<e.length;r++){var i=e[r],a=n[i.id];if(a){a.refs++;for(var o=0;o<a.parts.length;o++)a.parts[o](i.parts[o]);for(;o<i.parts.length;o++)a.parts.push(d(i.parts[o],t))}else{var s=[];for(o=0;o<i.parts.length;o++)s.push(d(i.parts[o],t));n[i.id]={id:i.id,refs:1,parts:s}}}}function u(e){for(var t=[],n={},r=0;r<e.length;r++){var i=e[r],a=i[0],o={css:i[1],media:i[2],sourceMap:i[3]};n[a]?n[a].parts.push(o):t.push(n[a]={id:a,parts:[o]})}return t}function c(){var e=document.createElement("style"),t=a();return e.type="text/css",t.appendChild(e),e}function d(e,t){var n,r,i,l,u;if(t.singleton){var d=s++;n=o||(o=c()),r=p.bind(null,n,d,!1),i=p.bind(null,n,d,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(l=document.createElement("link"),u=a(),l.rel="stylesheet",u.appendChild(l),n=l,r=g.bind(null,n),i=function(){n.parentNode.removeChild(n),n.href&&URL.revokeObjectURL(n.href)}):(n=c(),r=m.bind(null,n),i=function(){n.parentNode.removeChild(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");void 0===(t=t||{}).singleton&&(t.singleton=i());var r=u(e);return l(r,t),function(e){for(var i=[],a=0;a<r.length;a++){var o=r[a];(s=n[o.id]).refs--,i.push(s)}for(e&&l(u(e),t),a=0;a<i.length;a++){var s;if(0===(s=i[a]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete n[s.id]}}}};var f,h=(f=[],function(e,t){return f[e]=t,f.filter(Boolean).join("\n")});function p(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=h(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function m(e,t){var n=t.css,r=t.media;if(t.sourceMap,r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function g(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(i),a&&URL.revokeObjectURL(a)}}])},e.exports=r(n(0))},function(module,exports,__webpack_require__){var factory;window,factory=function(__WEBPACK_EXTERNAL_MODULE_clappr__){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/main.js")}({"./node_modules/css-loader/dist/runtime/api.js":
/*!*****************************************************!*\
!*** ./node_modules/css-loader/dist/runtime/api.js ***!
\*****************************************************/
/*! no static exports found */function(module,exports,__webpack_require__){"use strict";eval('/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/ // css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports=function(useSourceMap){var list=[];// return the list of modules as css string\nlist.toString=function toString(){return this.map(function(item){var content=cssWithMappingToString(item,useSourceMap);if(item[2]){return"@media ".concat(item[2]," {").concat(content,"}");}return content;}).join(\'\');};// import a list of modules into the list\n// eslint-disable-next-line func-names\nlist.i=function(modules,mediaQuery,dedupe){if(typeof modules===\'string\'){// eslint-disable-next-line no-param-reassign\nmodules=[[null,modules,\'\']];}var alreadyImportedModules={};if(dedupe){for(var i=0;i<this.length;i++){// eslint-disable-next-line prefer-destructuring\nvar id=this[i][0];if(id!=null){alreadyImportedModules[id]=true;}}}for(var _i=0;_i<modules.length;_i++){var item=[].concat(modules[_i]);if(dedupe&&alreadyImportedModules[item[0]]){// eslint-disable-next-line no-continue\ncontinue;}if(mediaQuery){if(!item[2]){item[2]=mediaQuery;}else{item[2]="".concat(mediaQuery," and ").concat(item[2]);}}list.push(item);}};return list;};function cssWithMappingToString(item,useSourceMap){var content=item[1]||\'\';// eslint-disable-next-line prefer-destructuring\nvar cssMapping=item[3];if(!cssMapping){return content;}if(useSourceMap&&typeof btoa===\'function\'){var sourceMapping=toComment(cssMapping);var sourceURLs=cssMapping.sources.map(function(source){return"/*# sourceURL=".concat(cssMapping.sourceRoot||\'\').concat(source," */");});return[content].concat(sourceURLs).concat([sourceMapping]).join(\'\\n\');}return[content].join(\'\\n\');}// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap){// eslint-disable-next-line no-undef\nvar base64=btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));var data="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);return"/*# ".concat(data," */");}\n\n//# sourceURL=webpack://AudioTrackSelector/./node_modules/css-loader/dist/runtime/api.js?')},"./src/main.js":
/*!*********************!*\
!*** ./src/main.js ***!
\*********************/
/*! exports provided: default */function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return AudioTrackSelector; });\n/* harmony import */ var clappr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! clappr */ \"clappr\");\n/* harmony import */ var clappr__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(clappr__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./public/audio-track-selector.html */ \"./src/public/audio-track-selector.html\");\n/* harmony import */ var _public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _public_style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./public/style.scss */ \"./src/public/style.scss\");\n/* harmony import */ var _public_style_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_public_style_scss__WEBPACK_IMPORTED_MODULE_2__);\nclass AudioTrackSelector extends clappr__WEBPACK_IMPORTED_MODULE_0__[\"UICorePlugin\"]{static get version(){return VERSION;}get name(){return'audio_track_selector';}get template(){return Object(clappr__WEBPACK_IMPORTED_MODULE_0__[\"template\"])(_public_audio_track_selector_html__WEBPACK_IMPORTED_MODULE_1___default.a);}get attributes(){return{'class':this.name,'data-audio-track-selector':''};}get events(){return{'click [data-audio-track-selector-lang]':'handleLanguageSelect','click [data-audio-track-selector-button]':'handleAudioTrackSelectorClick'};}get container(){return this.core.activeContainer?this.core.activeContainer:this.core.mediaControl.container;}get playback(){return this.core.activePlayback?this.core.activePlayback:this.core.getCurrentPlayback();}bindEvents(){if(clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].CORE_ACTIVE_CONTAINER_CHANGED)this.listenTo(this.core,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].CORE_ACTIVE_CONTAINER_CHANGED,this.reload);else this.listenTo(this.core.mediaControl,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].MEDIACONTROL_CONTAINERCHANGED,this.reload);this.listenTo(this.core,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].CORE_READY,this.bindPlaybackEvents);this.listenTo(this.core.mediaControl,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].MEDIACONTROL_RENDERED,this.render);this.listenTo(this.core.mediaControl,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].MEDIACONTROL_HIDE,this._hideContextMenu);}bindPlaybackEvents(){this.listenTo(this.playback,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].PLAYBACK_LEVELS_AVAILABLE,this._handleLevels);this.listenTo(this.playback,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].PLAYBACK_BITRATE,this._handleAdaptation);this.listenTo(this.playback,clappr__WEBPACK_IMPORTED_MODULE_0__[\"Events\"].PLAYBACK_PLAY,this._handlePlay);}reload(){this.stopListening();this.bindEvents();this.bindPlaybackEvents();}shouldRender(){if(!this.container)return false;if(!this.playback)return false;// Only display if we have at least 2 languages to choose from\nvar hasChoice=!!(this.languages&&this.languages.size>1);return hasChoice;}render(){if(this.shouldRender()){var style=clappr__WEBPACK_IMPORTED_MODULE_0__[\"Styler\"].getStyleFor(_public_style_scss__WEBPACK_IMPORTED_MODULE_2___default.a,{baseUrl:this.core.options.baseUrl});this.$el.html(this.template({'title':this._getTitle(),'languages':this.languages}));this.$el.append(style);this.core.mediaControl.$('.media-control-right-panel').append(this.el);this._highlightCurrentElement();}return this;}_setLanguage(language){console.log(\"setLanguage\",language);// custom voc dash-shaka-playback\nif(this.playback.selectAudioLanguage){this.nextLanguage=language;this.playback.selectAudioLanguage(language);// hlsjs playback\n}else if(this.playback._hls){// hlsjs may have multiple audiotracks with the same language\n// this will just switch to the first one\nconst track=this.playback._hls.audioTracks.find(track=>track.lang==language||track.name===language);if(!track)return;this.playback._hls.audioTrack=track.id;this.activeLanguage=language;this._highlightCurrentElement();// html5 track change\n}else if(this.playback.el.audioTracks){// also just selects the first track matching the label\nconst audioTracks=[...this.playback.el.audioTracks];const track=audioTracks.find(track=>track.language==language||track.label===language);if(!track)return;track.enabled=true;this.activeLanguage=language;this._highlightCurrentElement();}}_fillLanguages(){// custom voc dash-shaka-playback\nif(this.playback.audioLanguages){this.languages=new Set(this.playback.audioLanguages);// hlsjs playback\n}else if(this.playback._hls){const audioTracks=this.playback._hls.audioTracks;const currentId=this.playback._hls.audioTrack;const current=audioTracks.find(track=>track.id==currentId);this.languages=new Set(audioTracks.map(track=>track.lang||track.name));if(current){this.activeLanguage=current.lang||current.name;}// native playback\n}else if(this.playback.el.audioTracks){const audioTracks=[...this.playback.el.audioTracks];const current=audioTracks.find(track=>track.enabled);this.languages=new Set(audioTracks.map(track=>track.language||track.label));if(current){this.activeLanguage=current.language||current.label;}}this.render();}handleLanguageSelect(event){event.preventDefault();event.stopPropagation();const selected=event.target.dataset.audioTrackSelectorLang;if(this.activeLanguage==selected)return false;this._setLanguage(selected);this._toggleContextMenu();return false;}// Handles adaptation event from shaka-playback\n_handleAdaptation(variant){if(variant.language){this.activeLanguage=variant.language;this._highlightCurrentElement();}}// shaka-playback knows languages on level event\n_handleLevels(){this._fillLanguages();}// hlsjs-playback and html5video-playback only know languages on play\n_handlePlay(){if(this.playback._hls||this.playback instanceof clappr__WEBPACK_IMPORTED_MODULE_0__[\"HTML5Video\"]){this._fillLanguages();}}handleAudioTrackSelectorClick(event){this._toggleContextMenu();}_toggleContextMenu(){this.$('.audio_track_selector ul').toggle();}_hideContextMenu(){this.$('.audio_track_selector ul').hide();}_getLanguageElement(language=null){if(language)return this.$('.audio_track_selector a[data-audio-track-selector-lang=\"'+language+'\"]').parent();else return this.$('.audio_track_selector a').parent();}_getButtonElement(){return this.$('.audio_track_selector button');}_getTitle(){return(this.core.options.audioTrackSelectorConfig||{}).title;}_highlightCurrentElement(){if(!this.activeLanguage)return;this._getLanguageElement().removeClass('current');this._getLanguageElement(this.activeLanguage).addClass('current');this._getButtonElement().text(this.activeLanguage);}}\n\n//# sourceURL=webpack://AudioTrackSelector/./src/main.js?")},"./src/public/audio-track-selector.html":
/*!**********************************************!*\
!*** ./src/public/audio-track-selector.html ***!
\**********************************************/
/*! no static exports found */function(module,exports){eval('// Module\nvar code = "<button data-audio-track-selector-button>\\n Language\\n</button>\\n<ul>\\n <% if (title) { %>\\n <li data-title><%= title %></li>\\n <% }; %>\\n <% languages.forEach((language) => { %>\\n <li><a href=\\"#\\" data-audio-track-selector-lang=\\"<%= language %>\\"><%= language %></a></li>\\n <% }); %>\\n</ul>\\n";\n// Exports\nmodule.exports = code;\n\n//# sourceURL=webpack://AudioTrackSelector/./src/public/audio-track-selector.html?')},"./src/public/style.scss":
/*!*******************************!*\
!*** ./src/public/style.scss ***!
\*******************************/
/*! no static exports found */function(module,exports,__webpack_require__){eval('// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, ".audio_track_selector[data-audio-track-selector] {\\n float: right;\\n height: 100%;\\n position: relative; }\\n .audio_track_selector[data-audio-track-selector] button {\\n background-color: transparent;\\n color: #fff;\\n font-family: Roboto,\\"Open Sans\\",Arial,sans-serif;\\n -webkit-font-smoothing: antialiased;\\n border: none;\\n font-size: 12px;\\n height: 100%; }\\n .audio_track_selector[data-audio-track-selector] button:hover {\\n color: #c9c9c9; }\\n .audio_track_selector[data-audio-track-selector] button.changing {\\n -webkit-animation: pulse 0.5s infinite alternate; }\\n .audio_track_selector[data-audio-track-selector] > ul {\\n overflow-x: hidden;\\n overflow-y: auto;\\n list-style-type: none;\\n position: absolute;\\n bottom: 100%;\\n display: none;\\n background-color: rgba(28, 28, 28, 0.9);\\n white-space: nowrap; }\\n .audio_track_selector[data-audio-track-selector] li {\\n font-size: 12px;\\n color: #eee; }\\n .audio_track_selector[data-audio-track-selector] li[data-title] {\\n background-color: #333;\\n padding: 8px 25px; }\\n .audio_track_selector[data-audio-track-selector] li a {\\n color: #eee;\\n padding: 5px 18px;\\n display: block;\\n text-decoration: none; }\\n .audio_track_selector[data-audio-track-selector] li a:hover {\\n background-color: rgba(255, 255, 255, 0.1);\\n color: #fff; }\\n .audio_track_selector[data-audio-track-selector] li a:hover a {\\n color: #fff;\\n text-decoration: none; }\\n .audio_track_selector[data-audio-track-selector] li.current a {\\n color: #2ecc71; }\\n\\n@-webkit-keyframes pulse {\\n 0% {\\n color: #fff; }\\n 50% {\\n color: #ff0101; }\\n 100% {\\n color: #B80000; } }\\n", ""]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack://AudioTrackSelector/./src/public/style.scss?')},clappr:
/*!******************************************************************************************!*\
!*** external {"amd":"clappr","commonjs":"clappr","commonjs2":"clappr","root":"Clappr"} ***!
\******************************************************************************************/
/*! no static exports found */function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_clappr__;\n\n//# sourceURL=webpack://AudioTrackSelector/external_%7B%22amd%22:%22clappr%22,%22commonjs%22:%22clappr%22,%22commonjs2%22:%22clappr%22,%22root%22:%22Clappr%22%7D?")}}).default},module.exports=factory(__webpack_require__(0))},function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){var t=r(e,4),n=t[1],i=t[3];if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),s="/*# ".concat(o," */"),l=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[n].concat(l).concat([s]).join("\n")}return[n].join("\n")}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){var r=n(7),i=n(8);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={insert:"head",singleton:!1};r(i,a);e.exports=i.locals||{}},function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function s(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],i=0;i<e.length;i++){var a=e[i],l=t.base?a[0]+t.base:a[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var d=s(c),f={css:a[1],media:a[2],sourceMap:a[3]};-1!==d?(o[d].references++,o[d].updater(f)):o.push({identifier:c,updater:g(f,t),references:1}),r.push(c)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=a(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function f(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function h(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,m=0;function g(e,t){var n,r,i;if(t.singleton){var a=m++;n=p||(p=u(t)),r=f.bind(null,n,a,!1),i=f.bind(null,n,a,!0)}else n=u(t),r=h.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=s(n[r]);o[i].references--}for(var a=l(e,t),u=0;u<n.length;u++){var c=s(n[u]);0===o[c].references&&(o[c].updater(),o.splice(c,1))}n=a}}}},function(e,t,n){"use strict";n.r(t);var r=n(4),i=n.n(r),a=n(5),o=n.n(a)()(i.a);o.push([e.i,"button.media-control-button[data-hd-indicator]{display:none !important}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar]{height:40px}.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar]{height:2px;background-color:#ccc}.player-poster[data-poster] .play-wrapper[data-poster] svg path{fill:#ccc}.spinner-three-bounce[data-spinner]>div{background-color:#ccc}.clappr-watermark[data-watermark]{transition:opacity .5s ease-out;width:8%;min-width:50px;max-width:100px}.clappr-watermark[data-watermark].clappr-watermark-hide{opacity:0}.clappr-watermark[data-watermark-top-left]{top:0px;left:15px;text-align:left}@media(min-width: 768px){.clappr-watermark[data-watermark-top-left]{top:10px;left:30px}}","",{version:3,sources:["webpack://./src/public/style.scss"],names:[],mappings:"AAAA,+CACC,uBAAA,CAGD,oGACC,WAAA,CAGD,kIACC,UAAA,CACA,qBAAA,CAID,gEACC,SAAA,CAID,wCACC,qBAAA,CAID,kCACC,+BAAA,CACA,QAAA,CACA,cAAA,CACA,eAAA,CACA,wDACC,SAAA,CAIF,2CACC,OAAA,CACA,SAAA,CACA,eAAA,CAEA,yBALD,2CAME,QAAA,CACA,SAAA,CAAA",sourcesContent:["button.media-control-button[data-hd-indicator] {\r\n\tdisplay: none !important;\r\n}\r\n\r\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] {\r\n\theight: 40px;\r\n}\r\n\r\n.media-control[data-media-control] .media-control-layer[data-controls] .bar-container[data-seekbar] .bar-background[data-seekbar] {\r\n\theight: 2px;\r\n\tbackground-color: #ccc;\r\n}\r\n\r\n// Change play button color from #FFF to grey.\r\n.player-poster[data-poster] .play-wrapper[data-poster] svg path {\r\n\tfill: #ccc;\r\n}\r\n\r\n// Change loading indicator color from #FFF to grey.\r\n.spinner-three-bounce[data-spinner] > div {\r\n\tbackground-color: #ccc;\r\n}\r\n\r\n// Fade out watermark with media control\r\n.clappr-watermark[data-watermark] {\r\n\ttransition: opacity 0.5s ease-out;\r\n\twidth: 8%;\r\n\tmin-width: 50px;\r\n\tmax-width: 100px;\r\n\t&.clappr-watermark-hide{\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n\r\n.clappr-watermark[data-watermark-top-left]{\r\n\ttop: 0px;\r\n\tleft: 15px;\r\n\ttext-align: left;\r\n\r\n\t@media (min-width: 768px) {\r\n\t\ttop: 10px;\r\n\t\tleft: 30px;\r\n\t}\r\n}"],sourceRoot:""}]),t.default=o},function(e,t,n){"use strict";n.r(t),n.d(t,"Player",(function(){return O})),n.d(t,"Mediator",(function(){return r.Mediator})),n.d(t,"Events",(function(){return r.Events})),n.d(t,"Browser",(function(){return r.Browser})),n.d(t,"PlayerInfo",(function(){return r.PlayerInfo})),n.d(t,"MediaControl",(function(){return r.MediaControl})),n.d(t,"ContainerPlugin",(function(){return r.ContainerPlugin})),n.d(t,"UIContainerPlugin",(function(){return r.UIContainerPlugin})),n.d(t,"CorePlugin",(function(){return r.CorePlugin})),n.d(t,"UICorePlugin",(function(){return r.UICorePlugin})),n.d(t,"Playback",(function(){return r.Playback})),n.d(t,"Container",(function(){return r.Container})),n.d(t,"Core",(function(){return r.Core})),n.d(t,"PlayerError",(function(){return r.PlayerError})),n.d(t,"Loader",(function(){return r.Loader})),n.d(t,"BaseObject",(function(){return r.BaseObject})),n.d(t,"UIObject",(function(){return r.UIObject})),n.d(t,"Utils",(function(){return r.Utils})),n.d(t,"BaseFlashPlayback",(function(){return r.BaseFlashPlayback})),n.d(t,"Flash",(function(){return r.Flash})),n.d(t,"FlasHLS",(function(){return r.FlasHLS})),n.d(t,"HLS",(function(){return r.HLS})),n.d(t,"HTML5Audio",(function(){return r.HTML5Audio})),n.d(t,"HTML5Video",(function(){return r.HTML5Video})),n.d(t,"HTMLImg",(function(){return r.HTMLImg})),n.d(t,"NoOp",(function(){return r.NoOp})),n.d(t,"ClickToPausePlugin",(function(){return r.ClickToPausePlugin})),n.d(t,"DVRControls",(function(){return r.DVRControls})),n.d(t,"Favicon",(function(){return r.Favicon})),n.d(t,"Log",(function(){return r.Log})),n.d(t,"Poster",(function(){return r.Poster})),n.d(t,"SpinnerThreeBouncePlugin",(function(){return r.SpinnerThreeBouncePlugin})),n.d(t,"WaterMarkPlugin",(function(){return r.WaterMarkPlugin})),n.d(t,"Styler",(function(){return r.Styler})),n.d(t,"Vendor",(function(){return r.Vendor})),n.d(t,"version",(function(){return r.version})),n.d(t,"template",(function(){return r.template})),n.d(t,"$",(function(){return r.$}));var r=n(0),i=n.n(r),a=n(1),o=n.n(a),s=n(2),l=n.n(s),u=n(3),c=n.n(u);n(6);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(n,e);var t=g(n);function n(){var e;f(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).timeout=1,e.max_timeout=10,e}return p(n,[{key:"name",get:function(){return"error_plugin"}},{key:"background",get:function(){return"data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100%22%20height%3D%22100%22%20viewBox%3D%220%200%2026.458318%2026.458333%22%3E%3Cpath%20d%3D%22M13.23.302C6.07.302.264%206.107.264%2013.267a12.965%2012.965%200%200%200%20.847%204.595c.19-.497.408-.982.682-1.438.14-.232.294-.457.396-.707.103-.25.15-.533.072-.792a1.362%201.362%200%200%200-.22-.404c-.092-.123-.192-.24-.275-.37a1.662%201.662%200%200%201-.255-1.12%201.5%201.5%200%200%201%20.58-.987c.28-.208.635-.3.985-.288a1.757%201.757%200%200%201%20.346.048c.452.11.852.393%201.148.75.368.447.584%201.01.637%201.586a3.574%203.574%200%200%201-.275%201.693c-.4.955-1.15%201.725-1.565%202.673-.338.775-.435%201.638-.39%202.483.007.077.018.155.025.234a12.965%2012.965%200%200%200%203.62%203.18%2017.63%2017.63%200%200%201-.13-2.11c.002-.56.03-1.12.085-1.675-.34-.236-.65-.51-.87-.86-.392-.62-.466-1.408-.305-2.124.16-.717.54-1.37.997-1.945a7.833%207.833%200%200%201%202.835-2.223%2010.305%2010.305%200%200%201-.09-.126%204.854%204.854%200%200%201-.702-2.176c-.06-.777.064-1.554.115-2.33.037-.543.04-1.085.07-1.627.038-.627.114-1.255.29-1.858a2.36%202.36%200%200%201%20.266-.63%201.4%201.4%200%200%201%20.594-.514c.274-.108.51-.132.776-.087.22.046.425.156.604.294.18.138.335.304.48.477a7.298%207.298%200%200%201%201.04%201.617%203.57%203.57%200%200%201%201.09%200%207.287%207.287%200%200%201%201.04-1.616%203.21%203.21%200%200%201%20.48-.476c.18-.14.383-.248.604-.295a1.268%201.268%200%200%201%20.78.086%201.402%201.402%200%200%201%20.595.517c.124.19.202.408.266.626.175.602.252%201.23.29%201.856.03.543.033%201.087.07%201.628.05.777.175%201.554.116%202.33a4.855%204.855%200%200%201-.705%202.178c-.03.05-.07.096-.103.145.247.278.598.513.898.614a1.956%201.956%200%200%200%201.05.044%201.65%201.65%200%200%200%20.533-.226%201.253%201.253%200%200%200%20.397-.418c.118-.21.166-.45.192-.687.067-.61%200-1.224-.05-1.835-.034-.396-.062-.8.027-1.187.06-.26.177-.518.373-.7a1.106%201.106%200%200%201%20.465-.255%201.312%201.312%200%200%201%20.53-.03c.38.057.736.274.948.594.12.18.194.39.238.604.044.213.06.43.072.648.04.76.04%201.522.018%202.284-.018.665-.055%201.348-.32%201.957-.343.782-1.032%201.366-1.775%201.786a7.052%207.052%200%200%201-1.588.647c.482%201.54.733%203.24.733%204.968a17.6%2017.6%200%200%201-.135%202.125%2012.964%2012.964%200%200%200%206.384-11.152c0-7.16-5.806-12.965-12.965-12.965zM9.602%2016.284v1.483a1.88%201.88%200%200%201%201.083.362%201.738%201.738%200%200%201%20.556.68c.122.27.166.576.116.868a1.493%201.493%200%200%201-.332.708%201.647%201.647%200%200%201-.635.458%201.738%201.738%200%200%201-.787.122v3.73l7.762-4.208-7.762-4.204z%22%20fill%3D%22%23999%22%2F%3E%3C%2Fsvg%3E"}}]),p(n,[{key:"bindEvents",value:function(){this.listenTo(this.container,i.a.Events.CONTAINER_ERROR,this.onError)}},{key:"hide",value:function(){this._err&&this._err.remove()}},{key:"show",value:function(e){var t=i.a.$;this.hide();var n=e&&e.title||"Oh no, we encountered an error",r=e&&e.subtitle||"Please reload the page";this._err=t("<div>").css({position:"absolute","z-index":"999",width:"100%",height:"100%","background-image":"url("+this.background+")","background-size":"18%","background-repeat":"no-repeat","background-color":"black","background-position":"center","text-align":"center","font-weight":"bold",color:"#eee"});var a=t("<div>").css({position:"absolute",width:"100%","padding-bottom":"5%",bottom:0}).append(t("<h2>").text(n).css({"font-size":"2em"})).append(t("<p>").text(r).css({"font-size":"1.2em",margin:"15px"}));this._err.append(a),this.container&&this.container.$el.prepend(this._err)}},{key:"onError",value:function(e){var t=this;if(this.container){var n=this.options.errorPlugin.onError,r=null;n&&"function"==typeof n&&(r=n(e,(function(){t.hide(),t.container.getPlugin("click_to_pause").enable()}))),this.show(r),this.container.getPlugin("click_to_pause").disable()}}}]),n}(i.a.ContainerPlugin);function _(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&null!=e[n]&&t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function A(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(new Headers,t.replace(/\s+/g," ")),i=_({query:r,operation:e,variables:JSON.stringify(n)});return fetch("https://media.ccc.de/graphql?".concat(i),{method:"GET",headers:{Accept:"application/json"}}).then((function(e){var t=e.body.getReader(),n="",r=new TextDecoder("utf-8");return t.read().then((function e(i){var a=i.done,o=i.value;return a?JSON.parse(n):(n+=r.decode(o),t.read().then(e))}))}))}("LectureBySlug","\n query LectureBySlug($slug: ID!) {\n lecture: lectureBySlug(slug: $slug) {\n originalLanguage\n timelens { thumbnailsUrl, timelineUrl }\n videos { label, source: url, mimeType }\n images { posterUrl }\n relive\n playerConfig\n }\n }\n ",{slug:e}).then((function(e){if(!e.data.lecture)throw new Error("Lecture could not be found");return e.data.lecture}))}var E=function(e,t,n,r,i){var a="MediaSource"in window,o={poster:"//cdn.c3voc.de/thumbnail/".concat(e,"/poster.jpeg"),levelSelectorConfig:{labelCallback:function(e){var t=e.videoBandwidth||e.level.bitrate;return t<=1e5?"Slides":t<=8e5?"SD":t<=5e6?"HD":"Source"},title:"Quality"},disableErrorScreen:!0,errorPlugin:{onError:i},vocConfigUpdate:function(t){if("visible"===document.visibilityState&&!t.isPlaying()){var n,r="//cdn.c3voc.de/thumbnail/".concat(e,"/poster.jpeg?t=").concat(Date.now());(n=r,new Promise((function(e,t){var r=new Image;r.onload=function(){e()},r.onerror=function(){t()},r.src=n}))).then((function(){t.configure({poster:r})}))}}};return!(-1!=navigator.userAgent.indexOf("Firefox"))&&!n&&a&&MediaSource.isTypeSupported('video/webm; codecs="vp9,opus"')?(o.source={source:"//cdn.c3voc.de/dash/".concat(e,"/manifest.mpd")},o.shakaConfiguration={preferredAudioLanguage:r,abr:{defaultBandwidthEstimate:1e6},streaming:{jumpLargeGaps:!0},manifest:{dash:{defaultPresentationDelay:3,ignoreSuggestedPresentationDelay:!0}}}):t||!a&&""==document.createElement("video").canPlayType("application/vnd.apple.mpegURL")?o.source=t?{source:"//cdn.c3voc.de/".concat(e,"_native.mp3"),mimeType:"audio/mp3"}:{source:"//cdn.c3voc.de/".concat(e,"_native_hd.webm"),mimeType:"video/webm"}:o.source={source:"//cdn.c3voc.de/hls/".concat(e,"/native_hd.m3u8"),mimeType:"application/vnd.apple.mpegURL"},Promise.resolve(o)};function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=I(e);if(t){var i=I(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return R(this,n)}}function R(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?L(e):t}function L(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var P=function(e,t){return"dash_shaka_playback"==e.origin&&(e.raw.code==t||e.raw.detail&&e.raw.detail.code==t)},j=function(e,t){return"hls"==e.origin&&e.raw.response.code==t},O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}(s,e);var t,n,i,a=x(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this)).timeout=5,t.maxTimeout=15,t._playerPromise=t._getConfig(e).then((function(e){return t._options=e,t._player=new r.Player(t._options),t._player.core&&t._player.core.isReady?t._addEventListeners():t.listenToOnce(t._player,r.Events.PLAYER_READY,t._addEventListeners.bind(L(t))),e.vocConfigUpdate&&setInterval((function(){return e.vocConfigUpdate(t._player)}),3e4),t._player})),t}return t=s,(n=[{key:"attachTo",value:function(){var e,t=arguments;(e=console).log.apply(e,["will attach"].concat(Array.prototype.slice.call(arguments))),this._playerPromise.then((function(e){var n;(n=console).log.apply(n,["attach"].concat(w(t))),e.attachTo.apply(e,t)}))}},{key:"_getConfig",value:function(e){var t=[c.a,l.a,o.a,b];e.plugins&&e.plugins.length&&(t=t.concat(e.plugins),console.log("loading plugins"),t.forEach((function(e){return console.log(e.name,e.type)})));var n=Promise.resolve({});return e.vocStream?n=E(e.vocStream,e.audioOnly,e.h264Only,e.preferredAudioLanguage,this._handleError.bind(this)):e.vocLecture&&(n=A(e.vocLecture).then((function(e){var t,n,r,i;return{sources:e.videos||(null===(t=e.relive)||void 0===t?void 0:t.playlistCut)||(null===(n=e.relive)||void 0===n?void 0:n.playlist),poster:null===(r=e.images)||void 0===r?void 0:r.posterUrl,timelens:e.timelens,playback:{externalTracks:null===(i=e.playerConfig)||void 0===i?void 0:i.subtitles},levelSelectorConfig:{labelCallback:function(e,t){console.log("labelCallback",arguments);var n=e.videoBandwidth||e.level.bitrate;return n<=1e5?"Slides":n<=8e5?"SD":"HD"},title:"Quality"}}})).catch((function(e){return console.log("Failed to fetch media sources",e),{playbackNotSupportedMessage:"".concat(e.message)}}))),n.then((function(n){return Object.assign({width:"100%",height:"100%",hideMediaControlDelay:1e3,position:"top-left",watermark:"data:image/svg+xml;utf8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3Csvg%0A%20%20%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%0A%20%20%20xmlns%3Acc%3D%22http%3A%2F%2Fcreativecommons.org%2Fns%23%22%0A%20%20%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%0A%20%20%20xmlns%3Asvg%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20%20id%3D%22svg4568%22%0A%20%20%20version%3D%221.1%22%0A%20%20%20viewBox%3D%220%200%2026.458318%2026.458333%22%0A%20%20%20height%3D%22100%22%0A%20%20%20width%3D%22100%22%3E%0A%20%20%3Cmetadata%0A%20%20%20%20%20id%3D%22metadata4574%22%3E%0A%20%20%20%20%3Crdf%3ARDF%3E%0A%20%20%20%20%20%20%3Ccc%3AWork%0A%20%20%20%20%20%20%20%20%20rdf%3Aabout%3D%22%22%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Aformat%3Eimage%2Fsvg%2Bxml%3C%2Fdc%3Aformat%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atype%0A%20%20%20%20%20%20%20%20%20%20%20rdf%3Aresource%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Fdcmitype%2FStillImage%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atitle%3E%3C%2Fdc%3Atitle%3E%0A%20%20%20%20%20%20%3C%2Fcc%3AWork%3E%0A%20%20%20%20%3C%2Frdf%3ARDF%3E%0A%20%20%3C%2Fmetadata%3E%0A%20%20%3Cdefs%0A%20%20%20%20%20id%3D%22defs4572%22%20%2F%3E%0A%20%20%3Cpath%0A%20%20%20%20%20style%3D%22fill%3A%23ffffff%3Bfill-opacity%3A0.8627451%3Bstroke-width%3A0.79176539%22%0A%20%20%20%20%20id%3D%22path4566%22%0A%20%20%20%20%20d%3D%22m%2012.91039%2C7.1445417%20c%20-5.6690402%2C0%20-10.2660306%2C4.5961993%20-10.2660306%2C10.2652403%20a%2010.265238%2C10.265238%200%200%200%200.6706253%2C3.63816%20c%200.1504354%2C-0.393506%200.3230402%2C-0.777512%200.539984%2C-1.138557%200.1108472%2C-0.18369%200.2327789%2C-0.361837%200.313539%2C-0.559779%200.081551%2C-0.197941%200.1187648%2C-0.42201%200.057007%2C-0.627078%20A%201.0783844%2C1.0783844%200%200%200%204.0513264%2C18.402655%20C%203.9784841%2C18.305267%203.8993075%2C18.212631%203.833591%2C18.109702%20A%201.3159141%2C1.3159141%200%200%201%203.6316909%2C17.222924%201.1876481%2C1.1876481%200%200%201%204.0909148%2C16.441452%20c%200.2216944%2C-0.164688%200.5027709%2C-0.23753%200.7798889%2C-0.228028%20a%201.3911318%2C1.3911318%200%200%201%200.2739508%2C0.03801%20c%200.3578779%2C0.08709%200.6745841%2C0.311164%200.9089467%2C0.593824%200.2913696%2C0.353919%200.462391%2C0.799683%200.5043546%2C1.25574%20a%202.8297696%2C2.8297696%200%200%201%20-0.2177355%2C1.34046%20C%206.0236142%2C20.197593%205.42979%2C20.807252%205.1012074%2C21.557847%204.8335907%2C22.171464%204.7567894%2C22.854758%204.7924189%2C23.5238%20c%200.00554%2C0.06096%200.014251%2C0.122723%200.019794%2C0.185272%20a%2010.265238%2C10.265238%200%200%200%202.866191%2C2.517815%2013.958824%2C13.958824%200%200%201%20-0.1029298%2C-1.670626%20c%200.00161%2C-0.443389%200.023751%2C-0.886777%200.067304%2C-1.326206%20C%207.3735785%2C23.043191%207.1281312%2C22.826248%206.9539421%2C22.54913%206.6435705%2C22.058235%206.5849797%2C21.434324%206.712454%2C20.867421%206.8391365%2C20.299724%207.1400069%2C19.782702%207.5018439%2C19.327437%20A%206.2018984%2C6.2018984%200%200%201%209.7464993%2C17.567343%208.1591425%2C8.1591425%200%200%201%209.6752356%2C17.46758%203.8432293%2C3.8432293%200%200%201%209.1194163%2C15.744698%20c%20-0.047503%2C-0.615201%200.050669%2C-1.230403%200.091055%2C-1.844814%200.02929%2C-0.429928%200.031672%2C-0.859064%200.055423%2C-1.288201%200.030084%2C-0.496437%200.090261%2C-0.993667%200.2296124%2C-1.471101%20a%201.8685664%2C1.8685664%200%200%201%200.21061%2C-0.498812%201.1084716%2C1.1084716%200%200%201%200.4703083%2C-0.406968%20c%200.216945%2C-0.0855%200.403801%2C-0.104512%200.614411%2C-0.06888%200.174189%2C0.03642%200.3365%2C0.123516%200.478227%2C0.232779%200.142518%2C0.109264%200.26524%2C0.240698%200.380047%2C0.377673%20a%205.7783039%2C5.7783039%200%200%201%200.823436%2C1.280285%202.8266025%2C2.8266025%200%200%201%200.863024%2C0%205.7695944%2C5.7695944%200%200%201%200.823436%2C-1.279493%202.5415669%2C2.5415669%200%200%201%200.380047%2C-0.376881%20c%200.142518%2C-0.110847%200.303246%2C-0.196358%200.478227%2C-0.23357%20a%201.0039585%2C1.0039585%200%200%201%200.617577%2C0.06809%201.1100551%2C1.1100551%200%200%201%200.4711%2C0.409343%20c%200.09818%2C0.150436%200.159936%2C0.323041%200.21061%2C0.495645%200.138558%2C0.476643%200.199525%2C0.973872%200.229612%2C1.469517%200.02375%2C0.429928%200.02612%2C0.860649%200.05542%2C1.288995%200.0396%2C0.615201%200.138559%2C1.230403%200.09185%2C1.844813%20a%203.844021%2C3.844021%200%200%201%20-0.558194%2C1.724465%20c%20-0.02375%2C0.0396%20-0.05542%2C0.076%20-0.08154%2C0.114805%200.195565%2C0.220111%200.473476%2C0.406176%200.711006%2C0.486144%20a%201.5486932%2C1.5486932%200%200%200%200.831353%2C0.03484%201.3064129%2C1.3064129%200%200%200%200.42201%2C-0.17894%200.99208205%2C0.99208205%200%200%200%200.314331%2C-0.330957%20c%200.09343%2C-0.166272%200.131433%2C-0.356295%200.152019%2C-0.543944%200.05305%2C-0.482977%200%2C-0.96912%20-0.0396%2C-1.452889%20-0.02692%2C-0.313539%20-0.04909%2C-0.633412%200.02138%2C-0.939826%200.0475%2C-0.205858%200.140142%2C-0.410133%200.295328%2C-0.554235%20a%200.87569253%2C0.87569253%200%200%201%200.36817%2C-0.2019%201.0387963%2C1.0387963%200%200%201%200.419637%2C-0.02375%20c%200.30087%2C0.04514%200.582739%2C0.216942%200.750593%2C0.470308%200.09502%2C0.142517%200.153603%2C0.308788%200.18844%2C0.478226%200.03484%2C0.168646%200.0475%2C0.340459%200.05701%2C0.513064%200.03167%2C0.601741%200.03167%2C1.205067%200.01426%2C1.808392%20-0.01426%2C0.526524%20-0.04355%2C1.0673%20-0.253366%2C1.549486%20-0.271575%2C0.619159%20-0.817101%2C1.08155%20-1.405383%2C1.414092%20a%205.5835296%2C5.5835296%200%200%201%20-1.257323%2C0.512272%20c%200.38163%2C1.219319%200.580363%2C2.56532%200.580363%2C3.93349%20a%2013.935071%2C13.935071%200%200%201%20-0.106901%2C1.682498%2010.264446%2C10.264446%200%200%200%205.054631%2C-8.829768%20c%200%2C-5.669041%20-4.59699%2C-10.2652391%20-10.265238%2C-10.2652391%20z%20M%2010.037865%2C19.798537%20v%201.174188%20a%201.488519%2C1.488519%200%200%201%200.857482%2C0.286619%201.3760882%2C1.3760882%200%200%201%200.440222%2C0.538402%20c%200.0966%2C0.213775%200.131432%2C0.456056%200.09184%2C0.687252%20a%201.1821057%2C1.1821057%200%200%201%20-0.262867%2C0.560568%201.3040376%2C1.3040376%200%200%201%20-0.502772%2C0.36263%201.3760882%2C1.3760882%200%200%201%20-0.623119%2C0.0966%20v%202.953287%20l%206.145683%2C-3.33175%20-6.145683%2C-3.328583%20z%22%20%2F%3E%0A%3C%2Fsvg%3E",watermarkLink:"https://c3voc.de",levelSelectorConfig:{labelCallback:function(e){var t="unknown";return e.height?t=e.height:e.level&&e.level.height&&(t=e.level.height),t+"p"},title:"Quality"},audioTrackSelectorConfig:{title:"Language"}},n,e,{plugins:t})}))}},{key:"_containerChanged",value:function(){this.stopListening(),this._addEventListeners()}},{key:"_addEventListeners",value:function(){var e=this._player.core;this._container=e.activeContainer,this.listenTo(this._player,r.Events.PLAYER_PLAY,this._handlePlay),this.listenTo(this._player,r.Events.PLAYER_STOP,this._handleStop),this.listenTo(e,r.Events.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged),this.listenTo(this._container,r.Events.CONTAINER_STATE_BUFFERFULL,this._handleBufferFull),this.listenTo(this._container,r.Events.CONTAINER_MEDIACONTROL_HIDE,this._handleMediaControlHide),this.listenTo(this._container,r.Events.CONTAINER_MEDIACONTROL_SHOW,this._handleMediaControlShow)}},{key:"_handleMediaControlHide",value:function(){this._container.$el.find(".clappr-watermark[data-watermark]").addClass("clappr-watermark-hide")}},{key:"_handleMediaControlShow",value:function(){this._container.$el.find(".clappr-watermark[data-watermark]").removeClass("clappr-watermark-hide")}},{key:"_getTimeout",value:function(){var e=.6*this.timeout+.4*this.timeout*Math.random();return this.timeout=Math.min(2*this.timeout,this.maxTimeout),e}},{key:"_resetTimeout",value:function(){this.timeout=5}},{key:"_handleError",value:function(e,t){this._recovery?clearTimeout(this._recovery.timeout):this._player.stop();var n=this._getTimeout();return console.log("got error",e,"retrying in ".concat(Math.round(n),"s")),this._recovery={clearOverlay:t,state:"restarting",timeout:setTimeout(this._waitForMedia.bind(this),1e3*n)},P(e,1001)||j(e,404)?{title:"Stream is offline",subtitle:"We will be right back"}:P(e,1002)||j(0)?{title:"A network error ocurred",subtitle:"Please check your internet connection"}:{title:"Oh no, an unknown error occured",subtitle:"Please try reloading the page"}}},{key:"_handlePlay",value:function(){this._recovery&&(console.log("soft recovery: play"),this._recovery.clearOverlay(),clearTimeout(this._recovery.timeout),this._recovery=null),this._resetTimeout()}},{key:"_handleStop",value:function(e){this._recovery&&this._container&&(console.log("soft recovery: stop"),this._container.playback.play.call(this._container.playback))}},{key:"_handleBufferFull",value:function(){if(this._recovery&&"live"==this._container.playback.getPlaybackType()){console.log("seeking to end for recovery");var e=Math.max(this._player.getDuration()-6,0);this._player.seek(e)}}},{key:"_handleMediaCheck",value:function(e){if(e)console.log("try playing again, media should be available"),this._player.play();else{var t=this._getTimeout();console.log("test for media failed, retrying in ~".concat(Math.round(t),"s")),setTimeout(this._waitForMedia.bind(this),1e3*t)}}},{key:"_waitForMedia",value:function(){var e=this._player.options.source;e&&e.source&&(e=e.source),"string"==typeof e?function(e,t){if(!t||"function"!=typeof t)throw new Error("Excepted function, got '".concat(t,"'"));var n=new XMLHttpRequest;n.onreadystatechange=function(){this.readyState===XMLHttpRequest.HEADERS_RECEIVED&&(200===this.status?t(!0):t(!1),n.abort())},n.open("GET",e,!0),n.send(null)}(e,this._handleMediaCheck.bind(this)):this.reset()}},{key:"reset",value:function(){console.log("performing hard reset"),this._recovery=null;var e=0==this._player.getVolume();e||this._player.mute(),this._player.configure({source:this._player.options.source,autoPlay:!0}),e||this._player.unmute()}}])&&k(t.prototype,n),i&&k(t,i),s}(r.BaseObject)}])}));
//# sourceMappingURL=player.js.map