text: /*! For license information please see paella-basic-plugins.js.LICENSE.txt */
  !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["paella-basic-plugins"]=e():t["paella-basic-plugins"]=e()}(self,(function(){return(()=>{var t={775:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>l});var n=r(622);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(f,t);var e,r,n,i,l=(n=f,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=c(n);if(i){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return u(this,t)});function f(){return o(this,f),l.apply(this,arguments)}return e=f,(r=[{key:"moduleName",get:function(){return"paella-basic-plugins"}},{key:"moduleVersion",get:function(){return"1.0.6"}}])&&a(e.prototype,r),f}(n.PluginModule)},252:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(622),i=r(998),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},f(t,e,r||t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(A,t);var e,r,n,i,a,s,v,g,m,y,b=(m=A,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=p(m);if(y){var r=p(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return d(this,t)});function A(){return c(this,A),b.apply(this,arguments)}return e=A,r=[{key:"getAriaLabel",value:function(){return"Select the active audio track"}},{key:"getDescription",value:function(){return this.getAriaLabel()}},{key:"isEnabled",value:(g=u(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f(p(A.prototype),"isEnabled",this).call(this);case 2:if(t.sent){t.next=4;break}return t.abrupt("return",!1);case 4:return t.next=6,this.player.videoContainer.streamProvider.getAudioTracks();case 6:return e=t.sent,t.abrupt("return",(null==e?void 0:e.length)>1);case 8:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"load",value:(v=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.icon=o(),t.next=3,this.player.videoContainer.streamProvider.getAudioTracks();case 3:return this._audioTracks=t.sent,t.next=6,this.updateAudioLabel();case 6:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"getMenu",value:(s=u(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player.videoContainer.streamProvider.currentAudioTrack,r=this._audioTracks.map((function(t){return{id:t.id,title:t.name||t.language,data:t,selected:t===e}})),t.abrupt("return",r);case 3:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"updateAudioLabel",value:(a=u(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.player.videoContainer.streamProvider.currentAudioTrack,this.title=e.language;case 2:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"itemSelected",value:(i=u(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.streamProvider.setCurrentAudioTrack(e.data);case 2:this.updateAudioLabel();case 3:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"getDictionaries",value:(n=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Select the active audio track":"Seleccionar la pista de audio activa"}});case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}],r&&l(e.prototype,r),A}(n.MenuButtonPlugin)},925:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>p});var n=r(622),i=r(842),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(g,t);var e,r,n,i,a,s,p,v=(s=g,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=d(s);if(p){var r=d(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return h(this,t)});function g(){return c(this,g),v.apply(this,arguments)}return e=g,r=[{key:"getAriaLabel",value:function(){return"Backward 30 seconds"}},{key:"getDescription",value:function(){return this.getAriaLabel()}},{key:"getDictionaries",value:(a=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Backward 30 seconds":"Volver hacia atrás 30 segundos"}});case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"load",value:(i=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=o();case 1:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"action",value:(n=u(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.currentTime();case 2:e=t.sent,this.player.videoContainer.setCurrentTime(e-30);case 4:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],r&&l(e.prototype,r),g}(n.ButtonPlugin)},460:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>p});var n=r(622),i=r(380),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(m,t);var e,r,i,a,s,p,v,g=(p=m,v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=d(p);if(v){var r=d(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return h(this,t)});function m(){return c(this,m),g.apply(this,arguments)}return e=m,r=[{key:"getAriaLabel",value:function(){return"Select captions"}},{key:"getDescription",value:function(){return this.getAriaLabel()}},{key:"getDictionaries",value:(s=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Select captions":"Seleccionar subtítulos"}});case 1:case"end":return t.stop()}}),t)}))),function(){return s.apply(this,arguments)})},{key:"load",value:(a=u(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=o(),this._captionsCanvas=this.player.captionsCanvas,0==this._captionsCanvas.captions.length&&this.hide(),(0,n.bindEvent)(this.player,n.Events.CAPTIONS_CHANGED,(function(){e._captionsCanvas.captions.length>0&&e.show()}));case 4:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"getMenu",value:(i=u(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[{id:-1,title:"Disabled",index:-1}],this._captionsCanvas.captions.forEach((function(t,r){e.push({id:t.language,title:t.label,index:r})})),t.abrupt("return",e);case 3:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"buttonType",get:function(){return"radio"}},{key:"itemSelected",value:function(t){-1===t.index?this._captionsCanvas.disableCaptions():this._captionsCanvas.enableCaptions({index:t.index})}}],r&&l(e.prototype,r),m}(n.MenuButtonPlugin)},800:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>d});var n=r(622),i=r(770),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function f(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(v,t);var e,r,n,i,a,d,p=(a=v,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=h(a);if(d){var r=h(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return f(this,t)});function v(){return u(this,v),p.apply(this,arguments)}return e=v,r=[{key:"icon",get:function(){return o()}},{key:"action",value:(n=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:alert("Test external plugin");case 1:case"end":return t.stop()}}),t)})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(){return i.apply(this,arguments)})}],r&&c(e.prototype,r),v}(n.ButtonPlugin)},108:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>p});var n=r(622),i=r(271),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(g,t);var e,r,n,i,a,s,p,v=(s=g,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=d(s);if(p){var r=d(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return h(this,t)});function g(){return c(this,g),v.apply(this,arguments)}return e=g,r=[{key:"getAriaLabel",value:function(){return"Forward 30 seconds"}},{key:"getDescription",value:function(){return this.getAriaLabel()}},{key:"getDictionaries",value:(a=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Forward 30 seconds":"Ir hacia adelante 30 segundos"}});case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"load",value:(i=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=o();case 1:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"action",value:(n=u(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.currentTime();case 2:e=t.sent,this.player.videoContainer.setCurrentTime(e+30);case 4:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],r&&l(e.prototype,r),g}(n.ButtonPlugin)},440:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>m});var n=r(622),i=r(643),o=r.n(i),a=r(887),s=r.n(a);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e,r){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},d(t,e,r||t)}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}function v(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(A,t);var e,r,i,a,u,c,m,y,b=(m=A,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=g(m);if(y){var r=g(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return v(this,t)});function A(){return f(this,A),b.apply(this,arguments)}return e=A,r=[{key:"getAriaLabel",value:function(){return"Toggle fullscreen"}},{key:"getDescription",value:function(){return this.getAriaLabel()}},{key:"getDictionaries",value:(c=l(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Toggle fullscreen":"Cambiar modo de pantalla completa"}});case 1:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"isEnabled",value:(u=l(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d(g(A.prototype),"isEnabled",this).call(this);case 2:return e=t.sent,t.abrupt("return",e&&this.player.isFullScreenSupported());case 4:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"load",value:(a=l(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=o(),(0,n.bindEvent)(this.player,n.Events.FULLSCREEN_CHANGED,(function(t){t.status?e.icon=s():e.icon=o()}));case 2:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"action",value:(i=l(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.player.isFullscreen){t.next=5;break}return t.next=3,this.player.exitFullscreen();case 3:t.next=7;break;case 5:return t.next=7,this.player.enterFullscreen();case 7:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})}],r&&h(e.prototype,r),A}(n.ButtonPlugin)},239:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(622),i=r(291),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},f(t,e,r||t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(b,t);var e,r,i,a,s,v,g,m,y=(g=b,m=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=p(g);if(m){var r=p(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return d(this,t)});function b(){return c(this,b),y.apply(this,arguments)}return e=b,r=[{key:"getAriaLabel",value:function(){return"Switch the video layout"}},{key:"getDescription",value:function(){return this.getAriaLabel()}},{key:"getDictionaries",value:(v=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Switch the video layout":"Cambiar la disposición de los vídeos"}});case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"isEnabled",value:(s=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f(p(b.prototype),"isEnabled",this).call(this);case 2:if(t.sent){t.next=4;break}return t.abrupt("return",!1);case 4:return t.abrupt("return",this.player.videoContainer.validContentSettings.length>1);case 5:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"load",value:(a=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=o();case 1:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"getMenu",value:(i=u(regeneratorRuntime.mark((function t(){var e,r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player.videoContainer.validContentSettings,t.t0=Promise,t.next=4,e.map(function(){var t=u(regeneratorRuntime.mark((function t(e){var i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=n.utils.joinPath([r.player.configResourcesUrl,e.icon]),t.next=3,n.utils.loadSvgIcon(i);case 3:return o=t.sent,t.abrupt("return",{id:e.id,title:e.title,icon:o,selected:r.player.videoContainer.layoutId===e.id});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 4:return t.t1=t.sent,t.abrupt("return",t.t0.all.call(t.t0,t.t1));case 6:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"showTitles",get:function(){return!1}},{key:"buttonType",get:function(){return"radio"}},{key:"itemSelected",value:function(t){this.player.videoContainer.setLayout(t.id)}}],r&&l(e.prototype,r),b}(n.MenuButtonPlugin)},540:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>m});var n=r(622),i=r(998),o=r.n(i),a=r(379),s=r.n(a),u=r(473);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function p(t,e){return p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},p(t,e)}function v(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}s()(u.Z,{insert:"head",singleton:!1}),u.Z.locals;var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(y,t);var e,r,i,a,s,u,c,l,m=(c=y,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=g(c);if(l){var r=g(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return v(this,t)});function y(){return h(this,y),m.apply(this,arguments)}return e=y,r=[{key:"getAriaLabel",value:function(){return"Switch the playback speed"}},{key:"getDescription",value:function(){return this.getAriaLabel()}},{key:"getDictionaries",value:(u=f(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Switch the playback speed":"Cambiar la velocidad de reproducción"}});case 1:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},{key:"load",value:(s=f(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=o(),this.title="1x",this._rates=this.config.rates||[.5,.75,1,1.25,1.5,2],this.player.bindEvent(n.Events.PLAYBACK_RATE_CHANGED,(function(t){e.title=t.newPlaybackRate+"x"}));case 4:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"getMenu",value:(a=f(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.playbackRate();case 2:return e=t.sent,r=function(t){return{id:t,title:"".concat(t,"x"),selected:t==e}},t.abrupt("return",this._rates.map((function(t){return r(t)})));case 5:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"titleSize",get:function(){return"small"}},{key:"itemSelected",value:(i=f(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.setPlaybackRate(e.id);case 2:this.title=e.title;case 3:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"buttonType",get:function(){return"radio"}}],r&&d(e.prototype,r),y}(n.MenuButtonPlugin)},135:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(622),i=r(998),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},f(t,e,r||t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(A,t);var e,r,n,i,a,s,v,g,m,y,b=(m=A,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=p(m);if(y){var r=p(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return d(this,t)});function A(){return c(this,A),b.apply(this,arguments)}return e=A,r=[{key:"getAriaLabel",value:function(){return"Select video quality"}},{key:"getDescription",value:function(){return this.getAriaLabel()}},{key:"getDictionaries",value:(g=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Select video quality":"Seleccionar la calidad de reproducción del vídeo"}});case 1:case"end":return t.stop()}}),t)}))),function(){return g.apply(this,arguments)})},{key:"isEnabled",value:(v=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f(p(A.prototype),"isEnabled",this).call(this);case 2:if(t.sent){t.next=4;break}return t.abrupt("return",!1);case 4:return t.next=6,this.player.videoContainer.streamProvider.getQualities();case 6:return this._qualities=t.sent,t.abrupt("return",this._qualities&&this._qualities.length>1);case 8:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"load",value:(s=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.icon=o(),t.next=3,this.updateQualityLabel();case 3:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"getMenu",value:(a=u(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.streamProvider.getCurrentQuality();case 2:return e=t.sent,r=this._qualities.map((function(t){var r=t.index===e.index;return{id:t.index,title:t.label,width:t.res.w,height:t.res.h,data:t,selected:r}})),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"updateQualityLabel",value:(i=u(regeneratorRuntime.mark((function t(){var e,r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=function(){var t=u(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.player.videoContainer.streamProvider.getCurrentQuality();case 2:(n=t.sent)?r.title=n.shortLabel:setTimeout((function(){return e()}),500);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),e();case 2:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"itemSelected",value:(n=u(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.streamProvider.setQuality(e.data);case 2:this.updateQualityLabel();case 3:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"titleSize",get:function(){return"small"}},{key:"buttonType",get:function(){return"radio"}}],r&&l(e.prototype,r),A}(n.MenuButtonPlugin)},459:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>T});var n=r(622),i=r(506),o=r.n(i),a=r(978),s=r.n(a),u=r(704),c=r.n(u),l=r(928),f=r.n(l),h=r(379),d=r.n(h),p=r(405);function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function y(t,e){return y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},y(t,e)}function b(t,e){return!e||"object"!==v(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function E(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function w(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){E(o,n,i,a,s,"next",t)}function s(t){E(o,n,i,a,s,"throw",t)}a(void 0)}))}}function k(){var t=this;this.sliderContainer.innerHTML="";var e=(0,n.createElementWithHtmlText)('\n        <div class="volume-slider">\n            <div class="volume-slider-button"></div>\n        </div>',this.sliderContainer),r=!1,i=e.getElementsByClassName("volume-slider-button")[0];i.style.left="".concat(100*this._prevVolume,"%"),this._sliderButton=i;var o=function(){var e=w(regeneratorRuntime.mark((function e(r){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.sliderContainer.offsetWidth,(i=100*r/n)<10&&(i=0),i>90&&(i=100),i/=100,e.next=8,t.player.videoContainer.setVolume(i);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();this.sliderContainer.addEventListener("mousedown",function(){var t=w(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!0,t.next=3,o(e.offsetX);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),this.sliderContainer.addEventListener("mousemove",function(){var t=w(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=3;break}return t.next=3,o(e.offsetX);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),this.sliderContainer.addEventListener("mouseleave",(function(){r=!1})),this.sliderContainer.addEventListener("mouseup",(function(){r=!1})),this.sliderContainer.style.display="none",(0,n.bindEvent)(this.player,n.Events.VOLUME_CHANGED,(function(e){var r=e.volume;t.updateIcon(r)}))}d()(p.Z,{insert:"head",singleton:!1}),p.Z.locals;var T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(E,t);var e,r,n,i,a,u,l,h,d,p,v=(d=E,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=A(d);if(p){var r=A(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return b(this,t)});function E(){return g(this,E),v.apply(this,arguments)}return e=E,r=[{key:"getAriaLabel",value:function(){return"Change volume"}},{key:"getDescription",value:function(){return this.getAriaLabel()}},{key:"getDictionaries",value:(h=w(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Change volume":"Cambiar el volumen del audio"}});case 1:case"end":return t.stop()}}),t)}))),function(){return h.apply(this,arguments)})},{key:"className",get:function(){return"volume-button"}},{key:"updateIcon",value:(l=w(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=!0,t.next=t.t0===(0===e)?3:t.t0===(e>0&&e<=.3)?5:t.t0===(e>.3&&e<=.6)?7:t.t0===e>.6?9:11;break;case 3:return this.icon=f(),t.abrupt("break",12);case 5:return this.icon=s(),t.abrupt("break",12);case 7:return this.icon=c(),t.abrupt("break",12);case 9:return this.icon=o(),t.abrupt("break",12);case 11:this.icon=o();case 12:this._sliderButton&&(this._sliderButton.style.left="".concat(100*e,"%"));case 13:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"sliderContainer",get:function(){return"left"===this.config.side?this.rightArea:this.leftArea}},{key:"load",value:(u=w(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.volume();case 2:this._prevVolume=t.sent,this.updateIcon(this._prevVolume),k.apply(this);case 5:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"mouseOver",value:(a=w(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e===this.container&&(this.sliderContainer.style.display="inline-block");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"mouseOut",value:(i=w(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e===this.container&&(this.sliderContainer.style.display="none");case 1:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"action",value:(n=w(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.volume();case 2:return e=t.sent,0,r=0===e&&0===this._prevVolume?1:0===e&&this._prevVolume>0?this._prevVolume:0,t.next=7,this.player.videoContainer.setVolume(r);case 7:this._prevVolume=e;case 8:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],r&&m(e.prototype,r),E}(n.ButtonPlugin)},473:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(15),i=r.n(n),o=r(645),a=r.n(o)()(i());a.push([t.id,"span.button-title {\n    margin-top: -16px;\n    display: block;\n    font-size: 8px;\n}\n","",{version:3,sources:["webpack://./src/css/playbackRate.css"],names:[],mappings:"AAAA;IACI,iBAAiB;IACjB,cAAc;IACd,cAAc;AAClB",sourcesContent:["span.button-title {\n    margin-top: -16px;\n    display: block;\n    font-size: 8px;\n}\n"],sourceRoot:""}]);const s=a},405:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(15),i=r.n(n),o=r(645),a=r.n(o)()(i());a.push([t.id,"\n.button-plugin-side-area.volume-button {\n    height: 40px;\n    display: inline-block;\n    vertical-align: middle;\n}\n\n.button-plugin-container {\n    height: 40px;\n}\n\n.volume-slider {\n    width: 100px;\n    height: 4px;\n    background-color: white;\n    display: inline-block;\n    margin-left: 10px;\n    margin-right: 10px;\n    position: relative;\n    border-radius: 8px;\n    margin-bottom: 6px;\n    pointer-events: none;\n}\n\n.volume-slider .volume-slider-button {\n    position: absolute;\n    width: 20px;\n    height: 20px;\n    border-radius: 10px;\n    background-color: white;\n    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0,0.6);\n    top: -8px;\n}","",{version:3,sources:["webpack://./src/css/slider.css"],names:[],mappings:";AACA;IACI,YAAY;IACZ,qBAAqB;IACrB,sBAAsB;AAC1B;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,YAAY;IACZ,WAAW;IACX,uBAAuB;IACvB,qBAAqB;IACrB,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,oBAAoB;AACxB;;AAEA;IACI,kBAAkB;IAClB,WAAW;IACX,YAAY;IACZ,mBAAmB;IACnB,uBAAuB;IACvB,6CAA6C;IAC7C,SAAS;AACb",sourcesContent:["\n.button-plugin-side-area.volume-button {\n    height: 40px;\n    display: inline-block;\n    vertical-align: middle;\n}\n\n.button-plugin-container {\n    height: 40px;\n}\n\n.volume-slider {\n    width: 100px;\n    height: 4px;\n    background-color: white;\n    display: inline-block;\n    margin-left: 10px;\n    margin-right: 10px;\n    position: relative;\n    border-radius: 8px;\n    margin-bottom: 6px;\n    pointer-events: none;\n}\n\n.volume-slider .volume-slider-button {\n    position: absolute;\n    width: 20px;\n    height: 20px;\n    border-radius: 10px;\n    background-color: white;\n    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0,0.6);\n    top: -8px;\n}"],sourceRoot:""}]);const s=a},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var u=[].concat(t[s]);n&&i[u[0]]||(r&&(u[2]?u[2]="".concat(r," and ").concat(u[2]):u[2]=r),e.push(u))}},e}},15:t=>{"use strict";function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}t.exports=function(t){var r,n,i=(n=4,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(r,n)||function(t,r){if(t){if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):void 0}}(r,n)||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.")}()),o=i[1],a=i[3];if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),c="/*# ".concat(u," */"),l=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[o].concat(l).concat([c]).join("\n")}return[o].join("\n")}},622:t=>{self,t.exports=(()=>{var t={1425:(t,e,r)=>{"use strict";r.r(e),r.d(e,{TestVideoCanvas:()=>g,default:()=>m});var n=r(7340);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e,r){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},o(t,e,r||t)}function a(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),t}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}var g=function(t){f(n,t);var e,r=d(n);function n(t,e){return u(this,n),r.call(this,"div",t,e)}return l(n,[{key:"loadCanvas",value:(e=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.parent,e.element.style.width="200%",e.element.style.height="200%",e.element.style.top="-25%",e.element.style.left="-25%",e.element.style.position="absolute",this.element.style.overflow="hidden",this.element.style.position="relative",this.player.log.debug("test video canvas");case 9:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),n}(n.Xz),m=function(t){f(n,t);var e,r=d(n);function n(){return u(this,n),r.apply(this,arguments)}return l(n,[{key:"canvasType",get:function(){return"video"}},{key:"isEnabled",value:(e=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.player.log.debug("TestVideoCanvasPlugin"),t.abrupt("return",o(v(n.prototype),"isEnabled",this).call(this));case 2:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"isCompatible",value:function(t){return!Array.isArray(t.canvas)||0===t.canvas.length||o(v(n.prototype),"isCompatible",this).call(this,stresm)}},{key:"getCanvasInstance",value:function(t){return new g(this.player,t)}}]),n}(n.ZP)},6280:(t,e,r)=>{"use strict";r.r(e),r.d(e,{VideoCanvas:()=>v,default:()=>g});var n=r(7340);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e,r){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},o(t,e,r||t)}function a(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),t}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}var v=function(t){l(i,t);var e,r,n=h(i);function i(t,e){return s(this,i),n.call(this,"div",t,e)}return c(i,[{key:"loadCanvas",value:(e=regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.element.style.width="100%",e.element.style.height="100%";case 2:case"end":return t.stop()}}),t)})),r=function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))},function(t){return r.apply(this,arguments)})}]),i}(n.Xz),g=function(t){l(r,t);var e=h(r);function r(){return s(this,r),e.apply(this,arguments)}return c(r,[{key:"canvasType",get:function(){return"video"}},{key:"isCompatible",value:function(t){return!Array.isArray(t.canvas)||0===t.canvas.length||o(p(r.prototype),"isCompatible",this).call(this,t)}},{key:"getCanvasInstance",value:function(t){return new v(this.player,t)}}]),r}(n.ZP)},7096:(t,e,r)=>{"use strict";r.d(e,{Z:()=>o});var n=r(1401);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";i(this,t),this._cues=[],this._label=e,this._lang=r}var e;return(e=[{key:"cues",get:function(){return this._cues}},{key:"label",get:function(){return this._label},set:function(t){this._label=t}},{key:"language",get:function(){return this._lang},set:function(t){this._lang=t}},{key:"addCue",value:function(t){var e=t.label,r=void 0===e?"":e,i=t.start,o=t.end,a=t.captions,s={label:r};if("string"==typeof a)s.captions=[a];else{if(!Array.isArray(a))throw Error("Invalid cue caption format: must be an array of strings or a string");s.captions=a}if("string"==typeof i)s.start=(0,n.timeToSeconds)(i),s.startString=i;else{if("number"!=typeof i)throw Error("Invalid cue timestamp format: must be a valid time string or a number of seconds");s.start=i,s.startString=(0,n.secondsToTime)(i)}if("string"==typeof o)s.end=(0,n.timeToSeconds)(o),s.endString=o;else{if("number"!=typeof o)throw Error("Invalid cue timestamp format: must be a valid time string or a number of seconds");s.end=o,s.endString=(0,n.secondsToTime)(o)}return this._cues.push(s),s}},{key:"getCue",value:function(t){if("string"==typeof t)t=(0,n.timeToSeconds)(t);else if("number"!=typeof t)throw Error("Invalid time instant format getting cue");var e=null;return this._cues.some((function(r){if(t>=r.start&&t<=r.end)return e=r,!0})),e}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}()},8704:(t,e,r)=>{"use strict";r.d(e,{N:()=>f,Z:()=>d});var n=r(2650);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function s(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}function f(t){return h.apply(this,arguments)}function h(){return h=l(regeneratorRuntime.mark((function t(e){var r,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=[],t.next=3,(0,n.FP)(e,"captions",function(){var t=l(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.push(e);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 3:i=regeneratorRuntime.mark((function t(n){var i,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r[n],t.next=3,i.getCaptions();case 3:o=t.sent,a=e.captionsCanvas,o.forEach((function(t){return a.addCaptions(t)}));case 6:case"end":return t.stop()}}),t)})),t.t0=regeneratorRuntime.keys(r);case 5:if((t.t1=t.t0()).done){t.next=10;break}return o=t.t1.value,t.delegateYield(i(o),"t2",8);case 8:t.next=5;break;case 10:case"end":return t.stop()}}),t)}))),h.apply(this,arguments)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(d,t);var e,r,n,i,c,f,h=(c=d,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=u(c);if(f){var r=u(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return s(this,t)});function d(){return o(this,d),h.apply(this,arguments)}return e=d,r=[{key:"type",get:function(){return"captions"}},{key:"load",value:(i=l(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.player.log.debug("load captions plugin");case 1:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"getCaptions",value:(n=l(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.player.log.warn("CaptionsPlugin ".concat(this.name,": getCaptions() is not implemented.")),t.abrupt("return",[]);case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),d}(n.ZP)},1309:(t,e,r)=>{"use strict";r.d(e,{n:()=>u,Z:()=>c});var n=r(7096);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o="(?:\\d*:){1,2}\\d*(?:\\.\\d+)?",a="(".concat(o,")\\s*\\-\\->\\s*(").concat(o,")"),s={cueTiming:new RegExp(a)};function u(t){var e=new n.Z;return""!==t&&(t=(t=t.replace(/\r\n/gm,"\n")).replace(/\r/gm,"\n")).split(/\n/).forEach((function(t,r,n){!function(t,e,r,n){var i=s.cueTiming.exec(e);if(i){for(var o=n[r-1],a=[],u=1;r+u<n.length&&""!==n[r+u];++u)a.push(n[r+u]);t.addCue({label:o,start:i[1],end:i[2],captions:a})}}(e,t,r,n)})),e}var c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";i(this,t),this._text=e,this._captions=u(e)}var e;return(e=[{key:"text",get:function(){return this._text},set:function(t){this._text=t,this._captions=u(t)}},{key:"captions",get:function(){return this._captions}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}()},2452:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});var n=function(){function t(e){var r=e.id,n=e.name,i=e.groupId,o=void 0===i?"":i,a=e.language,s=void 0===a?"":a,u=e.selected,c=void 0!==u&&u;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._id=r,this._name=n,this._groupId=o,this._lang=s,this._selected=c}var e;return(e=[{key:"id",get:function(){return this._id}},{key:"name",get:function(){return this._name}},{key:"groupId",get:function(){return this._groupId}},{key:"language",get:function(){return this._lang}},{key:"selected",get:function(){return this._selected},set:function(t){this._selected=t}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}()},7488:(t,e,r)=>{"use strict";r.d(e,{Z:()=>b});var n=r(7528),i=r(916),o=r(2650),a=r(1768),s=r(629),u=r(3379),c=r.n(u),l=r(372);function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function h(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){h(o,n,i,a,s,"next",t)}function s(t){h(o,n,i,a,s,"throw",t)}a(void 0)}))}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e,r){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},v(t,e,r||t)}function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}function m(t,e){return!e||"object"!==f(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}c()(l.Z,{insert:"head",singleton:!1}),l.Z.locals;var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(b,t);var e,r,u,c,l,f,h=(l=b,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=y(l);if(f){var r=y(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return m(this,t)});function b(){return p(this,b),h.apply(this,arguments)}return e=b,r=[{key:"groupName",get:function(){var t;return(null===(t=this.config)||void 0===t?void 0:t.groupName)||"buttonGroup"}},{key:"popUpType",get:function(){return"no-modal"}},{key:"getContent",value:(c=d(regeneratorRuntime.mark((function t(){var e,r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=(0,i.jS)('<div class="button-group"></div>'),this._firstItem=null,this._initialized){t.next=7;break}return this.player.log.debug('Load button plugins into "'.concat(this.groupName,'" container')),t.next=6,(0,o.FP)(this.player,"button",function(){var t=d(regeneratorRuntime.mark((function t(o){var u,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.player.log.debug(" Button plugin: ".concat(o.name)),u=(0,i.jS)('<div class="button-plugin-wrapper"></div>',e),o instanceof n.Z&&(o.parentPopUp=r._popUp),t.next=5,(0,a.k1)(o,u);case 5:(0,i.jS)('<a class="button-description">'.concat((0,s.Iu)(o.description),"</a>"),u).addEventListener("click",(function(t){o.action(),t.stopPropagation()})),r._firstItem||(c=u.getElementsByTagName("button"),r._firstItem=c&&c[0]);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var t=d(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.parentContainer!==r.groupName){t.next=7;break}return t.next=4,e.isEnabled();case 4:return t.abrupt("return",t.sent);case 7:return t.abrupt("return",!1);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 6:this._initialized=!0;case 7:return t.abrupt("return",e);case 8:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"showPopUp",value:(u=d(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,v(y(b.prototype),"showPopUp",this).call(this);case 2:setTimeout((function(){e._firstItem&&e._firstItem.focus()}),50);case 3:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),b}(n.Z)},1768:(t,e,r)=>{"use strict";r.d(e,{k1:()=>p,ZP:()=>g});var n=r(1547),i=(r(2650),r(916)),o=r(980),a=r(629);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function l(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){h(o,n,i,a,s,"next",t)}function s(t){h(o,n,i,a,s,"throw",t)}a(void 0)}))}}function p(t,e){return v.apply(this,arguments)}function v(){return(v=d(regeneratorRuntime.mark((function t(e,r){var n,s,u,c,l,f,h,d;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(n=(0,i.jS)('<div class="button-plugin-container"></div>',r)).plugin=e,s=e.tabIndex,u=(0,a.Iu)(e.ariaLabel),c=(0,a.Iu)(e.description),l=(0,i.jS)('\n\t\t<div class="button-plugin-side-area left-side '.concat(e.className,'"></div>\n\t'),n),f=(0,i.jS)('\n\t\t<button class="button-plugin '.concat(e.className,'" tabindex="').concat(s,'" aria-label="').concat(u,'" title="').concat(c,'"><i class="button-icon" style="pointer-events: none">').concat(e.icon,"</i></button>\n\t"),n),h=(0,i.jS)('\n\t\t<div class="button-plugin-side-area right-side '.concat(e.className,'"></div>\n\t'),n),d=(0,i.jS)('\n\t\t<span class="button-title button-title-'.concat(e.titleSize,'">').concat(e.title||"&nbsp;","</span>\n\t"),f),e._leftArea=l,e._rightArea=h,e._button=f,e._container=n,e._titleContainer=d,f._pluginData=e,l._pluginData=e,h._pluginData=e,n._pluginData=e,n.addEventListener("mouseenter",(function(t){n._pluginData.mouseOver(n,t)})),n.addEventListener("mouseleave",(function(t){n._pluginData.mouseOut(n,t)})),f.addEventListener("click",(function(t){var e=f._pluginData;(0,o.qe)(e.player,o.ZP.BUTTON_PRESS,{plugin:e}),e.action(t),t.stopPropagation()}));case 21:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(p,t);var e,r,n,i,o,a,s,h=(a=p,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=f(a);if(s){var r=f(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return l(this,t)});function p(){return u(this,p),h.apply(this,arguments)}return e=p,r=[{key:"type",get:function(){return"button"}},{key:"container",get:function(){return this._container}},{key:"leftArea",get:function(){return this._leftArea}},{key:"rightArea",get:function(){return this._rightArea}},{key:"button",get:function(){return this._button}},{key:"titleContainer",get:function(){return this._titleContainer}},{key:"ariaLabel",get:function(){return this.config.ariaLabel||this.getAriaLabel()}},{key:"getAriaLabel",value:function(){return""}},{key:"tabIndex",get:function(){return this.config.tabIndex||this.getTabIndex()}},{key:"getTabIndex",value:function(){return(t=this.player).__tabIndex=t.__tabIndex||0,++t.__tabIndex,t.__tabIndex;var t}},{key:"getDescription",value:function(){return""}},{key:"description",get:function(){return this.config.description||this.getDescription()}},{key:"iconElement",get:function(){var t;return null===(t=this.button)||void 0===t?void 0:t.getElementsByClassName("button-icon")[0]}},{key:"icon",get:function(){return this._icon},set:function(t){this._icon=t,this.iconElement.innerHTML=t}},{key:"title",get:function(){return this._title||""},set:function(t){this._title=t,this._titleContainer.innerHTML=t}},{key:"titleSize",get:function(){return"medium"}},{key:"side",get:function(){var t;return(null===(t=this.config)||void 0===t?void 0:t.side)||"left"}},{key:"parentContainer",get:function(){var t;return(null===(t=this.config)||void 0===t?void 0:t.parentContainer)||"playbackBar"}},{key:"className",get:function(){return""}},{key:"hide",value:function(){this._button&&(this._button.style.display="none")}},{key:"show",value:function(){this._button&&(this._button.style.display="block")}},{key:"mouseOver",value:(o=d(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(t){return o.apply(this,arguments)})},{key:"mouseOut",value:(i=d(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(t){return i.apply(this,arguments)})},{key:"action",value:(n=d(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.player.log.warn("Action not implemented in button plugin ".concat(this.name));case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),p}(n.Z)},7340:(t,e,r)=>{"use strict";r.d(e,{yJ:()=>m,Ke:()=>b,in:()=>E,Xz:()=>w,ZP:()=>k});var n=r(2650),i=r(916);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),t}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h(this,r)}}function h(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function p(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function v(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){p(o,n,i,a,s,"next",t)}function s(t){p(o,n,i,a,s,"throw",t)}a(void 0)}))}}var g=[];function m(t){return y.apply(this,arguments)}function y(){return(y=v(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,n.FP)(e,"canvas",(function(t){g.push(t)}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(t){return A.apply(this,arguments)}function A(){return(A=v(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:g.slice(0);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function E(t,e){if(0===g.length)throw Error("No canvas plugins loaded. Note that `loadCanvasPlugins()` must to be called before use `getCanvasPlugins()`");var r=null;return g.some((function(t){if(t.isCompatible(e))return r=t,!0})),r}var w=function(t){c(n,t);var e,r=f(n);function n(t,e,i){var o;return a(this,n),(o=r.call(this,e,{tag:t,parent:i}))._userArea=null,o}return u(n,[{key:"loadCanvas",value:(e=v(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw Error("".concat(this.name,": loadCanvas() not implemented"));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"userArea",get:function(){return this._userArea||(this._userArea=document.createElement("div"),this._userArea.className="user-area",this.element.appendChild(this._userArea)),this._userArea}}]),n}(i.FZ),k=function(t){c(r,t);var e=f(r);function r(){return a(this,r),e.apply(this,arguments)}return u(r,[{key:"type",get:function(){return"canvas"}},{key:"canvasType",get:function(){return""}},{key:"isCompatible",value:function(t){var e;return((null==t||null===(e=t.canvas)||void 0===e?void 0:e.length)>0&&t.canvas[0])===this.canvasType}},{key:"getCanvasInstance",value:function(t){throw Error("".concat(this.name," canvas plugin: getCanvasInstance() not implemented"))}}]),r}(n.ZP)},1285:(t,e,r)=>{"use strict";r.d(e,{e:()=>g,Z:()=>m});var n=r(2650),i=r(2624);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),t}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}var g=function(t){f(o,t);var e,r,n,i=d(o);function o(){return u(this,o),i.apply(this,arguments)}return l(o,[{key:"type",get:function(){return"data"}},{key:"context",get:function(){return this.config.context||[]}},{key:"read",value:(n=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw Error("DataPlugin.read() not implemented in data plugin '".concat(this.name,"'"));case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"write",value:(r=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw Error("DataPlugin.write() not implemented in data plugin '".concat(this.name,"'"));case 1:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"remove",value:(e=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw Error("DataPlugin.remove() not implemented in data plugin '".concat(this.name,"'"));case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),o}(n.ZP),m=function(t){f(a,t);var e,r,i,o=d(a);function a(t){var e;return u(this,a),(e=o.call(this,t))._dataPlugins={},(0,n.FP)(e.player,"data",function(){var t=s(regeneratorRuntime.mark((function t(r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:null===(n=r.context)||void 0===n||n.forEach((function(t){e._dataPlugins[t]=e._dataPlugins[t]||[],e._dataPlugins[t].push(r)}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return l(a,[{key:"getDataPlugin",value:function(t){var e=this._dataPlugins[t]&&this._dataPlugins[t].length>0&&this._dataPlugins[t][0];if(e||(e=this._dataPlugins.default&&this._dataPlugins.default.length>0&&this._dataPlugins.default&&this._dataPlugins.default[0]),!e)throw Error("No data plugin found for context '".concat(t,"'"));return e}},{key:"read",value:(i=s(regeneratorRuntime.mark((function t(e,r){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getDataPlugin(e),t.next=3,n.read(e,r);case 3:return i=t.sent,t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return i.apply(this,arguments)})},{key:"write",value:(r=s(regeneratorRuntime.mark((function t(e,r,n){var i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=this.getDataPlugin(e),t.next=3,i.write(e,r,n);case 3:return o=t.sent,t.abrupt("return",o);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})},{key:"remove",value:(e=s(regeneratorRuntime.mark((function t(e,r){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.getDataPlugin(e),t.next=3,n.remove(e,r);case 3:return i=t.sent,t.abrupt("return",i);case 5:case"end":return t.stop()}}),t,this)}))),function(t,r){return e.apply(this,arguments)})}]),a}(i.Z)},8984:(t,e,r)=>{"use strict";r.d(e,{$_:()=>h,v$:()=>p,ZP:()=>g});var n=r(2650),i=r(980);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}function l(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}function h(t){return d.apply(this,arguments)}function d(){return d=f(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,n.FP)(e,"eventLog",function(){var t=f(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.events.forEach((function(t){(0,i.GT)(e,t,function(){var e=f(regeneratorRuntime.mark((function e(n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.onEvent(t,n);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)}))),d.apply(this,arguments)}function p(t){return v.apply(this,arguments)}function v(){return(v=f(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:console.warn("unloadLogEventPlugins: not implemented");case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(h,t);var e,r,n,i,o,l=(i=h,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=c(i);if(o){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return u(this,t)});function h(){return a(this,h),l.apply(this,arguments)}return e=h,r=[{key:"type",get:function(){return"eventLog"}},{key:"events",get:function(){return[]}},{key:"onEvent",value:(n=f(regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:console.warn("".concat(this.name,": onEvent() function is not overwritten."));case 1:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),h}(n.ZP)},980:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>n,GT:()=>i,qe:()=>o,Ss:()=>a,Ii:()=>s});const n={PLAY:"paella:play",PAUSE:"paella:pause",STOP:"paella:stop",ENDED:"paella:ended",SEEK:"paella:seek",FULLSCREEN_CHANGED:"paella:fullscreenchanged",VOLUME_CHANGED:"paella:volumeChanged",TIMEUPDATE:"paella:timeupdate",TRIMMING_CHANGED:"paella:trimmingChanged",CAPTIONS_CHANGED:"paella:captionsChanged",BUTTON_PRESS:"paella:buttonPress",SHOW_POPUP:"paella:showPopUp",HIDE_POPUP:"paella:hidePopUp",MANIFEST_LOADED:"paella:manifestLoaded",STREAM_LOADED:"paella:streamLoaded",PLAYER_LOADED:"paella:playerLoaded",PLAYER_UNLOADED:"paella:playerUnloaded",RESIZE:"paella:resize",RESIZE_END:"paella:resizeEnd",LAYOUT_CHANGED:"paella:layoutChanged",PLAYBACK_RATE_CHANGED:"paella:playbackRateChanged"};function i(t,e,r){return t.__eventListeners__=t.__eventListeners__||{},t.__eventListeners__[e]=t.__eventListeners__[e]||[],t.__eventListeners__[e].push(r),r}function o(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.__eventListeners__&&t.__eventListeners__[e]&&t.__eventListeners__[e].forEach((function(t){return t(r)}))}function a(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.ready&&o(t,e,r)}function s(t){t.__eventListeners__=null}},9267:(t,e,r)=>{"use strict";r.d(e,{L:()=>h,CZ:()=>p,mW:()=>g,ZP:()=>m});var n=r(2650);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function s(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}var f={};function h(t){return d.apply(this,arguments)}function d(){return d=l(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,n.FP)(e,"keyshortcut",function(){var t=l(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getKeys();case 2:t.sent.forEach((function(t){f[t.keyCode]=f[t.keyCode]||[],t.plugin=e,f[t.keyCode].push(t)}));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:e.log.debug(f),window.onkeyup=function(){var t=l(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=function(){return document.activeElement&&document.activeElement!==document.body&&!/video/i.test(document.activeElement.tagName)},"Space"!==e.code||!r()){t.next=3;break}return t.abrupt("return");case 3:if(!(n=f[e.code])){t.next=7;break}return t.next=7,n.forEach(function(){var t=l(regeneratorRuntime.mark((function t(r){var n,i,o,a,s,u,c,l,f;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=!(null!==(n=r.keyModifiers)&&void 0!==n&&n.altKey)||(null===(i=r.keyModifiers)||void 0===i?void 0:i.altKey)&&e.altKey,l=!(null!==(o=r.keyModifiers)&&void 0!==o&&o.ctrlKey)||(null===(a=r.keyModifiers)||void 0===a?void 0:a.ctrlKey)&&e.ctrlKey,f=!(null!==(s=r.keyModifiers)&&void 0!==s&&s.shiftKey)||(null===(u=r.keyModifiers)||void 0===u?void 0:u.shiftKey)&&e.shiftKey,!(c&&l&&f)){t.next=6;break}return t.next=6,r.action(e);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();case 4:case"end":return t.stop()}}),t)}))),d.apply(this,arguments)}function p(t){return v.apply(this,arguments)}function v(){return(v=l(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:console.warn("unloadKeyShortcutPlugins: not implemented");case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var g={Digit1:"Digit1",Digit2:"Digit2",Digit3:"Digit3",Digit4:"Digit4",Digit5:"Digit5",Digit6:"Digit6",Digit7:"Digit7",Digit8:"Digit8",Digit9:"Digit9",Digit0:"Digit0",KeyA:"KeyA",KeyB:"KeyB",KeyC:"KeyC",KeyD:"KeyD",KeyE:"KeyE",KeyF:"KeyF",KeyG:"KeyG",KeyH:"KeyH",KeyI:"KeyI",KeyJ:"KeyJ",KeyK:"KeyK",KeyL:"KeyL",KeyM:"KeyM",KeyN:"KeyN",KeyO:"KeyO",KeyP:"KeyP",KeyQ:"KeyQ",KeyR:"KeyR",KeyS:"KeyS",KeyT:"KeyT",KeyU:"KeyU",KeyV:"KeyV",KeyW:"KeyW",KeyX:"KeyX",KeyY:"KeyY",KeyZ:"KeyZ",Comma:"Comma",Period:"Period",Semicolon:"Semicolon",Quote:"Quote",BracketLeft:"BracketLeft",BracketRight:"BracketRight",Backquote:"Backquote",Backslash:"Backslash",Minus:"Minus",Equal:"Equal",AltLeft:"AltLeft",AltRight:"AltRight",CapsLock:"CapsLock",ControlLeft:"ControlLeft",ControlRight:"ControlRight",OSLeft:"OSLeft",OSRight:"OSRight",ShiftLeft:"ShiftLeft",ShiftRight:"ShiftRight",ContextMenu:"ContextMenu",Enter:"Enter",Space:"Space",Tab:"Tab",Delete:"Delete",End:"End",Help:"Help",Home:"Home",Insert:"Insert",PageDown:"PageDown",PageUp:"PageUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp",Escape:"Escape",PrintScreen:"PrintScreen",ScrollLock:"ScrollLock",Pause:"Pause"},m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(h,t);var e,r,n,i,c,f=(i=h,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=u(i);if(c){var r=u(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return s(this,t)});function h(){return o(this,h),f.apply(this,arguments)}return e=h,r=[{key:"type",get:function(){return"keyshortcut"}},{key:"getKeys",value:(n=l(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",[]);case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),h}(n.ZP)},629:(t,e,r)=>{"use strict";r.d(e,{Pb:()=>o,D$:()=>a,cN:()=>s,Xx:()=>u,Iu:()=>d,m0:()=>p,G3:()=>v,BF:()=>g,Gj:()=>m,n1:()=>y,Ji:()=>b,fe:()=>A});var n="en",i={};function o(t){return(i[n]||{})[t]||t}function a(t){n=t}function s(){return n}function u(t,e){for(var r in i[t]=i[t]||{},e){var n=e[r];i[t][r]=n}}var c=o,l=a,f=s,h=u;function d(t){return c(t)}function p(t){l(t)}function v(){return f()}function g(t,e){h(t,e)}function m(t){c=t}function y(t){l=t}function b(t){f=t}function A(t){h=t}},143:(t,e,r)=>{"use strict";r.d(e,{Z:()=>g});var n=r(7528),i=r(916),o=r(3379),a=r.n(o),s=r(1872);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e,r){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},h(t,e,r||t)}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function p(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}a()(s.Z,{insert:"head",singleton:!1}),s.Z.locals;var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(g,t);var e,r,n,o,a,s,u,c=(s=g,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=v(s);if(u){var r=v(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return p(this,t)});function g(){return f(this,g),c.apply(this,arguments)}return e=g,r=[{key:"getContent",value:(a=l(regeneratorRuntime.mark((function t(){var e,r,n,o,a=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,i.jS)('<ul class="menu-button-content"></ul>'),t.next=3,this.getMenu();case 3:return r=t.sent,this._menuItems=r,n=!1,o=null,r.forEach((function(t){var r=(0,i.jS)('<li class="menu-button-item"></li>',e),s="";"button"===a.buttonType?s="menu-item-type-button":"check"===a.buttonType?s="menu-item-type-button"+(t.selected?" selected":""):"radio"===a.buttonType&&(s="menu-item-type-button",!n&&t.selected&&(s+=" selected",n=!0));var u="";t.icon&&t.title&&a.showTitles?u='\n\t\t\t\t<i class="menu-icon">'.concat(t.icon,'</i>\n\t\t\t\t<span class="menu-title">').concat(t.title,"</span>\n\t\t\t\t"):t.icon?u='\n\t\t\t\t<i class="menu-icon">'.concat(t.icon,"</i>\n\t\t\t\t"):t.title&&(u='\n\t\t\t\t<span class="menu-title">'.concat(t.title,"</span>\n\t\t\t\t"));var c=(0,i.jS)('\n\t\t\t\t<button class="'.concat(s,'" aria-label="').concat(t.title,'">').concat(u,"</button>"),r);o||(o=c),t.buttonElement=c,c._itemData=t,c.addEventListener("click",(function(t){"check"===a.buttonType?(t.target._itemData.selected=!t.target._itemData.selected,t.target._itemData.selected?t.target.classList.add("selected"):t.target.classList.remove("selected")):"radio"===a.buttonType&&(a.menuItems.forEach((function(t){t.selected=!1,t.buttonElement.classList.remove("selected")})),t.target._itemData.selected=!t.target._itemData.selected,t.target._itemData.selected?t.target.classList.add("selected"):t.target.classList.remove("selected")),a.itemSelected(t.target._itemData,a._menuItems),t.stopPropagation(),"check"!==a.buttonType&&a.closeMenu()}));var l=c.getElementsByTagName("svg");l.length>0&&(/\%$/.test(l[0].getAttribute("width"))&&l[0].removeAttribute("width"),/\%$/.test(l[0].getAttribute("height"))&&l[0].removeAttribute("height"))})),setTimeout((function(){o.focus()}),50),t.abrupt("return",e);case 10:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"getMenu",value:(o=l(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[{id:0,title:"Option 1"},{id:1,title:"Option 2"},{id:2,title:"Option 3"},{id:3,title:"Option 4"},{id:4,title:"Option 5"}],t.abrupt("return",e);case 2:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"menuItems",get:function(){return this._menuItems}},{key:"showTitles",get:function(){return!0}},{key:"buttonType",value:function(){return"button"}},{key:"itemSelected",value:function(t,e){console.warn("MenuButtonPlugin (".concat(this.name,"): itemSelected() function not implemented."))}},{key:"closeMenu",value:function(){this._popUp.hide()}},{key:"showPopUp",value:(n=l(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.refreshContent=!0,t.next=3,h(v(g.prototype),"showPopUp",this).call(this);case 3:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),g}(n.Z)},2624:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});var n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._player=e}var e;return(e=[{key:"player",get:function(){return this._player}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}()},2650:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>b,FN:()=>p,gQ:()=>f,FP:()=>v,zb:()=>h,Dd:()=>m,W:()=>d});var n=r(2624);const i=[r(591),r(4803),r(6189),r(3855),r(9802)];function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function s(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,s,"next",t)}function s(t){c(o,n,i,a,s,"throw",t)}a(void 0)}))}}function f(t,e){var r=t.config;e.keys().forEach((function(n){var i=e(n).default,o=new i(t,r,n.substring(2,n.length-3));if(o.type){var a=o.type;t.__pluginData__.pluginClasses[n]=i,t.__pluginData__.pluginInstances[a]=t.__pluginData__.pluginInstances[a]||[],t.__pluginData__.pluginInstances[a].push(o)}else if(o.moduleName){var s=o.moduleName,u=o.moduleVersion;t.log.debug("Plugin module imported: '".concat(s,"': v").concat(u)),t.__pluginModules=t.__pluginModules||[],t.__pluginModules.push(o)}}))}function h(t){t.config,t.__pluginData__=t.__pluginData__||{pluginClasses:[],pluginInstances:{}},0===t.__pluginData__.pluginClasses.length&&(i.forEach((function(e){return f(t,e)})),t.initParams.customPluginContext.forEach((function(e){return f(t,e)})),t.log.debug("Plugins have been registered:"))}function d(t){delete t.__pluginData__}function p(t,e){var r;return null===(r=t.__pluginData__)||void 0===r?void 0:r.pluginInstances[e]}function v(t,e){return g.apply(this,arguments)}function g(){return g=l(regeneratorRuntime.mark((function t(e,r){var n,i,a,s,u,c,f,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=h.length>2&&void 0!==h[2]?h[2]:null,i=h.length>3&&void 0!==h[3]?h[3]:null,e.__pluginData__.pluginInstances[r].sort((function(t,e){return t.order-e.order})),e.__pluginData__.pluginInstances[r].forEach((function(t){return e.log.debug("type: ".concat(r,", name: ").concat(t.name))})),"function"!=typeof i&&(i=function(){var t=l(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.isEnabled();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.t0=regeneratorRuntime.keys(e.__pluginData__.pluginInstances[r]);case 6:if((t.t1=t.t0()).done){t.next=25;break}return a=t.t1.value,s=e.__pluginData__.pluginInstances[r][a],t.next=11,i(s);case 11:if(!t.sent){t.next=23;break}if(!s.__uiPlugin){t.next=18;break}return t.next=16,s.getDictionaries();case 16:if("object"===o(u=t.sent))for(c in u)f=u[c],e.addDictionary(c,f);case 18:if("function"!=typeof n){t.next=21;break}return t.next=21,n(s);case 21:return t.next=23,s.load();case 23:t.next=6;break;case 25:case"end":return t.stop()}}),t)}))),g.apply(this,arguments)}function m(t,e){return y.apply(this,arguments)}function y(){return y=l(regeneratorRuntime.mark((function t(e,r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:null===(n=e.__pluginData__.pluginInstances[r])||void 0===n||n.forEach(function(){var t=l(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.unload();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)}))),y.apply(this,arguments)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(d,t);var e,r,n,i,o,c,f,h=(c=d,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=u(c);if(f){var r=u(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return s(this,t)});function d(t,e,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),(n=h.call(this,t))._name=r,n._config=e.plugins[n.name],n}return e=d,r=[{key:"config",get:function(){return this._config}},{key:"type",get:function(){return"none"}},{key:"order",get:function(){var t;return(null===(t=this._config)||void 0===t?void 0:t.order)||0}},{key:"description",get:function(){var t;return(null===(t=this._config)||void 0===t?void 0:t.description)||""}},{key:"name",get:function(){return this._name}},{key:"isEnabled",value:(o=l(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null===(e=this.config)||void 0===e?void 0:e.enabled);case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"load",value:(i=l(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"unload",value:(n=l(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),d}(n.Z)},7133:(t,e,r)=>{"use strict";var n="src/js/core/PluginModule.js";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function s(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}r.d(e,{Z:()=>c});var c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(l,t);var e,r,i,c=(r=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=u(r);if(i){var n=u(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return s(this,t)});function l(){return o(this,l),c.apply(this,arguments)}return(e=[{key:"moduleName",get:function(){return this.player.log.warn("Incomplete player module definition: '".concat(n,".moduleName'")),"-"}},{key:"moduleVersion",get:function(){return this.player.log.warn("Incomplete player module definition: '".concat(n,".moduleVersion'")),"0.0.0"}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(l.prototype,e),l}(r(2624).Z)},6911:(t,e,r)=>{"use strict";r.d(e,{Z:()=>y});var n=r(916),i=r(980),o=r(3379),a=r.n(o),s=r(6777);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},f(t,e,r||t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?p(t):e}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}a()(s.Z,{insert:"head",singleton:!1}),s.Z.locals;var g=[];function m(t,e,r){if(e){var n=e.getBoundingClientRect(),i=n.top,o=n.left,a=n.right,s=n.bottom,u=n.width,c=n.height,l=o+u/2,f=i+c/2,h=window.innerWidth,d=window.innerHeight,p=window.innerWidth/2,v=window.innerHeight/2;if(t.containerElement.getBoundingClientRect(),r.style.overflow="auto",p>l&&v<=f){var g=d-(s-c);r.style.left="".concat(o,"px"),r.style.bottom="".concat(g,"px"),r.style.maxHeight="calc(100vh - ".concat(g,"px - 10px)")}else if(p>l&&v>f)r.style.left="".concat(o,"px"),r.style.top="".concat(i+c,"px"),r.style.maxHeight="calc(100vh - ".concat(i+c,"px - 10px)");else if(p<=l&&v>f)r.style.right="".concat(h-a,"px"),r.style.top="".concat(i+c,"px"),r.style.maxHeight="calc(100vh - ".concat(i+c,"px - 10px)");else if(p<=l&&v<=f){var m=d-(s-c);r.style.right="".concat(h-a,"px"),r.style.bottom="".concat(m,"px"),r.style.maxHeight="calc(100vh - ".concat(m,"px - 10px)")}}}var y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(y,t);var e,r,o,a,s,u=(a=y,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=v(a);if(s){var r=v(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return d(this,t)});function y(t,e){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];c(this,y);var a={class:o?"popup-container":"popup-container no-modal"},s='\n\t\t<div class="popup-content"></div>\n\t\t';return(r=u.call(this,t,{attributes:a,children:s,parent:e}))._modal=o,r._contextObject=i,r._id=Symbol(p(r)),g.push(p(r)),r.element.addEventListener("click",(function(){r.hide()})),r._contentElement=r.element.getElementsByClassName("popup-content")[0],r._anchorElement=n,n&&m(t,n,r.contentElement),r.hide(),r}return e=y,r=[{key:"isModal",get:function(){return this._modal}},{key:"contextObject",get:function(){return this._contextObject}},{key:"id",get:function(){return this._id}},{key:"contentElement",get:function(){return this._contentElement}},{key:"content",get:function(){return this._popupContent}},{key:"setContent",value:function(t){this.contentElement.innerHTML="","string"==typeof t?this._popupContent=(0,n.jS)(t,this.contentElement):(this._popupContent=t,this.contentElement.appendChild(t))}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._anchorElement&&m(this.player,this._anchorElement,this.contentElement),t&&this.setParent(t),this._parentPopUp=e,e&&e.addChild(this),f(v(y.prototype),"show",this).call(this),(0,i.qe)(this.player,i.ZP.SHOW_POPUP,{popUp:this,plugin:this.contextObject})}},{key:"hide",value:function(){this.isVisible&&(this._children&&this._children.forEach((function(t){return t.hide()})),this._parentPopUp&&this._parentPopUp.removeChild(this),(0,i.qe)(this.player,i.ZP.HIDE_POPUP,{popUp:this,plugin:this.contextObject})),f(v(y.prototype),"hide",this).call(this)}},{key:"addChild",value:function(t){this._children=this._children||[],this._children.find((function(e){return e===t}))||this._children.push(t)}},{key:"removeChild",value:function(t){this._children&&(this._children=this._children.filter((function(e){return e!==t})))}}],o=[{key:"GetPopUps",value:function(){return g}},{key:"IsSomePopUpVisible",value:function(){return g.some((function(t){return t.isVisible}))}},{key:"GetPopUp",value:function(t){return g.find((function(e){return e.id===t}))}},{key:"HideAllPopUps",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];g.forEach((function(e){(t&&e.isModal||!t)&&e.hide()}))}},{key:"Unload",value:function(){g.forEach((function(t){t.removeFromParent()})),g.slice(0)}}],r&&l(e.prototype,r),o&&l(e,o),y}(n.FZ)},7528:(t,e,r)=>{"use strict";r.d(e,{Z:()=>p});var n=r(1768),i=r(6911),o=r(916),a=r(230);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){u(o,n,i,a,s,"next",t)}function s(t){u(o,n,i,a,s,"throw",t)}a(void 0)}))}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(m,t);var e,r,n,s,u,p,v,g=(p=m,v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=d(p);if(v){var r=d(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return h(this,t)});function m(){var t;return l(this,m),(t=g.apply(this,arguments))._refreshContent=!0,t}return e=m,r=[{key:"refreshContent",get:function(){return this._refreshContent},set:function(t){this._refreshContent=t}},{key:"action",value:(u=c(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.showPopUp();case 2:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"parentPopUp",get:function(){return this._parentPopUp},set:function(t){this._parentPopUp=t}},{key:"popUp",get:function(){return this._popUp}},{key:"getContent",value:(s=c(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,o.jS)("<p>Pop Up Button Plugin Content</p>"),t.abrupt("return",e);case 2:case"end":return t.stop()}}),t)}))),function(){return s.apply(this,arguments)})},{key:"popUpType",get:function(){return"modal"}},{key:"hidePopUp",value:function(){this._popUp&&this._popUp.hide()}},{key:"showPopUp",value:(n=c(regeneratorRuntime.mark((function t(){var e,r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.player.isFullscreen?this.player.containerElement:document.body,this._popUp){t.next=12;break}return this._popUp=null,"modal"===this.popUpType||"no-modal"===this.popUpType?this._popUp=new i.Z(this.player,e,this.button,this,"modal"===this.popUpType):"timeline"===this.popUpType&&(this._popUp=new a.Z(this.player,this)),t.next=6,this.getContent();case 6:r=t.sent,this._popUp.setContent(r),this._popUp.show(e,this._parentPopUp),this.refreshContent=!1,t.next=27;break;case 12:if("timeline"!==this.popUpType||!this._popUp.isVisible){t.next=16;break}this._popUp.hide(),t.next=27;break;case 16:if(!this._popUp.isVisible){t.next=20;break}this._popUp.hide(),t.next=27;break;case 20:if(!this.refreshContent){t.next=26;break}return t.next=23,this.getContent();case 23:n=t.sent,this._popUp.setContent(n),this.refreshContent=!1;case 26:this._popUp.show(e,this._parentPopUp);case 27:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),m}(n.ZP)},230:(t,e,r)=>{"use strict";r.d(e,{Z:()=>m});var n=r(916),i=r(980),o=r(3379),a=r.n(o),s=r(5352);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f(t,e,r){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=v(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},f(t,e,r||t)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?p(t):e}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function g(t){t.__timeLinePopUp||(t.__timeLinePopUp={popUps:[],current:null})}a()(s.Z,{insert:"head",singleton:!1}),s.Z.locals;var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(u,t);var e,r,n,o,a,s=(o=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=v(o);if(a){var r=v(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return d(this,t)});function u(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;c(this,u),g(t);var n={class:"timeline-popup-content"},o=t.containerElement;return(e=s.call(this,t,{attributes:n,parent:o}))._contextObject=r,t.__timeLinePopUp.popUps.forEach((function(t){return t.hide()})),e._id=Symbol(p(e)),t.__timeLinePopUp.popUps.push(p(e)),t.__timeLinePopUp.current=p(e),(0,i.qe)(e.player,i.ZP.SHOW_POPUP,{popUp:p(e),plugin:e.contextObject}),e}return e=u,r=[{key:"contextObject",get:function(){return this._contextObject}},{key:"show",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isVisible||(this.player.__timeLinePopUp.popUps.forEach((function(t){return t.hide()})),f(v(u.prototype),"show",this).call(this),this.player.__timeLinePopUp.current=this,!0!==t&&(0,i.qe)(this.player,i.ZP.SHOW_POPUP,{popUp:this,plugin:this.contextObject}))}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isVisible&&(f(v(u.prototype),"hide",this).call(this),this.player.__timeLinePopUp.current=null,!0!==t&&(0,i.qe)(this.player,i.ZP.HIDE_POPUP,{popUp:this,plugin:this.contextObject}))}},{key:"setContent",value:function(t){t&&(this.element.innerHTML="",this.element.appendChild(t))}}],n=[{key:"HideUserInterface",value:function(t){if(g(t),t.__timeLinePopUp.current){var e=t.__timeLinePopUp.current;t.__timeLinePopUp.current.hide(!0),t.__timeLinePopUp.current=e}}},{key:"ShowUserInterface",value:function(t){g(t),t.__timeLinePopUp.current&&t.__timeLinePopUp.current.show(!0)}},{key:"Unload",value:function(t){t.__timeLinePopUp&&(t.__timeLinePopUp.current&&t.__timeLinePopUp.current.removeFromParent(),t.__timeLinePopUp.popUps.forEach((function(t){t.removeFromParent()})),t.__timeLinePopUp.popUps.slice(0),delete t.__timeLinePopUp)}}],r&&l(e.prototype,r),n&&l(e,n),u}(n.FZ)},1547:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function a(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}r.d(e,{Z:()=>u});var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(h,t);var e,r,n,u,c,l,f=(c=h,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=s(c);if(l){var r=s(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return a(this,t)});function h(t,e,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(n=f.call(this,t,e,r)).__uiPlugin=!0,n}return e=h,r=[{key:"getDictionaries",value:(n=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null);case 1:case"end":return t.stop()}}),t)})),u=function(){var t=this,e=arguments;return new Promise((function(r,o){var a=n.apply(t,e);function s(t){i(a,r,o,s,u,"next",t)}function u(t){i(a,r,o,s,u,"throw",t)}s(void 0)}))},function(){return u.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),h}(r(2650).ZP)},3063:(t,e,r)=>{"use strict";r.d(e,{tk:()=>f,Vc:()=>h,OU:()=>d,yl:()=>p,ZP:()=>v});var n=r(2650);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function s(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}function c(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}(t)||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 l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(t,e){return(0,n.FN)(t,"layout").filter((function(t){return t.config&&t.canApply(e)}))}function h(t,e){var r=f(t,e),n=[];return r.forEach((function(t){n.push.apply(n,c(t.getValidContentIds(e)))})),n}function d(t,e){var r=f(t,e),n=h(t,e),i=[];return r.forEach((function(t){i=[].concat(c(i),c(t.config.validContent))})),i.filter((function(t){return-1!==n.indexOf(t.id)}))}function p(t,e,r){var n=function(t,e,r){var n=f(t,e),i=null;return n.some((function(t){if(-1!==t.getValidContentIds(e).indexOf(r))return i=t,!0})),i}(t,e,r);if(n){var i=n.getLayoutStructure(e,r);return i.plugin=n,i}return null}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(c,t);var e,r,n,i=(r=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=u(r);if(n){var i=u(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return s(this,t)});function c(){return o(this,c),i.apply(this,arguments)}return(e=[{key:"type",get:function(){return"layout"}},{key:"identifier",get:function(){return"default"}},{key:"icon",get:function(){return"icon.png"}},{key:"validContent",get:function(){var t;return null===(t=this.config)||void 0===t?void 0:t.validContent}},{key:"validContentIds",get:function(){var t=[];return this.validContent.forEach((function(e){return t.push(e.id)})),t}},{key:"getValidContentIds",value:function(t){var e=[];return this.validContent.forEach((function(r){r.content.every((function(e){return t.some((function(t){return e===t.content}))}))&&e.push(r.id)})),e}},{key:"getValidStreams",value:function(t){var e=[];return this.validContent.forEach((function(r){var n=[];r.content.every((function(e){return t.some((function(t){if(e===t.content)return n.push(t),!0}))}))&&e.push(n)})),e}},{key:"canApply",value:function(t){return this.getValidStreams(t).length>0}},{key:"getLayoutStructure",value:function(){return{}}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(c.prototype,e),c}(r(1547).Z)},646:(t,e,r)=>{"use strict";r.d(e,{ZP:()=>g,zE:()=>y,m7:()=>A,ti:()=>w,nk:()=>k});var n=r(916),i=r(2650);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),t}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}var g=function(t){f(n,t);var e,r=d(n);function n(){return u(this,n),r.apply(this,arguments)}return l(n,[{key:"type",get:function(){return"video"}},{key:"streamType",get:function(){return"mp4"}},{key:"isCompatible",value:function(){return!1}},{key:"getVideoInstance",value:(e=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null);case 1:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})}]),n}(i.ZP),m=[];function y(t){return b.apply(this,arguments)}function b(){return(b=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,i.FP)(e,"video",(function(t){m.push(t)}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(t){return E.apply(this,arguments)}function E(){return(E=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:m.slice(0);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function w(t,e){var r=function(t){if(0===m.length)throw Error("No video plugins loaded. Note that `loadVideoPlugins()` must to be called before using `getVideoPlugins()`.");return m}(),n=null;return r.some((function(t){if(t.isCompatible(e))return n=t,!0})),n}var k=function(t){f(C,t);var e,r,n,i,o,a,c,h,p,v,g,m,y,b,A,E,w,k,T=d(C);function C(t,e,r){var n;return u(this,C),(n=T.call(this,e,{tag:t,attributes:{class:"video-player"},parent:r}))._streamProvider=null,n._streamData=null,n._ready=!1,n}return l(C,[{key:"streamData",get:function(){return this._streamData}},{key:"ready",get:function(){return this._ready}},{key:"load",value:(k=s(regeneratorRuntime.mark((function t(e,r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._streamProvider=r,this._streamData=e,t.next=4,this.loadStreamData(e);case 4:return n=t.sent,t.abrupt("return",n);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return k.apply(this,arguments)})},{key:"isMainAudioPlayer",get:function(){return this._streamProvider.mainAudioPlayer===this}},{key:"onVideoEnded",value:function(t){this._videoEndedCallback=t}},{key:"play",value:(w=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!1);case 1:case"end":return t.stop()}}),t)}))),function(){return w.apply(this,arguments)})},{key:"pause",value:(E=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!1);case 1:case"end":return t.stop()}}),t)}))),function(){return E.apply(this,arguments)})},{key:"duration",value:(A=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",-1);case 1:case"end":return t.stop()}}),t)}))),function(){return A.apply(this,arguments)})},{key:"currentTimeSync",get:function(){return-1}},{key:"currentTime",value:(b=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",-1);case 1:case"end":return t.stop()}}),t)}))),function(){return b.apply(this,arguments)})},{key:"setCurrentTime",value:(y=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!1);case 1:case"end":return t.stop()}}),t)}))),function(){return y.apply(this,arguments)})},{key:"volume",value:(m=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",-1);case 1:case"end":return t.stop()}}),t)}))),function(){return m.apply(this,arguments)})},{key:"setVolume",value:(g=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!1);case 1:case"end":return t.stop()}}),t)}))),function(){return g.apply(this,arguments)})},{key:"paused",value:(v=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!0);case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"playbackRate",value:(p=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",-1);case 1:case"end":return t.stop()}}),t)}))),function(){return p.apply(this,arguments)})},{key:"setPlaybackRate",value:(h=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!1);case 1:case"end":return t.stop()}}),t)}))),function(){return h.apply(this,arguments)})},{key:"getQualities",value:(c=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null);case 1:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"setQuality",value:(a=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!1);case 1:case"end":return t.stop()}}),t)}))),function(){return a.apply(this,arguments)})},{key:"currentQuality",get:function(){return null}},{key:"getDimensions",value:(o=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null);case 1:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"supportsMultiaudio",value:(i=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!1);case 1:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})},{key:"getAudioTracks",value:(n=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null);case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"setCurrentAudioTrack",value:(r=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"currentAudioTrack",get:function(){return null}},{key:"loadStreamData",value:(e=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!1);case 1:case"end":return t.stop()}}),t)}))),function(t){return e.apply(this,arguments)})}]),C}(n.FZ)},625:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});var n=function(){function t(e){var r=e.label,n=e.shortLabel,i=e.isAuto,o=void 0!==i&&i,a=e.index,s=void 0===a?0:a,u=e.src,c=void 0===u?"":u,l=e.width,f=void 0===l?-1:l,h=e.height,d=void 0===h?-1:h,p=e.bitrate,v=void 0===p?-1:p;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._label=r,this._shortLabel=n,this._index=s,this._src=c,this._res={w:f,h:d},this._bitrate=v,this._isAuto=o}var e;return(e=[{key:"label",get:function(){return this._label}},{key:"shortLabel",get:function(){return this._shortLabel}},{key:"index",get:function(){return this._index}},{key:"src",get:function(){return this._src}},{key:"res",get:function(){return this._res}},{key:"bitrate",get:function(){return this._bitrate}},{key:"isAuto",get:function(){return this._isAuto}},{key:"quality",get:function(){return-1!==this._res.w&&-1!==this._res.h?this._res.w*this._res.h:this._bitrate}},{key:"compare",value:function(t){return t.quality-this.quality}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}()},916:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function o(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?a(t):e}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function u(t){var e=t.tag,r=void 0===e?"div":e,n=t.attributes,i=void 0===n?{}:n,o=t.children,a=void 0===o?"":o,s=t.innerText,u=void 0===s?"":s,c=t.parent,l=void 0===c?null:c,f=document.createElement(r);for(var h in f.innerText=u,i)f.setAttribute(h,i[h]);return f.innerHTML=a,l&&l.appendChild(f),f}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=document.createElement("div");r.innerHTML=t;var n=r.children[0];return e&&e.appendChild(n),n}r.d(e,{az:()=>u,jS:()=>c,FZ:()=>l});var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(l,t);var e,r,n,c=(r=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=s(r);if(n){var i=s(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return o(this,t)});function l(t,e){var r,n=e.tag,i=void 0===n?"div":n,o=e.attributes,s=void 0===o?[]:o,f=e.children,h=void 0===f?"":f,d=e.parent,p=void 0===d?null:d;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(r=c.call(this,t))._element=u({tag:i,attributes:s,children:h,parent:p}),Object.defineProperty(a(r),i,{get:function(){return r._element}}),r}return(e=[{key:"element",get:function(){return this._element}},{key:"parent",get:function(){return this._element.parentElement}},{key:"hide",value:function(){this.element.style.display="none"}},{key:"show",value:function(){this.element.style.display="block"}},{key:"isVisible",get:function(){var t=window.getComputedStyle(this.element);return"none"!==t.display&&""!==t.display}},{key:"setAttribute",value:function(t,e){this._element.setAttribute(t,e)}},{key:"removeFromParent",value:function(){var t;null===(t=this._element.parentElement)||void 0===t||t.removeChild(this._element)}},{key:"setParent",value:function(t){this.removeFromParent(),t.appendChild(this._element)}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(l.prototype,e),l}(r(2624).Z)},1401:(t,e,r)=>{"use strict";r.r(e),r.d(e,{loadSvgIcon:()=>s,getUrlParameter:()=>u,getHashParameter:()=>c,joinPath:()=>l,isAbsoluteUrl:()=>f,resolveResourcePath:()=>h,setupAutoHideUiTimer:()=>d,clearAutoHideTimer:()=>p,secondsToTime:()=>v,timeToSeconds:()=>g,setCookie:()=>m,getCookie:()=>y});var n=r(980),i=r(6911);function o(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,u,"next",t)}function u(t){o(a,n,i,s,u,"throw",t)}s(void 0)}))}}function s(t){return new Promise((function(e,r){fetch(t).then((function(t){return t.text()})).then((function(t){e(t)})).catch((function(t){return r(t)}))}))}function u(t){var e=new URLSearchParams(window.location.search);return e.has(t)?e.get(t):null}function c(t){var e=window.location.hash.replace("#","?"),r=new URLSearchParams(e);return r.has(t)?r.get(t):null}function l(t,e){var r=e||"/";return(t=t.map((function(e,n){return n&&(e=e.replace(new RegExp("^"+r),"")),n!==t.length-1&&(e=e.replace(new RegExp(r+"$"),"")),e}))).join(r)}function f(t){return new RegExp("^([a-z]+://|//)","i").test(t)||/^\//.test(t)}function h(t,e){return f(e)?e:l([t.manifestUrl,e])}function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hideUiTime";t.__hideTimer__=null;var r=function(){var n=a(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.__hideTimer__&&clearTimeout(t.__hideTimer__),n.next=3,t.showUserInterface();case 3:t.__hideTimer__=setTimeout(a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.__hideTimer__=null,!i.Z.IsSomePopUpVisible()){e.next=7;break}t.log.debug("UI not hidden because there are visible pop ups"),r(),e.next=9;break;case 7:return e.next=9,t.hideUserInterface();case 9:case"end":return e.stop()}}),e)}))),t[e]);case 4:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();t.containerElement.addEventListener("mousemove",function(){var t=a(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r();case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,n.GT)(t,n.ZP.PLAY,a(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r();case 1:case"end":return t.stop()}}),t)})))),(0,n.GT)(t,n.ZP.PAUSE,a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.showUserInterface();case 2:case"end":return e.stop()}}),e)})))),(0,n.GT)(t,n.ZP.ENDED,a(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.showUserInterface();case 2:case"end":return e.stop()}}),e)}))))}function p(t){t.__hideTimer__&&(clearTimeout(t.__hideTimer__),delete t.__hideTimer__)}function v(t){var e=Math.floor(t/60/60),r=Math.floor(t/60)-60*e,n=Math.floor(t%60);return(e>0?e.toString().padStart(2,"0")+":":"")+r.toString().padStart(2,"0")+":"+n.toString().padStart(2,"0")}function g(t){var e=/(?:(\d*):){0,1}(\d*):(\d*)/.exec(t);return e?3600*(void 0!==e[1]?Number(e[1]):0)+60*Number(e[2])+Number(e[3]):null}function m(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:365,n=new Date;n.setTime(n.getTime()+24*r*60*60*1e3);var i="expires=".concat(n.toUTCString());document.cookie="".concat(t,"=").concat(e,";").concat(i,";path=/")}function y(t){for(var e=t+"=",r=decodeURIComponent(document.cookie).split(";"),n=0;n<r.length;++n){for(var i=r[n];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(e))return i.substring(e.length,i.length)}return""}},99:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>l});var n=r(7133),i=r(4147);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(l,t);var e,r,n,o=(r=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=c(r);if(n){var i=c(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return u(this,t)});function l(){return a(this,l),o.apply(this,arguments)}return(e=[{key:"moduleName",get:function(){return"paella-core default data plugins"}},{key:"moduleVersion",get:function(){return i.version}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(l.prototype,e),l}(n.Z)},6016:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>h});var n=r(1285),i=r(1401);function o(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function s(t){o(a,n,i,s,u,"next",t)}function u(t){o(a,n,i,s,u,"throw",t)}s(void 0)}))}}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function l(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(g,t);var e,r,n,o,h,d,p,v=(d=g,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=f(d);if(p){var r=f(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return l(this,t)});function g(){return u(this,g),v.apply(this,arguments)}return e=g,r=[{key:"serializeKey",value:function(t,e){return"object"===s(e)&&(e=JSON.stringify(e)),"".concat(t,"|").concat(e)}},{key:"read",value:(h=a(regeneratorRuntime.mark((function t(e,r){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.serializeKey(e,r),o=(0,i.getCookie)(n);try{o=unescape(o),o=JSON.parse(o)}catch(t){}return this.player.log.debug("CookieDataPlugin.read: ".concat(n)),t.abrupt("return",o);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return h.apply(this,arguments)})},{key:"write",value:(o=a(regeneratorRuntime.mark((function t(e,r,n){var o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=this.serializeKey(e,r),n&&"object"===s(n))try{n=JSON.stringify(n)}catch(t){this.player.log.warn("CookieDataPlugin.write: ".concat(o,": invalid data object.")),n=""}n=escape(n),(0,i.setCookie)(o,n),this.player.log.debug("CookieDataPlugin.write: ".concat(o));case 5:case"end":return t.stop()}}),t,this)}))),function(t,e,r){return o.apply(this,arguments)})},{key:"remove",value:(n=a(regeneratorRuntime.mark((function t(e,r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.serializeKey(e,r),(0,i.setCookie)(n,""),this.player.log.debug("CookieDataPlugin.remove: ".concat(n));case 3:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),g}(n.e)},4493:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>l});var n=r(7133),i=r(4147);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(l,t);var e,r,n,o=(r=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=c(r);if(n){var i=c(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return u(this,t)});function l(){return a(this,l),o.apply(this,arguments)}return(e=[{key:"moduleName",get:function(){return"paella-core default video layouts"}},{key:"moduleVersion",get:function(){return i.version}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(l.prototype,e),l}(n.Z)},7236:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>T});var n=r(3063),i=r(6300),o=r.n(i),a=r(3725),s=r.n(a),u=r(3973),c=r.n(u),l=r(9724),f=r.n(l);function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function d(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function p(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){d(o,n,i,a,s,"next",t)}function s(t){d(o,n,i,a,s,"throw",t)}a(void 0)}))}}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e,r){return g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=b(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},g(t,e,r||t)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}function y(t,e){return!e||"object"!==h(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}var A=[s(),c(),f()],E=0,w=[{videos:[{content:null,rect:[{aspectRatio:"16/9",width:560,height:315,top:218,left:712},{aspectRatio:"16/10",width:560,height:350,top:206,left:712},{aspectRatio:"4/3",width:560,height:420,top:173,left:712},{aspectRatio:"5/3",width:560,height:336,top:206,left:712},{aspectRatio:"5/4",width:560,height:448,top:160,left:712}],visible:!0,layer:1},{content:null,rect:[{aspectRatio:"16/9",width:688,height:387,top:166,left:10},{aspectRatio:"16/10",width:688,height:430,top:148,left:10},{aspectRatio:"4/3",width:688,height:516,top:111,left:10},{aspectRatio:"5/3",width:690,height:414,top:154,left:10},{aspectRatio:"5/4",width:690,height:552,top:96,left:10}],visible:!0,layer:"1"}],buttons:[{rect:{left:682,top:565,width:45,height:45}},{rect:{left:682,top:515,width:45,height:45}}]},{videos:[{content:null,rect:[{aspectRatio:"16/9",left:0,top:0,width:1280,height:720},{aspectRatio:"16/10",left:64,top:0,width:1152,height:720},{aspectRatio:"5/3",left:40,top:0,width:1200,height:720},{aspectRatio:"5/4",left:190,top:0,width:900,height:720},{aspectRatio:"4/3",left:160,top:0,width:960,height:720}],visible:!0,layer:1},{content:null,rect:[{aspectRatio:"16/9",left:50,top:470,width:350,height:197},{aspectRatio:"16/10",left:50,top:448,width:350,height:219},{aspectRatio:"5/3",left:50,top:457,width:350,height:210},{aspectRatio:"5/4",left:50,top:387,width:350,height:280},{aspectRatio:"4/3",left:50,top:404,width:350,height:262}],visible:!0,layer:2}],buttons:[{rect:{left:388,top:465,width:45,height:45}},{rect:{left:388,top:415,width:45,height:45}}]},{videos:[{content:null,rect:[{aspectRatio:"16/9",left:0,top:0,width:1280,height:720},{aspectRatio:"16/10",left:64,top:0,width:1152,height:720},{aspectRatio:"5/3",left:40,top:0,width:1200,height:720},{aspectRatio:"5/4",left:190,top:0,width:900,height:720},{aspectRatio:"4/3",left:160,top:0,width:960,height:720}],visible:!0,layer:1},{content:null,rect:[{aspectRatio:"16/9",left:880,top:470,width:350,height:197},{aspectRatio:"16/10",left:880,top:448,width:350,height:219},{aspectRatio:"5/3",left:880,top:457,width:350,height:210},{aspectRatio:"5/4",left:880,top:387,width:350,height:280},{aspectRatio:"4/3",left:880,top:404,width:350,height:262}],visible:!0,layer:2}],buttons:[{rect:{left:848,top:465,width:45,height:45}},{rect:{left:848,top:415,width:45,height:45}}]}];function k(t){var e=JSON.parse(JSON.stringify(w[E]));return e.videos[0].content=t[0],e.videos[1].content=t[1],e}var T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(c,t);var e,r,n,i,a,s,u=(a=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=b(a);if(s){var r=b(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return y(this,t)});function c(){return v(this,c),u.apply(this,arguments)}return e=c,r=[{key:"identifier",get:function(){return"dual-video"}},{key:"load",value:(i=p(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.player.log.debug("Dual video layout loaded");case 1:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"getValidStreams",value:function(t){return g(b(c.prototype),"getValidStreams",this).call(this,t).filter((function(t){return 2===t.length}))}},{key:"switchContent",value:function(){var t=this._currentContent[0],e=this._currentContent[1];this._currentContent[0]=e,this._currentContent[1]=t,this.player.videoContainer.updateLayout()}},{key:"switchMinimized",value:function(){var t;t=this._currentContent,E=(E+1)%w.length,k(t),this.player.videoContainer.updateLayout()}},{key:"getLayoutStructure",value:function(t,e){var r=this;if(!this._currentContent||this._currentContentId!==e){var n=this.validContent.find((function(t){return t.id===e})),i=n.content;this._currentContent=i,this._currentContentId=e}var a=k(this._currentContent);return{player:this.player,name:{es:"Dos streams con posición dinámica"},hidden:!1,videos:a.videos,buttons:[{rect:a.buttons[0].rect,onClick:function(){r.switchContent()},label:"Switch",icon:o(),layer:2,ariaLabel:"Swap the position of the videos",title:"Swap the position of the videos"},{rect:a.buttons[1].rect,onClick:function(){r.switchMinimized()},label:"Minimize",icon:A[E],layer:2,ariaLabel:"Swap between side by side and minimized video",title:"Swap between side by side and minimized video"}]}}},{key:"getDictionaries",value:(n=p(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e={es:{"Swap between side by side and minimized video":"Cambiar la disposición de los dos vídeos entre minimizado y del mismo tamaño","Swap the position of the videos":"Intercambiar la posición de los vídeos"}},t.abrupt("return",e);case 2:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),c}(n.ZP)},8785:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e,r){return a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},a(t,e,r||t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}r.r(e),r.d(e,{default:()=>l});var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(p,t);var e,r,n,l,f,h,d=(f=p,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=c(f);if(h){var r=c(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return u(this,t)});function p(){return o(this,p),d.apply(this,arguments)}return e=p,r=[{key:"identifier",get:function(){return"single-video"}},{key:"load",value:(n=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.player.log.debug("Single video layout loaded");case 1:case"end":return t.stop()}}),t,this)})),l=function(){var t=this,e=arguments;return new Promise((function(r,o){var a=n.apply(t,e);function s(t){i(a,r,o,s,u,"next",t)}function u(t){i(a,r,o,s,u,"throw",t)}s(void 0)}))},function(){return l.apply(this,arguments)})},{key:"getValidStreams",value:function(t){return a(c(p.prototype),"getValidStreams",this).call(this,t).filter((function(t){return 1===t.length}))}},{key:"getLayoutStructure",value:function(t,e){var r=this.validContent.find((function(t){return t.id===e}));return{player:this.player,name:{es:"One stream"},hidden:!1,videos:[{content:r.content[0],rect:[{aspectRatio:"1/1",left:280,top:0,width:720,height:720},{aspectRatio:"6/5",left:208,top:0,width:864,height:720},{aspectRatio:"5/4",left:190,top:0,width:900,height:720},{aspectRatio:"4/3",left:160,top:0,width:960,height:720},{aspectRatio:"11/8",left:145,top:0,width:990,height:720},{aspectRatio:"1.41/1",left:132,top:0,width:1015,height:720},{aspectRatio:"1.43/1",left:125,top:0,width:1029,height:720},{aspectRatio:"3/2",left:100,top:0,width:1080,height:720},{aspectRatio:"16/10",left:64,top:0,width:1152,height:720},{aspectRatio:"5/3",left:40,top:0,width:1200,height:720},{aspectRatio:"16/9",left:0,top:0,width:1280,height:720},{aspectRatio:"1.85/1",left:0,top:14,width:1280,height:692},{aspectRatio:"2.35/1",left:0,top:87,width:1280,height:544},{aspectRatio:"2.41/1",left:0,top:94,width:1280,height:531},{aspectRatio:"2.76/1",left:0,top:128,width:1280,height:463}],visible:!0,layer:1}],background:{content:"slide_professor_paella.jpg",zIndex:5,rect:{left:0,top:0,width:1280,height:720},visible:!0,layer:0},logos:[{content:"paella_logo.png",zIndex:5,rect:{top:10,left:10,width:49,height:42}}],buttons:[],onApply:function(){}}}}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),p}(r(3063).ZP)},2128:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(3063),i=r(6300),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},l(t,e,r||t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p={videos:[{content:{},rect:[{aspectRatio:"16/9",left:239,top:17,width:803,height:451}],visible:!0,layer:1},{content:{},rect:[{aspectRatio:"16/9",left:44,top:482,width:389,height:218}],visible:!0,layer:1},{content:{},rect:[{aspectRatio:"16/9",left:847,top:482,width:389,height:218}],visible:!0,layer:1}],buttons:[{rect:{left:618,top:495,width:45,height:45},onClick:function(t){this.rotate()},label:"Rotate",icon:"icon_rotate.svg",layer:2}]},v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(g,t);var e,r,n,i,a,s,v=(a=g,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=d(a);if(s){var r=d(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return h(this,t)});function g(){return c(this,g),v.apply(this,arguments)}return e=g,r=[{key:"identifier",get:function(){return"triple-video"}},{key:"load",value:(i=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.player.log.debug("Triple video layout loaded");case 1:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"getValidStreams",value:function(t){return l(d(g.prototype),"getValidStreams",this).call(this,t).filter((function(t){return 3===t.length}))}},{key:"switchContent",value:function(){var t=this._currentContent[0],e=this._currentContent[1],r=this._currentContent[2];this._currentContent[0]=r,this._currentContent[1]=t,this._currentContent[2]=e,this.player.videoContainer.updateLayout()}},{key:"getLayoutStructure",value:function(t,e){var r=this;if(!this._currentContent||this._currentContentId!==e){this._currentContentId=e;var n=this.validContent.find((function(t){return t.id===e})),i=n.content;this._currentContent=i}var a=function(t){var e=JSON.parse(JSON.stringify(p));return e.videos[0].content=t[0],e.videos[1].content=t[1],e.videos[2].content=t[2],e}(this._currentContent);return{player:this.player,name:{es:"Three streams with dynamic position"},hidden:!1,videos:a.videos,buttons:[{rect:a.buttons[0].rect,onClick:function(){r.switchContent()},label:"Switch",icon:o(),layer:2,ariaLabel:"Swap the position of the videos",title:"Swap the position of the videos"}]}}},{key:"getDictionaries",value:(n=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Swap between side by side and minimized video":"Cambiar la disposición de los dos vídeos entre minimizado y del mismo tamaño","Swap the position of the videos":"Intercambiar la posición de los vídeos"}});case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),g}(n.ZP)},1481:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>l});var n=r(7133),i=r(4147);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(l,t);var e,r,n,o=(r=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=c(r);if(n){var i=c(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return u(this,t)});function l(){return a(this,l),o.apply(this,arguments)}return(e=[{key:"moduleName",get:function(){return"paella-core default plugins"}},{key:"moduleVersion",get:function(){return i.version}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(l.prototype,e),l}(n.Z)},5026:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>h});var n=r(9267),i=r(6911);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function l(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(w,t);var e,r,o,a,h,d,p,v,g,m,y,b,A,E=(b=w,A=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=f(b);if(A){var r=f(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return l(this,t)});function w(){return u(this,w),E.apply(this,arguments)}return e=w,r=[{key:"togglePlayPause",value:(y=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.paused();case 2:if(!t.sent){t.next=8;break}return t.next=6,this.player.play();case 6:t.next=10;break;case 8:return t.next=10,this.player.pause();case 10:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"toggleFullscreen",value:(m=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.player.isFullscreen){t.next=5;break}return t.next=3,this.player.exitFullscreen();case 3:t.next=7;break;case 5:return t.next=7,this.player.enterFullscreen();case 7:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)})},{key:"seek",value:(g=s(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.streamProvider.currentTime();case 2:return r=t.sent,t.next=5,this.player.videoContainer.streamProvider.setCurrentTime(r+e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"incrementVolume",value:(v=s(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.streamProvider.volume();case 2:return r=t.sent,n=Math.min(Math.max(0,r+.01*e),1),t.next=6,this.player.videoContainer.setVolume(n);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"closePopUp",value:function(){i.Z.HideAllPopUps(!1)}},{key:"decreaseSpeed",value:(p=s(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.playbackRate();case 2:return e=t.sent,r=0,this._validPlaybackRates.some((function(t){if(0===r&&(r=t),!(t<e))return!0;r=t})),t.next=7,this.player.videoContainer.setPlaybackRate(r);case 7:case"end":return t.stop()}}),t,this)}))),function(){return p.apply(this,arguments)})},{key:"increaseSpeed",value:(d=s(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.playbackRate();case 2:return e=t.sent,r=0,this._validPlaybackRates.some((function(t){if(t>e)return r=t,!0})),0===r&&this._validPlaybackRates[this._validPlaybackRates.length-1],t.next=8,this.player.videoContainer.setPlaybackRate(r);case 8:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"toggleVolume",value:(h=s(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.videoContainer.volume();case 2:if(!((e=t.sent)>0)){t.next=9;break}return this._lastVolume=e,t.next=7,this.player.videoContainer.setVolume(0);case 7:t.next=11;break;case 9:return t.next=11,this.player.videoContainer.setVolume(this._lastVolume||1);case 11:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"load",value:(a=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this._validPlaybackRates=this.config.validPlaybackRates||[.75,1,1.5,2],this._validPlaybackRates.sort((function(t,e){return t-e}));case 2:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"getKeys",value:(o=s(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",[{keyCode:n.mW.KeyM,description:"Toggle audio mute",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.toggleVolume();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.KeyK,description:"Toggle play/pause",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.togglePlayPause();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.KeyJ,description:"Rewind 30 seconds",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.seek(-30);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.KeyL,description:"Rewind 30 seconds",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.seek(30);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.Space,description:"Toggle play/pause",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.togglePlayPause();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.KeyF,description:"Toggle fullscreen",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.toggleFullscreen();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.ArrowLeft,description:"Rewind 30 seconds",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.seek(-30);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.ArrowRight,description:"Forward 30 seconds",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.seek(30);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.ArrowUp,description:"Volume up 10%",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.incrementVolume(10);case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.ArrowDown,description:"Volume down 10%",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.incrementVolume(-10);case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.Escape,description:"Close Pop Up",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.closePopUp();case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.KeyU,description:"Decrease playback speed",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.decreaseSpeed();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{keyCode:n.mW.KeyO,description:"Increase playback speed",action:function(){var t=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.increaseSpeed();case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()}]);case 1:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),w}(n.ZP)},3591:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>g});var n=r(1768),i=r(980),o=r(5372),a=r.n(o),s=r(752),u=r.n(s);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function p(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(m,t);var e,r,n,o,s,c,l,g=(c=m,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=v(c);if(l){var r=v(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return p(this,t)});function m(){return h(this,m),g.apply(this,arguments)}return e=m,r=[{key:"load",value:(s=f(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=a(),(0,i.GT)(this.player,i.ZP.PLAY,(function(){e.icon=u()})),(0,i.GT)(this.player,i.ZP.PAUSE,(function(){e.icon=a()})),(0,i.GT)(this.player,i.ZP.ENDED,(function(){e.icon=a()})),(0,i.GT)(this.player,i.ZP.STOP,(function(){e.icon=a()}));case 5:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"action",value:(o=f(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.paused();case 2:if(!t.sent){t.next=7;break}return t.next=5,this.player.videoContainer.play();case 5:t.next=9;break;case 7:return t.next=9,this.player.videoContainer.pause();case 9:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"getDictionaries",value:(n=f(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{es:{"Play and pause button":"Reproducir y parar el vídeo"}});case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),m}(n.ZP)},7858:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>h});var n=r(7488),i=r(9998),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function l(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(p,t);var e,r,n,i,a,h,d=(a=p,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=f(a);if(h){var r=f(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return l(this,t)});function p(){return u(this,p),d.apply(this,arguments)}return e=p,r=[{key:"load",value:(n=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=o();case 1:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){s(o,r,i,a,u,"next",t)}function u(t){s(o,r,i,a,u,"throw",t)}a(void 0)}))},function(){return i.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),p}(n.Z)},2694:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function a(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}r.r(e),r.d(e,{default:()=>u});var u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(u,t);var e,r,n=(e=u,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=s(e);if(r){var i=s(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return a(this,t)});function u(){return i(this,u),n.apply(this,arguments)}return u}(r(8704).Z)},5651:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>f});var n=r(8984),i=r(980);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function c(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(p,t);var e,r,n,o,f,h,d=(f=p,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(f);if(h){var r=l(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return c(this,t)});function p(){return s(this,p),d.apply(this,arguments)}return e=p,r=[{key:"events",get:function(){return[i.ZP.PLAY,i.ZP.PAUSE,i.ZP.TIMEUPDATE,i.ZP.MANIFEST_LOADED,i.ZP.STREAM_LOADED,i.ZP.PLAYER_LOADED]}},{key:"onEvent",value:(n=regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.player.log.verbose(e),this.player.log.verbose(r);case 2:case"end":return t.stop()}}),t,this)})),o=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function s(t){a(o,r,i,s,u,"next",t)}function u(t){a(o,r,i,s,u,"throw",t)}s(void 0)}))},function(t,e){return o.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),p}(n.ZP)},3508:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>d});var n=r(1768),i=r(9998),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function f(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(v,t);var e,r,n,i,a,s,d,p=(s=v,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=h(s);if(d){var r=h(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return f(this,t)});function v(){return c(this,v),p.apply(this,arguments)}return e=v,r=[{key:"foldableContainer",get:function(){return"left"===this.config.side?this.rightArea:this.leftArea}},{key:"load",value:(a=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=o(),this.foldableContainer.style.display="none",this.foldableContainer.innerHTML="Foldable Container";case 3:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"mouseOver",value:(i=u(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.foldableContainer.style.display="inline-block";case 1:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"mouseOut",value:(n=u(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.foldableContainer.style.display="none";case 1:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),v}(n.ZP)},7924:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>p});var n=r(7528),i=r(916),o=r(9998),a=r.n(o);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){u(o,n,i,a,s,"next",t)}function s(t){u(o,n,i,a,s,"throw",t)}a(void 0)}))}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(v,t);var e,r,n,o,s,u,p=(s=v,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=d(s);if(u){var r=d(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return h(this,t)});function v(){return l(this,v),p.apply(this,arguments)}return e=v,r=[{key:"popUpType",get:function(){return"timeline"}},{key:"getContent",value:(o=c(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,i.jS)("<p>Pop Up Button Plugin Content 2</p>"),t.abrupt("return",e);case 2:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"load",value:(n=c(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=a(),this.title="2",e=this.player.captionsCanvas,this.player.log.debug(e);case 4:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),v}(n.Z)},9061:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>p});var n=r(7528),i=r(916),o=r(9998),a=r.n(o);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){u(o,n,i,a,s,"next",t)}function s(t){u(o,n,i,a,s,"throw",t)}a(void 0)}))}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(v,t);var e,r,n,o,s,u,p=(s=v,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=d(s);if(u){var r=d(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return h(this,t)});function v(){return l(this,v),p.apply(this,arguments)}return e=v,r=[{key:"popUpType",get:function(){return"timeline"}},{key:"getContent",value:(o=c(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,i.jS)("<p>Pop Up Button Plugin Content 1</p>"),t.abrupt("return",e);case 2:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"load",value:(n=c(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=a(),this.title="1";case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),v}(n.Z)},8539:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>d});var n=r(143),i=r(9998),o=r.n(i);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function f(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(p,t);var e,r,n,i,a,s,d=(a=p,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=h(a);if(s){var r=h(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return f(this,t)});function p(){return c(this,p),d.apply(this,arguments)}return e=p,r=[{key:"load",value:(i=u(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.icon=o(),this.title="tx";case 2:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"titleSize",get:function(){return"medium"}},{key:"popUpType",get:function(){return"no-modal"}},{key:"getMenu",value:(n=u(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[{id:0,title:"Option 1"},{id:1,title:"Option 2"},{id:2,title:"Option 3"},{id:3,title:"Option 4"},{id:4,title:"Option 5"},{id:0,title:"Option 6"},{id:1,title:"Option 7"},{id:2,title:"Option 8"},{id:3,title:"Option 9"},{id:4,title:"Option 10"}],t.abrupt("return",e);case 2:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"itemSelected",value:function(t){0===t.id&&(this.refreshContent=!0)}},{key:"buttonType",get:function(){return"check"}}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),p}(n.Z)},6761:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>p});var n=r(8704),i=r(1309),o=r(1401);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function s(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){s(o,n,i,a,u,"next",t)}function u(t){s(o,n,i,a,u,"throw",t)}a(void 0)}))}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e,r){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=d(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},l(t,e,r||t)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(g,t);var e,r,n,a,s,p,v=(s=g,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=d(s);if(p){var r=d(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return h(this,t)});function g(){return c(this,g),v.apply(this,arguments)}return e=g,r=[{key:"isEnabled",value:(a=u(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l(d(g.prototype),"isEnabled",this).call(this);case 2:return e=t.sent,t.abrupt("return",e&&this.player.videoManifest.captions&&this.player.videoManifest.captions.length>0);case 4:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"getCaptions",value:(n=u(regeneratorRuntime.mark((function t(){var e,r,n=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],r=[],this.player.videoManifest.captions.forEach((function(t){r.push(new Promise((function(r){if(/vtt/i.test(t.format)){var a=(0,o.resolveResourcePath)(n.player,t.url);fetch(a).then((function(t){if(t.ok)return t.text();reject()})).then((function(n){var o=new i.Z(n);o.captions.label=t.text,o.captions.language=t.lang,e.push(o.captions),r()}))}})))})),t.next=5,Promise.all(r);case 5:return t.abrupt("return",e);case 6:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),g}(n.Z)},477:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>l});var n=r(7133),i=r(4147);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function u(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(l,t);var e,r,n,o=(r=l,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=c(r);if(n){var i=c(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return u(this,t)});function l(){return a(this,l),o.apply(this,arguments)}return(e=[{key:"moduleName",get:function(){return"paella-core default video formats"}},{key:"moduleVersion",get:function(){return i.version}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(l.prototype,e),l}(n.Z)},310:(t,e,r)=>{"use strict";r.r(e),r.d(e,{HlsLiveVideo:()=>k,default:()=>T});var n=r(7631),i=r.n(n),o=r(8069),a=r(646),s=r(625);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,s,"next",t)}function s(t){l(o,n,i,a,s,"throw",t)}a(void 0)}))}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function p(t,e,r){return e&&d(t.prototype,e),r&&d(t,r),t}function v(t,e,r){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},v(t,e,r||t)}function g(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}function y(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=A(t);if(e){var i=A(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b(this,r)}}function b(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}var E=(0,o.getHlsSupport)(),w=function(t,e,r,n,o){var a,s;o.withCredentials&&(n.xhrSetup=function(t,e){for(var r in t.withCredentials=o.withCredentials,o.requestHeaders){var n=o.requestHeaders[r];t.setRequestHeader(r,n)}});var u=new(i())(n),c=(null==e||null===(a=e.sources)||void 0===a||null===(s=a.hlsLive)||void 0===s?void 0:s.length)>0&&e.sources.hlsLive[0],l=(c.isLiveStream,void 0!==n.initialQualityLevel?n.initialQualityLevel:1);return[u,new Promise((function(t,e){u.on(i().Events.LEVEL_SWITCHED,(function(t,e){(void 0).player.log.debug("HLS: quality level switched to ".concat(e.level))})),u.on(i().Events.ERROR,(function(t,r){if(r.fatal)switch(r.type){case i().ErrorTypes.NETWORK_ERROR:r.details===i().ErrorDetails.MANIFEST_LOAD_ERROR?e(Error("hlsVideoFormatPlugin: unrecoverable error in HLS player. The video is not available")):(console.warn("hlsVideoFormatPlugin: Fatal network error. Try to recover"),u.startLoad());break;case i().ErrorTypes.MEDIA_ERROR:console.warn("hlsVideoFormatPlugin: Fatal media error encountered. Try to recover"),u.recoverMediaError();break;default:u.destroy(),e(Error("hlsVideoFormat: Fatal error. Can not recover"))}})),u.on(i().Events.MANIFEST_PARSED,(function(){n.autoStartLoad||u.autoStartLoad(),u.currentLevel=u.levels.length>=l?l:-1,setTimeout((function(){return u.currentLevel=-1}),1e3)}));var o=Math.floor(1e11*Math.random()),a=c.src+(/\?/.test(a)?"&cache=".concat(o):"?cache=".concat(o));u.loadSource(a),u.attachMedia(r),r.addEventListener("canplay",(function(){t()}))}))]},k=function(t){g(n,t);var e,r=y(n);function n(){return h(this,n),r.apply(this,arguments)}return p(n,[{key:"loadStreamData",value:(e=f(regeneratorRuntime.mark((function t(e){var r,i,a,u,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(E!==o.HlsSupport.NATIVE){t.next=5;break}return e.sources.mp4=e.sources.hls,t.abrupt("return",v(A(n.prototype),"loadStreamData",this).call(this,e));case 5:return this.player.log.debug("Loading HLS stream"),r=w(this.player,e,this.video,this._config,this._cors),2,i=function(t){if(Array.isArray(t))return t}(f=r)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),2!==r.length);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(f)||function(t,e){if(t){if("string"==typeof t)return c(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,2):void 0}}(f)||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.")}(),a=i[0],u=i[1],this._hls=a,t.next=10,u;case 10:return this._autoQuality=new s.Z({label:"auto",shortLabel:"auto",index:-1,width:1,height:1,isAuto:!0}),this._currentQuality=this._autoQuality,t.next=14,this.getAudioTracks();case 14:l=t.sent,this._currentAudioTrack=l.find((function(t){return t.selected}));case 16:case"end":return t.stop()}var f}),t,this)}))),function(t){return e.apply(this,arguments)})}]),n}(o.HlsVideo),T=function(t){g(n,t);var e,r=y(n);function n(){return h(this,n),r.apply(this,arguments)}return p(n,[{key:"streamType",get:function(){return"hlsLive"}},{key:"isCompatible",value:function(t){return t.sources.hlsLive&&E}},{key:"getVideoInstance",value:(e=f(regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new k(this.player,e,this.config,r));case 1:case"end":return t.stop()}}),t,this)}))),function(t,r){return e.apply(this,arguments)})}]),n}(a.ZP)},8069:(t,e,r)=>{"use strict";r.r(e),r.d(e,{defaultHlsConfig:()=>k,HlsSupport:()=>C,getHlsSupport:()=>x,HlsVideo:()=>R,default:()=>L});var n=r(2604),i=r(646),o=r(625),a=r(2452),s=r(7631),u=r.n(s);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function h(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){h(o,n,i,a,s,"next",t)}function s(t){h(o,n,i,a,s,"throw",t)}a(void 0)}))}}function p(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function g(t,e,r){return e&&v(t.prototype,e),r&&v(t,r),t}function m(t,e,r){return m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=w(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}},m(t,e,r||t)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}function A(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=w(t);if(e){var i=w(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return E(this,r)}}function E(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function w(t){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},w(t)}var k={autoStartLoad:!0,startPosition:-1,capLevelToPlayerSize:!0,debug:!1,defaultAudioCodec:void 0,initialLiveManifestSize:1,initialQualityLevel:1,maxBufferLength:30,maxMaxBufferLength:600,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.2,liveSyncDurationCount:3,liveMaxLatencyDurationCount:10,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:500,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:500,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:500,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,appendErrorMaxRetry:3,enableWebVTT:!0,enableCEA708Captions:!0,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:5,abrEwmaSlowLive:9,abrEwmaFastVoD:4,abrEwmaSlowVoD:15,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,minAutoBitrate:0},T={withCredentials:!0,requestHeaders:{"Access-Control-Allow-Headers":"Content-Type, Accept, X-Requested-With","Access-Control-Allow-Origin":"http://localhost:8000","Access-Control-Allow-Credentials":"true"}},C={UNSUPPORTED:0,MEDIA_SOURCE_EXTENSIONS:1,NATIVE:2};function x(){var t=document.createElement("video");return u().isSupported()?C.MEDIA_SOURCE_EXTENSIONS:t.canPlayType("application/vnd.apple.mpegurl")?C.NATIVE:C.UNSUPPORTED}var _=x(),S=function(t,e,r,n,i){var o,a;i.withCredentials&&(n.xhrSetup=function(t,e){for(var r in t.withCredentials=i.withCredentials,i.requestHeaders){var n=i.requestHeaders[r];t.setRequestHeader(r,n)}});var s=new(u())(n),c=(null==e||null===(o=e.sources)||void 0===o||null===(a=o.hls)||void 0===a?void 0:a.length)>0&&e.sources.hls[0],l=(c.isLiveStream,void 0!==n.initialQualityLevel?n.initialQualityLevel:1);return[s,new Promise((function(e,i){s.on(u().Events.LEVEL_SWITCHED,(function(e,r){t.log.debug("HLS: quality level switched to ".concat(r.level))})),s.on(u().Events.ERROR,(function(e,r){if(r.fatal)switch(r.type){case u().ErrorTypes.NETWORK_ERROR:r.details===u().ErrorDetails.MANIFEST_LOAD_ERROR?i(Error("hlsVideoFormatPlugin: unrecoverable error in HLS player. The video is not available")):(console.warn("hlsVideoFormatPlugin: Fatal network error. Try to recover"),s.startLoad());break;case u().ErrorTypes.MEDIA_ERROR:console.warn("hlsVideoFormatPlugin: Fatal media error encountered. Try to recover"),s.recoverMediaError();break;default:s.destroy(),i(Error("hlsVideoFormat: Fatal error. Can not recover"))}else t.log.warn("HLS: error"),t.log.warn(r)})),s.on(u().Events.MANIFEST_PARSED,(function(){n.autoStartLoad||s.autoStartLoad(),s.currentLevel=s.levels.length>=l?l:-1,setTimeout((function(){return s.currentLevel=-1}),1e3)}));var o=Math.floor(1e11*Math.random()),a=c.src+(/\?/.test(a)?"&cache=".concat(o):"?cache=".concat(o));s.loadSource(a),s.attachMedia(r),r.addEventListener("canplay",(function(){e()}))}))]},R=function(t){y(b,t);var e,r,n,i,s,u,c,h,v=A(b);function b(t,e,r,n){var i;for(var o in p(this,b),(i=v.call(this,t,e,n))._config={},k)i._config[o]=k[o];for(var a in r.hlsConfig)i._config[a]=r.hlsConfig[a];for(var s in i._cors={},T)i._cors[s]=T[s];for(var u in r.corsConfig)i._cors[u]=r.corsConfig[u];return i._ready=!1,i._autoQuality=!0,i}return g(b,[{key:"autoQuality",get:function(){return this._autoQuality}},{key:"loadStreamData",value:(h=d(regeneratorRuntime.mark((function t(e){var r,n,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_!==C.NATIVE){t.next=5;break}return e.sources.mp4=e.sources.hls,t.abrupt("return",m(w(b.prototype),"loadStreamData",this).call(this,e));case 5:return this.player.log.debug("Loading HLS stream"),r=S(this.player,e,this.video,this._config,this._cors),2,n=function(t){if(Array.isArray(t))return t}(u=r)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),2!==r.length);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(u)||function(t,e){if(t){if("string"==typeof t)return f(t,2);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,2):void 0}}(u)||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.")}(),i=n[0],a=n[1],this._hls=i,t.next=10,a;case 10:return this.video.pause(),this._autoQuality=new o.Z({label:"auto",shortLabel:"auto",index:-1,width:1,height:1,isAuto:!0}),this._currentQuality=this._autoQuality,t.next=15,this.getAudioTracks();case 15:s=t.sent,this._currentAudioTrack=s.find((function(t){return t.selected}));case 17:case"end":return t.stop()}var u}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"waitForLoaded",value:(c=d(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_!==C.NATIVE){t.next=4;break}return t.abrupt("return",m(w(b.prototype),"waitForLoaded",this).call(this));case 4:return t.next=6,new Promise((function(t,r){!function r(){e.video.readyState>2?(e._ready=!0,t()):setTimeout((function(){return r()}),200)}()}));case 6:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"getDimensions",value:(u=d(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return e=this.video,t.abrupt("return",{w:e.videoWidth,h:e.videoHeight});case 4:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"getQualities",value:(s=d(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=[]).push(this._autoQuality),_===C.MEDIA_SOURCE_EXTENSIONS&&(this._hls.levels.forEach((function(t,r){var n;e.push(new o.Z((l(n={index:t.id,label:"".concat(t.width,"x").concat(t.height),shortLabel:"".concat(t.height,"p")},"index",r),l(n,"width",t.width),l(n,"height",t.height),n)))})),e.sort((function(t,e){return t.res.h-e.res.h}))),t.abrupt("return",e);case 4:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"setQuality",value:(i=d(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof o.Z){t.next=2;break}throw Error("Invalid parameter setting video quality. VideoQualityItem object expected.");case 2:_===C.MEDIA_SOURCE_EXTENSIONS?(this._currentQuality=e,this._hls.currentLevel=e.index):console.warn("Could not set video quality of HLS stream, because the HLS support of this browser is native.");case 3:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"currentQuality",get:function(){return this._currentQuality}},{key:"supportsMultiaudio",value:(n=d(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:if(_!==C.MEDIA_SOURCE_EXTENSIONS){t.next=6;break}return t.abrupt("return",this._hls.audioTracks.length>1);case 6:if(_!==C.NATIVE){t.next=10;break}return t.abrupt("return",(null===(e=this.video.audioTracks)||void 0===e?void 0:e.length)>1);case 10:return t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"getAudioTracks",value:(r=d(regeneratorRuntime.mark((function t(){var e,r,n=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:if(_!==C.MEDIA_SOURCE_EXTENSIONS){t.next=7;break}return e=this._hls.audioTracks.map((function(t){return new a.Z({id:t.id,name:t.name,language:t.lang,selected:n._hls.audioTrack===t.id})})),t.abrupt("return",e);case 7:if(_!==C.NATIVE){t.next=12;break}return r=Array.from(this.video.audioTracks).map((function(t){return new a.Z({id:t.id,name:t.label,language:t.language,selected:t.enabled})})),t.abrupt("return",r);case 12:return t.abrupt("return",null);case 13:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"setCurrentAudioTrack",value:(e=d(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.next=4,this.getAudioTracks();case 4:return r=t.sent,n=r.find((function(t){return t.id===e.id})),_===C.MEDIA_SOURCE_EXTENSIONS&&n?this._hls.audioTrack=n.id:_===C.NATIVE&&n&&Array.from(this.video.audioTracks).forEach((function(t){t.id===n.id?t.enabled=!0:t.enabled=!1})),this._currentAudioTrack=n,t.abrupt("return",n);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"currentAudioTrack",get:function(){return this._currentAudioTrack}}]),b}(n.Mp4Video),L=function(t){y(n,t);var e,r=A(n);function n(){return p(this,n),r.apply(this,arguments)}return g(n,[{key:"streamType",get:function(){return"hls"}},{key:"isCompatible",value:function(t){return t.sources.hls&&_}},{key:"getVideoInstance",value:(e=d(regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new R(this.player,e,this.config,r));case 1:case"end":return t.stop()}}),t,this)}))),function(t,r){return e.apply(this,arguments)})}]),n}(i.ZP)},4348:(t,e,r)=>{"use strict";r.r(e),r.d(e,{ImageVideo:()=>b,default:()=>A});var n=r(646),i=(r(1401),r(625));function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),t}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function g(t){var e=this,r=this._currentSource.frames[0];this._currentSource.frames.some((function(t){if(!(t.time<=e._currentTime))return!0;r=t})),this.img.src=r.src}function m(){var t=this;this._startTimestamp=Date.now(),function e(){t._timer=setTimeout(e,250);var r=Date.now(),n=r-t._startTimestamp;t._currentTime+=n/1e3,t._startTimestamp=r,g.apply(t,[t._currentTime])}()}function y(){this._timer&&(clearTimeout(this._timer),this._timer=null)}var b=function(t){f(C,t);var e,r,n,o,a,c,h,p,v,b,A,E,w,k,T=d(C);function C(t,e){var r;return u(this,C),(r=T.call(this,"img",t,e))._currentTime=0,r._startTimesamp=0,r._playbackRate=1,r._timer=null,r.video=r.domElement,r}return l(C,[{key:"play",value:(k=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:m.apply(this);case 1:case"end":return t.stop()}}),t,this)}))),function(){return k.apply(this,arguments)})},{key:"pause",value:(w=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:y.apply(this);case 1:case"end":return t.stop()}}),t,this)}))),function(){return w.apply(this,arguments)})},{key:"duration",value:(E=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._currentSource.duration);case 1:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"currentTimeSync",get:function(){return this._currentTime}},{key:"currentTime",value:(A=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._currentTime);case 1:case"end":return t.stop()}}),t,this)}))),function(){return A.apply(this,arguments)})},{key:"setCurrentTime",value:(b=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this._currentTime=e,g.apply(this,[e]);case 2:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"volume",value:(v=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",0);case 1:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"setVolume",value:(p=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(t){return p.apply(this,arguments)})},{key:"paused",value:(h=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null===this._timer);case 1:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"playbackRate",value:(c=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._playbackRate);case 1:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"setPlaybackRate",value:(a=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this._playbackRate=e;case 1:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"getQualities",value:(o=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._qualities);case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setQuality",value:(n=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"currentQuality",get:function(){return this._currentQuality}},{key:"getDimensions",value:(r=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this._currentSource.res);case 1:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"loadStreamData",value:(e=s(regeneratorRuntime.mark((function t(e){var r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._sources=e.sources.image,this._qualities=this._sources.map((function(t){return new i.Z({src:t.frames[0].src,label:"".concat(t.res.w,"x").concat(t.res.h),shortLabel:"".concat(t.res.h,"p"),width:t.res.w,height:t.res.h})})),this._currentQuality=this._qualities.length-1,this._qualities.forEach((function(t,e){r._qualities[r._currentQuality].compare(t)>0&&(r._currentQuality=e)})),this._currentSource=this._sources[this._currentQuality],this._sources.forEach((function(t){t.frames.sort((function(t,e){return t.time-e.time}))})),t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),C}(n.nk),A=function(t){f(n,t);var e,r=d(n);function n(){return u(this,n),r.apply(this,arguments)}return l(n,[{key:"streamType",get:function(){return"image"}},{key:"isCompatible",value:function(t){return null!=t.sources.image}},{key:"getVideoInstance",value:(e=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new b(this.player,e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),n}(n.ZP)},2604:(t,e,r)=>{"use strict";r.r(e),r.d(e,{supportsVideoType:()=>m,Mp4Video:()=>y,default:()=>b});var n=r(646),i=r(1401);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function a(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),t}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}var g=null;function m(t){if(!t)return!1;g||(g=document.createElement("video"));var e=g.canPlayType(t);return"maybe"===e||"probably"===e}var y=function(t){f(w,t);var e,r,n,o,a,c,h,p,v,g,m,y,b,A,E=d(w);function w(t,e,r){var n;return u(this,w),(n=E.call(this,"video",t,e)).element.setAttribute("playsinline","true"),n.isMainAudio=r,n.element.setAttribute("autoplay","true"),n.element.autoplay=!0,r||(n.element.muted=!0),n}return l(w,[{key:"play",value:(A=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.abrupt("return",this.video.play());case 3:case"end":return t.stop()}}),t,this)}))),function(){return A.apply(this,arguments)})},{key:"pause",value:(b=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.abrupt("return",this.video.pause());case 3:case"end":return t.stop()}}),t,this)}))),function(){return b.apply(this,arguments)})},{key:"duration",value:(y=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.abrupt("return",this.video.duration);case 3:case"end":return t.stop()}}),t,this)}))),function(){return y.apply(this,arguments)})},{key:"currentTimeSync",get:function(){return this.ready?this.video.currentTime:-1}},{key:"currentTime",value:(m=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.abrupt("return",this.currentTimeSync);case 3:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)})},{key:"setCurrentTime",value:(g=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.abrupt("return",this.video.currentTime=e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"volume",value:(v=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.abrupt("return",this.video.volume);case 3:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"setVolume",value:(p=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return 0===e?this.video.setAttribute("muted",!0):this.video.removeAttribute("muted"),t.abrupt("return",this.video.volume=e);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"paused",value:(h=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.abrupt("return",this.video.paused);case 3:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"playbackRate",value:(c=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.next=4,this.video.playbackRate;case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"setPlaybackRate",value:(a=s(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.abrupt("return",this.video.playbackRate=e);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"getQualities",value:(o=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return o.apply(this,arguments)})},{key:"setQuality",value:(n=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"currentQuality",get:function(){}},{key:"getDimensions",value:(r=s(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.waitForLoaded();case 2:return t.abrupt("return",{w:this.video.videoWidth,h:this.video.videoHeight});case 3:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"loadStreamData",value:(e=s(regeneratorRuntime.mark((function t(e){var r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.player.log.debug("es.upv.paella.mp4VideoFormat: loadStreamData"),this._sources=null,this._currentQuality=0,this._sources=e.sources.mp4,this._currentQuality=this._sources.length-1,this._currentSource=this._sources[this._currentQuality],this.isMainAudioPlayer||(this.video.muted=!0),this.video.src=(0,i.resolveResourcePath)(this.player,this._currentSource.src),this.video.addEventListener("ended",(function(){"function"==typeof r._videoEndedCallback&&r._videoEndedCallback()})),t.next=11,this.waitForLoaded();case 11:this.player.log.debug("es.upv.paella.mp4VideoFormat (".concat(this.streamData.content,"): video loaded and ready."));case 12:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"waitForLoaded",value:function(){var t=this;return new Promise((function(e,r){t.ready?e():function r(){t.video.readyState>=2?(t.video.pause(),t._ready=!0,e()):setTimeout((function(){return r()}),100)}()}))}}]),w}(n.nk),b=function(t){f(n,t);var e,r=d(n);function n(){return u(this,n),r.apply(this,arguments)}return l(n,[{key:"streamType",get:function(){return"mp4"}},{key:"isCompatible",value:function(t){var e,r=t.sources.mp4;return r&&m(null===(e=r[0])||void 0===e?void 0:e.mimetype)}},{key:"getVideoInstance",value:(e=s(regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new y(this.player,e,r));case 1:case"end":return t.stop()}}),t,this)}))),function(t,r){return e.apply(this,arguments)})}]),n}(n.ZP)},372:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(4015),i=r.n(n),o=r(3645),a=r.n(o)()(i());a.push([t.id,".button-group {\n}\n\n.button-group .button-plugin-container {\n    display: inline;\n}\n\n.button-group .button-plugin-wrapper {\n    display: flex;\n    flex-direction: row;\n    align-content: center;\n    align-items: center;\n}\n\n.button-group .button-plugin-container button {\n\twidth: 40px;\n\theight: 40px;\n\tdisplay: block;\n\tbackground: none;\n\tborder: none;\n\tfloat: left;\n}\n\n.button-group button:hover {\n\tbackground-color: red;\n}\n\n.button-group button:active {\n\tbackground-color: rgba(0, 0, 0, 0.8);\n}\n\n.button-group button i {\n\tbackground-size: 50% 50%;\n\twidth: 20px;\n\theight: 20px;\n\tdisplay: block;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 3px 7px;\n\tmargin-left: 5px;\n}\n\n/* Fix default iPad button padding */\n.button-group .button-plugin-container button {\n\tpadding: 2px 6px 3px 6px;\n}\n\n.video-container .button-plugin-container button {\n\tpadding: 2px 6px 3px 6px;\n}\n\n.button-group span.button-title {\n    display: block;\n}\n\n.button-group span.button-title.button-title-small {\n\tmargin-top: -16px;\n    font-size: 8px;\n}\n\n.button-group span.button-title.button-title-medium {\n\tmargin-top: -17px;\n    font-size: 10px;\n}\n\n.button-group span.button-title.button-title-large {\n\tmargin-top: -19px;\n    font-size: 12px;\n}\n\n.button-group span.button-title:empty {\n\tmargin-top: 0 !important;\n}\n\n\n.button-group button i svg {\n\tfill: white;\n}\n\n.button-group .button-plugin-wrapper .button-description {\n    font-family: sans-serif;\n    margin-left: 4px;\n\tcursor: pointer;\n\theight: 40px;\n\tline-height: 40px;\n\tpadding-right: 20px;\n\tbox-sizing: border-box;\n\tcolor: lightgray;\n\tuser-select: none;\n}\n\n.button-group .button-plugin-wrapper .button-description:hover {\n    color: white;\n\ttext-shadow:0px 0px 2px white;\n}","",{version:3,sources:["webpack://./src/css/ButtonGroup.css"],names:[],mappings:"AAAA;AACA;;AAEA;IACI,eAAe;AACnB;;AAEA;IACI,aAAa;IACb,mBAAmB;IACnB,qBAAqB;IACrB,mBAAmB;AACvB;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,cAAc;CACd,gBAAgB;CAChB,YAAY;CACZ,WAAW;AACZ;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,oCAAoC;AACrC;;AAEA;CACC,wBAAwB;CACxB,WAAW;CACX,YAAY;CACZ,cAAc;CACd,4BAA4B;CAC5B,4BAA4B;CAC5B,gBAAgB;AACjB;;AAEA,oCAAoC;AACpC;CACC,wBAAwB;AACzB;;AAEA;CACC,wBAAwB;AACzB;;AAEA;IACI,cAAc;AAClB;;AAEA;CACC,iBAAiB;IACd,cAAc;AAClB;;AAEA;CACC,iBAAiB;IACd,eAAe;AACnB;;AAEA;CACC,iBAAiB;IACd,eAAe;AACnB;;AAEA;CACC,wBAAwB;AACzB;;;AAGA;CACC,WAAW;AACZ;;AAEA;IACI,uBAAuB;IACvB,gBAAgB;CACnB,eAAe;CACf,YAAY;CACZ,iBAAiB;CACjB,mBAAmB;CACnB,sBAAsB;CACtB,gBAAgB;CAChB,iBAAiB;AAClB;;AAEA;IACI,YAAY;CACf,6BAA6B;AAC9B",sourcesContent:[".button-group {\n}\n\n.button-group .button-plugin-container {\n    display: inline;\n}\n\n.button-group .button-plugin-wrapper {\n    display: flex;\n    flex-direction: row;\n    align-content: center;\n    align-items: center;\n}\n\n.button-group .button-plugin-container button {\n\twidth: 40px;\n\theight: 40px;\n\tdisplay: block;\n\tbackground: none;\n\tborder: none;\n\tfloat: left;\n}\n\n.button-group button:hover {\n\tbackground-color: red;\n}\n\n.button-group button:active {\n\tbackground-color: rgba(0, 0, 0, 0.8);\n}\n\n.button-group button i {\n\tbackground-size: 50% 50%;\n\twidth: 20px;\n\theight: 20px;\n\tdisplay: block;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 3px 7px;\n\tmargin-left: 5px;\n}\n\n/* Fix default iPad button padding */\n.button-group .button-plugin-container button {\n\tpadding: 2px 6px 3px 6px;\n}\n\n.video-container .button-plugin-container button {\n\tpadding: 2px 6px 3px 6px;\n}\n\n.button-group span.button-title {\n    display: block;\n}\n\n.button-group span.button-title.button-title-small {\n\tmargin-top: -16px;\n    font-size: 8px;\n}\n\n.button-group span.button-title.button-title-medium {\n\tmargin-top: -17px;\n    font-size: 10px;\n}\n\n.button-group span.button-title.button-title-large {\n\tmargin-top: -19px;\n    font-size: 12px;\n}\n\n.button-group span.button-title:empty {\n\tmargin-top: 0 !important;\n}\n\n\n.button-group button i svg {\n\tfill: white;\n}\n\n.button-group .button-plugin-wrapper .button-description {\n    font-family: sans-serif;\n    margin-left: 4px;\n\tcursor: pointer;\n\theight: 40px;\n\tline-height: 40px;\n\tpadding-right: 20px;\n\tbox-sizing: border-box;\n\tcolor: lightgray;\n\tuser-select: none;\n}\n\n.button-group .button-plugin-wrapper .button-description:hover {\n    color: white;\n\ttext-shadow:0px 0px 2px white;\n}"],sourceRoot:""}]);const s=a},7046:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(4015),i=r.n(n),o=r(3645),a=r.n(o)()(i());a.push([t.id,".captions-canvas {\n    position: absolute;\n    top: 0px;\n    left: 0px;\n    bottom: 0px;\n    width: 100%;\n    height: 100%;\n    z-index: 50;\n    pointer-events: none;\n}\n\n.captions-canvas .captions-container {\n    width: 80%;\n    min-height: 30px;\n    background-color: rgba(0,0,0,0.78);\n    border-radius: 5px;\n    color: white;\n    position: absolute;\n    bottom: 55px;\n    left: 10%;\n    right: 10%;\n    box-sizing: border-box;\n    padding: 10px;\n    font-size: 11px;\n    text-align: center;\n}\n","",{version:3,sources:["webpack://./src/css/CaptionCanvas.css"],names:[],mappings:"AAAA;IACI,kBAAkB;IAClB,QAAQ;IACR,SAAS;IACT,WAAW;IACX,WAAW;IACX,YAAY;IACZ,WAAW;IACX,oBAAoB;AACxB;;AAEA;IACI,UAAU;IACV,gBAAgB;IAChB,kCAAkC;IAClC,kBAAkB;IAClB,YAAY;IACZ,kBAAkB;IAClB,YAAY;IACZ,SAAS;IACT,UAAU;IACV,sBAAsB;IACtB,aAAa;IACb,eAAe;IACf,kBAAkB;AACtB",sourcesContent:[".captions-canvas {\n    position: absolute;\n    top: 0px;\n    left: 0px;\n    bottom: 0px;\n    width: 100%;\n    height: 100%;\n    z-index: 50;\n    pointer-events: none;\n}\n\n.captions-canvas .captions-container {\n    width: 80%;\n    min-height: 30px;\n    background-color: rgba(0,0,0,0.78);\n    border-radius: 5px;\n    color: white;\n    position: absolute;\n    bottom: 55px;\n    left: 10%;\n    right: 10%;\n    box-sizing: border-box;\n    padding: 10px;\n    font-size: 11px;\n    text-align: center;\n}\n"],sourceRoot:""}]);const s=a},1872:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(4015),i=r.n(n),o=r(3645),a=r.n(o)()(i());a.push([t.id,"\nul.menu-button-content {\n\tlist-style-type: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\nul.menu-button-content li.menu-button-item {\n\tmin-width:40px;\n}\n\nul.menu-button-content li.menu-button-item button {\n\tbackground: none;\n\tborder: none;\n\twidth: 100%;\n\tcolor: white;\n\tdisplay: flex;\n\tjustify-content: space-around;\n}\n\nul.menu-button-content li.menu-button-item button:hover {\n\tbackground-color: #A00;\n}\n\nul.menu-button-content li.menu-button-item button.selected {\n\tbackground-color: red;\n}\n\nul.menu-button-content li.menu-button-item button i.menu-icon {\n\tpointer-events: none;\n}\n\nul.menu-button-content li.menu-button-item button i.menu-icon svg {\n\tfill: white;\n\theight: 40px;\n}\n\nul.menu-button-content li.menu-button-item button span.menu-title {\n\theight: 40px;\n\tline-height: 40px;\n\tpadding-left: 4px;\n\tpadding-right: 4px;\n\tpointer-events: none;\n}","",{version:3,sources:["webpack://./src/css/MenuButton.css"],names:[],mappings:";AACA;CACC,qBAAqB;CACrB,SAAS;CACT,UAAU;AACX;;AAEA;CACC,cAAc;AACf;;AAEA;CACC,gBAAgB;CAChB,YAAY;CACZ,WAAW;CACX,YAAY;CACZ,aAAa;CACb,6BAA6B;AAC9B;;AAEA;CACC,sBAAsB;AACvB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,oBAAoB;AACrB;;AAEA;CACC,WAAW;CACX,YAAY;AACb;;AAEA;CACC,YAAY;CACZ,iBAAiB;CACjB,iBAAiB;CACjB,kBAAkB;CAClB,oBAAoB;AACrB",sourcesContent:["\nul.menu-button-content {\n\tlist-style-type: none;\n\tmargin: 0;\n\tpadding: 0;\n}\n\nul.menu-button-content li.menu-button-item {\n\tmin-width:40px;\n}\n\nul.menu-button-content li.menu-button-item button {\n\tbackground: none;\n\tborder: none;\n\twidth: 100%;\n\tcolor: white;\n\tdisplay: flex;\n\tjustify-content: space-around;\n}\n\nul.menu-button-content li.menu-button-item button:hover {\n\tbackground-color: #A00;\n}\n\nul.menu-button-content li.menu-button-item button.selected {\n\tbackground-color: red;\n}\n\nul.menu-button-content li.menu-button-item button i.menu-icon {\n\tpointer-events: none;\n}\n\nul.menu-button-content li.menu-button-item button i.menu-icon svg {\n\tfill: white;\n\theight: 40px;\n}\n\nul.menu-button-content li.menu-button-item button span.menu-title {\n\theight: 40px;\n\tline-height: 40px;\n\tpadding-left: 4px;\n\tpadding-right: 4px;\n\tpointer-events: none;\n}"],sourceRoot:""}]);const s=a},9167:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(4015),i=r.n(n),o=r(3645),a=r.n(o)()(i());a.push([t.id,"\n.playback-bar {\n\tposition: absolute;\n\tbottom: 0px;\n\tleft: 0px;\n\tright: 0px;\n\tbackground: rgb(32,32,32);\n\tbackground: linear-gradient(0deg, rgba(32,32,32,1) 0%, rgba(32,32,32,0.49531687675070024) 72%, rgba(32,32,32,0.08355217086834732) 100%);\n\tz-index: 100;\n}\n\n.playback-bar:hover {\n\tbackground: rgb(32,32,32,0.8);\n}\n\n.progress-indicator {\n\twidth: 100%;\n\theight: 10px;\n}\n\n.progress-indicator-timer {\n\tposition: absolute;\n\tleft: 0px;\n\ttop: 0px;\n\tcolor: white;\n\tfont-size: 10px;\n\tline-height: 11px;\n\tpadding-left: 11px;\n\tpointer-events: none;\n}\n\n.playback-bar .button-plugins {\n\theight: 40px;\n}\n\n.playback-bar .button-plugins.left-side {\n\tfloat: left;\n}\n\n.playback-bar .button-plugins.right-side {\n\tfloat: right;\n}\n\n.playback-bar .button-plugins .button-plugin-container {\n\tdisplay: inline;\n}\n\n.playback-bar .button-plugins .button-plugin-container button {\n\twidth: 40px;\n\theight: 40px;\n\tdisplay: block;\n\tbackground: none;\n\t/*outline: none;*/\n\tborder: none;\n\tfloat: left;\n}\n\n.playback-bar .button-plugins button:hover {\n\tbackground-color: red;\n}\n\n.playback-bar .button-plugins button:active {\n\tbackground-color: rgba(0, 0, 0, 0.8);\n}\n\n.playback-bar .button-plugins button i {\n\tbackground-size: 50% 50%;\n\twidth: 20px;\n\theight: 20px;\n\tdisplay: block;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 3px 7px;\n\tmargin-left: 5px;\n}\n\n/* Fix default iPad button padding */\n.playback-bar .button-plugins .button-plugin-container button {\n\tpadding: 2px 6px 3px 6px;\n}\n.video-container .button-plugins .button-plugin-container button {\n\tpadding: 2px 6px 3px 6px;\n}\n\n.button-plugins span.button-title {\n    display: block;\n}\n\n.button-plugins span.button-title.button-title-small {\n\tmargin-top: -16px;\n    font-size: 8px;\n}\n\n.button-plugins span.button-title.button-title-medium {\n\tmargin-top: -17px;\n    font-size: 10px;\n}\n\n.button-plugins span.button-title.button-title-large {\n\tmargin-top: -19px;\n    font-size: 12px;\n}\n\n.button-plugins span.button-title:empty {\n\tmargin-top: 0 !important;\n}\n\n\n.playback-bar .button-plugins button i svg {\n\tfill: white;\n}\n\n.playback-bar .button-plugin-side-area {\n\tdisplay: inline;\n\tcolor: white;\n\theight: 40px;\n\tline-height: 40px;\n}\n\n.progress-indicator {\n\tposition: relative;\n}\n\n.progress-indicator canvas {\n\tposition: absolute;\n\tleft: 0px;\n\ttop: 0px;\n\tpointer-events: none;\n\topacity: 0.5;\n}\n\n.playback-bar:hover .progress-indicator canvas {\n\topacity: 1;\n}\n\n.progress-indicator .progress-indicator-container {\n\tposition: absolute;\n\tleft: 0px;\n\ttop: 0px;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.progress-indicator-container .progress-indicator-content {\n\theight: 100%;\n\tbackground-color: rgba(255,0,0,0.5);\n\tpointer-events: none;\n}\n\n.playback-bar:hover .progress-indicator-container .progress-indicator-content {\n\tbackground-color: rgba(255,0,0,1);\n}\n\n.frame-thumbnail {\n\tbackground-color: rgba(20, 20, 20, 0.8);\n\tmin-width: 100px;\n\tmin-height: 100px;\n\tbox-shadow: 0px 0px 5px 0px rgba(20,20,20,0.8);\n\tz-index: 10000;\n\tpointer-events: none;\n}\n\n.frame-thumbnail .thumbnail-image {\n\tpointer-events: none;\n}\n\n@media (max-width: 500px) {\n\t.frame-thumbnail .thumbnail-image {\n\t\twidth: 130px;\n\t\tpointer-events: none;\n\t}\n}\n\n@media (max-width: 750px) {\n\t.frame-thumbnail .thumbnail-image {\n\t\twidth: 230px;\n\t\tpointer-events: none;\n\t}\n}\n\n@media (min-width: 750px) {\n\t.frame-thumbnail .thumbnail-image {\n\t\twidth: 330px;\n\t\tpointer-events: none;\n\t}\n}\n\n.frame-thumbnail .thumbnail-time {\n\tpointer-events: none;\n\tfont-size: 12px;\n\tline-height: 12px;\n\tdisplay: block;\n\theight: 12px;\n\tcolor: white;\n\ttext-align: center;\n\tmargin: 0;\n\tpadding: 1;\n}\n\n","",{version:3,sources:["webpack://./src/css/PlaybackBar.css"],names:[],mappings:";AACA;CACC,kBAAkB;CAClB,WAAW;CACX,SAAS;CACT,UAAU;CACV,yBAAyB;CACzB,uIAAuI;CACvI,YAAY;AACb;;AAEA;CACC,6BAA6B;AAC9B;;AAEA;CACC,WAAW;CACX,YAAY;AACb;;AAEA;CACC,kBAAkB;CAClB,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,eAAe;CACf,iBAAiB;CACjB,kBAAkB;CAClB,oBAAoB;AACrB;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,YAAY;AACb;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,cAAc;CACd,gBAAgB;CAChB,iBAAiB;CACjB,YAAY;CACZ,WAAW;AACZ;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,oCAAoC;AACrC;;AAEA;CACC,wBAAwB;CACxB,WAAW;CACX,YAAY;CACZ,cAAc;CACd,4BAA4B;CAC5B,4BAA4B;CAC5B,gBAAgB;AACjB;;AAEA,oCAAoC;AACpC;CACC,wBAAwB;AACzB;AACA;CACC,wBAAwB;AACzB;;AAEA;IACI,cAAc;AAClB;;AAEA;CACC,iBAAiB;IACd,cAAc;AAClB;;AAEA;CACC,iBAAiB;IACd,eAAe;AACnB;;AAEA;CACC,iBAAiB;IACd,eAAe;AACnB;;AAEA;CACC,wBAAwB;AACzB;;;AAGA;CACC,WAAW;AACZ;;AAEA;CACC,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,iBAAiB;AAClB;;AAEA;CACC,kBAAkB;AACnB;;AAEA;CACC,kBAAkB;CAClB,SAAS;CACT,QAAQ;CACR,oBAAoB;CACpB,YAAY;AACb;;AAEA;CACC,UAAU;AACX;;AAEA;CACC,kBAAkB;CAClB,SAAS;CACT,QAAQ;CACR,WAAW;CACX,YAAY;AACb;;AAEA;CACC,YAAY;CACZ,mCAAmC;CACnC,oBAAoB;AACrB;;AAEA;CACC,iCAAiC;AAClC;;AAEA;CACC,uCAAuC;CACvC,gBAAgB;CAChB,iBAAiB;CACjB,8CAA8C;CAC9C,cAAc;CACd,oBAAoB;AACrB;;AAEA;CACC,oBAAoB;AACrB;;AAEA;CACC;EACC,YAAY;EACZ,oBAAoB;CACrB;AACD;;AAEA;CACC;EACC,YAAY;EACZ,oBAAoB;CACrB;AACD;;AAEA;CACC;EACC,YAAY;EACZ,oBAAoB;CACrB;AACD;;AAEA;CACC,oBAAoB;CACpB,eAAe;CACf,iBAAiB;CACjB,cAAc;CACd,YAAY;CACZ,YAAY;CACZ,kBAAkB;CAClB,SAAS;CACT,UAAU;AACX",sourcesContent:["\n.playback-bar {\n\tposition: absolute;\n\tbottom: 0px;\n\tleft: 0px;\n\tright: 0px;\n\tbackground: rgb(32,32,32);\n\tbackground: linear-gradient(0deg, rgba(32,32,32,1) 0%, rgba(32,32,32,0.49531687675070024) 72%, rgba(32,32,32,0.08355217086834732) 100%);\n\tz-index: 100;\n}\n\n.playback-bar:hover {\n\tbackground: rgb(32,32,32,0.8);\n}\n\n.progress-indicator {\n\twidth: 100%;\n\theight: 10px;\n}\n\n.progress-indicator-timer {\n\tposition: absolute;\n\tleft: 0px;\n\ttop: 0px;\n\tcolor: white;\n\tfont-size: 10px;\n\tline-height: 11px;\n\tpadding-left: 11px;\n\tpointer-events: none;\n}\n\n.playback-bar .button-plugins {\n\theight: 40px;\n}\n\n.playback-bar .button-plugins.left-side {\n\tfloat: left;\n}\n\n.playback-bar .button-plugins.right-side {\n\tfloat: right;\n}\n\n.playback-bar .button-plugins .button-plugin-container {\n\tdisplay: inline;\n}\n\n.playback-bar .button-plugins .button-plugin-container button {\n\twidth: 40px;\n\theight: 40px;\n\tdisplay: block;\n\tbackground: none;\n\t/*outline: none;*/\n\tborder: none;\n\tfloat: left;\n}\n\n.playback-bar .button-plugins button:hover {\n\tbackground-color: red;\n}\n\n.playback-bar .button-plugins button:active {\n\tbackground-color: rgba(0, 0, 0, 0.8);\n}\n\n.playback-bar .button-plugins button i {\n\tbackground-size: 50% 50%;\n\twidth: 20px;\n\theight: 20px;\n\tdisplay: block;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 3px 7px;\n\tmargin-left: 5px;\n}\n\n/* Fix default iPad button padding */\n.playback-bar .button-plugins .button-plugin-container button {\n\tpadding: 2px 6px 3px 6px;\n}\n.video-container .button-plugins .button-plugin-container button {\n\tpadding: 2px 6px 3px 6px;\n}\n\n.button-plugins span.button-title {\n    display: block;\n}\n\n.button-plugins span.button-title.button-title-small {\n\tmargin-top: -16px;\n    font-size: 8px;\n}\n\n.button-plugins span.button-title.button-title-medium {\n\tmargin-top: -17px;\n    font-size: 10px;\n}\n\n.button-plugins span.button-title.button-title-large {\n\tmargin-top: -19px;\n    font-size: 12px;\n}\n\n.button-plugins span.button-title:empty {\n\tmargin-top: 0 !important;\n}\n\n\n.playback-bar .button-plugins button i svg {\n\tfill: white;\n}\n\n.playback-bar .button-plugin-side-area {\n\tdisplay: inline;\n\tcolor: white;\n\theight: 40px;\n\tline-height: 40px;\n}\n\n.progress-indicator {\n\tposition: relative;\n}\n\n.progress-indicator canvas {\n\tposition: absolute;\n\tleft: 0px;\n\ttop: 0px;\n\tpointer-events: none;\n\topacity: 0.5;\n}\n\n.playback-bar:hover .progress-indicator canvas {\n\topacity: 1;\n}\n\n.progress-indicator .progress-indicator-container {\n\tposition: absolute;\n\tleft: 0px;\n\ttop: 0px;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.progress-indicator-container .progress-indicator-content {\n\theight: 100%;\n\tbackground-color: rgba(255,0,0,0.5);\n\tpointer-events: none;\n}\n\n.playback-bar:hover .progress-indicator-container .progress-indicator-content {\n\tbackground-color: rgba(255,0,0,1);\n}\n\n.frame-thumbnail {\n\tbackground-color: rgba(20, 20, 20, 0.8);\n\tmin-width: 100px;\n\tmin-height: 100px;\n\tbox-shadow: 0px 0px 5px 0px rgba(20,20,20,0.8);\n\tz-index: 10000;\n\tpointer-events: none;\n}\n\n.frame-thumbnail .thumbnail-image {\n\tpointer-events: none;\n}\n\n@media (max-width: 500px) {\n\t.frame-thumbnail .thumbnail-image {\n\t\twidth: 130px;\n\t\tpointer-events: none;\n\t}\n}\n\n@media (max-width: 750px) {\n\t.frame-thumbnail .thumbnail-image {\n\t\twidth: 230px;\n\t\tpointer-events: none;\n\t}\n}\n\n@media (min-width: 750px) {\n\t.frame-thumbnail .thumbnail-image {\n\t\twidth: 330px;\n\t\tpointer-events: none;\n\t}\n}\n\n.frame-thumbnail .thumbnail-time {\n\tpointer-events: none;\n\tfont-size: 12px;\n\tline-height: 12px;\n\tdisplay: block;\n\theight: 12px;\n\tcolor: white;\n\ttext-align: center;\n\tmargin: 0;\n\tpadding: 1;\n}\n\n"],sourceRoot:""}]);const s=a},6777:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(4015),i=r.n(n),o=r(3645),a=r.n(o)()(i());a.push([t.id,".popup-container {\n\tz-index: 1000;\n\tposition: absolute;\n\ttop: 0px;\n\tleft: 0px;\n\theight: 100vh;\n\twidth: 100vw;\n}\n\n.popup-container.no-modal {\n\tpointer-events: none;;\n}\n\n.popup-content {\n\tposition: absolute;\n\tbackground-color: rgba(10, 10, 10, 0.8);\n\tcolor: white;\n\tbox-shadow: 0px 0px 4px 0px rgba(10, 10, 10, 0.8);\n\tborder-radius: 3px;\n\tpadding: 5px 5px 5px 5px;\n}\n\n.popup-container.no-modal .popup-content {\n\tpointer-events: all;\n}","",{version:3,sources:["webpack://./src/css/PopUp.css"],names:[],mappings:"AAAA;CACC,aAAa;CACb,kBAAkB;CAClB,QAAQ;CACR,SAAS;CACT,aAAa;CACb,YAAY;AACb;;AAEA;CACC,oBAAoB;AACrB;;AAEA;CACC,kBAAkB;CAClB,uCAAuC;CACvC,YAAY;CACZ,iDAAiD;CACjD,kBAAkB;CAClB,wBAAwB;AACzB;;AAEA;CACC,mBAAmB;AACpB",sourcesContent:[".popup-container {\n\tz-index: 1000;\n\tposition: absolute;\n\ttop: 0px;\n\tleft: 0px;\n\theight: 100vh;\n\twidth: 100vw;\n}\n\n.popup-container.no-modal {\n\tpointer-events: none;;\n}\n\n.popup-content {\n\tposition: absolute;\n\tbackground-color: rgba(10, 10, 10, 0.8);\n\tcolor: white;\n\tbox-shadow: 0px 0px 4px 0px rgba(10, 10, 10, 0.8);\n\tborder-radius: 3px;\n\tpadding: 5px 5px 5px 5px;\n}\n\n.popup-container.no-modal .popup-content {\n\tpointer-events: all;\n}"],sourceRoot:""}]);const s=a},5352:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(4015),i=r.n(n),o=r(3645),a=r.n(o)()(i());a.push([t.id,".timeline-popup-content {\n    display: block;\n    background-color: rgba(50,50,50,0.78);\n    padding-top: 10px;\n    padding-bottom: 10px;\n    position: absolute;\n    border-radius: 4px;\n    left: 2px;\n    right: 2px;\n    bottom: 52px;\n    color: white;\n    border-top: 1px solid rgba(125,125,125,0.4);\n    z-index: 100;\n}\n","",{version:3,sources:["webpack://./src/css/TimeLinePopUp.css"],names:[],mappings:"AAAA;IACI,cAAc;IACd,qCAAqC;IACrC,iBAAiB;IACjB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,SAAS;IACT,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,2CAA2C;IAC3C,YAAY;AAChB",sourcesContent:[".timeline-popup-content {\n    display: block;\n    background-color: rgba(50,50,50,0.78);\n    padding-top: 10px;\n    padding-bottom: 10px;\n    position: absolute;\n    border-radius: 4px;\n    left: 2px;\n    right: 2px;\n    bottom: 52px;\n    color: white;\n    border-top: 1px solid rgba(125,125,125,0.4);\n    z-index: 100;\n}\n"],sourceRoot:""}]);const s=a},7674:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(4015),i=r.n(n),o=r(3645),a=r.n(o)()(i());a.push([t.id,"\n.video-container {\n    background-color: #e4e4e4;\n    width: 100%;\n    height: 100%;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n}\n\n.base-video-rect {\n    background-color: #8a8a8a;\n    position: relative;\n}\n\n.video-container .button-plugins {\n    position: absolute;\n    top: 10px;\n    height: 40px;\n\tz-index: 100;\n}\n\n.video-container .button-plugins.left-side {\n    left: 10px;\n}\n\n.video-container .button-plugins.right-side {\n    right: 10px;\n}\n\n.video-container .user-area {\n\tposition: absolute;\n    width: 100%;\n    height: 100%;\n    top: 0px;\n    left: 0px;\n    pointer-events: none;\n}\n\n.video-container .button-plugins .button-plugin-container {\n\tdisplay: inline;\n}\n\n.video-container .button-plugins .button-plugin-container button {\n\twidth: 40px;\n\theight: 40px;\n\tdisplay: block;\n\tbackground-color: rgba(50,50,50,0.7);\n    border-radius: 6px;\n\tborder: none;\n\tfloat: left;\n\tmargin-left: 2px;\n    margin-right: 2px;\n}\n\n.video-container .button-plugins button:hover {\n\tbackground-color: red;\n}\n\n.video-container .button-plugins button:active {\n\tbackground-color: rgba(0, 0, 0, 0.8);\n}\n\n.video-container .button-plugins button i {\n\tbackground-size: 50% 50%;\n\twidth: 20px;\n\theight: 20px;\n\tdisplay: block;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 3px 7px;\n\tmargin-left: 5px;\n}\n\n.video-container .button-plugins button i svg {\n\tfill: white;\n}\n\n.video-container .button-plugin-side-area {\n\tdisplay: inline;\n\tcolor: white;\n\theight: 40px;\n\tline-height: 40px;\n}","",{version:3,sources:["webpack://./src/css/VideoContainer.css"],names:[],mappings:";AACA;IACI,yBAAyB;IACzB,WAAW;IACX,YAAY;IACZ,aAAa;IACb,mBAAmB;IACnB,uBAAuB;AAC3B;;AAEA;IACI,yBAAyB;IACzB,kBAAkB;AACtB;;AAEA;IACI,kBAAkB;IAClB,SAAS;IACT,YAAY;CACf,YAAY;AACb;;AAEA;IACI,UAAU;AACd;;AAEA;IACI,WAAW;AACf;;AAEA;CACC,kBAAkB;IACf,WAAW;IACX,YAAY;IACZ,QAAQ;IACR,SAAS;IACT,oBAAoB;AACxB;;AAEA;CACC,eAAe;AAChB;;AAEA;CACC,WAAW;CACX,YAAY;CACZ,cAAc;CACd,oCAAoC;IACjC,kBAAkB;CACrB,YAAY;CACZ,WAAW;CACX,gBAAgB;IACb,iBAAiB;AACrB;;AAEA;CACC,qBAAqB;AACtB;;AAEA;CACC,oCAAoC;AACrC;;AAEA;CACC,wBAAwB;CACxB,WAAW;CACX,YAAY;CACZ,cAAc;CACd,4BAA4B;CAC5B,4BAA4B;CAC5B,gBAAgB;AACjB;;AAEA;CACC,WAAW;AACZ;;AAEA;CACC,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,iBAAiB;AAClB",sourcesContent:["\n.video-container {\n    background-color: #e4e4e4;\n    width: 100%;\n    height: 100%;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n}\n\n.base-video-rect {\n    background-color: #8a8a8a;\n    position: relative;\n}\n\n.video-container .button-plugins {\n    position: absolute;\n    top: 10px;\n    height: 40px;\n\tz-index: 100;\n}\n\n.video-container .button-plugins.left-side {\n    left: 10px;\n}\n\n.video-container .button-plugins.right-side {\n    right: 10px;\n}\n\n.video-container .user-area {\n\tposition: absolute;\n    width: 100%;\n    height: 100%;\n    top: 0px;\n    left: 0px;\n    pointer-events: none;\n}\n\n.video-container .button-plugins .button-plugin-container {\n\tdisplay: inline;\n}\n\n.video-container .button-plugins .button-plugin-container button {\n\twidth: 40px;\n\theight: 40px;\n\tdisplay: block;\n\tbackground-color: rgba(50,50,50,0.7);\n    border-radius: 6px;\n\tborder: none;\n\tfloat: left;\n\tmargin-left: 2px;\n    margin-right: 2px;\n}\n\n.video-container .button-plugins button:hover {\n\tbackground-color: red;\n}\n\n.video-container .button-plugins button:active {\n\tbackground-color: rgba(0, 0, 0, 0.8);\n}\n\n.video-container .button-plugins button i {\n\tbackground-size: 50% 50%;\n\twidth: 20px;\n\theight: 20px;\n\tdisplay: block;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 3px 7px;\n\tmargin-left: 5px;\n}\n\n.video-container .button-plugins button i svg {\n\tfill: white;\n}\n\n.video-container .button-plugin-side-area {\n\tdisplay: inline;\n\tcolor: white;\n\theight: 40px;\n\tline-height: 40px;\n}"],sourceRoot:""}]);const s=a},2323:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(4015),i=r.n(n),o=r(3645),a=r.n(o)()(i());a.push([t.id,".video-layout-button {\n\tborder: none;\n\tborder-radius: 10%;\n\tbox-shadow: 1px 1px 5px 0px rgba(0, 0, 0, 0.9);\n\tbackground-size: 100% 100%;\n\tdisplay: block;\n\tposition: absolute;\n\tbackground-color: lightgray;\n\tpadding: 0.5%;\n}\n\n.video-layout-button:hover {\n\tbackground-color: #9b9b9b;\n}\n\n.video-layout-button:active {\n\tbackground-color: #202020;\n}\n\n.video-player {\n\tbox-shadow: 2px 2px 4px 0px rgba(90,90,90,0.8);\n}","",{version:3,sources:["webpack://./src/css/VideoLayout.css"],names:[],mappings:"AAAA;CACC,YAAY;CACZ,kBAAkB;CAClB,8CAA8C;CAC9C,0BAA0B;CAC1B,cAAc;CACd,kBAAkB;CAClB,2BAA2B;CAC3B,aAAa;AACd;;AAEA;CACC,yBAAyB;AAC1B;;AAEA;CACC,yBAAyB;AAC1B;;AAEA;CACC,8CAA8C;AAC/C",sourcesContent:[".video-layout-button {\n\tborder: none;\n\tborder-radius: 10%;\n\tbox-shadow: 1px 1px 5px 0px rgba(0, 0, 0, 0.9);\n\tbackground-size: 100% 100%;\n\tdisplay: block;\n\tposition: absolute;\n\tbackground-color: lightgray;\n\tpadding: 0.5%;\n}\n\n.video-layout-button:hover {\n\tbackground-color: #9b9b9b;\n}\n\n.video-layout-button:active {\n\tbackground-color: #202020;\n}\n\n.video-player {\n\tbox-shadow: 2px 2px 4px 0px rgba(90,90,90,0.8);\n}"],sourceRoot:""}]);const s=a},7945:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(4015),i=r.n(n),o=r(3645),a=r.n(o)()(i());a.push([t.id,".player-container {\n    position: relative;\n}\n\nsvg {\n    pointer-events: none;\n}","",{version:3,sources:["webpack://./src/css/base.css"],names:[],mappings:"AAAA;IACI,kBAAkB;AACtB;;AAEA;IACI,oBAAoB;AACxB",sourcesContent:[".player-container {\n    position: relative;\n}\n\nsvg {\n    pointer-events: none;\n}"],sourceRoot:""}]);const s=a},3645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(n)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var u=[].concat(t[s]);n&&i[u[0]]||(r&&(u[2]?u[2]="".concat(r," and ").concat(u[2]):u[2]=r),e.push(u))}},e}},4015:t=>{"use strict";function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}t.exports=function(t){var r,n=(4,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),4!==r.length);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(r)||function(t,r){if(t){if("string"==typeof t)return e(t,4);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,4):void 0}}(r)||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.")}()),i=n[1],o=n[3];if("function"==typeof btoa){var a=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),u="/*# ".concat(s," */"),c=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[i].concat(c).concat([u]).join("\n")}return[i].join("\n")}},7631:function(t){var e;"undefined"!=typeof window&&(e=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/dist/",r(r.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,i="~";function o(){}function a(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function s(t,e,r,n,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new a(r,n||t,o),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function u(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)n.call(t,e)&&r.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},c.prototype.listeners=function(t){var e=i?i+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,o=r.length,a=new Array(o);n<o;n++)a[n]=r[n].fn;return a},c.prototype.listenerCount=function(t){var e=i?i+t:t,r=this._events[e];return r?r.fn?1:r.length:0},c.prototype.emit=function(t,e,r,n,o,a){var s=i?i+t:t;if(!this._events[s])return!1;var u,c,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,n),!0;case 5:return l.fn.call(l.context,e,r,n,o),!0;case 6:return l.fn.call(l.context,e,r,n,o,a),!0}for(c=1,u=new Array(f-1);c<f;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var h,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),f){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,e);break;case 3:l[c].fn.call(l[c].context,e,r);break;case 4:l[c].fn.call(l[c].context,e,r,n);break;default:if(!u)for(h=1,u=new Array(f-1);h<f;h++)u[h-1]=arguments[h];l[c].fn.apply(l[c].context,u)}}return!0},c.prototype.on=function(t,e,r){return s(this,t,e,r,!1)},c.prototype.once=function(t,e,r){return s(this,t,e,r,!0)},c.prototype.removeListener=function(t,e,r,n){var o=i?i+t:t;if(!this._events[o])return this;if(!e)return u(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||n&&!a.once||r&&a.context!==r||u(this,o);else{for(var s=0,c=[],l=a.length;s<l;s++)(a[s].fn!==e||n&&!a[s].once||r&&a[s].context!==r)&&c.push(a[s]);c.length?this._events[o]=1===c.length?c[0]:c:u(this,o)}return this},c.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&u(this,e)):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=i,c.EventEmitter=c,t.exports=c},"./node_modules/url-toolkit/src/url-toolkit.js":function(t,e,r){var n,i,o,a,s;n=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,i=/^([^\/?#]*)([^]*)$/,o=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,s={buildAbsoluteURL:function(t,e,r){if(r=r||{},t=t.trim(),!(e=e.trim())){if(!r.alwaysNormalize)return t;var n=s.parseURL(t);if(!n)throw new Error("Error trying to parse base URL.");return n.path=s.normalizePath(n.path),s.buildURLFromParts(n)}var o=s.parseURL(e);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return r.alwaysNormalize?(o.path=s.normalizePath(o.path),s.buildURLFromParts(o)):e;var a=s.parseURL(t);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var u=i.exec(a.path);a.netLoc=u[1],a.path=u[2]}a.netLoc&&!a.path&&(a.path="/");var c={scheme:a.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(c.netLoc=a.netLoc,"/"!==o.path[0]))if(o.path){var l=a.path,f=l.substring(0,l.lastIndexOf("/")+1)+o.path;c.path=s.normalizePath(f)}else c.path=a.path,o.params||(c.params=a.params,o.query||(c.query=a.query));return null===c.path&&(c.path=r.alwaysNormalize?s.normalizePath(o.path):o.path),s.buildURLFromParts(c)},parseURL:function(t){var e=n.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(o,"");t.length!==(t=t.replace(a,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=s},"./node_modules/webworkify-webpack/index.js":function(t,e,r){function n(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r.oe=function(t){throw console.error(t),t};var n=r(r.s=ENTRY_MODULE);return n.default||n}var i="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function o(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function a(t,e,n){var a={};a[n]=[];var s=e.toString(),u=s.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!u)return a;for(var c,l=u[1],f=new RegExp("(\\\\n|\\W)"+o(l)+i,"g");c=f.exec(s);)"dll-reference"!==c[3]&&a[n].push(c[3]);for(f=new RegExp("\\("+o(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)'+i,"g");c=f.exec(s);)t[c[2]]||(a[n].push(c[1]),t[c[2]]=r(c[1]).m),a[c[2]]=a[c[2]]||[],a[c[2]].push(c[4]);for(var h,d=Object.keys(a),p=0;p<d.length;p++)for(var v=0;v<a[d[p]].length;v++)h=a[d[p]][v],isNaN(1*h)||(a[d[p]][v]=1*a[d[p]][v]);return a}function s(t){return Object.keys(t).reduce((function(e,r){return e||t[r].length>0}),!1)}t.exports=function(t,e){e=e||{};var i={main:r.m},o=e.all?{main:Object.keys(i.main)}:function(t,e){for(var r={main:[e]},n={main:[]},i={main:{}};s(r);)for(var o=Object.keys(r),u=0;u<o.length;u++){var c=o[u],l=r[c].pop();if(i[c]=i[c]||{},!i[c][l]&&t[c][l]){i[c][l]=!0,n[c]=n[c]||[],n[c].push(l);for(var f=a(t,t[c][l],c),h=Object.keys(f),d=0;d<h.length;d++)r[h[d]]=r[h[d]]||[],r[h[d]]=r[h[d]].concat(f[h[d]])}}return n}(i,t),u="";Object.keys(o).filter((function(t){return"main"!==t})).forEach((function(t){for(var e=0;o[t][e];)e++;o[t].push(e),i[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",u=u+"var "+t+" = ("+n.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+o[t].map((function(e){return JSON.stringify(e)+": "+i[t][e].toString()})).join(",")+"});\n"})),u=u+"new (("+n.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+o.main.map((function(t){return JSON.stringify(t)+": "+i.main[t].toString()})).join(",")+"}))(self);";var c=new window.Blob([u],{type:"text/javascript"});if(e.bare)return c;var l=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(c),f=new window.Worker(l);return f.objectURL=l,f}},"./src/config.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"hlsDefaultConfig",(function(){return w})),r.d(e,"mergeConfig",(function(){return k})),r.d(e,"enableStreamingMode",(function(){return T}));var n=r("./src/controller/abr-controller.ts"),i=r("./src/controller/audio-stream-controller.ts"),o=r("./src/controller/audio-track-controller.ts"),a=r("./src/controller/subtitle-stream-controller.ts"),s=r("./src/controller/subtitle-track-controller.ts"),u=r("./src/controller/buffer-controller.ts"),c=r("./src/controller/timeline-controller.ts"),l=r("./src/controller/cap-level-controller.ts"),f=r("./src/controller/fps-controller.ts"),h=r("./src/controller/eme-controller.ts"),d=r("./src/utils/xhr-loader.ts"),p=r("./src/utils/fetch-loader.ts"),v=r("./src/utils/cues.ts"),g=r("./src/utils/mediakeys-helper.ts"),m=r("./src/utils/logger.ts");function y(){return y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},y.apply(this,arguments)}function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function A(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach((function(e){E(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function E(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var w=A(A({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,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:d.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:n.default,bufferController:u.default,capLevelController:l.default,fpsController:f.default,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,drmSystemOptions:{},requestMediaKeySystemAccessFunc:g.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0},{cueHandler:v.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:a.SubtitleStreamController,subtitleTrackController:s.default,timelineController:c.TimelineController,audioStreamController:i.default,audioTrackController:o.default,emeController:h.default});function k(t,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==e.liveMaxLatencyDurationCount&&(void 0===e.liveSyncDurationCount||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==e.liveMaxLatencyDuration&&(void 0===e.liveSyncDuration||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return y({},t,e)}function T(t){var e=t.loader;e!==p.default&&e!==d.default?(m.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),t.progressive=!1):Object(p.fetchSupported)()&&(t.loader=p.default,t.progressive=!0,t.enableSoftwareAES=!0,m.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}},"./src/controller/abr-controller.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/polyfills/number.ts"),i=r("./src/utils/ewma-bandwidth-estimator.ts"),o=r("./src/events.ts"),a=r("./src/utils/buffer-helper.ts"),s=r("./src/errors.ts"),u=r("./src/types/loader.ts"),c=r("./src/utils/logger.ts");var l=function(){function t(t){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=t;var e=t.config;this.bwEstimator=new i.default(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate),this.registerListeners()}var e,r=t.prototype;return r.registerListeners=function(){var t=this.hls;t.on(o.Events.FRAG_LOADING,this.onFragLoading,this),t.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.on(o.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var t=this.hls;t.off(o.Events.FRAG_LOADING,this.onFragLoading,this),t.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.off(o.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},r.onFragLoading=function(t,e){var r,n=e.frag;n.type===u.PlaylistLevelType.MAIN&&(this.timer||(this.fragCurrent=n,this.partCurrent=null!=(r=e.part)?r:null,this.timer=self.setInterval(this.onCheck,100)))},r.onLevelLoaded=function(t,e){var r=this.hls.config;e.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)},r._abandonRulesCheck=function(){var t=this.fragCurrent,e=this.partCurrent,r=this.hls,i=r.autoLevelEnabled,s=r.config,u=r.media;if(t&&u){var l=e?e.stats:t.stats,f=e?e.duration:t.duration;if(l.aborted)return c.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);if(i&&!u.paused&&u.playbackRate&&u.readyState){var h=performance.now()-l.loading.start,d=Math.abs(u.playbackRate);if(!(h<=500*f/d)){var p=r.levels,v=r.minAutoLevel,g=p[t.level],m=l.total||Math.max(l.loaded,Math.round(f*g.maxBitrate/8)),y=Math.max(1,l.bwEstimate?l.bwEstimate/8:1e3*l.loaded/h),b=(m-l.loaded)/y,A=u.currentTime,E=(a.BufferHelper.bufferInfo(u,A,s.maxBufferHole).end-A)/d;if(!(E>=2*f/d||b<=E)){var w,k=Number.POSITIVE_INFINITY;for(w=t.level-1;w>v&&!((k=f*p[w].maxBitrate/(6.4*y))<E);w--);if(!(k>=b)){var T=this.bwEstimator.getEstimate();c.logger.warn("Fragment "+t.sn+(e?" part "+e.index:"")+" of level "+t.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+w+"\n      Current BW estimate: "+(Object(n.isFiniteNumber)(T)?(T/1024).toFixed(3):"Unknown")+" Kb/s\n      Estimated load time for current fragment: "+b.toFixed(3)+" s\n      Estimated load time for the next fragment: "+k.toFixed(3)+" s\n      Time to underbuffer: "+E.toFixed(3)+" s"),r.nextLoadLevel=w,this.bwEstimator.sample(h,l.loaded),this.clearTimer(),t.loader&&(this.fragCurrent=this.partCurrent=null,t.loader.abort()),r.trigger(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:l})}}}}}},r.onFragLoaded=function(t,e){var r=e.frag,i=e.part;if(r.type===u.PlaylistLevelType.MAIN&&Object(n.isFiniteNumber)(r.sn)){var a=i?i.stats:r.stats,s=i?i.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var c=this.hls.levels[r.level],l=(c.loaded?c.loaded.bytes:0)+a.loaded,f=(c.loaded?c.loaded.duration:0)+s;c.loaded={bytes:l,duration:f},c.realBitrate=Math.round(8*l/f)}if(r.bitrateTest){var h={stats:a,frag:r,part:i,id:r.type};this.onFragBuffered(o.Events.FRAG_BUFFERED,h),r.bitrateTest=!1}}},r.onFragBuffered=function(t,e){var r=e.frag,n=e.part,i=n?n.stats:r.stats;if(!i.aborted&&r.type===u.PlaylistLevelType.MAIN&&"initSegment"!==r.sn){var o=i.parsing.end-i.loading.start;this.bwEstimator.sample(o,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=o/1e3:this.bitrateTestDelay=0}},r.onError=function(t,e){switch(e.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},r.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},r.getNextABRAutoLevel=function(){var t=this.fragCurrent,e=this.partCurrent,r=this.hls,n=r.maxAutoLevel,i=r.config,o=r.minAutoLevel,s=r.media,u=e?e.duration:t?t.duration:0,l=s?s.currentTime:0,f=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,h=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,d=(a.BufferHelper.bufferInfo(s,l,i.maxBufferHole).end-l)/f,p=this.findBestLevel(h,o,n,d,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;c.logger.trace((d?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var v=u?Math.min(u,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,m=i.abrBandWidthUpFactor;if(!d){var y=this.bitrateTestDelay;y&&(v=(u?Math.min(u,i.maxLoadingDelay):i.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*v)+" ms"),g=m=1)}return p=this.findBestLevel(h,o,n,d+v,g,m),Math.max(p,0)},r.findBestLevel=function(t,e,r,n,i,o){for(var a,s=this.fragCurrent,u=this.partCurrent,l=this.lastLoadedFragLevel,f=this.hls.levels,h=f[l],d=!(null==h||null===(a=h.details)||void 0===a||!a.live),p=null==h?void 0:h.codecSet,v=u?u.duration:s?s.duration:0,g=r;g>=e;g--){var m=f[g];if(m&&(!p||m.codecSet===p)){var y,b=m.details,A=(u?null==b?void 0:b.partTarget:null==b?void 0:b.averagetargetduration)||v;y=g<=l?i*t:o*t;var E=f[g].maxBitrate,w=E*A/y;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(y)+"/"+E+"/"+A+"/"+n+"/"+w),y>E&&(!w||d&&!this.bitrateTestDelay||w<n))return g}}return-1},(e=[{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this.bwEstimator;if(!(-1===t||e&&e.canEstimate()))return t;var r=this.getNextABRAutoLevel();return-1!==t&&(r=Math.min(t,r)),r},set:function(t){this._nextAutoLevel=t}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}();e.default=l},"./src/controller/audio-stream-controller.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/polyfills/number.ts"),i=r("./src/controller/base-stream-controller.ts"),o=r("./src/events.ts"),a=r("./src/utils/buffer-helper.ts"),s=r("./src/controller/fragment-tracker.ts"),u=r("./src/types/level.ts"),c=r("./src/types/loader.ts"),l=r("./src/loader/fragment.ts"),f=r("./src/demux/chunk-cache.ts"),h=r("./src/demux/transmuxer-interface.ts"),d=r("./src/types/transmuxer.ts"),p=r("./src/controller/fragment-finders.ts"),v=r("./src/utils/discontinuities.ts"),g=r("./src/controller/gap-controller.ts"),m=r("./src/errors.ts"),y=r("./src/utils/logger.ts");function b(){return b=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},b.apply(this,arguments)}function A(t,e){return A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},A(t,e)}var E=function(t){var e,r;function E(e,r){var n;return(n=t.call(this,e,r,"[audio-stream-controller]")||this).videoBuffer=null,n.videoTrackCC=-1,n.waitingVideoCC=-1,n.audioSwitch=!1,n.trackId=-1,n.waitingData=null,n.mainDetails=null,n._registerListeners(),n}r=t,(e=E).prototype=Object.create(r.prototype),e.prototype.constructor=e,A(e,r);var w=E.prototype;return w.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},w._registerListeners=function(){var t=this.hls;t.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.on(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),t.on(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(o.Events.ERROR,this.onError,this),t.on(o.Events.BUFFER_RESET,this.onBufferReset,this),t.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this),t.on(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w._unregisterListeners=function(){var t=this.hls;t.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.off(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),t.off(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(o.Events.ERROR,this.onError,this),t.off(o.Events.BUFFER_RESET,this.onBufferReset,this),t.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),t.off(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w.onInitPtsFound=function(t,e){var r=e.frag,n=e.id,o=e.initPTS;if("main"===n){var a=r.cc;this.initPTS[r.cc]=o,this.log("InitPTS for cc: "+a+" found from main: "+o),this.videoTrackCC=a,this.state===i.State.WAITING_INIT_PTS&&this.tick()}},w.startLoad=function(t){if(!this.levels)return this.startPosition=t,void(this.state=i.State.STOPPED);var e=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,e>0&&-1===t?(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=i.State.IDLE):(this.loadedmetadata=!1,this.state=i.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()},w.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_TRACK:var e,r=this.levels,n=this.trackId,o=null==r||null===(e=r[n])||void 0===e?void 0:e.details;if(o){if(this.waitForCdnTuneIn(o))break;this.state=i.State.WAITING_INIT_PTS}break;case i.State.FRAG_LOADING_WAITING_RETRY:var s,u=performance.now(),c=this.retryDate;(!c||u>=c||null!==(s=this.media)&&void 0!==s&&s.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=i.State.IDLE);break;case i.State.WAITING_INIT_PTS:var l=this.waitingData;if(l){var f=l.frag,h=l.part,d=l.cache,v=l.complete;if(void 0!==this.initPTS[f.cc]){this.waitingData=null,this.state=i.State.FRAG_LOADING;var g={frag:f,part:h,payload:d.flush(),networkDetails:null};this._handleFragmentLoadProgress(g),v&&t.prototype._handleFragmentLoadComplete.call(this,g)}else if(this.videoTrackCC!==this.waitingVideoCC)y.logger.log("Waiting fragment cc ("+f.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var m=a.BufferHelper.bufferInfo(this.mediaBuffer,this.media.currentTime,this.config.maxBufferHole);Object(p.fragmentWithinToleranceTest)(m.end,this.config.maxFragLookUpTolerance,f)<0&&(y.logger.log("Waiting fragment cc ("+f.cc+") @ "+f.start+" cancelled because another fragment at "+m.end+" is needed"),this.clearWaitingFragment())}}else this.state=i.State.IDLE}this.onTickEnd()},w.clearWaitingFragment=function(){var t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=i.State.IDLE)},w.onTickEnd=function(){var t=this.media;if(t&&t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length&&(this.loadedmetadata=!0),this.lastCurrentTime=t.currentTime}},w.doTickIdle=function(){var t,e,r=this.hls,s=this.levels,u=this.media,c=this.trackId,l=r.config;if(s&&s[c]&&(u||!this.startFragRequested&&l.startFragPrefetch)){var f=this.getLoadPosition();if(Object(n.isFiniteNumber)(f)){var h=s[c].details;if(!h||h.live&&this.levelLastLoaded!==c||this.waitForCdnTuneIn(h))this.state=i.State.WAITING_TRACK;else{var d=0,p=this.mediaBuffer?this.mediaBuffer:this.media,v=this.videoBuffer?this.videoBuffer:this.media,m=f<l.maxBufferHole?Math.max(g.MAX_START_GAP_JUMP,l.maxBufferHole):l.maxBufferHole,y=a.BufferHelper.bufferInfo(p,f,m),b=a.BufferHelper.bufferInfo(v,f,m),A=y.len,E=Math.min(l.maxBufferLength,l.maxMaxBufferLength),w=Math.max(E,b.len),k=this.audioSwitch;if(!(A>=w)||k){if(!k&&this._streamEnded(y,h))return r.trigger(o.Events.BUFFER_EOS,{type:"audio"}),void(this.state=i.State.ENDED);var T=h.fragments[0].start;d=y.end,k&&(d=f,h.PTSKnown&&f<T&&(y.end>T||y.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),u.currentTime=T+.05));var C=this.getNextFragment(d,h);C&&("identity"!==(null===(t=C.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=C.decryptdata)&&void 0!==e&&e.key?this.loadFragment(C,h,d):this.loadKey(C,h))}}}}},w.onMediaDetaching=function(){this.videoBuffer=null,t.prototype.onMediaDetaching.call(this)},w.onAudioTracksUpdated=function(t,e){var r=e.audioTracks;this.resetTransmuxer(),this.levels=r.map((function(t){return new u.Level(t)}))},w.onAudioTrackSwitching=function(t,e){var r=!!e.url;this.trackId=e.id;var n=this.fragCurrent;null!=n&&n.loader&&n.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),r?this.setInterval(100):this.resetTransmuxer(),r?(this.audioSwitch=!0,this.state=i.State.IDLE):this.state=i.State.STOPPED,this.tick()},w.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0},w.onLevelLoaded=function(t,e){if(null===this.mainDetails){var r=this.mainDetails=e.details,n=this.levelLastLoaded;if(null!==n&&this.levels&&-1===this.startPosition&&r.live){var i=this.levels[n];if(!i.details||!i.details.fragments[0])return;Object(v.alignPDT)(i.details,r),this.setStartPosition(i.details,i.details.fragments[0].start)}}},w.onAudioTrackLoaded=function(t,e){var r,n=this.levels,o=e.details,a=e.id;if(n){this.log("Track "+a+" loaded ["+o.startSN+","+o.endSN+"],duration:"+o.totalduration);var s=n[a],u=0;if(o.live||null!==(r=s.details)&&void 0!==r&&r.live){var c;if(o.fragments[0]||(o.deltaUpdateFailed=!0),o.deltaUpdateFailed)return;!s.details&&null!==(c=this.mainDetails)&&void 0!==c&&c.hasProgramDateTime&&o.hasProgramDateTime?(Object(v.alignPDT)(o,this.mainDetails),u=o.fragments[0].start):u=this.alignPlaylists(o,s.details)}s.details=o,this.levelLastLoaded=a,this.startFragRequested||!this.mainDetails&&o.live||this.setStartPosition(s.details,u),this.state!==i.State.WAITING_TRACK||this.waitForCdnTuneIn(o)||(this.state=i.State.IDLE),this.tick()}else this.warn("Audio tracks were reset while loading level "+a)},w._handleFragmentLoadProgress=function(t){var e,r=t.frag,n=t.part,o=t.payload,a=this.config,s=this.trackId,u=this.levels;if(u){var l=u[s];console.assert(l,"Audio track is defined on fragment load progress");var p=l.details;console.assert(p,"Audio track details are defined on fragment load progress");var v=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2",g=this.transmuxer;g||(g=this.transmuxer=new h.default(this.hls,c.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var m=this.initPTS[r.cc],b=null===(e=r.initSegment)||void 0===e?void 0:e.data;if(void 0!==m){var A=n?n.index:-1,E=-1!==A,w=new d.ChunkMetadata(r.level,r.sn,r.stats.chunkCount,o.byteLength,A,E);g.push(o,b,v,"",r,n,p.totalduration,!1,w,m)}else y.logger.log("Unknown video PTS for cc "+r.cc+", waiting for video PTS before demuxing audio frag "+r.sn+" of ["+p.startSN+" ,"+p.endSN+"],track "+s),(this.waitingData=this.waitingData||{frag:r,part:n,cache:new f.default,complete:!1}).cache.push(new Uint8Array(o)),this.waitingVideoCC=this.videoTrackCC,this.state=i.State.WAITING_INIT_PTS}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},w._handleFragmentLoadComplete=function(e){this.waitingData?this.waitingData.complete=!0:t.prototype._handleFragmentLoadComplete.call(this,e)},w.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},w.onBufferCreated=function(t,e){var r=e.tracks.audio;r&&(this.mediaBuffer=r.buffer),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer)},w.onFragBuffered=function(t,e){var r=e.frag,n=e.part;r.type===c.PlaylistLevelType.AUDIO&&(this.fragContextChanged(r)?this.warn("Fragment "+r.sn+(n?" p: "+n.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==r.sn&&(this.fragPrevious=r,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(r,n)))},w.onError=function(e,r){switch(r.details){case m.ErrorDetails.FRAG_LOAD_ERROR:case m.ErrorDetails.FRAG_LOAD_TIMEOUT:case m.ErrorDetails.KEY_LOAD_ERROR:case m.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.AUDIO,r);break;case m.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case m.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==i.State.ERROR&&this.state!==i.State.STOPPED&&(this.state=r.fatal?i.State.ERROR:i.State.IDLE,this.warn(r.details+" while loading frag, switching to "+this.state+" state"));break;case m.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===r.parent&&(this.state===i.State.PARSING||this.state===i.State.PARSED)){var n=this.mediaBuffer,o=this.media.currentTime;n&&a.BufferHelper.isBuffered(n,o)&&a.BufferHelper.isBuffered(n,o+.5)?(this.reduceMaxBufferLength(),this.state=i.State.IDLE):(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio"))}}},w.onBufferFlushed=function(t,e){var r=e.type;if(r===l.ElementaryStreamTypes.AUDIO){var n=this.mediaBuffer?this.mediaBuffer:this.media;this.afterBufferFlushed(n,r,c.PlaylistLevelType.AUDIO)}},w._handleTransmuxComplete=function(t){var e,r="audio",n=this.hls,a=t.remuxResult,s=t.chunkMeta,u=this.getCurrentContext(s);if(!u)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(s.level);var c=u.frag,f=u.part,h=a.audio,d=a.text,p=a.id3,v=a.initSegment;if(!this.fragContextChanged(c)){if(this.state=i.State.PARSING,this.audioSwitch&&h&&this.completeAudioSwitch(),null!=v&&v.tracks&&(this._bufferInitSegment(v.tracks,c,s),n.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:c,id:r,tracks:v.tracks})),h){var g=h.startPTS,m=h.endPTS,y=h.startDTS,A=h.endDTS;f&&(f.elementaryStreams[l.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:m,startDTS:y,endDTS:A}),c.setElementaryStreamInfo(l.ElementaryStreamTypes.AUDIO,g,m,y,A),this.bufferFragmentData(h,c,f,s)}if(null!=p&&null!==(e=p.samples)&&void 0!==e&&e.length){var E=b({frag:c,id:r},p);n.trigger(o.Events.FRAG_PARSING_METADATA,E)}if(d){var w=b({frag:c,id:r},d);n.trigger(o.Events.FRAG_PARSING_USERDATA,w)}}},w._bufferInitSegment=function(t,e,r){if(this.state===i.State.PARSING){t.video&&delete t.video;var n=t.audio;if(n){n.levelCodec=n.codec,n.id="audio",this.log("Init audio buffer, container:"+n.container+", codecs[parsed]=["+n.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,t);var a=n.initSegment;if(null!=a&&a.byteLength){var s={type:"audio",frag:e,part:null,chunkMeta:r,parent:e.type,data:a};this.hls.trigger(o.Events.BUFFER_APPENDING,s)}this.tick()}}},w.loadFragment=function(e,r,o){var a=this.fragmentTracker.getState(e);this.fragCurrent=e,(this.audioSwitch||a===s.FragmentState.NOT_LOADED||a===s.FragmentState.PARTIAL)&&("initSegment"===e.sn?this._loadInitSegment(e):r.live&&!Object(n.isFiniteNumber)(this.initPTS[e.cc])?(this.log("Waiting for video PTS in continuity counter "+e.cc+" of live stream before loading audio fragment "+e.sn+" of level "+this.trackId),this.state=i.State.WAITING_INIT_PTS):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,r,o)))},w.completeAudioSwitch=function(){var e=this.hls,r=this.media,n=this.trackId;r&&(this.log("Switching audio track : flushing all audio"),t.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,e.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:n})},E}(i.default);e.default=E},"./src/controller/audio-track-controller.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/events.ts"),i=r("./src/errors.ts"),o=r("./src/controller/base-playlist-controller.ts"),a=r("./src/types/loader.ts");function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var u=function(t){var e,r;function o(e){var r;return(r=t.call(this,e,"[audio-track-controller]")||this).tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.trackName="",r.selectDefaultTrack=!0,r.registerListeners(),r}r=t,(e=o).prototype=Object.create(r.prototype),e.prototype.constructor=e,s(e,r);var u,c=o.prototype;return c.registerListeners=function(){var t=this.hls;t.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(n.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(n.Events.ERROR,this.onError,this)},c.unregisterListeners=function(){var t=this.hls;t.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(n.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(n.Events.ERROR,this.onError,this)},c.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,t.prototype.destroy.call(this)},c.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},c.onManifestParsed=function(t,e){this.tracks=e.audioTracks||[]},c.onAudioTrackLoaded=function(t,e){var r=e.id,n=e.details,i=this.tracksInGroup[r];if(i){var o=i.details;i.details=e.details,this.log("audioTrack "+r+" loaded ["+n.startSN+"-"+n.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,e,o))}else this.warn("Invalid audio track id "+r)},c.onLevelLoading=function(t,e){this.switchLevel(e.level)},c.onLevelSwitching=function(t,e){this.switchLevel(e.level)},c.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.audioGroupIds){var r=e.audioGroupIds[e.urlId];if(this.groupId!==r){this.groupId=r;var i=this.tracks.filter((function(t){return!r||t.groupId===r}));this.selectDefaultTrack&&!i.some((function(t){return t.default}))&&(this.selectDefaultTrack=!1),this.tracksInGroup=i;var o={audioTracks:i};this.log("Updating audio tracks, "+i.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(n.Events.AUDIO_TRACKS_UPDATED,o),this.selectInitialTrack()}}},c.onError=function(e,r){t.prototype.onError.call(this,e,r),!r.fatal&&r.context&&r.context.type===a.PlaylistContextType.AUDIO_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},c.setAudioTrack=function(t){var e=this.tracksInGroup;if(t<0||t>=e.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var r=e[this.trackId];this.log("Now switching to audio-track index "+t);var i=e[t],o=i.id,a=i.groupId,s=void 0===a?"":a,u=i.name,c=i.type,l=i.url;if(this.trackId=t,this.trackName=u,this.selectDefaultTrack=!1,this.hls.trigger(n.Events.AUDIO_TRACK_SWITCHING,{id:o,groupId:s,name:u,type:c,url:l}),!i.details||i.details.live){var f=this.switchParams(i.url,null==r?void 0:r.details);this.loadPlaylist(f)}}},c.selectInitialTrack=function(){var t=this.tracksInGroup;console.assert(t.length,"Initial audio track should be selected when tracks are known");var e=this.trackName,r=this.findTrackId(e)||this.findTrackId();-1!==r?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},c.findTrackId=function(t){for(var e=this.tracksInGroup,r=0;r<e.length;r++){var n=e[r];if((!this.selectDefaultTrack||n.default)&&(!t||t===n.name))return n.id}return-1},c.loadPlaylist=function(t){var e=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(e)){var r=e.id,i=e.groupId,o=e.url;if(t)try{o=t.addDirectives(o)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("loading audio-track playlist for id: "+r),this.clearTimer(),this.hls.trigger(n.Events.AUDIO_TRACK_LOADING,{url:o,id:r,groupId:i,deliveryDirectives:t||null})}},(u=[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1,this.setAudioTrack(t)}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(o.prototype,u),o}(o.default);e.default=u},"./src/controller/base-playlist-controller.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return u}));var n=r("./src/polyfills/number.ts"),i=r("./src/types/level.ts"),o=r("./src/controller/level-helper.ts"),a=r("./src/utils/logger.ts"),s=r("./src/errors.ts"),u=function(){function t(t,e){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=a.logger.log.bind(a.logger,e+":"),this.warn=a.logger.warn.bind(a.logger,e+":"),this.hls=t}var e=t.prototype;return e.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},e.onError=function(t,e){e.fatal&&e.type===s.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},e.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},e.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},e.stopLoad=function(){this.canLoad=!1,this.clearTimer()},e.switchParams=function(t,e){var r=null==e?void 0:e.renditionReports;if(r)for(var o=0;o<r.length;o++){var a=r[o],s=""+a.URI;if(s===t.substr(-s.length)){var u=parseInt(a["LAST-MSN"]),c=parseInt(a["LAST-PART"]);if(e&&this.hls.config.lowLatencyMode){var l=Math.min(e.age-e.partTarget,e.targetduration);void 0!==c&&l>e.partTarget&&(c+=1)}if(Object(n.isFiniteNumber)(u))return new i.HlsUrlParameters(u,Object(n.isFiniteNumber)(c)?c:void 0,i.HlsSkip.No)}}},e.loadPlaylist=function(t){},e.shouldLoadTrack=function(t){return this.canLoad&&t&&!!t.url&&(!t.details||t.details.live)},e.playlistLoaded=function(t,e,r){var n=this,i=e.details,a=e.stats,s=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=r&&r.live){if(i.reloaded(r),r&&this.log("live playlist "+t+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),r&&i.fragments.length>0&&o.mergeDetails(r,i),!this.canLoad||!i.live)return;var u,c=void 0,l=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var f=this.hls.config.lowLatencyMode,h=i.lastPartSn,d=i.endSN,p=i.lastPartIndex,v=h===d;-1!==p?(c=v?d+1:h,l=v?f?0:p:p+1):c=d+1;var g=i.age,m=g+i.ageHeader,y=Math.min(m-i.partTarget,1.5*i.targetduration);if(y>0){if(r&&y>r.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+r.tuneInGoal+" to: "+y+" with playlist age: "+i.age),y=0;else{var b=Math.floor(y/i.targetduration);c+=b,void 0!==l&&(l+=Math.round(y%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+g.toFixed(2)+"s goal: "+y+" skip sn "+b+" to part "+l)}i.tuneInGoal=y}if(u=this.getDeliveryDirectives(i,e.deliveryDirectives,c,l),f||!v)return void this.loadPlaylist(u)}else u=this.getDeliveryDirectives(i,e.deliveryDirectives,c,l);var A=Object(o.computeReloadInterval)(i,a);void 0!==c&&i.canBlockReload&&(A-=i.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(A)+" ms"),this.timer=self.setTimeout((function(){return n.loadPlaylist(u)}),A)}else this.clearTimer()},e.getDeliveryDirectives=function(t,e,r,n){var o=Object(i.getSkipValue)(t,r);return null!=e&&e.skip&&t.deltaUpdateFailed&&(r=e.msn,n=e.part,o=i.HlsSkip.No),new i.HlsUrlParameters(r,n,o)},e.retryLoadingOrFail=function(t){var e,r=this,n=this.hls.config,i=this.retryCount<n.levelLoadingMaxRetry;if(i)if(this.retryCount++,t.details.indexOf("LoadTimeOut")>-1&&null!==(e=t.context)&&void 0!==e&&e.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+t.details+'"'),this.loadPlaylist();else{var o=Math.min(Math.pow(2,this.retryCount)*n.levelLoadingRetryDelay,n.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return r.loadPlaylist()}),o),this.warn("retry playlist loading #"+this.retryCount+" in "+o+' ms after "'+t.details+'"')}else this.warn('cannot recover from error "'+t.details+'"'),this.clearTimer(),t.fatal=!0;return i},t}()},"./src/controller/base-stream-controller.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"State",(function(){return A})),r.d(e,"default",(function(){return E}));var n=r("./src/polyfills/number.ts"),i=r("./src/task-loop.ts"),o=r("./src/controller/fragment-tracker.ts"),a=r("./src/utils/buffer-helper.ts"),s=r("./src/utils/logger.ts"),u=r("./src/events.ts"),c=r("./src/errors.ts"),l=r("./src/controller/level-helper.ts"),f=r("./src/types/transmuxer.ts"),h=r("./src/utils/mp4-tools.ts"),d=r("./src/utils/discontinuities.ts"),p=r("./src/controller/fragment-finders.ts"),v=r("./src/loader/fragment-loader.ts"),g=r("./src/crypt/decrypter.ts"),m=r("./src/utils/time-ranges.ts"),y=r("./src/types/loader.ts");function b(t,e){return b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},b(t,e)}var A={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},E=function(t){var e,r;function i(e,r,n){var i;return(i=t.call(this)||this).hls=void 0,i.fragPrevious=null,i.fragCurrent=null,i.fragmentTracker=void 0,i.transmuxer=null,i._state=A.STOPPED,i.media=void 0,i.mediaBuffer=void 0,i.config=void 0,i.bitrateTest=!1,i.lastCurrentTime=0,i.nextLoadPosition=0,i.startPosition=0,i.loadedmetadata=!1,i.fragLoadError=0,i.retryDate=0,i.levels=null,i.fragmentLoader=void 0,i.levelLastLoaded=null,i.startFragRequested=!1,i.decrypter=void 0,i.initPTS=[],i.onvseeking=null,i.onvended=null,i.logPrefix="",i.log=void 0,i.warn=void 0,i.logPrefix=n,i.log=s.logger.log.bind(s.logger,n+":"),i.warn=s.logger.warn.bind(s.logger,n+":"),i.hls=e,i.fragmentLoader=new v.default(e.config),i.fragmentTracker=r,i.config=e.config,i.decrypter=new g.default(e,e.config),e.on(u.Events.KEY_LOADED,i.onKeyLoaded,function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i)),i}r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,b(e,r);var E,w=i.prototype;return w.doTick=function(){this.onTickEnd()},w.onTickEnd=function(){},w.startLoad=function(t){},w.stopLoad=function(){this.fragmentLoader.abort();var t=this.fragCurrent;t&&this.fragmentTracker.removeFragment(t),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=A.STOPPED},w._streamEnded=function(t,e){var r=this.fragCurrent,n=this.fragmentTracker;if(!e.live&&r&&r.sn===e.endSN&&!t.nextStart){var i=n.getState(r);return i===o.FragmentState.PARTIAL||i===o.FragmentState.OK}return!1},w.onMediaAttached=function(t,e){var r=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),r.addEventListener("seeking",this.onvseeking),r.addEventListener("ended",this.onvended);var n=this.config;this.levels&&n.autoStartLoad&&this.state===A.STOPPED&&this.startLoad(n.startPosition)},w.onMediaDetaching=function(){var t=this.media;null!=t&&t.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},w.onMediaSeeking=function(){var t=this.config,e=this.fragCurrent,r=this.media,i=this.mediaBuffer,o=this.state,s=r?r.currentTime:0,u=a.BufferHelper.bufferInfo(i||r,s,t.maxBufferHole);if(this.log("media seeking to "+(Object(n.isFiniteNumber)(s)?s.toFixed(3):s)+", state: "+o),o===A.ENDED)this.resetLoadingState();else if(e&&!u.len){var c=t.maxFragLookUpTolerance,l=e.start-c,f=s>e.start+e.duration+c;(s<l||f)&&(f&&e.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),e.loader.abort()),this.resetLoadingState())}r&&(this.lastCurrentTime=s),this.loadedmetadata||u.len||(this.nextLoadPosition=this.startPosition=s),this.tickImmediate()},w.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},w.onKeyLoaded=function(t,e){if(this.state===A.KEY_LOADING&&e.frag===this.fragCurrent&&this.levels){this.state=A.IDLE;var r=this.levels[e.frag.level].details;r&&this.loadFragment(e.frag,r,e.frag.start)}},w.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},w.onHandlerDestroyed=function(){this.state=A.STOPPED,this.hls.off(u.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,t.prototype.onHandlerDestroyed.call(this)},w.loadKey=function(t,e){this.log("Loading key for "+t.sn+" of ["+e.startSN+"-"+e.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level),this.state=A.KEY_LOADING,this.fragCurrent=t,this.hls.trigger(u.Events.KEY_LOADING,{frag:t})},w.loadFragment=function(t,e,r){this._loadFragForPlayback(t,e,r)},w._loadFragForPlayback=function(t,e,r){var n=this;this._doFragLoad(t,e,r,(function(e){if(n.fragContextChanged(t))return n.warn("Fragment "+t.sn+(e.part?" p: "+e.part.index:"")+" of level "+t.level+" was dropped during download."),void n.fragmentTracker.removeFragment(t);t.stats.chunkCount++,n._handleFragmentLoadProgress(e)})).then((function(e){if(e){n.fragLoadError=0;var r=n.state;if(!n.fragContextChanged(t))return"payload"in e&&(n.log("Loaded fragment "+t.sn+" of level "+t.level),n.hls.trigger(u.Events.FRAG_LOADED,e),n.state===A.BACKTRACKING)?(n.fragmentTracker.backtrack(t,e),void n.resetFragmentLoading(t)):void n._handleFragmentLoadComplete(e);(r===A.FRAG_LOADING||r===A.BACKTRACKING||!n.fragCurrent&&r===A.PARSING)&&(n.fragmentTracker.removeFragment(t),n.state=A.IDLE)}})).catch((function(e){n.warn(e),n.resetFragmentLoading(t)}))},w.flushMainBuffer=function(t,e,r){if(void 0===r&&(r=null),t-e){var n={startOffset:t,endOffset:e,type:r};this.fragLoadError=0,this.hls.trigger(u.Events.BUFFER_FLUSHING,n)}},w._loadInitSegment=function(t){var e=this;this._doFragLoad(t).then((function(r){if(!r||e.fragContextChanged(t)||!e.levels)throw new Error("init load aborted");return r})).then((function(r){var n=e.hls,i=r.payload,o=t.decryptdata;if(i&&i.byteLength>0&&o&&o.key&&o.iv&&"AES-128"===o.method){var a=self.performance.now();return e.decrypter.webCryptoDecrypt(new Uint8Array(i),o.key.buffer,o.iv.buffer).then((function(e){var i=self.performance.now();return n.trigger(u.Events.FRAG_DECRYPTED,{frag:t,payload:e,stats:{tstart:a,tdecrypt:i}}),r.payload=e,r}))}return r})).then((function(r){var n=e.fragCurrent,i=e.hls,o=e.levels;if(!o)throw new Error("init load aborted, missing levels");var a=o[t.level].details;console.assert(a,"Level details are defined when init segment is loaded");var s=t.stats;e.state=A.IDLE,e.fragLoadError=0,t.data=new Uint8Array(r.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),r.frag===n&&i.trigger(u.Events.FRAG_BUFFERED,{stats:s,frag:n,part:null,id:t.type}),e.tick()})).catch((function(r){e.warn(r),e.resetFragmentLoading(t)}))},w.fragContextChanged=function(t){var e=this.fragCurrent;return!t||!e||t.level!==e.level||t.sn!==e.sn||t.urlId!==e.urlId},w.fragBufferedComplete=function(t,e){var r=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+t.type+" sn: "+t.sn+(e?" part: "+e.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+t.level+" "+m.default.toString(a.BufferHelper.getBuffered(r))),this.state=A.IDLE,this.tick()},w._handleFragmentLoadComplete=function(t){var e=this.transmuxer;if(e){var r=t.frag,n=t.part,i=t.partsLoaded,o=!i||0===i.length||i.some((function(t){return!t})),a=new f.ChunkMetadata(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!o);e.flush(a)}},w._handleFragmentLoadProgress=function(t){},w._doFragLoad=function(t,e,r,i){var o=this;if(void 0===r&&(r=null),!this.levels)throw new Error("frag load aborted, missing levels");if(r=Math.max(t.start,r||0),this.config.lowLatencyMode&&e){var a=e.partList;if(a&&i){r>t.end&&e.fragmentHint&&(t=e.fragmentHint);var s=this.getNextPart(a,t,r);if(s>-1){var c=a[s];return this.log("Loading part sn: "+t.sn+" p: "+c.index+" cc: "+t.cc+" of playlist ["+e.startSN+"-"+e.endSN+"] parts [0-"+s+"-"+(a.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(r.toFixed(3))),this.nextLoadPosition=c.start+c.duration,this.state=A.FRAG_LOADING,this.hls.trigger(u.Events.FRAG_LOADING,{frag:t,part:a[s],targetBufferTime:r}),this.doFragPartsLoad(t,a,s,i).catch((function(t){return o.handleFragLoadError(t)}))}if(!t.url||this.loadedEndOfParts(a,r))return Promise.resolve(null)}}return this.log("Loading fragment "+t.sn+" cc: "+t.cc+" "+(e?"of ["+e.startSN+"-"+e.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+t.level+", target: "+parseFloat(r.toFixed(3))),Object(n.isFiniteNumber)(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=A.FRAG_LOADING,this.hls.trigger(u.Events.FRAG_LOADING,{frag:t,targetBufferTime:r}),this.fragmentLoader.load(t,i).catch((function(t){return o.handleFragLoadError(t)}))},w.doFragPartsLoad=function(t,e,r,n){var i=this;return new Promise((function(o,a){var s=[];!function r(c){var l=e[c];i.fragmentLoader.loadPart(t,l,n).then((function(n){s[l.index]=n;var a=n.part;i.hls.trigger(u.Events.FRAG_LOADED,n);var f=e[c+1];if(!f||f.fragment!==t)return o({frag:t,part:a,partsLoaded:s});r(c+1)})).catch(a)}(r)}))},w.handleFragLoadError=function(t){var e=t.data;return e&&e.details===c.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(u.Events.ERROR,e),null},w._handleTransmuxerFlush=function(t){var e=this.getCurrentContext(t);if(e&&this.state===A.PARSING){var r=e.frag,n=e.part,i=e.level,o=self.performance.now();r.stats.parsing.end=o,n&&(n.stats.parsing.end=o),this.updateLevelTiming(r,n,i,t.partial)}else this.fragCurrent||(this.state=A.IDLE)},w.getCurrentContext=function(t){var e=this.levels,r=t.level,n=t.sn,i=t.part;if(!e||!e[r])return this.warn("Levels object was unset while buffering fragment "+n+" of level "+r+". The current chunk will not be buffered."),null;var o=e[r],a=i>-1?l.getPartWith(o,n,i):null,s=a?a.fragment:l.getFragmentWithSN(o,n);return s?{frag:s,part:a,level:o}:null},w.bufferFragmentData=function(t,e,r,n){if(t&&this.state===A.PARSING){var i=t.data1,o=t.data2,a=i;if(i&&o&&(a=Object(h.appendUint8Array)(i,o)),a&&a.length){var s={type:t.type,frag:e,part:r,chunkMeta:n,parent:e.type,data:a};this.hls.trigger(u.Events.BUFFER_APPENDING,s),t.dropped&&t.independent&&!r&&this.flushBufferGap(e)}}},w.flushBufferGap=function(t){var e=this.media;if(e)if(a.BufferHelper.isBuffered(e,e.currentTime)){var r=e.currentTime,n=a.BufferHelper.bufferInfo(e,r,0),i=t.duration,o=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),s=Math.max(Math.min(t.start-o,n.end-o),r+o);t.start-s>o&&this.flushMainBuffer(s,t.start)}else this.flushMainBuffer(0,t.start)},w.reduceMaxBufferLength=function(t){var e=this.config,r=t||e.maxBufferLength;return e.maxMaxBufferLength>=r&&(e.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},w.getNextFragment=function(t,e){var r,n,i=e.fragments,o=i.length;if(!o)return null;var a,s=this.config,u=i[0].start;if(e.live){var c=s.initialLiveManifestSize;if(o<c)return this.warn("Not enough fragments to start playback (have: "+o+", need: "+c+")"),null;e.PTSKnown||this.startFragRequested||-1!==this.startPosition||(a=this.getInitialLiveFragment(e,i),this.startPosition=a?this.hls.liveSyncPosition||a.start:t)}else t<=u&&(a=i[0]);if(!a){var l=s.lowLatencyMode?e.partEnd:e.fragmentEnd;a=this.getFragmentAtPosition(t,l,e)}return null===(r=a)||void 0===r||!r.initSegment||null!==(n=a)&&void 0!==n&&n.initSegment.data||this.bitrateTest||(a=a.initSegment),a},w.getNextPart=function(t,e,r){for(var n=-1,i=!1,o=!0,a=0,s=t.length;a<s;a++){var u=t[a];if(o=o&&!u.independent,n>-1&&r<u.start)break;var c=u.loaded;!c&&(i||u.independent||o)&&u.fragment===e&&(n=a),i=c}return n},w.loadedEndOfParts=function(t,e){var r=t[t.length-1];return r&&e>r.start&&r.loaded},w.getInitialLiveFragment=function(t,e){var r=this.fragPrevious,n=null;if(r){if(t.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),n=Object(p.findFragmentByPDT)(e,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!n){var i=r.sn+1;if(i>=t.startSN&&i<=t.endSN){var o=e[i-t.startSN];r.cc===o.cc&&(n=o,this.log("Live playlist, switching playlist, load frag with next SN: "+n.sn))}n||(n=Object(p.findFragWithCC)(e,r.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+n.sn)}}else{var a=this.hls.liveSyncPosition;null!==a&&(n=this.getFragmentAtPosition(a,this.bitrateTest?t.fragmentEnd:t.edge,t))}return n},w.getFragmentAtPosition=function(t,e,r){var n,i=this.config,a=this.fragPrevious,s=r.fragments,u=r.endSN,c=r.fragmentHint,l=i.maxFragLookUpTolerance,f=!!(i.lowLatencyMode&&r.partList&&c);if(f&&c&&!this.bitrateTest&&(s=s.concat(c),u=c.sn),t<e){var h=t>e-l?0:l;n=Object(p.findFragmentByPTS)(a,s,t,h)}else n=s[s.length-1];if(n){var d=n.sn-r.startSN,v=a&&n.level===a.level,g=s[d+1];if(this.fragmentTracker.getState(n)===o.FragmentState.BACKTRACKED){n=null;for(var m=d;s[m]&&this.fragmentTracker.getState(s[m])===o.FragmentState.BACKTRACKED;)n=a?s[m--]:s[--m];n||(n=g)}else a&&n.sn===a.sn&&!f&&v&&(n.sn<u&&this.fragmentTracker.getState(g)!==o.FragmentState.OK?(this.log("SN "+n.sn+" just loaded, load next one: "+g.sn),n=g):n=null)}return n},w.synchronizeToLiveEdge=function(t){var e=this.config,r=this.media;if(r){var n=this.hls.liveSyncPosition,i=r.currentTime,o=t.fragments[0].start,a=t.edge,s=i>=o-e.maxFragLookUpTolerance&&i<=a;if(null!==n&&r.duration>n&&(i<n||!s)){var u=void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:e.liveMaxLatencyDurationCount*t.targetduration;(!s&&r.readyState<4||i<a-u)&&(this.loadedmetadata||(this.nextLoadPosition=n),r.readyState&&(this.warn("Playback: "+i.toFixed(3)+" is located too far from the end of live sliding playlist: "+a+", reset currentTime to : "+n.toFixed(3)),r.currentTime=n))}}},w.alignPlaylists=function(t,e){var r=this.levels,i=this.levelLastLoaded,o=null!==i?r[i]:null,a=0;return e&&t.fragments.length>0?(a=t.fragments[0].start,t.alignedSliding&&Object(n.isFiniteNumber)(a)?this.log("Live playlist sliding:"+a.toFixed(3)):a||(this.warn("["+this.constructor.name+"] Live playlist - outdated PTS, unknown sliding"),Object(d.alignStream)(this.fragPrevious,o,t))):(this.log("Live playlist - first load, unknown sliding"),Object(d.alignStream)(this.fragPrevious,o,t)),a},w.waitForCdnTuneIn=function(t){return t.live&&t.canBlockReload&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)},w.setStartPosition=function(t,e){var r=this.startPosition;if(-1===this.startPosition||-1===this.lastCurrentTime){var i=t.startTimeOffset;Object(n.isFiniteNumber)(i)?(i<0&&(this.log("Negative start time offset "+i+", count from end of last fragment"),i=e+t.totalduration+i),this.log("Start time offset found in playlist, adjust startPosition to "+i),this.startPosition=r=i):t.live?r=this.hls.liveSyncPosition||e:this.startPosition=r=0,this.lastCurrentTime=r}this.nextLoadPosition=r},w.getLoadPosition=function(){var t=this.media,e=0;return this.loadedmetadata?e=t.currentTime:this.nextLoadPosition&&(e=this.nextLoadPosition),e},w.handleFragLoadAborted=function(t,e){this.transmuxer&&"initSegment"!==t.sn&&t.stats.aborted&&(this.warn("Fragment "+t.sn+(e?" part"+e.index:"")+" of level "+t.level+" was aborted"),this.resetFragmentLoading(t))},w.resetFragmentLoading=function(t){this.fragCurrent&&this.fragContextChanged(t)||(this.state=A.IDLE)},w.onFragmentOrKeyLoadError=function(t,e){if(!e.fatal){var r=e.frag;if(r&&r.type===t){var n=this.fragCurrent;console.assert(n&&r.sn===n.sn&&r.level===n.level&&r.urlId===n.urlId,"Frag load error must match current frag to retry");var i=this.config;if(this.fragLoadError+1<=i.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(r.level))return;var o=Math.min(Math.pow(2,this.fragLoadError)*i.fragLoadingRetryDelay,i.fragLoadingMaxRetryTimeout);this.warn("Fragment "+r.sn+" of "+t+" "+r.level+" failed to load, retrying in "+o+"ms"),this.retryDate=self.performance.now()+o,this.fragLoadError++,this.state=A.FRAG_LOADING_WAITING_RETRY}else e.levelRetry?(t===y.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=A.IDLE):(s.logger.error(e.details+" reaches max retry, redispatch as fatal ..."),e.fatal=!0,this.hls.stopLoad(),this.state=A.ERROR)}}},w.afterBufferFlushed=function(t,e,r){if(t){var n=a.BufferHelper.getBuffered(t);this.fragmentTracker.detectEvictedFragments(e,n,r),this.state===A.ENDED&&this.resetLoadingState()}},w.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=A.IDLE},w.resetLiveStartWhenNotLoaded=function(t){if(!this.loadedmetadata){this.startFragRequested=!1;var e=this.levels?this.levels[t].details:null;if(null!=e&&e.live)return this.startPosition=-1,this.setStartPosition(e,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},w.updateLevelTiming=function(t,e,r,n){var i=this,o=r.details;console.assert(!!o,"level.details must be defined"),Object.keys(t.elementaryStreams).reduce((function(e,a){var s=t.elementaryStreams[a];if(s){var c=s.endPTS-s.startPTS;if(c<=0)return i.warn("Could not parse fragment "+t.sn+" "+a+" duration reliably ("+c+") resetting transmuxer to fallback to playlist timing"),i.resetTransmuxer(),e||!1;var f=n?0:l.updateFragPTSDTS(o,t,s.startPTS,s.endPTS,s.startDTS,s.endDTS);return i.hls.trigger(u.Events.LEVEL_PTS_UPDATED,{details:o,level:r,drift:f,type:a,frag:t,start:s.startPTS,end:s.endPTS}),!0}return e}),!1)?(this.state=A.PARSED,this.hls.trigger(u.Events.FRAG_PARSED,{frag:t,part:e})):this.resetLoadingState()},w.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},(E=[{key:"state",get:function(){return this._state},set:function(t){var e=this._state;e!==t&&(this._state=t,this.log(e+"->"+t))}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(i.prototype,E),i}(i.default)},"./src/controller/buffer-controller.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return d}));var n=r("./src/polyfills/number.ts"),i=r("./src/events.ts"),o=r("./src/utils/logger.ts"),a=r("./src/errors.ts"),s=r("./src/utils/buffer-helper.ts"),u=r("./src/utils/mediasource-helper.ts"),c=r("./src/loader/fragment.ts"),l=r("./src/controller/buffer-operation-queue.ts"),f=Object(u.getMediaSource)(),h=/([ha]vc.)(?:\.[^.,]+)+/,d=function(){function t(t){var e=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var t=e.hls,r=e.media,n=e.mediaSource;o.logger.log("[buffer-controller]: Media source opened"),r&&(e.updateMediaElementDuration(),t.trigger(i.Events.MEDIA_ATTACHED,{media:r})),n&&n.removeEventListener("sourceopen",e._onMediaSourceOpen),e.checkPendingTracks()},this._onMediaSourceClose=function(){o.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){o.logger.log("[buffer-controller]: Media source ended")},this.hls=t,this._initSourceBuffer(),this.registerListeners()}var e=t.prototype;return e.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},e.destroy=function(){this.unregisterListeners(),this.details=null},e.registerListeners=function(){var t=this.hls;t.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(i.Events.BUFFER_RESET,this.onBufferReset,this),t.on(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(i.Events.BUFFER_EOS,this.onBufferEos,this),t.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(i.Events.FRAG_PARSED,this.onFragParsed,this),t.on(i.Events.FRAG_CHANGED,this.onFragChanged,this)},e.unregisterListeners=function(){var t=this.hls;t.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(i.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(i.Events.BUFFER_RESET,this.onBufferReset,this),t.off(i.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(i.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(i.Events.BUFFER_EOS,this.onBufferEos,this),t.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(i.Events.FRAG_PARSED,this.onFragParsed,this),t.off(i.Events.FRAG_CHANGED,this.onFragChanged,this)},e._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new l.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},e.onManifestParsed=function(t,e){var r=2;(e.audio&&!e.video||!e.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.details=null,o.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},e.onMediaAttaching=function(t,e){var r=this.media=e.media;if(r&&f){var n=this.mediaSource=new f;n.addEventListener("sourceopen",this._onMediaSourceOpen),n.addEventListener("sourceended",this._onMediaSourceEnded),n.addEventListener("sourceclose",this._onMediaSourceClose),r.src=self.URL.createObjectURL(n),this._objectUrl=r.src}},e.onMediaDetaching=function(){var t=this.media,e=this.mediaSource,r=this._objectUrl;if(e){if(o.logger.log("[buffer-controller]: media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){o.logger.warn("[buffer-controller]: onMediaDetaching: "+t.message+" while calling endOfStream")}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(r&&self.URL.revokeObjectURL(r),t.src===r?(t.removeAttribute("src"),t.load()):o.logger.warn("[buffer-controller]: 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.hls.trigger(i.Events.MEDIA_DETACHED,void 0)},e.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach((function(e){var r=t.sourceBuffer[e];try{r&&(t.removeBufferListeners(e),t.mediaSource&&t.mediaSource.removeSourceBuffer(r),t.sourceBuffer[e]=void 0)}catch(t){o.logger.warn("[buffer-controller]: Failed to reset the "+e+" buffer",t)}})),this._initSourceBuffer()},e.onBufferCodecs=function(t,e){var r=this,n=this.getSourceBufferTypes().length;Object.keys(e).forEach((function(t){if(n){var i=r.tracks[t];if(i&&"function"==typeof i.buffer.changeType){var o=e[t],a=o.codec,s=o.levelCodec,u=o.container;if((i.levelCodec||i.codec).replace(h,"$1")!==(s||a).replace(h,"$1")){var c=u+";codecs="+(s||a);r.appendChangeType(t,c)}}}else r.pendingTracks[t]=e[t]})),n||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},e.appendChangeType=function(t,e){var r=this,n=this.operationQueue,i={execute:function(){var i=r.sourceBuffer[t];i&&(o.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+e),i.changeType(e)),n.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(e){o.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",e)}};n.append(i,t)},e.onBufferAppending=function(t,e){var r=this,n=this.hls,u=this.operationQueue,c=this.tracks,l=e.data,f=e.type,h=e.frag,d=e.part,p=e.chunkMeta,v=p.buffering[f],g=self.performance.now();v.start=g;var m=h.stats.buffering,y=d?d.stats.buffering:null;0===m.start&&(m.start=g),y&&0===y.start&&(y.start=g);var b=c.audio,A="audio"===f&&1===p.id&&"audio/mpeg"===(null==b?void 0:b.container),E={execute:function(){if(v.executeStart=self.performance.now(),A){var t=r.sourceBuffer[f];if(t){var e=h.start-t.timestampOffset;Math.abs(e)>=.1&&(o.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+h.start+" (delta: "+e+") sn: "+h.sn+")"),t.timestampOffset=h.start)}}r.appendExecutor(l,f)},onStart:function(){},onComplete:function(){var t=self.performance.now();v.executeEnd=v.end=t,0===m.first&&(m.first=t),y&&0===y.first&&(y.first=t);var e=r.sourceBuffer,n={};for(var o in e)n[o]=s.BufferHelper.getBuffered(e[o]);r.appendError=0,r.hls.trigger(i.Events.BUFFER_APPENDED,{type:f,frag:h,part:d,chunkMeta:p,parent:h.type,timeRanges:n})},onError:function(t){o.logger.error("[buffer-controller]: Error encountered while trying to append to the "+f+" SourceBuffer",t);var e={type:a.ErrorTypes.MEDIA_ERROR,parent:h.type,details:a.ErrorDetails.BUFFER_APPEND_ERROR,err:t,fatal:!1};t.code===DOMException.QUOTA_EXCEEDED_ERR?e.details=a.ErrorDetails.BUFFER_FULL_ERROR:(r.appendError++,e.details=a.ErrorDetails.BUFFER_APPEND_ERROR,r.appendError>n.config.appendErrorMaxRetry&&(o.logger.error("[buffer-controller]: Failed "+n.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),e.fatal=!0)),n.trigger(i.Events.ERROR,e)}};u.append(E,f)},e.onBufferFlushing=function(t,e){var r=this,n=this.operationQueue,a=function(t){return{execute:r.removeExecutor.bind(r,t,e.startOffset,e.endOffset),onStart:function(){},onComplete:function(){r.hls.trigger(i.Events.BUFFER_FLUSHED,{type:t})},onError:function(e){o.logger.warn("[buffer-controller]: Failed to remove from "+t+" SourceBuffer",e)}}};e.type?n.append(a(e.type),e.type):this.getSourceBufferTypes().forEach((function(t){n.append(a(t),t)}))},e.onFragParsed=function(t,e){var r=this,n=e.frag,a=e.part,s=[],u=a?a.elementaryStreams:n.elementaryStreams;u[c.ElementaryStreamTypes.AUDIOVIDEO]?s.push("audiovideo"):(u[c.ElementaryStreamTypes.AUDIO]&&s.push("audio"),u[c.ElementaryStreamTypes.VIDEO]&&s.push("video")),0===s.length&&o.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+n.type+" level: "+n.level+" sn: "+n.sn),this.blockBuffers((function(){var t=self.performance.now();n.stats.buffering.end=t,a&&(a.stats.buffering.end=t);var e=a?a.stats:n.stats;r.hls.trigger(i.Events.FRAG_BUFFERED,{frag:n,part:a,stats:e,id:n.type})}),s)},e.onFragChanged=function(t,e){this.flushBackBuffer()},e.onBufferEos=function(t,e){var r=this;this.getSourceBufferTypes().reduce((function(t,n){var i=r.sourceBuffer[n];return e.type&&e.type!==n||i&&!i.ended&&(i.ended=!0,o.logger.log("[buffer-controller]: "+n+" sourceBuffer now EOS")),t&&!(i&&!i.ended)}),!0)&&this.blockBuffers((function(){var t=r.mediaSource;t&&"open"===t.readyState&&t.endOfStream()}))},e.onLevelUpdated=function(t,e){var r=e.details;r.fragments.length&&(this.details=r,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},e.flushBackBuffer=function(){var t=this.hls,e=this.details,r=this.media,o=this.sourceBuffer;if(r&&null!==e){var a=this.getSourceBufferTypes();if(a.length){var u=e.live&&null!==t.config.liveBackBufferLength?t.config.liveBackBufferLength:t.config.backBufferLength;if(Object(n.isFiniteNumber)(u)&&!(u<0)){var c=r.currentTime,l=e.levelTargetDuration,f=Math.max(u,l),h=Math.floor(c/l)*l-f;a.forEach((function(r){var n=o[r];if(n){var a=s.BufferHelper.getBuffered(n);a.length>0&&h>a.start(0)&&(t.trigger(i.Events.BACK_BUFFER_REACHED,{bufferEnd:h}),e.live&&t.trigger(i.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:h}),t.trigger(i.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:h,type:r}))}}))}}}},e.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var t=this.details,e=this.hls,r=this.media,i=this.mediaSource,a=t.fragments[0].start+t.totalduration,s=r.duration,u=Object(n.isFiniteNumber)(i.duration)?i.duration:0;t.live&&e.config.liveDurationInfinity?(o.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),i.duration=1/0,this.updateSeekableRange(t)):(a>u&&a>s||!Object(n.isFiniteNumber)(s))&&(o.logger.log("[buffer-controller]: Updating Media Source duration to "+a.toFixed(3)),i.duration=a)}},e.updateSeekableRange=function(t){var e=this.mediaSource,r=t.fragments;if(r.length&&t.live&&null!=e&&e.setLiveSeekableRange){var n=Math.max(0,r[0].start),i=Math.max(n,n+t.totalduration);e.setLiveSeekableRange(n,i)}},e.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.operationQueue,r=this.pendingTracks,n=Object.keys(r).length;if(n&&!t||2===n){this.createSourceBuffers(r),this.pendingTracks={};var o=this.getSourceBufferTypes();if(0===o.length)return void this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});o.forEach((function(t){e.executeNext(t)}))}},e.createSourceBuffers=function(t){var e=this.sourceBuffer,r=this.mediaSource;if(!r)throw Error("createSourceBuffers called when mediaSource was null");var n=0;for(var s in t)if(!e[s]){var u=t[s];if(!u)throw Error("source buffer exists for track "+s+", however track does not");var c=u.levelCodec||u.codec,l=u.container+";codecs="+c;o.logger.log("[buffer-controller]: creating sourceBuffer("+l+")");try{var f=e[s]=r.addSourceBuffer(l),h=s;this.addBufferListener(h,"updatestart",this._onSBUpdateStart),this.addBufferListener(h,"updateend",this._onSBUpdateEnd),this.addBufferListener(h,"error",this._onSBUpdateError),this.tracks[s]={buffer:f,codec:c,container:u.container,levelCodec:u.levelCodec,id:u.id},n++}catch(t){o.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+t.message),this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:t,mimeType:l})}}n&&this.hls.trigger(i.Events.BUFFER_CREATED,{tracks:this.tracks})},e._onSBUpdateStart=function(t){this.operationQueue.current(t).onStart()},e._onSBUpdateEnd=function(t){var e=this.operationQueue;e.current(t).onComplete(),e.shiftAndExecuteNext(t)},e._onSBUpdateError=function(t,e){o.logger.error("[buffer-controller]: "+t+" SourceBuffer error",e),this.hls.trigger(i.Events.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var r=this.operationQueue.current(t);r&&r.onError(e)},e.removeExecutor=function(t,e,r){var i=this.media,a=this.mediaSource,s=this.operationQueue,u=this.sourceBuffer[t];if(!i||!a||!u)return o.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),void s.shiftAndExecuteNext(t);var c=Object(n.isFiniteNumber)(i.duration)?i.duration:1/0,l=Object(n.isFiniteNumber)(a.duration)?a.duration:1/0,f=Math.max(0,e),h=Math.min(r,c,l);h>f?(o.logger.log("[buffer-controller]: Removing ["+f+","+h+"] from the "+t+" SourceBuffer"),console.assert(!u.updating,t+" sourceBuffer must not be updating"),u.remove(f,h)):s.shiftAndExecuteNext(t)},e.appendExecutor=function(t,e){var r=this.operationQueue,n=this.sourceBuffer[e];if(!n)return o.logger.warn("[buffer-controller]: Attempting to append to the "+e+" SourceBuffer, but it does not exist"),void r.shiftAndExecuteNext(e);n.ended=!1,console.assert(!n.updating,e+" sourceBuffer must not be updating"),n.appendBuffer(t)},e.blockBuffers=function(t,e){var r=this;if(void 0===e&&(e=this.getSourceBufferTypes()),!e.length)return o.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve(t);var n=this.operationQueue,i=e.map((function(t){return n.appendBlocker(t)}));Promise.all(i).then((function(){t(),e.forEach((function(t){var e=r.sourceBuffer[t];e&&e.updating||n.shiftAndExecuteNext(t)}))}))},e.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},e.addBufferListener=function(t,e,r){var n=this.sourceBuffer[t];if(n){var i=r.bind(this,t);this.listeners[t].push({event:e,listener:i}),n.addEventListener(e,i)}},e.removeBufferListeners=function(t){var e=this.sourceBuffer[t];e&&this.listeners[t].forEach((function(t){e.removeEventListener(t.event,t.listener)}))},t}()},"./src/controller/buffer-operation-queue.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return i}));var n=r("./src/utils/logger.ts"),i=function(){function t(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}var e=t.prototype;return e.append=function(t,e){var r=this.queues[e];r.push(t),1===r.length&&this.buffers[e]&&this.executeNext(e)},e.insertAbort=function(t,e){this.queues[e].unshift(t),this.executeNext(e)},e.appendBlocker=function(t){var e,r=new Promise((function(t){e=t})),n={execute:e,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(n,t),r},e.executeNext=function(t){var e=this.buffers,r=this.queues,i=e[t],o=r[t];if(o.length){var a=o[0];try{a.execute()}catch(t){n.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(t),i&&i.updating||o.shift()}}},e.shiftAndExecuteNext=function(t){this.queues[t].shift(),this.executeNext(t)},e.current=function(t){return this.queues[t][0]},t}()},"./src/controller/cap-level-controller.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/events.ts");function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=function(){function t(t){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=t,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e,r,o,a=t.prototype;return a.setStreamController=function(t){this.streamController=t},a.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},a.registerListeners=function(){var t=this.hls;t.on(n.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.on(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.unregisterListener=function(){var t=this.hls;t.off(n.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.off(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},a.onFpsDropLevelCapping=function(e,r){t.isLevelAllowed(r.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(r.droppedLevel)},a.onMediaAttaching=function(t,e){this.media=e.media instanceof HTMLVideoElement?e.media:null},a.onManifestParsed=function(t,e){var r=this.hls;this.restrictedLevels=[],this.firstLevel=e.firstLevel,r.config.capLevelToPlayerSize&&e.video&&this.startCapping()},a.onBufferCodecs=function(t,e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()},a.onMediaDetaching=function(){this.stopCapping()},a.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var t=this.hls.levels;if(t.length){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t.length-1),e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},a.getMaxLevel=function(e){var r=this,n=this.hls.levels;if(!n.length)return-1;var i=n.filter((function(n,i){return t.isLevelAllowed(i,r.restrictedLevels)&&i<=e}));return this.clientRect=null,t.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},a.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},a.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},a.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var r=t.getBoundingClientRect();e.width=r.width,e.height=r.height,e.width||e.height||(e.width=r.right-r.left||t.width||0,e.height=r.bottom-r.top||t.height||0)}return this.clientRect=e,e},t.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},t.getMaxLevelByMediaSize=function(t,e,r){if(!t||!t.length)return-1;for(var n,i,o=t.length-1,a=0;a<t.length;a+=1){var s=t[a];if((s.width>=e||s.height>=r)&&(n=s,!(i=t[a+1])||n.width!==i.width||n.height!==i.height)){o=a;break}}return o},e=t,o=[{key:"contentScaleFactor",get:function(){var t=1;try{t=self.devicePixelRatio}catch(t){}return t}}],(r=[{key:"mediaWidth",get:function(){return this.getDimensions().width*t.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*t.contentScaleFactor}}])&&i(e.prototype,r),o&&i(e,o),t}();e.default=o},"./src/controller/eme-controller.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/events.ts"),i=r("./src/errors.ts"),o=r("./src/utils/logger.ts"),a=r("./src/utils/mediakeys-helper.ts");var s=function(){function t(t){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=t,this._config=t.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var e,r=t.prototype;return r.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},r._registerListeners=function(){this.hls.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(n.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r._unregisterListeners=function(){this.hls.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(n.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this)},r.getLicenseServerUrl=function(t){switch(t){case a.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+t+'"')},r._attemptKeySystemAccess=function(t,e,r){var n=this,i=function(t,e,r,n){if(t===a.KeySystems.WIDEVINE)return function(t,e,r){var n={audioCapabilities:[],videoCapabilities:[]};return t.forEach((function(t){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+t+'"',robustness:r.audioRobustness||""})})),e.forEach((function(t){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"',robustness:r.videoRobustness||""})})),[n]}(e,r,n);throw new Error("Unknown key-system: "+t)}(t,e,r,this._drmSystemOptions);o.logger.log("Requesting encrypted media key-system access");var s=this.requestMediaKeySystemAccess(t,i);this.mediaKeysPromise=s.then((function(e){return n._onMediaKeySystemAccessObtained(t,e)})),s.catch((function(e){o.logger.error('Failed to obtain key-system "'+t+'" access:',e)}))},r._onMediaKeySystemAccessObtained=function(t,e){var r=this;o.logger.log('Access for key-system "'+t+'" obtained');var n={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:e,mediaKeySystemDomain:t};this._mediaKeysList.push(n);var i=Promise.resolve().then((function(){return e.createMediaKeys()})).then((function(e){return n.mediaKeys=e,o.logger.log('Media-keys created for key-system "'+t+'"'),r._onMediaKeysCreated(),e}));return i.catch((function(t){o.logger.error("Failed to create media-keys:",t)})),i},r._onMediaKeysCreated=function(){var t=this;this._mediaKeysList.forEach((function(e){e.mediaKeysSession||(e.mediaKeysSession=e.mediaKeys.createSession(),t._onNewMediaKeySession(e.mediaKeysSession))}))},r._onNewMediaKeySession=function(t){var e=this;o.logger.log("New key-system session "+t.sessionId),t.addEventListener("message",(function(r){e._onKeySessionMessage(t,r.message)}),!1)},r._onKeySessionMessage=function(t,e){o.logger.log("Got EME message event, creating license request"),this._requestLicense(e,(function(e){o.logger.log("Received license data (length: "+(e?e.byteLength:e)+"), updating key-session"),t.update(e)}))},r.onMediaEncrypted=function(t){var e=this;if(o.logger.log('Media is encrypted using "'+t.initDataType+'" init data type'),!this.mediaKeysPromise)return o.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),void this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});var r=function(r){e._media&&(e._attemptSetMediaKeys(r),e._generateRequestWithPreferredKeySession(t.initDataType,t.initData))};this.mediaKeysPromise.then(r).catch(r)},r._attemptSetMediaKeys=function(t){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 o.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});o.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},r._generateRequestWithPreferredKeySession=function(t,e){var r=this,a=this._mediaKeysList[0];if(!a)return o.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(a.mediaKeysSessionInitialized)o.logger.warn("Key-Session already initialized but requested again");else{var s=a.mediaKeysSession;if(!s)return o.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!e)return o.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});o.logger.log('Generating key-session request for "'+t+'" init data type'),a.mediaKeysSessionInitialized=!0,s.generateRequest(t,e).then((function(){o.logger.debug("Key-session generation succeeded")})).catch((function(t){o.logger.error("Error generating key-session request:",t),r.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})}))}},r._createLicenseXhr=function(t,e,r){var n=new XMLHttpRequest;n.responseType="arraybuffer",n.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,n,t,e,r);var i=this._licenseXhrSetup;if(i)try{i.call(this.hls,n,t),i=void 0}catch(t){o.logger.error(t)}try{n.readyState||n.open("POST",t,!0),i&&i.call(this.hls,n,t)}catch(t){throw new Error("issue setting up KeySystem license XHR "+t)}return n},r._onLicenseRequestReadyStageChange=function(t,e,r,a){if(4===t.readyState)if(200===t.status){this._requestLicenseFailureCount=0,o.logger.log("License request succeeded");var s=t.response,u=this._licenseResponseCallback;if(u)try{s=u.call(this.hls,t,e)}catch(t){o.logger.error(t)}a(s)}else{if(o.logger.error("License Request XHR failed ("+e+"). Status: "+t.status+" ("+t.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var c=3-this._requestLicenseFailureCount+1;o.logger.warn("Retrying license request, "+c+" attempts left"),this._requestLicense(r,a)}},r._generateLicenseRequestChallenge=function(t,e){if(t.mediaKeySystemDomain===a.KeySystems.WIDEVINE)return e;throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},r._requestLicense=function(t,e){o.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r)return o.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var a=this.getLicenseServerUrl(r.mediaKeySystemDomain),s=this._createLicenseXhr(a,t,e);o.logger.log("Sending license request to URL: "+a);var u=this._generateLicenseRequestChallenge(r,t);s.send(u)}catch(t){o.logger.error("Failure requesting DRM license: "+t),this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.KEY_SYSTEM_ERROR,details:i.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},r.onMediaAttached=function(t,e){if(this._emeEnabled){var r=e.media;this._media=r,r.addEventListener("encrypted",this._onMediaEncrypted)}},r.onMediaDetached=function(){var t=this._media,e=this._mediaKeysList;t&&(t.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map((function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch((function(){}))}))).then((function(){return t.setMediaKeys(null)})).catch((function(){})))},r.onManifestParsed=function(t,e){if(this._emeEnabled){var r=e.levels.map((function(t){return t.audioCodec})).filter((function(t){return!!t})),n=e.levels.map((function(t){return t.videoCodec})).filter((function(t){return!!t}));this._attemptKeySystemAccess(a.KeySystems.WIDEVINE,r,n)}},(e=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}();e.default=s},"./src/controller/fps-controller.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/events.ts"),i=r("./src/utils/logger.ts"),o=function(){function t(t){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=t,this.registerListeners()}var e=t.prototype;return e.setStreamController=function(t){this.streamController=t},e.registerListeners=function(){this.hls.on(n.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},e.unregisterListeners=function(){this.hls.off(n.Events.MEDIA_ATTACHING,this.onMediaAttaching)},e.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},e.onMediaAttaching=function(t,e){var r=this.hls.config;if(r.capLevelOnFPSDrop){var n=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=n,n&&"function"==typeof n.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}},e.checkFPS=function(t,e,r){var o=performance.now();if(e){if(this.lastTime){var a=o-this.lastTime,s=r-this.lastDroppedFrames,u=e-this.lastDecodedFrames,c=1e3*s/a,l=this.hls;if(l.trigger(n.Events.FPS_DROP,{currentDropped:s,currentDecoded:u,totalDroppedFrames:r}),c>0&&s>l.config.fpsDroppedMonitoringThreshold*u){var f=l.currentLevel;i.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+f),f>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=f)&&(f-=1,l.trigger(n.Events.FPS_DROP_LEVEL_CAPPING,{level:f,droppedLevel:l.currentLevel}),l.autoLevelCapping=f,this.streamController.nextLevelSwitch())}}this.lastTime=o,this.lastDroppedFrames=r,this.lastDecodedFrames=e}},e.checkFPSInterval=function(){var t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},t}();e.default=o},"./src/controller/fragment-finders.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"findFragmentByPDT",(function(){return o})),r.d(e,"findFragmentByPTS",(function(){return a})),r.d(e,"fragmentWithinToleranceTest",(function(){return s})),r.d(e,"pdtWithinToleranceTest",(function(){return u})),r.d(e,"findFragWithCC",(function(){return c}));var n=r("./src/polyfills/number.ts"),i=r("./src/utils/binary-search.ts");function o(t,e,r){if(null===e||!Array.isArray(t)||!t.length||!Object(n.isFiniteNumber)(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;r=r||0;for(var i=0;i<t.length;++i){var o=t[i];if(u(e,r,o))return o}return null}function a(t,e,r,n){void 0===r&&(r=0),void 0===n&&(n=0);var o=null;return t?o=e[t.sn-e[0].sn+1]:0===r&&0===e[0].start&&(o=e[0]),o&&0===s(r,n,o)?o:i.default.search(e,s.bind(null,r,n))||o}function s(t,e,r){void 0===t&&(t=0),void 0===e&&(e=0);var n=Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return r.start+r.duration-n<=t?1:r.start-n>t&&r.start?-1:0}function u(t,e,r){var n=1e3*Math.min(e,r.duration+(r.deltaPTS?r.deltaPTS:0));return(r.endProgramDateTime||0)-n>t}function c(t,e){return i.default.search(t,(function(t){return t.cc<e?1:t.cc>e?-1:0}))}},"./src/controller/fragment-tracker.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"FragmentState",(function(){return n})),r.d(e,"FragmentTracker",(function(){return a}));var n,i=r("./src/events.ts"),o=r("./src/types/loader.ts");!function(t){t.NOT_LOADED="NOT_LOADED",t.BACKTRACKED="BACKTRACKED",t.APPENDING="APPENDING",t.PARTIAL="PARTIAL",t.OK="OK"}(n||(n={}));var a=function(){function t(t){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){var t=this.hls;t.on(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.on(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.on(i.Events.FRAG_LOADED,this.onFragLoaded,this)},e._unregisterListeners=function(){var t=this.hls;t.off(i.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.off(i.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.off(i.Events.FRAG_LOADED,this.onFragLoaded,this)},e.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},e.getAppendedFrag=function(t,e){if(e===o.PlaylistLevelType.MAIN){var r=this.activeFragment,n=this.activeParts;if(!r)return null;if(n)for(var i=n.length;i--;){var a=n[i],s=a?a.end:r.appendedPTS;if(a.start<=t&&void 0!==s&&t<=s)return i>9&&(this.activeParts=n.slice(i-9)),a}else if(r.start<=t&&void 0!==r.appendedPTS&&t<=r.appendedPTS)return r}return this.getBufferedFrag(t,e)},e.getBufferedFrag=function(t,e){for(var r=this.fragments,n=Object.keys(r),i=n.length;i--;){var o=r[n[i]];if((null==o?void 0:o.body.type)===e&&o.buffered){var a=o.body;if(a.start<=t&&t<=a.end)return a}}return null},e.detectEvictedFragments=function(t,e,r){var n=this;Object.keys(this.fragments).forEach((function(i){var o=n.fragments[i];if(o)if(o.buffered){var a=o.range[t];a&&a.time.some((function(t){var r=!n.isTimeBuffered(t.startPTS,t.endPTS,e);return r&&n.removeFragment(o.body),r}))}else o.body.type===r&&n.removeFragment(o.body)}))},e.detectPartialFragments=function(t){var e=this,r=this.timeRanges,n=t.frag,i=t.part;if(r&&"initSegment"!==n.sn){var o=u(n),a=this.fragments[o];a&&(Object.keys(r).forEach((function(t){var o=n.elementaryStreams[t];if(o){var s=r[t],u=null!==i||!0===o.partial;a.range[t]=e.getBufferedTimes(n,i,u,s)}})),a.backtrack=a.loaded=null,Object.keys(a.range).length?a.buffered=!0:this.removeFragment(a.body))}},e.getBufferedTimes=function(t,e,r,n){for(var i={time:[],partial:r},o=e?e.start:t.start,a=e?e.end:t.end,s=t.minEndPTS||a,u=t.maxStartPTS||o,c=0;c<n.length;c++){var l=n.start(c)-this.bufferPadding,f=n.end(c)+this.bufferPadding;if(u>=l&&s<=f){i.time.push({startPTS:Math.max(o,n.start(c)),endPTS:Math.min(a,n.end(c))});break}if(o<f&&a>l)i.partial=!0,i.time.push({startPTS:Math.max(o,n.start(c)),endPTS:Math.min(a,n.end(c))});else if(a<=l)break}return i},e.getPartialFragment=function(t){var e,r,n,i=null,o=0,a=this.bufferPadding,u=this.fragments;return Object.keys(u).forEach((function(c){var l=u[c];l&&s(l)&&(r=l.body.start-a,n=l.body.end+a,t>=r&&t<=n&&(e=Math.min(t-r,n-t),o<=e&&(i=l.body,o=e)))})),i},e.getState=function(t){var e=u(t),r=this.fragments[e];return r?r.buffered?s(r)?n.PARTIAL:n.OK:r.backtrack?n.BACKTRACKED:n.APPENDING:n.NOT_LOADED},e.backtrack=function(t,e){var r=u(t),n=this.fragments[r];if(!n||n.backtrack)return null;var i=n.backtrack=e||n.loaded;return n.loaded=null,i},e.getBacktrackData=function(t){var e=u(t),r=this.fragments[e];if(r){var n,i=r.backtrack;if(null!=i&&null!==(n=i.payload)&&void 0!==n&&n.byteLength)return i;this.removeFragment(t)}return null},e.isTimeBuffered=function(t,e,r){for(var n,i,o=0;o<r.length;o++){if(n=r.start(o)-this.bufferPadding,i=r.end(o)+this.bufferPadding,t>=n&&e<=i)return!0;if(e<=n)return!1}return!1},e.onFragLoaded=function(t,e){var r=e.frag,n=e.part;if("initSegment"!==r.sn&&!r.bitrateTest&&!n){var i=u(r);this.fragments[i]={body:r,loaded:e,backtrack:null,buffered:!1,range:Object.create(null)}}},e.onBufferAppended=function(t,e){var r=this,n=e.frag,i=e.part,a=e.timeRanges;if(n.type===o.PlaylistLevelType.MAIN)if(this.activeFragment=n,i){var s=this.activeParts;s||(this.activeParts=s=[]),s.push(i)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach((function(t){var e=a[t];if(r.detectEvictedFragments(t,e),!i)for(var o=0;o<e.length;o++)n.appendedPTS=Math.max(e.end(o),n.appendedPTS||0)}))},e.onFragBuffered=function(t,e){this.detectPartialFragments(e)},e.hasFragment=function(t){var e=u(t);return!!this.fragments[e]},e.removeFragment=function(t){var e=u(t);t.stats.loaded=0,t.clearElementaryStreamInfo(),delete this.fragments[e]},e.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},t}();function s(t){var e,r;return t.buffered&&((null===(e=t.range.video)||void 0===e?void 0:e.partial)||(null===(r=t.range.audio)||void 0===r?void 0:r.partial))}function u(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn}},"./src/controller/gap-controller.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"STALL_MINIMUM_DURATION_MS",(function(){return s})),r.d(e,"MAX_START_GAP_JUMP",(function(){return u})),r.d(e,"SKIP_BUFFER_HOLE_STEP_SECONDS",(function(){return c})),r.d(e,"SKIP_BUFFER_RANGE_START",(function(){return l})),r.d(e,"default",(function(){return f}));var n=r("./src/utils/buffer-helper.ts"),i=r("./src/errors.ts"),o=r("./src/events.ts"),a=r("./src/utils/logger.ts"),s=250,u=2,c=.1,l=.05,f=function(){function t(t,e,r,n){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=t,this.media=e,this.fragmentTracker=r,this.hls=n}var e=t.prototype;return e.destroy=function(){this.hls=this.fragmentTracker=this.media=null},e.poll=function(t){var e=this.config,r=this.media,i=this.stalled,o=r.currentTime,c=r.seeking,l=this.seeking&&!c,f=!this.seeking&&c;if(this.seeking=c,o===t){if((f||l)&&(this.stalled=null),!r.paused&&!r.ended&&0!==r.playbackRate&&n.BufferHelper.getBuffered(r).length){var h=n.BufferHelper.bufferInfo(r,o,0),d=h.len>0,p=h.nextStart||0;if(d||p){if(c){var v=h.len>u,g=!p||p-o>u&&!this.fragmentTracker.getPartialFragment(o);if(v||g)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var m,y=Math.max(p,h.start||0)-o,b=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,A=(null==b||null===(m=b.details)||void 0===m?void 0:m.live)?2*b.details.targetduration:u;if(y>0&&y<=A)return void this._trySkipBufferHole(null)}var E=self.performance.now();if(null!==i){var w=E-i;!c&&w>=s&&this._reportStall(h.len);var k=n.BufferHelper.bufferInfo(r,o,e.maxBufferHole);this._tryFixBufferStall(k,w)}else this.stalled=E}}}else if(this.moved=!0,null!==i){if(this.stallReported){var T=self.performance.now()-i;a.logger.warn("playback not stuck anymore @"+o+", after "+Math.round(T)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var r=this.config,n=this.fragmentTracker,i=this.media.currentTime,o=n.getPartialFragment(i);o&&this._trySkipBufferHole(o)||t.len>r.maxBufferHole&&e>1e3*r.highBufferWatchdogPeriod&&(a.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,r=this.media;this.stallReported||(this.stallReported=!0,a.logger.warn("Playback stalling at @"+r.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,r=this.hls,s=this.media,u=s.currentTime,f=0,h=n.BufferHelper.getBuffered(s),d=0;d<h.length;d++){var p=h.start(d);if(u+e.maxBufferHole>=f&&u<p){var v=Math.max(p+l,s.currentTime+c);return a.logger.warn("skipping hole, adjusting currentTime from "+u+" to "+v),this.moved=!0,this.stalled=null,s.currentTime=v,t&&r.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+u+" to "+v,frag:t}),v}f=h.end(d)}return 0},e._tryNudgeBuffer=function(){var t=this.config,e=this.hls,r=this.media,n=r.currentTime,s=(this.nudgeRetry||0)+1;if(this.nudgeRetry=s,s<t.nudgeMaxRetry){var u=n+s*t.nudgeOffset;a.logger.warn("Nudging 'currentTime' from "+n+" to "+u),r.currentTime=u,e.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else a.logger.error("Playhead still not moving while enough data buffered @"+n+" after "+t.nudgeMaxRetry+" nudges"),e.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},t}()},"./src/controller/id3-track-controller.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/events.ts"),i=r("./src/utils/texttrack-utils.ts"),o=r("./src/demux/id3.ts"),a=function(){function t(t){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e.destroy=function(){this._unregisterListeners()},e._registerListeners=function(){var t=this.hls;t.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.on(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},e._unregisterListeners=function(){var t=this.hls;t.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.off(n.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},e.onMediaAttached=function(t,e){this.media=e.media},e.onMediaDetaching=function(){this.id3Track&&(Object(i.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null)},e.getID3Track=function(t){if(this.media){for(var e=0;e<t.length;e++){var r=t[e];if("metadata"===r.kind&&"id3"===r.label)return Object(i.sendAddTrackEvent)(r,this.media),r}return this.media.addTextTrack("metadata","id3")}},e.onFragParsingMetadata=function(t,e){if(this.media){var r=e.frag,n=e.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var i=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,a=0;a<n.length;a++){var s=o.getID3Frames(n[a].data);if(s){var u=n[a].pts,c=a<n.length-1?n[a+1].pts:r.end;c-u<=0&&(c=u+.25);for(var l=0;l<s.length;l++){var f=s[l];if(!o.isTimeStampFrame(f)){var h=new i(u,c,"");h.value=f,this.id3Track.addCue(h)}}}}}},e.onBufferFlushing=function(t,e){var r=e.startOffset,n=e.endOffset,o=e.type;if(!o||"audio"===o){var a=this.id3Track;a&&Object(i.removeCuesInRange)(a,r,n)}},t}();e.default=a},"./src/controller/latency-controller.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var n=r("./src/errors.ts"),i=r("./src/events.ts"),o=r("./src/utils/logger.ts");var a=function(){function t(t){var e=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return e.timeupdate()},this.hls=t,this.config=t.config,this.registerListeners()}var e,r=t.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(i.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(i.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(i.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(i.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(i.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(i.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(i.Events.ERROR,this.onError)},r.onMediaAttached=function(t,e){this.media=e.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},r.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},r.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},r.onLevelUpdated=function(t,e){var r=e.details;this.levelDetails=r,r.advanced&&this.timeupdate(),!r.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(t,e){e.details===n.ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,o.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},r.timeupdate=function(){var t=this.media,e=this.levelDetails;if(t&&e){this.currentTime=t.currentTime;var r=this.computeLatency();if(null!==r){this._latency=r;var n=this.config,i=n.lowLatencyMode,o=n.maxLiveSyncPlaybackRate;if(i&&1!==o){var a=this.targetLatency;if(null!==a){var s=r-a,u=s<Math.min(this.maxLatency,a+e.targetduration);if(e.live&&u&&s>.05&&this.forwardBufferLength>1){var c=Math.min(2,Math.max(1,o)),l=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;t.playbackRate=Math.min(c,Math.max(1,l))}else 1!==t.playbackRate&&0!==t.playbackRate&&(t.playbackRate=1)}}}}},r.estimateLiveEdge=function(){var t=this.levelDetails;return null===t?null:t.edge+t.age},r.computeLatency=function(){var t=this.estimateLiveEdge();return null===t?null:t-this.currentTime},(e=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var t=this.config,e=this.levelDetails;return void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}},{key:"targetLatency",get:function(){var t=this.levelDetails;if(null===t)return null;var e=t.holdBack,r=t.partHoldBack,n=t.targetduration,i=this.config,o=i.liveSyncDuration,a=i.liveSyncDurationCount,s=i.lowLatencyMode,u=this.hls.userConfig,c=s&&r||e;(u.liveSyncDuration||u.liveSyncDurationCount||0===c)&&(c=void 0!==o?o:a*n);var l=n;return c+Math.min(1*this.stallCount,l)}},{key:"liveSyncPosition",get:function(){var t=this.estimateLiveEdge(),e=this.targetLatency,r=this.levelDetails;if(null===t||null===e||null===r)return null;var n=r.edge,i=t-e-this.edgeStalled,o=n-r.totalduration,a=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(o,i),a)}},{key:"drift",get:function(){var t=this.levelDetails;return null===t?1:t.drift}},{key:"edgeStalled",get:function(){var t=this.levelDetails;if(null===t)return 0;var e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.max(t.age-e,0)}},{key:"forwardBufferLength",get:function(){var t=this.media,e=this.levelDetails;if(!t||!e)return 0;var r=t.buffered.length;return r?t.buffered.end(r-1):e.edge-this.currentTime}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}()},"./src/controller/level-controller.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return d}));var n=r("./src/types/level.ts"),i=r("./src/events.ts"),o=r("./src/errors.ts"),a=r("./src/utils/codecs.ts"),s=r("./src/controller/level-helper.ts"),u=r("./src/controller/base-playlist-controller.ts"),c=r("./src/types/loader.ts");function l(){return l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},l.apply(this,arguments)}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var h=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),d=function(t){var e,r;function u(e){var r;return(r=t.call(this,e,"[level-controller]")||this)._levels=[],r._firstLevel=-1,r._startLevel=void 0,r.currentLevelIndex=-1,r.manualLevelIndex=-1,r.onParsedComplete=void 0,r._registerListeners(),r}r=t,(e=u).prototype=Object.create(r.prototype),e.prototype.constructor=e,f(e,r);var d,p=u.prototype;return p._registerListeners=function(){var t=this.hls;t.on(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(i.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.on(i.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(i.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(i.Events.ERROR,this.onError,this)},p._unregisterListeners=function(){var t=this.hls;t.off(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(i.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.off(i.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(i.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(i.Events.ERROR,this.onError,this)},p.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,t.prototype.destroy.call(this)},p.startLoad=function(){this._levels.forEach((function(t){t.loadError=0})),t.prototype.startLoad.call(this)},p.onManifestLoaded=function(t,e){var r,u,c=[],l=[],f=[],d={},p=!1,v=!1,g=!1;if(e.levels.forEach((function(t){var e=t.attrs;p=p||!(!t.width||!t.height),v=v||!!t.videoCodec,g=g||!!t.audioCodec,h&&t.audioCodec&&-1!==t.audioCodec.indexOf("mp4a.40.34")&&(t.audioCodec=void 0);var r=t.bitrate+"-"+t.attrs.RESOLUTION+"-"+t.attrs.CODECS;(u=d[r])?u.url.push(t.url):(u=new n.Level(t),d[r]=u,c.push(u)),e&&(e.AUDIO&&Object(s.addGroupId)(u,"audio",e.AUDIO),e.SUBTITLES&&Object(s.addGroupId)(u,"text",e.SUBTITLES))})),(p||v)&&g&&(c=c.filter((function(t){var e=t.videoCodec,r=t.width,n=t.height;return!!e||!(!r||!n)}))),c=c.filter((function(t){var e=t.audioCodec,r=t.videoCodec;return(!e||Object(a.isCodecSupportedInMp4)(e,"audio"))&&(!r||Object(a.isCodecSupportedInMp4)(r,"video"))})),e.audioTracks&&(l=e.audioTracks.filter((function(t){return!t.audioCodec||Object(a.isCodecSupportedInMp4)(t.audioCodec,"audio")})),Object(s.assignTrackIdsByGroup)(l)),e.subtitles&&(f=e.subtitles,Object(s.assignTrackIdsByGroup)(f)),c.length>0){r=c[0].bitrate,c.sort((function(t,e){return t.bitrate-e.bitrate})),this._levels=c;for(var m=0;m<c.length;m++)if(c[m].bitrate===r){this._firstLevel=m,this.log("manifest loaded, "+c.length+" level(s) found, first bitrate: "+r);break}var y=g&&!v,b={levels:c,audioTracks:l,subtitleTracks:f,firstLevel:this._firstLevel,stats:e.stats,audio:g,video:v,altAudio:!y&&l.some((function(t){return!!t.url}))};this.hls.trigger(i.Events.MANIFEST_PARSED,b),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:e.url,reason:"no level with compatible codecs found in manifest"})},p.onError=function(e,r){if(t.prototype.onError.call(this,e,r),!r.fatal){var n=r.context,i=this._levels[this.currentLevelIndex];if(n&&(n.type===c.PlaylistContextType.AUDIO_TRACK&&i.audioGroupIds&&n.groupId===i.audioGroupIds[i.urlId]||n.type===c.PlaylistContextType.SUBTITLE_TRACK&&i.textGroupIds&&n.groupId===i.textGroupIds[i.urlId]))this.redundantFailover(this.currentLevelIndex);else{var a,s=!1,u=!0;switch(r.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:if(r.frag){var l=this._levels[r.frag.level];l?(l.fragmentError++,l.fragmentError>this.hls.config.fragLoadingMaxRetry&&(a=r.frag.level)):a=r.frag.level}break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:n&&(n.deliveryDirectives&&(u=!1),a=n.level),s=!0;break;case o.ErrorDetails.REMUX_ALLOC_ERROR:a=r.level,s=!0}void 0!==a&&this.recoverLevel(r,a,s,u)}}},p.recoverLevel=function(t,e,r,n){var i=t.details,o=this._levels[e];if(o.loadError++,r){if(!this.retryLoadingOrFail(t))return void(this.currentLevelIndex=-1);t.levelRetry=!0}if(n){var a=o.url.length;if(a>1&&o.loadError<a)t.levelRetry=!0,this.redundantFailover(e);else if(-1===this.manualLevelIndex){var s=0===e?this._levels.length-1:e-1;this.currentLevelIndex!==s&&0===this._levels[s].loadError&&(this.warn(i+": switch to "+s),t.levelRetry=!0,this.hls.nextAutoLevel=s)}}},p.redundantFailover=function(t){var e=this._levels[t],r=e.url.length;if(r>1){var n=(e.urlId+1)%r;this.warn("Switching to redundant URL-id "+n),this._levels.forEach((function(t){t.urlId=n})),this.level=t}},p.onFragLoaded=function(t,e){var r=e.frag;if(void 0!==r&&r.type===c.PlaylistLevelType.MAIN){var n=this._levels[r.level];void 0!==n&&(n.fragmentError=0,n.loadError=0)}},p.onLevelLoaded=function(t,e){var r,n,i=e.level,o=e.details,a=this._levels[i];if(!a)return this.warn("Invalid level index "+i),void(null!==(n=e.deliveryDirectives)&&void 0!==n&&n.skip&&(o.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===a.fragmentError&&(a.loadError=0,this.retryCount=0),this.playlistLoaded(i,e,a.details)):null!==(r=e.deliveryDirectives)&&void 0!==r&&r.skip&&(o.deltaUpdateFailed=!0)},p.onAudioTrackSwitched=function(t,e){var r=this.hls.levels[this.currentLevelIndex];if(r&&r.audioGroupIds){for(var n=-1,i=this.hls.audioTracks[e.id].groupId,o=0;o<r.audioGroupIds.length;o++)if(r.audioGroupIds[o]===i){n=o;break}n!==r.urlId&&(r.urlId=n,this.startLoad())}},p.loadPlaylist=function(t){var e=this.currentLevelIndex,r=this._levels[e];if(this.canLoad&&r&&r.url.length>0){var n=r.urlId,o=r.url[n];if(t)try{o=t.addDirectives(o)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Attempt loading level index "+e+(t?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+n+" "+o),this.clearTimer(),this.hls.trigger(i.Events.LEVEL_LOADING,{url:o,level:e,id:n,deliveryDirectives:t||null})}},p.removeLevel=function(t,e){var r=function(t,r){return r!==e},n=this._levels.filter((function(n,i){return i!==t||n.url.length>1&&void 0!==e&&(n.url=n.url.filter(r),n.audioGroupIds&&(n.audioGroupIds=n.audioGroupIds.filter(r)),n.textGroupIds&&(n.textGroupIds=n.textGroupIds.filter(r)),n.urlId=0,!0)})).map((function(t,e){var r=t.details;return null!=r&&r.fragments&&r.fragments.forEach((function(t){t.level=e})),t}));this._levels=n,this.hls.trigger(i.Events.LEVELS_UPDATED,{levels:n})},(d=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e,r=this._levels;if(0!==r.length&&(this.currentLevelIndex!==t||null===(e=r[t])||void 0===e||!e.details)){if(t<0||t>=r.length){var n=t<0;if(this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:n,reason:"invalid level idx"}),n)return;t=Math.min(t,r.length-1)}this.clearTimer();var a=this.currentLevelIndex,s=r[a],u=r[t];this.log("switching to level "+t+" from "+a),this.currentLevelIndex=t;var c=l({},u,{level:t,maxBitrate:u.maxBitrate,uri:u.uri,urlId:u.urlId});delete c._urlId,this.hls.trigger(i.Events.LEVEL_SWITCHING,c);var f=u.details;if(!f||f.live){var h=this.switchParams(u.uri,null==s?void 0:s.details);this.loadPlaylist(h)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(u.prototype,d),u}(u.default)},"./src/controller/level-helper.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"addGroupId",(function(){return o})),r.d(e,"assignTrackIdsByGroup",(function(){return a})),r.d(e,"updatePTS",(function(){return s})),r.d(e,"updateFragPTSDTS",(function(){return c})),r.d(e,"mergeDetails",(function(){return l})),r.d(e,"mapPartIntersection",(function(){return f})),r.d(e,"mapFragmentIntersection",(function(){return h})),r.d(e,"adjustSliding",(function(){return d})),r.d(e,"computeReloadInterval",(function(){return p})),r.d(e,"getFragmentWithSN",(function(){return v})),r.d(e,"getPartWith",(function(){return g}));var n=r("./src/polyfills/number.ts"),i=r("./src/utils/logger.ts");function o(t,e,r){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(r);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(r)}}function a(t){var e={};t.forEach((function(t){var r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++}))}function s(t,e,r){u(t[e],t[r])}function u(t,e){var r=e.startPTS;if(Object(n.isFiniteNumber)(r)){var i,o=0;e.sn>t.sn?(o=r-t.start,i=t):(o=t.start-r,i=e),i.duration!==o&&(i.duration=o)}else e.sn>t.sn?t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration:e.start=Math.max(t.start-e.duration,0)}function c(t,e,r,o,a,s){o-r<=0&&(i.logger.warn("Fragment should have a positive duration",e),o=r+e.duration,s=a+e.duration);var c=r,l=o,f=e.startPTS,h=e.endPTS;if(Object(n.isFiniteNumber)(f)){var d=Math.abs(f-r);Object(n.isFiniteNumber)(e.deltaPTS)?e.deltaPTS=Math.max(d,e.deltaPTS):e.deltaPTS=d,c=Math.max(r,f),r=Math.min(r,f),a=Math.min(a,e.startDTS),l=Math.min(o,h),o=Math.max(o,h),s=Math.max(s,e.endDTS)}e.duration=o-r;var p=r-e.start;e.appendedPTS=o,e.start=e.startPTS=r,e.maxStartPTS=c,e.startDTS=a,e.endPTS=o,e.minEndPTS=l,e.endDTS=s;var v,g=e.sn;if(!t||g<t.startSN||g>t.endSN)return 0;var m=g-t.startSN,y=t.fragments;for(y[m]=e,v=m;v>0;v--)u(y[v],y[v-1]);for(v=m;v<y.length-1;v++)u(y[v],y[v+1]);return t.fragmentHint&&u(y[y.length-1],t.fragmentHint),t.PTSKnown=t.alignedSliding=!0,p}function l(t,e){for(var r=null,o=t.fragments,a=o.length-1;a>=0;a--){var s=o[a].initSegment;if(s){r=s;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;var u,l=0;if(h(t,e,(function(t,i){var o;t.relurl&&(l=t.cc-i.cc),Object(n.isFiniteNumber)(t.startPTS)&&Object(n.isFiniteNumber)(t.endPTS)&&(i.start=i.startPTS=t.startPTS,i.startDTS=t.startDTS,i.appendedPTS=t.appendedPTS,i.maxStartPTS=t.maxStartPTS,i.endPTS=t.endPTS,i.endDTS=t.endDTS,i.minEndPTS=t.minEndPTS,i.duration=t.endPTS-t.startPTS,i.duration&&(u=i),e.PTSKnown=e.alignedSliding=!0),i.elementaryStreams=t.elementaryStreams,i.loader=t.loader,i.stats=t.stats,i.urlId=t.urlId,t.initSegment?(i.initSegment=t.initSegment,r=t.initSegment):i.initSegment&&i.initSegment.relurl!=(null===(o=r)||void 0===o?void 0:o.relurl)||(i.initSegment=r)})),e.skippedSegments&&(e.deltaUpdateFailed=e.fragments.some((function(t){return!t})),e.deltaUpdateFailed)){i.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var p=e.skippedSegments;p--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}var v=e.fragments;if(l){i.logger.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g<v.length;g++)v[g].cc+=l}e.skippedSegments&&(e.startCC=e.fragments[0].cc),f(t.partList,e.partList,(function(t,e){e.elementaryStreams=t.elementaryStreams,e.stats=t.stats})),u?c(e,u,u.startPTS,u.endPTS,u.startDTS,u.endDTS):d(t,e),v.length&&(e.totalduration=e.edge-v[0].start),e.driftStartTime=t.driftStartTime,e.driftStart=t.driftStart;var m=e.advancedDateTime;if(e.advanced&&m){var y=e.edge;e.driftStart||(e.driftStartTime=m,e.driftStart=y),e.driftEndTime=m,e.driftEnd=y}else e.driftEndTime=t.driftEndTime,e.driftEnd=t.driftEnd,e.advancedDateTime=t.advancedDateTime}function f(t,e,r){if(t&&e)for(var n=0,i=0,o=t.length;i<=o;i++){var a=t[i],s=e[i+n];a&&s&&a.index===s.index&&a.fragment.sn===s.fragment.sn?r(a,s):n--}}function h(t,e,r){for(var n=e.skippedSegments,i=Math.max(t.startSN,e.startSN)-e.startSN,o=(t.fragmentHint?1:0)+(n?e.endSN:Math.min(t.endSN,e.endSN))-e.startSN,a=e.startSN-t.startSN,s=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,u=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,c=i;c<=o;c++){var l=u[a+c],f=s[c];n&&!f&&c<n&&(f=e.fragments[c]=l),l&&f&&r(l,f)}}function d(t,e){var r=e.startSN+e.skippedSegments-t.startSN,n=t.fragments,i=e.fragments;if(!(r<0||r>=n.length)){var o=n[r].start;if(o){for(var a=e.skippedSegments;a<i.length;a++)i[a].start+=o;e.fragmentHint&&(e.fragmentHint.start+=o)}}}function p(t,e){var r,n=1e3*t.levelTargetDuration,i=n/2,o=t.age,a=o>0&&o<3*n,s=e.loading.end-e.loading.start,u=t.availabilityDelay;if(!1===t.updated)if(a){var c=333*t.misses;r=Math.max(Math.min(i,2*s),c),t.availabilityDelay=(t.availabilityDelay||0)+r}else r=i;else a?(u=Math.min(u||n/2,o),t.availabilityDelay=u,r=u+n-o):r=n-s;return Math.round(r)}function v(t,e){if(!t||!t.details)return null;var r=t.details,n=r.fragments[e-r.startSN];return n||((n=r.fragmentHint)&&n.sn===e?n:null)}function g(t,e,r){if(!t||!t.details)return null;var n=t.details.partList;if(n)for(var i=n.length;i--;){var o=n[i];if(o.index===r&&o.fragment.sn===e)return o}return null}},"./src/controller/stream-controller.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return m}));var n=r("./src/polyfills/number.ts"),i=r("./src/controller/base-stream-controller.ts"),o=r("./src/is-supported.ts"),a=r("./src/events.ts"),s=r("./src/utils/buffer-helper.ts"),u=r("./src/controller/fragment-tracker.ts"),c=r("./src/types/loader.ts"),l=r("./src/loader/fragment.ts"),f=r("./src/demux/transmuxer-interface.ts"),h=r("./src/types/transmuxer.ts"),d=r("./src/controller/gap-controller.ts"),p=r("./src/errors.ts"),v=r("./src/utils/logger.ts");function g(t,e){return g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},g(t,e)}var m=function(t){var e,r;function m(e,r){var n;return(n=t.call(this,e,r,"[stream-controller]")||this).audioCodecSwap=!1,n.gapController=null,n.level=-1,n._forceStartLoad=!1,n.altAudio=!1,n.audioOnly=!1,n.fragPlaying=null,n.onvplaying=null,n.onvseeked=null,n.fragLastKbps=0,n.stalled=!1,n.couldBacktrack=!1,n.audioCodecSwitch=!1,n.videoBuffer=null,n._registerListeners(),n}r=t,(e=m).prototype=Object.create(r.prototype),e.prototype.constructor=e,g(e,r);var y,b=m.prototype;return b._registerListeners=function(){var t=this.hls;t.on(a.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(a.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(a.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(a.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(a.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.on(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.on(a.Events.ERROR,this.onError,this),t.on(a.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.on(a.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.on(a.Events.BUFFER_CREATED,this.onBufferCreated,this),t.on(a.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),t.on(a.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),t.on(a.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b._unregisterListeners=function(){var t=this.hls;t.off(a.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(a.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(a.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(a.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(a.Events.LEVEL_LOADED,this.onLevelLoaded,this),t.off(a.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),t.off(a.Events.ERROR,this.onError,this),t.off(a.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),t.off(a.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),t.off(a.Events.BUFFER_CREATED,this.onBufferCreated,this),t.off(a.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),t.off(a.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),t.off(a.Events.FRAG_BUFFERED,this.onFragBuffered,this)},b.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},b.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,r=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var n=r.startLevel;-1===n&&(r.config.testBandwidth?(n=0,this.bitrateTest=!0):n=r.nextAutoLevel),this.level=r.nextLoadLevel=n,this.loadedmetadata=!1}e>0&&-1===t&&(this.log("Override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=i.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=i.State.STOPPED},b.stopLoad=function(){this._forceStartLoad=!1,t.prototype.stopLoad.call(this)},b.doTick=function(){switch(this.state){case i.State.IDLE:this.doTickIdle();break;case i.State.WAITING_LEVEL:var t,e=this.levels,r=this.level,n=null==e||null===(t=e[r])||void 0===t?void 0:t.details;if(n&&(!n.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(n))break;this.state=i.State.IDLE;break}break;case i.State.FRAG_LOADING_WAITING_RETRY:var o,a=self.performance.now(),s=this.retryDate;(!s||a>=s||null!==(o=this.media)&&void 0!==o&&o.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=i.State.IDLE)}this.onTickEnd()},b.onTickEnd=function(){t.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},b.doTickIdle=function(){var t,e,r=this.hls,o=this.levelLastLoaded,c=this.levels,l=this.media,f=r.config,h=r.nextLoadLevel;if(null!==o&&(l||!this.startFragRequested&&f.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&c&&c[h]){var p=c[h];this.level=r.nextLoadLevel=h;var v=p.details;if(!v||this.state===i.State.WAITING_LEVEL||v.live&&this.levelLastLoaded!==h)this.state=i.State.WAITING_LEVEL;else{var g=this.getLoadPosition();if(Object(n.isFiniteNumber)(g)){var m,y,b=p.maxBitrate;y=b?Math.max(8*f.maxBufferSize/b,f.maxBufferLength):f.maxBufferLength,y=Math.min(y,f.maxMaxBufferLength);var A=g<f.maxBufferHole?Math.max(d.MAX_START_GAP_JUMP,f.maxBufferHole):f.maxBufferHole,E=s.BufferHelper.bufferInfo(this.mediaBuffer?this.mediaBuffer:l,g,A);if(!(E.len>=y)){if(this._streamEnded(E,v)){var w={};return this.altAudio&&(w.type="video"),this.hls.trigger(a.Events.BUFFER_EOS,w),void(this.state=i.State.ENDED)}m=E.end;var k=this.getNextFragment(m,v);if(this.couldBacktrack&&!this.fragPrevious&&k&&"initSegment"!==k.sn){var T=k.sn-v.startSN;T>1&&(k=v.fragments[T-1],this.fragmentTracker.removeFragment(k))}k&&this.fragmentTracker.getState(k)===u.FragmentState.OK&&this.nextLoadPosition>m&&(k=this.getNextFragment(this.nextLoadPosition,v)),k&&(!k.initSegment||k.initSegment.data||this.bitrateTest||(k=k.initSegment),"identity"!==(null===(t=k.decryptdata)||void 0===t?void 0:t.keyFormat)||null!==(e=k.decryptdata)&&void 0!==e&&e.key?this.loadFragment(k,v,m):this.loadKey(k,v))}}}}},b.loadFragment=function(e,r,n){var i,o=this.fragmentTracker.getState(e);if(this.fragCurrent=e,o===u.FragmentState.BACKTRACKED){var a=this.fragmentTracker.getBacktrackData(e);if(a)return this._handleFragmentLoadProgress(a),void this._handleFragmentLoadComplete(a);o=u.FragmentState.NOT_LOADED}o===u.FragmentState.NOT_LOADED||o===u.FragmentState.PARTIAL?"initSegment"===e.sn?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,t.prototype.loadFragment.call(this,e,r,n)):o===u.FragmentState.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},b.getAppendedFrag=function(t){var e=this.fragmentTracker.getAppendedFrag(t,c.PlaylistLevelType.MAIN);return e&&"fragment"in e?e.fragment:e},b.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,c.PlaylistLevelType.MAIN)},b.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.end+.5):null},b.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},b.nextLevelSwitch=function(){var t=this.levels,e=this.media;if(null!=e&&e.readyState){var r,n=this.getAppendedFrag(e.currentTime);if(n&&n.start>1&&this.flushMainBuffer(0,n.start-1),!e.paused&&t){var i=t[this.hls.nextLoadLevel],o=this.fragLastKbps;r=o&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*o)+1:0}else r=0;var a=this.getBufferedFrag(e.currentTime+r);if(a){var s=this.followingBufferedFrag(a);if(s){this.abortCurrentFrag();var u=s.maxStartPTS?s.maxStartPTS:s.start,c=s.duration,l=Math.max(a.end,u+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,.5*c),.75*c));this.flushMainBuffer(l,Number.POSITIVE_INFINITY)}}}},b.abortCurrentFrag=function(){var t=this.fragCurrent;this.fragCurrent=null,null!=t&&t.loader&&t.loader.abort(),this.state===i.State.KEY_LOADING&&(this.state=i.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},b.flushMainBuffer=function(e,r){t.prototype.flushMainBuffer.call(this,e,r,this.altAudio?"video":null)},b.onMediaAttached=function(e,r){t.prototype.onMediaAttached.call(this,e,r);var n=r.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),n.addEventListener("playing",this.onvplaying),n.addEventListener("seeked",this.onvseeked),this.gapController=new d.default(this.config,n,this.fragmentTracker,this.hls)},b.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),t.prototype.onMediaDetaching.call(this)},b.onMediaPlaying=function(){this.tick()},b.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:null;Object(n.isFiniteNumber)(e)&&this.log("Media seeked to "+e.toFixed(3)),this.tick()},b.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(a.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},b.onManifestParsed=function(t,e){var r,n=!1,i=!1;e.levels.forEach((function(t){(r=t.audioCodec)&&(-1!==r.indexOf("mp4a.40.2")&&(n=!0),-1!==r.indexOf("mp4a.40.5")&&(i=!0))})),this.audioCodecSwitch=n&&i&&!Object(o.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1},b.onLevelLoading=function(t,e){var r=this.levels;if(r&&this.state===i.State.IDLE){var n=r[e.level];(!n.details||n.details.live&&this.levelLastLoaded!==e.level||this.waitForCdnTuneIn(n.details))&&(this.state=i.State.WAITING_LEVEL)}},b.onLevelLoaded=function(t,e){var r,n=this.levels,o=e.level,s=e.details,u=s.totalduration;if(n){this.log("Level "+o+" loaded ["+s.startSN+","+s.endSN+"], cc ["+s.startCC+", "+s.endCC+"] duration:"+u);var c=this.fragCurrent;!c||this.state!==i.State.FRAG_LOADING&&this.state!==i.State.FRAG_LOADING_WAITING_RETRY||c.level!==e.level&&c.loader&&(this.state=i.State.IDLE,c.loader.abort());var l=n[o],f=0;if(s.live||null!==(r=l.details)&&void 0!==r&&r.live){if(s.fragments[0]||(s.deltaUpdateFailed=!0),s.deltaUpdateFailed)return;f=this.alignPlaylists(s,l.details)}if(l.details=s,this.levelLastLoaded=o,this.hls.trigger(a.Events.LEVEL_UPDATED,{details:s,level:o}),this.state===i.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=i.State.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,f),this.tick()}else this.warn("Levels were reset while loading level "+o)},b._handleFragmentLoadProgress=function(t){var e,r=t.frag,n=t.part,i=t.payload,o=this.levels;if(o){var a=o[r.level],s=a.details;if(s){var u=a.videoCodec,l=s.PTSKnown||!s.live,d=null===(e=r.initSegment)||void 0===e?void 0:e.data,p=this._getAudioCodec(a),v=this.transmuxer=this.transmuxer||new f.default(this.hls,c.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),g=n?n.index:-1,m=-1!==g,y=new h.ChunkMetadata(r.level,r.sn,r.stats.chunkCount,i.byteLength,g,m),b=this.initPTS[r.cc];v.push(i,d,p,u,r,n,s.totalduration,l,y,b)}else this.warn("Dropping fragment "+r.sn+" of level "+r.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+r.sn+" of level "+r.level+" will not be buffered")},b.onAudioTrackSwitching=function(t,e){var r=this.altAudio,n=!!e.url,i=e.id;if(!n){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var o=this.fragCurrent;null!=o&&o.loader&&(this.log("Switching to main audio track, cancel main fragment load"),o.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;r&&s.trigger(a.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(a.Events.AUDIO_TRACK_SWITCHED,{id:i})}},b.onAudioTrackSwitched=function(t,e){var r=e.id,n=!!this.hls.audioTracks[r].url;if(n){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=n,this.tick()},b.onBufferCreated=function(t,e){var r,n,i=e.tracks,o=!1;for(var a in i){var s=i[a];if("main"===s.id){if(n=a,r=s,"video"===a){var u=i[a];u&&(this.videoBuffer=u.buffer)}}else o=!0}o&&r?(this.log("Alternate track found, use "+n+".buffered to schedule main fragment loading"),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media},b.onFragBuffered=function(t,e){var r=e.frag,n=e.part;if(!r||r.type===c.PlaylistLevelType.MAIN){if(this.fragContextChanged(r))return this.warn("Fragment "+r.sn+(n?" p: "+n.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===i.State.PARSED&&(this.state=i.State.IDLE));var o=n?n.stats:r.stats;this.fragLastKbps=Math.round(8*o.total/(o.buffering.end-o.loading.first)),"initSegment"!==r.sn&&(this.fragPrevious=r),this.fragBufferedComplete(r,n)}},b.onError=function(t,e){switch(e.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:case p.ErrorDetails.KEY_LOAD_ERROR:case p.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(c.PlaylistLevelType.MAIN,e);break;case p.ErrorDetails.LEVEL_LOAD_ERROR:case p.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==i.State.ERROR&&(e.fatal?(this.warn(""+e.details),this.state=i.State.ERROR):e.levelRetry||this.state!==i.State.WAITING_LEVEL||(this.state=i.State.IDLE));break;case p.ErrorDetails.BUFFER_FULL_ERROR:"main"!==e.parent||this.state!==i.State.PARSING&&this.state!==i.State.PARSED||(this.media&&s.BufferHelper.isBuffered(this.media,this.media.currentTime)&&s.BufferHelper.isBuffered(this.media,this.media.currentTime+.5)?(this.reduceMaxBufferLength(),this.state=i.State.IDLE):(this.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.immediateLevelSwitch()))}},b.checkBuffer=function(){var t=this.media,e=this.gapController;if(t&&e&&t.readyState){var r=s.BufferHelper.getBuffered(t);!this.loadedmetadata&&r.length?(this.loadedmetadata=!0,this.seekToStartPos()):e.poll(this.lastCurrentTime),this.lastCurrentTime=t.currentTime}},b.onFragLoadEmergencyAborted=function(){this.state=i.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},b.onBufferFlushed=function(t,e){var r=e.type;if(r!==l.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var n=(r===l.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(n,r,c.PlaylistLevelType.MAIN)}},b.onLevelsUpdated=function(t,e){this.levels=e.levels},b.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},b.seekToStartPos=function(){var t=this.media,e=t.currentTime,r=this.startPosition;if(r>=0&&e<r){if(t.seeking)return void v.logger.log("could not seek to "+r+", already seeking at "+e);var n=s.BufferHelper.getBuffered(t),i=(n.length?n.start(0):0)-r;i>0&&i<this.config.maxBufferHole&&(v.logger.log("adjusting start position by "+i+" to match buffer start"),r+=i,this.startPosition=r),this.log("seek to target start position "+r+" from current time "+e),t.currentTime=r}},b._getAudioCodec=function(t){var e=this.config.defaultAudioCodec||t.audioCodec;return this.audioCodecSwap&&e&&(this.log("Swapping audio codec"),e=-1!==e.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),e},b._loadBitrateTestFrag=function(t){var e=this;this._doFragLoad(t).then((function(r){var n=e.hls;if(r&&!n.nextLoadLevel&&!e.fragContextChanged(t)){e.fragLoadError=0,e.state=i.State.IDLE,e.startFragRequested=!1,e.bitrateTest=!1;var o=t.stats;o.parsing.start=o.parsing.end=o.buffering.start=o.buffering.end=self.performance.now(),n.trigger(a.Events.FRAG_LOADED,r)}}))},b._handleTransmuxComplete=function(t){var e,r="main",o=this.hls,s=t.remuxResult,u=t.chunkMeta,c=this.getCurrentContext(u);if(!c)return this.warn("The loading context changed while buffering fragment "+u.sn+" of level "+u.level+". This chunk will not be buffered."),void this.resetLiveStartWhenNotLoaded(u.level);var f=c.frag,h=c.part,d=c.level,p=s.video,v=s.text,g=s.id3,m=s.initSegment,y=this.altAudio?void 0:s.audio;if(!this.fragContextChanged(f)){if(this.state=i.State.PARSING,m){m.tracks&&(this._bufferInitSegment(d,m.tracks,f,u),o.trigger(a.Events.FRAG_PARSING_INIT_SEGMENT,{frag:f,id:r,tracks:m.tracks}));var b=m.initPTS,A=m.timescale;Object(n.isFiniteNumber)(b)&&(this.initPTS[f.cc]=b,o.trigger(a.Events.INIT_PTS_FOUND,{frag:f,id:r,initPTS:b,timescale:A}))}if(p&&!1!==s.independent){if(d.details){var E=p.startPTS,w=p.endPTS,k=p.startDTS,T=p.endDTS;if(h)h.elementaryStreams[p.type]={startPTS:E,endPTS:w,startDTS:k,endDTS:T};else if(p.firstKeyFrame&&p.independent&&(this.couldBacktrack=!0),p.dropped&&p.independent){if(this.getLoadPosition()+this.config.maxBufferHole<E)return void this.backtrack(f);f.setElementaryStreamInfo(p.type,f.start,w,f.start,T,!0)}f.setElementaryStreamInfo(p.type,E,w,k,T),this.bufferFragmentData(p,f,h,u)}}else if(!1===s.independent)return void this.backtrack(f);if(y){var C=y.startPTS,x=y.endPTS,_=y.startDTS,S=y.endDTS;h&&(h.elementaryStreams[l.ElementaryStreamTypes.AUDIO]={startPTS:C,endPTS:x,startDTS:_,endDTS:S}),f.setElementaryStreamInfo(l.ElementaryStreamTypes.AUDIO,C,x,_,S),this.bufferFragmentData(y,f,h,u)}if(null!=g&&null!==(e=g.samples)&&void 0!==e&&e.length){var R={frag:f,id:r,samples:g.samples};o.trigger(a.Events.FRAG_PARSING_METADATA,R)}if(v){var L={frag:f,id:r,samples:v.samples};o.trigger(a.Events.FRAG_PARSING_USERDATA,L)}}},b._bufferInitSegment=function(t,e,r,n){var o=this;if(this.state===i.State.PARSING){this.audioOnly=!!e.audio&&!e.video,this.altAudio&&!this.audioOnly&&delete e.audio;var s=e.audio,u=e.video,c=e.audiovideo;if(s){var l=t.audioCodec,f=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(l&&(l=-1!==l.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==s.metadata.channelCount&&-1===f.indexOf("firefox")&&(l="mp4a.40.5")),-1!==f.indexOf("android")&&"audio/mpeg"!==s.container&&(l="mp4a.40.2",this.log("Android: force audio codec to "+l)),t.audioCodec&&t.audioCodec!==l&&this.log('Swapping manifest audio codec "'+t.audioCodec+'" for "'+l+'"'),s.levelCodec=l,s.id="main",this.log("Init audio buffer, container:"+s.container+", codecs[selected/level/parsed]=["+(l||"")+"/"+(t.audioCodec||"")+"/"+s.codec+"]")}u&&(u.levelCodec=t.videoCodec,u.id="main",this.log("Init video buffer, container:"+u.container+", codecs[level/parsed]=["+(t.videoCodec||"")+"/"+u.codec+"]")),c&&this.log("Init audiovideo buffer, container:"+c.container+", codecs[level/parsed]=["+(t.attrs.CODECS||"")+"/"+c.codec+"]"),this.hls.trigger(a.Events.BUFFER_CODECS,e),Object.keys(e).forEach((function(t){var i=e[t].initSegment;null!=i&&i.byteLength&&o.hls.trigger(a.Events.BUFFER_APPENDING,{type:t,data:i,frag:r,part:null,chunkMeta:n,parent:r.type})})),this.tick()}},b.backtrack=function(t){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(t);var e=this.fragmentTracker.backtrack(t);this.fragPrevious=null,this.nextLoadPosition=t.start,e?this.resetFragmentLoading(t):this.state=i.State.BACKTRACKING},b.checkFragmentChanged=function(){var t=this.media,e=null;if(t&&t.readyState>1&&!1===t.seeking){var r=t.currentTime;if(s.BufferHelper.isBuffered(t,r)?e=this.getAppendedFrag(r):s.BufferHelper.isBuffered(t,r+.1)&&(e=this.getAppendedFrag(r+.1)),e){var n=this.fragPlaying,i=e.level;n&&e.sn===n.sn&&n.level===i&&e.urlId===n.urlId||(this.hls.trigger(a.Events.FRAG_CHANGED,{frag:e}),n&&n.level===i||this.hls.trigger(a.Events.LEVEL_SWITCHED,{level:i}),this.fragPlaying=e)}}},(y=[{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;if(t){var e=this.getAppendedFrag(t.currentTime);return this.followingBufferedFrag(e)}return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(m.prototype,y),m}(i.default)},"./src/controller/subtitle-stream-controller.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"SubtitleStreamController",(function(){return h}));var n=r("./src/events.ts"),i=r("./src/utils/logger.ts"),o=r("./src/utils/buffer-helper.ts"),a=r("./src/controller/fragment-finders.ts"),s=r("./src/controller/fragment-tracker.ts"),u=r("./src/controller/base-stream-controller.ts"),c=r("./src/types/loader.ts"),l=r("./src/types/level.ts");function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}var h=function(t){var e,r;function h(e,r){var n;return(n=t.call(this,e,r,"[subtitle-stream-controller]")||this).levels=[],n.currentTrackId=-1,n.tracksBuffered=[],n._registerListeners(),n}r=t,(e=h).prototype=Object.create(r.prototype),e.prototype.constructor=e,f(e,r);var d,p=h.prototype;return p._registerListeners=function(){var t=this.hls;t.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.Events.ERROR,this.onError,this),t.on(n.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(n.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.on(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(n.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this)},p._unregisterListeners=function(){var t=this.hls;t.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.Events.ERROR,this.onError,this),t.off(n.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(n.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.off(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(n.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this)},p.startLoad=function(){this.stopLoad(),this.state=u.State.IDLE;var t=this.levels[this.currentTrackId];null!=t&&t.details&&(this.setInterval(500),this.tick())},p.onHandlerDestroyed=function(){this._unregisterListeners(),t.prototype.onHandlerDestroyed.call(this)},p.onSubtitleFragProcessed=function(t,e){var r=e.frag,n=e.success;if(this.fragPrevious=r,this.state=u.State.IDLE,n){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var o,a=r.start,s=0;s<i.length;s++)if(a>=i[s].start&&a<=i[s].end){o=i[s];break}var c=r.start+r.duration;o?o.end=c:(o={start:a,end:c},i.push(o))}}},p.onError=function(t,e){var r,n=e.frag;n&&n.type===c.PlaylistLevelType.SUBTITLE&&(null!==(r=this.fragCurrent)&&void 0!==r&&r.loader&&this.fragCurrent.loader.abort(),this.state=u.State.IDLE)},p.onSubtitleTracksUpdated=function(t,e){var r=this,n=e.subtitleTracks;this.tracksBuffered=[],this.levels=n.map((function(t){return new l.Level(t)})),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach((function(t){r.tracksBuffered[t.id]=[]})),this.mediaBuffer=null},p.onSubtitleTrackSwitch=function(t,e){if(this.currentTrackId=e.id,this.levels.length&&-1!==this.currentTrackId){var r=this.levels[this.currentTrackId];null!=r&&r.details?(this.mediaBuffer=this.mediaBufferTimeRanges,this.setInterval(500)):this.mediaBuffer=null}else this.clearInterval()},p.onSubtitleTrackLoaded=function(t,e){var r,n=e.id,i=e.details,o=this.currentTrackId,a=this.levels;if(a.length&&i){var s=a[o];if(!(n>=a.length||n!==o)&&s){if(this.mediaBuffer=this.mediaBufferTimeRanges,i.live||null!==(r=s.details)&&void 0!==r&&r.live){if(i.deltaUpdateFailed)return;this.alignPlaylists(i,s.details)}s.details=i,this.levelLastLoaded=n,this.setInterval(500)}}},p._handleFragmentLoadComplete=function(t){var e=t.frag,r=t.payload,i=e.decryptdata,o=this.hls;if(!this.fragContextChanged(e)&&r&&r.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var a=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(r),i.key.buffer,i.iv.buffer).then((function(t){var r=performance.now();o.trigger(n.Events.FRAG_DECRYPTED,{frag:e,payload:t,stats:{tstart:a,tdecrypt:r}})}))}},p.doTick=function(){if(this.media){if(this.state===u.State.IDLE){var t,e=this.config,r=this.currentTrackId,c=this.fragmentTracker,l=this.media,f=this.levels;if(!f.length||!f[r]||!f[r].details)return;var h=e.maxBufferHole,d=e.maxFragLookUpTolerance,p=Math.min(e.maxBufferLength,e.maxMaxBufferLength),v=o.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,l.currentTime,h),g=v.end;if(v.len>p)return;var m=f[r].details;console.assert(m,"Subtitle track details are defined on idle subtitle stream controller tick");var y,b=m.fragments,A=b.length,E=b[A-1].start+b[A-1].duration,w=this.fragPrevious;g<E?(w&&m.hasProgramDateTime&&(y=Object(a.findFragmentByPDT)(b,w.endProgramDateTime,d)),y||(y=Object(a.findFragmentByPTS)(w,b,g,d))):y=b[A-1],null!==(t=y)&&void 0!==t&&t.encrypted?(i.logger.log("Loading key for "+y.sn),this.state=u.State.KEY_LOADING,this.hls.trigger(n.Events.KEY_LOADING,{frag:y})):y&&c.getState(y)===s.FragmentState.NOT_LOADED&&this.loadFragment(y,m,g)}}else this.state=u.State.IDLE},p.loadFragment=function(e,r,n){this.fragCurrent=e,t.prototype.loadFragment.call(this,e,r,n)},(d=[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(h.prototype,d),h}(u.default)},"./src/controller/subtitle-track-controller.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/events.ts"),i=r("./src/utils/texttrack-utils.ts"),o=r("./src/controller/base-playlist-controller.ts"),a=r("./src/types/loader.ts");function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var u=function(t){var e,r;function o(e){var r;return(r=t.call(this,e,"[subtitle-track-controller]")||this).media=null,r.tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.selectDefaultTrack=!0,r.queuedDefaultTrack=-1,r.trackChangeListener=function(){return r.onTextTracksChanged()},r.useTextTrackPolling=!1,r.subtitlePollingInterval=-1,r.subtitleDisplay=!0,r.registerListeners(),r}r=t,(e=o).prototype=Object.create(r.prototype),e.prototype.constructor=e,s(e,r);var u,l=o.prototype;return l.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=null,t.prototype.destroy.call(this)},l.registerListeners=function(){var t=this.hls;t.on(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(n.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){var t=this.hls;t.off(n.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(n.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(n.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(n.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(n.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(n.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(n.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(n.Events.ERROR,this.onError,this)},l.onMediaAttached=function(t,e){var r=this;this.media=e.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?(self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval((function(){r.trackChangeListener()}),500)):this.media.textTracks.addEventListener("change",this.trackChangeListener))},l.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?self.clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),c(this.media.textTracks).forEach((function(t){Object(i.clearCurrentCues)(t)})),this.subtitleTrack=-1,this.media=null)},l.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},l.onManifestParsed=function(t,e){this.tracks=e.subtitleTracks},l.onSubtitleTrackLoaded=function(t,e){var r=e.id,n=e.details,i=this.trackId,o=this.tracksInGroup[i];if(o){var a=o.details;o.details=e.details,this.log("subtitle track "+r+" loaded ["+n.startSN+"-"+n.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,e,a))}else this.warn("Invalid subtitle track id "+r)},l.onLevelLoading=function(t,e){this.switchLevel(e.level)},l.onLevelSwitching=function(t,e){this.switchLevel(e.level)},l.switchLevel=function(t){var e=this.hls.levels[t];if(null!=e&&e.textGroupIds){var r=e.textGroupIds[e.urlId];if(this.groupId!==r){var i=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,o=this.tracks.filter((function(t){return!r||t.groupId===r}));this.tracksInGroup=o;var a=this.findTrackId(null==i?void 0:i.name)||this.findTrackId();this.groupId=r;var s={subtitleTracks:o};this.log("Updating subtitle tracks, "+o.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(n.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==a&&this.setSubtitleTrack(a,i)}}},l.findTrackId=function(t){for(var e=this.tracksInGroup,r=0;r<e.length;r++){var n=e[r];if((!this.selectDefaultTrack||n.default)&&(!t||t===n.name))return n.id}return-1},l.onError=function(e,r){t.prototype.onError.call(this,e,r),!r.fatal&&r.context&&r.context.type===a.PlaylistContextType.SUBTITLE_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},l.loadPlaylist=function(t){var e=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(e)){var r=e.id,i=e.groupId,o=e.url;if(t)try{o=t.addDirectives(o)}catch(t){this.warn("Could not construct new URL with HLS Delivery Directives: "+t)}this.log("Loading subtitle playlist for id "+r),this.hls.trigger(n.Events.SUBTITLE_TRACK_LOADING,{url:o,id:r,groupId:i,deliveryDirectives:t||null})}},l.toggleTrackModes=function(t){var e=this,r=this.media,n=this.subtitleDisplay,i=this.trackId;if(r){var o=c(r.textTracks),a=o.filter((function(t){return t.groupId===e.groupId}));if(-1===t)[].slice.call(o).forEach((function(t){t.mode="disabled"}));else{var s=a[i];s&&(s.mode="disabled")}var u=a[t];u&&(u.mode=n?"showing":"hidden")}},l.setSubtitleTrack=function(t,e){var r,i=this.tracksInGroup;if(this.media){if(this.trackId!==t&&this.toggleTrackModes(t),!(this.trackId===t&&(-1===t||null!==(r=i[t])&&void 0!==r&&r.details)||t<-1||t>=i.length)){this.clearTimer();var o=i[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,o){var a=o.id,s=o.groupId,u=void 0===s?"":s,c=o.name,l=o.type,f=o.url;this.hls.trigger(n.Events.SUBTITLE_TRACK_SWITCH,{id:a,groupId:u,name:c,type:l,url:f});var h=this.switchParams(o.url,null==e?void 0:e.details);this.loadPlaylist(h)}else this.hls.trigger(n.Events.SUBTITLE_TRACK_SWITCH,{id:t})}}else this.queuedDefaultTrack=t},l.onTextTracksChanged=function(){if(this.media&&this.hls.config.renderTextTracksNatively){for(var t=-1,e=c(this.media.textTracks),r=0;r<e.length;r++)if("hidden"===e[r].mode)t=r;else if("showing"===e[r].mode){t=r;break}this.subtitleTrack=t}},(u=[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1;var e=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(t,e)}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(o.prototype,u),o}(o.default);function c(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];"subtitles"===n.kind&&n.label&&e.push(t[r])}return e}e.default=u},"./src/controller/timeline-controller.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"TimelineController",(function(){return h}));var n=r("./src/polyfills/number.ts"),i=r("./src/events.ts"),o=r("./src/utils/cea-608-parser.ts"),a=r("./src/utils/output-filter.ts"),s=r("./src/utils/webvtt-parser.ts"),u=r("./src/utils/texttrack-utils.ts"),c=r("./src/utils/imsc1-ttml-parser.ts"),l=r("./src/types/loader.ts"),f=r("./src/utils/logger.ts"),h=function(){function t(t){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var e=new a.default(this,"textTrack1"),r=new a.default(this,"textTrack2"),n=new a.default(this,"textTrack3"),s=new a.default(this,"textTrack4");this.cea608Parser1=new o.default(1,e,r),this.cea608Parser2=new o.default(3,n,s)}t.on(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(i.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(i.Events.FRAG_LOADING,this.onFragLoading,this),t.on(i.Events.FRAG_LOADED,this.onFragLoaded,this),t.on(i.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(i.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(i.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(i.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var e=t.prototype;return e.destroy=function(){var t=this.hls;t.off(i.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(i.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(i.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(i.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(i.Events.FRAG_LOADING,this.onFragLoading,this),t.off(i.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(i.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(i.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(i.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(i.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(i.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},e.addCues=function(t,e,r,n,o){for(var a,s,u,c,l=!1,f=o.length;f--;){var h=o[f],d=(a=h[0],s=h[1],u=e,c=r,Math.min(s,c)-Math.max(a,u));if(d>=0&&(h[0]=Math.min(h[0],e),h[1]=Math.max(h[1],r),l=!0,d/(r-e)>.5))return}if(l||o.push([e,r]),this.config.renderTextTracksNatively){var p=this.captionsTracks[t];this.Cues.newCue(p,e,r,n)}else{var v=this.Cues.newCue(null,e,r,n);this.hls.trigger(i.Events.CUES_PARSED,{type:"captions",cues:v,track:t})}},e.onInitPtsFound=function(t,e){var r=this,n=e.frag,o=e.id,a=e.initPTS,s=e.timescale,u=this.unparsedVttFrags;"main"===o&&(this.initPTS[n.cc]=a,this.timescale[n.cc]=s),u.length&&(this.unparsedVttFrags=[],u.forEach((function(t){r.onFragLoaded(i.Events.FRAG_LOADED,t)})))},e.getExistingTrack=function(t){var e=this.media;if(e)for(var r=0;r<e.textTracks.length;r++){var n=e.textTracks[r];if(n[t])return n}return null},e.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},e.createNativeTrack=function(t){if(!this.captionsTracks[t]){var e=this.captionsProperties,r=this.captionsTracks,n=this.media,i=e[t],o=i.label,a=i.languageCode,s=this.getExistingTrack(t);if(s)r[t]=s,Object(u.clearCurrentCues)(r[t]),Object(u.sendAddTrackEvent)(r[t],n);else{var c=this.createTextTrack("captions",o,a);c&&(c[t]=!0,r[t]=c)}}},e.createNonNativeTrack=function(t){if(!this.nonNativeCaptionsTracks[t]){var e=this.captionsProperties[t];if(e){var r={_id:t,label:e.label,kind:"captions",default:!!e.media&&!!e.media.default,closedCaptions:e.media};this.nonNativeCaptionsTracks[t]=r,this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}}},e.createTextTrack=function(t,e,r){var n=this.media;if(n)return n.addTextTrack(t,e,r)},e.onMediaAttaching=function(t,e){this.media=e.media,this._cleanTracks()},e.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach((function(e){Object(u.clearCurrentCues)(t[e]),delete t[e]})),this.nonNativeCaptionsTracks={}},e.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},e._cleanTracks=function(){var t=this.media;if(t){var e=t.textTracks;if(e)for(var r=0;r<e.length;r++)Object(u.clearCurrentCues)(e[r])}},e.onSubtitleTracksUpdated=function(t,e){var r=this;this.textTracks=[];var n=e.subtitleTracks||[],o=n.some((function(t){return t.textCodec===c.IMSC1_CODEC}));if(this.config.enableWebVTT||o&&this.config.enableIMSC1){var a=this.tracks&&n&&this.tracks.length===n.length;if(this.tracks=n||[],this.config.renderTextTracksNatively){var s=this.media?this.media.textTracks:[];this.tracks.forEach((function(t,e){var n;if(e<s.length){for(var i=null,o=0;o<s.length;o++)if(d(s[o],t)){i=s[o];break}i&&(n=i)}n?Object(u.clearCurrentCues)(n):(n=r.createTextTrack("subtitles",t.name,t.lang))&&(n.mode="disabled"),n&&(n.groupId=t.groupId,r.textTracks.push(n))}))}else if(!a&&this.tracks&&this.tracks.length){var l=this.tracks.map((function(t){return{label:t.name,kind:t.type.toLowerCase(),default:t.default,subtitleTrack:t}}));this.hls.trigger(i.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:l})}}},e.onManifestLoaded=function(t,e){var r=this;this.config.enableCEA708Captions&&e.captions&&e.captions.forEach((function(t){var e=/(?:CC|SERVICE)([1-4])/.exec(t.instreamId);if(e){var n="textTrack"+e[1],i=r.captionsProperties[n];i&&(i.label=t.name,t.lang&&(i.languageCode=t.lang),i.media=t)}}))},e.onFragLoading=function(t,e){var r=this.cea608Parser1,n=this.cea608Parser2,i=this.lastSn;if(this.enabled&&r&&n&&e.frag.type===l.PlaylistLevelType.MAIN){var o=e.frag.sn;o!==i+1&&(r.reset(),n.reset()),this.lastSn=o}},e.onFragLoaded=function(t,e){var r=e.frag,o=e.payload,a=this.initPTS,s=this.unparsedVttFrags;if(r.type===l.PlaylistLevelType.SUBTITLE)if(o.byteLength){if(!Object(n.isFiniteNumber)(a[r.cc]))return s.push(e),void(a.length&&this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Missing initial subtitle PTS")}));var u=r.decryptdata;if(null==u||null==u.key||"AES-128"!==u.method){var f=this.tracks[r.level],h=this.vttCCs;h[r.cc]||(h[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),f&&f.textCodec===c.IMSC1_CODEC?this._parseIMSC1(r,o):this._parseVTTs(r,o,h)}}else this.hls.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})},e._parseIMSC1=function(t,e){var r=this,n=this.hls;Object(c.parseIMSC1)(e,this.initPTS[t.cc],this.timescale[t.cc],(function(e){r._appendCues(e,t.level),n.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})}),(function(e){f.logger.log("Failed to parse IMSC1: "+e),n.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:e})}))},e._parseVTTs=function(t,e,r){var n=this,o=this.hls;Object(s.parseWebVTT)(e,this.initPTS[t.cc],this.timescale[t.cc],r,t.cc,t.start,(function(e){n._appendCues(e,t.level),o.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})}),(function(r){n._fallbackToIMSC1(t,e),f.logger.log("Failed to parse VTT cue: "+r),o.trigger(i.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:r})}))},e._fallbackToIMSC1=function(t,e){var r=this,n=this.tracks[t.level];n.textCodec||Object(c.parseIMSC1)(e,this.initPTS[t.cc],this.timescale[t.cc],(function(){n.textCodec=c.IMSC1_CODEC,r._parseIMSC1(t,e)}),(function(){n.textCodec="wvtt"}))},e._appendCues=function(t,e){var r=this.hls;if(this.config.renderTextTracksNatively){var n=this.textTracks[e];if("disabled"===n.mode)return;t.forEach((function(t){return Object(u.addCueToTrack)(n,t)}))}else{var o=this.tracks[e].default?"default":"subtitles"+e;r.trigger(i.Events.CUES_PARSED,{type:"subtitles",cues:t,track:o})}},e.onFragDecrypted=function(t,e){var r=e.frag;if(r.type===l.PlaylistLevelType.SUBTITLE){if(!Object(n.isFiniteNumber)(this.initPTS[r.cc]))return void this.unparsedVttFrags.push(e);this.onFragLoaded(i.Events.FRAG_LOADED,e)}},e.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},e.onFragParsingUserdata=function(t,e){var r=this.cea608Parser1,n=this.cea608Parser2;if(this.enabled&&r&&n)for(var i=0;i<e.samples.length;i++){var o=e.samples[i].bytes;if(o){var a=this.extractCea608Data(o);r.addData(e.samples[i].pts,a[0]),n.addData(e.samples[i].pts,a[1])}}},e.onBufferFlushing=function(t,e){var r=e.startOffset,n=e.endOffset,i=e.type;if(!i||"video"===i){var o=this.media;if(!o||o.currentTime<n)return;var a=this.captionsTracks;Object.keys(a).forEach((function(t){return Object(u.removeCuesInRange)(a[t],r,n)}))}},e.extractCea608Data=function(t){for(var e=31&t[0],r=2,n=[[],[]],i=0;i<e;i++){var o=t[r++],a=127&t[r++],s=127&t[r++],u=3&o;0===a&&0===s||0!=(4&o)&&(0!==u&&1!==u||(n[u].push(a),n[u].push(s)))}return n},t}();function d(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}},"./src/crypt/aes-crypto.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var n=function(){function t(t,e){this.subtle=void 0,this.aesIV=void 0,this.subtle=t,this.aesIV=e}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}()},"./src/crypt/aes-decryptor.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"removePadding",(function(){return i})),r.d(e,"default",(function(){return o}));var n=r("./src/utils/typed-array.ts");function i(t){var e=t.byteLength,r=e&&new DataView(t.buffer).getUint8(e-1);return r?Object(n.sliceUint8)(t,0,e-r):t}var o=function(){function t(){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.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var e=t.prototype;return e.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),r=new Uint32Array(4),n=0;n<4;n++)r[n]=e.getUint32(4*n);return r},e.initTable=function(){var t=this.sBox,e=this.invSBox,r=this.subMix,n=r[0],i=r[1],o=r[2],a=r[3],s=this.invSubMix,u=s[0],c=s[1],l=s[2],f=s[3],h=new Uint32Array(256),d=0,p=0,v=0;for(v=0;v<256;v++)h[v]=v<128?v<<1:v<<1^283;for(v=0;v<256;v++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,t[d]=g,e[g]=d;var m=h[d],y=h[m],b=h[y],A=257*h[g]^16843008*g;n[d]=A<<24|A>>>8,i[d]=A<<16|A>>>16,o[d]=A<<8|A>>>24,a[d]=A,A=16843009*b^65537*y^257*m^16843008*d,u[g]=A<<24|A>>>8,c[g]=A<<16|A>>>16,l[g]=A<<8|A>>>24,f[g]=A,d?(d=m^h[h[h[b^m]]],p^=h[h[p]]):d=p=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),r=!0,n=0;n<e.length&&r;)r=e[n]===this.key[n],n++;if(!r){this.key=e;var i=this.keySize=e.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var o,a,s,u,c=this.ksRows=4*(i+6+1),l=this.keySchedule=new Uint32Array(c),f=this.invKeySchedule=new Uint32Array(c),h=this.sBox,d=this.rcon,p=this.invSubMix,v=p[0],g=p[1],m=p[2],y=p[3];for(o=0;o<c;o++)o<i?s=l[o]=e[o]:(u=s,o%i==0?(u=h[(u=u<<8|u>>>24)>>>24]<<24|h[u>>>16&255]<<16|h[u>>>8&255]<<8|h[255&u],u^=d[o/i|0]<<24):i>6&&o%i==4&&(u=h[u>>>24]<<24|h[u>>>16&255]<<16|h[u>>>8&255]<<8|h[255&u]),l[o]=s=(l[o-i]^u)>>>0);for(a=0;a<c;a++)o=c-a,u=3&a?l[o]:l[o-4],f[a]=a<4||o<=4?u:v[h[u>>>24]]^g[h[u>>>16&255]]^m[h[u>>>8&255]]^y[h[255&u]],f[a]=f[a]>>>0}},e.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},e.decrypt=function(t,e,r){for(var n,i,o,a,s,u,c,l,f,h,d,p,v,g,m=this.keySize+6,y=this.invKeySchedule,b=this.invSBox,A=this.invSubMix,E=A[0],w=A[1],k=A[2],T=A[3],C=this.uint8ArrayToUint32Array_(r),x=C[0],_=C[1],S=C[2],R=C[3],L=new Int32Array(t),O=new Int32Array(L.length),P=this.networkToHostOrderSwap;e<L.length;){for(f=P(L[e]),h=P(L[e+1]),d=P(L[e+2]),p=P(L[e+3]),s=f^y[0],u=p^y[1],c=d^y[2],l=h^y[3],v=4,g=1;g<m;g++)n=E[s>>>24]^w[u>>16&255]^k[c>>8&255]^T[255&l]^y[v],i=E[u>>>24]^w[c>>16&255]^k[l>>8&255]^T[255&s]^y[v+1],o=E[c>>>24]^w[l>>16&255]^k[s>>8&255]^T[255&u]^y[v+2],a=E[l>>>24]^w[s>>16&255]^k[u>>8&255]^T[255&c]^y[v+3],s=n,u=i,c=o,l=a,v+=4;n=b[s>>>24]<<24^b[u>>16&255]<<16^b[c>>8&255]<<8^b[255&l]^y[v],i=b[u>>>24]<<24^b[c>>16&255]<<16^b[l>>8&255]<<8^b[255&s]^y[v+1],o=b[c>>>24]<<24^b[l>>16&255]<<16^b[s>>8&255]<<8^b[255&u]^y[v+2],a=b[l>>>24]<<24^b[s>>16&255]<<16^b[u>>8&255]<<8^b[255&c]^y[v+3],O[e]=P(n^x),O[e+1]=P(a^_),O[e+2]=P(o^S),O[e+3]=P(i^R),x=f,_=h,S=d,R=p,e+=4}return O.buffer},t}()},"./src/crypt/decrypter.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return c}));var n=r("./src/crypt/aes-crypto.ts"),i=r("./src/crypt/fast-aes-key.ts"),o=r("./src/crypt/aes-decryptor.ts"),a=r("./src/utils/logger.ts"),s=r("./src/utils/mp4-tools.ts"),u=r("./src/utils/typed-array.ts"),c=function(){function t(t,e,r){var n=(void 0===r?{}:r).removePKCS7Padding,i=void 0===n||n;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=t,this.config=e,this.removePKCS7Padding=i,i)try{var o=self.crypto;o&&(this.subtle=o.subtle||o.webkitSubtle)}catch(t){}null===this.subtle&&(this.config.enableSoftwareAES=!0)}var e=t.prototype;return e.destroy=function(){this.observer=null},e.isSync=function(){return this.config.enableSoftwareAES},e.flush=function(){var t=this.currentResult;if(t){var e=new Uint8Array(t);return this.reset(),this.removePKCS7Padding?Object(o.removePadding)(e):e}this.reset()},e.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},e.decrypt=function(t,e,r,n){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(t),e,r);var i=this.flush();i&&n(i.buffer)}else this.webCryptoDecrypt(new Uint8Array(t),e,r).then(n)},e.softwareDecrypt=function(t,e,r){var n=this.currentIV,i=this.currentResult,a=this.remainderData;this.logOnce("JS AES decrypt"),a&&(t=Object(s.appendUint8Array)(a,t),this.remainderData=null);var c=this.getValidChunk(t);if(!c.length)return null;n&&(r=n);var l=this.softwareDecrypter;l||(l=this.softwareDecrypter=new o.default),l.expandKey(e);var f=i;return this.currentResult=l.decrypt(c.buffer,0,r),this.currentIV=Object(u.sliceUint8)(c,-16).buffer,f||null},e.webCryptoDecrypt=function(t,e,r){var o=this,a=this.subtle;return this.key===e&&this.fastAesKey||(this.key=e,this.fastAesKey=new i.default(a,e)),this.fastAesKey.expandKey().then((function(e){return a?new n.default(a,r).decrypt(t.buffer,e):Promise.reject(new Error("web crypto not initialized"))})).catch((function(n){return o.onWebCryptoError(n,t,e,r)}))},e.onWebCryptoError=function(t,e,r,n){return a.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",t),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(e,r,n)},e.getValidChunk=function(t){var e=t,r=t.length-t.length%16;return r!==t.length&&(e=Object(u.sliceUint8)(t,0,r),this.remainderData=Object(u.sliceUint8)(t,r)),e},e.logOnce=function(t){this.logEnabled&&(a.logger.log("[decrypter.ts]: "+t),this.logEnabled=!1)},t}()},"./src/crypt/fast-aes-key.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var n=function(){function t(t,e){this.subtle=void 0,this.key=void 0,this.subtle=t,this.key=e}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}()},"./src/demux/aacdemuxer.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/demux/base-audio-demuxer.ts"),i=r("./src/demux/adts.ts"),o=r("./src/utils/logger.ts"),a=r("./src/demux/id3.ts");function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var u=function(t){var e,r;function n(e,r){var n;return(n=t.call(this)||this).observer=void 0,n.config=void 0,n.observer=e,n.config=r,n}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,s(e,r);var u=n.prototype;return u.resetInitSegment=function(e,r,n){t.prototype.resetInitSegment.call(this,e,r,n),this._audioTrack={container:"audio/adts",type:"audio",id:0,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:e,duration:n,inputTimeScale:9e4,dropped:0}},n.probe=function(t){if(!t)return!1;for(var e=(a.getID3Data(t,0)||[]).length,r=t.length;e<r;e++)if(i.probe(t,e))return o.logger.log("ADTS sync word found !"),!0;return!1},u.canParse=function(t,e){return i.canParse(t,e)},u.appendFrame=function(t,e,r){return i.initTrackConfig(t,this.observer,e,r,t.manifestCodec),i.appendFrame(t,e,r,this.initPTS,this.frameIndex)},n}(n.default);u.minProbeByteLength=9,e.default=u},"./src/demux/adts.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"getAudioConfig",(function(){return a})),r.d(e,"isHeaderPattern",(function(){return s})),r.d(e,"getHeaderLength",(function(){return u})),r.d(e,"getFullFrameLength",(function(){return c})),r.d(e,"canGetFrameLength",(function(){return l})),r.d(e,"isHeader",(function(){return f})),r.d(e,"canParse",(function(){return h})),r.d(e,"probe",(function(){return d})),r.d(e,"initTrackConfig",(function(){return p})),r.d(e,"getFrameDuration",(function(){return v})),r.d(e,"parseFrameHeader",(function(){return g})),r.d(e,"appendFrame",(function(){return m}));var n=r("./src/utils/logger.ts"),i=r("./src/errors.ts"),o=r("./src/events.ts");function a(t,e,r,a){var s,u,c,l,f=navigator.userAgent.toLowerCase(),h=a,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];s=1+((192&e[r+2])>>>6);var p=(60&e[r+2])>>>2;if(!(p>d.length-1))return c=(1&e[r+2])<<2,c|=(192&e[r+3])>>>6,n.logger.log("manifest codec:"+a+", ADTS type:"+s+", samplingIndex:"+p),/firefox/i.test(f)?p>=6?(s=5,l=new Array(4),u=p-3):(s=2,l=new Array(2),u=p):-1!==f.indexOf("android")?(s=2,l=new Array(2),u=p):(s=5,l=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&p>=6?u=p-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(p>=6&&1===c||/vivaldi/i.test(f))||!a&&1===c)&&(s=2,l=new Array(2)),u=p)),l[0]=s<<3,l[0]|=(14&p)>>1,l[1]|=(1&p)<<7,l[1]|=c<<3,5===s&&(l[1]|=(14&u)>>1,l[2]=(1&u)<<7,l[2]|=8,l[3]=0),{config:l,samplerate:d[p],channelCount:c,codec:"mp4a.40."+s,manifestCodec:h};t.trigger(o.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+p})}function s(t,e){return 255===t[e]&&240==(246&t[e+1])}function u(t,e){return 1&t[e+1]?7:9}function c(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function l(t,e){return e+5<t.length}function f(t,e){return e+1<t.length&&s(t,e)}function h(t,e){return l(t,e)&&s(t,e)&&c(t,e)<=t.length-e}function d(t,e){if(f(t,e)){var r=u(t,e);if(e+r>=t.length)return!1;var n=c(t,e);if(n<=r)return!1;var i=e+n;return i===t.length||f(t,i)}return!1}function p(t,e,r,i,o){if(!t.samplerate){var s=a(e,r,i,o);if(!s)return;t.config=s.config,t.samplerate=s.samplerate,t.channelCount=s.channelCount,t.codec=s.codec,t.manifestCodec=s.manifestCodec,n.logger.log("parsed codec:"+t.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function v(t){return 9216e4/t}function g(t,e,r,n,i){var o=t.length,a=u(t,e),s=c(t,e);if((s-=a)>0&&e+a+s<=o)return{headerLength:a,frameLength:s,stamp:r+n*i}}function m(t,e,r,n,i){var o=g(e,r,n,i,v(t.samplerate));if(o){var a=o.stamp,s=o.headerLength,u=o.frameLength,c={unit:e.subarray(r+s,r+s+u),pts:a,dts:a};return t.samples.push(c),{sample:c,length:u+s}}}},"./src/demux/base-audio-demuxer.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"initPTSFn",(function(){return c}));var n=r("./src/polyfills/number.ts"),i=r("./src/demux/id3.ts"),o=r("./src/demux/dummy-demuxed-track.ts"),a=r("./src/utils/mp4-tools.ts"),s=r("./src/utils/typed-array.ts"),u=function(){function t(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var e=t.prototype;return e.resetInitSegment=function(t,e,r){this._id3Track={type:"id3",id:0,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},e.resetTimeStamp=function(){},e.resetContiguity=function(){},e.canParse=function(t,e){return!1},e.appendFrame=function(t,e,r){},e.demux=function(t,e){this.cachedData&&(t=Object(a.appendUint8Array)(this.cachedData,t),this.cachedData=null);var r,n,u=i.getID3Data(t,0),l=u?u.length:0,f=this._audioTrack,h=this._id3Track,d=u?i.getTimeStamp(u):void 0,p=t.length;for(0!==this.frameIndex&&null!==this.initPTS||(this.initPTS=c(d,e)),u&&u.length>0&&h.samples.push({pts:this.initPTS,dts:this.initPTS,data:u}),n=this.initPTS;l<p;){if(this.canParse(t,l)){var v=this.appendFrame(f,t,l);v?(this.frameIndex++,n=v.sample.pts,r=l+=v.length):l=p}else i.canParse(t,l)?(u=i.getID3Data(t,l),h.samples.push({pts:n,dts:n,data:u}),r=l+=u.length):l++;if(l===p&&r!==p){var g=Object(s.sliceUint8)(t,r);this.cachedData?this.cachedData=Object(a.appendUint8Array)(this.cachedData,g):this.cachedData=g}}return{audioTrack:f,avcTrack:Object(o.dummyTrack)(),id3Track:h,textTrack:Object(o.dummyTrack)()}},e.demuxSampleAes=function(t,e,r){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},e.flush=function(t){var e=this.cachedData;return e&&(this.cachedData=null,this.demux(e,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(o.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(o.dummyTrack)()}},e.destroy=function(){},t}(),c=function(t,e){return Object(n.isFiniteNumber)(t)?90*t:9e4*e};e.default=u},"./src/demux/chunk-cache.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var n=function(){function t(){this.chunks=[],this.dataLength=0}var e=t.prototype;return e.push=function(t){this.chunks.push(t),this.dataLength+=t.length},e.flush=function(){var t,e=this.chunks,r=this.dataLength;return e.length?(t=1===e.length?e[0]:function(t,e){for(var r=new Uint8Array(e),n=0,i=0;i<t.length;i++){var o=t[i];r.set(o,n),n+=o.length}return r}(e,r),this.reset(),t):new Uint8Array(0)},e.reset=function(){this.chunks.length=0,this.dataLength=0},t}()},"./src/demux/dummy-demuxed-track.ts":function(t,e,r){"use strict";function n(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}r.r(e),r.d(e,"dummyTrack",(function(){return n}))},"./src/demux/exp-golomb.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/utils/logger.ts"),i=function(){function t(t){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}var e=t.prototype;return e.loadWord=function(){var t=this.data,e=this.bytesAvailable,r=t.byteLength-e,n=new Uint8Array(4),i=Math.min(4,e);if(0===i)throw new Error("no bytes available");n.set(t.subarray(r,r+i)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},e.skipBits=function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),r=this.word>>>32-e;return t>32&&n.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?r<<e|this.readBits(e):r},e.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!=(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){for(var e=8,r=8,n=0;n<t;n++)0!==r&&(r=(e+this.readEG()+256)%256),e=0===r?e:r},e.readSPS=function(){var t,e,r,n=0,i=0,o=0,a=0,s=this.readUByte.bind(this),u=this.readBits.bind(this),c=this.readUEG.bind(this),l=this.readBoolean.bind(this),f=this.skipBits.bind(this),h=this.skipEG.bind(this),d=this.skipUEG.bind(this),p=this.skipScalingList.bind(this);s();var v=s();if(u(5),f(3),s(),d(),100===v||110===v||122===v||244===v||44===v||83===v||86===v||118===v||128===v){var g=c();if(3===g&&f(1),d(),d(),f(1),l())for(e=3!==g?8:12,r=0;r<e;r++)l()&&p(r<6?16:64)}d();var m=c();if(0===m)c();else if(1===m)for(f(1),h(),h(),t=c(),r=0;r<t;r++)h();d(),f(1);var y=c(),b=c(),A=u(1);0===A&&f(1),f(1),l()&&(n=c(),i=c(),o=c(),a=c());var E=[1,1];if(l()&&l())switch(s()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[s()<<8|s(),s()<<8|s()]}return{width:Math.ceil(16*(y+1)-2*n-2*i),height:(2-A)*(b+1)*16-(A?2:4)*(o+a),pixelRatio:E}},e.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}();e.default=i},"./src/demux/id3.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"isHeader",(function(){return i})),r.d(e,"isFooter",(function(){return o})),r.d(e,"getID3Data",(function(){return a})),r.d(e,"canParse",(function(){return u})),r.d(e,"getTimeStamp",(function(){return c})),r.d(e,"isTimeStampFrame",(function(){return l})),r.d(e,"getID3Frames",(function(){return h})),r.d(e,"decodeFrame",(function(){return d})),r.d(e,"utf8ArrayToStr",(function(){return y})),r.d(e,"testables",(function(){return b}));var n,i=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},o=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},a=function(t,e){for(var r=e,n=0;i(t,e);)n+=10,n+=s(t,e+6),o(t,e+10)&&(n+=10),e+=n;if(n>0)return t.subarray(r,r+n)},s=function(t,e){var r=0;return r=(127&t[e])<<21,r|=(127&t[e+1])<<14,(r|=(127&t[e+2])<<7)|127&t[e+3]},u=function(t,e){return i(t,e)&&s(t,e+6)+10<=t.length-e},c=function(t){for(var e=h(t),r=0;r<e.length;r++){var n=e[r];if(l(n))return m(n)}},l=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},f=function(t){var e=String.fromCharCode(t[0],t[1],t[2],t[3]),r=s(t,4);return{type:e,size:r,data:t.subarray(10,10+r)}},h=function(t){for(var e=0,r=[];i(t,e);){for(var n=s(t,e+6),a=(e+=10)+n;e+8<a;){var u=f(t.subarray(e)),c=d(u);c&&r.push(c),e+=u.size+10}o(t,e)&&(e+=10)}return r},d=function(t){return"PRIV"===t.type?p(t):"W"===t.type[0]?g(t):v(t)},p=function(t){if(!(t.size<2)){var e=y(t.data,!0),r=new Uint8Array(t.data.subarray(e.length+1));return{key:t.type,info:e,data:r.buffer}}},v=function(t){if(!(t.size<2)){if("TXXX"===t.type){var e=1,r=y(t.data.subarray(e),!0);e+=r.length+1;var n=y(t.data.subarray(e));return{key:t.type,info:r,data:n}}var i=y(t.data.subarray(1));return{key:t.type,data:i}}},g=function(t){if("WXXX"===t.type){if(t.size<2)return;var e=1,r=y(t.data.subarray(e),!0);e+=r.length+1;var n=y(t.data.subarray(e));return{key:t.type,info:r,data:n}}var i=y(t.data);return{key:t.type,data:i}},m=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),r=1&e[3],n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,r&&(n+=47721858.84),Math.round(n)}},y=function(t,e){void 0===e&&(e=!1);var r=A();if(r){var n=r.decode(t);if(e){var i=n.indexOf("\0");return-1!==i?n.substring(0,i):n}return n.replace(/\0/g,"")}for(var o,a,s,u=t.length,c="",l=0;l<u;){if(0===(o=t[l++])&&e)return c;if(0!==o&&3!==o)switch(o>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(o);break;case 12:case 13:a=t[l++],c+=String.fromCharCode((31&o)<<6|63&a);break;case 14:a=t[l++],s=t[l++],c+=String.fromCharCode((15&o)<<12|(63&a)<<6|(63&s)<<0)}}return c},b={decodeTextFrame:v};function A(){return n||void 0===self.TextDecoder||(n=new self.TextDecoder("utf-8")),n}},"./src/demux/mp3demuxer.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/demux/base-audio-demuxer.ts"),i=r("./src/demux/id3.ts"),o=r("./src/utils/logger.ts"),a=r("./src/demux/mpegaudio.ts");function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}var u=function(t){var e,r;function n(){return t.apply(this,arguments)||this}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,s(e,r);var u=n.prototype;return u.resetInitSegment=function(e,r,n){t.prototype.resetInitSegment.call(this,e,r,n),this._audioTrack={container:"audio/mpeg",type:"audio",id:0,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:e,duration:n,inputTimeScale:9e4,dropped:0}},n.probe=function(t){if(!t)return!1;for(var e=(i.getID3Data(t,0)||[]).length,r=t.length;e<r;e++)if(a.probe(t,e))return o.logger.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(t,e){return a.canParse(t,e)},u.appendFrame=function(t,e,r){if(null!==this.initPTS)return a.appendFrame(t,e,r,this.initPTS,this.frameIndex)},n}(n.default);u.minProbeByteLength=4,e.default=u},"./src/demux/mp4demuxer.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/utils/mp4-tools.ts"),i=r("./src/demux/dummy-demuxed-track.ts"),o=function(){function t(t,e){this.remainderData=null,this.config=void 0,this.config=e}var e=t.prototype;return e.resetTimeStamp=function(){},e.resetInitSegment=function(){},e.resetContiguity=function(){},t.probe=function(t){return Object(n.findBox)({data:t,start:0,end:Math.min(t.length,16384)},["moof"]).length>0},e.demux=function(t){var e=t,r=Object(i.dummyTrack)();if(this.config.progressive){this.remainderData&&(e=Object(n.appendUint8Array)(this.remainderData,t));var o=Object(n.segmentValidRange)(e);this.remainderData=o.remainder,r.samples=o.valid||new Uint8Array}else r.samples=e;return{audioTrack:Object(i.dummyTrack)(),avcTrack:r,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},e.flush=function(){var t=Object(i.dummyTrack)();return t.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(i.dummyTrack)(),avcTrack:t,id3Track:Object(i.dummyTrack)(),textTrack:Object(i.dummyTrack)()}},e.demuxSampleAes=function(t,e,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},e.destroy=function(){},t}();o.minProbeByteLength=1024,e.default=o},"./src/demux/mpegaudio.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"appendFrame",(function(){return u})),r.d(e,"parseHeader",(function(){return c})),r.d(e,"isHeaderPattern",(function(){return l})),r.d(e,"isHeader",(function(){return f})),r.d(e,"canParse",(function(){return h})),r.d(e,"probe",(function(){return d}));var n=null,i=[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],o=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],a=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],s=[0,1,1,4];function u(t,e,r,n,i){if(!(r+24>e.length)){var o=c(e,r);if(o&&r+o.frameLength<=e.length){var a=n+i*(9e4*o.samplesPerFrame/o.sampleRate),s={unit:e.subarray(r,r+o.frameLength),pts:a,dts:a};return t.config=[],t.channelCount=o.channelCount,t.samplerate=o.sampleRate,t.samples.push(s),{sample:s,length:o.frameLength}}}}function c(t,e){var r=t[e+1]>>3&3,u=t[e+1]>>1&3,c=t[e+2]>>4&15,l=t[e+2]>>2&3;if(1!==r&&0!==c&&15!==c&&3!==l){var f=t[e+2]>>1&1,h=t[e+3]>>6,d=1e3*i[14*(3===r?3-u:3===u?3:4)+c-1],p=o[3*(3===r?0:2===r?1:2)+l],v=3===h?1:2,g=a[r][u],m=s[u],y=8*g*m,b=Math.floor(g*d/p+f)*m;if(null===n){var A=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);n=A?parseInt(A[1]):0}return!!n&&n<=87&&2===u&&d>=224e3&&0===h&&(t[e+3]=128|t[e+3]),{sampleRate:p,channelCount:v,frameLength:b,samplesPerFrame:y}}}function l(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])}function f(t,e){return e+1<t.length&&l(t,e)}function h(t,e){return l(t,e)&&4<=t.length-e}function d(t,e){if(e+1<t.length&&l(t,e)){var r=c(t,e),n=4;null!=r&&r.frameLength&&(n=r.frameLength);var i=e+n;return i===t.length||f(t,i)}return!1}},"./src/demux/sample-aes.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/crypt/decrypter.ts"),i=r("./src/demux/tsdemuxer.ts"),o=function(){function t(t,e,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new n.default(t,e,{removePKCS7Padding:!1})}var e=t.prototype;return e.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.keyData.key.buffer,this.keyData.iv.buffer,e)},e.decryptAacSample=function(t,e,r,n){var i=t[e].unit,o=i.subarray(16,i.length-i.length%16),a=o.buffer.slice(o.byteOffset,o.byteOffset+o.length),s=this;this.decryptBuffer(a,(function(o){var a=new Uint8Array(o);i.set(a,16),n||s.decryptAacSamples(t,e+1,r)}))},e.decryptAacSamples=function(t,e,r){for(;;e++){if(e>=t.length)return void r();if(!(t[e].unit.length<32)){var n=this.decrypter.isSync();if(this.decryptAacSample(t,e,r,n),!n)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,r=new Int8Array(e),n=0,i=32;i<=t.length-16;i+=160,n+=16)r.set(t.subarray(i,i+16),n);return r},e.getAvcDecryptedUnit=function(t,e){for(var r=new Uint8Array(e),n=0,i=32;i<=t.length-16;i+=160,n+=16)t.set(r.subarray(n,n+16),i);return t},e.decryptAvcSample=function(t,e,r,n,o,a){var s=Object(i.discardEPB)(o.data),u=this.getAvcEncryptedData(s),c=this;this.decryptBuffer(u.buffer,(function(i){o.data=c.getAvcDecryptedUnit(s,i),a||c.decryptAvcSamples(t,e,r+1,n)}))},e.decryptAvcSamples=function(t,e,r,n){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,r=0){if(e>=t.length)return void n();for(var i=t[e].units;!(r>=i.length);r++){var o=i[r];if(!(o.data.length<=48||1!==o.type&&5!==o.type)){var a=this.decrypter.isSync();if(this.decryptAvcSample(t,e,r,n,o,a),!a)return}}}},t}();e.default=o},"./src/demux/transmuxer-interface.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return f}));var n=r("./node_modules/webworkify-webpack/index.js"),i=r("./src/events.ts"),o=r("./src/demux/transmuxer.ts"),a=r("./src/utils/logger.ts"),s=r("./src/errors.ts"),u=r("./src/utils/mediasource-helper.ts"),c=r("./node_modules/eventemitter3/index.js"),l=Object(u.getMediaSource)()||{isTypeSupported:function(){return!1}},f=function(){function t(t,e,r,u){var f=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=t,this.id=e,this.onTransmuxComplete=r,this.onFlush=u;var h=t.config,d=function(e,r){(r=r||{}).frag=f.frag,r.id=f.id,t.trigger(e,r)};this.observer=new c.EventEmitter,this.observer.on(i.Events.FRAG_DECRYPTED,d),this.observer.on(i.Events.ERROR,d);var p={mp4:l.isTypeSupported("video/mp4"),mpeg:l.isTypeSupported("audio/mpeg"),mp3:l.isTypeSupported('audio/mp4; codecs="mp3"')},v=navigator.vendor;if(h.enableWorker&&"undefined"!=typeof Worker){var g;a.logger.log("demuxing in webworker");try{g=this.worker=n("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),g.addEventListener("message",this.onwmsg),g.onerror=function(e){t.trigger(i.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+"  ("+e.filename+":"+e.lineno+")")})},g.postMessage({cmd:"init",typeSupported:p,vendor:v,id:e,config:JSON.stringify(h)})}catch(t){a.logger.warn("Error in worker:",t),a.logger.error("Error while initializing DemuxerWorker, fallback to inline"),g&&self.URL.revokeObjectURL(g.objectURL),this.transmuxer=new o.default(this.observer,p,h,v,e),this.worker=null}}else this.transmuxer=new o.default(this.observer,p,h,v,e)}var e=t.prototype;return e.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var r=this.observer;r&&r.removeAllListeners(),this.observer=null},e.push=function(t,e,r,n,i,s,u,c,l,f){var h=this;l.transmuxing.start=self.performance.now();var d=this.transmuxer,p=this.worker,v=s?s.start:i.start,g=i.decryptdata,m=this.frag,y=!(m&&i.cc===m.cc),b=!(m&&l.level===m.level),A=m?l.sn-m.sn:-1,E=this.part?l.part-this.part.index:1,w=!b&&(1===A||0===A&&1===E),k=self.performance.now();(b||A||0===i.stats.parsing.start)&&(i.stats.parsing.start=k),!s||!E&&w||(s.stats.parsing.start=k);var T=new o.TransmuxState(y,w,c,b,v);if(!w||y){a.logger.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+l.sn+" p: "+l.part+" level: "+l.level+" id: "+l.id+"\n        discontinuity: "+y+"\n        trackSwitch: "+b+"\n        contiguous: "+w+"\n        accurateTimeOffset: "+c+"\n        timeOffset: "+v);var C=new o.TransmuxConfig(r,n,e,u,f);this.configureTransmuxer(C)}if(this.frag=i,this.part=s,p)p.postMessage({cmd:"demux",data:t,decryptdata:g,chunkMeta:l,state:T},t instanceof ArrayBuffer?[t]:[]);else if(d){var x=d.push(t,g,l,T);Object(o.isPromise)(x)?x.then((function(t){h.handleTransmuxComplete(t)})):this.handleTransmuxComplete(x)}},e.flush=function(t){var e=this;t.transmuxing.start=self.performance.now();var r=this.transmuxer,n=this.worker;if(n)n.postMessage({cmd:"flush",chunkMeta:t});else if(r){var i=r.flush(t);Object(o.isPromise)(i)?i.then((function(r){e.handleFlushResult(r,t)})):this.handleFlushResult(i,t)}},e.handleFlushResult=function(t,e){var r=this;t.forEach((function(t){r.handleTransmuxComplete(t)})),this.onFlush(e)},e.onWorkerMessage=function(t){var e=t.data,r=this.hls;switch(e.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(e.data);break;case"flush":this.onFlush(e.data);break;default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,r.trigger(e.event,e.data)}},e.configureTransmuxer=function(t){var e=this.worker,r=this.transmuxer;e?e.postMessage({cmd:"configure",config:t}):r&&r.configure(t)},e.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},t}()},"./src/demux/transmuxer-worker.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return s}));var n=r("./src/demux/transmuxer.ts"),i=r("./src/events.ts"),o=r("./src/utils/logger.ts"),a=r("./node_modules/eventemitter3/index.js");function s(t){var e=new a.EventEmitter,r=function(e,r){t.postMessage({event:e,data:r})};e.on(i.Events.FRAG_DECRYPTED,r),e.on(i.Events.ERROR,r),t.addEventListener("message",(function(i){var a=i.data;switch(a.cmd){case"init":var s=JSON.parse(a.config);t.transmuxer=new n.default(e,a.typeSupported,s,a.vendor,a.id),Object(o.enableLogs)(s.debug),r("init",null);break;case"configure":t.transmuxer.configure(a.config);break;case"demux":var c=t.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(n.isPromise)(c)?c.then((function(e){u(t,e)})):u(t,c);break;case"flush":var f=a.chunkMeta,h=t.transmuxer.flush(f);Object(n.isPromise)(h)?h.then((function(e){l(t,e,f)})):l(t,h,f)}}))}function u(t,e){if((r=e.remuxResult).audio||r.video||r.text||r.id3||r.initSegment){var r,n=[],i=e.remuxResult,o=i.audio,a=i.video;o&&c(n,o),a&&c(n,a),t.postMessage({event:"transmuxComplete",data:e},n)}}function c(t,e){e.data1&&t.push(e.data1.buffer),e.data2&&t.push(e.data2.buffer)}function l(t,e,r){e.forEach((function(e){u(t,e)})),t.postMessage({event:"flush",data:r})}},"./src/demux/transmuxer.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return y})),r.d(e,"isPromise",(function(){return A})),r.d(e,"TransmuxConfig",(function(){return E})),r.d(e,"TransmuxState",(function(){return w}));var n,i=r("./src/events.ts"),o=r("./src/errors.ts"),a=r("./src/crypt/decrypter.ts"),s=r("./src/demux/aacdemuxer.ts"),u=r("./src/demux/mp4demuxer.ts"),c=r("./src/demux/tsdemuxer.ts"),l=r("./src/demux/mp3demuxer.ts"),f=r("./src/remux/mp4-remuxer.ts"),h=r("./src/remux/passthrough-remuxer.ts"),d=r("./src/demux/chunk-cache.ts"),p=r("./src/utils/mp4-tools.ts"),v=r("./src/utils/logger.ts");try{n=self.performance.now.bind(self.performance)}catch(t){v.logger.debug("Unable to use Performance API on this environment"),n=self.Date.now}var g=[{demux:c.default,remux:f.default},{demux:u.default,remux:h.default},{demux:s.default,remux:f.default},{demux:l.default,remux:f.default}],m=1024;g.forEach((function(t){var e=t.demux;m=Math.max(m,e.minProbeByteLength)}));var y=function(){function t(t,e,r,n,i){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new d.default,this.observer=t,this.typeSupported=e,this.config=r,this.vendor=n,this.id=i}var e=t.prototype;return e.configure=function(t){this.transmuxConfig=t,this.decrypter&&this.decrypter.reset()},e.push=function(t,e,r,i){var o=this,a=r.transmuxing;a.executeStart=n();var s=new Uint8Array(t),u=this.cache,c=this.config,l=this.currentTransmuxState,f=this.transmuxConfig;i&&(this.currentTransmuxState=i);var h=function(t,e){var r=null;return t.byteLength>0&&null!=e&&null!=e.key&&null!==e.iv&&null!=e.method&&(r=e),r}(s,e);if(h&&"AES-128"===h.method){var d=this.getDecrypter();if(!c.enableSoftwareAES)return this.decryptionPromise=d.webCryptoDecrypt(s,h.key.buffer,h.iv.buffer).then((function(t){var e=o.push(t,null,r);return o.decryptionPromise=null,e})),this.decryptionPromise;var v=d.softwareDecrypt(s,h.key.buffer,h.iv.buffer);if(!v)return a.executeEnd=n(),b(r);s=new Uint8Array(v)}var g=i||l,m=g.contiguous,y=g.discontinuity,A=g.trackSwitch,E=g.accurateTimeOffset,w=g.timeOffset,k=f.audioCodec,T=f.videoCodec,C=f.defaultInitPts,x=f.duration,_=f.initSegmentData;if((y||A)&&this.resetInitSegment(_,k,T,x),y&&this.resetInitialTimestamp(C),m||this.resetContiguity(),this.needsProbing(s,y,A)){if(u.dataLength){var S=u.flush();s=Object(p.appendUint8Array)(S,s)}this.configureTransmuxer(s,f)}var R=this.transmux(s,h,w,E,r),L=this.currentTransmuxState;return L.contiguous=!0,L.discontinuity=!1,L.trackSwitch=!1,a.executeEnd=n(),R},e.flush=function(t){var e=this,r=t.transmuxing;r.executeStart=n();var a=this.decrypter,s=this.cache,u=this.currentTransmuxState,c=this.decryptionPromise;if(c)return c.then((function(){return e.flush(t)}));var l=[],f=u.timeOffset;if(a){var h=a.flush();h&&l.push(this.push(h,null,t))}var d=s.dataLength;s.reset();var p=this.demuxer,v=this.remuxer;if(!p||!v)return d>=m&&this.observer.emit(i.Events.ERROR,i.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),r.executeEnd=n(),[b(t)];var g=p.flush(f);return A(g)?g.then((function(r){return e.flushRemux(l,r,t),l})):(this.flushRemux(l,g,t),l)},e.flushRemux=function(t,e,r){var i=e.audioTrack,o=e.avcTrack,a=e.id3Track,s=e.textTrack,u=this.currentTransmuxState,c=u.accurateTimeOffset,l=u.timeOffset;v.logger.log("[transmuxer.ts]: Flushed fragment "+r.sn+(r.part>-1?" p: "+r.part:"")+" of level "+r.level);var f=this.remuxer.remux(i,o,a,s,l,c,!0,this.id);t.push({remuxResult:f,chunkMeta:r}),r.transmuxing.executeEnd=n()},e.resetInitialTimestamp=function(t){var e=this.demuxer,r=this.remuxer;e&&r&&(e.resetTimeStamp(t),r.resetTimeStamp(t))},e.resetContiguity=function(){var t=this.demuxer,e=this.remuxer;t&&e&&(t.resetContiguity(),e.resetNextTimestamp())},e.resetInitSegment=function(t,e,r,n){var i=this.demuxer,o=this.remuxer;i&&o&&(i.resetInitSegment(e,r,n),o.resetInitSegment(t,e,r))},e.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},e.transmux=function(t,e,r,n,i){return e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(t,e,r,n,i):this.transmuxUnencrypted(t,r,n,i)},e.transmuxUnencrypted=function(t,e,r,n){var i=this.demuxer.demux(t,e,!1,!this.config.progressive),o=i.audioTrack,a=i.avcTrack,s=i.id3Track,u=i.textTrack;return{remuxResult:this.remuxer.remux(o,a,s,u,e,r,!1,this.id),chunkMeta:n}},e.transmuxSampleAes=function(t,e,r,n,i){var o=this;return this.demuxer.demuxSampleAes(t,e,r).then((function(t){return{remuxResult:o.remuxer.remux(t.audioTrack,t.avcTrack,t.id3Track,t.textTrack,r,n,!1,o.id),chunkMeta:i}}))},e.configureTransmuxer=function(t,e){for(var r,n=this.config,i=this.observer,o=this.typeSupported,a=this.vendor,s=e.audioCodec,c=e.defaultInitPts,l=e.duration,f=e.initSegmentData,d=e.videoCodec,p=0,m=g.length;p<m;p++)if(g[p].demux.probe(t)){r=g[p];break}r||(v.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),r={demux:u.default,remux:h.default});var y=this.demuxer,b=this.remuxer,A=r.remux,E=r.demux;b&&b instanceof A||(this.remuxer=new A(i,n,o,a)),y&&y instanceof E||(this.demuxer=new E(i,n,o),this.probe=E.probe),this.resetInitSegment(f,s,d,l),this.resetInitialTimestamp(c)},e.needsProbing=function(t,e,r){return!this.demuxer||!this.remuxer||e||r},e.getDecrypter=function(){var t=this.decrypter;return t||(t=this.decrypter=new a.default(this.observer,this.config)),t},t}(),b=function(t){return{remuxResult:{},chunkMeta:t}};function A(t){return"then"in t&&t.then instanceof Function}var E=function(t,e,r,n,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=t,this.videoCodec=e,this.initSegmentData=r,this.duration=n,this.defaultInitPts=i},w=function(t,e,r,n,i){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=t,this.contiguous=e,this.accurateTimeOffset=r,this.trackSwitch=n,this.timeOffset=i}},"./src/demux/tsdemuxer.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"discardEPB",(function(){return A}));var n=r("./src/demux/adts.ts"),i=r("./src/demux/mpegaudio.ts"),o=r("./src/demux/exp-golomb.ts"),a=r("./src/demux/id3.ts"),s=r("./src/demux/sample-aes.ts"),u=r("./src/events.ts"),c=r("./src/utils/mp4-tools.ts"),l=r("./src/utils/logger.ts"),f=r("./src/errors.ts"),h={video:1,audio:2,id3:3,text:4},d=function(){function t(t,e,r){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=t,this.config=e,this.typeSupported=r}t.probe=function(e){var r=t.syncOffset(e);return!(r<0||(r&&l.logger.warn("MPEG2-TS detected but first sync word found @ offset "+r+", junk ahead ?"),0))},t.syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),r=0;r<e;){if(71===t[r]&&71===t[r+188]&&71===t[r+376])return r;r++}return-1},t.createTrack=function(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:h[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===t?e:void 0}};var e=t.prototype;return e.resetInitSegment=function(e,r,n){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=t.createTrack("video",n),this._audioTrack=t.createTrack("audio",n),this._id3Track=t.createTrack("id3",n),this._txtTrack=t.createTrack("text",n),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=e,this.videoCodec=r,this._duration=n},e.resetTimeStamp=function(){},e.resetContiguity=function(){var t=this._audioTrack,e=this._avcTrack,r=this._id3Track;t&&(t.pesData=null),e&&(e.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},e.demux=function(e,r,n,i){var o;void 0===n&&(n=!1),void 0===i&&(i=!1),n||(this.sampleAes=null);var a=this._avcTrack,s=this._audioTrack,h=this._id3Track,d=a.pid,p=a.pesData,y=s.pid,b=h.pid,A=s.pesData,E=h.pesData,w=!1,k=this.pmtParsed,T=this._pmtId,C=e.length;if(this.remainderData&&(C=(e=Object(c.appendUint8Array)(this.remainderData,e)).length,this.remainderData=null),C<188&&!i)return this.remainderData=e,{audioTrack:s,avcTrack:a,id3Track:h,textTrack:this._txtTrack};var x=Math.max(0,t.syncOffset(e));(C-=(C+x)%188)<e.byteLength&&!i&&(this.remainderData=new Uint8Array(e.buffer,C,e.buffer.byteLength-C));for(var _=x;_<C;_+=188)if(71===e[_]){var S=!!(64&e[_+1]),R=((31&e[_+1])<<8)+e[_+2],L=void 0;if((48&e[_+3])>>4>1){if((L=_+5+e[_+4])===_+188)continue}else L=_+4;switch(R){case d:S&&(p&&(o=m(p))&&this.parseAVCPES(o,!1),p={data:[],size:0}),p&&(p.data.push(e.subarray(L,_+188)),p.size+=_+188-L);break;case y:S&&(A&&(o=m(A))&&(s.isAAC?this.parseAACPES(o):this.parseMPEGPES(o)),A={data:[],size:0}),A&&(A.data.push(e.subarray(L,_+188)),A.size+=_+188-L);break;case b:S&&(E&&(o=m(E))&&this.parseID3PES(o),E={data:[],size:0}),E&&(E.data.push(e.subarray(L,_+188)),E.size+=_+188-L);break;case 0:S&&(L+=e[L]+1),T=this._pmtId=v(e,L);break;case T:S&&(L+=e[L]+1);var O=g(e,L,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,n);(d=O.avc)>0&&(a.pid=d),(y=O.audio)>0&&(s.pid=y,s.isAAC=O.isAAC),(b=O.id3)>0&&(h.pid=b),w&&!k&&(l.logger.log("reparse from beginning"),w=!1,_=x-188),k=this.pmtParsed=!0;break;case 17:case 8191:break;default:w=!0}}else this.observer.emit(u.Events.ERROR,u.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});a.pesData=p,s.pesData=A,h.pesData=E;var P={audioTrack:s,avcTrack:a,id3Track:h,textTrack:this._txtTrack};return i&&this.extractRemainingSamples(P),P},e.flush=function(){var t,e=this.remainderData;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t},e.extractRemainingSamples=function(t){var e,r=t.audioTrack,n=t.avcTrack,i=t.id3Track,o=n.pesData,a=r.pesData,s=i.pesData;o&&(e=m(o))?(this.parseAVCPES(e,!0),n.pesData=null):n.pesData=o,a&&(e=m(a))?(r.isAAC?this.parseAACPES(e):this.parseMPEGPES(e),r.pesData=null):(null!=a&&a.size&&l.logger.log("last AAC PES packet truncated,might overlap between fragments"),r.pesData=a),s&&(e=m(s))?(this.parseID3PES(e),i.pesData=null):i.pesData=s},e.demuxSampleAes=function(t,e,r){var n=this.demux(t,r,!0,!this.config.progressive),i=this.sampleAes=new s.default(this.observer,this.config,e);return this.decrypt(n,i)},e.decrypt=function(t,e){return new Promise((function(r){var n=t.audioTrack,i=t.avcTrack;n.samples&&n.isAAC?e.decryptAacSamples(n.samples,0,(function(){i.samples?e.decryptAvcSamples(i.samples,0,0,(function(){r(t)})):r(t)})):i.samples&&e.decryptAvcSamples(i.samples,0,0,(function(){r(t)}))}))},e.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},e.parseAVCPES=function(t,e){var r,n=this,i=this._avcTrack,s=this.parseAVCNALu(t.data),u=this.avcSample,c=!1;t.data=null,u&&s.length&&!i.audFound&&(y(u,i),u=this.avcSample=p(!1,t.pts,t.dts,"")),s.forEach((function(e){switch(e.type){case 1:r=!0,u||(u=n.avcSample=p(!0,t.pts,t.dts,"")),u.frame=!0;var s=e.data;if(c&&s.length>4){var l=new o.default(s).readSliceType();2!==l&&4!==l&&7!==l&&9!==l||(u.key=!0)}break;case 5:r=!0,u||(u=n.avcSample=p(!0,t.pts,t.dts,"")),u.key=!0,u.frame=!0;break;case 6:r=!0;var f=new o.default(A(e.data));f.readUByte();for(var h=0,d=0,v=!1,g=0;!v&&f.bytesAvailable>1;){h=0;do{h+=g=f.readUByte()}while(255===g);d=0;do{d+=g=f.readUByte()}while(255===g);if(4===h&&0!==f.bytesAvailable){if(v=!0,181===f.readUByte()&&49===f.readUShort()&&1195456820===f.readUInt()&&3===f.readUByte()){for(var m=f.readUByte(),E=31&m,w=[m,f.readUByte()],k=0;k<E;k++)w.push(f.readUByte()),w.push(f.readUByte()),w.push(f.readUByte());b(n._txtTrack.samples,{type:3,pts:t.pts,bytes:w})}}else if(5===h&&0!==f.bytesAvailable){if(v=!0,d>16){for(var T=[],C=0;C<16;C++)T.push(f.readUByte().toString(16)),3!==C&&5!==C&&7!==C&&9!==C||T.push("-");for(var x=d-16,_=new Uint8Array(x),S=0;S<x;S++)_[S]=f.readUByte();b(n._txtTrack.samples,{pts:t.pts,payloadType:h,uuid:T.join(""),userData:Object(a.utf8ArrayToStr)(_),userDataBytes:_})}}else if(d<f.bytesAvailable)for(var R=0;R<d;R++)f.readUByte()}break;case 7:if(r=!0,c=!0,!i.sps){var L=new o.default(e.data).readSPS();i.width=L.width,i.height=L.height,i.pixelRatio=L.pixelRatio,i.sps=[e.data],i.duration=n._duration;for(var O=e.data.subarray(1,4),P="avc1.",D=0;D<3;D++){var I=O[D].toString(16);I.length<2&&(I="0"+I),P+=I}i.codec=P}break;case 8:r=!0,i.pps||(i.pps=[e.data]);break;case 9:r=!1,i.audFound=!0,u&&y(u,i),u=n.avcSample=p(!1,t.pts,t.dts,"");break;case 12:r=!1;break;default:r=!1,u&&(u.debug+="unknown NAL "+e.type+" ")}u&&r&&u.units.push(e)})),e&&u&&(y(u,i),this.avcSample=null)},e.getLastNalUnit=function(){var t,e,r=this.avcSample;if(!r||0===r.units.length){var n=this._avcTrack.samples;r=n[n.length-1]}if(null!==(t=r)&&void 0!==t&&t.units){var i=r.units;e=i[i.length-1]}return e},e.parseAVCNALu=function(t){var e,r,n=t.byteLength,i=this._avcTrack,o=i.naluState||0,a=o,s=[],u=0,c=-1,l=0;for(-1===o&&(c=0,l=31&t[0],o=0,u=1);u<n;)if(e=t[u++],o)if(1!==o)if(e)if(1===e){if(c>=0){var f={data:t.subarray(c,u-o-1),type:l};s.push(f)}else{var h=this.getLastNalUnit();if(h&&(a&&u<=4-a&&h.state&&(h.data=h.data.subarray(0,h.data.byteLength-a)),(r=u-o-1)>0)){var d=new Uint8Array(h.data.byteLength+r);d.set(h.data,0),d.set(t.subarray(0,r),h.data.byteLength),h.data=d}}u<n?(c=u,l=31&t[u],o=0):o=-1}else o=0;else o=3;else o=e?0:2;else o=e?0:1;if(c>=0&&o>=0){var p={data:t.subarray(c,n),type:l,state:o};s.push(p)}if(0===s.length){var v=this.getLastNalUnit();if(v){var g=new Uint8Array(v.data.byteLength+t.byteLength);g.set(v.data,0),g.set(t,v.data.byteLength),v.data=g}}return i.naluState=o,s},e.parseAACPES=function(t){var e,r,i,o,a=this._audioTrack,s=this.aacLastPTS,c=this.aacOverFlow,h=t.data;if(c){var d=new Uint8Array(c.byteLength+h.byteLength);d.set(c,0),d.set(h,c.byteLength),h=d}for(e=0,r=h.length;e<r-1&&!n.isHeader(h,e);e++);if(!e||(e<r-1?(i="AAC PES did not start with ADTS header,offset:"+e,o=!1):(i="no ADTS header found in AAC PES",o=!0),l.logger.warn("parsing error:"+i),this.observer.emit(u.Events.ERROR,u.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:o,reason:i}),!o)){n.initTrackConfig(a,this.observer,h,e,this.audioCodec);var p,v=0,g=n.getFrameDuration(a.samplerate);if(void 0!==t.pts)p=t.pts;else{if(null===s)return void l.logger.warn("[tsdemuxer]: AAC PES unknown PTS");p=s}if(c&&null!==s){var m=s+g;Math.abs(m-p)>1&&(l.logger.log("[tsdemuxer]: AAC: align PTS for overlapping frames by "+Math.round((m-p)/90)),p=m)}for(var y=null;e<r;){if(n.isHeader(h,e)){if(e+5<r){var b=n.appendFrame(a,h,e,p,v);if(b){e+=b.length,y=b.sample.pts,v++;continue}}break}e++}this.aacOverFlow=e<r?h.subarray(e,r):null,this.aacLastPTS=y}},e.parseMPEGPES=function(t){var e=t.data,r=e.length,n=0,o=0,a=t.pts;if(void 0!==a)for(;o<r;)if(i.isHeader(e,o)){var s=i.appendFrame(this._audioTrack,e,o,a,n);if(!s)break;o+=s.length,n++}else o++;else l.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")},e.parseID3PES=function(t){void 0!==t.pts?this._id3Track.samples.push(t):l.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")},t}();function p(t,e,r,n){return{key:t,frame:!1,pts:e,dts:r,units:[],debug:n,length:0}}function v(t,e){return(31&t[e+10])<<8|t[e+11]}function g(t,e,r,n){var i={audio:-1,avc:-1,id3:-1,isAAC:!0},o=e+3+((15&t[e+1])<<8|t[e+2])-4;for(e+=12+((15&t[e+10])<<8|t[e+11]);e<o;){var a=(31&t[e+1])<<8|t[e+2];switch(t[e]){case 207:if(!n){l.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===i.audio&&(i.audio=a);break;case 21:-1===i.id3&&(i.id3=a);break;case 219:if(!n){l.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===i.avc&&(i.avc=a);break;case 3:case 4:r?-1===i.audio&&(i.audio=a,i.isAAC=!1):l.logger.log("MPEG audio found, not supported in this browser");break;case 36:l.logger.warn("Unsupported HEVC stream type found")}e+=5+((15&t[e+3])<<8|t[e+4])}return i}function m(t){var e,r,n,i,o,a=0,s=t.data;if(!t||0===t.size)return null;for(;s[0].length<19&&s.length>1;){var u=new Uint8Array(s[0].length+s[1].length);u.set(s[0]),u.set(s[1],s[0].length),s[0]=u,s.splice(1,1)}if(1===((e=s[0])[0]<<16)+(e[1]<<8)+e[2]){if((r=(e[4]<<8)+e[5])&&r>t.size-6)return null;var c=e[7];192&c&&(i=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&c?i-(o=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(l.logger.warn(Math.round((i-o)/9e4)+"s delta between PTS and DTS, align them"),i=o):o=i);var f=(n=e[8])+9;if(t.size<=f)return null;t.size-=f;for(var h=new Uint8Array(t.size),d=0,p=s.length;d<p;d++){var v=(e=s[d]).byteLength;if(f){if(f>v){f-=v;continue}e=e.subarray(f),v-=f,f=0}h.set(e,a),a+=v}return r&&(r-=n+3),{data:h,pts:i,dts:o,len:r}}return null}function y(t,e){if(t.units.length&&t.frame){if(void 0===t.pts){var r=e.samples,n=r.length;if(!n)return void e.dropped++;var i=r[n-1];t.pts=i.pts,t.dts=i.dts}e.samples.push(t)}t.debug.length&&l.logger.log(t.pts+"/"+t.dts+":"+t.debug)}function b(t,e){var r=t.length;if(r>0){if(e.pts>=t[r-1].pts)t.push(e);else for(var n=r-1;n>=0;n--)if(e.pts<t[n].pts){t.splice(n,0,e);break}}else t.push(e)}function A(t){for(var e=t.byteLength,r=[],n=1;n<e-2;)0===t[n]&&0===t[n+1]&&3===t[n+2]?(r.push(n+2),n+=2):n++;if(0===r.length)return t;var i=e-r.length,o=new Uint8Array(i),a=0;for(n=0;n<i;a++,n++)a===r[0]&&(a++,r.shift()),o[n]=t[a];return o}d.minProbeByteLength=188,e.default=d},"./src/errors.ts":function(t,e,r){"use strict";var n,i;r.r(e),r.d(e,"ErrorTypes",(function(){return n})),r.d(e,"ErrorDetails",(function(){return i})),function(t){t.NETWORK_ERROR="networkError",t.MEDIA_ERROR="mediaError",t.KEY_SYSTEM_ERROR="keySystemError",t.MUX_ERROR="muxError",t.OTHER_ERROR="otherError"}(n||(n={})),function(t){t.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",t.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",t.KEY_SYSTEM_NO_SESSION="keySystemNoSession",t.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",t.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",t.MANIFEST_LOAD_ERROR="manifestLoadError",t.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",t.MANIFEST_PARSING_ERROR="manifestParsingError",t.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",t.LEVEL_EMPTY_ERROR="levelEmptyError",t.LEVEL_LOAD_ERROR="levelLoadError",t.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",t.LEVEL_SWITCH_ERROR="levelSwitchError",t.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",t.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",t.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",t.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",t.FRAG_LOAD_ERROR="fragLoadError",t.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",t.FRAG_DECRYPT_ERROR="fragDecryptError",t.FRAG_PARSING_ERROR="fragParsingError",t.REMUX_ALLOC_ERROR="remuxAllocError",t.KEY_LOAD_ERROR="keyLoadError",t.KEY_LOAD_TIMEOUT="keyLoadTimeOut",t.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",t.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",t.BUFFER_APPEND_ERROR="bufferAppendError",t.BUFFER_APPENDING_ERROR="bufferAppendingError",t.BUFFER_STALLED_ERROR="bufferStalledError",t.BUFFER_FULL_ERROR="bufferFullError",t.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",t.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",t.INTERNAL_EXCEPTION="internalException",t.INTERNAL_ABORTED="aborted",t.UNKNOWN="unknown"}(i||(i={}))},"./src/events.ts":function(t,e,r){"use strict";var n;r.r(e),r.d(e,"Events",(function(){return n})),function(t){t.MEDIA_ATTACHING="hlsMediaAttaching",t.MEDIA_ATTACHED="hlsMediaAttached",t.MEDIA_DETACHING="hlsMediaDetaching",t.MEDIA_DETACHED="hlsMediaDetached",t.BUFFER_RESET="hlsBufferReset",t.BUFFER_CODECS="hlsBufferCodecs",t.BUFFER_CREATED="hlsBufferCreated",t.BUFFER_APPENDING="hlsBufferAppending",t.BUFFER_APPENDED="hlsBufferAppended",t.BUFFER_EOS="hlsBufferEos",t.BUFFER_FLUSHING="hlsBufferFlushing",t.BUFFER_FLUSHED="hlsBufferFlushed",t.MANIFEST_LOADING="hlsManifestLoading",t.MANIFEST_LOADED="hlsManifestLoaded",t.MANIFEST_PARSED="hlsManifestParsed",t.LEVEL_SWITCHING="hlsLevelSwitching",t.LEVEL_SWITCHED="hlsLevelSwitched",t.LEVEL_LOADING="hlsLevelLoading",t.LEVEL_LOADED="hlsLevelLoaded",t.LEVEL_UPDATED="hlsLevelUpdated",t.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",t.LEVELS_UPDATED="hlsLevelsUpdated",t.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",t.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",t.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",t.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",t.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",t.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",t.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",t.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",t.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",t.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",t.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",t.CUES_PARSED="hlsCuesParsed",t.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",t.INIT_PTS_FOUND="hlsInitPtsFound",t.FRAG_LOADING="hlsFragLoading",t.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",t.FRAG_LOADED="hlsFragLoaded",t.FRAG_DECRYPTED="hlsFragDecrypted",t.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",t.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",t.FRAG_PARSING_METADATA="hlsFragParsingMetadata",t.FRAG_PARSED="hlsFragParsed",t.FRAG_BUFFERED="hlsFragBuffered",t.FRAG_CHANGED="hlsFragChanged",t.FPS_DROP="hlsFpsDrop",t.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",t.ERROR="hlsError",t.DESTROYING="hlsDestroying",t.KEY_LOADING="hlsKeyLoading",t.KEY_LOADED="hlsKeyLoaded",t.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",t.BACK_BUFFER_REACHED="hlsBackBufferReached"}(n||(n={}))},"./src/hls.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return y}));var n=r("./node_modules/url-toolkit/src/url-toolkit.js"),i=r("./src/loader/playlist-loader.ts"),o=r("./src/loader/key-loader.ts"),a=r("./src/controller/id3-track-controller.ts"),s=r("./src/controller/latency-controller.ts"),u=r("./src/controller/level-controller.ts"),c=r("./src/controller/fragment-tracker.ts"),l=r("./src/controller/stream-controller.ts"),f=r("./src/is-supported.ts"),h=r("./src/utils/logger.ts"),d=r("./src/config.ts"),p=r("./node_modules/eventemitter3/index.js"),v=r("./src/events.ts"),g=r("./src/errors.ts");function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var y=function(){function t(e){void 0===e&&(e={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new p.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this._media=null,this.url=null;var r=this.config=Object(d.mergeConfig)(t.DefaultConfig,e);this.userConfig=e,Object(h.enableLogs)(r.debug),this._autoLevelCapping=-1,r.progressive&&Object(d.enableStreamingMode)(r);var n=r.abrController,f=r.bufferController,v=r.capLevelController,g=r.fpsController,m=this.abrController=new n(this),y=this.bufferController=new f(this),b=this.capLevelController=new v(this),A=new g(this),E=new i.default(this),w=new o.default(this),k=new a.default(this),T=this.levelController=new u.default(this),C=new c.FragmentTracker(this),x=this.streamController=new l.default(this,C);b.setStreamController(x),A.setStreamController(x);var _=[T,x];this.networkControllers=_;var S=[E,w,m,y,b,A,k,C];this.audioTrackController=this.createController(r.audioTrackController,null,_),this.createController(r.audioStreamController,C,_),this.subtitleTrackController=this.createController(r.subtitleTrackController,null,_),this.createController(r.subtitleStreamController,C,_),this.createController(r.timelineController,null,S),this.emeController=this.createController(r.emeController,null,S),this.latencyController=this.createController(s.default,null,S),this.coreComponents=S}t.isSupported=function(){return Object(f.isSupported)()};var e,r,y,b=t.prototype;return b.createController=function(t,e,r){if(t){var n=e?new t(this,e):new t(this);return r&&r.push(n),n}return null},b.on=function(t,e,r){void 0===r&&(r=this),this._emitter.on(t,e,r)},b.once=function(t,e,r){void 0===r&&(r=this),this._emitter.once(t,e,r)},b.removeAllListeners=function(t){this._emitter.removeAllListeners(t)},b.off=function(t,e,r,n){void 0===r&&(r=this),this._emitter.off(t,e,r,n)},b.listeners=function(t){return this._emitter.listeners(t)},b.emit=function(t,e,r){return this._emitter.emit(t,e,r)},b.trigger=function(t,e){if(this.config.debug)return this.emit(t,t,e);try{return this.emit(t,t,e)}catch(e){h.logger.error("An internal error happened while handling event "+t+'. Error message: "'+e.message+'". Here is a stacktrace:',e),this.trigger(v.Events.ERROR,{type:g.ErrorTypes.OTHER_ERROR,details:g.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:t,error:e})}return!1},b.listenerCount=function(t){return this._emitter.listenerCount(t)},b.destroy=function(){h.logger.log("destroy"),this.trigger(v.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(t){return t.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(t){return t.destroy()})),this.coreComponents.length=0},b.attachMedia=function(t){h.logger.log("attachMedia"),this._media=t,this.trigger(v.Events.MEDIA_ATTACHING,{media:t})},b.detachMedia=function(){h.logger.log("detachMedia"),this.trigger(v.Events.MEDIA_DETACHING,void 0),this._media=null},b.loadSource=function(t){this.stopLoad();var e=this.media,r=this.url,i=this.url=n.buildAbsoluteURL(self.location.href,t,{alwaysNormalize:!0});h.logger.log("loadSource:"+i),e&&r&&r!==i&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(e)),this.trigger(v.Events.MANIFEST_LOADING,{url:t})},b.startLoad=function(t){void 0===t&&(t=-1),h.logger.log("startLoad("+t+")"),this.networkControllers.forEach((function(e){e.startLoad(t)}))},b.stopLoad=function(){h.logger.log("stopLoad"),this.networkControllers.forEach((function(t){t.stopLoad()}))},b.swapAudioCodec=function(){h.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},b.recoverMediaError=function(){h.logger.log("recoverMediaError");var t=this._media;this.detachMedia(),t&&this.attachMedia(t)},b.removeLevel=function(t,e){void 0===e&&(e=0),this.levelController.removeLevel(t,e)},e=t,y=[{key:"version",get:function(){return"1.0.4"}},{key:"Events",get:function(){return v.Events}},{key:"ErrorTypes",get:function(){return g.ErrorTypes}},{key:"ErrorDetails",get:function(){return g.ErrorDetails}},{key:"DefaultConfig",get:function(){return t.defaultConfig?t.defaultConfig:d.hlsDefaultConfig},set:function(e){t.defaultConfig=e}}],(r=[{key:"levels",get:function(){return this.levelController.levels||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){h.logger.log("set currentLevel:"+t),this.loadLevel=t,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){h.logger.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){h.logger.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){h.logger.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){h.logger.log("set startLevel:"+t),-1!==t&&(t=Math.max(t,this.minAutoLevel)),this.levelController.startLevel=t}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(t){var e=!!t;e!==this.config.capLevelToPlayerSize&&(e?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=e)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){this._autoLevelCapping!==t&&(h.logger.log("set autoLevelCapping:"+t),this._autoLevelCapping=t)}},{key:"bandwidthEstimate",get:function(){var t=this.abrController.bwEstimator;return t?t.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var t=this.levels,e=this.config.minAutoBitrate;if(!t)return 0;for(var r=t.length,n=0;n<r;n++)if(t[n].maxBitrate>e)return n;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(t){this.config.lowLatencyMode=t}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}])&&m(e.prototype,r),y&&m(e,y),t}();y.defaultConfig=void 0},"./src/is-supported.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"isSupported",(function(){return o})),r.d(e,"changeTypeSupported",(function(){return a}));var n=r("./src/utils/mediasource-helper.ts");function i(){return self.SourceBuffer||self.WebKitSourceBuffer}function o(){var t=Object(n.getMediaSource)();if(!t)return!1;var e=i(),r=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),o=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!r&&!!o}function a(){var t,e=i();return"function"==typeof(null==e||null===(t=e.prototype)||void 0===t?void 0:t.changeType)}},"./src/loader/fragment-loader.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return f})),r.d(e,"LoadError",(function(){return d}));var n=r("./src/polyfills/number.ts"),i=r("./src/errors.ts");function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return a(t,arguments,c(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,t)},o(t)}function a(t,e,r){return a=s()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&u(i,r.prototype),i},a.apply(null,arguments)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function u(t,e){return u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},u(t,e)}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}var l=Math.pow(2,17),f=function(){function t(t){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=t}var e=t.prototype;return e.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},e.abort=function(){this.loader&&this.loader.abort()},e.load=function(t,e){var r=this,n=t.url;if(!n)return Promise.reject(new d({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(n?"part list":"url")));this.abort();var o=this.config,a=o.fLoader,s=o.loader;return new Promise((function(n,u){r.loader&&r.loader.destroy();var c=r.loader=t.loader=a?new a(o):new s(o),f=h(t),p={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:l};t.stats=c.stats,c.load(f,p,{onSuccess:function(e,i,o,a){r.resetLoader(t,c),n({frag:t,part:null,payload:e.data,networkDetails:a})},onError:function(e,n,o){r.resetLoader(t,c),u(new d({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:e,networkDetails:o}))},onAbort:function(e,n,o){r.resetLoader(t,c),u(new d({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:o}))},onTimeout:function(e,n,o){r.resetLoader(t,c),u(new d({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:o}))},onProgress:function(r,n,i,o){e&&e({frag:t,part:null,payload:i,networkDetails:o})}})}))},e.loadPart=function(t,e,r){var n=this;this.abort();var o=this.config,a=o.fLoader,s=o.loader;return new Promise((function(u,c){n.loader&&n.loader.destroy();var f=n.loader=t.loader=a?new a(o):new s(o),p=h(t,e),v={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:l};e.stats=f.stats,f.load(p,v,{onSuccess:function(i,o,a,s){n.resetLoader(t,f),n.updateStatsFromPart(t,e);var c={frag:t,part:e,payload:i.data,networkDetails:s};r(c),u(c)},onError:function(r,o,a){n.resetLoader(t,f),c(new d({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:e,response:r,networkDetails:a}))},onAbort:function(r,o,a){t.stats.aborted=e.stats.aborted,n.resetLoader(t,f),c(new d({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:e,networkDetails:a}))},onTimeout:function(r,o,a){n.resetLoader(t,f),c(new d({type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:e,networkDetails:a}))}})}))},e.updateStatsFromPart=function(t,e){var r=t.stats,n=e.stats,i=n.total;if(r.loaded+=n.loaded,i){var o=Math.round(t.duration/e.duration),a=Math.min(Math.round(r.loaded/i),o),s=(o-a)*Math.round(r.loaded/a);r.total=r.loaded+s}else r.total=Math.max(r.loaded,r.total);var u=r.loading,c=n.loading;u.start?u.first+=c.first-c.start:(u.start=c.start,u.first=c.first),u.end=c.end},e.resetLoader=function(t,e){t.loader=null,this.loader===e&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),e.destroy()},t}();function h(t,e){void 0===e&&(e=null);var r=e||t,i={frag:t,part:e,responseType:"arraybuffer",url:r.url,rangeStart:0,rangeEnd:0},o=r.byteRangeStartOffset,a=r.byteRangeEndOffset;return Object(n.isFiniteNumber)(o)&&Object(n.isFiniteNumber)(a)&&(i.rangeStart=o,i.rangeEnd=a),i}var d=function(t){var e,r;function n(e){for(var r,n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return(r=t.call.apply(t,[this].concat(i))||this).data=void 0,r.data=e,r}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,u(e,r),n}(o(Error))},"./src/loader/fragment.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"ElementaryStreamTypes",(function(){return n})),r.d(e,"BaseSegment",(function(){return d})),r.d(e,"Fragment",(function(){return p})),r.d(e,"Part",(function(){return v}));var n,i=r("./src/polyfills/number.ts"),o=r("./node_modules/url-toolkit/src/url-toolkit.js"),a=r("./src/utils/logger.ts"),s=r("./src/loader/level-key.ts"),u=r("./src/loader/load-stats.ts");function c(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,l(t,e)}function l(t,e){return l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},l(t,e)}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),t}!function(t){t.AUDIO="audio",t.VIDEO="video",t.AUDIOVIDEO="audiovideo"}(n||(n={}));var d=function(){function t(t){var e;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((e={})[n.AUDIO]=null,e[n.VIDEO]=null,e[n.AUDIOVIDEO]=null,e),this.baseurl=t}return t.prototype.setByteRange=function(t,e){var r=t.split("@",2),n=[];1===r.length?n[0]=e?e.byteRangeEndOffset:0:n[0]=parseInt(r[1]),n[1]=parseInt(r[0])+n[0],this._byteRange=n},h(t,[{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:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(o.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(t){this._url=t}}]),t}(),p=function(t){function e(e,r){var n;return(n=t.call(this,r)||this)._decryptdata=null,n.rawProgramDateTime=null,n.programDateTime=null,n.tagList=[],n.duration=0,n.sn=0,n.levelkey=void 0,n.type=void 0,n.loader=null,n.level=-1,n.cc=0,n.startPTS=void 0,n.endPTS=void 0,n.appendedPTS=void 0,n.startDTS=void 0,n.endDTS=void 0,n.start=0,n.deltaPTS=void 0,n.maxStartPTS=void 0,n.minEndPTS=void 0,n.stats=new u.LoadStats,n.urlId=0,n.data=void 0,n.bitrateTest=!1,n.title=null,n.initSegment=null,n.type=e,n}c(e,t);var r=e.prototype;return r.createInitializationVector=function(t){for(var e=new Uint8Array(16),r=12;r<16;r++)e[r]=t>>8*(15-r)&255;return e},r.setDecryptDataFromLevelKey=function(t,e){var r=t;return"AES-128"===(null==t?void 0:t.method)&&t.uri&&!t.iv&&((r=s.LevelKey.fromURI(t.uri)).method=t.method,r.iv=this.createInitializationVector(e),r.keyFormat="identity"),r},r.setElementaryStreamInfo=function(t,e,r,n,i,o){void 0===o&&(o=!1);var a=this.elementaryStreams,s=a[t];s?(s.startPTS=Math.min(s.startPTS,e),s.endPTS=Math.max(s.endPTS,r),s.startDTS=Math.min(s.startDTS,n),s.endDTS=Math.max(s.endDTS,i)):a[t]={startPTS:e,endPTS:r,startDTS:n,endDTS:i,partial:o}},r.clearElementaryStreamInfo=function(){var t=this.elementaryStreams;t[n.AUDIO]=null,t[n.VIDEO]=null,t[n.AUDIOVIDEO]=null},h(e,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&a.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(i.isFiniteNumber)(this.programDateTime))return null;var t=Object(i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){var t;return!(null===(t=this.decryptdata)||void 0===t||!t.keyFormat||!this.decryptdata.uri)}}]),e}(d),v=function(t){function e(e,r,n,i,o){var a;(a=t.call(this,n)||this).fragOffset=0,a.duration=0,a.gap=!1,a.independent=!1,a.relurl=void 0,a.fragment=void 0,a.index=void 0,a.stats=new u.LoadStats,a.duration=e.decimalFloatingPoint("DURATION"),a.gap=e.bool("GAP"),a.independent=e.bool("INDEPENDENT"),a.relurl=e.enumeratedString("URI"),a.fragment=r,a.index=i;var s=e.enumeratedString("BYTERANGE");return s&&a.setByteRange(s,o),o&&(a.fragOffset=o.fragOffset+o.duration),a}return c(e,t),h(e,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var t=this.elementaryStreams;return!!(t.audio||t.video||t.audiovideo)}}]),e}(d)},"./src/loader/key-loader.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return a}));var n=r("./src/events.ts"),i=r("./src/errors.ts"),o=r("./src/utils/logger.ts"),a=function(){function t(t){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=t,this._registerListeners()}var e=t.prototype;return e._registerListeners=function(){this.hls.on(n.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(n.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){for(var t in this._unregisterListeners(),this.loaders){var e=this.loaders[t];e&&e.destroy()}this.loaders={}},e.onKeyLoading=function(t,e){var r=e.frag,i=r.type,a=this.loaders[i];if(r.decryptdata){var s=r.decryptdata.uri;if(s!==this.decrypturl||null===this.decryptkey){var u=this.hls.config;if(a&&(o.logger.warn("abort previous key loader for type:"+i),a.abort()),!s)return void o.logger.warn("key uri is falsy");var c=u.loader,l=r.loader=this.loaders[i]=new c(u);this.decrypturl=s,this.decryptkey=null;var f={url:s,frag:r,responseType:"arraybuffer"},h={timeout:u.fragLoadingTimeOut,maxRetry:0,retryDelay:u.fragLoadingRetryDelay,maxRetryDelay:u.fragLoadingMaxRetryTimeout,highWaterMark:0},d={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(f,h,d)}else this.decryptkey&&(r.decryptdata.key=this.decryptkey,this.hls.trigger(n.Events.KEY_LOADED,{frag:r}))}else o.logger.warn("Missing decryption data on fragment in onKeyLoading")},e.loadsuccess=function(t,e,r){var i=r.frag;i.decryptdata?(this.decryptkey=i.decryptdata.key=new Uint8Array(t.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(n.Events.KEY_LOADED,{frag:i})):o.logger.error("after key load, decryptdata unset")},e.loaderror=function(t,e){var r=e.frag,o=r.loader;o&&o.abort(),delete this.loaders[r.type],this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:r,response:t})},e.loadtimeout=function(t,e){var r=e.frag,o=r.loader;o&&o.abort(),delete this.loaders[r.type],this.hls.trigger(n.Events.ERROR,{type:i.ErrorTypes.NETWORK_ERROR,details:i.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:r})},t}()},"./src/loader/level-details.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"LevelDetails",(function(){return i}));var n=r("./src/polyfills/number.ts");var i=function(){function t(t){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=t}var e;return t.prototype.reloaded=function(t){if(!t)return this.advanced=!0,void(this.updated=!0);var e=this.lastPartSn-t.lastPartSn,r=this.lastPartIndex-t.lastPartIndex;this.updated=this.endSN!==t.endSN||!!r||!!e,this.advanced=this.endSN>t.endSN||e>0||0===e&&r>0,this.updated||this.advanced?this.misses=Math.floor(.6*t.misses):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay},(e=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&Object(n.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var t=this.driftEndTime-this.driftStartTime;return t>0?1e3*(this.driftEnd-this.driftStart)/t:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var t;return null!==(t=this.fragments)&&void 0!==t&&t.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var t;return null!==(t=this.partList)&&void 0!==t&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}()},"./src/loader/level-key.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"LevelKey",(function(){return i}));var n=r("./node_modules/url-toolkit/src/url-toolkit.js");var i=function(){function t(t,e){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,this._uri=e?Object(n.buildAbsoluteURL)(t,e,{alwaysNormalize:!0}):t}var e;return t.fromURL=function(e,r){return new t(e,r)},t.fromURI=function(e){return new t(e)},(e=[{key:"uri",get:function(){return this._uri}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}()},"./src/loader/load-stats.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"LoadStats",(function(){return n}));var n=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return g}));var n=r("./src/polyfills/number.ts"),i=r("./node_modules/url-toolkit/src/url-toolkit.js"),o=r("./src/loader/fragment.ts"),a=r("./src/loader/level-details.ts"),s=r("./src/loader/level-key.ts"),u=r("./src/utils/attr-list.ts"),c=r("./src/utils/logger.ts"),l=r("./src/utils/codecs.ts"),f=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,h=/#EXT-X-MEDIA:(.*)/g,d=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),p=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),v=/\.(mp4|m4s|m4v|m4a)$/i,g=function(){function t(){}return t.findGroup=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(n.id===e)return n}},t.convertAVC1ToAVCOTI=function(t){var e=t.split(".");if(e.length>2){var r=e.shift()+".";return(r+=parseInt(e.shift()).toString(16))+("000"+parseInt(e.shift()).toString(16)).substr(-4)}return t},t.resolve=function(t,e){return i.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,r){var n,i=[],o={},a=!1;for(f.lastIndex=0;null!=(n=f.exec(e));)if(n[1]){var s=new u.AttrList(n[1]),c={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:t.resolve(n[2],r)},l=s.decimalResolution("RESOLUTION");l&&(c.width=l.width,c.height=l.height),m((s.CODECS||"").split(/[ ,]+/).filter((function(t){return t})),c),c.videoCodec&&-1!==c.videoCodec.indexOf("avc1")&&(c.videoCodec=t.convertAVC1ToAVCOTI(c.videoCodec)),i.push(c)}else if(n[3]){var h=new u.AttrList(n[3]);h["DATA-ID"]&&(a=!0,o[h["DATA-ID"]]=h)}return{levels:i,sessionData:a?o:null}},t.parseMasterPlaylistMedia=function(e,r,n,i){var o;void 0===i&&(i=[]);var a=[],s=0;for(h.lastIndex=0;null!==(o=h.exec(e));){var c=new u.AttrList(o[1]);if(c.TYPE===n){var l={attrs:c,bitrate:0,id:s++,groupId:c["GROUP-ID"],instreamId:c["INSTREAM-ID"],name:c.NAME||c.LANGUAGE||"",type:n,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:c.LANGUAGE,url:c.URI?t.resolve(c.URI,r):""};if(i.length){var f=t.findGroup(i,l.groupId)||i[0];y(l,f,"audioCodec"),y(l,f,"textCodec")}a.push(l)}}return a},t.parseLevelPlaylist=function(t,e,r,l,f){var h,g,m,y=new a.LevelDetails(e),A=y.fragments,E=null,w=0,k=0,T=0,C=0,x=null,_=new o.Fragment(l,e),S=-1,R=!1;for(d.lastIndex=0,y.m3u8=t;null!==(h=d.exec(t));){R&&(R=!1,(_=new o.Fragment(l,e)).start=T,_.sn=w,_.cc=C,_.level=r,E&&(_.initSegment=E,_.rawProgramDateTime=E.rawProgramDateTime));var L=h[1];if(L){_.duration=parseFloat(L);var O=(" "+h[2]).slice(1);_.title=O||null,_.tagList.push(O?["INF",L,O]:["INF",L])}else if(h[3])Object(n.isFiniteNumber)(_.duration)&&(_.start=T,m&&(_.levelkey=m),_.sn=w,_.level=r,_.cc=C,_.urlId=f,A.push(_),_.relurl=(" "+h[3]).slice(1),b(_,x),x=_,T+=_.duration,w++,k=0,R=!0);else if(h[4]){var P=(" "+h[4]).slice(1);x?_.setByteRange(P,x):_.setByteRange(P)}else if(h[5])_.rawProgramDateTime=(" "+h[5]).slice(1),_.tagList.push(["PROGRAM-DATE-TIME",_.rawProgramDateTime]),-1===S&&(S=A.length);else{if(!(h=h[0].match(p))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(g=1;g<h.length&&void 0===h[g];g++);var D=(" "+h[g]).slice(1),I=(" "+h[g+1]).slice(1),B=h[g+2]?(" "+h[g+2]).slice(1):"";switch(D){case"PLAYLIST-TYPE":y.type=I.toUpperCase();break;case"MEDIA-SEQUENCE":w=y.startSN=parseInt(I);break;case"SKIP":var M=new u.AttrList(I),F=M.decimalInteger("SKIPPED-SEGMENTS");if(Object(n.isFiniteNumber)(F)){y.skippedSegments=F;for(var N=F;N--;)A.unshift(null);w+=F}var j=M.enumeratedString("RECENTLY-REMOVED-DATERANGES");j&&(y.recentlyRemovedDateranges=j.split("\t"));break;case"TARGETDURATION":y.targetduration=parseFloat(I);break;case"VERSION":y.version=parseInt(I);break;case"EXTM3U":break;case"ENDLIST":y.live=!1;break;case"#":(I||B)&&_.tagList.push(B?[I,B]:[I]);break;case"DIS":C++;case"GAP":_.tagList.push([D]);break;case"BITRATE":_.tagList.push([D,I]);break;case"DISCONTINUITY-SEQ":C=parseInt(I);break;case"KEY":var U,G=new u.AttrList(I),K=G.enumeratedString("METHOD"),H=G.URI,V=G.hexadecimalInteger("IV"),Z=G.enumeratedString("KEYFORMATVERSIONS"),W=G.enumeratedString("KEYID"),Y=null!=(U=G.enumeratedString("KEYFORMAT"))?U:"identity";if(["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"].indexOf(Y)>-1){c.logger.warn("Keyformat "+Y+" is not supported from the manifest");continue}if("identity"!==Y)continue;K&&(m=s.LevelKey.fromURL(e,H),H&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(K)>=0&&(m.method=K,m.keyFormat=Y,W&&(m.keyID=W),Z&&(m.keyFormatVersions=Z),m.iv=V));break;case"START":var z=new u.AttrList(I).decimalFloatingPoint("TIME-OFFSET");Object(n.isFiniteNumber)(z)&&(y.startTimeOffset=z);break;case"MAP":var q=new u.AttrList(I);_.relurl=q.URI,q.BYTERANGE&&_.setByteRange(q.BYTERANGE),_.level=r,_.sn="initSegment",m&&(_.levelkey=m),_.initSegment=null,E=_,R=!0;break;case"SERVER-CONTROL":var X=new u.AttrList(I);y.canBlockReload=X.bool("CAN-BLOCK-RELOAD"),y.canSkipUntil=X.optionalFloat("CAN-SKIP-UNTIL",0),y.canSkipDateRanges=y.canSkipUntil>0&&X.bool("CAN-SKIP-DATERANGES"),y.partHoldBack=X.optionalFloat("PART-HOLD-BACK",0),y.holdBack=X.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var Q=new u.AttrList(I);y.partTarget=Q.decimalFloatingPoint("PART-TARGET");break;case"PART":var $=y.partList;$||($=y.partList=[]);var J=k>0?$[$.length-1]:void 0,tt=k++,et=new o.Part(new u.AttrList(I),_,e,tt,J);$.push(et),_.duration+=et.duration;break;case"PRELOAD-HINT":var rt=new u.AttrList(I);y.preloadHint=rt;break;case"RENDITION-REPORT":var nt=new u.AttrList(I);y.renditionReports=y.renditionReports||[],y.renditionReports.push(nt);break;default:c.logger.warn("line parsed but not handled: "+h)}}}x&&!x.relurl?(A.pop(),T-=x.duration,y.partList&&(y.fragmentHint=x)):y.partList&&(b(_,x),_.cc=C,y.fragmentHint=_);var it=A.length,ot=A[0],at=A[it-1];if((T+=y.skippedSegments*y.targetduration)>0&&it&&at){y.averagetargetduration=T/it;var st=at.sn;y.endSN="initSegment"!==st?st:0,ot&&(y.startCC=ot.cc,ot.initSegment||y.fragments.every((function(t){return t.relurl&&(e=t.relurl,v.test(null!=(r=null===(n=i.parseURL(e))||void 0===n?void 0:n.path)?r:""));var e,r,n}))&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(_=new o.Fragment(l,e)).relurl=at.relurl,_.level=r,_.sn="initSegment",ot.initSegment=_,y.needSidxRanges=!0))}else y.endSN=0,y.startCC=0;return y.fragmentHint&&(T+=y.fragmentHint.duration),y.totalduration=T,y.endCC=C,S>0&&function(t,e){for(var r=t[e],n=e;n--;){var i=t[n];if(!i)return;i.programDateTime=r.programDateTime-1e3*i.duration,r=i}}(A,S),y},t}();function m(t,e){["video","audio","text"].forEach((function(r){var n=t.filter((function(t){return Object(l.isCodecType)(t,r)}));if(n.length){var i=n.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));e[r+"Codec"]=i.length>0?i[0]:n[0],t=t.filter((function(t){return-1===n.indexOf(t)}))}})),e.unknownCodecs=t}function y(t,e,r){var n=e[r];n&&(t[r]=n)}function b(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):null!=e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),Object(n.isFiniteNumber)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/polyfills/number.ts"),i=r("./src/events.ts"),o=r("./src/errors.ts"),a=r("./src/utils/logger.ts"),s=r("./src/utils/mp4-tools.ts"),u=r("./src/loader/m3u8-parser.ts"),c=r("./src/types/loader.ts"),l=r("./src/utils/attr-list.ts");function f(t,e){var r=t.url;return void 0!==r&&0!==r.indexOf("data:")||(r=e.url),r}var h=function(){function t(t){this.hls=void 0,this.loaders=Object.create(null),this.hls=t,this.registerListeners()}var e=t.prototype;return e.registerListeners=function(){var t=this.hls;t.on(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(i.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.unregisterListeners=function(){var t=this.hls;t.off(i.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(i.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(i.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(i.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},e.createInternalLoader=function(t){var e=this.hls.config,r=e.pLoader,n=e.loader,i=new(r||n)(e);return t.loader=i,this.loaders[t.type]=i,i},e.getInternalLoader=function(t){return this.loaders[t.type]},e.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},e.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},e.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},e.onManifestLoading=function(t,e){var r=e.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:c.PlaylistContextType.MANIFEST,url:r,deliveryDirectives:null})},e.onLevelLoading=function(t,e){var r=e.id,n=e.level,i=e.url,o=e.deliveryDirectives;this.load({id:r,groupId:null,level:n,responseType:"text",type:c.PlaylistContextType.LEVEL,url:i,deliveryDirectives:o})},e.onAudioTrackLoading=function(t,e){var r=e.id,n=e.groupId,i=e.url,o=e.deliveryDirectives;this.load({id:r,groupId:n,level:null,responseType:"text",type:c.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:o})},e.onSubtitleTrackLoading=function(t,e){var r=e.id,n=e.groupId,i=e.url,o=e.deliveryDirectives;this.load({id:r,groupId:n,level:null,responseType:"text",type:c.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:o})},e.load=function(t){var e,r,n,i,o,s,u=this.hls.config,l=this.getInternalLoader(t);if(l){var f=l.context;if(f&&f.url===t.url)return void a.logger.trace("[playlist-loader]: playlist request ongoing");a.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),l.abort()}switch(t.type){case c.PlaylistContextType.MANIFEST:r=u.manifestLoadingMaxRetry,n=u.manifestLoadingTimeOut,i=u.manifestLoadingRetryDelay,o=u.manifestLoadingMaxRetryTimeout;break;case c.PlaylistContextType.LEVEL:case c.PlaylistContextType.AUDIO_TRACK:case c.PlaylistContextType.SUBTITLE_TRACK:r=0,n=u.levelLoadingTimeOut;break;default:r=u.levelLoadingMaxRetry,n=u.levelLoadingTimeOut,i=u.levelLoadingRetryDelay,o=u.levelLoadingMaxRetryTimeout}if(l=this.createInternalLoader(t),null!==(e=t.deliveryDirectives)&&void 0!==e&&e.part&&(t.type===c.PlaylistContextType.LEVEL&&null!==t.level?s=this.hls.levels[t.level].details:t.type===c.PlaylistContextType.AUDIO_TRACK&&null!==t.id?s=this.hls.audioTracks[t.id].details:t.type===c.PlaylistContextType.SUBTITLE_TRACK&&null!==t.id&&(s=this.hls.subtitleTracks[t.id].details),s)){var h=s.partTarget,d=s.targetduration;h&&d&&(n=Math.min(1e3*Math.max(3*h,.8*d),n))}var p={timeout:n,maxRetry:r,retryDelay:i,maxRetryDelay:o,highWaterMark:0},v={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(t,p,v)},e.loadsuccess=function(t,e,r,n){if(void 0===n&&(n=null),r.isSidxRequest)return this.handleSidxRequest(t,r),void this.handlePlaylistLoaded(t,e,r,n);this.resetInternalLoader(r.type);var i=t.data;0===i.indexOf("#EXTM3U")?(e.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,e,r,n):this.handleMasterPlaylist(t,e,r,n)):this.handleManifestParsingError(t,r,"no EXTM3U delimiter",n)},e.loaderror=function(t,e,r){void 0===r&&(r=null),this.handleNetworkError(e,r,!1,t)},e.loadtimeout=function(t,e,r){void 0===r&&(r=null),this.handleNetworkError(e,r,!0)},e.handleMasterPlaylist=function(t,e,r,n){var o=this.hls,s=t.data,c=f(t,r),h=u.default.parseMasterPlaylist(s,c),d=h.levels,p=h.sessionData;if(d.length){var v=d.map((function(t){return{id:t.attrs.AUDIO,audioCodec:t.audioCodec}})),g=d.map((function(t){return{id:t.attrs.SUBTITLES,textCodec:t.textCodec}})),m=u.default.parseMasterPlaylistMedia(s,c,"AUDIO",v),y=u.default.parseMasterPlaylistMedia(s,c,"SUBTITLES",g),b=u.default.parseMasterPlaylistMedia(s,c,"CLOSED-CAPTIONS");m.length&&(m.some((function(t){return!t.url}))||!d[0].audioCodec||d[0].attrs.AUDIO||(a.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),m.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new l.AttrList({}),bitrate:0,url:""}))),o.trigger(i.Events.MANIFEST_LOADED,{levels:d,audioTracks:m,subtitles:y,captions:b,url:c,stats:e,networkDetails:n,sessionData:p})}else this.handleManifestParsingError(t,r,"no level found in manifest",n)},e.handleTrackOrLevelPlaylist=function(t,e,r,a){var s=this.hls,h=r.id,d=r.level,p=r.type,v=f(t,r),g=Object(n.isFiniteNumber)(h)?h:0,m=Object(n.isFiniteNumber)(d)?d:g,y=function(t){switch(t.type){case c.PlaylistContextType.AUDIO_TRACK:return c.PlaylistLevelType.AUDIO;case c.PlaylistContextType.SUBTITLE_TRACK:return c.PlaylistLevelType.SUBTITLE;default:return c.PlaylistLevelType.MAIN}}(r),b=u.default.parseLevelPlaylist(t.data,v,m,y,g);if(b.fragments.length){if(p===c.PlaylistContextType.MANIFEST){var A={attrs:new l.AttrList({}),bitrate:0,details:b,name:"",url:v};s.trigger(i.Events.MANIFEST_LOADED,{levels:[A],audioTracks:[],url:v,stats:e,networkDetails:a,sessionData:null})}if(e.parsing.end=performance.now(),b.needSidxRanges){var E,w=null===(E=b.fragments[0].initSegment)||void 0===E?void 0:E.url;this.load({url:w,isSidxRequest:!0,type:p,level:d,levelDetails:b,id:h,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null})}else r.levelDetails=b,this.handlePlaylistLoaded(t,e,r,a)}else s.trigger(i.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:v,reason:"no fragments found in level",level:"number"==typeof r.level?r.level:void 0})},e.handleSidxRequest=function(t,e){var r=Object(s.parseSegmentIndex)(new Uint8Array(t.data));if(r){var n=r.references,i=e.levelDetails;n.forEach((function(t,e){var n=t.info,o=i.fragments[e];0===o.byteRange.length&&o.setByteRange(String(1+n.end-n.start)+"@"+String(n.start)),o.initSegment&&o.initSegment.setByteRange(String(r.moovEndOffset)+"@0")}))}},e.handleManifestParsingError=function(t,e,r,n){this.hls.trigger(i.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:e.type===c.PlaylistContextType.MANIFEST,url:t.url,reason:r,response:t,context:e,networkDetails:n})},e.handleNetworkError=function(t,e,r,n){void 0===r&&(r=!1),a.logger.warn("[playlist-loader]: A network "+(r?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var s=o.ErrorDetails.UNKNOWN,u=!1,l=this.getInternalLoader(t);switch(t.type){case c.PlaylistContextType.MANIFEST:s=r?o.ErrorDetails.MANIFEST_LOAD_TIMEOUT:o.ErrorDetails.MANIFEST_LOAD_ERROR,u=!0;break;case c.PlaylistContextType.LEVEL:s=r?o.ErrorDetails.LEVEL_LOAD_TIMEOUT:o.ErrorDetails.LEVEL_LOAD_ERROR,u=!1;break;case c.PlaylistContextType.AUDIO_TRACK:s=r?o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,u=!1;break;case c.PlaylistContextType.SUBTITLE_TRACK:s=r?o.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:o.ErrorDetails.SUBTITLE_LOAD_ERROR,u=!1}l&&this.resetInternalLoader(t.type);var f={type:o.ErrorTypes.NETWORK_ERROR,details:s,fatal:u,url:t.url,loader:l,context:t,networkDetails:e};n&&(f.response=n),this.hls.trigger(i.Events.ERROR,f)},e.handlePlaylistLoaded=function(t,e,r,n){var o=r.type,a=r.level,s=r.id,u=r.groupId,l=r.loader,f=r.levelDetails,h=r.deliveryDirectives;if(null!=f&&f.targetduration){if(l)switch(f.live&&(l.getCacheAge&&(f.ageHeader=l.getCacheAge()||0),l.getCacheAge&&!isNaN(f.ageHeader)||(f.ageHeader=0)),o){case c.PlaylistContextType.MANIFEST:case c.PlaylistContextType.LEVEL:this.hls.trigger(i.Events.LEVEL_LOADED,{details:f,level:a||0,id:s||0,stats:e,networkDetails:n,deliveryDirectives:h});break;case c.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(i.Events.AUDIO_TRACK_LOADED,{details:f,id:s||0,groupId:u||"",stats:e,networkDetails:n,deliveryDirectives:h});break;case c.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(i.Events.SUBTITLE_TRACK_LOADED,{details:f,id:s||0,groupId:u||"",stats:e,networkDetails:n,deliveryDirectives:h})}}else this.handleManifestParsingError(t,r,"invalid target duration",n)},t}();e.default=h},"./src/polyfills/number.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"isFiniteNumber",(function(){return n})),r.d(e,"MAX_SAFE_INTEGER",(function(){return i}));var n=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},i=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(t,e,r){"use strict";r.r(e);var n=function(){function t(){}return t.getSilentFrame=function(t,e){if("mp4a.40.2"===t){if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)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===e)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])}else{if(1===e)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===e)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===e)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])}},t}();e.default=n},"./src/remux/mp4-generator.ts":function(t,e,r){"use strict";r.r(e);var n=Math.pow(2,32)-1,i=function(){function t(){}return t.init=function(){var e;for(e in t.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:[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var r=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]),n=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]);t.HDLR_TYPES={video:r,audio:n};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),o=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=o,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),u=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,a,u,a,s),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,i))},t.box=function(t){for(var e=8,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];for(var o=n.length,a=o;o--;)e+=n[o].byteLength;var s=new Uint8Array(e);for(s[0]=e>>24&255,s[1]=e>>16&255,s[2]=e>>8&255,s[3]=255&e,s.set(t,4),o=0,e=8;o<a;o++)s.set(n[o],e),e+=n[o].byteLength;return s},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,r){r*=e;var i=Math.floor(r/(n+1)),o=Math.floor(r%(n+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,o>>24,o>>16&255,o>>8&255,255&o,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,r,n){return t.box(t.types.moof,t.mfhd(e),t.traf(n,r))},t.moov=function(e){for(var r=e.length,n=[];r--;)n[r]=t.trak(e[r]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(n).concat(t.mvex(e)))},t.mvex=function(e){for(var r=e.length,n=[];r--;)n[r]=t.trex(e[r]);return t.box.apply(null,[t.types.mvex].concat(n))},t.mvhd=function(e,r){r*=e;var i=Math.floor(r/(n+1)),o=Math.floor(r%(n+1)),a=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,o>>24,o>>16&255,o>>8&255,255&o,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 t.box(t.types.mvhd,a)},t.sdtp=function(e){var r,n,i=e.samples||[],o=new Uint8Array(4+i.length);for(r=0;r<i.length;r++)n=i[r].flags,o[r+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return t.box(t.types.sdtp,o)},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(e){var r,n,i,o=[],a=[];for(r=0;r<e.sps.length;r++)i=(n=e.sps[r]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(n));for(r=0;r<e.pps.length;r++)i=(n=e.pps[r]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(n));var s=t.box(t.types.avcC,new Uint8Array([1,o[3],o[4],o[5],255,224|e.sps.length].concat(o).concat([e.pps.length]).concat(a))),u=e.width,c=e.height,l=e.pixelRatio[0],f=e.pixelRatio[1];return t.box(t.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,u>>8&255,255&u,c>>8&255,255&c,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,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,255&l,f>>24,f>>16&255,f>>8&255,255&f])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var r=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var r=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,r>>8&255,255&r,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var r=e.id,i=e.duration*e.timescale,o=e.width,a=e.height,s=Math.floor(i/(n+1)),u=Math.floor(i%(n+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,r>>24&255,r>>16&255,r>>8&255,255&r,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,u>>24,u>>16&255,u>>8&255,255&u,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,o>>8&255,255&o,0,0,a>>8&255,255&a,0,0]))},t.traf=function(e,r){var i=t.sdtp(e),o=e.id,a=Math.floor(r/(n+1)),s=Math.floor(r%(n+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,o>>24,o>>16&255,o>>8&255,255&o])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,s>>24,s>>16&255,s>>8&255,255&s])),t.trun(e,i.length+16+20+8+16+8+8),i)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var r=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,r){var n,i,o,a,s,u,c=e.samples||[],l=c.length,f=12+16*l,h=new Uint8Array(f);for(r+=8+f,h.set([0,0,15,1,l>>>24&255,l>>>16&255,l>>>8&255,255&l,r>>>24&255,r>>>16&255,r>>>8&255,255&r],0),n=0;n<l;n++)o=(i=c[n]).duration,a=i.size,s=i.flags,u=i.cts,h.set([o>>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,u>>>24&255,u>>>16&255,u>>>8&255,255&u],12+16*n);return t.box(t.types.trun,h)},t.initSegment=function(e){t.types||t.init();var r=t.moov(e),n=new Uint8Array(t.FTYP.byteLength+r.byteLength);return n.set(t.FTYP),n.set(r,t.FTYP.byteLength),n},t}();i.types=void 0,i.HDLR_TYPES=void 0,i.STTS=void 0,i.STSC=void 0,i.STCO=void 0,i.STSZ=void 0,i.VMHD=void 0,i.SMHD=void 0,i.STSD=void 0,i.FTYP=void 0,i.DINF=void 0,e.default=i},"./src/remux/mp4-remuxer.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return v})),r.d(e,"normalizePts",(function(){return g}));var n=r("./src/polyfills/number.ts"),i=r("./src/remux/aac-helper.ts"),o=r("./src/remux/mp4-generator.ts"),a=r("./src/events.ts"),s=r("./src/errors.ts"),u=r("./src/utils/logger.ts"),c=r("./src/types/loader.ts"),l=r("./src/utils/timescale-conversion.ts");function f(){return f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f.apply(this,arguments)}var h=null,d=null,p=!1,v=function(){function t(t,e,r,n){if(void 0===n&&(n=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=t,this.config=e,this.typeSupported=r,this.ISGenerated=!1,null===h){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);h=i?parseInt(i[1]):0}if(null===d){var o=navigator.userAgent.match(/Safari\/(\d+)/i);d=o?parseInt(o[1]):0}p=!!h&&h<75||!!d&&d<600}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){u.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=t},e.resetNextTimestamp=function(){u.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},e.resetInitSegment=function(){u.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},e.getVideoStartPts=function(t){var e=!1,r=t.reduce((function(t,r){var n=r.pts-t;return n<-4294967296?(e=!0,g(t,r.pts)):n>0?t:r.pts}),t[0].pts);return e&&u.logger.debug("PTS rollover detected"),r},e.remux=function(t,e,r,n,i,o,a,s){var l,f,h,d,p,v,m=i,y=i,b=t.pid>-1,A=e.pid>-1,E=e.samples.length,w=t.samples.length>0,k=E>1;if((!b||w)&&(!A||k)||this.ISGenerated||a){this.ISGenerated||(h=this.generateIS(t,e,i));var T=this.isVideoContiguous,C=-1;if(k&&(C=function(t){for(var e=0;e<t.length;e++)if(t[e].key)return e;return-1}(e.samples),!T&&this.config.forceKeyFrameOnDiscontinuity))if(v=!0,C>0){u.logger.warn("[mp4-remuxer]: Dropped "+C+" out of "+E+" video samples due to a missing keyframe");var x=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(C),e.dropped+=C,y+=(e.samples[0].pts-x)/(e.timescale||9e4)}else-1===C&&(u.logger.warn("[mp4-remuxer]: No keyframe found out of "+E+" video samples"),v=!1);if(this.ISGenerated){if(w&&k){var _=this.getVideoStartPts(e.samples),S=(g(t.samples[0].pts,_)-_)/e.inputTimeScale;m+=Math.max(0,S),y+=Math.max(0,-S)}if(w){if(t.samplerate||(u.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),h=this.generateIS(t,e,i)),f=this.remuxAudio(t,m,this.isAudioContiguous,o,A||k||s===c.PlaylistLevelType.AUDIO?y:void 0),k){var R=f?f.endPTS-f.startPTS:0;e.inputTimeScale||(u.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),h=this.generateIS(t,e,i)),l=this.remuxVideo(e,y,T,R)}}else k&&(l=this.remuxVideo(e,y,T,0));l&&(l.firstKeyFrame=C,l.independent=-1!==C)}}return this.ISGenerated&&(r.samples.length&&(p=this.remuxID3(r,i)),n.samples.length&&(d=this.remuxText(n,i))),{audio:f,video:l,initSegment:h,independent:v,text:d,id3:p}},e.generateIS=function(t,e,r){var i,a,s,u=t.samples,c=e.samples,l=this.typeSupported,f={},h=!Object(n.isFiniteNumber)(this._initPTS),d="audio/mp4";if(h&&(i=a=1/0),t.config&&u.length&&(t.timescale=t.samplerate,t.isAAC||(l.mpeg?(d="audio/mpeg",t.codec=""):l.mp3&&(t.codec="mp3")),f.audio={id:"audio",container:d,codec:t.codec,initSegment:!t.isAAC&&l.mpeg?new Uint8Array(0):o.default.initSegment([t]),metadata:{channelCount:t.channelCount}},h&&(s=t.inputTimeScale,i=a=u[0].pts-Math.round(s*r))),e.sps&&e.pps&&c.length&&(e.timescale=e.inputTimeScale,f.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:o.default.initSegment([e]),metadata:{width:e.width,height:e.height}},h)){s=e.inputTimeScale;var p=this.getVideoStartPts(c),v=Math.round(s*r);a=Math.min(a,g(c[0].dts,p)-v),i=Math.min(i,p-v)}if(Object.keys(f).length)return this.ISGenerated=!0,h&&(this._initPTS=i,this._initDTS=a),{tracks:f,initPTS:i,timescale:s}},e.remuxVideo=function(t,e,r,n){var i,c,d,v=t.inputTimeScale,y=t.samples,b=[],A=y.length,E=this._initPTS,w=this.nextAvcDts,k=8,T=Number.POSITIVE_INFINITY,C=Number.NEGATIVE_INFINITY,x=0,_=!1;r&&null!==w||(w=e*v-(y[0].pts-g(y[0].dts,y[0].pts)));for(var S=0;S<A;S++){var R=y[S];R.pts=g(R.pts-E,w),R.dts=g(R.dts-E,w),R.dts>R.pts&&(x=Math.max(Math.min(x,R.pts-R.dts),-18e3)),R.dts<y[S>0?S-1:S].dts&&(_=!0)}_&&y.sort((function(t,e){var r=t.dts-e.dts,n=t.pts-e.pts;return r||n})),c=y[0].dts,d=y[y.length-1].dts;var L=Math.round((d-c)/(A-1));if(x<0){if(x<-2*L){u.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(l.toMsFromMpegTsClock)(-L,!0)+" ms");for(var O=x,P=0;P<A;P++)y[P].dts=O=Math.max(O,y[P].pts-L),y[P].pts=Math.max(O,y[P].pts)}else{u.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(l.toMsFromMpegTsClock)(x,!0)+" ms to overcome this issue");for(var D=0;D<A;D++)y[D].dts=y[D].dts+x}c=y[0].dts}if(r){var I=c-w,B=I>L;if(B||I<-1){B?u.logger.warn("AVC: "+Object(l.toMsFromMpegTsClock)(I,!0)+" ms ("+I+"dts) hole between fragments detected, filling it"):u.logger.warn("AVC: "+Object(l.toMsFromMpegTsClock)(-I,!0)+" ms ("+I+"dts) overlapping between fragments detected"),c=w;var M=y[0].pts-I;y[0].dts=c,y[0].pts=M,u.logger.log("Video: First PTS/DTS adjusted: "+Object(l.toMsFromMpegTsClock)(M,!0)+"/"+Object(l.toMsFromMpegTsClock)(c,!0)+", delta: "+Object(l.toMsFromMpegTsClock)(I,!0)+" ms")}}p&&(c=Math.max(0,c));for(var F=0,N=0,j=0;j<A;j++){for(var U=y[j],G=U.units,K=G.length,H=0,V=0;V<K;V++)H+=G[V].data.length;N+=H,F+=K,U.length=H,U.dts=Math.max(U.dts,c),U.pts=Math.max(U.pts,U.dts,0),T=Math.min(U.pts,T),C=Math.max(U.pts,C)}d=y[A-1].dts;var Z,W=N+4*F+8;try{Z=new Uint8Array(W)}catch(t){return void this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:W,reason:"fail allocating video mdat "+W})}var Y=new DataView(Z.buffer);Y.setUint32(0,W),Z.set(o.default.types.mdat,4);for(var z=0;z<A;z++){for(var q=y[z],X=q.units,Q=0,$=0,J=X.length;$<J;$++){var tt=X[$],et=tt.data,rt=tt.data.byteLength;Y.setUint32(k,rt),k+=4,Z.set(et,k),k+=rt,Q+=4+rt}if(z<A-1)i=y[z+1].dts-q.dts;else{var nt=this.config,it=q.dts-y[z>0?z-1:z].dts;if(nt.stretchShortVideoTrack&&null!==this.nextAudioPts){var ot=Math.floor(nt.maxBufferHole*v),at=(n?T+n*v:this.nextAudioPts)-q.pts;at>ot?((i=at-it)<0&&(i=it),u.logger.log("[mp4-remuxer]: It is approximately "+at/90+" ms to the next segment; using duration "+i/90+" ms for the last video frame.")):i=it}else i=it}var st=Math.round(q.pts-q.dts);b.push(new m(q.key,i,Q,st))}if(b.length&&h&&h<70){var ut=b[0].flags;ut.dependsOn=2,ut.isNonSync=0}console.assert(void 0!==i,"mp4SampleDuration must be computed"),this.nextAvcDts=w=d+i,this.isVideoContiguous=!0;var ct={data1:o.default.moof(t.sequenceNumber++,c,f({},t,{samples:b})),data2:Z,startPTS:T/v,endPTS:(C+i)/v,startDTS:c/v,endDTS:w/v,type:"video",hasAudio:!1,hasVideo:!0,nb:b.length,dropped:t.dropped};return t.samples=[],t.dropped=0,console.assert(Z.length,"MDAT length must not be zero"),ct},e.remuxAudio=function(t,e,r,n,c){var l,h=t.inputTimeScale,d=h/(t.samplerate?t.samplerate:h),p=t.isAAC?1024:1152,v=p*d,y=this._initPTS,b=!t.isAAC&&this.typeSupported.mpeg,A=[],E=t.samples,w=b?0:8,k=this.nextAudioPts||-1,T=e*h;if(this.isAudioContiguous=r=r||E.length&&k>0&&(n&&Math.abs(T-k)<9e3||Math.abs(g(E[0].pts-y,T)-k)<20*v),E.forEach((function(t){t.pts=t.dts=g(t.pts-y,T)})),!r||k<0){if(E=E.filter((function(t){return t.pts>=0})),!E.length)return;k=0===c?0:n?Math.max(0,T):E[0].pts}if(t.isAAC)for(var C=void 0!==c,x=this.config.maxAudioFramesDrift,_=0,S=k;_<E.length;_++){var R=E[_],L=R.pts,O=L-S,P=Math.abs(1e3*O/h);if(O<=-x*v&&C)0===_&&(u.logger.warn("Audio frame @ "+(L/h).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*O/h)+" ms."),this.nextAudioPts=k=L),S=L;else if(O>=x*v&&P<1e4&&C){var D=Math.round(O/v);(S=L-D*v)<0&&(D--,S+=v),0===_&&(this.nextAudioPts=k=S),u.logger.warn("[mp4-remuxer]: Injecting "+D+" audio frame @ "+(S/h).toFixed(3)+"s due to "+Math.round(1e3*O/h)+" ms gap.");for(var I=0;I<D;I++){var B=Math.max(S,0);(l=i.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(u.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),l=R.unit.subarray()),E.splice(_,0,{unit:l,pts:B,dts:B}),S+=v,_++}}R.pts=R.dts=S,S+=v}for(var M,F=null,N=null,j=0,U=E.length;U--;)j+=E[U].unit.byteLength;for(var G=0,K=E.length;G<K;G++){var H=E[G],V=H.unit,Z=H.pts;if(null!==N)A[G-1].duration=Math.round((Z-N)/d);else{if(r&&t.isAAC&&(Z=k),F=Z,!(j>0))return;j+=w;try{M=new Uint8Array(j)}catch(t){return void this.observer.emit(a.Events.ERROR,a.Events.ERROR,{type:s.ErrorTypes.MUX_ERROR,details:s.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating audio mdat "+j})}b||(new DataView(M.buffer).setUint32(0,j),M.set(o.default.types.mdat,4))}M.set(V,w);var W=V.byteLength;w+=W,A.push(new m(!0,p,W,0)),N=Z}var Y=A.length;if(Y){var z=A[A.length-1];this.nextAudioPts=k=N+d*z.duration;var q=b?new Uint8Array(0):o.default.moof(t.sequenceNumber++,F/d,f({},t,{samples:A}));t.samples=[];var X=F/h,Q=k/h,$={data1:q,data2:M,startPTS:X,endPTS:Q,startDTS:X,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:Y};return this.isAudioContiguous=!0,console.assert(M.length,"MDAT length must not be zero"),$}},e.remuxEmptyAudio=function(t,e,r,n){var o=t.inputTimeScale,a=o/(t.samplerate?t.samplerate:o),s=this.nextAudioPts,c=(null!==s?s:n.startDTS*o)+this._initDTS,l=n.endDTS*o+this._initDTS,f=1024*a,h=Math.ceil((l-c)/f),d=i.default.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(u.logger.warn("[mp4-remuxer]: remux empty Audio"),d){for(var p=[],v=0;v<h;v++){var g=c+v*f;p.push({unit:d,pts:g,dts:g})}return t.samples=p,this.remuxAudio(t,e,r,!1)}u.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},e.remuxID3=function(t,e){var r=t.samples.length;if(r){for(var n=t.inputTimeScale,i=this._initPTS,o=this._initDTS,a=0;a<r;a++){var s=t.samples[a];s.pts=g(s.pts-i,e*n)/n,s.dts=g(s.dts-o,e*n)/n}var u=t.samples;return t.samples=[],{samples:u}}},e.remuxText=function(t,e){var r=t.samples.length;if(r){for(var n=t.inputTimeScale,i=this._initPTS,o=0;o<r;o++){var a=t.samples[o];a.pts=g(a.pts-i,e*n)/n}t.samples.sort((function(t,e){return t.pts-e.pts}));var s=t.samples;return t.samples=[],{samples:s}}},t}();function g(t,e){var r;if(null===e)return t;for(r=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=r;return t}var m=function(t,e,r,n){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=r,this.cts=n,this.flags=new y(t)},y=function(t){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=t?2:1,this.isNonSync=t?0:1}},"./src/remux/passthrough-remuxer.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/polyfills/number.ts"),i=r("./src/utils/mp4-tools.ts"),o=r("./src/loader/fragment.ts"),a=r("./src/utils/logger.ts"),s=function(){function t(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this.initPTS=t,this.lastEndDTS=null},e.resetNextTimestamp=function(){this.lastEndDTS=null},e.resetInitSegment=function(t,e,r){this.audioCodec=e,this.videoCodec=r,this.generateInitSegment(t),this.emitInitSegment=!0},e.generateInitSegment=function(t){var e=this.audioCodec,r=this.videoCodec;if(!t||!t.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var n=this.initData=Object(i.parseInitSegment)(t);e||(e=c(n.audio,o.ElementaryStreamTypes.AUDIO)),r||(r=c(n.video,o.ElementaryStreamTypes.VIDEO));var s={};n.audio&&n.video?s.audiovideo={container:"video/mp4",codec:e+","+r,initSegment:t,id:"main"}:n.audio?s.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:n.video?s.video={container:"video/mp4",codec:r,initSegment:t,id:"main"}:a.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=s},e.remux=function(t,e,r,o,s){var c=this.initPTS,l=this.lastEndDTS,f={audio:void 0,video:void 0,text:o,id3:r,initSegment:void 0};Object(n.isFiniteNumber)(l)||(l=this.lastEndDTS=s||0);var h=e.samples;if(!h||!h.length)return f;var d={initPTS:void 0,timescale:1},p=this.initData;if(p&&p.length||(this.generateInitSegment(h),p=this.initData),!p||!p.length)return a.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),f;this.emitInitSegment&&(d.tracks=this.initTracks,this.emitInitSegment=!1),Object(n.isFiniteNumber)(c)||(this.initPTS=d.initPTS=c=u(p,h,l));var v=Object(i.getDuration)(h,p),g=l,m=v+g;Object(i.offsetStartDTS)(p,h,c),v>0?this.lastEndDTS=m:(a.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var y=!!p.audio,b=!!p.video,A="";y&&(A+="audio"),b&&(A+="video");var E={data1:h,startPTS:g,startDTS:g,endPTS:m,endDTS:m,type:A,hasAudio:y,hasVideo:b,nb:1,dropped:0};return f.audio="audio"===E.type?E:void 0,f.video="audio"!==E.type?E:void 0,f.text=o,f.id3=r,f.initSegment=d,f},t}(),u=function(t,e,r){return Object(i.getStartDTS)(t,e)-r};function c(t,e){var r=null==t?void 0:t.codec;return r&&r.length>4?r:"hvc1"===r?"hvc1.1.c.L120.90":"av01"===r?"av01.0.04M.08":"avc1"===r||e===o.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}e.default=s},"./src/task-loop.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var n=function(){function t(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var e=t.prototype;return e.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},e.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},e.onHandlerDestroyed=function(){},e.hasInterval=function(){return!!this._tickInterval},e.hasNextTick=function(){return!!this._tickTimer},e.setInterval=function(t){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,t),!0)},e.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},e.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},e.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},e.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},e.doTick=function(){},t}()},"./src/types/level.ts":function(t,e,r){"use strict";var n;function i(t,e){var r=t.canSkipUntil,i=t.canSkipDateRanges,o=t.endSN;return r&&(void 0!==e?e-o:0)<r?i?n.v2:n.Yes:n.No}r.r(e),r.d(e,"HlsSkip",(function(){return n})),r.d(e,"getSkipValue",(function(){return i})),r.d(e,"HlsUrlParameters",(function(){return o})),r.d(e,"Level",(function(){return a})),function(t){t.No="",t.Yes="YES",t.v2="v2"}(n||(n={}));var o=function(){function t(t,e,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=t,this.part=e,this.skip=r}return t.prototype.addDirectives=function(t){var e=new self.URL(t);return void 0!==this.msn&&e.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&e.searchParams.set("_HLS_part",this.part.toString()),this.skip&&e.searchParams.set("_HLS_skip",this.skip),e.toString()},t}(),a=function(){function t(t){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[t.url],this.attrs=t.attrs,this.bitrate=t.bitrate,t.details&&(this.details=t.details),this.id=t.id||0,this.name=t.name,this.width=t.width||0,this.height=t.height||0,this.audioCodec=t.audioCodec,this.videoCodec=t.videoCodec,this.unknownCodecs=t.unknownCodecs,this.codecSet=[t.videoCodec,t.audioCodec].filter((function(t){return t})).join(",").replace(/\.[^.,]+/g,"")}var e;return(e=[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(t){var e=t%this.url.length;this._urlId!==e&&(this.details=void 0,this._urlId=e)}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}()},"./src/types/loader.ts":function(t,e,r){"use strict";var n,i;r.r(e),r.d(e,"PlaylistContextType",(function(){return n})),r.d(e,"PlaylistLevelType",(function(){return i})),function(t){t.MANIFEST="manifest",t.LEVEL="level",t.AUDIO_TRACK="audioTrack",t.SUBTITLE_TRACK="subtitleTrack"}(n||(n={})),function(t){t.MAIN="main",t.AUDIO="audio",t.SUBTITLE="subtitle"}(i||(i={}))},"./src/types/transmuxer.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"ChunkMetadata",(function(){return n}));var n=function(t,e,r,n,i,o){void 0===n&&(n=0),void 0===i&&(i=-1),void 0===o&&(o=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=t,this.sn=e,this.id=r,this.size=n,this.part=i,this.partial=o}},"./src/utils/attr-list.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"AttrList",(function(){return o}));var n=/^(\d+)x(\d+)$/,i=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,o=function(){function t(e){for(var r in"string"==typeof e&&(e=t.parseAttrList(e)),e)e.hasOwnProperty(r)&&(this[r]=e[r])}var e=t.prototype;return e.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var r=new Uint8Array(e.length/2),n=0;n<e.length/2;n++)r[n]=parseInt(e.slice(2*n,2*n+2),16);return r}return null},e.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.optionalFloat=function(t,e){var r=this[t];return r?parseFloat(r):e},e.enumeratedString=function(t){return this[t]},e.bool=function(t){return"YES"===this[t]},e.decimalResolution=function(t){var e=n.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,r={};for(i.lastIndex=0;null!==(e=i.exec(t));){var n=e[2];0===n.indexOf('"')&&n.lastIndexOf('"')===n.length-1&&(n=n.slice(1,-1)),r[e[1]]=n}return r},t}()},"./src/utils/binary-search.ts":function(t,e,r){"use strict";r.r(e),e.default={search:function(t,e){for(var r=0,n=t.length-1,i=null,o=null;r<=n;){var a=e(o=t[i=(r+n)/2|0]);if(a>0)r=i+1;else{if(!(a<0))return o;n=i-1}}return null}}},"./src/utils/buffer-helper.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"BufferHelper",(function(){return o}));var n=r("./src/utils/logger.ts"),i={length:0,start:function(){return 0},end:function(){return 0}},o=function(){function t(){}return t.isBuffered=function(e,r){try{if(e)for(var n=t.getBuffered(e),i=0;i<n.length;i++)if(r>=n.start(i)&&r<=n.end(i))return!0}catch(t){}return!1},t.bufferInfo=function(e,r,n){try{if(e){var i,o=t.getBuffered(e),a=[];for(i=0;i<o.length;i++)a.push({start:o.start(i),end:o.end(i)});return this.bufferedInfo(a,r,n)}}catch(t){}return{len:0,start:r,end:r,nextStart:void 0}},t.bufferedInfo=function(t,e,r){t.sort((function(t,e){return t.start-e.start||e.end-t.end}));var n=[];if(r)for(var i=0;i<t.length;i++){var o=n.length;if(o){var a=n[o-1].end;t[i].start-a<r?t[i].end>a&&(n[o-1].end=t[i].end):n.push(t[i])}else n.push(t[i])}else n=t;for(var s,u=0,c=e,l=e,f=0;f<n.length;f++){var h=n[f].start,d=n[f].end;if(e+r>=h&&e<d)c=h,u=(l=d)-e;else if(e+r<h){s=h;break}}return{len:u,start:c||0,end:l||0,nextStart:s}},t.getBuffered=function(t){try{return t.buffered}catch(t){return n.logger.log("failed to get media.buffered",t),i}},t}()},"./src/utils/cea-608-parser.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"Row",(function(){return y})),r.d(e,"CaptionScreen",(function(){return b}));var n,i=r("./src/utils/logger.ts"),o={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},a=function(t){var e=t;return o.hasOwnProperty(t)&&(e=o[t]),String.fromCharCode(e)},s=15,u=100,c={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},l={17:2,18:4,21:6,22:8,23:10,19:13,20:15},f={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},h={25:2,26:4,29:6,30:8,31:10,27:13,28:15},d=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(t){t[t.ERROR=0]="ERROR",t[t.TEXT=1]="TEXT",t[t.WARNING=2]="WARNING",t[t.INFO=2]="INFO",t[t.DEBUG=3]="DEBUG",t[t.DATA=3]="DATA"}(n||(n={}));var p=function(){function t(){this.time=null,this.verboseLevel=n.ERROR}return t.prototype.log=function(t,e){this.verboseLevel>=t&&i.logger.log(this.time+" ["+t+"] "+e)},t}(),v=function(t){for(var e=[],r=0;r<t.length;r++)e.push(t[r].toString(16));return e},g=function(){function t(t,e,r,n,i){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=t||"white",this.underline=e||!1,this.italics=r||!1,this.background=n||"black",this.flash=i||!1}var e=t.prototype;return e.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},e.setStyles=function(t){for(var e=["foreground","underline","italics","background","flash"],r=0;r<e.length;r++){var n=e[r];t.hasOwnProperty(n)&&(this[n]=t[n])}},e.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},e.equals=function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash},e.copy=function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash},e.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},t}(),m=function(){function t(t,e,r,n,i,o){this.uchar=void 0,this.penState=void 0,this.uchar=t||" ",this.penState=new g(e,r,n,i,o)}var e=t.prototype;return e.reset=function(){this.uchar=" ",this.penState.reset()},e.setChar=function(t,e){this.uchar=t,this.penState.copy(e)},e.setPenState=function(t){this.penState.copy(t)},e.equals=function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)},e.copy=function(t){this.uchar=t.uchar,this.penState.copy(t.penState)},e.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},t}(),y=function(){function t(t){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var e=0;e<u;e++)this.chars.push(new m);this.logger=t,this.pos=0,this.currPenState=new g}var e=t.prototype;return e.equals=function(t){for(var e=!0,r=0;r<u;r++)if(!this.chars[r].equals(t.chars[r])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<u;e++)this.chars[e].copy(t.chars[e])},e.isEmpty=function(){for(var t=!0,e=0;e<u;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t},e.setCursor=function(t){this.pos!==t&&(this.pos=t),this.pos<0?(this.logger.log(n.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>u&&(this.logger.log(n.DEBUG,"Too large cursor position "+this.pos),this.pos=u)},e.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var r=this.pos+1;r<e+1;r++)this.chars[r].setPenState(this.currPenState);this.setCursor(e)},e.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},e.insertChar=function(t){t>=144&&this.backSpace();var e=a(t);this.pos>=u?this.logger.log(n.ERROR,"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},e.clearFromPos=function(t){var e;for(e=t;e<u;e++)this.chars[e].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var t=[],e=!0,r=0;r<u;r++){var n=this.chars[r].uchar;" "!==n&&(e=!1),t.push(n)}return e?"":t.join("")},e.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),b=function(){function t(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var e=0;e<s;e++)this.rows.push(new y(t));this.logger=t,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=t.prototype;return e.reset=function(){for(var t=0;t<s;t++)this.rows[t].clear();this.currRow=14},e.equals=function(t){for(var e=!0,r=0;r<s;r++)if(!this.rows[r].equals(t.rows[r])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<s;e++)this.rows[e].copy(t.rows[e])},e.isEmpty=function(){for(var t=!0,e=0;e<s;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},e.backSpace=function(){this.rows[this.currRow].backSpace()},e.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.insertChar=function(t){this.rows[this.currRow].insertChar(t)},e.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},e.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},e.setCursor=function(t){this.logger.log(n.INFO,"setCursor: "+t),this.rows[this.currRow].setCursor(t)},e.setPAC=function(t){this.logger.log(n.INFO,"pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(var r=0;r<s;r++)this.rows[r].clear();var i=this.currRow+1-this.nrRollUpRows,o=this.lastOutputScreen;if(o){var a=o.rows[i].cueStartTime,u=this.logger.time;if(a&&null!==u&&a<u)for(var c=0;c<this.nrRollUpRows;c++)this.rows[e-this.nrRollUpRows+c+1].copy(o.rows[i+c])}}this.currRow=e;var l=this.rows[this.currRow];if(null!==t.indent){var f=t.indent,h=Math.max(f-1,0);l.setCursor(t.indent),t.color=l.chars[h].penState.foreground}var d={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(d)},e.setBkgData=function(t){this.logger.log(n.INFO,"bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)},e.setRollUpRows=function(t){this.nrRollUpRows=t},e.rollUp=function(){if(null!==this.nrRollUpRows){this.logger.log(n.TEXT,this.getDisplayText());var t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),this.logger.log(n.INFO,"Rolling up")}else this.logger.log(n.DEBUG,"roll_up but nrRollUpRows not set yet")},e.getDisplayText=function(t){t=t||!1;for(var e=[],r="",n=-1,i=0;i<s;i++){var o=this.rows[i].getTextString();o&&(n=i+1,t?e.push("Row "+n+": '"+o+"'"):e.push(o.trim()))}return e.length>0&&(r=t?"["+e.join(" | ")+"]":e.join("\n")),r},e.getTextAndFormat=function(){return this.rows},t}(),A=function(){function t(t,e,r){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.logger=void 0,this.chNr=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new b(r),this.nonDisplayedMemory=new b(r),this.lastOutputScreen=new b(r),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}var e=t.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(t){this.outputFilter=t},e.setPAC=function(t){this.writeScreen.setPAC(t)},e.setBkgData=function(t){this.writeScreen.setBkgData(t)},e.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(n.INFO,"MODE="+t),"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=t)},e.insertChars=function(t){for(var e=0;e<t.length;e++)this.writeScreen.insertChar(t[e]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(n.INFO,r+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(n.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},e.ccRCL=function(){this.logger.log(n.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},e.ccBS=function(){this.logger.log(n.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},e.ccAOF=function(){},e.ccAON=function(){},e.ccDER=function(){this.logger.log(n.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},e.ccRU=function(t){this.logger.log(n.INFO,"RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)},e.ccFON=function(){this.logger.log(n.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},e.ccRDC=function(){this.logger.log(n.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},e.ccTR=function(){this.logger.log(n.INFO,"TR"),this.setMode("MODE_TEXT")},e.ccRTD=function(){this.logger.log(n.INFO,"RTD"),this.setMode("MODE_TEXT")},e.ccEDM=function(){this.logger.log(n.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},e.ccCR=function(){this.logger.log(n.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},e.ccENM=function(){this.logger.log(n.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},e.ccEOC=function(){if(this.logger.log(n.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(n.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},e.ccTO=function(t){this.logger.log(n.INFO,"TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)},e.ccMIDROW=function(t){var e={flash:!1};if(e.underline=t%2==1,e.italics=t>=46,e.italics)e.foreground="white";else{var r=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][r]}this.logger.log(n.INFO,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},e.outputDataUpdate=function(t){void 0===t&&(t=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),E=function(){function t(t,e,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var n=new p;this.channels=[null,new A(t,e,n),new A(t+1,r,n)],this.cmdHistory={a:null,b:null},this.logger=n}var e=t.prototype;return e.getHandler=function(t){return this.channels[t].getHandler()},e.setHandler=function(t,e){this.channels[t].setHandler(e)},e.addData=function(t,e){var r,i,o,a=!1;this.logger.time=t;for(var s=0;s<e.length;s+=2)if(i=127&e[s],o=127&e[s+1],0!==i||0!==o){if(this.logger.log(n.DATA,"["+v([e[s],e[s+1]])+"] -> ("+v([i,o])+")"),(r=this.parseCmd(i,o))||(r=this.parseMidrow(i,o)),r||(r=this.parsePAC(i,o)),r||(r=this.parseBackgroundAttributes(i,o)),!r&&(a=this.parseChars(i,o))){var u=this.currentChannel;u&&u>0?this.channels[u].insertChars(a):this.logger.log(n.WARNING,"No channel found yet. TEXT-MODE?")}r||a||this.logger.log(n.WARNING,"Couldn't parse cleaned data "+v([i,o])+" orig: "+v([e[s],e[s+1]]))}},e.parseCmd=function(t,e){var r=this.cmdHistory;if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=33&&e<=35))return!1;if(k(t,e,r))return w(null,null,r),this.logger.log(n.DEBUG,"Repeated command ("+v([t,e])+") is dropped"),!0;var i=20===t||21===t||23===t?1:2,o=this.channels[i];return 20===t||21===t||28===t||29===t?32===e?o.ccRCL():33===e?o.ccBS():34===e?o.ccAOF():35===e?o.ccAON():36===e?o.ccDER():37===e?o.ccRU(2):38===e?o.ccRU(3):39===e?o.ccRU(4):40===e?o.ccFON():41===e?o.ccRDC():42===e?o.ccTR():43===e?o.ccRTD():44===e?o.ccEDM():45===e?o.ccCR():46===e?o.ccENM():47===e&&o.ccEOC():o.ccTO(e-32),w(t,e,r),this.currentChannel=i,!0},e.parseMidrow=function(t,e){var r=0;if((17===t||25===t)&&e>=32&&e<=47){if((r=17===t?1:2)!==this.currentChannel)return this.logger.log(n.ERROR,"Mismatch channel in midrow parsing"),!1;var i=this.channels[r];return!!i&&(i.ccMIDROW(e),this.logger.log(n.DEBUG,"MIDROW ("+v([t,e])+")"),!0)}return!1},e.parsePAC=function(t,e){var r,n=this.cmdHistory;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127||(16===t||24===t)&&e>=64&&e<=95))return!1;if(k(t,e,n))return w(null,null,n),!0;var i=t<=23?1:2;r=e>=64&&e<=95?1===i?c[t]:f[t]:1===i?l[t]:h[t];var o=this.channels[i];return!!o&&(o.setPAC(this.interpretPAC(r,e)),w(t,e,n),this.currentChannel=i,!0)},e.interpretPAC=function(t,e){var r,n={color:null,italics:!1,indent:null,underline:!1,row:t};return r=e>95?e-96:e-64,n.underline=1==(1&r),r<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(n.italics=!0,n.color="white"):n.indent=4*Math.floor((r-16)/2),n},e.parseChars=function(t,e){var r,i,o=null,s=null;if(t>=25?(r=2,s=t-8):(r=1,s=t),s>=17&&s<=19?(i=17===s?e+80:18===s?e+112:e+144,this.logger.log(n.INFO,"Special char '"+a(i)+"' in channel "+r),o=[i]):t>=32&&t<=127&&(o=0===e?[t]:[t,e]),o){var u=v(o);this.logger.log(n.DEBUG,"Char codes =  "+u.join(",")),w(t,e,this.cmdHistory)}return o},e.parseBackgroundAttributes=function(t,e){var r;if(!((16===t||24===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=45&&e<=47))return!1;var n={};16===t||24===t?(r=Math.floor((e-32)/2),n.background=d[r],e%2==1&&(n.background=n.background+"_semi")):45===e?n.background="transparent":(n.foreground="black",47===e&&(n.underline=!0));var i=t<=23?1:2;return this.channels[i].setBkgData(n),w(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;t<Object.keys(this.channels).length;t++){var e=this.channels[t];e&&e.reset()}this.cmdHistory={a:null,b:null}},e.cueSplitAtTime=function(t){for(var e=0;e<this.channels.length;e++){var r=this.channels[e];r&&r.cueSplitAtTime(t)}},t}();function w(t,e,r){r.a=t,r.b=e}function k(t,e,r){return r.a===t&&r.b===e}e.default=E},"./src/utils/codecs.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"isCodecType",(function(){return i})),r.d(e,"isCodecSupportedInMp4",(function(){return o}));var n={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,av01:!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},text:{stpp:!0,wvtt:!0}};function i(t,e){var r=n[e];return!!r&&!0===r[t.slice(0,4)]}function o(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}},"./src/utils/cues.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/utils/vttparser.ts"),i=r("./src/utils/webvtt-parser.ts"),o=r("./src/utils/texttrack-utils.ts"),a=/\s/,s={newCue:function(t,e,r,s){for(var u,c,l,f,h,d=[],p=self.VTTCue||self.TextTrackCue,v=0;v<s.rows.length;v++)if(l=!0,f=0,h="",!(u=s.rows[v]).isEmpty()){for(var g=0;g<u.chars.length;g++)a.test(u.chars[g].uchar)&&l?f++:(h+=u.chars[g].uchar,l=!1);u.cueStartTime=e,e===r&&(r+=1e-4),f>=16?f--:f++;var m=Object(n.fixLineBreaks)(h.trim()),y=Object(i.generateCueId)(e,r,m);t&&t.cues&&t.cues.getCueById(y)||((c=new p(e,r,m)).id=y,c.line=v+1,c.align="left",c.position=10+Math.min(80,10*Math.floor(8*f/32)),d.push(c))}return t&&d.length&&(d.sort((function(t,e){return"auto"===t.line||"auto"===e.line?0:t.line>8&&e.line>8?e.line-t.line:t.line-e.line})),d.forEach((function(e){return Object(o.addCueToTrack)(t,e)}))),d}};e.default=s},"./src/utils/discontinuities.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"findFirstFragWithCC",(function(){return a})),r.d(e,"shouldAlignOnDiscontinuities",(function(){return s})),r.d(e,"findDiscontinuousReferenceFrag",(function(){return u})),r.d(e,"adjustSlidingStart",(function(){return l})),r.d(e,"alignStream",(function(){return f})),r.d(e,"alignPDT",(function(){return h}));var n=r("./src/polyfills/number.ts"),i=r("./src/utils/logger.ts"),o=r("./src/controller/level-helper.ts");function a(t,e){for(var r=null,n=0,i=t.length;n<i;n++){var o=t[n];if(o&&o.cc===e){r=o;break}}return r}function s(t,e,r){return!(!e.details||!(r.endCC>r.startCC||t&&t.cc<r.startCC))}function u(t,e){var r=t.fragments,n=e.fragments;if(n.length&&r.length){var o=a(r,n[0].cc);if(o&&(!o||o.startPTS))return o;i.logger.log("No frag in previous level to align on")}else i.logger.log("No fragments to align")}function c(t,e){if(t){var r=t.start+e;t.start=t.startPTS=r,t.endPTS=r+t.duration}}function l(t,e){for(var r=e.fragments,n=0,i=r.length;n<i;n++)c(r[n],t);e.fragmentHint&&c(e.fragmentHint,t),e.alignedSliding=!0}function f(t,e,r){e&&(function(t,e,r){if(s(t,r,e)){var o=u(r.details,e);o&&Object(n.isFiniteNumber)(o.start)&&(i.logger.log("Adjusting PTS using last level due to CC increase within current level "+e.url),l(o.start,e))}}(t,r,e),!r.alignedSliding&&e.details&&h(r,e.details),r.alignedSliding||!e.details||r.skippedSegments||Object(o.adjustSliding)(e.details,r))}function h(t,e){if(e.fragments.length&&t.hasProgramDateTime&&e.hasProgramDateTime){var r=e.fragments[0].programDateTime,o=t.fragments[0].programDateTime,a=(o-r)/1e3+e.fragments[0].start;a&&Object(n.isFiniteNumber)(a)&&(i.logger.log("Adjusting PTS using programDateTime delta "+(o-r)+"ms, sliding:"+a.toFixed(3)+" "+t.url+" "),l(a,t))}}},"./src/utils/ewma-bandwidth-estimator.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/utils/ewma.ts"),i=function(){function t(t,e,r){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new n.default(t),this.fast_=new n.default(e)}var e=t.prototype;return e.update=function(t,e){var r=this.slow_,i=this.fast_;this.slow_.halfLife!==t&&(this.slow_=new n.default(t,r.getEstimate(),r.getTotalWeight())),this.fast_.halfLife!==e&&(this.fast_=new n.default(e,i.getEstimate(),i.getTotalWeight()))},e.sample=function(t,e){var r=(t=Math.max(t,this.minDelayMs_))/1e3,n=8*e/r;this.fast_.sample(r,n),this.slow_.sample(r,n)},e.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();e.default=i},"./src/utils/ewma.ts":function(t,e,r){"use strict";r.r(e);var n=function(){function t(t,e,r){void 0===e&&(e=0),void 0===r&&(r=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=r}var e=t.prototype;return e.sample=function(t,e){var r=Math.pow(this.alpha_,t);this.estimate_=e*(1-r)+r*this.estimate_,this.totalWeight_+=t},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_},t}();e.default=n},"./src/utils/fetch-loader.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"fetchSupported",(function(){return f}));var n=r("./src/polyfills/number.ts"),i=r("./src/loader/load-stats.ts"),o=r("./src/demux/chunk-cache.ts");function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return s(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,t)},a(t)}function s(t,e,r){return s=u()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&c(i,r.prototype),i},s.apply(null,arguments)}function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(t,e){return c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},c(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function f(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var h=function(){function t(t){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=t.fetchSetup||d,this.controller=new self.AbortController,this.stats=new i.LoadStats}var e=t.prototype;return e.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},e.abortInternal=function(){var t=this.response;t&&t.ok||(this.stats.aborted=!0,this.controller.abort())},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},e.load=function(t,e,r){var i=this,o=this.stats;if(o.loading.start)throw new Error("Loader can only be used once.");o.loading.start=self.performance.now();var a=function(t,e){var r={method:"GET",mode:"cors",credentials:"same-origin",signal:e};return t.rangeEnd&&(r.headers=new self.Headers({Range:"bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)})),r}(t,this.controller.signal),s=r.onProgress,u="arraybuffer"===t.responseType,c=u?"byteLength":"length";this.context=t,this.config=e,this.callbacks=r,this.request=this.fetchSetup(t,a),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){i.abortInternal(),r.onTimeout(o,t,i.response)}),e.timeout),self.fetch(this.request).then((function(r){if(i.response=i.loader=r,!r.ok){var a=r.status,c=r.statusText;throw new p(c||"fetch, bad network response",a,r)}return o.loading.first=Math.max(self.performance.now(),o.loading.start),o.total=parseInt(r.headers.get("Content-Length")||"0"),s&&Object(n.isFiniteNumber)(e.highWaterMark)?i.loadProgressively(r,o,t,e.highWaterMark,s):u?r.arrayBuffer():r.text()})).then((function(a){var u=i.response;self.clearTimeout(i.requestTimeout),o.loading.end=Math.max(self.performance.now(),o.loading.first),o.loaded=o.total=a[c];var l={url:u.url,data:a};s&&!Object(n.isFiniteNumber)(e.highWaterMark)&&s(o,t,a,u),r.onSuccess(l,o,t,u)})).catch((function(e){if(self.clearTimeout(i.requestTimeout),!o.aborted){var n=e.code||0;r.onError({code:n,text:e.message},t,e.details)}}))},e.getCacheAge=function(){var t=null;if(this.response){var e=this.response.headers.get("age");t=e?parseFloat(e):null}return t},e.loadProgressively=function(t,e,r,n,i){void 0===n&&(n=0);var a=new o.default,s=t.body.getReader();return function o(){return s.read().then((function(s){if(s.done)return a.dataLength&&i(e,r,a.flush(),t),Promise.resolve(new ArrayBuffer(0));var u=s.value,c=u.length;return e.loaded+=c,c<n||a.dataLength?(a.push(u),a.dataLength>=n&&i(e,r,a.flush(),t)):i(e,r,u,t),o()})).catch((function(){return Promise.reject()}))}()},t}();function d(t,e){return new self.Request(t.url,e)}var p=function(t){var e,r;function n(e,r,n){var i;return(i=t.call(this,e)||this).code=void 0,i.details=void 0,i.code=r,i.details=n,i}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,c(e,r),n}(a(Error));e.default=h},"./src/utils/imsc1-ttml-parser.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"IMSC1_CODEC",(function(){return l})),r.d(e,"parseIMSC1",(function(){return p}));var n=r("./src/utils/mp4-tools.ts"),i=r("./src/utils/vttparser.ts"),o=r("./src/utils/vttcue.ts"),a=r("./src/demux/id3.ts"),s=r("./src/utils/timescale-conversion.ts"),u=r("./src/utils/webvtt-parser.ts");function c(){return c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},c.apply(this,arguments)}var l="stpp.ttml.im1t",f=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,h=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,d={left:"start",center:"center",right:"end",start:"start",end:"end"};function p(t,e,r,i,l){var f=Object(n.findBox)(new Uint8Array(t),["mdat"]);if(0!==f.length){var h=f[0],p=Object(a.utf8ArrayToStr)(new Uint8Array(t,h.start,h.end-h.start)),E=Object(s.toTimescaleFromScale)(e,1,r);try{i(function(t,e){var r=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");var n={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},i=Object.keys(n).reduce((function(t,e){return t[e]=r.getAttribute("ttp:"+e)||n[e],t}),{}),a="preserve"!==r.getAttribute("xml:space"),s=g(v(r,"styling","style")),l=g(v(r,"layout","region")),f=v(r,"body","[begin]");return[].map.call(f,(function(t){var r=m(t,a);if(!r||!t.hasAttribute("begin"))return null;var n=A(t.getAttribute("begin"),i),f=A(t.getAttribute("dur"),i),h=A(t.getAttribute("end"),i);if(null===n)throw b(t);if(null===h){if(null===f)throw b(t);h=n+f}var p=new o.default(n-e,h-e,r);p.id=Object(u.generateCueId)(p.startTime,p.endTime,p.text);var v=l[t.getAttribute("region")],g=s[t.getAttribute("style")];p.position=10,p.size=80;var E=function(t,e){var r="http://www.w3.org/ns/ttml#styling";return["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce((function(n,i){var o=y(e,r,i)||y(t,r,i);return o&&(n[i]=o),n}),{})}(v,g),w=E.textAlign;if(w){var k=d[w];k&&(p.lineAlign=k),p.align=w}return c(p,E),p})).filter((function(t){return null!==t}))}(p,E))}catch(t){l(t)}}else l(new Error("Could not parse IMSC1 mdat"))}function v(t,e,r){var n=t.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(r)):[]}function g(t){return t.reduce((function(t,e){var r=e.getAttribute("xml:id");return r&&(t[r]=e),t}),{})}function m(t,e){return[].slice.call(t.childNodes).reduce((function(t,r,n){var i;return"br"===r.nodeName&&n?t+"\n":null!==(i=r.childNodes)&&void 0!==i&&i.length?m(r,e):e?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent}),"")}function y(t,e,r){return t.hasAttributeNS(e,r)?t.getAttributeNS(e,r):null}function b(t){return new Error("Could not parse ttml timestamp "+t)}function A(t,e){if(!t)return null;var r=Object(i.parseTimeStamp)(t);return null===r&&(f.test(t)?r=function(t,e){var r=f.exec(t),n=(0|r[4])+(0|r[5])/e.subFrameRate;return 3600*(0|r[1])+60*(0|r[2])+(0|r[3])+n/e.frameRate}(t,e):h.test(t)&&(r=function(t,e){var r=h.exec(t),n=Number(r[1]);switch(r[2]){case"h":return 3600*n;case"m":return 60*n;case"ms":return 1e3*n;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}(t,e))),r}},"./src/utils/logger.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"enableLogs",(function(){return s})),r.d(e,"logger",(function(){return u}));var n=function(){},i={trace:n,debug:n,log:n,warn:n,info:n,error:n},o=i;function a(t){var e=self.console[t];return e?e.bind(self.console,"["+t+"] >"):n}function s(t){if(self.console&&!0===t||"object"==typeof t){!function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];r.forEach((function(e){o[e]=t[e]?t[e].bind(t):a(e)}))}(t,"debug","log","info","warn","error");try{o.log()}catch(t){o=i}}else o=i}var u=i},"./src/utils/mediakeys-helper.ts":function(t,e,r){"use strict";var n;r.r(e),r.d(e,"KeySystems",(function(){return n})),r.d(e,"requestMediaKeySystemAccess",(function(){return i})),function(t){t.WIDEVINE="com.widevine.alpha",t.PLAYREADY="com.microsoft.playready"}(n||(n={}));var i="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null},"./src/utils/mediasource-helper.ts":function(t,e,r){"use strict";function n(){return self.MediaSource||self.WebKitMediaSource}r.r(e),r.d(e,"getMediaSource",(function(){return n}))},"./src/utils/mp4-tools.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"bin2str",(function(){return s})),r.d(e,"readUint16",(function(){return u})),r.d(e,"readUint32",(function(){return c})),r.d(e,"writeUint32",(function(){return l})),r.d(e,"findBox",(function(){return f})),r.d(e,"parseSegmentIndex",(function(){return h})),r.d(e,"parseInitSegment",(function(){return d})),r.d(e,"getStartDTS",(function(){return p})),r.d(e,"getDuration",(function(){return v})),r.d(e,"computeRawDurationFromSamples",(function(){return g})),r.d(e,"offsetStartDTS",(function(){return m})),r.d(e,"segmentValidRange",(function(){return y})),r.d(e,"appendUint8Array",(function(){return b}));var n=r("./src/utils/typed-array.ts"),i=r("./src/loader/fragment.ts"),o=Math.pow(2,32)-1,a=[].push;function s(t){return String.fromCharCode.apply(null,t)}function u(t,e){"data"in t&&(e+=t.start,t=t.data);var r=t[e]<<8|t[e+1];return r<0?65536+r:r}function c(t,e){"data"in t&&(e+=t.start,t=t.data);var r=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return r<0?4294967296+r:r}function l(t,e,r){"data"in t&&(e+=t.start,t=t.data),t[e]=r>>24,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r}function f(t,e){var r,n,i,o=[];if(!e.length)return o;"data"in t?(r=t.data,n=t.start,i=t.end):(n=0,i=(r=t).byteLength);for(var u=n;u<i;){var l=c(r,u),h=l>1?u+l:i;if(s(r.subarray(u+4,u+8))===e[0])if(1===e.length)o.push({data:r,start:u+8,end:h});else{var d=f({data:r,start:u+8,end:h},e.slice(1));d.length&&a.apply(o,d)}u=h}return o}function h(t){var e=f(t,["moov"])[0],r=e?e.end:null,n=f(t,["sidx"]);if(!n||!n[0])return null;var i=[],o=n[0],a=o.data[0],s=0===a?8:16,l=c(o,s);s+=4,s+=0===a?8:16,s+=2;var h=o.end+0,d=u(o,s);s+=2;for(var p=0;p<d;p++){var v=s,g=c(o,v);v+=4;var m=2147483647&g;if(1==(2147483648&g)>>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var y=c(o,v);v+=4,i.push({referenceSize:m,subsegmentDuration:y,info:{duration:y/l,start:h,end:h+m-1}}),h+=m,s=v+=4}return{earliestPresentationTime:0,timescale:l,version:a,referencesCount:d,references:i,moovEndOffset:r}}function d(t){for(var e=[],r=f(t,["moov","trak"]),n=0;n<r.length;n++){var o=r[n],a=f(o,["tkhd"])[0];if(a){var u=a.data[a.start],l=0===u?12:20,h=c(a,l),d=f(o,["mdia","mdhd"])[0];if(d){var p=c(d,l=0===(u=d.data[d.start])?12:20),v=f(o,["mdia","hdlr"])[0];if(v){var g=s(v.data.subarray(v.start+8,v.start+12)),m={soun:i.ElementaryStreamTypes.AUDIO,vide:i.ElementaryStreamTypes.VIDEO}[g];if(m){var y=f(o,["mdia","minf","stbl","stsd"])[0],b=void 0;y&&(b=s(y.data.subarray(y.start+12,y.start+16))),e[h]={timescale:p,type:m},e[m]={timescale:p,id:h,codec:b}}}}}}return f(t,["moov","mvex","trex"]).forEach((function(t){var r=c(t,4),n=e[r];n&&(n.default={duration:c(t,12),flags:c(t,20)})})),e}function p(t,e){return f(e,["moof","traf"]).reduce((function(e,r){var n=f(r,["tfdt"])[0],i=n.data[n.start],o=f(r,["tfhd"]).reduce((function(e,r){var o=c(r,4),a=t[o];if(a){var s=c(n,4);1===i&&(s*=Math.pow(2,32),s+=c(n,8));var u=s/(a.timescale||9e4);if(isFinite(u)&&(null===e||u<e))return u}return e}),null);return null!==o&&isFinite(o)&&(null===e||o<e)?o:e}),null)||0}function v(t,e){for(var r=0,n=0,o=0,a=f(t,["moof","traf"]),s=0;s<a.length;s++){var u=a[s],l=f(u,["tfhd"])[0],d=e[c(l,4)];if(d){var p=d.default,v=c(l,0)|(null==p?void 0:p.flags),m=null==p?void 0:p.duration;8&v&&(m=c(l,2&v?12:8));for(var y=d.timescale||9e4,b=f(u,["trun"]),A=0;A<b.length;A++)r=m?m*c(b[A],4):g(b[A]),d.type===i.ElementaryStreamTypes.VIDEO?n+=r/y:d.type===i.ElementaryStreamTypes.AUDIO&&(o+=r/y)}}if(0===n&&0===o){var E=h(t);if(null!=E&&E.references)return E.references.reduce((function(t,e){return t+e.info.duration||0}),0)}return n||o}function g(t){var e=c(t,0),r=8;1&e&&(r+=4),4&e&&(r+=4);for(var n=0,i=c(t,4),o=0;o<i;o++)256&e&&(n+=c(t,r),r+=4),512&e&&(r+=4),1024&e&&(r+=4),2048&e&&(r+=4);return n}function m(t,e,r){f(e,["moof","traf"]).forEach((function(e){f(e,["tfhd"]).forEach((function(n){var i=c(n,4),a=t[i];if(a){var s=a.timescale||9e4;f(e,["tfdt"]).forEach((function(t){var e=t.data[t.start],n=c(t,4);if(0===e)l(t,4,n-r*s);else{n*=Math.pow(2,32),n+=c(t,8),n-=r*s,n=Math.max(n,0);var i=Math.floor(n/(o+1)),a=Math.floor(n%(o+1));l(t,4,i),l(t,8,a)}}))}}))}))}function y(t){var e={valid:null,remainder:null},r=f(t,["moof"]);if(!r)return e;if(r.length<2)return e.remainder=t,e;var i=r[r.length-1];return e.valid=Object(n.sliceUint8)(t,0,i.start-8),e.remainder=Object(n.sliceUint8)(t,i.start-8),e}function b(t,e){var r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}},"./src/utils/output-filter.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"default",(function(){return n}));var n=function(){function t(t,e){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=t,this.trackName=e}var e=t.prototype;return e.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},e.newCue=function(t,e,r){(null===this.startTime||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)},e.reset=function(){this.cueRanges=[]},t}()},"./src/utils/texttrack-utils.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"sendAddTrackEvent",(function(){return i})),r.d(e,"addCueToTrack",(function(){return o})),r.d(e,"clearCurrentCues",(function(){return a})),r.d(e,"removeCuesInRange",(function(){return s})),r.d(e,"getCuesInRange",(function(){return u}));var n=r("./src/utils/logger.ts");function i(t,e){var r;try{r=new Event("addtrack")}catch(t){(r=document.createEvent("Event")).initEvent("addtrack",!1,!1)}r.track=t,e.dispatchEvent(r)}function o(t,e){var r=t.mode;if("disabled"===r&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error("addCue is failed for: "+e)}catch(r){n.logger.debug("[texttrack-utils]: "+r);var i=new self.TextTrackCue(e.startTime,e.endTime,e.text);i.id=e.id,t.addCue(i)}"disabled"===r&&(t.mode=r)}function a(t){var e=t.mode;if("disabled"===e&&(t.mode="hidden"),t.cues){for(var r=t.cues.length;r--;)t.removeCue(t.cues[r]);"disabled"===e&&(t.mode=e)}}function s(t,e,r){var n=t.mode;if("disabled"===n&&(t.mode="hidden"),t.cues&&t.cues.length){for(var i=u(t.cues,e,r),o=0;o<i.length;o++)t.removeCue(i[o]);"disabled"===n&&(t.mode=n)}}function u(t,e,r){var n=[],i=function(t,e){if(e<t[0].startTime)return 0;var r=t.length-1;if(e>t[r].endTime)return-1;for(var n=0,i=r;n<=i;){var o=Math.floor((i+n)/2);if(e<t[o].startTime)i=o-1;else{if(!(e>t[o].startTime&&n<r))return o;n=o+1}}return t[n].startTime-e<e-t[i].startTime?n:i}(t,e);if(i>-1)for(var o=i,a=t.length;o<a;o++){var s=t[o];if(s.startTime>=e&&s.endTime<=r)n.push(s);else if(s.startTime>r)return n}return n}},"./src/utils/time-ranges.ts":function(t,e,r){"use strict";r.r(e),e.default={toString:function(t){for(var e="",r=t.length,n=0;n<r;n++)e+="["+t.start(n).toFixed(3)+","+t.end(n).toFixed(3)+"]";return e}}},"./src/utils/timescale-conversion.ts":function(t,e,r){"use strict";function n(t,e,r,n){void 0===r&&(r=1),void 0===n&&(n=!1);var i=t*e*r;return n?Math.round(i):i}function i(t,e,r,i){return void 0===r&&(r=1),void 0===i&&(i=!1),n(t,e,1/r,i)}function o(t,e){return void 0===e&&(e=!1),n(t,1e3,1/9e4,e)}function a(t,e){return void 0===e&&(e=1),n(t,9e4,1/e)}r.r(e),r.d(e,"toTimescaleFromBase",(function(){return n})),r.d(e,"toTimescaleFromScale",(function(){return i})),r.d(e,"toMsFromMpegTsClock",(function(){return o})),r.d(e,"toMpegTsClockFromTimescale",(function(){return a}))},"./src/utils/typed-array.ts":function(t,e,r){"use strict";function n(t,e,r){return Uint8Array.prototype.slice?t.slice(e,r):new Uint8Array(Array.prototype.slice.call(t,e,r))}r.r(e),r.d(e,"sliceUint8",(function(){return n}))},"./src/utils/vttcue.ts":function(t,e,r){"use strict";r.r(e),e.default=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var t=["","lr","rl"],e=["start","middle","end","left","right"];function r(t,e){if("string"!=typeof e)return!1;if(!Array.isArray(t))return!1;var r=e.toLowerCase();return!!~t.indexOf(r)&&r}function n(t){return r(e,t)}function i(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var a in o)t[a]=o[a]}return t}function o(e,o,a){var s=this,u={enumerable:!0};s.hasBeenReset=!1;var c="",l=!1,f=e,h=o,d=a,p=null,v="",g=!0,m="auto",y="start",b=50,A="middle",E=50,w="middle";Object.defineProperty(s,"id",i({},u,{get:function(){return c},set:function(t){c=""+t}})),Object.defineProperty(s,"pauseOnExit",i({},u,{get:function(){return l},set:function(t){l=!!t}})),Object.defineProperty(s,"startTime",i({},u,{get:function(){return f},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");f=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},u,{get:function(){return h},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");h=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},u,{get:function(){return d},set:function(t){d=""+t,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},u,{get:function(){return p},set:function(t){p=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},u,{get:function(){return v},set:function(e){var n=function(e){return r(t,e)}(e);if(!1===n)throw new SyntaxError("An invalid or illegal string was specified.");v=n,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},u,{get:function(){return g},set:function(t){g=!!t,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},u,{get:function(){return m},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("An invalid number or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},u,{get:function(){return y},set:function(t){var e=n(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},u,{get:function(){return b},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},u,{get:function(){return A},set:function(t){var e=n(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");A=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},u,{get:function(){return E},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");E=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},u,{get:function(){return w},set:function(t){var e=n(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");w=e,this.hasBeenReset=!0}})),s.displayState=void 0}return o.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},o}()},"./src/utils/vttparser.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"parseTimeStamp",(function(){return o})),r.d(e,"fixLineBreaks",(function(){return f})),r.d(e,"VTTParser",(function(){return h}));var n=r("./src/utils/vttcue.ts"),i=function(){function t(){}return t.prototype.decode=function(t,e){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))},t}();function o(t){function e(t,e,r,n){return 3600*(0|t)+60*(0|e)+(0|r)+parseFloat(n||0)}var r=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return r?parseFloat(r[2])>59?e(r[2],r[3],0,r[4]):e(r[1],r[2],r[3],r[4]):null}var a=function(){function t(){this.values=Object.create(null)}var e=t.prototype;return e.set=function(t,e){this.get(t)||""===e||(this.values[t]=e)},e.get=function(t,e,r){return r?this.has(t)?this.values[t]:e[r]:this.has(t)?this.values[t]:e},e.has=function(t){return t in this.values},e.alt=function(t,e,r){for(var n=0;n<r.length;++n)if(e===r[n]){this.set(t,e);break}},e.integer=function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},e.percent=function(t,e){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(e)){var r=parseFloat(e);if(r>=0&&r<=100)return this.set(t,r),!0}return!1},t}();function s(t,e,r,n){var i=n?t.split(n):[t];for(var o in i)if("string"==typeof i[o]){var a=i[o].split(r);2===a.length&&e(a[0],a[1])}}var u=new n.default(0,0,""),c="middle"===u.align?"middle":"center";function l(t,e,r){var n=t;function i(){var e=o(t);if(null===e)throw new Error("Malformed timestamp: "+n);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function l(){t=t.replace(/^\s+/,"")}if(l(),e.startTime=i(),l(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);t=t.substr(3),l(),e.endTime=i(),l(),function(t,e){var n=new a;s(t,(function(t,e){var i;switch(t){case"region":for(var o=r.length-1;o>=0;o--)if(r[o].id===e){n.set(t,r[o].region);break}break;case"vertical":n.alt(t,e,["rl","lr"]);break;case"line":i=e.split(","),n.integer(t,i[0]),n.percent(t,i[0])&&n.set("snapToLines",!1),n.alt(t,i[0],["auto"]),2===i.length&&n.alt("lineAlign",i[1],["start",c,"end"]);break;case"position":i=e.split(","),n.percent(t,i[0]),2===i.length&&n.alt("positionAlign",i[1],["start",c,"end","line-left","line-right","auto"]);break;case"size":n.percent(t,e);break;case"align":n.alt(t,e,["start",c,"end","left","right"])}}),/:/,/\s/),e.region=n.get("region",null),e.vertical=n.get("vertical","");var i=n.get("line","auto");"auto"===i&&-1===u.line&&(i=-1),e.line=i,e.lineAlign=n.get("lineAlign","start"),e.snapToLines=n.get("snapToLines",!0),e.size=n.get("size",100),e.align=n.get("align",c);var o=n.get("position","auto");"auto"===o&&50===u.position&&(o="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=o}(t,e)}function f(t){return t.replace(/<br(?: \/)?>/gi,"\n")}var h=function(){function t(){this.state="INITIAL",this.buffer="",this.decoder=new i,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var e=t.prototype;return e.parse=function(t){var e=this;function r(){var t=e.buffer,r=0;for(t=f(t);r<t.length&&"\r"!==t[r]&&"\n"!==t[r];)++r;var n=t.substr(0,r);return"\r"===t[r]&&++r,"\n"===t[r]&&++r,e.buffer=t.substr(r),n}t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));try{var i="";if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var o=(i=r()).match(/^(ï»¿)?WEBVTT([ \t].*)?$/);if(!o||!o[0])throw new Error("Malformed WebVTT signature.");e.state="HEADER"}for(var a=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(a?a=!1:i=r(),e.state){case"HEADER":/:/.test(i)?s(i,(function(t,e){}),/:/):i||(e.state="ID");continue;case"NOTE":i||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){e.state="NOTE";break}if(!i)continue;if(e.cue=new n.default(0,0,""),e.state="CUE",-1===i.indexOf("--\x3e")){e.cue.id=i;continue}case"CUE":if(!e.cue){e.state="BADCUE";continue}try{l(i,e.cue,e.regionList)}catch(t){e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var u=-1!==i.indexOf("--\x3e");if(!i||u&&(a=!0)){e.oncue&&e.cue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}if(null===e.cue)continue;e.cue.text&&(e.cue.text+="\n"),e.cue.text+=i;continue;case"BADCUE":i||(e.state="ID")}}}catch(t){"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},e.flush=function(){var t=this;try{if((t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state||"BADWEBVTT"===t.state)throw new Error("Malformed WebVTT signature.")}catch(e){t.onparsingerror&&t.onparsingerror(e)}return t.onflush&&t.onflush(),this},t}()},"./src/utils/webvtt-parser.ts":function(t,e,r){"use strict";r.r(e),r.d(e,"generateCueId",(function(){return f})),r.d(e,"parseWebVTT",(function(){return h}));var n=r("./src/polyfills/number.ts"),i=r("./src/utils/vttparser.ts"),o=r("./src/demux/id3.ts"),a=r("./src/utils/timescale-conversion.ts"),s=r("./src/remux/mp4-remuxer.ts"),u=/\r\n|\n\r|\n|\r/g,c=function(t,e,r){return void 0===r&&(r=0),t.substr(r,e.length)===e},l=function(t){for(var e=5381,r=t.length;r;)e=33*e^t.charCodeAt(--r);return(e>>>0).toString()};function f(t,e,r){return l(t.toString())+l(e.toString())+l(r)}function h(t,e,r,l,h,d,p,v){var g,m=new i.VTTParser,y=Object(o.utf8ArrayToStr)(new Uint8Array(t)).trim().replace(u,"\n").split("\n"),b=[],A=Object(a.toMpegTsClockFromTimescale)(e,r),E="00:00.000",w=0,k=0,T=!0,C=!1;m.oncue=function(t){var e=l[h],r=l.ccOffset,n=(w-A)/9e4;if(null!=e&&e.new&&(void 0!==k?r=l.ccOffset=e.start:function(t,e,r){var n=t[e],i=t[n.prevCC];if(!i||!i.new&&n.new)return t.ccOffset=t.presentationOffset=n.start,void(n.new=!1);for(;null!==(o=i)&&void 0!==o&&o.new;){var o;t.ccOffset+=n.start-i.start,n.new=!1,i=t[(n=i).prevCC]}t.presentationOffset=r}(l,h,n)),n&&(r=n-l.presentationOffset),C){var i=t.endTime-t.startTime,o=Object(s.normalizePts)(9e4*(t.startTime+r-k),9e4*d)/9e4;t.startTime=o,t.endTime=o+i}var a=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(a)),t.id||(t.id=f(t.startTime,t.endTime,a)),t.endTime>0&&b.push(t)},m.onparsingerror=function(t){g=t},m.onflush=function(){g?v(g):p(b)},y.forEach((function(t){if(T){if(c(t,"X-TIMESTAMP-MAP=")){T=!1,C=!0,t.substr(16).split(",").forEach((function(t){c(t,"LOCAL:")?E=t.substr(6):c(t,"MPEGTS:")&&(w=parseInt(t.substr(7)))}));try{k=function(t){var e=parseInt(t.substr(-3)),r=parseInt(t.substr(-6,2)),i=parseInt(t.substr(-9,2)),o=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;if(!(Object(n.isFiniteNumber)(e)&&Object(n.isFiniteNumber)(r)&&Object(n.isFiniteNumber)(i)&&Object(n.isFiniteNumber)(o)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*r,(e+=6e4*i)+36e5*o}(E)/1e3}catch(t){C=!1,g=t}return}""===t&&(T=!1)}m.parse(t+"\n")})),m.flush()}},"./src/utils/xhr-loader.ts":function(t,e,r){"use strict";r.r(e);var n=r("./src/utils/logger.ts"),i=r("./src/loader/load-stats.ts"),o=/^age:\s*[\d.]+\s*$/m,a=function(){function t(t){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=t?t.xhrSetup:null,this.stats=new i.LoadStats,this.retryDelay=0}var e=t.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,4!==t.readyState&&(this.stats.aborted=!0,t.abort()))},e.abort=function(){var t;this.abortInternal(),null!==(t=this.callbacks)&&void 0!==t&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(t,e,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=r,this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t=this.config,e=this.context;if(t){var r=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0;var i=this.xhrSetup;try{if(i)try{i(r,e.url)}catch(t){r.open("GET",e.url,!0),i(r,e.url)}r.readyState||r.open("GET",e.url,!0)}catch(t){return void this.callbacks.onError({code:r.status,text:t.message},e,r)}e.rangeEnd&&r.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=e.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),t.timeout),r.send()}},e.readystatechange=function(){var t=this.context,e=this.loader,r=this.stats;if(t&&e){var i=e.readyState,o=this.config;if(!r.aborted&&i>=2)if(self.clearTimeout(this.requestTimeout),0===r.loading.first&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),4===i){e.onreadystatechange=null,e.onprogress=null;var a=e.status;if(a>=200&&a<300){var s,u;if(r.loading.end=Math.max(self.performance.now(),r.loading.first),u="arraybuffer"===t.responseType?(s=e.response).byteLength:(s=e.responseText).length,r.loaded=r.total=u,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(r,t,s,e),!this.callbacks)return;var l={url:e.responseURL,data:s};this.callbacks.onSuccess(l,r,t,e)}else r.retry>=o.maxRetry||a>=400&&a<499?(n.logger.error(a+" while loading "+t.url),this.callbacks.onError({code:a,text:e.statusText},t,e)):(n.logger.warn(a+" while loading "+t.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,o.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),o.timeout)}},e.loadtimeout=function(){n.logger.warn("timeout while loading "+this.context.url);var t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(t){var e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)},e.getCacheAge=function(){var t=null;if(this.loader&&o.test(this.loader.getAllResponseHeaders())){var e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t},t}();e.default=a}}).default},t.exports=e())},5666:t=>{var e=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,o=Object.create(i.prototype),a=new S(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===d)throw new Error("Generator is already running");if(n===p){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=C(a,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?p:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(t,r,a),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",v={};function g(){}function m(){}function y(){}var b={};b[o]=function(){return this};var A=Object.getPrototypeOf,E=A&&A(A(R([])));E&&E!==r&&n.call(E,o)&&(b=E);var w=y.prototype=g.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(i,o,a,s){var u=l(t[i],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function C(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function R(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:L}}function L(){return{value:e,done:!0}}return m.prototype=w.constructor=y,y.constructor=m,m.displayName=u(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},k(T.prototype),T.prototype[a]=function(){return this},t.AsyncIterator=T,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new T(c(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(w),u(w,s,"Generator"),w[o]=function(){return this},w.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=R,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;_(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:R(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},3379:(t,e,r)=>{"use strict";var n,i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),o=[];function a(t){for(var e=-1,r=0;r<o.length;r++)if(o[r].identifier===t){e=r;break}return e}function s(t,e){for(var r={},n=[],i=0;i<t.length;i++){var s=t[i],u=e.base?s[0]+e.base:s[0],c=r[u]||0,l="".concat(u," ").concat(c);r[u]=c+1;var f=a(l),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==f?(o[f].references++,o[f].updater(h)):o.push({identifier:l,updater:v(h,e),references:1}),n.push(l)}return n}function u(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var o=r.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])})),"function"==typeof t.insert)t.insert(e);else{var a=i(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var c,l=(c=[],function(t,e){return c[t]=e,c.filter(Boolean).join("\n")});function f(t,e,r,n){var i=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(t.styleSheet)t.styleSheet.cssText=l(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function h(t,e,r){var n=r.css,i=r.media,o=r.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var d=null,p=0;function v(t,e){var r,n,i;if(e.singleton){var o=p++;r=d||(d=u(e)),n=f.bind(null,r,o,!1),i=f.bind(null,r,o,!0)}else r=u(e),n=h.bind(null,r,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(r)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n));var r=s(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var n=0;n<r.length;n++){var i=a(r[n]);o[i].references--}for(var u=s(t,e),c=0;c<r.length;c++){var l=a(r[c]);0===o[l].references&&(o[l].updater(),o.splice(l,1))}r=u}}}},9724:t=>{t.exports='<svg viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g transform="matrix(-0.620305,0,0,0.839332,25.2077,0.462208)"><rect x="1.94" y="9" width="37.06" height="25" style="fill:rgb(106,106,106);"></rect></g><g transform="matrix(-0.636035,0,0,0.866362,39.6365,-5.1715)"><rect x="1" y="21" width="22" height="15" style="fill:rgb(106,106,106);"></rect></g></svg>'},6300:t=>{t.exports='<svg viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path d="M28.675,28.287L27,26.839L33.674,26L33.808,32.725L31.703,30.906C28.782,34.039 24.618,36 20,36C14.825,36 10.22,33.538 7.295,29.722L10.798,27.699C13,30.328 16.306,32 20,32C23.41,32 26.49,30.575 28.675,28.287ZM4.41,23.613C4.142,22.452 4,21.242 4,20C4,12.02 9.855,5.396 17.5,4.195L17.5,8.261C12.075,9.413 8,14.234 8,20C8,20.79 8.077,21.563 8.223,22.31L10.597,21.499L7.955,27.686L2.08,24.409L4.41,23.613ZM22.536,8.416L22.158,10.598L18,5.31L23.594,2.335L23.22,4.472C27.411,5.361 31.237,7.919 33.616,11.877C36.283,16.312 36.546,21.527 34.783,26L31.244,24.04C32.362,20.798 32.092,17.103 30.188,13.938C28.431,11.015 25.623,9.11 22.536,8.416Z" style="fill:rgb(80,80,80);"></path></svg>'},3973:t=>{t.exports='<svg viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g transform="matrix(-1,0,0,1,40,0)"><path d="M39,34L24,34L24,20L2,20L2,9L39,9L39,34Z" style="fill:rgb(106,106,106);"></path></g><g transform="matrix(-1,0,0,1,40,0)"><rect x="1" y="21" width="22" height="15" style="fill:rgb(106,106,106);"></rect></g></svg>'},3725:t=>{t.exports='<svg viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path d="M39,34l-15,0l0,-14l-22,0l0,-11l37,0l0,25Z" style="fill:#6a6a6a;"></path><rect x="1" y="21" width="22" height="15" style="fill:#6a6a6a;"></rect></svg>'},752:t=>{t.exports='<svg viewBox="0 0 24 22" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="pause" transform="matrix(1,0,0,0.956522,-48,-7.65217)"><path d="M64,8L72,8L72,31L64,31L64,8ZM48,8L56,8L56,31L48,31L48,8Z"></path></g></svg>'},5372:t=>{t.exports='<svg viewBox="0 0 23 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="play" transform="matrix(1.36051e-16,0.480277,-0.550439,1.55927e-16,74.9184,-144.269)"><path d="M325.373,94.327L350.358,136.107L300.387,136.107L325.373,94.327Z"></path></g></svg>'},6304:t=>{t.exports='<svg viewBox="0 0 300 300" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Play" x="0" y="0" width="300" height="300" style="fill:none;"></rect><g id="Play1" serif:id="Play"><g transform="matrix(1.21457,0,0,1.21457,-55.8704,-35.2227)"><circle cx="169.5" cy="152.5" r="123.5" style="fill:rgb(128,128,128);"></circle><path d="M169.5,29C237.662,29 293,84.338 293,152.5C293,220.662 237.662,276 169.5,276C101.338,276 46,220.662 46,152.5C46,84.338 101.338,29 169.5,29ZM169.5,37.233C233.117,37.233 284.767,88.883 284.767,152.5C284.767,216.117 233.117,267.767 169.5,267.767C105.883,267.767 54.233,216.117 54.233,152.5C54.233,88.883 105.883,37.233 169.5,37.233Z" style="fill:rgb(235,235,235);"></path></g><g transform="matrix(6.12323e-17,1,-1,6.12323e-17,347,-59)"><path d="M209,82L317,253L101,253L209,82Z" style="fill:rgb(235,235,235);"></path></g></g></svg>'},9998:t=>{t.exports='<svg viewBox="0 0 39 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g transform="matrix(1.43396,0,0,1.57895,-350.104,-74)"><path d="M271,50.995C271,49.065 269.277,47.5 267.152,47.5C267.152,47.5 260.884,46.867 257.75,46.867C254.616,46.867 248.348,47.5 248.348,47.5C246.223,47.5 244.5,49.065 244.5,50.995C244.5,50.995 244.151,55.036 244.151,56.842C244.151,58.843 244.5,63.005 244.5,63.005C244.5,64.935 246.223,66.5 248.348,66.5C248.348,66.5 254.965,67.133 258.099,67.133C261.124,67.133 267.152,66.5 267.152,66.5C269.277,66.5 271,64.935 271,63.005C271,63.005 271.349,59.002 271.349,57C271.349,54.998 271,50.995 271,50.995Z"></path></g></svg>'},3855:(t,e,r)=>{var n={"./es.upv.paella.testVideoCanvas.js":1425,"./es.upv.paella.videoCanvas.js":6280};function i(t){var e=o(t);return r(e)}function o(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}i.keys=function(){return Object.keys(n)},i.resolve=o,t.exports=i,i.id=3855},9802:(t,e,r)=>{var n={"./PaellaCoreDataPlugins.js":99,"./es.upv.paella.cookieDataPlugin.js":6016};function i(t){var e=o(t);return r(e)}function o(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}i.keys=function(){return Object.keys(n)},i.resolve=o,t.exports=i,i.id=9802},4803:(t,e,r)=>{var n={"./PaellaCoreLayouts.js":4493,"./es.upv.paella.dualVideo.js":7236,"./es.upv.paella.singleVideo.js":8785,"./es.upv.paella.tripleVideo.js":2128};function i(t){var e=o(t);return r(e)}function o(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}i.keys=function(){return Object.keys(n)},i.resolve=o,t.exports=i,i.id=4803},591:(t,e,r)=>{var n={"./PaellaCorePlugins.js":1481,"./es.upv.paella.defaultShortcuts.js":5026,"./es.upv.paella.playPauseButton.js":3591,"./es.upv.paella.testButtonGroupPlugin.js":7858,"./es.upv.paella.testCaptionsPlugin.js":2694,"./es.upv.paella.testEventLogPlugin.js":5651,"./es.upv.paella.testFoldableButton.js":3508,"./es.upv.paella.testPopUp2Button.js":7924,"./es.upv.paella.testPopUpButton.js":9061,"./es.upv.paella.testVideoContainerButton.js":8539,"./es.upv.paella.vttManifestCaptionsPlugin.js":6761};function i(t){var e=o(t);return r(e)}function o(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}i.keys=function(){return Object.keys(n)},i.resolve=o,t.exports=i,i.id=591},6189:(t,e,r)=>{var n={"./PaellaCoreVideoFormats.js":477,"./es.upv.paella.hlsLiveVideoFormat.js":310,"./es.upv.paella.hlsVideoFormat.js":8069,"./es.upv.paella.imageVideoFormat.js":4348,"./es.upv.paella.mp4VideoFormat.js":2604};function i(t){var e=o(t);return r(e)}function o(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}i.keys=function(){return Object.keys(n)},i.resolve=o,t.exports=i,i.id=6189},4147:t=>{"use strict";t.exports=JSON.parse('{"name":"paella-core","version":"1.0.20","description":"Multistream HTML video player","main":"src/index.js","module":"dist/paella-core.js","scripts":{"build":"webpack --mode production","dev":"webpack serve --mode development --config webpack.debug.js --host 0.0.0.0","captions":"webpack serve --mode development --config webpack.captions.js"},"repository":{"type":"git","url":"git+https://github.com/polimediaupv/paella-core.git"},"keywords":["html","player","video","hls"],"author":"Fernando Serrano Carpena <ferserc1@gmail.com>","license":"SEE LICENSE IN license.txt","bugs":{"url":"https://github.com/polimediaupv/paella-core/issues"},"homepage":"https://github.com/polimediaupv/paella-core#readme","devDependencies":{"@babel/core":"^7.12.10","@babel/preset-env":"^7.12.11","babel-loader":"^8.2.2","copy-webpack-plugin":"^7.0.0","css-loader":"^5.0.1","file-loader":"^6.2.0","html-webpack-plugin":"^4.5.1","source-map-loader":"^2.0.0","style-loader":"^2.0.0","svg-inline-loader":"^0.8.2","webpack":"^5.66.0","webpack-cli":"^4.9.1","webpack-dev-server":"^4.7.3"},"dependencies":{"core-js":"^3.8.2","hls.js":"^1.0.4"}}')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{AudioTrackData:()=>Qt.Z,ButtonGroupPlugin:()=>$t.Z,ButtonPlugin:()=>I.ZP,Canvas:()=>k.Xz,CanvasPlugin:()=>k.ZP,Captions:()=>ee.Z,CaptionsPlugin:()=>At.Z,Data:()=>bt.Z,DataPlugin:()=>bt.e,DomClass:()=>b.FZ,EventLogPlugin:()=>St.ZP,Events:()=>T.ZP,HlsSupport:()=>re.HlsSupport,HlsVideo:()=>re.HlsVideo,ImageVideo:()=>ie.ImageVideo,KeyCodes:()=>Rt.mW,KeyShortcutPlugin:()=>Rt.ZP,LOG_LEVEL:()=>Ot,Log:()=>Ft,MenuButtonPlugin:()=>qt.Z,Mp4Video:()=>ne.Mp4Video,Paella:()=>Wt,PlayerResource:()=>E.Z,PlayerState:()=>Ht,PlayerStateNames:()=>Vt,Plugin:()=>y.ZP,PluginModule:()=>Jt.Z,PopUp:()=>yt.Z,PopUpButtonPlugin:()=>zt.Z,UserInterfacePlugin:()=>Yt.Z,VideoLayout:()=>A.ZP,VideoPlugin:()=>w.ZP,VideoQualityItem:()=>Xt.Z,WebVTTParser:()=>te.Z,addDictionary:()=>B.BF,bindEvent:()=>T.GT,createElement:()=>b.az,createElementWithHtmlText:()=>b.jS,defaultAddDictionaryFunction:()=>B.Xx,defaultGetLanguageFunction:()=>B.cN,defaultGetManifestFileUrlFunction:()=>p,defaultGetManifestUrlFunction:()=>h,defaultGetVideoIdFunction:()=>l,defaultHlsConfig:()=>re.defaultHlsConfig,defaultLoadConfigFunction:()=>u,defaultLoadVideoManifestFunction:()=>g,defaultSetLanguageFunction:()=>B.D$,defaultTranslateFunction:()=>B.Pb,getHlsSupport:()=>re.getHlsSupport,getLanguage:()=>B.G3,getPluginsOfType:()=>y.FN,importPlugins:()=>y.gQ,loadPluginsOfType:()=>y.FP,log:()=>Mt,parseWebVTT:()=>te.n,setLanguage:()=>B.m0,translate:()=>B.Iu,triggerEvent:()=>T.qe,utils:()=>o});var t=r(3379),e=r.n(t),i=r(7945);e()(i.Z,{insert:"head",singleton:!1}),i.Z.locals,r(5666);var o=r(1401);function a(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function s(t){a(o,n,i,s,u,"next",t)}function u(t){a(o,n,i,s,u,"throw",t)}s(void 0)}))}}function u(t,e){return c.apply(this,arguments)}function c(){return(c=s(regeneratorRuntime.mark((function t(e,r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.log.debug("Using default configuration loading function."),t.next=3,fetch(e);case 3:return n=t.sent,t.abrupt("return",n.json());case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function l(t,e){return f.apply(this,arguments)}function f(){return(f=s(regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r.log.debug("Using default getVideoId function"),t.abrupt("return",(0,o.getHashParameter)("id")||(0,o.getUrlParameter)("id"));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t,e,r,n){return d.apply(this,arguments)}function d(){return(d=s(regeneratorRuntime.mark((function t(e,r,n,i){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i.log.debug("Using default getManifestUrl function"),t.abrupt("return",(0,o.joinPath)([e,r]));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t,e,r,n){return v.apply(this,arguments)}function v(){return(v=s(regeneratorRuntime.mark((function t(e,r,n,i){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i.log.debug("Using default getManifestFileUrl function"),t.abrupt("return",(0,o.joinPath)([e,r]));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t,e,r){return m.apply(this,arguments)}function m(){return(m=s(regeneratorRuntime.mark((function t(e,r,n){var i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.log.debug("Using default loadVideoManifest function"),t.next=3,fetch(e);case 3:return i=t.sent,t.abrupt("return",i.json());case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var y=r(2650),b=r(916),A=r(3063),E=r(2624),w=r(646),k=r(7340),T=r(980);function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function x(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}(t)||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 _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function S(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function R(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){S(o,n,i,a,s,"next",t)}function s(t){S(o,n,i,a,s,"throw",t)}a(void 0)}))}}function L(t,e){return L=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},L(t,e)}function O(t,e){return!e||"object"!==C(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function P(t){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},P(t)}var D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&L(t,e)}(F,t);var e,r,n,i,o,a,s,u,c,l,f,h,d,p,v,g,m,y,b,A,E,C,_,S,D,I,B,M=(I=F,B=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=P(I);if(B){var r=P(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return O(this,t)});function F(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,F),(r=M.call(this,t,e))._videoContainer=e,r._streamData=null,r._streams=null,r._players=[],r._mainAudioPlayer=null,r._streamSyncTimer=null,r._trimming={enabled:!1,start:100,end:200},r}return e=F,r=[{key:"load",value:(D=R(regeneratorRuntime.mark((function t(e){var r,n,i,o,a=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._streamData=e,this._streams={},r=this.player.config.defaultAudioStream||"presenter",e.some((function(t){if("mainAudio"===t.role)return r=t.content,!0})),this.player.log.debug("Finding compatible video plugins"),t.next=7,(0,k.yJ)(this.player);case 7:this._streamData.forEach((function(t){var e=(0,k.in)(a.player,t);if(!e)throw Error("Canvas plugin not found: ".concat(t.canvas));var n=t.content===r,i=(0,w.ti)(a.player,t);if(!i)throw Error("Incompatible stream type: ".concat(t.content));a._streams[t.content]={stream:t,isMainAudio:n,videoPlugin:i,canvasPlugin:e}})),n=null,t.t0=regeneratorRuntime.keys(this._streams);case 10:if((t.t1=t.t0()).done){t.next=28;break}return i=t.t1.value,o=this._streams[i],t.next=15,o.canvasPlugin.getCanvasInstance(this._videoContainer);case 15:return o.canvas=t.sent,t.next=18,o.videoPlugin.getVideoInstance(o.canvas.element,o.isMainAudio);case 18:return o.player=t.sent,r===i?(this._mainAudioPlayer=o.player,o.player.setVolume(1)):o.player.setVolume(0),t.next=22,o.player.load(o.stream,this);case 22:return t.next=24,o.canvas.loadCanvas(o.player);case 24:o.player.onVideoEnded((function(){null===n&&((0,T.Ss)(a.player,T.ZP.ENDED),n=setTimeout((function(){n=null}),2e3))})),this._players.push(o.player),t.next=10;break;case 28:case"end":return t.stop()}}),t,this)}))),function(t){return D.apply(this,arguments)})},{key:"unload",value:(S=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.stopStreamSync(),t.next=3,(0,k.Ke)(this.player);case 3:case"end":return t.stop()}}),t,this)}))),function(){return S.apply(this,arguments)})},{key:"players",get:function(){return this._players}},{key:"streamData",get:function(){return this._streamData}},{key:"streams",get:function(){return this._streams}},{key:"mainAudioPlayer",get:function(){return this._mainAudioPlayer}},{key:"isTrimEnabled",get:function(){var t,e,r;return(null===(t=this._trimming)||void 0===t?void 0:t.enabled)&&(null===(e=this._trimming)||void 0===e?void 0:e.end)>(null===(r=this._trimming)||void 0===r?void 0:r.start)}},{key:"trimStart",get:function(){var t;return null===(t=this._trimming)||void 0===t?void 0:t.start}},{key:"trimEnd",get:function(){var t;return null===(t=this._trimming)||void 0===t?void 0:t.end}},{key:"setTrimming",value:(_=R(regeneratorRuntime.mark((function t(e){var r,n,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.enabled,n=e.start,i=e.end,!(n>=i)){t.next=3;break}throw Error("Error setting trimming: start time (".concat(n,") must be lower than end time ").concat(i));case 3:return this._trimming={enabled:r,start:n,end:i},t.next=6,this.currentTime();case 6:o=t.sent,(0,T.Ss)(this.player,T.ZP.TIMEUPDATE,{currentTime:r?n+o:o});case 8:case"end":return t.stop()}}),t,this)}))),function(t){return _.apply(this,arguments)})},{key:"startStreamSync",value:function(){var t=this;this._timeSync=!0;var e=function(){var r=R(regeneratorRuntime.mark((function r(){var n,i;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t._players.length){r.next=3;break}return t.player.log.warn("Player not yet loaded. Waiting for video sync."),r.abrupt("return");case 3:if(t.player.log.debug("players:"),t.player.log.debug(t._players[0]),n=t._players[0].currentTimeSync,!t.isTrimEnabled){r.next=28;break}if(i=n-t.trimStart,!(t.trimEnd<=n)){r.next=19;break}return r.next=11,t.executeAction("pause");case 11:return r.next=13,t.setCurrentTime(0);case 13:return t.stopStreamSync(),n=0,(0,T.Ss)(t.player,T.ZP.ENDED,{}),r.abrupt("return");case 19:if(!(n<t.trimStart)){r.next=24;break}return r.next=22,t.setCurrentTime(0);case 22:n=t.trimStart,i=0;case 24:(0,T.Ss)(t.player,T.ZP.TIMEUPDATE,{currentTime:i}),t._timeupdateTimer=setTimeout((function(){t._timeSync&&e()}),250),r.next=29;break;case 28:t._timeSync&&((0,T.Ss)(t.player,T.ZP.TIMEUPDATE,{currentTime:n}),t._timeupdateTimer=setTimeout((function(){e()}),250));case 29:case"end":return r.stop()}}),r)})));return function(){return r.apply(this,arguments)}}();e()}},{key:"stopStreamSync",value:function(){this._timeSync=!1,this._timeupdateTimer&&clearTimeout(this._timeupdateTimer)}},{key:"executeAction",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Array.isArray(r)||(r=[r]),new Promise((function(n){var i=[],o=[];e.players.forEach((function(e){o.push(new Promise((function(n){e[t].apply(e,x(r)).then((function(t){i.push(t),n()}))})))})),Promise.all(o).then((function(){return n(i)}))}))}},{key:"play",value:(C=R(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.startStreamSync(),t.next=3,this.executeAction("play");case 3:return e=t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(){return C.apply(this,arguments)})},{key:"pause",value:(E=R(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.stopStreamSync(),t.next=3,this.executeAction("pause");case 3:return e=t.sent,t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"stop",value:(A=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.stopStreamSync(),t.next=3,this.executeAction("pause");case 3:return t.next=5,this.executeAction("setCurrentTime",0);case 5:case"end":return t.stop()}}),t,this)}))),function(){return A.apply(this,arguments)})},{key:"paused",value:(b=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.executeAction("paused");case 2:return t.abrupt("return",t.sent[0]);case 3:case"end":return t.stop()}}),t,this)}))),function(){return b.apply(this,arguments)})},{key:"setCurrentTime",value:(y=R(regeneratorRuntime.mark((function t(e){var r,n,i,o,a,s,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.executeAction("currentTime");case 2:if(r=t.sent[0],n=null,!this.isTrimEnabled){t.next=16;break}return e=(e+=this.trimStart)>=this.trimEnd?this.trimEnd:e,t.next=9,this.executeAction("setCurrentTime",[e]);case 9:return i=t.sent[0],t.next=12,this.executeAction("currentTime");case 12:o=t.sent[0],n={result:i,prevTime:r-this.trimStart,newTime:o-this.trimStart},t.next=23;break;case 16:return t.next=18,this.executeAction("setCurrentTime",[e]);case 18:return a=t.sent[0],t.next=21,this.executeAction("currentTime");case 21:s=t.sent[0],n={result:a,prevTime:r,newTime:s};case 23:return t.next=25,this.currentTime();case 25:return u=t.sent,(0,T.Ss)(this.player,T.ZP.TIMEUPDATE,{currentTime:u}),t.abrupt("return",n);case 28:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"currentTime",value:(m=R(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.executeAction("currentTime");case 2:if(e=t.sent[0],!this.isTrimEnabled){t.next=7;break}return t.abrupt("return",e-this.trimStart);case 7:return t.abrupt("return",e);case 8:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)})},{key:"currentTimeIgnoringTrimming",value:(g=R(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.executeAction("currentTime");case 2:return e=t.sent[0],t.abrupt("return",e);case 4:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"volume",value:(v=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.mainAudioPlayer){t.next=6;break}return t.next=3,this.mainAudioPlayer.volume();case 3:return t.abrupt("return",t.sent);case 6:return t.next=8,this.executeAction("volume");case 8:return t.abrupt("return",t.sent[0]);case 9:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"setVolume",value:(p=R(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.mainAudioPlayer){t.next=6;break}return t.next=3,this.mainAudioPlayer.setVolume(e);case 3:return t.abrupt("return",t.sent);case 6:return t.next=8,this.executeAction("setVolume",[e]);case 8:return t.abrupt("return",t.sent[0]);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"duration",value:(d=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isTrimEnabled){t.next=4;break}return t.abrupt("return",this.trimEnd-this.trimStart);case 4:return t.next=6,this.executeAction("duration");case 6:return t.abrupt("return",t.sent[0]);case 7:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"durationIgnoringTrimming",value:(h=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.executeAction("duration");case 2:return t.abrupt("return",t.sent[0]);case 3:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"playbackRate",value:(f=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.executeAction("playbackRate");case 2:return t.abrupt("return",t.sent[0]);case 3:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"setPlaybackRate",value:(l=R(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.executeAction("setPlaybackRate",[e]);case 2:return t.abrupt("return",t.sent[0]);case 3:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"getQualityReferencePlayer",value:(c=R(regeneratorRuntime.mark((function t(){var e,r,n,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=null,r=null,!(Object.keys(this.streams).length>0)){t.next=13;break}t.t0=regeneratorRuntime.keys(this.streams);case 4:if((t.t1=t.t0()).done){t.next=13;break}return n=t.t1.value,i=this.streams[n],t.next=9,i.player.getQualities();case 9:o=t.sent,(!e||r&&o.length>r.length)&&(r=o,e=i.player),t.next=4;break;case 13:return t.abrupt("return",e);case 14:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"getCurrentQuality",value:(u=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getQualityReferencePlayer();case 2:return t.abrupt("return",t.sent.currentQuality);case 3:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"getQualities",value:(s=R(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getQualityReferencePlayer();case 2:return e=t.sent,t.next=5,e.getQualities();case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"setQuality",value:(a=R(regeneratorRuntime.mark((function t(e){var r,n,i,o,a,s,u,c,l,f;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getQualityReferencePlayer();case 2:return r=t.sent,t.next=5,r.getQualities();case 5:if(n=t.sent,i=n.length,o=-1,n.some((function(t,r){return e.index===t.index&&(o=r),-1!==o})),!(o>=0)){t.next=26;break}a=o/i,t.t0=regeneratorRuntime.keys(this.streams);case 12:if((t.t1=t.t0()).done){t.next=26;break}return s=t.t1.value,u=this.streams[s],t.next=17,u.player.getQualities();case 17:if(c=t.sent,this.player.log.debug(c),!(c.length>1)){t.next=24;break}return l=Math.round(c.length*a),f=c[l],t.next=24,u.player.setQuality(f);case 24:t.next=12;break;case 26:case"end":return t.stop()}}),t,this)}))),function(t){return a.apply(this,arguments)})},{key:"supportsMultiaudio",value:(o=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.mainAudioPlayer.supportsMultiaudio());case 1:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"getAudioTracks",value:(i=R(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.mainAudioPlayer.getAudioTracks());case 1:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"setCurrentAudioTrack",value:(n=R(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.mainAudioPlayer.setCurrentAudioTrack(e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"currentAudioTrack",get:function(){return this.mainAudioPlayer.currentAudioTrack}}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),F}(E.Z),I=r(1768),B=r(629),M=r(7674);e()(M.Z,{insert:"head",singleton:!1}),M.Z.locals;var F=r(2323);function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function j(t,e){return j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},j(t,e)}function U(t,e){return!e||"object"!==N(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function G(t){return G=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},G(t)}function K(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function H(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){K(o,n,i,a,s,"next",t)}function s(t){K(o,n,i,a,s,"throw",t)}a(void 0)}))}}function V(t){return Z.apply(this,arguments)}function Z(){return(Z=H(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{w:1280,h:720});case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e()(F.Z,{insert:"head",singleton:!1}),F.Z.locals;var W=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&j(t,e)}(_,t);var e,r,n,i,o,a,s,u,c,l,f,h,d,p,v,g,m,E,k,C,x=(k=_,C=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=G(k);if(C){var r=G(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return U(this,t)});function _(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,_);var n="base-video-rect",i='\n            <div class="'.concat(n,'">\n            </div>\n        ');return(r=x.call(this,t,{attributes:{class:"video-container",style:"position: relative;"},children:i,parent:e}))._baseVideoRect=r.element.getElementsByClassName(n)[0],r._baseVideoRect.addEventListener("click",H(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.paused();case 2:if(!t.sent){t.next=7;break}return t.next=5,r.play();case 5:t.next=9;break;case 7:return t.next=9,r.pause();case 9:case"end":return t.stop()}}),t)})))),r._ready=!1,r._layoutId=t.config.defaultLayout,r._players=[],r._streamProvider=new D(r.player,r.baseVideoRect),r}return e=_,r=[{key:"layoutId",get:function(){return this._layoutId}},{key:"setLayout",value:(E=H(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(-1!==this.validContentIds.indexOf(e)){t.next=4;break}return t.abrupt("return",!1);case 4:this._layoutId=e,this.updateLayout();case 6:case"end":return t.stop()}}),t,this)}))),function(t){return E.apply(this,arguments)})},{key:"validContentIds",get:function(){return this._validContentIds}},{key:"validContentSettings",get:function(){return this._validContentSettings}},{key:"validLayouts",get:function(){return(0,A.tk)(this.player,this.streamData)}},{key:"streamData",get:function(){return this._streamData}},{key:"baseVideoRect",get:function(){return this._baseVideoRect}},{key:"streamProvider",get:function(){return this._streamProvider}},{key:"load",value:(m=H(regeneratorRuntime.mark((function t(e){var r,n,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._streamData=e,this._baseVideoRect.style.display="none",t.next=4,(0,y.FP)(this.player,"layout");case 4:return t.next=6,(0,w.zE)(this.player);case 6:return t.next=8,this.streamProvider.load(e);case 8:return this._validContentIds=(0,A.Vc)(this.player,e),this._validContentSettings=(0,A.OU)(this.player,e),t.next=12,this.updateLayout();case 12:return r=(0,b.jS)('<div class="button-plugins left-side"></div>',this.element),n=(0,b.jS)('<div class="button-plugins right-side"></div>',this.element),this._buttonPlugins=[r,n],this.player.log.debug("Loading videoContainer button plugins"),t.next=18,(0,y.FP)(this.player,"button",function(){var t=H(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i.player.log.debug(" Button plugin: ".concat(e.name)),"left"!==e.side){t.next=6;break}return t.next=4,(0,I.k1)(e,r);case 4:t.next=9;break;case 6:if("right"!==e.side){t.next=9;break}return t.next=9,(0,I.k1)(e,n);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var t=H(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("videoContainer"!==e.parentContainer){t.next=6;break}return t.next=3,e.isEnabled();case 3:return t.abrupt("return",t.sent);case 6:return t.abrupt("return",!1);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 18:this._baseVideoRect.style.display="",this._ready=!0;case 20:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"unload",value:(g=H(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.removeFromParent(),t.next=3,(0,y.Dd)(this.player,"layout");case 3:return t.next=5,(0,w.m7)(this.player);case 5:return t.next=7,this.streamProvider.unload();case 7:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"updateLayout",value:(v=H(regeneratorRuntime.mark((function t(){var e,r,n,i,o,a,s,u,c,l,f,h,d,p=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(o in n=!0,this._layoutButtons=[],this._layoutId&&-1!==this._validContentIds.indexOf(this._layoutId)||(this._layoutId=this._validContentIds[0],n=!1),i=(0,A.yl)(this.player,this.streamProvider.streamData,this._layoutId),this.streamProvider.streams)this.streamProvider.streams[o].canvas.element.style.display="none";return t.next=7,V(this.player);case 7:return a=t.sent,s=this.player.containerSize,u=100/a.w,c=100/a.h,l=s.w/s.h,f=a.w/a.h,h=l>f?{w:s.h*f,h:s.h}:{w:s.w,h:s.w/f},this.baseVideoRect.style.width=h.w+"px",this.baseVideoRect.style.height=h.h+"px",null==i||null===(e=i.videos)||void 0===e||e.forEach(function(){var t=H(regeneratorRuntime.mark((function t(e){var r,n,i,o,a,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=p.streamProvider.streams[e.content]).stream,n=r.player,i=r.canvas,t.next=4,n.getDimensions();case 4:o=t.sent,a=o.w/o.h,s=Number.MAX_VALUE,l=null,e.rect.forEach((function(t){var e=/^(\d+.?\d*)\/(\d+.?\d*)$/.exec(t.aspectRatio),r=e?Number(e[1])/Number(e[2]):1,n=Math.abs(a-r);n<s&&(l=t,s=n)})),i.element.style.display="block",i.element.style.position="absolute",i.element.style.left="".concat(l.left*u,"%"),i.element.style.top="".concat(l.top*c,"%"),i.element.style.width="".concat(l.width*u,"%"),i.element.style.height="".concat(l.height*c,"%"),i.element.style.zIndex=e.layer;case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),d=this.baseVideoRect.getElementsByClassName("video-layout-button"),Array.from(d).forEach((function(t){return p.baseVideoRect.removeChild(t)})),null==i||null===(r=i.buttons)||void 0===r||r.forEach((function(t){var e=(0,b.az)({tag:"button",attributes:{class:"video-layout-button","aria-label":(0,B.Iu)(t.ariaLabel),title:(0,B.Iu)(t.title),style:"\n                        left: ".concat(t.rect.left*u,"%;\n                        top: ").concat(t.rect.top*c,"%;\n                        width: ").concat(t.rect.width*u,"%;\n                        height: ").concat(t.rect.height*c,"%;\n                        z-index: ").concat(t.layer,";\n                    ")},parent:p.baseVideoRect,children:t.icon});e.layout=i,e.buttonAction=t.onClick,e.addEventListener("click",(function(t){(0,T.qe)(p.player,T.ZP.BUTTON_PRESS,{plugin:i.plugin,layoutStructure:i}),t.target.buttonAction.apply(t.target.layout),t.stopPropagation()})),p._layoutButtons.push(e)})),(0,T.qe)(this.player,T.ZP.LAYOUT_CHANGED),t.abrupt("return",n);case 22:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"hideUserInterface",value:function(){if(this._layoutButtons&&this._buttonPlugins){this.player.log.debug("Hide video container user interface");var t=function(t){t._prevDisplay=t.style.display,t.style.display="none"};this._layoutButtons.forEach(t),this._buttonPlugins.forEach(t)}}},{key:"showUserInterface",value:function(){if(this._layoutButtons&&this._buttonPlugins){var t=function(t){return t.style.display=t._prevDisplay||"block"};this._layoutButtons.forEach(t),this._buttonPlugins.forEach(t)}}},{key:"ready",get:function(){return this._ready}},{key:"play",value:(p=H(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.streamProvider.play();case 2:return e=t.sent,(0,T.qe)(this.player,T.ZP.PLAY),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(){return p.apply(this,arguments)})},{key:"pause",value:(d=H(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.streamProvider.pause();case 2:return e=t.sent,(0,T.qe)(this.player,T.ZP.PAUSE),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"stop",value:(h=H(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.streamProvider.stop(),(0,T.qe)(this.player,T.ZP.STOP);case 2:case"end":return t.stop()}}),t,this)}))),function(){return h.apply(this,arguments)})},{key:"paused",value:(f=H(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.streamProvider.paused());case 1:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"setCurrentTime",value:(l=H(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.streamProvider.setCurrentTime(e);case 2:return r=t.sent,(0,T.qe)(this.player,T.ZP.SEEK,{prevTime:r.prevTime,newTime:r.newTime}),t.abrupt("return",r.result);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"currentTime",value:(c=H(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.streamProvider.currentTime());case 1:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"volume",value:(u=H(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.streamProvider.volume());case 1:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"setVolume",value:(s=H(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.streamProvider.setVolume(e);case 2:return r=t.sent,(0,T.qe)(this.player,T.ZP.VOLUME_CHANGED,{volume:e}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"duration",value:(a=H(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.streamProvider.duration();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"playbackRate",value:(o=H(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.streamProvider.playbackRate();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"setPlaybackRate",value:(i=H(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.streamProvider.setPlaybackRate(e);case 2:return r=t.sent,(0,T.qe)(this.player,T.ZP.PLAYBACK_RATE_CHANGED,{newPlaybackRate:e}),t.abrupt("return",r);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"isTrimEnabled",get:function(){return this.streamProvider.isTrimEnabled}},{key:"trimStart",get:function(){return this.streamProvider.trimStart}},{key:"trimEnd",get:function(){return this.streamProvider.trimEnd}},{key:"setTrimming",value:(n=H(regeneratorRuntime.mark((function t(e){var r,n,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.enabled,n=e.start,i=e.end,t.next=3,this.streamProvider.setTrimming({enabled:r,start:n,end:i});case 3:return o=t.sent,(0,T.qe)(this.player,T.ZP.TRIMMING_CHANGED,{enabled:r,start:n,end:i}),t.abrupt("return",o);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"getVideoRect",value:function(){var t,e,r,n,i,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=this.baseVideoRect;return"string"==typeof o&&(a=null===(i=this.streamProvider.streams[o])||void 0===i?void 0:i.canvas.element),{x:null===(t=a)||void 0===t?void 0:t.offsetLeft,y:null===(e=a)||void 0===e?void 0:e.offsetTop,width:null===(r=a)||void 0===r?void 0:r.offsetWidth,height:null===(n=a)||void 0===n?void 0:n.offsetHeight,element:a}}},{key:"appendChild",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e){var n=this.getVideoRect(),i=n.width,o=n.height;e.x=100*e.x/i,e.width=100*e.width/i,e.y=100*e.y/o,e.height=100*e.height/o,t.style.position="absolute",t.style.left="".concat(e.x,"%"),t.style.top="".concat(e.y,"%"),t.style.width="".concat(e.width,"%"),t.style.height="".concat(e.height,"%"),null!==r&&(t.style.zIndex=r)}return this.baseVideoRect.appendChild(t),t}},{key:"removeChild",value:function(t){this.baseVideoRect.removeChild(t)}}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),_}(b.FZ),Y=r(6304),z=r.n(Y);function q(t){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q(t)}function X(t,e){return X=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},X(t,e)}function Q(t,e){return!e||"object"!==q(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function $(t){return $=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$(t)}var J=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&X(t,e)}(o,t);var e,r,n,i=(r=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=$(r);if(n){var i=$(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return Q(this,t)});function o(t,e,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,{attributes:{class:"preview-container",style:"\n    background-color: #e4e4e4;\n    width: 100%;\n    height: 100%;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    cursor: pointer;\n"},parent:e}))._img=(0,b.jS)('\n        <div>\n            <img style="'.concat("\n    width: 100%;\n",'" src="').concat(r,'" alt=""/>\n            <div style="').concat("\n    position: absolute; \n    top: 0px; \n    left: 0px; \n    right: 0px; \n    bottom: 0px; \n    display: flex;\n    align-content: center;\n    justify-content: center;\n    align-items: center;\n",'">\n                <i class="preview-play-icon" style="').concat("\n    pointer-events: none;\n    width: 20%;\n    max-width: 400px;\n    min-width: 100px;\n    opacity: 0.6;\n",'">').concat(z(),"</i>\n            </div>\n        </div>\n        "),n.element),n.element.addEventListener("click",(function(e){t.play()})),n}return(e=[{key:"loadBackgroundImage",value:function(t){this._img.setAttribute("src",t)}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(o.prototype,e),o}(b.FZ);function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}function et(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function rt(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){et(o,n,i,a,s,"next",t)}function s(t){et(o,n,i,a,s,"throw",t)}a(void 0)}))}}function nt(t,e){return nt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},nt(t,e)}function it(t,e){return!e||"object"!==tt(e)&&"function"!=typeof e?ot(t):e}function ot(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function at(t){return at=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},at(t)}function st(t,e){var r=function(t,e){if(!t||0===t.length)return null;var r=t[0],n=r.time;return t.forEach((function(t){t.time>n&&t.time<Math.floor(e)&&(n=(r=t).time)})),r}(this.frameList,e);if(r){this._frameThumbnail.style.display="block";var n=this._frameThumbnail.getBoundingClientRect().width,i=this.playbackBar.getBoundingClientRect(),a=(i.top,i.left,i.bottom,i.width),s=i.height,u=a/2;this.frameThumbnail.style.bottom="".concat(s,"px"),this.frameThumbnail.style.left="".concat(u>t?t:t-n,"px");var c=(0,o.resolveResourcePath)(this.player,r.url),l=this.frameThumbnail.getElementsByClassName("thumbnail-image")[0],f=this.frameThumbnail.getElementsByClassName("thumbnail-time")[0];c!==this._prevFrameImage&&(l.src=c,l.alt=r.id,this._prevFrameImage=c),f.innerHTML=(0,o.secondsToTime)(e)}}var ut=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&nt(t,e)}(a,t);var e,r,n,i=(r=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=at(r);if(n){var i=at(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return it(this,t)});function a(t,e){var r,n,s;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(s=i.call(this,t,{attributes:{class:"progress-indicator"},children:'\n\t\t<canvas class="progress-canvas canvas-layer-0"></canvas>\n\t\t<div class="progress-indicator-container">\n\t\t\t<div class="progress-indicator-content"></div>\n\t\t</div>\n\t\t<canvas class="progress-canvas canvas-layer-1"></canvas>\n\t\t<div class="progress-indicator-timer">00:00</div>\n\t\t',parent:e}))._frameThumbnail=(0,b.jS)('\n\t\t\t<div class="frame-thumbnail">\n\t\t\t\t<img src="" alt="" class="thumbnail-image" />\n\t\t\t\t<p class="thumbnail-time">00:00</p>\n\t\t\t</div>',t.containerElement),s._frameThumbnail.style.display="none",s._frameThumbnail.style.position="absolute",s._canvas=[s.element.getElementsByClassName("progress-canvas")[0],s.element.getElementsByClassName("progress-canvas")[1]],s._progressContainer=s.element.getElementsByClassName("progress-indicator-container")[0],s._progressIndicator=s.element.getElementsByClassName("progress-indicator-content")[0],s._progressTimer=s.element.getElementsByClassName("progress-indicator-timer")[0],s._frameList=null===(r=t.videoManifest)||void 0===r?void 0:r.frameList,null===(n=s._frameList)||void 0===n||n.sort((function(t,e){return t.time-e.time})),s.onResize();var u=!1,c=function(){var e=rt(regeneratorRuntime.mark((function e(r){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.videoContainer.duration();case 2:n=e.sent,i=100*r/n,s.progressIndicator.style.width="".concat(i,"%");case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),l=function(){var e=rt(regeneratorRuntime.mark((function e(r){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.element.offsetWidth,e.next=3,t.videoContainer.duration();case 3:return i=e.sent,e.abrupt("return",r*i/n);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,T.GT)(s.player,T.ZP.TIMEUPDATE,function(){var t=rt(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.currentTime,u){t.next=6;break}return t.next=4,c(r);case 4:n=(0,o.secondsToTime)(r),s.progressTimer.innerHTML=n;case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,T.GT)(s.player,T.ZP.SEEK,function(){var t=rt(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.prevTime,r=e.newTime,u){t.next=6;break}return t.next=4,c(r);case 4:n=(0,o.secondsToTime)(r),s.progressTimer.innerHTML=n;case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),(0,T.GT)(s.player,T.ZP.STOP,rt(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c(0);case 2:e=(0,o.secondsToTime)(0),s.progressTimer.innerHTML=e;case 4:case"end":return t.stop()}}),t)})))),s.progressContainer.addEventListener("mousedown",function(){var t=rt(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=!0,t.next=3,l(e.offsetX);case 3:return r=t.sent,t.next=6,c(r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),s.progressContainer._progressIndicator=ot(s),s.progressContainer.addEventListener("mousemove",function(){var t=rt(regeneratorRuntime.mark((function t(e){var r,n,i,o,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=s.player.videoContainer,n=r.isTrimEnabled,i=r.trimStart,o=n?i:0,t.next=4,l(e.offsetX);case 4:if(a=t.sent,!u){t.next=8;break}return t.next=8,c(a);case 8:st.apply(ot(s),[e.offsetX,a+o]);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),s.progressContainer.addEventListener("mouseup",function(){var e=rt(regeneratorRuntime.mark((function e(r){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l(r.offsetX);case 2:return n=e.sent,e.next=5,c(n);case 5:return e.next=7,t.videoContainer.setCurrentTime(n);case 7:i=(0,o.secondsToTime)(n),s.progressTimer.innerHTML=i,u=!1;case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),s.progressContainer.addEventListener("mouseleave",function(){var e=rt(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!u){e.next=7;break}return e.next=3,l(r.offsetX);case 3:return n=e.sent,e.next=6,t.videoContainer.setCurrentTime(n);case 6:u=!1;case 7:s.frameThumbnail.style.display="none";case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),s}return(e=[{key:"playbackBar",get:function(){return this.element.parentElement}},{key:"canvasLayer0",get:function(){return this._canvas[0]}},{key:"canvasLayer1",get:function(){return this._canvas[1]}},{key:"progressIndicator",get:function(){return this._progressIndicator}},{key:"progressTimer",get:function(){return this._progressTimer}},{key:"progressContainer",get:function(){return this._progressContainer}},{key:"frameThumbnail",get:function(){return this._frameThumbnail}},{key:"frameList",get:function(){return this._frameList}},{key:"onResize",value:function(){var t={w:this.element.offsetWidth,h:this.element.offsetHeight};this._canvas.forEach((function(e){e.width=t.w,e.height=t.h}))}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(a.prototype,e),a}(b.FZ),ct=r(9167);function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function ft(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function ht(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){ft(o,n,i,a,s,"next",t)}function s(t){ft(o,n,i,a,s,"throw",t)}a(void 0)}))}}function dt(t,e){return dt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},dt(t,e)}function pt(t,e){return!e||"object"!==lt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function vt(t){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vt(t)}e()(ct.Z,{insert:"head",singleton:!1}),ct.Z.locals;var gt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&dt(t,e)}(u,t);var e,r,n,i,o,a,s=(o=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=vt(o);if(a){var r=vt(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return pt(this,t)});function u(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(r=s.call(this,t,{attributes:{class:"playback-bar"},parent:e}))._progressIndicator=new ut(t,r.element),r._buttonPluginsLeft=(0,b.jS)('<div class="button-plugins left-side"></div>',r.element),r._buttonPluginsRight=(0,b.jS)('<div class="button-plugins right-side"></div>',r.element),r}return e=u,r=[{key:"load",value:(i=ht(regeneratorRuntime.mark((function t(){var e=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._frameList=this.player.videoManifest,this.player.log.debug("Loading button plugins"),t.next=4,(0,y.FP)(this.player,"button",function(){var t=ht(regeneratorRuntime.mark((function t(r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.player.log.debug(" Button plugin: ".concat(r.name)),"left"!==r.side){t.next=6;break}return t.next=4,(0,I.k1)(r,e.buttonPluginsLeft);case 4:t.next=9;break;case 6:if("right"!==r.side){t.next=9;break}return t.next=9,(0,I.k1)(r,e.buttonPluginsRight);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var t=ht(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("playbackBar"!==e.parentContainer){t.next=6;break}return t.next=3,e.isEnabled();case 3:return t.abrupt("return",t.sent);case 6:return t.abrupt("return",!1);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 4:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"unload",value:(n=ht(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.removeFromParent(),t.next=3,(0,y.Dd)(this.player,"button");case 3:this._buttonPluginsLeft.innerHTML="",this._buttonPluginsRight.innerHTML="";case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"hideUserInterface",value:function(){this.player.log.debug("Hide playback bar user interface"),this.hide()}},{key:"showUserInterface",value:function(){this.show()}},{key:"buttonPluginsRight",get:function(){return this._buttonPluginsRight}},{key:"buttonPluginsLeft",get:function(){return this._buttonPluginsLeft}},{key:"progressIndicator",get:function(){return this._progressIndicator}},{key:"onResize",value:function(){this.progressIndicator.onResize()}}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),u}(b.FZ),mt=r(230),yt=r(6911),bt=r(1285),At=r(8704),Et=r(7046);function wt(t){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(t)}function kt(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Tt(t,e){return Tt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Tt(t,e)}function Ct(t,e){return!e||"object"!==wt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function xt(t){return xt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},xt(t)}e()(Et.Z,{insert:"head",singleton:!1}),Et.Z.locals;var _t=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Tt(t,e)}(u,t);var e,r,n,i,o,a,s=(o=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=xt(o);if(a){var r=xt(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Ct(this,t)});function u(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(r=s.call(this,t,{tag:"div",attributes:{class:"captions-canvas"},parent:e}))._captionsContainer=(0,b.jS)('\n            <div class="captions-container"></div>',r.element),r._captions=[],r.hide(),r._currentCaptions=null;var n=function(t){var e=t.currentTime||t.newTime||0;if(r._currentCaptions){var n=r._currentCaptions.getCue(e);r._captionsContainer.innerHTML="",n&&n.captions.forEach((function(t){r._captionsContainer.innerHTML+=t,r._captionsContainer.innerHTML+="<br/>"})),r._captionsContainer.style.display=n?null:"none"}};return(0,T.GT)(r.player,T.ZP.TIMEUPDATE,n),(0,T.GT)(r.player,T.ZP.SEEK,n),r}return e=u,r=[{key:"load",value:(n=regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,At.N)(this.player);case 2:case"end":return t.stop()}}),t,this)})),i=function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function a(t){kt(o,r,i,a,s,"next",t)}function s(t){kt(o,r,i,a,s,"throw",t)}a(void 0)}))},function(){return i.apply(this,arguments)})},{key:"unload",value:function(){}},{key:"addCaptions",value:function(t){this._captions.push(t),(0,T.qe)(this.player,T.ZP.CAPTIONS_CHANGED,{captions:this._captions})}},{key:"captions",get:function(){return this._captions}},{key:"getCaptions",value:function(t){var e=t.label,r=t.index,n=t.lang;if(void 0===e&&void 0===r&&void 0===n)throw Error("Could not find captions: you must specify the label, the index or the language");return void 0!==r?this._captions[r]:this._captions.find((function(t){return void 0!==e?t.label===e:void 0!==n?t.language===n:void 0}))}},{key:"enableCaptions",value:function(t){this._currentCaptions=this.getCaptions(t),this.show()}},{key:"disableCaptions",value:function(){this._currentCaptions=null,this.hide()}}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),u}(b.FZ),St=r(8984),Rt=r(9267);function Lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ot={DISABLED:0,ERROR:1,WARN:2,INFO:3,DEBUG:4,VERBOSE:5},Pt=Ot.INFO,Dt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r="string"==typeof t?Ot[t]:t;if(r<Ot.DISABLED||r>Ot.VERBOSE)throw Error("setLogLevel: invalid log level ".concat(r));e?(e.__logSettings=e.__logSettings||{},e.__logSettings.logLevel=r):Pt=r},It=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t?t.__logSettings.logLevel:Pt},Bt=function(t){var e=t.msg,r=t.level,n=void 0===r?Ot.INFO:r,i=t.player,o=void 0===i?null:i,a=t.context,s=void 0===a?"paella-core":a;o&&!o.__logSettings&&Dt(o,Ot.INFO);var u=It(o);if(n<Ot.DISABLED)throw Error("printMessage: invalid log level ".concat(n));if(n<=u)switch(n){case Ot.ERROR:console.error("".concat(s," - Error: ").concat(e));break;case Ot.WARN:console.warn("".concat(s,"  - Warning: ").concat(e));break;case Ot.INFO:console.log("".concat(s," - Info: ").concat(e));break;case Ot.DEBUG:console.log("".concat(s," - Debug: ").concat(e));break;case Ot.VERBOSE:console.log("".concat(s," - Verbose: ").concat(e))}},Mt={setLevel:function(t){Dt(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)},currentLevel:function(){return It(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)},error:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"paella-core";Bt({msg:t,level:Ot.ERROR,player:e,context:r})},warn:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"paella-core";Bt({msg:t,level:Ot.WARN,player:e,context:r})},info:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"paella-core";Bt({msg:t,level:Ot.INFO,player:e,context:r})},debug:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"paella-core";Bt({msg:t,level:Ot.DEBUG,player:e,context:r})},verbose:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"paella-core";Bt({msg:t,level:Ot.VERBOSE,player:e,context:r})}},Ft=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"paella-core";Lt(this,t),this._player=e,this._context=r}var e;return e=[{key:"context",get:function(){return this._context}},{key:"player",get:function(){return this._player}},{key:"setLevel",value:function(t){Mt.setLevel(t,this._player)}},{key:"currentLevel",value:function(){Mt.currentLevel(this._player)}},{key:"error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Mt.error(t,this._player,e||this._context)}},{key:"warn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Mt.warn(t,this._player,e||this._context)}},{key:"info",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Mt.info(t,this._player,e||this._context)}},{key:"debug",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Mt.debug(t,this._player,e||this._context)}},{key:"verbose",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Mt.verbose(t,this._player,e||this._context)}}],e&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}();const Nt={es:{}};var jt=r(4147);function Ut(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function Gt(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){Ut(o,n,i,a,s,"next",t)}function s(t){Ut(o,n,i,a,s,"throw",t)}a(void 0)}))}}function Kt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ht={UNLOADED:0,MANIFEST:1,LOADED:2},Vt=["UNLOADED","MANIFEST","LOADED"];function Zt(){var t,e,r=(0,o.resolveResourcePath)(this,null===(t=this.videoManifest)||void 0===t||null===(e=t.metadata)||void 0===e?void 0:e.preview);this._previewContainer=new J(this,this._containerElement,r)}var Wt=function(){function t(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kt(this,t),this._log=new Ft(this),this._packageData=jt,this._log.setLevel(Ot.VERBOSE),window.__paella_instances__=window.__paella_instances__||[],window.__paella_instances__.push(this),this.log.debug("New paella player instance"),"string"==typeof e&&(e=document.getElementById(e)),e.classList.add("player-container"),this._containerElement=e,this._initParams=n,this._initParams.manifestFileName=this._initParams.manifestFileName||"data.json",this._initParams.loadConfig=this._initParams.loadConfig||u,this._initParams.getVideoId=this._initParams.getVideoId||l,this._initParams.getManifestUrl=this._initParams.getManifestUrl||h,this._initParams.getManifestFileUrl=this._initParams.getManifestFileUrl||p,this._initParams.loadVideoManifest=this._initParams.loadVideoManifest||g,this._initParams.customPluginContext=this._initParams.customPluginContext||[],this._initParams.translateFunction=this._initParams.translateFunction||B.Pb,this._initParams.getLanguageFunction=this._initParams.getLanguageFunction||B.cN,this._initParams.setLanguageFunction=this._initParams.setLanguageFunction||B.D$,this._initParams.addDictionaryFunction=this._initParams.addDictionaryFunction||B.Xx,this._initParams.loadDictionaries=this._initParams.loadDictionaries||function(){var t=Gt(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(0,B.BF)("en",{Hello:"Hello",World:"World"}),(0,B.BF)("es",{Hello:"Hola",World:"Mundo"}),(0,B.m0)(navigator.language.substring(0,2));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),(0,B.Gj)(this._initParams.translateFunction),(0,B.n1)(this._initParams.setLanguageFunction),(0,B.Ji)(this._initParams.getLanguageFunction),(0,B.fe)(this._initParams.addDictionaryFunction),this._config=null,this._videoId=null,this._manifestUrl=null,this._manifestFileUrl=null,this._manifestData=null,this._videoManifest=null,this._playerLoaded=!1;var i=function(){r.resize()};window.addEventListener("resize",i),this.containerElement.addEventListener("fullscreenchange",(function(){(0,T.qe)(r,T.ZP.FULLSCREEN_CHANGED,{status:r.isFullscreen})})),this._playerState=Ht.UNLOADED}var e,r,n,i,a,s,c,f,d,v,m,b,A,E,w,k,C,x,_;return e=t,r=[{key:"version",get:function(){return this._packageData.version}},{key:"pluginModules",get:function(){return this.__pluginModules}},{key:"log",get:function(){return this._log}},{key:"ready",get:function(){return this._playerState===Ht.LOADED}},{key:"state",get:function(){return this._playerState}},{key:"Events",get:function(){return T.ZP}},{key:"translate",value:function(t){return(0,B.Iu)(t)}},{key:"setLanguage",value:function(t){(0,B.m0)(t)}},{key:"getLanguage",value:function(){return(0,B.G3)()}},{key:"addDictionary",value:function(t,e){(0,B.BF)(t,e)}},{key:"bindEvent",value:function(t,e){(0,T.GT)(this,t,(function(t){return e(t)}))}},{key:"hideUiTime",get:function(){return this._hideUiTime},set:function(t){this._hideUiTime=t}},{key:"containerSize",get:function(){return{w:this._containerElement.offsetWidth,h:this._containerElement.offsetHeight}}},{key:"containerElement",get:function(){return this._containerElement}},{key:"initParams",get:function(){return this._initParams}},{key:"configLoaded",get:function(){return null!==this.configUrl}},{key:"videoManifestLoaded",get:function(){return null!==this.videoManifest}},{key:"videoLoaded",get:function(){var t;return(null===(t=this.videoContainer)||void 0===t?void 0:t.ready)||!1}},{key:"playerLoaded",get:function(){return this._playerLoaded}},{key:"configResourcesUrl",get:function(){var t;return(null===(t=this._initParams)||void 0===t?void 0:t.configResourcesUrl)||"config/"}},{key:"configUrl",get:function(){var t;return(null===(t=this._initParams)||void 0===t?void 0:t.configUrl)||"config/config.json"}},{key:"config",get:function(){return this._config}},{key:"videoId",get:function(){return this._videoId}},{key:"repositoryUrl",get:function(){var t,e;return(null===(t=this._initParams)||void 0===t?void 0:t.repositoryUrl)||(null===(e=this.config)||void 0===e?void 0:e.repositoryUrl)||""}},{key:"manifestUrl",get:function(){return this._manifestUrl}},{key:"manifestFileName",get:function(){var t,e;return(null===(t=this.config)||void 0===t?void 0:t.manifestFileName)||(null===(e=this._initParams)||void 0===e?void 0:e.manifestFileName)||""}},{key:"manifestFileUrl",get:function(){return this._manifestFileUrl}},{key:"videoManifest",get:function(){return this._videoManifest}},{key:"previewContainer",get:function(){return this._previewContainer}},{key:"videoContainer",get:function(){return this._videoContainer}},{key:"playbackBar",get:function(){return this._playbackBar}},{key:"captionsCanvas",get:function(){return this._captionsCanvas}},{key:"data",get:function(){return this._data}},{key:"loadManifest",value:(_=Gt(regeneratorRuntime.mark((function t(){var e,r,n,i,o,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._playerState===Ht.UNLOADED){t.next=2;break}throw new Error("loadManifest(): Invalid current player state: ".concat(Vt[this._playerState]));case 2:if(!this._manifestLoaded){t.next=4;break}return t.abrupt("return");case 4:return this._manifestLoaded=!0,this.log.debug("Loading paella player"),t.next=8,this.initParams.loadConfig(this.configUrl,this);case 8:return this._config=t.sent,n=new URLSearchParams(window.location.search),i=n.get("logLevel"),o=-1!==Array.from(Object.keys(Ot)).indexOf(i)?i:this._config.logLevel||"INFO",this._log.setLevel(o),t.next=15,this._initParams.loadDictionaries(this);case 15:return(0,y.zb)(this),t.next=18,(0,St.$_)(this);case 18:return t.next=20,(0,Rt.L)(this);case 20:return t.next=22,this.initParams.getVideoId(this._config,this);case 22:return this._videoId=t.sent,t.next=25,this.initParams.getManifestUrl(this.repositoryUrl,this.videoId,this._config,this);case 25:return this._manifestUrl=t.sent,t.next=28,this.initParams.getManifestFileUrl(this._manifestUrl,this.manifestFileName,this._config,this);case 28:return this._manifestFileUrl=t.sent,this.log.debug("Loading video with identifier '".concat(this.videoId,"' from URL '").concat(this.manifestFileUrl,"'")),t.next=32,this.initParams.loadVideoManifest(this.manifestFileUrl,this._config,this);case 32:for(a in this._videoManifest=t.sent,this.log.debug("Video manifest loaded:"),this.log.debug(this.videoManifest),this._data=new bt.Z(this),Nt)s=Nt[a],(0,B.BF)(a,s);if(this._playerState=Ht.MANIFEST,(0,T.qe)(this,T.ZP.MANIFEST_LOADED),null!==(e=this.videoManifest)&&void 0!==e&&null!==(r=e.metadata)&&void 0!==r&&r.preview){t.next=44;break}return t.next=42,this.loadPlayer();case 42:t.next=45;break;case 44:Zt.apply(this);case 45:case"end":return t.stop()}}),t,this)}))),function(){return _.apply(this,arguments)})},{key:"loadPlayer",value:(x=Gt(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._captionsCanvas=new _t(this,this._containerElement),this._playerState===Ht.MANIFEST){t.next=3;break}throw new Error("loadPlayer(): Invalid current player state: ".concat(Vt[this._playerState]));case 3:return this._videoContainer=new W(this,this._containerElement),t.next=6,this.videoContainer.load(null===(e=this.videoManifest)||void 0===e?void 0:e.streams);case 6:return(0,T.qe)(this,T.ZP.STREAM_LOADED),this._playbackBar=new gt(this,this.containerElement),null===(r=this._previewContainer)||void 0===r||r.removeFromParent(),t.next=11,this._playbackBar.load();case 11:this._hideUiTime=5e3,(0,o.setupAutoHideUiTimer)(this),this._captionsCanvas.load(),(0,T.qe)(this,T.ZP.PLAYER_LOADED),this._playerState=Ht.LOADED;case 16:case"end":return t.stop()}}),t,this)}))),function(){return x.apply(this,arguments)})},{key:"load",value:(C=Gt(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=this.state,t.next=t.t0===Ht.UNLOADED?3:t.t0===Ht.MANIFEST?8:t.t0===Ht.LOADED?11:12;break;case 3:return t.next=5,this.loadManifest();case 5:return t.next=7,this.loadPlayer();case 7:case 10:case 11:return t.abrupt("break",12);case 8:return t.next=10,this.loadPlayer();case 12:case"end":return t.stop()}}),t,this)}))),function(){return C.apply(this,arguments)})},{key:"unload",value:(k=Gt(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=this.state,t.next=t.t0===Ht.UNLOADED?3:t.t0===Ht.MANIFEST?4:t.t0===Ht.LOADED?7:12;break;case 3:case 6:case 11:return t.abrupt("break",12);case 4:return t.next=6,this.unloadManifest();case 7:return t.next=9,this.unloadPlayer();case 9:return t.next=11,this.unloadManifest();case 12:case"end":return t.stop()}}),t,this)}))),function(){return k.apply(this,arguments)})},{key:"unloadManifest",value:(w=Gt(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._playerState===Ht.MANIFEST){t.next=2;break}throw new Error("unloadManifest(): Invalid current player state: ".concat(Vt[this._playerState]));case 2:return this._playerState=Ht.UNLOADED,this.log.debug("Unloading paella player"),t.next=6,(0,St.v$)(this);case 6:return t.next=8,(0,Rt.CZ)(this);case 8:return t.next=10,(0,y.W)(this);case 10:this._manifestLoaded=!1,null===(e=this._previewContainer)||void 0===e||e.removeFromParent();case 12:case"end":return t.stop()}}),t,this)}))),function(){return w.apply(this,arguments)})},{key:"unloadPlayer",value:(E=Gt(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._playerState===Ht.LOADED){t.next=2;break}throw new Error("unloadManifest(): Invalid current player state: ".concat(Vt[this._playerState]));case 2:return this._playerState=Ht.MANIFEST,t.next=5,this._videoContainer.unload();case 5:return this._videoContainer=null,t.next=8,this._playbackBar.unload();case 8:this._playbackBar=null,this._captionsCanvas.unload(),this._captionsCanvas=null,(0,o.clearAutoHideTimer)(this),(0,T.qe)(this,T.ZP.PLAYER_UNLOADED),yt.Z.Unload(),mt.Z.Unload(this),null!==(e=this.videoManifest)&&void 0!==e&&null!==(r=e.metadata)&&void 0!==r&&r.preview&&Zt.apply(this),(0,T.Ii)(this);case 17:case"end":return t.stop()}}),t,this)}))),function(){return E.apply(this,arguments)})},{key:"reload",value:(A=Gt(regeneratorRuntime.mark((function t(){var e,r=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=r.length>0&&void 0!==r[0]?r[0]:null,t.t0=this.state,t.next=t.t0===Ht.UNLOADED?4:t.t0===Ht.MANIFEST?5:t.t0===Ht.LOADED?8:11;break;case 4:case 7:case 10:return t.abrupt("break",11);case 5:return t.next=7,this.unloadManifest();case 8:return t.next=10,this.unload();case 11:if("function"!=typeof e){t.next=14;break}return t.next=14,e();case 14:return t.next=16,this.load();case 16:case"end":return t.stop()}}),t,this)}))),function(){return A.apply(this,arguments)})},{key:"resize",value:(b=Gt(regeneratorRuntime.mark((function t(){var e,r,n,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:null===(e=this.videoContainer)||void 0===e||e.updateLayout(),null===(r=this.playbackBar)||void 0===r||r.onResize(),this.videoContainer&&(n=function(){return{w:i.videoContainer.element.offsetWidth,h:i.videoContainer.element.offsetHeight}},(0,T.qe)(this,T.ZP.RESIZE,{size:n()}),this._resizeEndTimer&&clearTimeout(this._resizeEndTimer),this._resizeEndTimer=setTimeout((function(){(0,T.qe)(i,T.ZP.RESIZE_END,{size:n()})}),1e3));case 3:case"end":return t.stop()}}),t,this)}))),function(){return b.apply(this,arguments)})},{key:"hideUserInterface",value:(m=Gt(regeneratorRuntime.mark((function t(){var e,r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(e=this.videoContainer)||void 0===e?void 0:e.paused();case 2:if(t.sent){t.next=6;break}null===(r=this.videoContainer)||void 0===r||r.hideUserInterface(),null===(n=this.playbackBar)||void 0===n||n.hideUserInterface(),mt.Z.HideUserInterface(this);case 6:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)})},{key:"showUserInterface",value:(v=Gt(regeneratorRuntime.mark((function t(){var e,r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:null===(e=this.videoContainer)||void 0===e||e.showUserInterface(),null===(r=this.playbackBar)||void 0===r||r.showUserInterface(),mt.Z.ShowUserInterface(this);case 3:case"end":return t.stop()}}),t,this)}))),function(){return v.apply(this,arguments)})},{key:"play",value:(d=Gt(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.videoContainer){t.next=3;break}return t.next=3,this.loadPlayer();case 3:return t.next=5,this.videoContainer.play();case 5:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"pause",value:(f=Gt(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(e=this.videoContainer)||void 0===e?void 0:e.pause();case 2:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"paused",value:(c=Gt(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.videoContainer){t.next=4;break}return t.abrupt("return",!0);case 4:return t.abrupt("return",this.videoContainer.paused());case 5:case"end":return t.stop()}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"stop",value:(s=Gt(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,null===(e=this.videoContainer)||void 0===e?void 0:e.stop();case 2:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"isFullScreenSupported",value:(a=Gt(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",null!==this.containerElement.requestFullscreen);case 1:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"enterFullscreen",value:(i=Gt(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.containerElement.requestFullscreen){t.next=2;break}return t.abrupt("return",this.containerElement.requestFullscreen());case 2:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"exitFullscreen",value:(n=Gt(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!document.exitFullscreen||!this.isFullscreen){t.next=2;break}return t.abrupt("return",document.exitFullscreen());case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"isFullscreen",get:function(){return document.fullscreenElement===this.containerElement}}],r&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(e.prototype,r),t}(),Yt=r(1547),zt=r(7528),qt=r(143),Xt=r(625),Qt=r(2452),$t=r(7488),Jt=r(7133),te=r(1309),ee=r(7096),re=r(8069),ne=r(2604),ie=r(4348)})(),n})()},379:(t,e,r)=>{"use strict";var n,i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),o=[];function a(t){for(var e=-1,r=0;r<o.length;r++)if(o[r].identifier===t){e=r;break}return e}function s(t,e){for(var r={},n=[],i=0;i<t.length;i++){var s=t[i],u=e.base?s[0]+e.base:s[0],c=r[u]||0,l="".concat(u," ").concat(c);r[u]=c+1;var f=a(l),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==f?(o[f].references++,o[f].updater(h)):o.push({identifier:l,updater:v(h,e),references:1}),n.push(l)}return n}function u(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var o=r.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])})),"function"==typeof t.insert)t.insert(e);else{var a=i(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var c,l=(c=[],function(t,e){return c[t]=e,c.filter(Boolean).join("\n")});function f(t,e,r,n){var i=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(t.styleSheet)t.styleSheet.cssText=l(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function h(t,e,r){var n=r.css,i=r.media,o=r.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var d=null,p=0;function v(t,e){var r,n,i;if(e.singleton){var o=p++;r=d||(d=u(e)),n=f.bind(null,r,o,!1),i=f.bind(null,r,o,!0)}else r=u(e),n=h.bind(null,r,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(r)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=(void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n));var r=s(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var n=0;n<r.length;n++){var i=a(r[n]);o[i].references--}for(var u=s(t,e),c=0;c<r.length;c++){var l=a(r[c]);0===o[l].references&&(o[l].updater(),o.splice(l,1))}r=u}}}},842:t=>{t.exports='<svg viewBox="0 0 27 31" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="repeat" transform="matrix(1,0,0,1,-132.5,-2)"><g transform="matrix(1,0,0,1,132.5,2)"><path d="M7.364,6.48C9.179,5.515 11.255,4.967 13.461,4.967C20.569,4.967 26.331,10.651 26.331,17.664C26.331,24.676 20.569,30.36 13.461,30.36C8.436,30.36 4.083,27.518 1.964,23.375L1.973,23.34L3.716,22.554C5.531,26.101 9.257,28.534 13.56,28.534C19.645,28.534 24.579,23.667 24.579,17.664C24.579,11.66 19.645,6.793 13.56,6.793C11.624,6.793 9.804,7.286 8.223,8.151L12.5,12L0,12L6.5,0L7.364,6.48Z" style="stroke:black;stroke-width:0.07px;"></path></g><g transform="matrix(1.10748,0,0,1.05518,-14.2059,-1.08359)"><g><path d="M132.929,20.884L133.826,20.764C133.929,21.273 134.104,21.639 134.352,21.864C134.6,22.088 134.901,22.2 135.257,22.2C135.679,22.2 136.035,22.054 136.326,21.762C136.617,21.469 136.762,21.107 136.762,20.675C136.762,20.263 136.628,19.923 136.359,19.655C136.089,19.388 135.747,19.254 135.332,19.254C135.162,19.254 134.951,19.287 134.699,19.354L134.798,18.566C134.858,18.573 134.906,18.576 134.943,18.576C135.325,18.576 135.669,18.476 135.975,18.277C136.281,18.077 136.433,17.77 136.433,17.355C136.433,17.025 136.322,16.753 136.099,16.537C135.877,16.321 135.589,16.213 135.237,16.213C134.888,16.213 134.597,16.323 134.364,16.542C134.132,16.761 133.982,17.09 133.916,17.529L133.018,17.369C133.128,16.768 133.377,16.302 133.766,15.971C134.155,15.64 134.639,15.475 135.217,15.475C135.616,15.475 135.983,15.561 136.319,15.732C136.654,15.903 136.911,16.136 137.089,16.432C137.267,16.728 137.356,17.042 137.356,17.374C137.356,17.69 137.271,17.978 137.101,18.237C136.932,18.496 136.681,18.702 136.349,18.855C136.781,18.955 137.116,19.162 137.356,19.476C137.595,19.79 137.715,20.183 137.715,20.655C137.715,21.293 137.482,21.834 137.017,22.277C136.551,22.721 135.963,22.943 135.252,22.943C134.61,22.943 134.078,22.752 133.654,22.37C133.23,21.988 132.989,21.492 132.929,20.884Z" style="fill-rule:nonzero;"></path><path d="M138.602,19.209C138.602,18.345 138.691,17.649 138.869,17.123C139.047,16.596 139.311,16.19 139.661,15.904C140.012,15.618 140.453,15.475 140.985,15.475C141.377,15.475 141.721,15.554 142.017,15.712C142.313,15.87 142.557,16.097 142.75,16.395C142.943,16.692 143.094,17.055 143.203,17.482C143.313,17.909 143.368,18.485 143.368,19.209C143.368,20.067 143.28,20.759 143.104,21.285C142.928,21.812 142.664,22.219 142.314,22.507C141.963,22.794 141.52,22.938 140.985,22.938C140.28,22.938 139.727,22.685 139.325,22.18C138.843,21.572 138.602,20.582 138.602,19.209ZM139.524,19.209C139.524,20.409 139.665,21.207 139.946,21.604C140.226,22.002 140.573,22.2 140.985,22.2C141.397,22.2 141.744,22.001 142.024,21.602C142.305,21.203 142.446,20.406 142.446,19.209C142.446,18.006 142.305,17.207 142.024,16.811C141.744,16.416 141.394,16.218 140.975,16.218C140.563,16.218 140.234,16.392 139.988,16.741C139.679,17.187 139.524,18.009 139.524,19.209Z" style="fill-rule:nonzero;"></path><path d="M144.171,21.233L145.058,21.093C145.108,21.449 145.247,21.722 145.474,21.911C145.702,22.101 146.02,22.195 146.429,22.195C146.841,22.195 147.147,22.111 147.346,21.943C147.546,21.776 147.645,21.579 147.645,21.353C147.645,21.15 147.557,20.99 147.381,20.874C147.258,20.794 146.952,20.693 146.464,20.57C145.806,20.404 145.35,20.26 145.095,20.139C144.841,20.017 144.648,19.85 144.517,19.635C144.386,19.421 144.32,19.184 144.32,18.925C144.32,18.689 144.374,18.47 144.482,18.269C144.59,18.068 144.737,17.901 144.923,17.768C145.063,17.665 145.253,17.578 145.494,17.507C145.735,17.435 145.993,17.399 146.269,17.399C146.685,17.399 147.05,17.459 147.364,17.579C147.678,17.699 147.91,17.861 148.059,18.065C148.209,18.269 148.312,18.543 148.368,18.885L147.491,19.005C147.451,18.732 147.335,18.519 147.144,18.367C146.953,18.214 146.683,18.137 146.334,18.137C145.922,18.137 145.628,18.205 145.452,18.342C145.276,18.478 145.188,18.637 145.188,18.82C145.188,18.937 145.224,19.041 145.297,19.134C145.37,19.231 145.485,19.31 145.641,19.374C145.731,19.407 145.995,19.483 146.434,19.603C147.069,19.772 147.512,19.911 147.762,20.019C148.013,20.127 148.21,20.284 148.353,20.49C148.496,20.696 148.568,20.952 148.568,21.258C148.568,21.557 148.48,21.839 148.306,22.103C148.131,22.367 147.88,22.572 147.551,22.716C147.222,22.861 146.849,22.933 146.434,22.933C145.746,22.933 145.222,22.79 144.861,22.504C144.5,22.218 144.27,21.795 144.171,21.233Z" style="fill-rule:nonzero;"></path></g></g></g></svg>'},380:t=>{t.exports='<svg viewBox="0 0 39 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path d="M16.741,26.183C12.023,25.971 6.017,25.452 6.017,25.452C2.97,25.452 0.499,23.423 0.499,20.921C0.499,20.921 -0.001,15.526 -0.001,12.932C-0.001,10.59 0.499,5.352 0.499,5.352C0.499,2.85 2.97,0.821 6.017,0.821C6.017,0.821 15.005,0.001 19.499,0.001C21.254,0.001 23.696,0.125 26.019,0.278C29.643,0.516 32.981,0.821 32.981,0.821C36.028,0.821 38.499,2.85 38.499,5.352C38.499,5.352 39,10.541 39,13.136C39,15.732 38.499,20.921 38.499,20.921C38.499,23.423 36.028,25.452 32.981,25.452C32.981,25.452 26.774,26.041 22.24,26.221L19.5,31.465L16.741,26.183ZM34.346,20.087L4.021,20.087L4.021,23.325L34.346,23.325L34.346,20.087ZM34.346,15.805L4.021,15.805L4.021,19.044L34.346,19.044L34.346,15.805ZM34.346,11.523L4.021,11.523L4.021,14.762L34.346,14.762L34.346,11.523ZM34.346,7.241L4.021,7.241L4.021,10.48L34.346,10.48L34.346,7.241ZM34.346,2.959L4.021,2.959L4.021,6.198L34.346,6.198L34.346,2.959Z"></path></svg>'},271:t=>{t.exports='<svg viewBox="0 0 27 31" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="repeat" transform="matrix(1,0,0,1,-132.5,-2)"><g transform="matrix(-1,0,-0,1,158.831,2)"><path d="M7.364,6.48C9.179,5.515 11.255,4.967 13.461,4.967C20.569,4.967 26.331,10.651 26.331,17.664C26.331,24.676 20.569,30.36 13.461,30.36C8.436,30.36 4.083,27.518 1.964,23.375L1.973,23.34L3.716,22.554C5.531,26.101 9.257,28.534 13.56,28.534C19.645,28.534 24.579,23.667 24.579,17.664C24.579,11.66 19.645,6.793 13.56,6.793C11.624,6.793 9.804,7.286 8.223,8.151L12.5,12L0,12L6.5,0L7.364,6.48Z" style="stroke:black;stroke-width:0.07px;"></path></g><g transform="matrix(1.10748,0,0,1.05518,-5.70486,-1.08359)"><g><path d="M132.929,20.884L133.826,20.764C133.929,21.273 134.104,21.639 134.352,21.864C134.6,22.088 134.901,22.2 135.257,22.2C135.679,22.2 136.035,22.054 136.326,21.762C136.617,21.469 136.762,21.107 136.762,20.675C136.762,20.263 136.628,19.923 136.359,19.655C136.089,19.388 135.747,19.254 135.332,19.254C135.162,19.254 134.951,19.287 134.699,19.354L134.798,18.566C134.858,18.573 134.906,18.576 134.943,18.576C135.325,18.576 135.669,18.476 135.975,18.277C136.281,18.077 136.433,17.77 136.433,17.355C136.433,17.025 136.322,16.753 136.099,16.537C135.877,16.321 135.589,16.213 135.237,16.213C134.888,16.213 134.597,16.323 134.364,16.542C134.132,16.761 133.982,17.09 133.916,17.529L133.018,17.369C133.128,16.768 133.377,16.302 133.766,15.971C134.155,15.64 134.639,15.475 135.217,15.475C135.616,15.475 135.983,15.561 136.319,15.732C136.654,15.903 136.911,16.136 137.089,16.432C137.267,16.728 137.356,17.042 137.356,17.374C137.356,17.69 137.271,17.978 137.101,18.237C136.932,18.496 136.681,18.702 136.349,18.855C136.781,18.955 137.116,19.162 137.356,19.476C137.595,19.79 137.715,20.183 137.715,20.655C137.715,21.293 137.482,21.834 137.017,22.277C136.551,22.721 135.963,22.943 135.252,22.943C134.61,22.943 134.078,22.752 133.654,22.37C133.23,21.988 132.989,21.492 132.929,20.884Z" style="fill-rule:nonzero;"></path><path d="M138.602,19.209C138.602,18.345 138.691,17.649 138.869,17.123C139.047,16.596 139.311,16.19 139.661,15.904C140.012,15.618 140.453,15.475 140.985,15.475C141.377,15.475 141.721,15.554 142.017,15.712C142.313,15.87 142.557,16.097 142.75,16.395C142.943,16.692 143.094,17.055 143.203,17.482C143.313,17.909 143.368,18.485 143.368,19.209C143.368,20.067 143.28,20.759 143.104,21.285C142.928,21.812 142.664,22.219 142.314,22.507C141.963,22.794 141.52,22.938 140.985,22.938C140.28,22.938 139.727,22.685 139.325,22.18C138.843,21.572 138.602,20.582 138.602,19.209ZM139.524,19.209C139.524,20.409 139.665,21.207 139.946,21.604C140.226,22.002 140.573,22.2 140.985,22.2C141.397,22.2 141.744,22.001 142.024,21.602C142.305,21.203 142.446,20.406 142.446,19.209C142.446,18.006 142.305,17.207 142.024,16.811C141.744,16.416 141.394,16.218 140.975,16.218C140.563,16.218 140.234,16.392 139.988,16.741C139.679,17.187 139.524,18.009 139.524,19.209Z" style="fill-rule:nonzero;"></path><path d="M144.171,21.233L145.058,21.093C145.108,21.449 145.247,21.722 145.474,21.911C145.702,22.101 146.02,22.195 146.429,22.195C146.841,22.195 147.147,22.111 147.346,21.943C147.546,21.776 147.645,21.579 147.645,21.353C147.645,21.15 147.557,20.99 147.381,20.874C147.258,20.794 146.952,20.693 146.464,20.57C145.806,20.404 145.35,20.26 145.095,20.139C144.841,20.017 144.648,19.85 144.517,19.635C144.386,19.421 144.32,19.184 144.32,18.925C144.32,18.689 144.374,18.47 144.482,18.269C144.59,18.068 144.737,17.901 144.923,17.768C145.063,17.665 145.253,17.578 145.494,17.507C145.735,17.435 145.993,17.399 146.269,17.399C146.685,17.399 147.05,17.459 147.364,17.579C147.678,17.699 147.91,17.861 148.059,18.065C148.209,18.269 148.312,18.543 148.368,18.885L147.491,19.005C147.451,18.732 147.335,18.519 147.144,18.367C146.953,18.214 146.683,18.137 146.334,18.137C145.922,18.137 145.628,18.205 145.452,18.342C145.276,18.478 145.188,18.637 145.188,18.82C145.188,18.937 145.224,19.041 145.297,19.134C145.37,19.231 145.485,19.31 145.641,19.374C145.731,19.407 145.995,19.483 146.434,19.603C147.069,19.772 147.512,19.911 147.762,20.019C148.013,20.127 148.21,20.284 148.353,20.49C148.496,20.696 148.568,20.952 148.568,21.258C148.568,21.557 148.48,21.839 148.306,22.103C148.131,22.367 147.88,22.572 147.551,22.716C147.222,22.861 146.849,22.933 146.434,22.933C145.746,22.933 145.222,22.79 144.861,22.504C144.5,22.218 144.27,21.795 144.171,21.233Z" style="fill-rule:nonzero;"></path></g></g></g></svg>'},643:t=>{t.exports='<svg viewBox="0 0 34 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="FullScreen" transform="matrix(1,0,0,1,-363,-6)"><g><g><g transform="matrix(1,0,0,1,-2,2.84217e-14)"><path d="M368.492,8.078L371.207,10.793L369.793,12.207L367.078,9.492L365,11.57L365.014,7.428L365,7.414L365.014,7.4L365.019,6.019L366.4,6.014L366.414,6L366.428,6.014L370.57,6L368.492,8.078Z"></path></g><g transform="matrix(1,0,0,-1,-2,40)"><path d="M368.492,8.078L371.207,10.793L369.793,12.207L367.078,9.492L365,11.57L365.014,7.428L365,7.414L365.014,7.4L365.019,6.019L366.4,6.014L366.414,6L366.428,6.014L370.57,6L368.492,8.078Z"></path></g><g transform="matrix(-1,0,0,1,762,2.84217e-14)"><path d="M368.492,8.078L371.207,10.793L369.793,12.207L367.078,9.492L365,11.57L365.014,7.428L365,7.414L365.014,7.4L365.019,6.019L366.4,6.014L366.414,6L366.428,6.014L370.57,6L368.492,8.078Z"></path></g><g transform="matrix(-1,0,0,-1,762,40)"><path d="M368.492,8.078L371.207,10.793L369.793,12.207L367.078,9.492L365,11.57L365.014,7.428L365,7.414L365.014,7.4L365.019,6.019L366.4,6.014L366.414,6L366.428,6.014L370.57,6L368.492,8.078Z"></path></g><g transform="matrix(1,0,0,0.886475,0,2.17871)"><rect x="369" y="12.207" width="22" height="15.793"></rect></g><g transform="matrix(1,0,0,1,-0.0588586,-0.780796)"></g></g></g></g></svg>'},291:t=>{t.exports='<svg viewBox="0 0 39 33" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><path d="M38.02,33L20.02,33L20.02,16L38.02,16L38.02,33ZM18.1,31.479L17.261,28.744C17.261,28.744 15.373,29.986 14.365,29.504C13.356,29.022 13.141,28.161 13.141,28.161L15.089,26L10.02,26L10.02,31.317L12.04,29.194C12.04,29.194 12.571,31.145 13.809,31.959C15.732,33.224 18.1,31.479 18.1,31.479ZM35.846,31C35.844,30.985 35.419,26.773 34.821,25.622C34.222,24.47 31.242,24.429 31.242,24.429C31.242,24.429 30.557,27.413 30.373,27.982C30.189,28.55 30.15,28.681 30.15,28.681C30.15,28.681 29.686,25.798 29.604,25.505C29.543,25.285 29.143,25.271 29.058,25.271C28.973,25.271 28.573,25.297 28.512,25.516C28.431,25.809 28.097,28.617 28.097,28.617C28.097,28.617 27.995,28.55 27.811,27.982C27.627,27.413 26.874,24.429 26.874,24.429C26.874,24.429 23.894,24.47 23.295,25.622C22.696,26.775 22.27,31 22.27,31L35.846,31ZM30.15,24.429C30.209,24.682 29.406,25.228 29.406,25.228L28.763,25.212C28.763,25.212 27.907,24.682 27.966,24.429C28.02,24.196 28.753,24.222 29.058,24.219C29.365,24.222 30.096,24.196 30.15,24.429ZM25.02,15L22.02,15L22.02,3L23.02,3L23.02,2L2.02,2L2.02,3L3.02,3L3.02,17L11.79,17L8.396,21.381C8.078,21.995 8.205,22.353 8.367,22.49C8.531,22.629 8.944,22.69 9.341,22.282L12.926,18.594L16.429,22.282C16.589,22.542 16.931,22.561 17.322,22.405C17.601,22.293 17.521,21.746 17.374,21.381L13.875,17L19.02,17L19.02,24L0,24L0,0L25.02,0L25.02,15ZM29.058,17.067C30.719,17.067 32.068,18.527 32.068,20.326C32.068,22.125 30.719,23.586 29.058,23.586C27.397,23.586 26.048,22.125 26.048,20.326C26.048,18.527 27.397,17.067 29.058,17.067ZM21.02,15L21.02,3L4.02,3L4.02,16L19.02,16L19.02,15L21.02,15ZM35.1,14L30.032,14L31.98,11.839C31.98,11.839 31.765,10.978 30.756,10.496C29.747,10.014 27.86,11.256 27.86,11.256L27.02,8.521C27.02,8.521 29.389,6.776 31.312,8.041C32.55,8.855 33.081,10.806 33.081,10.806L35.1,8.683L35.1,14ZM10.744,7.462L6.356,13.008L5.922,12.61L10.727,6.537L13.847,9.959L18.147,5.333L18.55,5.767L13.846,10.826L10.744,7.462Z"></path></svg>'},998:t=>{t.exports='<svg viewBox="0 0 39 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g transform="matrix(1.43396,0,0,1.57895,-350.104,-74)"><path d="M271,50.995C271,49.065 269.277,47.5 267.152,47.5C267.152,47.5 260.884,46.867 257.75,46.867C254.616,46.867 248.348,47.5 248.348,47.5C246.223,47.5 244.5,49.065 244.5,50.995C244.5,50.995 244.151,55.036 244.151,56.842C244.151,58.843 244.5,63.005 244.5,63.005C244.5,64.935 246.223,66.5 248.348,66.5C248.348,66.5 254.965,67.133 258.099,67.133C261.124,67.133 267.152,66.5 267.152,66.5C269.277,66.5 271,64.935 271,63.005C271,63.005 271.349,59.002 271.349,57C271.349,54.998 271,50.995 271,50.995Z"></path></g></svg>'},770:t=>{t.exports='<svg viewBox="0 0 521 601" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g transform="matrix(5.20833,0,0,5.20833,0,0)"><g id="User" transform="matrix(3.84615,1.8963e-31,0,3.84615,-1564.99,-323.92)"><g transform="matrix(1.05882,0,0,1.05882,-23.2206,-3.66315)"><circle cx="418.5" cy="91.5" r="8.5"></circle></g><g transform="matrix(0.996622,0,0,0.785714,1.3158,23.0763)"><path d="M406.956,116C408.994,107.809 414.069,102 420,102C425.931,102 431.006,107.809 433.044,116L406.956,116Z"></path></g></g></g></svg>'},506:t=>{t.exports='<svg viewBox="0 0 34 30" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g transform="matrix(1,0,0,1,-164.25,-6)"><path d="M184.233,14.077C188.981,14.489 191.571,24.435 184.954,27.208C183.497,27.819 181.723,25.826 183.988,24.902C187.22,23.511 187.697,17.939 183.734,16.5C183.734,16.5 181.944,14.012 184.233,14.077Z" style="fill-rule:nonzero;"></path></g><g transform="matrix(1.79727,0,0,1.79727,-310.137,-22.5434)"><path d="M184.236,14.634C184.819,14.72 184.834,14.837 185.078,14.956C188.213,16.489 189.629,20.834 187.848,23.947C187.088,25.275 185.842,26.312 184.395,26.83C184.395,26.83 184.071,26.925 183.815,26.778C183.217,26.436 183.496,25.849 184.723,25.159C187.985,23.325 187.943,17.417 183.927,15.98C183.927,15.98 182.939,14.544 184.236,14.634Z" style="fill-rule:nonzero;"></path></g><g transform="matrix(2.44245,0,0,2.44245,-427.303,-35.9308)"><path d="M184.199,14.815C184.625,14.866 186.828,16.03 187.775,17.801C189.443,20.92 187.935,25.329 184.388,26.637C184.388,26.637 183.459,26.646 183.677,26.009C183.808,25.624 184.344,25.578 184.77,25.344C187.184,24.016 188.202,20.604 186.8,18.153C186.181,17.07 185.166,16.228 183.988,15.807C183.988,15.807 183.242,14.787 184.199,14.815Z" style="fill-rule:nonzero;"></path></g><g transform="matrix(1,0,0,1,-125,-5)"><path d="M131.499,14L139.68,5C140.961,5 142,6.039 142,7.32L142,31.68C142,32.961 140.961,34 139.68,34L131.499,25L127.375,25C126.063,25 125,23.937 125,22.625L125,16.375C125,15.063 126.063,14 127.375,14L131.499,14Z"></path></g></svg>'},978:t=>{t.exports='<svg viewBox="0 0 25 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="volume-low" serif:id="volume low" transform="matrix(1,0,0,1,-165,-5)"><g><g transform="matrix(1,0,0,1,0.75,-1)"><path d="M184.233,14.077C188.981,14.489 191.571,24.435 184.954,27.208C183.497,27.819 181.723,25.826 183.988,24.902C187.22,23.511 187.697,17.939 183.734,16.5C183.734,16.5 181.944,14.012 184.233,14.077Z" style="fill-rule:nonzero;"></path></g><g transform="matrix(1,0,0,1,40,0)"><path d="M131.499,14L139.68,5C140.961,5 142,6.039 142,7.32L142,31.68C142,32.961 140.961,34 139.68,34L131.499,25L127.375,25C126.063,25 125,23.937 125,22.625L125,16.375C125,15.063 126.063,14 127.375,14L131.499,14Z"></path></g></g></g></svg>'},704:t=>{t.exports='<svg viewBox="0 0 29 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="volume-mid" serif:id="volume mid" transform="matrix(1,0,0,1,-165,-5)"><g><g transform="matrix(1,0,0,1,0.75,-1)"><path d="M184.233,14.077C188.981,14.489 191.571,24.435 184.954,27.208C183.497,27.819 181.723,25.826 183.988,24.902C187.22,23.511 187.697,17.939 183.734,16.5C183.734,16.5 181.944,14.012 184.233,14.077Z" style="fill-rule:nonzero;"></path></g><g transform="matrix(1.79727,0,0,1.79727,-145.137,-17.5434)"><path d="M184.236,14.634C184.819,14.72 184.834,14.837 185.078,14.956C188.213,16.489 189.629,20.834 187.848,23.947C187.088,25.275 185.842,26.312 184.395,26.83C184.395,26.83 184.071,26.925 183.815,26.778C183.217,26.436 183.496,25.849 184.723,25.159C187.985,23.325 187.943,17.417 183.927,15.98C183.927,15.98 182.939,14.544 184.236,14.634Z" style="fill-rule:nonzero;"></path></g><g transform="matrix(1,0,0,1,40,0)"><path d="M131.499,14L139.68,5C140.961,5 142,6.039 142,7.32L142,31.68C142,32.961 140.961,34 139.68,34L131.499,25L127.375,25C126.063,25 125,23.937 125,22.625L125,16.375C125,15.063 126.063,14 127.375,14L131.499,14Z"></path></g></g></g></svg>'},928:t=>{t.exports='<svg viewBox="0 0 31 31" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="volume-mute" serif:id="volume mute" transform="matrix(1,0,0,1,-123,-4.71142)"><path d="M142,28.522L142,31.68C142,32.961 140.961,34 139.68,34L131.499,25L127.375,25C126.063,25 125,23.937 125,22.625L125,16.375C125,15.063 126.063,14 127.375,14L127.478,14L142,28.522ZM151.228,34.983L123,6.756L125.044,4.711L132.848,12.516L139.68,5C140.961,5 142,6.039 142,7.32L142,21.667L153.272,32.939L151.228,34.983Z"></path></g></svg>'},887:t=>{t.exports='<svg viewBox="0 0 37 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="Exit-FullScreen" serif:id="Exit FullScreen" transform="matrix(1,0,0,1,-361.793,-5.79289)"><g><g transform="matrix(1,0,0,-1,27,18)"><path d="M368.492,8.078L371.207,10.793L369.793,12.207L367.078,9.492L365,11.57L365.014,7.428L365,7.414L365.014,7.4L365.019,6.019L366.4,6.014L366.414,6L366.428,6.014L370.57,6L368.492,8.078Z"></path></g><g transform="matrix(-1,0,0,1,733,22)"><path d="M368.492,8.078L371.207,10.793L369.793,12.207L367.078,9.492L365,11.57L365.014,7.428L365,7.414L365.014,7.4L365.019,6.019L366.4,6.014L366.414,6L366.428,6.014L370.57,6L368.492,8.078Z"></path></g><g transform="matrix(-1,0,0,-1,733,18)"><path d="M368.492,8.078L371.207,10.793L369.793,12.207L367.078,9.492L365,11.57L365.014,7.428L365,7.414L365.014,7.4L365.019,6.019L366.4,6.014L366.414,6L366.428,6.014L370.57,6L368.492,8.078Z"></path></g><g transform="matrix(1,0,0,1,27,22)"><path d="M368.492,8.078L371.207,10.793L369.793,12.207L367.078,9.492L365,11.57L365.014,7.428L365,7.414L365.014,7.4L365.019,6.019L366.4,6.014L366.414,6L366.428,6.014L370.57,6L368.492,8.078Z"></path></g><g transform="matrix(1,0,0,0.886475,0,2.17871)"><rect x="369" y="12.207" width="22" height="15.793"></rect></g></g></g></svg>'},757:(t,e,r)=>{var n={"./BasicPluginsModule.js":775,"./es.upv.paella.audioSelector.js":252,"./es.upv.paella.backwardButtonPlugin.js":925,"./es.upv.paella.captionsSelectorPlugin.js":460,"./es.upv.paella.externalPluginTest.js":800,"./es.upv.paella.forwardButtonPlugin.js":108,"./es.upv.paella.fullscreenButton.js":440,"./es.upv.paella.layoutSelector.js":239,"./es.upv.paella.playbackRateButton.js":540,"./es.upv.paella.qualitySelector.js":135,"./es.upv.paella.volumeButtonPlugin.js":459};function i(t){var e=o(t);return r(e)}function o(t){if(!r.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}i.keys=function(){return Object.keys(n)},i.resolve=o,t.exports=i,i.id=757}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,exports:{}};return t[n](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";function t(){return r(757)}r.r(n),r.d(n,{basicPluginsDict:()=>e,default:()=>t});var e={es:{"Select the active audio track":"Select the active audio track"}}})(),n})()}));
  //# sourceMappingURL=paella-basic-plugins.js.map