@clappr/hlsjs-playback 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var HlsjsPlayback=function(){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function t(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?e(Object(i),!0).forEach((function(e){n(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,f(i.key),i)}}function n(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function o(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=a(e);if(t){var n=a(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return o(this,r)}}function u(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=a(e)););return e}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var i=u(e,t);if(i){var n=Object.getOwnPropertyDescriptor(i,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},c.apply(this,arguments)}function d(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function f(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function A(e,t,r){return t&&y(e.prototype,t),r&&y(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function L(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=b(e);if(t){var n=b(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return k(this,r)}}function D(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=b(e)););return e}function R(){return R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var i=D(e,t);if(i){var n=Object.getOwnPropertyDescriptor(i,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},R.apply(this,arguments)}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var i,n,a=[],s=!0,o=!1;try{for(r=r.call(e);!(s=(i=r.next()).done)&&(a.push(i.value),!t||a.length!==t);s=!0);}catch(e){o=!0,n=e}finally{try{s||null==r.return||r.return()}finally{if(o)throw n}}return a}(e,t)||O(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||O(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function P(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=O(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<r;){var a=t[n];if(e.call(i,a,n,t))return a;n++}}}),Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,i=new Array(r);r--;)i[r]=[t[r],e[t[r]]];return i}),Object.values||(Object.values=function(e){for(var t=Object.keys(e),r=t.length,i=new Array(r);r--;)i[r]=e[t[r]];return i}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])}return r},writable:!0,configurable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<r;){var a=t[n];if(e.call(i,a,n,t))return n;n++}return-1},configurable:!0,writable:!0});var x,N={mp4:"data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE="},F=function(){var e,t,r,i,n,a,s=[],o=s.concat,l=s.filter,u=s.slice,c=window.document,d={},h={},f={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},g=/^\s*<(\w+|!)[^>]*>/,p=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,m=/^(?:body|html)$/i,y=/([A-Z])/g,A=["val","css","html","text","data","width","height","offset"],E=c.createElement("table"),T=c.createElement("tr"),b={tr:c.createElement("tbody"),tbody:E,thead:E,tfoot:E,td:T,th:T,"*":c.createElement("div")},S=/complete|loaded|interactive/,_=/^[\w-]*$/,k={},L=k.toString,D={},R=c.createElement("div"),C={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},I=Array.isArray||function(e){return e instanceof Array};function O(e){return null==e?String(e):k[L.call(e)]||"object"}function w(e){return"function"==O(e)}function P(e){return null!=e&&e==e.window}function x(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function N(e){return"object"==O(e)}function F(e){return N(e)&&!P(e)&&Object.getPrototypeOf(e)==Object.prototype}function M(e){var t=!!e&&"length"in e&&e.length,i=r.type(e);return"function"!=i&&!P(e)&&("array"==i||0===t||"number"==typeof t&&t>0&&t-1 in e)}function U(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function B(e){return e in h?h[e]:h[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function G(e,t){return"number"!=typeof t||f[U(e)]?t:t+"px"}function j(e){return"children"in e?u.call(e.children):r.map(e.childNodes,(function(e){if(1==e.nodeType)return e}))}function K(e,t){var r,i=e?e.length:0;for(r=0;r<i;r++)this[r]=e[r];this.length=i,this.selector=t||""}function H(r,i,n){for(t in i)n&&(F(i[t])||I(i[t]))?(F(i[t])&&!F(r[t])&&(r[t]={}),I(i[t])&&!I(r[t])&&(r[t]=[]),H(r[t],i[t],n)):i[t]!==e&&(r[t]=i[t])}function V(e,t){return null==t?r(e):r(e).filter(t)}function Y(e,t,r,i){return w(t)?t.call(e,r,i):t}function W(e,t,r){null==r?e.removeAttribute(t):e.setAttribute(t,r)}function z(t,r){var i=t.className||"",n=i&&i.baseVal!==e;if(r===e)return n?i.baseVal:i;n?i.baseVal=r:t.className=r}function q(e){try{return e?"true"==e||"false"!=e&&("null"==e?null:+e+""==e?+e:/^[\[\{]/.test(e)?r.parseJSON(e):e):e}catch(t){return e}}function X(e,t){t(e);for(var r=0,i=e.childNodes.length;r<i;r++)X(e.childNodes[r],t)}return D.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;var r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(r)return r.call(e,t);var i,n=e.parentNode,a=!n;return a&&(n=R).appendChild(e),i=~D.qsa(n,t).indexOf(e),a&&R.removeChild(e),i},n=function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},a=function(e){return l.call(e,(function(t,r){return e.indexOf(t)==r}))},D.fragment=function(t,i,n){var a,s,o;return p.test(t)&&(a=r(c.createElement(RegExp.$1))),a||(t.replace&&(t=t.replace(v,"<$1></$2>")),i===e&&(i=g.test(t)&&RegExp.$1),i in b||(i="*"),(o=b[i]).innerHTML=""+t,a=r.each(u.call(o.childNodes),(function(){o.removeChild(this)}))),F(n)&&(s=r(a),r.each(n,(function(e,t){A.indexOf(e)>-1?s[e](t):s.attr(e,t)}))),a},D.Z=function(e,t){return new K(e,t)},D.isZ=function(e){return e instanceof D.Z},D.init=function(t,i){var n,a;if(!t)return D.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&g.test(t))n=D.fragment(t,RegExp.$1,i),t=null;else{if(i!==e)return r(i).find(t);n=D.qsa(c,t)}else{if(w(t))return r(c).ready(t);if(D.isZ(t))return t;if(I(t))a=t,n=l.call(a,(function(e){return null!=e}));else if(N(t))n=[t],t=null;else if(g.test(t))n=D.fragment(t.trim(),RegExp.$1,i),t=null;else{if(i!==e)return r(i).find(t);n=D.qsa(c,t)}}return D.Z(n,t)},(r=function(e,t){return D.init(e,t)}).extend=function(e){var t,r=u.call(arguments,1);return"boolean"==typeof e&&(t=e,e=r.shift()),r.forEach((function(r){H(e,r,t)})),e},D.qsa=function(e,t){var r,i="#"==t[0],n=!i&&"."==t[0],a=i||n?t.slice(1):t,s=_.test(a);return e.getElementById&&s&&i?(r=e.getElementById(a))?[r]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:u.call(s&&!i&&e.getElementsByClassName?n?e.getElementsByClassName(a):e.getElementsByTagName(t):e.querySelectorAll(t))},r.contains=c.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},r.type=O,r.isFunction=w,r.isWindow=P,r.isArray=I,r.isPlainObject=F,r.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},r.isNumeric=function(e){var t=Number(e),r=typeof e;return null!=e&&"boolean"!=r&&("string"!=r||e.length)&&!isNaN(t)&&isFinite(t)||!1},r.inArray=function(e,t,r){return s.indexOf.call(t,e,r)},r.camelCase=n,r.trim=function(e){return null==e?"":String.prototype.trim.call(e)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(e,t){var i,n,a,s,o=[];if(M(e))for(n=0;n<e.length;n++)null!=(i=t(e[n],n))&&o.push(i);else for(a in e)null!=(i=t(e[a],a))&&o.push(i);return(s=o).length>0?r.fn.concat.apply([],s):s},r.each=function(e,t){var r,i;if(M(e)){for(r=0;r<e.length;r++)if(!1===t.call(e[r],r,e[r]))return e}else for(i in e)if(!1===t.call(e[i],i,e[i]))return e;return e},r.grep=function(e,t){return l.call(e,t)},window.JSON&&(r.parseJSON=JSON.parse),r.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(e,t){k["[object "+t+"]"]=t.toLowerCase()})),r.fn={constructor:D.Z,length:0,forEach:s.forEach,reduce:s.reduce,push:s.push,sort:s.sort,splice:s.splice,indexOf:s.indexOf,concat:function(){var e,t,r=[];for(e=0;e<arguments.length;e++)t=arguments[e],r[e]=D.isZ(t)?t.toArray():t;return o.apply(D.isZ(this)?this.toArray():this,r)},map:function(e){return r(r.map(this,(function(t,r){return e.call(t,r,t)})))},slice:function(){return r(u.apply(this,arguments))},ready:function(e){return S.test(c.readyState)&&c.body?e(r):c.addEventListener("DOMContentLoaded",(function(){e(r)}),!1),this},get:function(t){return t===e?u.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(e){return s.every.call(this,(function(t,r){return!1!==e.call(t,r,t)})),this},filter:function(e){return w(e)?this.not(this.not(e)):r(l.call(this,(function(t){return D.matches(t,e)})))},add:function(e,t){return r(a(this.concat(r(e,t))))},is:function(e){return this.length>0&&D.matches(this[0],e)},not:function(t){var i=[];if(w(t)&&t.call!==e)this.each((function(e){t.call(this,e)||i.push(this)}));else{var n="string"==typeof t?this.filter(t):M(t)&&w(t.item)?u.call(t):r(t);this.forEach((function(e){n.indexOf(e)<0&&i.push(e)}))}return r(i)},has:function(e){return this.filter((function(){return N(e)?r.contains(this,e):r(this).find(e).size()}))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!N(e)?e:r(e)},last:function(){var e=this[this.length-1];return e&&!N(e)?e:r(e)},find:function(e){var t=this;return e?"object"==typeof e?r(e).filter((function(){var e=this;return s.some.call(t,(function(t){return r.contains(t,e)}))})):1==this.length?r(D.qsa(this[0],e)):this.map((function(){return D.qsa(this,e)})):r()},closest:function(e,t){var i=[],n="object"==typeof e&&r(e);return this.each((function(r,a){for(;a&&!(n?n.indexOf(a)>=0:D.matches(a,e));)a=a!==t&&!x(a)&&a.parentNode;a&&i.indexOf(a)<0&&i.push(a)})),r(i)},parents:function(e){for(var t=[],i=this;i.length>0;)i=r.map(i,(function(e){if((e=e.parentNode)&&!x(e)&&t.indexOf(e)<0)return t.push(e),e}));return V(t,e)},parent:function(e){return V(a(this.pluck("parentNode")),e)},children:function(e){return V(this.map((function(){return j(this)})),e)},contents:function(){return this.map((function(){return this.contentDocument||u.call(this.childNodes)}))},siblings:function(e){return V(this.map((function(e,t){return l.call(j(t.parentNode),(function(e){return e!==t}))})),e)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(e){return r.map(this,(function(t){return t[e]}))},show:function(){return this.each((function(){var e,t,r;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(e=this.nodeName,d[e]||(t=c.createElement(e),c.body.appendChild(t),r=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==r&&(r="block"),d[e]=r),d[e]))}))},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var t=w(e);if(this[0]&&!t)var i=r(e).get(0),n=i.parentNode||this.length>1;return this.each((function(a){r(this).wrapAll(t?e.call(this,a):n?i.cloneNode(!0):i)}))},wrapAll:function(e){if(this[0]){var t;for(r(this[0]).before(e=r(e));(t=e.children()).length;)e=t.first();r(e).append(this)}return this},wrapInner:function(e){var t=w(e);return this.each((function(i){var n=r(this),a=n.contents(),s=t?e.call(this,i):e;a.length?a.wrapAll(s):n.append(s)}))},unwrap:function(){return this.parent().each((function(){r(this).replaceWith(r(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return this.each((function(){var i=r(this);(t===e?"none"==i.css("display"):t)?i.show():i.hide()}))},prev:function(e){return r(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return r(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each((function(t){var i=this.innerHTML;r(this).empty().append(Y(this,e,t,i))})):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each((function(t){var r=Y(this,e,t,this.textContent);this.textContent=null==r?"":""+r})):0 in this?this.pluck("textContent").join(""):null},attr:function(r,i){var n;return"string"!=typeof r||1 in arguments?this.each((function(e){if(1===this.nodeType)if(N(r))for(t in r)W(this,t,r[t]);else W(this,r,Y(this,i,e,this.getAttribute(r)))})):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(r))?n:e},removeAttr:function(e){return this.each((function(){1===this.nodeType&&e.split(" ").forEach((function(e){W(this,e)}),this)}))},prop:function(e,t){return e=C[e]||e,1 in arguments?this.each((function(r){this[e]=Y(this,t,r,this[e])})):this[0]&&this[0][e]},removeProp:function(e){return e=C[e]||e,this.each((function(){delete this[e]}))},data:function(t,r){var i="data-"+t.replace(y,"-$1").toLowerCase(),n=1 in arguments?this.attr(i,r):this.attr(i);return null!==n?q(n):e},val:function(e){return 0 in arguments?(null==e&&(e=""),this.each((function(t){this.value=Y(this,e,t,this.value)}))):this[0]&&(this[0].multiple?r(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var i=r(this),n=Y(this,e,t,i.offset()),a=i.offsetParent().offset(),s={top:n.top-a.top,left:n.left-a.left};"static"==i.css("position")&&(s.position="relative"),i.css(s)}));if(!this.length)return null;if(c.documentElement!==this[0]&&!r.contains(c.documentElement,this[0]))return{top:0,left:0};var t=this[0].getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,width:Math.round(t.width),height:Math.round(t.height)}},css:function(e,i){if(arguments.length<2){var a=this[0];if("string"==typeof e){if(!a)return;return a.style[n(e)]||getComputedStyle(a,"").getPropertyValue(e)}if(I(e)){if(!a)return;var s={},o=getComputedStyle(a,"");return r.each(e,(function(e,t){s[t]=a.style[n(t)]||o.getPropertyValue(t)})),s}}var l="";if("string"==O(e))i||0===i?l=U(e)+":"+G(e,i):this.each((function(){this.style.removeProperty(U(e))}));else for(t in e)e[t]||0===e[t]?l+=U(t)+":"+G(t,e[t])+";":this.each((function(){this.style.removeProperty(U(t))}));return this.each((function(){this.style.cssText+=";"+l}))},index:function(e){return e?this.indexOf(r(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&s.some.call(this,(function(e){return this.test(z(e))}),B(e))},addClass:function(e){return e?this.each((function(t){if("className"in this){i=[];var n=z(this);Y(this,e,t,n).split(/\s+/g).forEach((function(e){r(this).hasClass(e)||i.push(e)}),this),i.length&&z(this,n+(n?" ":"")+i.join(" "))}})):this},removeClass:function(t){return this.each((function(r){if("className"in this){if(t===e)return z(this,"");i=z(this),Y(this,t,r,i).split(/\s+/g).forEach((function(e){i=i.replace(B(e)," ")})),z(this,i.trim())}}))},toggleClass:function(t,i){return t?this.each((function(n){var a=r(this);Y(this,t,n,z(this)).split(/\s+/g).forEach((function(t){(i===e?!a.hasClass(t):i)?a.addClass(t):a.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var r="scrollTop"in this[0];return t===e?r?this[0].scrollTop:this[0].pageYOffset:this.each(r?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var r="scrollLeft"in this[0];return t===e?r?this[0].scrollLeft:this[0].pageXOffset:this.each(r?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var e=this[0],t=this.offsetParent(),i=this.offset(),n=m.test(t[0].nodeName)?{top:0,left:0}:t.offset();return i.top-=parseFloat(r(e).css("margin-top"))||0,i.left-=parseFloat(r(e).css("margin-left"))||0,n.top+=parseFloat(r(t[0]).css("border-top-width"))||0,n.left+=parseFloat(r(t[0]).css("border-left-width"))||0,{top:i.top-n.top,left:i.left-n.left}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||c.body;e&&!m.test(e.nodeName)&&"static"==r(e).css("position");)e=e.offsetParent;return e}))}},r.fn.detach=r.fn.remove,["width","height"].forEach((function(t){var i=t.replace(/./,(function(e){return e[0].toUpperCase()}));r.fn[t]=function(n){var a,s=this[0];return n===e?P(s)?s["inner"+i]:x(s)?s.documentElement["scroll"+i]:(a=this.offset())&&a[t]:this.each((function(e){(s=r(this)).css(t,Y(this,n,e,s[t]()))}))}})),["after","prepend","before","append"].forEach((function(t,i){var n=i%2;r.fn[t]=function(){var t,a,s=r.map(arguments,(function(i){var n=[];return"array"==(t=O(i))?(i.forEach((function(t){return t.nodeType!==e?n.push(t):r.zepto.isZ(t)?n=n.concat(t.get()):void(n=n.concat(D.fragment(t)))})),n):"object"==t||null==i?i:D.fragment(i)})),o=this.length>1;return s.length<1?this:this.each((function(e,t){a=n?t:t.parentNode,t=0==i?t.nextSibling:1==i?t.firstChild:2==i?t:null;var l=r.contains(c.documentElement,a);s.forEach((function(e){if(o)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,t),l&&X(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var t=e.ownerDocument?e.ownerDocument.defaultView:window;t.eval.call(t,e.innerHTML)}}))}))}))},r.fn[n?t+"To":"insert"+(i?"Before":"After")]=function(e){return r(e)[t](this),this}})),D.Z.prototype=K.prototype=r.fn,D.uniq=a,D.deserializeValue=q,r.zepto=D,r}();window.Zepto=F,void 0===window.$&&(window.$=F),function(e){var t,r,i=+new Date,n=window.document,a=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,o=/^(?:text|application)\/xml/i,l="application/json",u="text/html",c=/^\s*$/,d=n.createElement("a");function h(t,r,i,a){if(t.global)return function(t,r,i){var n=e.Event(r);return e(t).trigger(n,i),!n.isDefaultPrevented()}(r||n,i,a)}function f(e,t){var r=t.context;if(!1===t.beforeSend.call(r,e,t)||!1===h(t,r,"ajaxBeforeSend",[e,t]))return!1;h(t,r,"ajaxSend",[e,t])}function g(e,t,r,i){var n=r.context,a="success";r.success.call(n,e,a,t),i&&i.resolveWith(n,[e,a,t]),h(r,n,"ajaxSuccess",[t,r,e]),v(a,t,r)}function p(e,t,r,i,n){var a=i.context;i.error.call(a,r,t,e),n&&n.rejectWith(a,[r,t,e]),h(i,a,"ajaxError",[r,i,e||t]),v(t,r,i)}function v(t,r,i){var n=i.context;i.complete.call(n,r,t),h(i,n,"ajaxComplete",[r,i]),function(t){t.global&&!--e.active&&h(t,null,"ajaxStop")}(i)}function m(){}function y(e,t){return""==t?e:(e+"&"+t).replace(/[&?]{1,2}/,"?")}function A(t,r,i,n){return e.isFunction(r)&&(n=i,i=r,r=void 0),e.isFunction(i)||(n=i,i=void 0),{url:t,data:r,success:i,dataType:n}}d.href=window.location.href,e.active=0,e.ajaxJSONP=function(t,r){if(!("type"in t))return e.ajax(t);var a,s,o=t.jsonpCallback,l=(e.isFunction(o)?o():o)||"Zepto"+i++,u=n.createElement("script"),c=window[l],d=function(t){e(u).triggerHandler("error",t||"abort")},h={abort:d};return r&&r.promise(h),e(u).on("load error",(function(i,n){clearTimeout(s),e(u).off().remove(),"error"!=i.type&&a?g(a[0],h,t,r):p(null,n||"error",h,t,r),window[l]=c,a&&e.isFunction(c)&&c(a[0]),c=a=void 0})),!1===f(h,t)?(d("abort"),h):(window[l]=function(){a=arguments},u.src=t.url.replace(/\?(.+)=\?/,"?$1="+l),n.head.appendChild(u),t.timeout>0&&(s=setTimeout((function(){d("timeout")}),t.timeout)),h)},e.ajaxSettings={type:"GET",beforeSend:m,success:m,error:m,complete:m,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:l,xml:"application/xml, text/xml",html:u,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:m},e.ajax=function(i){var a,v,A=e.extend({},i||{}),E=e.Deferred&&e.Deferred();for(t in e.ajaxSettings)void 0===A[t]&&(A[t]=e.ajaxSettings[t]);!function(t){t.global&&0==e.active++&&h(t,null,"ajaxStart")}(A),A.crossDomain||((a=n.createElement("a")).href=A.url,a.href=a.href,A.crossDomain=d.protocol+"//"+d.host!=a.protocol+"//"+a.host),A.url||(A.url=window.location.toString()),(v=A.url.indexOf("#"))>-1&&(A.url=A.url.slice(0,v)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=y(t.url,t.data),t.data=void 0)}(A);var T=A.dataType,b=/\?.+=\?/.test(A.url);if(b&&(T="jsonp"),!1!==A.cache&&(i&&!0===i.cache||"script"!=T&&"jsonp"!=T)||(A.url=y(A.url,"_="+Date.now())),"jsonp"==T)return b||(A.url=y(A.url,A.jsonp?A.jsonp+"=?":!1===A.jsonp?"":"callback=?")),e.ajaxJSONP(A,E);var S,_=A.accepts[T],k={},L=function(e,t){k[e.toLowerCase()]=[e,t]},D=/^([\w-]+:)\/\//.test(A.url)?RegExp.$1:window.location.protocol,R=A.xhr(),C=R.setRequestHeader;if(E&&E.promise(R),A.crossDomain||L("X-Requested-With","XMLHttpRequest"),L("Accept",_||"*/*"),(_=A.mimeType||_)&&(_.indexOf(",")>-1&&(_=_.split(",",2)[0]),R.overrideMimeType&&R.overrideMimeType(_)),(A.contentType||!1!==A.contentType&&A.data&&"GET"!=A.type.toUpperCase())&&L("Content-Type",A.contentType||"application/x-www-form-urlencoded"),A.headers)for(r in A.headers)L(r,A.headers[r]);if(R.setRequestHeader=L,R.onreadystatechange=function(){if(4==R.readyState){R.onreadystatechange=m,clearTimeout(S);var t,r=!1;if(R.status>=200&&R.status<300||304==R.status||0==R.status&&"file:"==D){if(T=T||function(e){return e&&(e=e.split(";",2)[0]),e&&(e==u?"html":e==l?"json":s.test(e)?"script":o.test(e)&&"xml")||"text"}(A.mimeType||R.getResponseHeader("content-type")),"arraybuffer"==R.responseType||"blob"==R.responseType)t=R.response;else{t=R.responseText;try{t=function(e,t,r){if(r.dataFilter==m)return e;var i=r.context;return r.dataFilter.call(i,e,t)}(t,T,A),"script"==T?(0,eval)(t):"xml"==T?t=R.responseXML:"json"==T&&(t=c.test(t)?null:e.parseJSON(t))}catch(e){r=e}if(r)return p(r,"parsererror",R,A,E)}g(t,R,A,E)}else p(R.statusText||null,R.status?"error":"abort",R,A,E)}},!1===f(R,A))return R.abort(),p(null,"abort",R,A,E),R;var I=!("async"in A)||A.async;if(R.open(A.type,A.url,I,A.username,A.password),A.xhrFields)for(r in A.xhrFields)R[r]=A.xhrFields[r];for(r in k)C.apply(R,k[r]);return A.timeout>0&&(S=setTimeout((function(){R.onreadystatechange=m,R.abort(),p(null,"timeout",R,A,E)}),A.timeout)),R.send(A.data?A.data:null),R},e.get=function(){return e.ajax(A.apply(null,arguments))},e.post=function(){var t=A.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=A.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,r,i){if(!this.length)return this;var n,s=this,o=t.split(/\s/),l=A(t,r,i),u=l.success;return o.length>1&&(l.url=o[0],n=o[1]),l.success=function(t){s.html(n?e("<div>").html(t.replace(a,"")).find(n):t),u&&u.apply(s,arguments)},e.ajax(l),this};var E=encodeURIComponent;function T(t,r,i,n){var a,s=e.isArray(r),o=e.isPlainObject(r);e.each(r,(function(r,l){a=e.type(l),n&&(r=i?n:n+"["+(o||"object"==a||"array"==a?r:"")+"]"),!n&&s?t.add(l.name,l.value):"array"==a||!i&&"object"==a?T(t,l,i,r):t.add(r,l)}))}e.param=function(t,r){var i=[];return i.add=function(t,r){e.isFunction(r)&&(r=r()),null==r&&(r=""),this.push(E(t)+"="+E(r))},T(i,t,r),i.join("&").replace(/%20/g,"+")}}(F),(x=F).Callbacks=function(e){e=x.extend({},e);var t,r,i,n,a,s,o=[],l=!e.once&&[],u=function(d){for(t=e.memory&&d,r=!0,s=n||0,n=0,a=o.length,i=!0;o&&s<a;++s)if(!1===o[s].apply(d[0],d[1])&&e.stopOnFalse){t=!1;break}i=!1,o&&(l?l.length&&u(l.shift()):t?o.length=0:c.disable())},c={add:function(){if(o){var r=o.length,s=function(t){x.each(t,(function(t,r){"function"==typeof r?e.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!=typeof r&&s(r)}))};s(arguments),i?a=o.length:t&&(n=r,u(t))}return this},remove:function(){return o&&x.each(arguments,(function(e,t){for(var r;(r=x.inArray(t,o,r))>-1;)o.splice(r,1),i&&(r<=a&&--a,r<=s&&--s)})),this},has:function(e){return!(!o||!(e?x.inArray(e,o)>-1:o.length))},empty:function(){return a=o.length=0,this},disable:function(){return o=l=t=void 0,this},disabled:function(){return!o},lock:function(){return l=void 0,t||c.disable(),this},locked:function(){return!l},fireWith:function(e,t){return!o||r&&!l||(t=[e,(t=t||[]).slice?t.slice():t],i?l.push(t):u(t)),this},fire:function(){return c.fireWith(this,arguments)},fired:function(){return!!r}};return c},function(e){var t=Array.prototype.slice;function r(t){var i=[["resolve","done",e.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",e.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",e.Callbacks({memory:1})]],n="pending",a={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var t=arguments;return r((function(r){e.each(i,(function(i,n){var o=e.isFunction(t[i])&&t[i];s[n[1]]((function(){var t=o&&o.apply(this,arguments);if(t&&e.isFunction(t.promise))t.promise().done(r.resolve).fail(r.reject).progress(r.notify);else{var i=this===a?r.promise():this,s=o?[t]:arguments;r[n[0]+"With"](i,s)}}))})),t=null})).promise()},promise:function(t){return null!=t?e.extend(t,a):a}},s={};return e.each(i,(function(e,t){var r=t[2],o=t[3];a[t[1]]=r.add,o&&r.add((function(){n=o}),i[1^e][2].disable,i[2][2].lock),s[t[0]]=function(){return s[t[0]+"With"](this===s?a:this,arguments),this},s[t[0]+"With"]=r.fireWith})),a.promise(s),t&&t.call(s,s),s}e.when=function(i){var n,a,s,o=t.call(arguments),l=o.length,u=0,c=1!==l||i&&e.isFunction(i.promise)?l:0,d=1===c?i:r(),h=function(e,r,i){return function(a){r[e]=this,i[e]=arguments.length>1?t.call(arguments):a,i===n?d.notifyWith(r,i):--c||d.resolveWith(r,i)}};if(l>1)for(n=new Array(l),a=new Array(l),s=new Array(l);u<l;++u)o[u]&&e.isFunction(o[u].promise)?o[u].promise().done(h(u,s,o)).fail(d.reject).progress(h(u,a,n)):--c;return c||d.resolveWith(s,o),d.promise()},e.Deferred=r}(F),function(e){var t,r=1,i=Array.prototype.slice,n=e.isFunction,a=function(e){return"string"==typeof e},s={},o={},l="onfocusin"in window,u={focus:"focusin",blur:"focusout"},c={mouseenter:"mouseover",mouseleave:"mouseout"};function d(e){return e._zid||(e._zid=r++)}function h(e,t,r,i){if((t=f(t)).ns)var n=(a=t.ns,new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)"));var a;return(s[d(e)]||[]).filter((function(e){return e&&(!t.e||e.e==t.e)&&(!t.ns||n.test(e.ns))&&(!r||d(e.fn)===d(r))&&(!i||e.sel==i)}))}function f(e){var t=(""+e).split(".");return{e:t[0],ns:t.slice(1).sort().join(" ")}}function g(e,t){return e.del&&!l&&e.e in u||!!t}function p(e){return c[e]||l&&u[e]||e}function v(r,i,n,a,o,l,u){var h=d(r),v=s[h]||(s[h]=[]);i.split(/\s/).forEach((function(i){if("ready"==i)return e(document).ready(n);var s=f(i);s.fn=n,s.sel=o,s.e in c&&(n=function(t){var r=t.relatedTarget;if(!r||r!==this&&!e.contains(this,r))return s.fn.apply(this,arguments)}),s.del=l;var d=l||n;s.proxy=function(e){if(!(e=b(e)).isImmediatePropagationStopped()){e.data=a;var i=d.apply(r,e._args==t?[e]:[e].concat(e._args));return!1===i&&(e.preventDefault(),e.stopPropagation()),i}},s.i=v.length,v.push(s),"addEventListener"in r&&r.addEventListener(p(s.e),s.proxy,g(s,u))}))}function m(e,t,r,i,n){var a=d(e);(t||"").split(/\s/).forEach((function(t){h(e,t,r,i).forEach((function(t){delete s[a][t.i],"removeEventListener"in e&&e.removeEventListener(p(t.e),t.proxy,g(t,n))}))}))}o.click=o.mousedown=o.mouseup=o.mousemove="MouseEvents",e.event={add:v,remove:m},e.proxy=function(t,r){var s=2 in arguments&&i.call(arguments,2);if(n(t)){var o=function(){return t.apply(r,s?s.concat(i.call(arguments)):arguments)};return o._zid=d(t),o}if(a(r))return s?(s.unshift(t[r],t),e.proxy.apply(null,s)):e.proxy(t[r],t);throw new TypeError("expected function")},e.fn.bind=function(e,t,r){return this.on(e,t,r)},e.fn.unbind=function(e,t){return this.off(e,t)},e.fn.one=function(e,t,r,i){return this.on(e,t,r,i,1)};var y=function(){return!0},A=function(){return!1},E=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,T={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function b(r,i){return!i&&r.isDefaultPrevented||(i||(i=r),e.each(T,(function(e,t){var n=i[e];r[e]=function(){return this[t]=y,n&&n.apply(i,arguments)},r[t]=A})),r.timeStamp||(r.timeStamp=Date.now()),(i.defaultPrevented!==t?i.defaultPrevented:"returnValue"in i?!1===i.returnValue:i.getPreventDefault&&i.getPreventDefault())&&(r.isDefaultPrevented=y)),r}function S(e){var r,i={originalEvent:e};for(r in e)E.test(r)||e[r]===t||(i[r]=e[r]);return b(i,e)}e.fn.delegate=function(e,t,r){return this.on(t,e,r)},e.fn.undelegate=function(e,t,r){return this.off(t,e,r)},e.fn.live=function(t,r){return e(document.body).delegate(this.selector,t,r),this},e.fn.die=function(t,r){return e(document.body).undelegate(this.selector,t,r),this},e.fn.on=function(r,s,o,l,u){var c,d,h=this;return r&&!a(r)?(e.each(r,(function(e,t){h.on(e,s,o,t,u)})),h):(a(s)||n(l)||!1===l||(l=o,o=s,s=t),l!==t&&!1!==o||(l=o,o=t),!1===l&&(l=A),h.each((function(t,n){u&&(c=function(e){return m(n,e.type,l),l.apply(this,arguments)}),s&&(d=function(t){var r,a=e(t.target).closest(s,n).get(0);if(a&&a!==n)return r=e.extend(S(t),{currentTarget:a,liveFired:n}),(c||l).apply(a,[r].concat(i.call(arguments,1)))}),v(n,r,l,o,s,d||c)})))},e.fn.off=function(r,i,s){var o=this;return r&&!a(r)?(e.each(r,(function(e,t){o.off(e,i,t)})),o):(a(i)||n(s)||!1===s||(s=i,i=t),!1===s&&(s=A),o.each((function(){m(this,r,s,i)})))},e.fn.trigger=function(t,r){return(t=a(t)||e.isPlainObject(t)?e.Event(t):b(t))._args=r,this.each((function(){t.type in u&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,r)}))},e.fn.triggerHandler=function(t,r){var i,n;return this.each((function(s,o){(i=S(a(t)?e.Event(t):t))._args=r,i.target=o,e.each(h(o,t.type||t),(function(e,t){if(n=t.proxy(i),i.isImmediatePropagationStopped())return!1}))})),n},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(e,t){a(e)||(e=(t=e).type);var r=document.createEvent(o[e]||"Events"),i=!0;if(t)for(var n in t)"bubbles"==n?i=!!t[n]:r[n]=t[n];return r.initEvent(e,i,!0),b(r)}}(F),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t,r){try{return e(t,r)}catch(e){return null}}}}(),function(e){var t=e.zepto,r=t.qsa,i=t.matches;function n(t){return!(!(t=e(t)).width()&&!t.height())&&"none"!==t.css("display")}var a=e.expr[":"]={visible:function(){if(n(this))return this},hidden:function(){if(!n(this))return this},selected:function(){if(this.selected)return this},checked:function(){if(this.checked)return this},parent:function(){return this.parentNode},first:function(e){if(0===e)return this},last:function(e,t){if(e===t.length-1)return this},eq:function(e,t,r){if(e===r)return this},contains:function(t,r,i){if(e(this).text().indexOf(i)>-1)return this},has:function(e,r,i){if(t.qsa(this,i).length)return this}},s=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),o=/^\s*>/,l="Zepto"+ +new Date;function u(e,t){e=e.replace(/=#\]/g,'="#"]');var r,i,n=s.exec(e);if(n&&n[2]in a&&(r=a[n[2]],i=n[3],e=n[1],i)){var o=Number(i);i=isNaN(o)?i.replace(/^["']|["']$/g,""):o}return t(e,r,i)}t.qsa=function(i,n){return u(n,(function(a,s,u){try{var c;!a&&s?a="*":o.test(a)&&(c=e(i).addClass(l),a="."+l+" "+a);var d=r(i,a)}catch(e){throw console.error("error performing selector: %o",n),e}finally{c&&c.removeClass(l)}return s?t.uniq(e.map(d,(function(e,t){return s.call(e,t,d,u)}))):d}))},t.matches=function(e,t){return u(t,(function(t,r,n){return(!t||i(e,t))&&(!r||r.call(e,null,n)===e)}))}}(F);var M,U,B,G=F,j=[{name:"Chromium",group:"Chrome",identifier:"Chromium/([0-9.]*)"},{name:"Chrome Mobile",group:"Chrome",identifier:"Chrome/([0-9.]*) Mobile",versionIdentifier:"Chrome/([0-9.]*)"},{name:"Chrome",group:"Chrome",identifier:"Chrome/([0-9.]*)"},{name:"Chrome for iOS",group:"Chrome",identifier:"CriOS/([0-9.]*)"},{name:"Android Browser",group:"Chrome",identifier:"CrMo/([0-9.]*)"},{name:"Firefox",group:"Firefox",identifier:"Firefox/([0-9.]*)"},{name:"Opera Mini",group:"Opera",identifier:"Opera Mini/([0-9.]*)"},{name:"Opera",group:"Opera",identifier:"Opera ([0-9.]*)"},{name:"Opera",group:"Opera",identifier:"Opera/([0-9.]*)",versionIdentifier:"Version/([0-9.]*)"},{name:"IEMobile",group:"Explorer",identifier:"IEMobile/([0-9.]*)"},{name:"Internet Explorer",group:"Explorer",identifier:"MSIE ([a-zA-Z0-9.]*)"},{name:"Internet Explorer",group:"Explorer",identifier:"Trident/([0-9.]*)",versionIdentifier:"rv:([0-9.]*)"},{name:"Spartan",group:"Spartan",identifier:"Edge/([0-9.]*)",versionIdentifier:"Edge/([0-9.]*)"},{name:"Safari",group:"Safari",identifier:"Safari/([0-9.]*)",versionIdentifier:"Version/([0-9.]*)"}],K=[{name:"Windows 2000",group:"Windows",identifier:"Windows NT 5.0",version:"5.0"},{name:"Windows XP",group:"Windows",identifier:"Windows NT 5.1",version:"5.1"},{name:"Windows Vista",group:"Windows",identifier:"Windows NT 6.0",version:"6.0"},{name:"Windows 7",group:"Windows",identifier:"Windows NT 6.1",version:"7.0"},{name:"Windows 8",group:"Windows",identifier:"Windows NT 6.2",version:"8.0"},{name:"Windows 8.1",group:"Windows",identifier:"Windows NT 6.3",version:"8.1"},{name:"Windows 10",group:"Windows",identifier:"Windows NT 10.0",version:"10.0"},{name:"Windows Phone",group:"Windows Phone",identifier:"Windows Phone ([0-9.]*)"},{name:"Windows Phone",group:"Windows Phone",identifier:"Windows Phone OS ([0-9.]*)"},{name:"Windows",group:"Windows",identifier:"Windows"},{name:"Chrome OS",group:"Chrome OS",identifier:"CrOS"},{name:"Android",group:"Android",identifier:"Android",versionIdentifier:"Android ([a-zA-Z0-9.-]*)"},{name:"iPad",group:"iOS",identifier:"iPad",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"iPod",group:"iOS",identifier:"iPod",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"iPhone",group:"iOS",identifier:"iPhone OS",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"Mac OS X High Sierra",group:"Mac OS",identifier:"Mac OS X (10([_|.])13([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Sierra",group:"Mac OS",identifier:"Mac OS X (10([_|.])12([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X El Capitan",group:"Mac OS",identifier:"Mac OS X (10([_|.])11([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Yosemite",group:"Mac OS",identifier:"Mac OS X (10([_|.])10([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Mavericks",group:"Mac OS",identifier:"Mac OS X (10([_|.])9([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Mountain Lion",group:"Mac OS",identifier:"Mac OS X (10([_|.])8([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Lion",group:"Mac OS",identifier:"Mac OS X (10([_|.])7([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Snow Leopard",group:"Mac OS",identifier:"Mac OS X (10([_|.])6([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Leopard",group:"Mac OS",identifier:"Mac OS X (10([_|.])5([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Tiger",group:"Mac OS",identifier:"Mac OS X (10([_|.])4([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Panther",group:"Mac OS",identifier:"Mac OS X (10([_|.])3([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Jaguar",group:"Mac OS",identifier:"Mac OS X (10([_|.])2([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Puma",group:"Mac OS",identifier:"Mac OS X (10([_|.])1([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Cheetah",group:"Mac OS",identifier:"Mac OS X (10([_|.])0([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS",group:"Mac OS",identifier:"Mac OS"},{name:"Ubuntu",group:"Linux",identifier:"Ubuntu",versionIdentifier:"Ubuntu/([0-9.]*)"},{name:"Debian",group:"Linux",identifier:"Debian"},{name:"Gentoo",group:"Linux",identifier:"Gentoo"},{name:"Linux",group:"Linux",identifier:"Linux"},{name:"BlackBerry",group:"BlackBerry",identifier:"BlackBerry"}],H={},V=function(e,t){var r=e.split(".",2);t.fullVersion=e,r[0]&&(t.majorVersion=parseInt(r[0])),r[1]&&(t.minorVersion=parseInt(r[1]))},Y=function(e,t,r){var i="["==t.substr(0,1)?new RegExp(t,"g"):t,n=e.split(i,2);"."!=t&&(e=e.replace(new RegExp(t,"g"),".")),r.fullVersion=e,n&&n[0]&&(r.majorVersion=parseInt(n[0])),n&&n[1]&&(r.minorVersion=parseInt(n[1]))},W=function(e){var t,r=e.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];if(/trident/i.test(r[1]))return t=/\brv[ :]+(\d+)/g.exec(e)||[],{name:"IE",version:parseInt(t[1]||"")};if("Chrome"===r[1]){if(null!=(t=e.match(/\bOPR\/(\d+)/)))return{name:"Opera",version:parseInt(t[1])};if(null!=(t=e.match(/\bEdge\/(\d+)/)))return{name:"Edge",version:parseInt(t[1])}}else/android/i.test(e)&&(t=e.match(/version\/(\d+)/i))&&(r.splice(1,1,"Android WebView"),r.splice(2,1,t[1]));return{name:(r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"])[0],version:parseInt(r[1])}}(navigator.userAgent);H.isEdge=/Edg|EdgiOS|EdgA/i.test(navigator.userAgent),H.isChrome=/Chrome|CriOS/i.test(navigator.userAgent)&&!H.isEdge,H.isSafari=/Safari/i.test(navigator.userAgent)&&!H.isChrome&&!H.isEdge,H.isFirefox=/Firefox/i.test(navigator.userAgent),H.isLegacyIE=!!window.ActiveXObject,H.isIE=H.isLegacyIE||/trident.*rv:1\d/i.test(navigator.userAgent),H.isIE11=/trident.*rv:11/i.test(navigator.userAgent),H.isChromecast=H.isChrome&&/CrKey/i.test(navigator.userAgent),H.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Mobile Safari|Opera Mini/i.test(navigator.userAgent),H.isiOS=/iPad|iPhone|iPod/i.test(navigator.userAgent),H.isAndroid=/Android/i.test(navigator.userAgent),H.isWindowsPhone=/Windows Phone/i.test(navigator.userAgent),H.isWin8App=/MSAppHost/i.test(navigator.userAgent),H.isWiiU=/WiiU/i.test(navigator.userAgent),H.isPS4=/PlayStation 4/i.test(navigator.userAgent),H.hasLocalstorage=function(){try{return localStorage.setItem("clappr","clappr"),localStorage.removeItem("clappr"),!0}catch(e){return!1}}(),H.hasFlash=function(){try{return!!new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){return!(!navigator.mimeTypes||void 0===navigator.mimeTypes["application/x-shockwave-flash"]||!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)}}(),H.name=W.name,H.version=W.version,H.userAgent=navigator.userAgent,H.data=function(){var e,t={},r=H.userAgent.toLowerCase(),i=P(j);try{for(i.s();!(e=i.n()).done;){var n=e.value,a=new RegExp(n.identifier.toLowerCase()).exec(r);if(null!=a&&a[1]){if(t.name=n.name,t.group=n.group,n.versionIdentifier){var s=new RegExp(n.versionIdentifier.toLowerCase()).exec(r);null!=s&&s[1]&&V(s[1],t)}else V(a[1],t);break}}}catch(e){i.e(e)}finally{i.f()}return t}(),H.os=function(){var e,t={},r=H.userAgent.toLowerCase(),i=P(K);try{for(i.s();!(e=i.n()).done;){var n=e.value,a=new RegExp(n.identifier.toLowerCase()).exec(r);if(null!=a){if(t.name=n.name,t.group=n.group,n.version)Y(n.version,n.versionSeparator?n.versionSeparator:".",t);else if(a[1])Y(a[1],n.versionSeparator?n.versionSeparator:".",t);else if(n.versionIdentifier){var s=new RegExp(n.versionIdentifier.toLowerCase()).exec(r);null!=s&&s[1]&&Y(s[1],n.versionSeparator?n.versionSeparator:".",t)}break}}}catch(e){i.e(e)}finally{i.f()}return t}(),H.isWindows=/^Windows$/i.test(H.os.group),H.isMacOS=/^Mac OS$/i.test(H.os.group),H.isLinux=/^Linux$/i.test(H.os.group),H.viewport=((M={}).width=G(window).width(),M.height=G(window).height(),M),H.device=(U=H.userAgent,(B=/\((iP(?:hone|ad|od))?(?:[^;]*; ){0,2}([^)]+(?=\)))/.exec(U))&&(B[1]||B[2])||""),void 0!==window.orientation&&function(){switch(window.orientation){case-90:case 90:H.viewport.orientation="landscape";break;default:H.viewport.orientation="portrait"}}();var z={},q=[],X=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}).bind(window),$=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);function Z(e,t){if(t)for(var r in t){var i=Object.getOwnPropertyDescriptor(t,r);i?Object.defineProperty(e,r,i):e[r]=t[r]}return e}function Q(e,t){var r=function(e){T(i,e);var r=L(i);function i(){var e;m(this,i);for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];return e=r.call.apply(r,[this].concat(a)),t.initialize&&t.initialize.apply(_(e),a),e}return A(i)}(e);return Z(r.prototype,t),r}var J={fullscreenElement:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},requestFullscreen:function(e){if(e.requestFullscreen)return e.requestFullscreen();if(e.webkitRequestFullscreen){if("function"==typeof e.then)return e.webkitRequestFullscreen();e.webkitRequestFullscreen()}else{if(e.mozRequestFullScreen)return e.mozRequestFullScreen();if(e.msRequestFullscreen)return e.msRequestFullscreen();e.querySelector&&e.querySelector("video")&&e.querySelector("video").webkitEnterFullScreen?e.querySelector("video").webkitEnterFullScreen():e.webkitEnterFullScreen&&e.webkitEnterFullScreen()}},cancelFullscreen:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;e.exitFullscreen?e.exitFullscreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen()},fullscreenEnabled:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},ee=function(){function e(){m(this,e)}return A(e,null,[{key:"params",get:function(){var e=window.location.search.substring(1);return e!==this.query&&(this._urlParams=this.parse(e),this.query=e),this._urlParams}},{key:"hashParams",get:function(){var e=window.location.hash.substring(1);return e!==this.hash&&(this._hashParams=this.parse(e),this.hash=e),this._hashParams}},{key:"parse",value:function(e){for(var t,r=/\+/g,i=/([^&=]+)=?([^&]*)/g,n=function(e){return decodeURIComponent(e.replace(r," "))},a={};t=i.exec(e);)a[n(t[1]).toLowerCase()]=n(t[2]);return a}}]),e}();function te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"t",t=0,r=ee.params[e]||ee.hashParams[e]||"",i=r.match(/[0-9]+[hms]+/g)||[];if(i.length>0){var n={h:3600,m:60,s:1};i.forEach((function(e){if(e){var r=e[e.length-1],i=parseInt(e.slice(0,e.length-1),10);t+=i*n[r]}}))}else r&&(t=parseInt(r,10));return t}function re(e){return z[e]||(z[e]=0),e+ ++z[e]}function ie(e){return e-parseFloat(e)+1>=0}function ne(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}function ae(){return window.navigator&&window.navigator.language}function se(e,t){var r=(t=Object.assign({inline:!1,muted:!1,timeout:250,type:"video",source:N.mp4,element:null},t)).element?t.element:document.createElement(t.type);r.muted=t.muted,!0===t.muted&&r.setAttribute("muted","muted"),!0===t.inline&&r.setAttribute("playsinline","playsinline"),r.src=t.source;var i=r.play(),n=setTimeout((function(){a(!1,new Error("Timeout ".concat(t.timeout," ms has been reached")))}),t.timeout),a=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;clearTimeout(n),e(t,r)};void 0!==i?i.then((function(){return a(!0)})).catch((function(e){return a(!1,e)})):a(!0)}var oe=function(){function e(){m(this,e)}return A(e,null,[{key:"configure",value:function(e){this.options=G.extend(!0,this.options,e)}},{key:"create",value:function(e){return this.options.recycleVideo&&"video"===e&&q.length>0?q.shift():document.createElement(e)}},{key:"garbage",value:function(e){this.options.recycleVideo&&"VIDEO"===e.tagName.toUpperCase()&&(G(e).children().remove(),Object.values(e.attributes).forEach((function(t){return e.removeAttribute(t.name)})),q.push(e))}}]),e}();oe.options={recycleVideo:!1};var le=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;m(this,e),this.delay=t,this.lastTime=0}return A(e,[{key:"handle",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=(new Date).getTime(),n=i-this.lastTime;n<this.delay&&n>0&&(t(),r&&e.preventDefault()),this.lastTime=i}}]),e}(),ue=function(){return window.performance&&window.performance.now?performance.now():Date.now()},ce=function(e,t){return void 0!==e&&void 0!==t&&void 0!==t.find((function(t){return e.toLowerCase()===t.toLowerCase()}))},de="font-weight: bold; font-size: 13px;",he="color: #ff8000;"+de,fe="color: #ff0000;"+de,ge=["color: #0000ff;"+de,"color: #006600;"+de,he,fe,fe],pe=["debug","info","warn","error","disabled"],ve=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;m(this,e),this.EXCLUDE_LIST=["timeupdate","playback:timeupdate","playback:progress","container:hover","container:timeupdate","container:progress"],this.level=t,this.previousLevel=this.level,this.offLevel=r}return A(e,[{key:"level",get:function(){return this._level},set:function(e){this._level=e}},{key:"debug",value:function(e){this.log(e,0,Array.prototype.slice.call(arguments,1))}},{key:"info",value:function(e){this.log(e,1,Array.prototype.slice.call(arguments,1))}},{key:"warn",value:function(e){this.log(e,2,Array.prototype.slice.call(arguments,1))}},{key:"error",value:function(e){this.log(e,3,Array.prototype.slice.call(arguments,1))}},{key:"onOff",value:function(){this.level===this.offLevel?this.level=this.previousLevel:(this.previousLevel=this.level,this.level=this.offLevel),window.console&&window.console.log&&window.console.log("%c[Clappr.Log] set log level to "+pe[this.level],he)}},{key:"log",value:function(e,t,r){if(!(this.EXCLUDE_LIST.indexOf(r[0])>=0||t<this.level)){r||(r=e,e=null);var i=ge[t],n="";e&&(n="["+e+"]"),window.console&&window.console.log&&window.console.log.apply(console,["%c["+pe[t]+"]"+n,i].concat(r))}}}]),e}();ve.LEVEL_DEBUG=0,ve.LEVEL_INFO=1,ve.LEVEL_WARN=2,ve.LEVEL_ERROR=3,ve.getInstance=function(){return void 0===this._instance&&(this._instance=new this),this._instance},ve.setLevel=function(e){this.getInstance().level=e},ve.debug=function(){this.getInstance().debug.apply(this.getInstance(),arguments)},ve.info=function(){this.getInstance().info.apply(this.getInstance(),arguments)},ve.warn=function(){this.getInstance().warn.apply(this.getInstance(),arguments)},ve.error=function(){this.getInstance().error.apply(this.getInstance(),arguments)};var me=Array.prototype.slice,ye=/\s+/,Ae=function(e,t,r,i){if(!r)return!0;if("object"===v(r)){for(var n in r)e[t].apply(e,[n,r[n]].concat(i));return!1}if(ye.test(r)){for(var a=r.split(ye),s=0,o=a.length;s<o;s++)e[t].apply(e,[a[s]].concat(i));return!1}return!0},Ee=function(e,t,r,i){var n,a=-1,s=e.length,o=t[0],l=t[1],u=t[2];!function c(){try{switch(t.length){case 0:for(;++a<s;)(n=e[a]).callback.call(n.ctx);return;case 1:for(;++a<s;)(n=e[a]).callback.call(n.ctx,o);return;case 2:for(;++a<s;)(n=e[a]).callback.call(n.ctx,o,l);return;case 3:for(;++a<s;)(n=e[a]).callback.call(n.ctx,o,l,u);return;default:for(;++a<s;)(n=e[a]).callback.apply(n.ctx,t);return}}catch(e){ve.error.apply(ve,[r,"error on event",i,"trigger","-",e]),c()}}()},Te=function(){function e(){m(this,e)}return A(e,[{key:"on",value:function(e,t,r){return Ae(this,"on",e,[t,r])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:r,ctx:r||this}),this):this}},{key:"once",value:function(e,t,r){var i,n=this;if(!Ae(this,"once",e,[t,r])||!t)return this;var a=function(){return n.off(e,i)};return i=function(){a(),t.apply(this,arguments)},this.on(e,i,r)}},{key:"off",value:function(e,t,r){var i,n,a,s,o,l,u,c;if(!this._events||!Ae(this,"off",e,[t,r]))return this;if(!e&&!t&&!r)return this._events=void 0,this;for(o=0,l=(s=e?[e]:Object.keys(this._events)).length;o<l;o++)if(e=s[o],a=this._events[e]){if(this._events[e]=i=[],t||r)for(u=0,c=a.length;u<c;u++)n=a[u],(t&&t!==n.callback&&t!==n.callback._callback||r&&r!==n.context)&&i.push(n);i.length||delete this._events[e]}return this}},{key:"trigger",value:function(e){var t=this.name||this.constructor.name;if(ve.debug.apply(ve,[t].concat(Array.prototype.slice.call(arguments))),!this._events)return this;var r=me.call(arguments,1);if(!Ae(this,"trigger",e,r))return this;var i=this._events[e],n=this._events.all;return i&&Ee(i,r,t,e),n&&Ee(n,arguments,t,e),this}},{key:"stopListening",value:function(e,t,r){var i=this._listeningTo;if(!i)return this;var n=!t&&!r;for(var a in r||"object"!==v(t)||(r=this),e&&((i={})[e._listenId]=e),i)(e=i[a]).off(t,r,this),(n||0===Object.keys(e._events).length)&&delete this._listeningTo[a];return this}}],[{key:"register",value:function(t){e.Custom||(e.Custom={});var r="string"==typeof t&&t.toUpperCase().trim();r&&!e.Custom[r]?e.Custom[r]=r.toLowerCase().split("_").map((function(e,t){return 0===t?e:e=e[0].toUpperCase()+e.slice(1)})).join(""):ve.error("Events","Error when register event: "+t)}},{key:"listAvailableCustomEvents",value:function(){return e.Custom||(e.Custom={}),Object.keys(e.Custom).filter((function(t){return"string"==typeof e.Custom[t]}))}}]),e}(),be={listenTo:"on",listenToOnce:"once"};Object.keys(be).forEach((function(e){Te.prototype[e]=function(t,r,i){return(this._listeningTo||(this._listeningTo={}))[t._listenId||(t._listenId=re("l"))]=t,i||"object"!==v(r)||(i=this),t[be[e]](r,i,this),this}})),Te.PLAYER_READY="ready",Te.PLAYER_RESIZE="resize",Te.PLAYER_FULLSCREEN="fullscreen",Te.PLAYER_PLAY="play",Te.PLAYER_PAUSE="pause",Te.PLAYER_STOP="stop",Te.PLAYER_ENDED="ended",Te.PLAYER_SEEK="seek",Te.PLAYER_ERROR="playererror",Te.ERROR="error",Te.PLAYER_TIMEUPDATE="timeupdate",Te.PLAYER_VOLUMEUPDATE="volumeupdate",Te.PLAYER_SUBTITLE_AVAILABLE="subtitleavailable",Te.PLAYBACK_PROGRESS="playback:progress",Te.PLAYBACK_TIMEUPDATE="playback:timeupdate",Te.PLAYBACK_READY="playback:ready",Te.PLAYBACK_BUFFERING="playback:buffering",Te.PLAYBACK_BUFFERFULL="playback:bufferfull",Te.PLAYBACK_SETTINGSUPDATE="playback:settingsupdate",Te.PLAYBACK_LOADEDMETADATA="playback:loadedmetadata",Te.PLAYBACK_HIGHDEFINITIONUPDATE="playback:highdefinitionupdate",Te.PLAYBACK_BITRATE="playback:bitrate",Te.PLAYBACK_LEVELS_AVAILABLE="playback:levels:available",Te.PLAYBACK_LEVEL_SWITCH_START="playback:levels:switch:start",Te.PLAYBACK_LEVEL_SWITCH_END="playback:levels:switch:end",Te.PLAYBACK_PLAYBACKSTATE="playback:playbackstate",Te.PLAYBACK_DVR="playback:dvr",Te.PLAYBACK_MEDIACONTROL_DISABLE="playback:mediacontrol:disable",Te.PLAYBACK_MEDIACONTROL_ENABLE="playback:mediacontrol:enable",Te.PLAYBACK_ENDED="playback:ended",Te.PLAYBACK_PLAY_INTENT="playback:play:intent",Te.PLAYBACK_PLAY="playback:play",Te.PLAYBACK_PAUSE="playback:pause",Te.PLAYBACK_SEEK="playback:seek",Te.PLAYBACK_SEEKED="playback:seeked",Te.PLAYBACK_STOP="playback:stop",Te.PLAYBACK_ERROR="playback:error",Te.PLAYBACK_STATS_ADD="playback:stats:add",Te.PLAYBACK_FRAGMENT_LOADED="playback:fragment:loaded",Te.PLAYBACK_LEVEL_SWITCH="playback:level:switch",Te.PLAYBACK_SUBTITLE_AVAILABLE="playback:subtitle:available",Te.PLAYBACK_SUBTITLE_CHANGED="playback:subtitle:changed",Te.PLAYBACK_AUDIO_AVAILABLE="playback:audio:available",Te.PLAYBACK_AUDIO_CHANGED="playback:audio:changed",Te.CORE_CONTAINERS_CREATED="core:containers:created",Te.CORE_ACTIVE_CONTAINER_CHANGED="core:active:container:changed",Te.CORE_OPTIONS_CHANGE="core:options:change",Te.CORE_READY="core:ready",Te.CORE_FULLSCREEN="core:fullscreen",Te.CORE_RESIZE="core:resize",Te.CORE_SCREEN_ORIENTATION_CHANGED="core:screen:orientation:changed",Te.CORE_MOUSE_MOVE="core:mousemove",Te.CORE_MOUSE_LEAVE="core:mouseleave",Te.CONTAINER_PLAYBACKSTATE="container:playbackstate",Te.CONTAINER_PLAYBACKDVRSTATECHANGED="container:dvr",Te.CONTAINER_BITRATE="container:bitrate",Te.CONTAINER_STATS_REPORT="container:stats:report",Te.CONTAINER_DESTROYED="container:destroyed",Te.CONTAINER_READY="container:ready",Te.CONTAINER_RESIZE="container:resize",Te.CONTAINER_ERROR="container:error",Te.CONTAINER_LOADEDMETADATA="container:loadedmetadata",Te.CONTAINER_SUBTITLE_AVAILABLE="container:subtitle:available",Te.CONTAINER_SUBTITLE_CHANGED="container:subtitle:changed",Te.CONTAINER_AUDIO_AVAILABLE="container:audio:available",Te.CONTAINER_AUDIO_CHANGED="container:audio:changed",Te.CONTAINER_TIMEUPDATE="container:timeupdate",Te.CONTAINER_PROGRESS="container:progress",Te.CONTAINER_PLAY="container:play",Te.CONTAINER_STOP="container:stop",Te.CONTAINER_PAUSE="container:pause",Te.CONTAINER_ENDED="container:ended",Te.CONTAINER_CLICK="container:click",Te.CONTAINER_DBLCLICK="container:dblclick",Te.CONTAINER_CONTEXTMENU="container:contextmenu",Te.CONTAINER_MOUSE_ENTER="container:mouseenter",Te.CONTAINER_MOUSE_LEAVE="container:mouseleave",Te.CONTAINER_MOUSE_UP="container:mouseup",Te.CONTAINER_MOUSE_DOWN="container:mousedown",Te.CONTAINER_SEEK="container:seek",Te.CONTAINER_SEEKED="container:seeked",Te.CONTAINER_VOLUME="container:volume",Te.CONTAINER_FULLSCREEN="container:fullscreen",Te.CONTAINER_STATE_BUFFERING="container:state:buffering",Te.CONTAINER_STATE_BUFFERFULL="container:state:bufferfull",Te.CONTAINER_SETTINGSUPDATE="container:settingsupdate",Te.CONTAINER_HIGHDEFINITIONUPDATE="container:highdefinitionupdate",Te.CONTAINER_MEDIACONTROL_SHOW="container:mediacontrol:show",Te.CONTAINER_MEDIACONTROL_HIDE="container:mediacontrol:hide",Te.CONTAINER_MEDIACONTROL_DISABLE="container:mediacontrol:disable",Te.CONTAINER_MEDIACONTROL_ENABLE="container:mediacontrol:enable",Te.CONTAINER_STATS_ADD="container:stats:add",Te.CONTAINER_OPTIONS_CHANGE="container:options:change",Te.MEDIACONTROL_RENDERED="mediacontrol:rendered",Te.MEDIACONTROL_FULLSCREEN="mediacontrol:fullscreen",Te.MEDIACONTROL_SHOW="mediacontrol:show",Te.MEDIACONTROL_HIDE="mediacontrol:hide",Te.MEDIACONTROL_MOUSEMOVE_SEEKBAR="mediacontrol:mousemove:seekbar",Te.MEDIACONTROL_MOUSELEAVE_SEEKBAR="mediacontrol:mouseleave:seekbar",Te.MEDIACONTROL_PLAYING="mediacontrol:playing",Te.MEDIACONTROL_NOTPLAYING="mediacontrol:notplaying",Te.MEDIACONTROL_CONTAINERCHANGED="mediacontrol:containerchanged",Te.MEDIACONTROL_OPTIONS_CHANGE="mediacontrol:options:change";var Se=function(e){T(r,e);var t=L(r);function r(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m(this,r),(e=t.call(this,i))._options=i,e.uniqueId=re("o"),e}return A(r,[{key:"options",get:function(){return this._options}}]),r}(Te),_e={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},ke=/(.)^/,Le={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},De=/\\|'|\r|\n|\t|\u2028|\u2029/g,Re={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},Ce=new RegExp("[&<>\"']","g"),Ie=function(e){return null===e?"":(""+e).replace(Ce,(function(e){return Re[e]}))},Oe=0,we=function(e,t){var r,i=new RegExp([(_e.escape||ke).source,(_e.interpolate||ke).source,(_e.evaluate||ke).source].join("|")+"|$","g"),n=0,a="__p+='";e.replace(i,(function(t,r,i,s,o){return a+=e.slice(n,o).replace(De,(function(e){return"\\"+Le[e]})),r&&(a+="'+\n((__t=("+r+"))==null?'':escapeExpr(__t))+\n'"),i&&(a+="'+\n((__t=("+i+"))==null?'':__t)+\n'"),s&&(a+="';\n"+s+"\n__p+='"),n=o+t.length,t})),a+="';\n",_e.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n//# sourceURL=/microtemplates/source["+Oe+++"]";try{r=new Function(_e.variable||"obj","escapeExpr",a)}catch(e){throw e.source=a,e}if(t)return r(t,Ie);var s=function(e){return r.call(this,e,Ie)};return s.source="function("+(_e.variable||"obj")+"){\n"+a+"}",s};we.settings=_e;var Pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{baseUrl:""};return G('<style class="clappr-style"></style>').html(we(e.toString())(t))},xe=/^(\S+)\s*(.*)$/,Ne=function(e){T(r,e);var t=L(r);function r(e){var i;return m(this,r),(i=t.call(this,e)).cid=re("c"),i._ensureElement(),i.delegateEvents(),i}return A(r,[{key:"tagName",get:function(){return"div"}},{key:"events",get:function(){return{}}},{key:"attributes",get:function(){return{}}},{key:"$",value:function(e){return this.$el.find(e)}},{key:"render",value:function(){return this}},{key:"destroy",value:function(){return this.$el.remove(),this.stopListening(),this.undelegateEvents(),this}},{key:"setElement",value:function(e,t){return this.$el&&this.undelegateEvents(),this.$el=G.zepto.isZ(e)?e:G(e),this.el=this.$el[0],!1!==t&&this.delegateEvents(),this}},{key:"delegateEvents",value:function(e){for(var t in e||(e=this.events),this.undelegateEvents(),e){var r=e[t];if(r&&r.constructor!==Function&&(r=this[e[t]]),r){var i=t.match(xe),n=i[1],a=i[2];n+=".delegateEvents"+this.cid,""===a?this.$el.on(n,r.bind(this)):this.$el.on(n,a,r.bind(this))}}return this}},{key:"undelegateEvents",value:function(){return this.$el.off(".delegateEvents"+this.cid),this}},{key:"_ensureElement",value:function(){if(this.el)this.setElement(this.el,!1);else{var e=G.extend(!0,{},this.attributes);this.id&&(e.id=this.id),this.className&&(e.class=this.className);var t=G(oe.create(this.tagName)).attr(e);this.setElement(t,!1)}}}]),r}(Se),Fe=function(e){T(r,e);var t=L(r);function r(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return m(this,r),(e=t.call(this,i)).core=n,e}return A(r,[{key:"name",get:function(){return"error"}},{key:"createError",value:function(e){this.core?this.core.trigger(Te.ERROR,e):ve.warn(this.name,"Core is not set. Error: ",e)}}],[{key:"Levels",get:function(){return{FATAL:"FATAL",WARN:"WARN",INFO:"INFO"}}}]),r}(Se),Me={createError:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{useCodePrefix:!0},r=this.constructor&&this.constructor.type||"",i=this.name||r,n=this.i18n||this.core&&this.core.i18n||this.container&&this.container.i18n,a="".concat(i,":").concat(e&&e.code||"unknown"),s={description:"",level:Fe.Levels.FATAL,origin:i,scope:r,raw:{}},o=Object.assign({},s,e,{code:t.useCodePrefix?a:e.code});if(n&&o.level==Fe.Levels.FATAL&&!o.UI){var l={title:n.t("default_error_title"),message:n.t("default_error_message")};o.UI=l}return this.playerError?this.playerError.createError(o):ve.warn(i,"PlayerError is not defined. Error: ",o),o}},Ue=function(e){T(r,e);var t=L(r);function r(e){var i;return m(this,r),(i=t.call(this,e.options)).core=e,i.enabled=!0,i.bindEvents(),i.render(),i}return A(r,[{key:"playerError",get:function(){return this.core.playerError}},{key:"bindEvents",value:function(){}},{key:"getExternalInterface",value:function(){return{}}},{key:"enable",value:function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)}},{key:"disable",value:function(){this.stopListening(),this.$el.hide(),this.enabled=!1}},{key:"render",value:function(){return this}}]),r}(Ne);Object.assign(Ue.prototype,Me),Ue.extend=function(e){return Q(Ue,e)},Ue.type="core";var Be=function(e){T(r,e);var t=L(r);function r(e,i,n){var a;return m(this,r),(a=t.call(this,e))._i18n=i,a.currentTime=0,a.volume=100,a.playback=e.playback,a.playerError=n,a.settings=G.extend(!0,{},a.playback.settings),a.isReady=!1,a.mediaControlDisabled=!1,a.plugins=[a.playback],a.dblTapHandler=new le(500),a.clickTimer=null,a.clickDelay=200,a.actionsMetadata={},a.bindEvents(),a}return A(r,[{key:"name",get:function(){return"Container"}},{key:"attributes",get:function(){return{class:"container","data-container":""}}},{key:"events",get:function(){return{click:"clicked",dblclick:"dblClicked",touchend:"dblTap",contextmenu:"onContextMenu",mouseenter:"mouseEnter",mouseleave:"mouseLeave",mouseup:"onMouseUp",mousedown:"onMouseDown"}}},{key:"ended",get:function(){return this.playback.ended}},{key:"buffering",get:function(){return this.playback.buffering}},{key:"i18n",get:function(){return this._i18n}},{key:"hasClosedCaptionsTracks",get:function(){return this.playback.hasClosedCaptionsTracks}},{key:"closedCaptionsTracks",get:function(){return this.playback.closedCaptionsTracks}},{key:"closedCaptionsTrackId",get:function(){return this.playback.closedCaptionsTrackId},set:function(e){this.playback.closedCaptionsTrackId=e}},{key:"audioTracks",get:function(){return this.playback.audioTracks}},{key:"currentAudioTrack",get:function(){return this.playback.currentAudioTrack}},{key:"bindEvents",value:function(){this.listenTo(this.playback,Te.PLAYBACK_PROGRESS,this.onProgress),this.listenTo(this.playback,Te.PLAYBACK_TIMEUPDATE,this.timeUpdated),this.listenTo(this.playback,Te.PLAYBACK_READY,this.ready),this.listenTo(this.playback,Te.PLAYBACK_BUFFERING,this.onBuffering),this.listenTo(this.playback,Te.PLAYBACK_BUFFERFULL,this.bufferfull),this.listenTo(this.playback,Te.PLAYBACK_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.playback,Te.PLAYBACK_LOADEDMETADATA,this.loadedMetadata),this.listenTo(this.playback,Te.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.playback,Te.PLAYBACK_BITRATE,this.updateBitrate),this.listenTo(this.playback,Te.PLAYBACK_PLAYBACKSTATE,this.playbackStateChanged),this.listenTo(this.playback,Te.PLAYBACK_DVR,this.playbackDvrStateChanged),this.listenTo(this.playback,Te.PLAYBACK_MEDIACONTROL_DISABLE,this.disableMediaControl),this.listenTo(this.playback,Te.PLAYBACK_MEDIACONTROL_ENABLE,this.enableMediaControl),this.listenTo(this.playback,Te.PLAYBACK_SEEK,this.onSeek),this.listenTo(this.playback,Te.PLAYBACK_SEEKED,this.onSeeked),this.listenTo(this.playback,Te.PLAYBACK_ENDED,this.onEnded),this.listenTo(this.playback,Te.PLAYBACK_PLAY,this.playing),this.listenTo(this.playback,Te.PLAYBACK_PAUSE,this.paused),this.listenTo(this.playback,Te.PLAYBACK_STOP,this.stopped),this.listenTo(this.playback,Te.PLAYBACK_ERROR,this.error),this.listenTo(this.playback,Te.PLAYBACK_SUBTITLE_AVAILABLE,this.subtitleAvailable),this.listenTo(this.playback,Te.PLAYBACK_SUBTITLE_CHANGED,this.subtitleChanged),this.listenTo(this.playback,Te.PLAYBACK_AUDIO_AVAILABLE,this.audioAvailable),this.listenTo(this.playback,Te.PLAYBACK_AUDIO_CHANGED,this.audioChanged)}},{key:"subtitleAvailable",value:function(){this.trigger(Te.CONTAINER_SUBTITLE_AVAILABLE)}},{key:"subtitleChanged",value:function(e){this.trigger(Te.CONTAINER_SUBTITLE_CHANGED,e)}},{key:"audioAvailable",value:function(e){this.trigger(Te.CONTAINER_AUDIO_AVAILABLE,e)}},{key:"audioChanged",value:function(e){this.trigger(Te.CONTAINER_AUDIO_CHANGED,e)}},{key:"playbackStateChanged",value:function(e){this.trigger(Te.CONTAINER_PLAYBACKSTATE,e)}},{key:"playbackDvrStateChanged",value:function(e){this.settings=this.playback.settings,this.dvrInUse=e,this.trigger(Te.CONTAINER_PLAYBACKDVRSTATECHANGED,e)}},{key:"updateBitrate",value:function(e){this.trigger(Te.CONTAINER_BITRATE,e)}},{key:"statsReport",value:function(e){this.trigger(Te.CONTAINER_STATS_REPORT,e)}},{key:"getPlaybackType",value:function(){return this.playback.getPlaybackType()}},{key:"isDvrEnabled",value:function(){return!!this.playback.dvrEnabled}},{key:"isDvrInUse",value:function(){return!!this.dvrInUse}},{key:"destroy",value:function(){this.disableResizeObserver(),this.trigger(Te.CONTAINER_DESTROYED,this,this.name),this.stopListening(),this.plugins.forEach((function(e){return e.destroy()})),this.$el.remove()}},{key:"setStyle",value:function(e){this.$el.css(e)}},{key:"animate",value:function(e,t){return this.$el.animate(e,t).promise()}},{key:"ready",value:function(){this.isReady=!0,this.trigger(Te.CONTAINER_READY,this.name)}},{key:"isPlaying",value:function(){return this.playback.isPlaying()}},{key:"getStartTimeOffset",value:function(){return this.playback.getStartTimeOffset()}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getDuration",value:function(){return this.playback.getDuration()}},{key:"error",value:function(e){this.isReady||this.ready(),this.trigger(Te.CONTAINER_ERROR,e,this.name)}},{key:"loadedMetadata",value:function(e){this.trigger(Te.CONTAINER_LOADEDMETADATA,e)}},{key:"timeUpdated",value:function(e){this.currentTime=e.current,this.trigger(Te.CONTAINER_TIMEUPDATE,e,this.name)}},{key:"onProgress",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.trigger.apply(this,[Te.CONTAINER_PROGRESS].concat(t,[this.name]))}},{key:"playing",value:function(){this.trigger(Te.CONTAINER_PLAY,this.name,this.actionsMetadata.playEvent||{}),this.actionsMetadata.playEvent={}}},{key:"paused",value:function(){this.trigger(Te.CONTAINER_PAUSE,this.name,this.actionsMetadata.pauseEvent||{}),this.actionsMetadata.pauseEvent={}}},{key:"stopped",value:function(){this.trigger(Te.CONTAINER_STOP,this.actionsMetadata.stopEvent||{}),this.actionsMetadata.stopEvent={}}},{key:"play",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.actionsMetadata.playEvent=e,this.playback.play(e)}},{key:"stop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.actionsMetadata.stopEvent=e,this.playback.stop(e),this.currentTime=0}},{key:"switchAudioTrack",value:function(e){this.playback.switchAudioTrack(e)}},{key:"pause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.actionsMetadata.pauseEvent=e,this.playback.pause(e)}},{key:"onEnded",value:function(){this.trigger(Te.CONTAINER_ENDED,this,this.name),this.currentTime=0}},{key:"clicked",value:function(){var e=this;this.options.chromeless&&!this.options.allowUserInteraction||(this.clickTimer=setTimeout((function(){e.clickTimer&&e.trigger(Te.CONTAINER_CLICK,e,e.name)}),this.clickDelay))}},{key:"cancelClicked",value:function(){clearTimeout(this.clickTimer),this.clickTimer=null}},{key:"dblClicked",value:function(){this.options.chromeless&&!this.options.allowUserInteraction||(this.cancelClicked(),this.trigger(Te.CONTAINER_DBLCLICK,this,this.name))}},{key:"dblTap",value:function(e){var t=this;this.options.chromeless&&!this.options.allowUserInteraction||this.dblTapHandler.handle(e,(function(){t.cancelClicked(),t.trigger(Te.CONTAINER_DBLCLICK,t,t.name)}))}},{key:"onContextMenu",value:function(e){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(Te.CONTAINER_CONTEXTMENU,e,this.name)}},{key:"seek",value:function(e){this.playback.seek(e)}},{key:"onSeek",value:function(e){this.trigger(Te.CONTAINER_SEEK,e,this.name)}},{key:"onSeeked",value:function(){this.trigger(Te.CONTAINER_SEEKED,this.name)}},{key:"seekPercentage",value:function(e){var t=this.getDuration();if(e>=0&&e<=100){var r=t*(e/100);this.seek(r)}}},{key:"setVolume",value:function(e){this.volume=parseFloat(e),this.trigger(Te.CONTAINER_VOLUME,this.volume,this.name),this.playback.volume(this.volume)}},{key:"fullscreen",value:function(){this.trigger(Te.CONTAINER_FULLSCREEN,this.name)}},{key:"onBuffering",value:function(){this.trigger(Te.CONTAINER_STATE_BUFFERING,this.name)}},{key:"bufferfull",value:function(){this.trigger(Te.CONTAINER_STATE_BUFFERFULL,this.name)}},{key:"addPlugin",value:function(e){this.plugins.push(e)}},{key:"hasPlugin",value:function(e){return!!this.getPlugin(e)}},{key:"getPlugin",value:function(e){return this.plugins.filter((function(t){return t.name===e}))[0]}},{key:"mouseEnter",value:function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(Te.CONTAINER_MOUSE_ENTER)}},{key:"mouseLeave",value:function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(Te.CONTAINER_MOUSE_LEAVE)}},{key:"mouseUp",value:function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(Te.CONTAINER_MOUSE_UP)}},{key:"mouseDown",value:function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(Te.CONTAINER_MOUSE_DOWN)}},{key:"settingsUpdate",value:function(){this.settings=this.playback.settings,this.trigger(Te.CONTAINER_SETTINGSUPDATE)}},{key:"highDefinitionUpdate",value:function(e){this.trigger(Te.CONTAINER_HIGHDEFINITIONUPDATE,e)}},{key:"isHighDefinitionInUse",value:function(){return this.playback.isHighDefinitionInUse()}},{key:"disableMediaControl",value:function(){this.mediaControlDisabled||(this.mediaControlDisabled=!0,this.trigger(Te.CONTAINER_MEDIACONTROL_DISABLE))}},{key:"enableMediaControl",value:function(){this.mediaControlDisabled&&(this.mediaControlDisabled=!1,this.trigger(Te.CONTAINER_MEDIACONTROL_ENABLE))}},{key:"updateStyle",value:function(){!this.options.chromeless||this.options.allowUserInteraction?this.$el.removeClass("chromeless"):this.$el.addClass("chromeless")}},{key:"enableResizeObserver",value:function(){var e=this;this.disableResizeObserver(),this.resizeObserverInterval=setInterval((function(){return e.checkResize()}),500)}},{key:"disableResizeObserver",value:function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval)}},{key:"checkResize",value:function(){var e={width:this.el.clientWidth,height:this.el.clientHeight},t=this.currentSize||{},r=t.width;(t.height!==e.height||r!==e.width)&&(this.currentSize=e,this.trigger(Te.CONTAINER_RESIZE,e))}},{key:"configure",value:function(e){this._options=G.extend(!0,this._options,e),this.updateStyle(),this.playback.configure(this.options),this.trigger(Te.CONTAINER_OPTIONS_CHANGE)}},{key:"render",value:function(){var e=Pe(".container[data-container] {\n position: absolute;\n background-color: black;\n height: 100%;\n width: 100%;\n max-width: 100%; }\n .container[data-container] .chromeless {\n cursor: default; }\n\n[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled {\n cursor: pointer; }\n".toString(),{baseUrl:this.options.baseUrl});return this.$el.append(e[0]),this.$el.append(this.playback.render().el),this.updateStyle(),this.checkResize(),this.enableResizeObserver(),this}}]),r}(Ne);Object.assign(Be.prototype,Me);var Ge=function(e){T(r,e);var t=L(r);function r(e,i,n){var a;return m(this,r),(a=t.call(this,e)).settings={},a._i18n=i,a.playerError=n,a._consented=!1,a}return A(r,[{key:"isAudioOnly",get:function(){return!1}},{key:"isAdaptive",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"i18n",get:function(){return this._i18n}},{key:"buffering",get:function(){return!1}},{key:"consent",value:function(e){"function"==typeof e&&e()}},{key:"play",value:function(){}},{key:"pause",value:function(){}},{key:"stop",value:function(){}},{key:"seek",value:function(e){}},{key:"seekPercentage",value:function(e){}},{key:"getStartTimeOffset",value:function(){return 0}},{key:"getDuration",value:function(){return 0}},{key:"isPlaying",value:function(){return!1}},{key:"isReady",get:function(){return!1}},{key:"hasClosedCaptionsTracks",get:function(){return this.closedCaptionsTracks.length>0}},{key:"closedCaptionsTracks",get:function(){return[]}},{key:"closedCaptionsTrackId",get:function(){return-1},set:function(e){}},{key:"audioTracks",get:function(){return[]}},{key:"currentAudioTrack",get:function(){return null}},{key:"switchAudioTrack",value:function(e){}},{key:"getPlaybackType",value:function(){return r.NO_OP}},{key:"isHighDefinitionInUse",value:function(){return!1}},{key:"mute",value:function(){}},{key:"unmute",value:function(){}},{key:"volume",value:function(e){}},{key:"configure",value:function(e){this._options=G.extend(!0,this._options,e)}},{key:"attemptAutoPlay",value:function(){var e=this;this.canAutoPlay((function(t,r){t&&e.play()}))}},{key:"canAutoPlay",value:function(e){e(!0,null)}}]),r}(Ne);Object.assign(Ge.prototype,Me),Ge.extend=function(e){return Q(Ge,e)},Ge.canPlay=function(e,t){return!1},Ge.VOD="vod",Ge.AOD="aod",Ge.LIVE="live",Ge.NO_OP="no_op",Ge.type="playback";var je=function(e){T(r,e);var t=L(r);function r(e,i,n,a){var s;return m(this,r),(s=t.call(this,e))._i18n=n,s.loader=i,s.playerError=a,s}return A(r,[{key:"options",get:function(){return this._options},set:function(e){this._options=e}},{key:"createContainers",value:function(){var e=this;return G.Deferred((function(t){t.resolve(e.options.sources.map((function(t){return e.createContainer(t)})))}))}},{key:"findPlaybackPlugin",value:function(e,t){return this.loader.playbackPlugins.filter((function(r){return r.canPlay(e,t)}))[0]}},{key:"createContainer",value:function(e){var t=null,r=this.options.mimeType;"object"===v(e)?(t=e.source.toString(),e.mimeType&&(r=e.mimeType)):t=e.toString(),t.match(/^\/\//)&&(t=window.location.protocol+t);var i=p(p({},this.options),{},{src:t,mimeType:r}),n=this.findPlaybackPlugin(t,r),a=n?new n(i,this._i18n,this.playerError):new Ge;i=p(p({},i),{},{playback:a});var s=new Be(i,this._i18n,this.playerError),o=G.Deferred();return o.promise(s),this.addContainerPlugins(s),this.listenToOnce(s,Te.CONTAINER_READY,(function(){return o.resolve(s)})),s}},{key:"addContainerPlugins",value:function(e){this.loader.containerPlugins.forEach((function(t){e.addPlugin(new t(e))}))}}]),r}(Se),Ke=function(e){T(r,e);var t=L(r);function r(e){var i;return m(this,r),(i=t.call(this,e)).playerError=new Fe(e,_(i)),i.configureDomRecycler(),i.firstResize=!0,i.plugins=[],i.containers=[],i._boundFullscreenHandler=function(){return i.handleFullscreenChange()},G(document).bind("fullscreenchange",i._boundFullscreenHandler),G(document).bind("MSFullscreenChange",i._boundFullscreenHandler),G(document).bind("mozfullscreenchange",i._boundFullscreenHandler),H.isMobile&&G(window).bind("resize",(function(e){i.handleWindowResize(e)})),i}return A(r,[{key:"events",get:function(){return{webkitfullscreenchange:"handleFullscreenChange",mousemove:"onMouseMove",mouseleave:"onMouseLeave"}}},{key:"attributes",get:function(){return{"data-player":"",tabindex:9999}}},{key:"isReady",get:function(){return!!this.ready}},{key:"i18n",get:function(){return this.getPlugin("strings")||{t:function(e){return e}}}},{key:"mediaControl",get:function(){return this._mediaControl||(this._mediaControl=this.getPlugin("media_control"))||this.dummyMediaControl}},{key:"dummyMediaControl",get:function(){return this._dummyMediaControl||(this._dummyMediaControl=new Ue(this)),this._dummyMediaControl}},{key:"activeContainer",get:function(){return this._activeContainer},set:function(e){this._activeContainer=e,this.trigger(Te.CORE_ACTIVE_CONTAINER_CHANGED,this._activeContainer)}},{key:"activePlayback",get:function(){return this.activeContainer&&this.activeContainer.playback}},{key:"activePlaybackEl",get:function(){if(this.activePlayback)return this.activePlayback.$el?this.activePlayback.$el.find("video")[0]:this.activePlayback.el}},{key:"configureDomRecycler",value:function(){var e=this.options&&this.options.playback&&this.options.playback.recycleVideo;oe.configure({recycleVideo:e})}},{key:"createContainers",value:function(e){this.defer=G.Deferred(),this.defer.promise(this),this.containerFactory=new je(e,e.loader,this.i18n,this.playerError),this.prepareContainers()}},{key:"prepareContainers",value:function(){var e=this;this.containerFactory.createContainers().then((function(t){return e.setupContainers(t)})).then((function(t){return e.resolveOnContainersReady(t)}))}},{key:"updateSize",value:function(){this.isFullscreen()?this.setFullscreen():this.setPlayerSize()}},{key:"setFullscreen",value:function(){H.isiOS||(this.$el.addClass("fullscreen"),this.$el.removeAttr("style"),this.previousSize={width:this.options.width,height:this.options.height},this.currentSize={width:G(window).width(),height:G(window).height()})}},{key:"setPlayerSize",value:function(){this.$el.removeClass("fullscreen"),this.currentSize=this.previousSize,this.previousSize={width:G(window).width(),height:G(window).height()},this.resize(this.currentSize)}},{key:"resize",value:function(e){ie(e.height)||ie(e.width)?(this.el.style.height="".concat(e.height,"px"),this.el.style.width="".concat(e.width,"px")):(this.el.style.height="".concat(e.height),this.el.style.width="".concat(e.width)),this.previousSize={width:this.options.width,height:this.options.height},this.options.width=e.width,this.options.height=e.height,this.currentSize=e,this.triggerResize(this.currentSize)}},{key:"enableResizeObserver",value:function(){var e=this;this.disableResizeObserver();this.resizeObserverInterval=setInterval((function(){e.triggerResize({width:e.el.clientWidth,height:e.el.clientHeight})}),500)}},{key:"triggerResize",value:function(e){(this.firstResize||this.oldHeight!==e.height||this.oldWidth!==e.width)&&(this.oldHeight=e.height,this.oldWidth=e.width,this.computedSize=e,this.firstResize=!1,this.trigger(Te.CORE_RESIZE,e))}},{key:"disableResizeObserver",value:function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval),this.resizeObserverInterval=null}},{key:"resolveOnContainersReady",value:function(e){var t=this;G.when.apply(G,e).done((function(){t.defer.resolve(t),t.ready=!0,t.trigger(Te.CORE_READY)}))}},{key:"addPlugin",value:function(e){this.plugins.push(e)}},{key:"hasPlugin",value:function(e){return!!this.getPlugin(e)}},{key:"getPlugin",value:function(e){return this.plugins.filter((function(t){return t.name===e}))[0]}},{key:"load",value:function(e,t){this.options.mimeType=t,e=e&&e.constructor===Array?e:[e],this.options.sources=e,this.containers.forEach((function(e){return e.destroy()})),this.containerFactory.options=G.extend(!0,this.options,{sources:e}),this.prepareContainers()}},{key:"destroy",value:function(){this.disableResizeObserver(),this.containers.forEach((function(e){return e.destroy()})),this.plugins.forEach((function(e){return e.destroy()})),this.$el.remove(),G(document).unbind("fullscreenchange",this._boundFullscreenHandler),G(document).unbind("MSFullscreenChange",this._boundFullscreenHandler),G(document).unbind("mozfullscreenchange",this._boundFullscreenHandler),this.stopListening()}},{key:"handleFullscreenChange",value:function(){this.trigger(Te.CORE_FULLSCREEN,this.isFullscreen()),this.updateSize()}},{key:"handleWindowResize",value:function(e){var t=window.innerWidth>window.innerHeight?"landscape":"portrait";this._screenOrientation!==t&&(this._screenOrientation=t,this.triggerResize({width:this.el.clientWidth,height:this.el.clientHeight}),this.trigger(Te.CORE_SCREEN_ORIENTATION_CHANGED,{event:e,orientation:this._screenOrientation}))}},{key:"removeContainer",value:function(e){this.stopListening(e),this.containers=this.containers.filter((function(t){return t!==e}))}},{key:"setupContainer",value:function(e){this.listenTo(e,Te.CONTAINER_DESTROYED,this.removeContainer),this.containers.push(e)}},{key:"setupContainers",value:function(e){return e.forEach(this.setupContainer.bind(this)),this.trigger(Te.CORE_CONTAINERS_CREATED),this.renderContainers(),this.activeContainer=e[0],this.render(),this.appendToParent(),this.containers}},{key:"renderContainers",value:function(){var e=this;this.containers.forEach((function(t){return e.el.appendChild(t.render().el)}))}},{key:"createContainer",value:function(e,t){var r=this.containerFactory.createContainer(e,t);return this.setupContainer(r),this.el.appendChild(r.render().el),r}},{key:"getCurrentContainer",value:function(){return this.activeContainer}},{key:"getCurrentPlayback",value:function(){return this.activePlayback}},{key:"getPlaybackType",value:function(){return this.activeContainer&&this.activeContainer.getPlaybackType()}},{key:"isFullscreen",value:function(){var e=J.fullscreenElement();return e&&e===this.el||e&&e===this.activePlaybackEl||this.activePlaybackEl&&this.activePlaybackEl.webkitDisplayingFullscreen||!1}},{key:"toggleFullscreen",value:function(){var e=this;if(this.isFullscreen()){var t=H.isiOS?this.activePlaybackEl:document;J.cancelFullscreen(t),!H.isiOS&&this.$el.removeClass("fullscreen nocursor")}else{var r=H.isiOS?this.activePlaybackEl:this.el;if(!r)return;H.isSafari||H.isiOS?J.requestFullscreen(r):J.requestFullscreen(r).then((function(e){return e}),(function(t){return setTimeout((function(){if(!e.isFullscreen())throw new ReferenceError(t)}),600)})),!H.isiOS&&this.$el.addClass("fullscreen")}}},{key:"onMouseMove",value:function(e){this.trigger(Te.CORE_MOUSE_MOVE,e)}},{key:"onMouseLeave",value:function(e){this.trigger(Te.CORE_MOUSE_LEAVE,e)}},{key:"configure",value:function(e){var t=this;this._options=G.extend(!0,this._options,e),this.configureDomRecycler();var r=e.source||e.sources;r&&this.load(r,e.mimeType||this.options.mimeType),this.trigger(Te.CORE_OPTIONS_CHANGE,e),this.containers.forEach((function(e){return e.configure(t.options)}))}},{key:"appendToParent",value:function(){var e=Pe('[data-player] {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n user-select: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n transform: translate3d(0, 0, 0);\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n font-style: normal;\n font-weight: normal;\n text-align: center;\n overflow: hidden;\n font-size: 100%;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-shadow: 0 0 0;\n box-sizing: border-box; }\n [data-player]:focus {\n outline: 0; }\n [data-player] * {\n box-sizing: inherit; }\n [data-player] > * {\n float: none;\n max-width: none; }\n [data-player] > div {\n display: block; }\n [data-player].fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0;\n left: 0; }\n [data-player].nocursor {\n cursor: none; }\n\n.clappr-style {\n display: none !important; }\n'.toString(),{baseUrl:this.options.baseUrl}),t=Pe('[data-player] div, [data-player] span, [data-player] applet, [data-player] object, [data-player] iframe,\n[data-player] h1, [data-player] h2, [data-player] h3, [data-player] h4, [data-player] h5, [data-player] h6, [data-player] p, [data-player] blockquote, [data-player] pre,\n[data-player] a, [data-player] abbr, [data-player] acronym, [data-player] address, [data-player] big, [data-player] cite, [data-player] code,\n[data-player] del, [data-player] dfn, [data-player] em, [data-player] img, [data-player] ins, [data-player] kbd, [data-player] q, [data-player] s, [data-player] samp,\n[data-player] small, [data-player] strike, [data-player] strong, [data-player] sub, [data-player] sup, [data-player] tt, [data-player] var,\n[data-player] b, [data-player] u, [data-player] i, [data-player] center,\n[data-player] dl, [data-player] dt, [data-player] dd, [data-player] ol, [data-player] ul, [data-player] li,\n[data-player] fieldset, [data-player] form, [data-player] label, [data-player] legend,\n[data-player] table, [data-player] caption, [data-player] tbody, [data-player] tfoot, [data-player] thead, [data-player] tr, [data-player] th, [data-player] td,\n[data-player] article, [data-player] aside, [data-player] canvas, [data-player] details, [data-player] embed,\n[data-player] figure, [data-player] figcaption, [data-player] footer, [data-player] header, [data-player] hgroup,\n[data-player] menu, [data-player] nav, [data-player] output, [data-player] ruby, [data-player] section, [data-player] summary,\n[data-player] time, [data-player] mark, [data-player] audio, [data-player] video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline; }\n\n[data-player] table {\n border-collapse: collapse;\n border-spacing: 0; }\n\n[data-player] caption, [data-player] th, [data-player] td {\n text-align: left;\n font-weight: normal;\n vertical-align: middle; }\n\n[data-player] q, [data-player] blockquote {\n quotes: none; }\n [data-player] q:before, [data-player] q:after, [data-player] blockquote:before, [data-player] blockquote:after {\n content: "";\n content: none; }\n\n[data-player] a img {\n border: none; }\n'.toString(),{baseUrl:this.options.baseUrl});this.$el.append(e[0]),this.options.includeResetStyle&&this.$el.append(t[0]),!(this.$el.parent()&&this.$el.parent().length)&&this.$el.appendTo(this.options.parentElement)}},{key:"render",value:function(){this.options.width=this.options.width||this.$el.width(),this.options.height=this.options.height||this.$el.height();var e={width:this.options.width,height:this.options.height};return this.previousSize=this.currentSize=this.computedSize=e,this.updateSize(),this.enableResizeObserver(),this}}]),r}(Ne);Object.assign(Ke.prototype,Me);var He,Ve,Ye=function(e){T(r,e);var t=L(r);function r(e){var i;return m(this,r),(i=t.call(this,e.options)).player=e,i}return A(r,[{key:"loader",get:function(){return this.player.loader}},{key:"create",value:function(){return this.options.loader=this.loader,this.core=new Ke(this.options),this.addCorePlugins(),this.core.createContainers(this.options),this.core}},{key:"addCorePlugins",value:function(){var e=this;return this.loader.corePlugins.forEach((function(t){var r=new t(e.core);e.core.addPlugin(r),e.setupExternalInterface(r)})),this.core}},{key:"setupExternalInterface",value:function(e){var t=e.getExternalInterface();for(var r in t)this.player[r]=t[r].bind(e)}}]),r}(Se),We=/(\d+)(?:\.(\d+))?(?:\.(\d+))?/,ze=function(){function e(t,r,i){m(this,e),this.major=parseInt(t||0,10),this.minor=parseInt(r||0,10),this.patch=parseInt(i||0,10)}return A(e,[{key:"compare",value:function(e){var t=this.major-e.major;return t=(t=t||this.minor-e.minor)||this.patch-e.patch}},{key:"inc",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"patch";return void 0!==this[e]&&(this[e]+=1),this}},{key:"satisfies",value:function(e,t){return this.compare(e)>=0&&(!t||this.compare(t)<0)}},{key:"toString",value:function(){return"".concat(this.major,".").concat(this.minor,".").concat(this.patch)}}],[{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=t.match(We)||[],i=C(r,4),n=i[1],a=i[2],s=i[3];return void 0===n?null:new e(n,a,s)}}]),e}(),qe=function(e,t){return e&&t?Object.entries(e).filter((function(e){return C(e,2)[1].type===t})).reduce((function(e,t){var r=C(t,2),i=r[0],n=r[1];return e[i]=n,e}),{}):{}},Xe=(He={plugins:{},playbacks:[]},Ve="0.4.27",function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;m(this,e),this.playerId=r,this.playbackPlugins=I(He.playbacks);var i=e.registeredPlugins,n=i.core,a=i.container;this.containerPlugins=Object.values(a),this.corePlugins=Object.values(n),Array.isArray(t)||this.validateExternalPluginsType(t),this.addExternalPlugins(t)}return A(e,[{key:"groupPluginsByType",value:function(e){return Array.isArray(e)&&(e=e.reduce((function(e,t){return e[t.type]||(e[t.type]=[]),e[t.type].push(t),e}),{})),e}},{key:"removeDups",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=function(e,r){return e[r.prototype.name]&&t||(e[r.prototype.name]&&delete e[r.prototype.name],e[r.prototype.name]=r),e},i=e.reduceRight(r,Object.create(null)),n=[];for(var a in i)n.unshift(i[a]);return n}},{key:"addExternalPlugins",value:function(t){var r="boolean"!=typeof t.loadExternalPluginsFirst||t.loadExternalPluginsFirst,i="boolean"!=typeof t.loadExternalPlaybacksFirst||t.loadExternalPlaybacksFirst;if((t=this.groupPluginsByType(t)).playback){var n=t.playback.filter((function(t){return e.checkVersionSupport(t),!0}));this.playbackPlugins=i?this.removeDups(n.concat(this.playbackPlugins)):this.removeDups(this.playbackPlugins.concat(n),!0)}if(t.container){var a=t.container.filter((function(t){return e.checkVersionSupport(t),!0}));this.containerPlugins=r?this.removeDups(a.concat(this.containerPlugins)):this.removeDups(this.containerPlugins.concat(a),!0)}if(t.core){var s=t.core.filter((function(t){return e.checkVersionSupport(t),!0}));this.corePlugins=r?this.removeDups(s.concat(this.corePlugins)):this.removeDups(this.corePlugins.concat(s),!0)}}},{key:"validateExternalPluginsType",value:function(e){["playback","container","core"].forEach((function(t){(e[t]||[]).forEach((function(e){var r="external "+e.type+" plugin on "+t+" array";if(e.type!==t)throw new ReferenceError(r)}))}))}}],[{key:"registeredPlaybacks",get:function(){return I(He.playbacks)}},{key:"registeredPlugins",get:function(){var e=He.plugins;return{core:qe(e,"core"),container:qe(e,"container")}}},{key:"checkVersionSupport",value:function(e){var t=e.prototype,r=t.supportedVersion,i=t.name;if(!r||!r.min)return ve.warn("Loader","missing version information for ".concat(i)),!1;var n=r.max?ze.parse(r.max):ze.parse(r.min).inc("minor"),a=ze.parse(r.min);return!!ze.parse(Ve).satisfies(a,n)||(ve.warn("Loader","unsupported plugin ".concat(i,": Clappr version ").concat(Ve," does not match required range [").concat(a,",").concat(n,")")),!1)}},{key:"registerPlugin",value:function(t){if(!t||!t.prototype.name)return ve.warn("Loader","missing information to register plugin: ".concat(t)),!1;e.checkVersionSupport(t);var r=He.plugins;if(!r)return!1;var i=r[t.prototype.name];return i&&ve.warn("Loader","overriding plugin entry: ".concat(t.prototype.name," - ").concat(i)),r[t.prototype.name]=t,!0}},{key:"registerPlayback",value:function(t){if(!t||!t.prototype.name)return!1;e.checkVersionSupport(t);var r=He.playbacks,i=r.findIndex((function(e){return e.prototype.name===t.prototype.name}));if(i>=0){var n=r[i];r.splice(i,1),ve.warn("Loader","overriding playback entry: ".concat(n.name," - ").concat(n))}return He.playbacks=[t].concat(I(r)),!0}},{key:"unregisterPlugin",value:function(e){if(!e)return!1;var t=He.plugins;return!!t[e]&&(delete t[e],!0)}},{key:"unregisterPlayback",value:function(e){if(!e)return!1;var t=He.playbacks,r=t.findIndex((function(t){return t.prototype.name===e}));return!(r<0||(t.splice(r,1),He.playbacks=t,0))}},{key:"clearPlugins",value:function(){He.plugins={}}},{key:"clearPlaybacks",value:function(){He.playbacks=[]}}]),e}()),$e=ne().replace(/\/[^/]+$/,""),Ze=function(e){T(r,e);var t=L(r);function r(e){var i;m(this,r),i=t.call(this,e);var n={playerId:re(""),persistConfig:!0,width:640,height:360,baseUrl:$e,allowUserInteraction:H.isMobile,includeResetStyle:!0,playback:{recycleVideo:!0}};i._options=G.extend(!0,n,e),i.options.sources=i._normalizeSources(e),i.options.chromeless||(i.options.allowUserInteraction=!0),i.options.allowUserInteraction||(i.options.disableKeyboardShortcuts=!0),i._registerOptionEventListeners(i.options.events),i._coreFactory=new Ye(_(i));var a=i._getParentElement(i.options);return a&&i.attachTo(a),i}return A(r,[{key:"loader",get:function(){return this._loader||(this._loader=new Xe(this.options.plugins||{},this.options.playerId)),this._loader},set:function(e){this._loader=e}},{key:"ended",get:function(){return this.core.activeContainer.ended}},{key:"buffering",get:function(){return this.core.activeContainer.buffering}},{key:"isReady",get:function(){return!!this._ready}},{key:"eventsMapping",get:function(){return{onReady:Te.PLAYER_READY,onResize:Te.PLAYER_RESIZE,onPlay:Te.PLAYER_PLAY,onPause:Te.PLAYER_PAUSE,onStop:Te.PLAYER_STOP,onEnded:Te.PLAYER_ENDED,onSeek:Te.PLAYER_SEEK,onError:Te.PLAYER_ERROR,onTimeUpdate:Te.PLAYER_TIMEUPDATE,onVolumeUpdate:Te.PLAYER_VOLUMEUPDATE,onSubtitleAvailable:Te.PLAYER_SUBTITLE_AVAILABLE}}},{key:"_getParentElement",value:function(e){var t=e.parentId,r=e.parent;return t?document.querySelector(t):r}},{key:"attachTo",value:function(e){return this.options.parentElement=e,this.core=this._coreFactory.create(),this._addEventListeners(),this}},{key:"_addEventListeners",value:function(){return this.core.isReady?this._onReady():this.listenToOnce(this.core,Te.CORE_READY,this._onReady),this.listenTo(this.core,Te.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged),this.listenTo(this.core,Te.CORE_FULLSCREEN,this._onFullscreenChange),this.listenTo(this.core,Te.CORE_RESIZE,this._onResize),this}},{key:"_addContainerEventListeners",value:function(){var e=this.core.activeContainer;return e&&(this.listenTo(e,Te.CONTAINER_PLAY,this._onPlay),this.listenTo(e,Te.CONTAINER_PAUSE,this._onPause),this.listenTo(e,Te.CONTAINER_STOP,this._onStop),this.listenTo(e,Te.CONTAINER_ENDED,this._onEnded),this.listenTo(e,Te.CONTAINER_SEEK,this._onSeek),this.listenTo(e,Te.CONTAINER_ERROR,this._onError),this.listenTo(e,Te.CONTAINER_TIMEUPDATE,this._onTimeUpdate),this.listenTo(e,Te.CONTAINER_VOLUME,this._onVolumeUpdate),this.listenTo(e,Te.CONTAINER_SUBTITLE_AVAILABLE,this._onSubtitleAvailable)),this}},{key:"_registerOptionEventListeners",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Object.keys(t).length>0;return i&&Object.keys(r).forEach((function(t){var i=e.eventsMapping[t];i&&e.off(i,r[t])})),Object.keys(t).forEach((function(r){var i=e.eventsMapping[r];if(i){var n=t[r];(n="function"==typeof n&&n)&&e.on(i,n)}})),this}},{key:"_containerChanged",value:function(){this.stopListening(),this._addEventListeners()}},{key:"_onReady",value:function(){this._ready=!0,this._addContainerEventListeners(),this.trigger(Te.PLAYER_READY)}},{key:"_onFullscreenChange",value:function(e){this.trigger(Te.PLAYER_FULLSCREEN,e)}},{key:"_onVolumeUpdate",value:function(e){this.trigger(Te.PLAYER_VOLUMEUPDATE,e)}},{key:"_onSubtitleAvailable",value:function(){this.trigger(Te.PLAYER_SUBTITLE_AVAILABLE)}},{key:"_onResize",value:function(e){this.trigger(Te.PLAYER_RESIZE,e)}},{key:"_onPlay",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.trigger(Te.PLAYER_PLAY,t)}},{key:"_onPause",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.trigger(Te.PLAYER_PAUSE,t)}},{key:"_onStop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.trigger(Te.PLAYER_STOP,this.getCurrentTime(),e)}},{key:"_onEnded",value:function(){this.trigger(Te.PLAYER_ENDED)}},{key:"_onSeek",value:function(e){this.trigger(Te.PLAYER_SEEK,e)}},{key:"_onTimeUpdate",value:function(e){this.trigger(Te.PLAYER_TIMEUPDATE,e)}},{key:"_onError",value:function(e){this.trigger(Te.PLAYER_ERROR,e)}},{key:"_normalizeSources",value:function(e){var t=e.sources||(void 0!==e.source?[e.source]:[]);return 0===t.length?[{source:"",mimeType:""}]:t}},{key:"resize",value:function(e){return this.core.resize(e),this}},{key:"load",value:function(e,t,r){return void 0!==r&&this.configure({autoPlay:!!r}),this.core.load(e,t),this}},{key:"destroy",value:function(){return this.stopListening(),this.core.destroy(),this}},{key:"consent",value:function(e){this.core.getCurrentPlayback().consent(e)}},{key:"play",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.core.activeContainer.play(e),this}},{key:"pause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.core.activeContainer.pause(e),this}},{key:"stop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.core.activeContainer.stop(e),this}},{key:"seek",value:function(e){return this.core.activeContainer.seek(e),this}},{key:"seekPercentage",value:function(e){return this.core.activeContainer.seekPercentage(e),this}},{key:"mute",value:function(){return this.core.activePlayback.mute(),this}},{key:"unmute",value:function(){return this.core.activePlayback.unmute(),this}},{key:"isPlaying",value:function(){return this.core.activeContainer.isPlaying()}},{key:"isDvrEnabled",value:function(){return this.core.activeContainer.isDvrEnabled()}},{key:"isDvrInUse",value:function(){return this.core.activeContainer.isDvrInUse()}},{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._registerOptionEventListeners(e.events,this.options.events),this.core.configure(e),this}},{key:"getPlugin",value:function(e){return this.core.plugins.concat(this.core.activeContainer.plugins).filter((function(t){return t.name===e}))[0]}},{key:"getCurrentTime",value:function(){return this.core.activeContainer.getCurrentTime()}},{key:"getStartTimeOffset",value:function(){return this.core.activeContainer.getStartTimeOffset()}},{key:"getDuration",value:function(){return this.core.activeContainer.getDuration()}}]),r}(Se);Object.assign(Ze.prototype,Me);var Qe=function(e){T(r,e);var t=L(r);function r(e){var i;return m(this,r),(i=t.call(this,e.options)).container=e,i.enabled=!0,i.bindEvents(),i}return A(r,[{key:"playerError",get:function(){return this.container.playerError}},{key:"enable",value:function(){this.enabled||(this.bindEvents(),this.enabled=!0)}},{key:"disable",value:function(){this.enabled&&(this.stopListening(),this.enabled=!1)}},{key:"bindEvents",value:function(){}},{key:"destroy",value:function(){this.stopListening()}}]),r}(Se);Object.assign(Qe.prototype,Me),Qe.extend=function(e){return Q(Qe,e)},Qe.type="container";var Je=function(e){T(r,e);var t=L(r);function r(e){var i;return m(this,r),(i=t.call(this,e.options)).core=e,i.enabled=!0,i.bindEvents(),i}return A(r,[{key:"playerError",get:function(){return this.core.playerError}},{key:"bindEvents",value:function(){}},{key:"enable",value:function(){this.enabled||(this.bindEvents(),this.enabled=!0)}},{key:"disable",value:function(){this.enabled&&(this.stopListening(),this.enabled=!1)}},{key:"getExternalInterface",value:function(){return{}}},{key:"destroy",value:function(){this.stopListening()}}]),r}(Se);Object.assign(Je.prototype,Me),Je.extend=function(e){return Q(Je,e)},Je.type="core";var et=function(e){T(r,e);var t=L(r);function r(e){var i;return m(this,r),(i=t.call(this,e.options)).container=e,i.enabled=!0,i.bindEvents(),i}return A(r,[{key:"playerError",get:function(){return this.container.playerError}},{key:"enable",value:function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)}},{key:"disable",value:function(){this.stopListening(),this.$el.hide(),this.enabled=!1}},{key:"bindEvents",value:function(){}}]),r}(Ne);Object.assign(et.prototype,Me),et.extend=function(e){return Q(et,e)},et.type="container";var tt={mp4:["avc1.42E01E","avc1.58A01E","avc1.4D401E","avc1.64001E","mp4v.20.8","mp4v.20.240","mp4a.40.2"].map((function(e){return'video/mp4; codecs="'+e+', mp4a.40.2"'})),ogg:['video/ogg; codecs="theora, vorbis"','video/ogg; codecs="dirac"','video/ogg; codecs="theora, speex"'],"3gpp":['video/3gpp; codecs="mp4v.20.8, samr"'],webm:['video/webm; codecs="vp8, vorbis"'],mkv:['video/x-matroska; codecs="theora, vorbis"'],m3u8:["application/x-mpegurl"]};tt.ogv=tt.ogg,tt["3gp"]=tt["3gpp"];var rt={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},it=Object.keys(rt).reduce((function(e,t){return[].concat(I(e),I(rt[t]))}),[]),nt={code:"unknown",message:"unknown"},at=function(e){T(r,e);var t=L(r);function r(){var e;m(this,r);for(var i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];(e=t.call.apply(t,[this].concat(n)))._destroyed=!1,e._loadStarted=!1,e._isBuffering=!1,e._playheadMoving=!1,e._playheadMovingTimer=null,e._stopped=!1,e._ccTrackId=-1,e._setupSrc(e.options.src),e.options.playback||(e.options.playback=e.options||{}),e.options.playback.disableContextMenu=e.options.playback.disableContextMenu||e.options.disableVideoTagContextMenu,e._minDvrSize=e.isValidMinimumDVRSizeConfig?e.minimumDVRSizeConfig:60;var s,o=e.options.playback,l=o.preload||(H.isSafari?"auto":e.options.preload);return e.options.poster&&("string"==typeof e.options.poster?s=e.options.poster:"string"==typeof e.options.poster.url&&(s=e.options.poster.url)),G.extend(!0,e.el,{muted:e.options.mute,defaultMuted:e.options.mute,loop:e.options.loop,poster:s,preload:l||"metadata",crossOrigin:o.crossOrigin,"x-webkit-playsinline":o.playInline}),(o.controls||e.options.useVideoTagDefaultControls)&&e.$el.attr("controls",""),o.playInline&&e.$el.attr({playsinline:"playsinline"}),o.crossOrigin&&e.$el.attr({crossorigin:o.crossOrigin}),e.settings={default:["seekbar"]},e.settings.left=["playpause","position","duration"],e.settings.right=["fullscreen","volume","hd-indicator"],o.externalTracks&&e._setupExternalTracks(o.externalTracks),e.options.autoPlay&&e.attemptAutoPlay(),e}return A(r,[{key:"name",get:function(){return"html5_video"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"tagName",get:function(){return this.isAudioOnly?"audio":"video"}},{key:"isAudioOnly",get:function(){var e=this.options.src,t=r._mimeTypesForUrl(e,rt,this.options.mimeType);return this.options.playback&&this.options.playback.audioOnly||this.options.audioOnly||it.indexOf(t[0])>=0}},{key:"attributes",get:function(){return{"data-html5-video":""}}},{key:"events",get:function(){return{canplay:"_onCanPlay",canplaythrough:"_handleBufferingEvents",durationchange:"_onDurationChange",ended:"_onEnded",error:"_onError",loadeddata:"_onLoadedData",loadedmetadata:"_onLoadedMetadata",pause:"_onPause",playing:"_onPlaying",progress:"_onProgress",seeking:"_onSeeking",seeked:"_onSeeked",stalled:"_handleBufferingEvents",timeupdate:"_onTimeUpdate",waiting:"_onWaiting"}}},{key:"ended",get:function(){return this.el.ended}},{key:"buffering",get:function(){return this._isBuffering}},{key:"isLive",get:function(){return this.getPlaybackType()===Ge.LIVE}},{key:"dvrEnabled",get:function(){return this.getDuration()>=this._minDvrSize&&this.isLive}},{key:"minimumDVRSizeConfig",get:function(){return this.options.playback&&this.options.playback.minimumDvrSize}},{key:"isValidMinimumDVRSizeConfig",get:function(){return void 0!==this.minimumDVRSizeConfig&&"number"==typeof this.minimumDVRSizeConfig}},{key:"configure",value:function(e){R(b(r.prototype),"configure",this).call(this,e),this.el.loop=!!e.loop}},{key:"attemptAutoPlay",value:function(){var e=this;this.canAutoPlay((function(t,r){r&&ve.warn(e.name,"autoplay error.",{result:t,error:r}),t&&setTimeout((function(){return!e._destroyed&&e.play()}),0)}))}},{key:"canAutoPlay",value:function(e){if(this.options.disableCanAutoPlay)e(!0,null);else{var t={timeout:this.options.autoPlayTimeout||500,inline:this.options.playback.playInline||!1,muted:this.options.mute||!1};H.isMobile&&oe.options.recycleVideo&&(t.element=this.el),se(e,t)}}},{key:"_setupExternalTracks",value:function(e){this._externalTracks=e.map((function(e){return{kind:e.kind||"subtitles",label:e.label,lang:e.lang,src:e.src}}))}},{key:"_setupSrc",value:function(e){this.el.src!==e&&(this._ccIsSetup=!1,this.el.src=e,this._src=this.el.src)}},{key:"_onLoadedMetadata",value:function(e){this._handleBufferingEvents(),this.trigger(Te.PLAYBACK_LOADEDMETADATA,{duration:e.target.duration,data:e}),this._updateSettings();var t=void 0===this._options.autoSeekFromUrl||this._options.autoSeekFromUrl;this.getPlaybackType()!==Ge.LIVE&&t&&this._checkInitialSeek()}},{key:"_onDurationChange",value:function(){this._updateSettings(),this._onTimeUpdate(),this._onProgress()}},{key:"_updateSettings",value:function(){this.getPlaybackType()===Ge.VOD||this.getPlaybackType()===Ge.AOD?this.settings.left=["playpause","position","duration"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(Te.PLAYBACK_SETTINGSUPDATE)}},{key:"isSeekEnabled",value:function(){return isFinite(this.getDuration())}},{key:"getPlaybackType",value:function(){var e="audio"===this.tagName?Ge.AOD:Ge.VOD;return[0,void 0,1/0].indexOf(this.el.duration)>=0?Ge.LIVE:e}},{key:"isHighDefinitionInUse",value:function(){return!1}},{key:"consent",value:function(e){var t=this;if(this.isPlaying()||this.el._consented)R(b(r.prototype),"consent",this).call(this,e);else{var i=function i(){t.el.removeEventListener("loadedmetadata",i,!1),t.el.removeEventListener("error",i,!1),t.el._consented=!0,R(b(r.prototype),"consent",t).call(t,e)};this.el.addEventListener("loadedmetadata",i,!1),this.el.addEventListener("error",i,!1),this.el.load()}}},{key:"play",value:function(){this.trigger(Te.PLAYBACK_PLAY_INTENT),this._stopped=!1,this._setupSrc(this._src),this._handleBufferingEvents();var e=this.el.play();e&&e.catch&&e.catch((function(){}))}},{key:"pause",value:function(){this.el.pause(),this.dvrEnabled&&this._updateDvr(!0)}},{key:"stop",value:function(){this.pause(),this._stopped=!0,this.el.removeAttribute("src"),this.el.load(),this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(Te.PLAYBACK_STOP)}},{key:"volume",value:function(e){0===e?(this.$el.attr({muted:"true"}),this.el.muted=!0):(this.$el.attr({muted:null}),this.el.muted=!1,this.el.volume=e/100)}},{key:"mute",value:function(){this.el.muted=!0}},{key:"unmute",value:function(){this.el.muted=!1}},{key:"isMuted",value:function(){return!0===this.el.muted||0===this.el.volume}},{key:"isPlaying",value:function(){return!this.el.paused&&!this.el.ended}},{key:"isReady",get:function(){return this._isReadyState}},{key:"_startPlayheadMovingChecks",value:function(){null===this._playheadMovingTimer&&(this._playheadMovingTimeOnCheck=null,this._determineIfPlayheadMoving(),this._playheadMovingTimer=setInterval(this._determineIfPlayheadMoving.bind(this),500))}},{key:"_stopPlayheadMovingChecks",value:function(){null!==this._playheadMovingTimer&&(clearInterval(this._playheadMovingTimer),this._playheadMovingTimer=null,this._playheadMoving=!1)}},{key:"_determineIfPlayheadMoving",value:function(){var e=this._playheadMovingTimeOnCheck,t=this.el.currentTime;this._playheadMoving=e!==t,this._playheadMovingTimeOnCheck=t,this._handleBufferingEvents()}},{key:"_onWaiting",value:function(){this._loadStarted=!0,this._handleBufferingEvents()}},{key:"_onLoadedData",value:function(){this._loadStarted=!0,this._handleBufferingEvents()}},{key:"_onCanPlay",value:function(){this._handleBufferingEvents()}},{key:"_onPlaying",value:function(){this._checkForClosedCaptions(),this._startPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(Te.PLAYBACK_PLAY)}},{key:"_onPause",value:function(){this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(Te.PLAYBACK_PAUSE)}},{key:"_onSeeking",value:function(){this.trigger(Te.PLAYBACK_SEEK,this.getCurrentTime()),this._handleBufferingEvents()}},{key:"_onSeeked",value:function(){this._handleBufferingEvents(),this.trigger(Te.PLAYBACK_SEEKED)}},{key:"_onEnded",value:function(){this._handleBufferingEvents(),this.trigger(Te.PLAYBACK_ENDED,this.name)}},{key:"_handleBufferingEvents",value:function(){var e=!this.el.ended&&!this.el.paused,t=this._loadStarted&&!this.el.ended&&!this._stopped&&(e&&!this._playheadMoving||this.el.readyState<this.el.HAVE_FUTURE_DATA);this._isBuffering!==t&&(this._isBuffering=t,t?this.trigger(Te.PLAYBACK_BUFFERING,this.name):this.trigger(Te.PLAYBACK_BUFFERFULL,this.name))}},{key:"_onError",value:function(){var e=this.el.error||nt,t=e.code,r=e.message,i=t===nt.code,n=this.createError({code:t,description:r,raw:this.el.error,level:i?Fe.Levels.WARN:Fe.Levels.FATAL});i?ve.warn(this.name,"HTML5 unknown error: ",n):this.trigger(Te.PLAYBACK_ERROR,n)}},{key:"destroy",value:function(){this._destroyed=!0,this.handleTextTrackChange&&this.el.textTracks.removeEventListener("change",this.handleTextTrackChange),R(b(r.prototype),"destroy",this).call(this),this.el.removeAttribute("src"),this.el.load(),this._src=null,oe.garbage(this.el)}},{key:"_updateDvr",value:function(e){this.trigger(Te.PLAYBACK_DVR,e),this.trigger(Te.PLAYBACK_STATS_ADD,{dvr:e})}},{key:"seek",value:function(e){e<0&&(ve.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this.getDuration()),this.dvrEnabled&&this._updateDvr(e<this.getDuration()-3),e+=this.el.seekable.start(0),this.el.currentTime=e}},{key:"seekPercentage",value:function(e){var t=this.el.duration*(e/100);this.seek(t)}},{key:"_checkInitialSeek",value:function(){var e=te();0!==e&&this.seek(e)}},{key:"getCurrentTime",value:function(){return this.el.currentTime}},{key:"getDuration",value:function(){if(this.isLive){if(this.el.seekable.length>0)return this.el.seekable.end(0)-this.el.seekable.start(0);this._scheduleUpdateSettingsCheck()}return this.el.duration}},{key:"_scheduleUpdateSettingsCheck",value:function(){var e=this;this._updateSettingsCheckInFlight||(this._updateSettingsCheckInFlight=setTimeout((function(){e._updateSettings(),e._updateSettingsCheckInFlight=null}),1e3))}},{key:"_onTimeUpdate",value:function(){var e=this.isLive?this.getDuration():this.el.duration;this.trigger(Te.PLAYBACK_TIMEUPDATE,{current:this.el.currentTime,total:e},this.name)}},{key:"_onProgress",value:function(){if(this.el.buffered.length){for(var e=[],t=0,r=0;r<this.el.buffered.length;r++)e=[].concat(I(e),[{start:this.el.buffered.start(r),end:this.el.buffered.end(r)}]),this.el.currentTime>=e[r].start&&this.el.currentTime<=e[r].end&&(t=r);var i={start:e[t].start,current:e[t].end,total:this.el.duration};this.trigger(Te.PLAYBACK_PROGRESS,i,e)}}},{key:"_typeFor",value:function(e){var t=r._mimeTypesForUrl(e,tt,this.options.mimeType);return 0===t.length&&(t=r._mimeTypesForUrl(e,rt,this.options.mimeType)),(t[0]||"").split(";")[0]}},{key:"_ready",value:function(){this._isReadyState||(this._isReadyState=!0,this.trigger(Te.PLAYBACK_READY,this.name))}},{key:"_checkForClosedCaptions",value:function(){if(this.isHTML5Video&&!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(Te.PLAYBACK_SUBTITLE_AVAILABLE);var e=this.closedCaptionsTrackId;this.closedCaptionsTrackId=e,this.handleTextTrackChange=this._handleTextTrackChange.bind(this),this.el.textTracks.addEventListener("change",this.handleTextTrackChange)}this._ccIsSetup=!0}}},{key:"_handleTextTrackChange",value:function(){var e=this.closedCaptionsTracks.find((function(e){return"showing"===e.track.mode}))||{id:-1};this._ccTrackId!==e.id&&(this._ccTrackId=e.id,this.trigger(Te.PLAYBACK_SUBTITLE_CHANGED,{id:e.id}))}},{key:"isHTML5Video",get:function(){return this.name===r.prototype.name}},{key:"closedCaptionsTracks",get:function(){var e=0;return(this.el.textTracks?Array.from(this.el.textTracks):[]).filter((function(e){return"subtitles"===e.kind||"captions"===e.kind})).map((function(t){return{id:e++,name:t.label,track:t}}))}},{key:"closedCaptionsTrackId",get:function(){return this._ccTrackId},set:function(e){if(ie(e)){var t,r=this.closedCaptionsTracks;if(-1!==e){if(!(t=r.find((function(t){return t.id===e}))))return;if("showing"===t.track.mode)return}r.filter((function(e){return"hidden"!==e.track.mode})).forEach((function(e){return e.track.mode="hidden"})),t&&(t.track.mode="showing"),this._ccTrackId=e,this.trigger(Te.PLAYBACK_SUBTITLE_CHANGED,{id:e})}}},{key:"template",get:function(){return we('<% for (var i = 0; i < tracks.length; i++) { %>\n <track data-html5-video-track="<%= i %>" kind="<%= tracks[i].kind %>" label="<%= tracks[i].label %>" srclang="<%= tracks[i].lang %>" src="<%= tracks[i].src %>">\n<% }; %>\n')}},{key:"render",value:function(){this.options.playback.disableContextMenu&&this.$el.on("contextmenu",(function(){return!1})),this._externalTracks&&this._externalTracks.length>0&&this.$el.html(this.template({tracks:this._externalTracks})),this._ready();var e=Pe("[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block; }\n".toString(),{baseUrl:this.options.baseUrl});return this.$el.append(e[0]),this}}]),r}(Ge);at._mimeTypesForUrl=function(e,t,r){var i=(e.split("?")[0].match(/.*\.(.*)$/)||[])[1],n=r||i&&t[i.toLowerCase()]||[];return n.constructor===Array?n:[n]},at._canPlay=function(e,t,r,i){var n=at._mimeTypesForUrl(r,t,i),a=document.createElement(e);return!!n.filter((function(e){return!!a.canPlayType(e).replace(/no/,"")}))[0]},at.canPlay=function(e,t){return at._canPlay("audio",rt,e,t)||at._canPlay("video",tt,e,t)};var st=function(e){T(r,e);var t=L(r);function r(){return m(this,r),t.apply(this,arguments)}return A(r,[{key:"name",get:function(){return"html5_audio"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"tagName",get:function(){return"audio"}},{key:"isAudioOnly",get:function(){return!0}},{key:"updateSettings",value:function(){this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(Te.PLAYBACK_SETTINGSUPDATE)}},{key:"getPlaybackType",value:function(){return Ge.AOD}}]),r}(at);st.canPlay=function(e,t){return at._canPlay("audio",{wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},e,t)};var ot=function(e){T(r,e);var t=L(r);function r(e){var i;return m(this,r),(i=t.call(this,e)).el.src=e.src,i}return A(r,[{key:"name",get:function(){return"html_img"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"tagName",get:function(){return"img"}},{key:"attributes",get:function(){return{"data-html-img":""}}},{key:"events",get:function(){return{load:"_onLoad",abort:"_onError",error:"_onError"}}},{key:"getPlaybackType",value:function(){return Ge.NO_OP}},{key:"render",value:function(){var e=Pe("[data-html-img] {\n max-width: 100%;\n max-height: 100%; }\n".toString(),{baseUrl:this.options.baseUrl});return this.$el.append(e[0]),this.trigger(Te.PLAYBACK_READY,this.name),this}},{key:"_onLoad",value:function(){this.trigger(Te.PLAYBACK_ENDED,this.name)}},{key:"_onError",value:function(e){var t="error"===e.type?"load error":"loading aborted";this.trigger(Te.PLAYBACK_ERROR,{message:t},this.name)}}]),r}(Ge);ot.canPlay=function(e){return/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(e)};var lt=function(e){T(r,e);var t=L(r);function r(){var e;m(this,r);for(var i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return(e=t.call.apply(t,[this].concat(n)))._noiseFrameNum=-1,e}return A(r,[{key:"name",get:function(){return"no_op"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"template",get:function(){return we("<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%></p><p>\n</p>")}},{key:"attributes",get:function(){return{"data-no-op":""}}},{key:"render",value:function(){var e=this.options.playbackNotSupportedMessage||this.i18n.t("playback_not_supported"),t=Pe("[data-no-op] {\n position: absolute;\n height: 100%;\n width: 100%;\n text-align: center; }\n\n[data-no-op] p[data-no-op-msg] {\n position: absolute;\n text-align: center;\n font-size: 25px;\n left: 0;\n right: 0;\n color: white;\n padding: 10px;\n /* center vertically */\n top: 50%;\n transform: translateY(-50%);\n max-height: 100%;\n overflow: auto; }\n\n[data-no-op] canvas[data-no-op-canvas] {\n background-color: #777;\n height: 100%;\n width: 100%; }\n".toString(),{baseUrl:this.options.baseUrl});this.$el.append(t[0]),this.$el.html(this.template({message:e})),this.trigger(Te.PLAYBACK_READY,this.name);var r=!(!this.options.poster||!this.options.poster.showForNoOp);return!this.options.autoPlay&&r||this._animate(),this}},{key:"_noise",value:function(){if(this._noiseFrameNum=(this._noiseFrameNum+1)%5,!this._noiseFrameNum){var e,t=this.context.createImageData(this.context.canvas.width,this.context.canvas.height);try{e=new Uint32Array(t.data.buffer)}catch(n){e=new Uint32Array(this.context.canvas.width*this.context.canvas.height*4);for(var r=t.data,i=0;i<r.length;i++)e[i]=r[i]}for(var n=e.length,a=6*Math.random()+4,s=0,o=0,l=0;l<n;){if(s<0)s=a*Math.random(),o=255*Math.pow(Math.random(),.4)<<24;s-=1,e[l++]=o}this.context.putImageData(t,0,0)}}},{key:"_loop",value:function(){var e=this;this._stop||(this._noise(),this._animationHandle=X((function(){return e._loop()})))}},{key:"destroy",value:function(){this._animationHandle&&($(this._animationHandle),this._stop=!0)}},{key:"_animate",value:function(){this.canvas=this.$el.find("canvas[data-no-op-canvas]")[0],this.context=this.canvas.getContext("2d"),this._loop()}}]),r}(Ge);lt.canPlay=function(e){return!0};var ut=function(e){T(r,e);var t=L(r);function r(e){var i;return m(this,r),(i=t.call(this,e))._initializeMessages(),i}return A(r,[{key:"name",get:function(){return"strings"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"t",value:function(e){var t=this._language(),r=this._messages.en;return(t&&this._messages[t]||r)[e]||r[e]||e}},{key:"_language",value:function(){return this.core.options.language||ae()}},{key:"_initializeMessages",value:function(){this._messages=G.extend(!0,{en:{live:"live",back_to_live:"back to live",disabled:"Disabled",playback_not_supported:"Your browser does not support the playback of this video. Please try using a different browser.",default_error_title:"Could not play video.",default_error_message:"There was a problem trying to load the video."},de:{live:"Live",back_to_live:"Zurück zum Live-Video",disabled:"Deaktiviert",playback_not_supported:"Ihr Browser unterstützt das Playback Verfahren nicht. Bitte vesuchen Sie es mit einem anderen Browser.",default_error_title:"Video kann nicht abgespielt werden",default_error_message:"Es gab ein Problem beim Laden des Videos"},pt:{live:"ao vivo",back_to_live:"voltar para o ao vivo",disabled:"Desativado",playback_not_supported:"Seu navegador não supporta a reprodução deste video. Por favor, tente usar um navegador diferente.",default_error_title:"Não foi possível reproduzir o vídeo.",default_error_message:"Ocorreu um problema ao tentar carregar o vídeo."},es_am:{live:"vivo",back_to_live:"volver en vivo",disabled:"No disponible",playback_not_supported:"Su navegador no soporta la reproducción de este video. Por favor, utilice un navegador diferente.",default_error_title:"No se puede reproducir el video.",default_error_message:"Se ha producido un error al cargar el video."},es:{live:"en directo",back_to_live:"volver al directo",disabled:"No disponible",playback_not_supported:"Este navegador no es compatible para reproducir este vídeo. Utilice un navegador diferente.",default_error_title:"No se puede reproducir el vídeo.",default_error_message:"Se ha producido un problema al cargar el vídeo."},ru:{live:"прямой эфир",back_to_live:"к прямому эфиру",disabled:"Отключено",playback_not_supported:"Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер."},bg:{live:"на живо",back_to_live:"Върни на живо",disabled:"Изключено",playback_not_supported:"Вашият браузър не поддържа възпроизвеждането на това видео. Моля, пробвайте с друг браузър.",default_error_title:"Видеото не може да се възпроизведе.",default_error_message:"Възникна проблем при зареждането на видеото."},fr:{live:"en direct",back_to_live:"retour au direct",disabled:"Désactivé",playback_not_supported:"Votre navigateur ne supporte pas la lecture de cette vidéo. Merci de tenter sur un autre navigateur.",default_error_title:"Impossible de lire la vidéo.",default_error_message:"Un problème est survenu lors du chargement de la vidéo."},tr:{live:"canlı",back_to_live:"canlı yayına dön",disabled:"Engelli",playback_not_supported:"Tarayıcınız bu videoyu oynatma desteğine sahip değil. Lütfen farklı bir tarayıcı ile deneyin."},et:{live:"Otseülekanne",back_to_live:"Tagasi otseülekande juurde",disabled:"Keelatud",playback_not_supported:"Teie brauser ei toeta selle video taasesitust. Proovige kasutada muud brauserit."},ar:{live:"مباشر",back_to_live:"الرجوع إلى المباشر",disabled:"معطّل",playback_not_supported:"المتصفح الذي تستخدمه لا يدعم تشغيل هذا الفيديو. الرجاء إستخدام متصفح آخر.",default_error_title:"غير قادر الى التشغيل.",default_error_message:"حدثت مشكلة أثناء تحميل الفيديو."},zh:{live:"直播",back_to_live:"返回直播",disabled:"已禁用",playback_not_supported:"您的浏览器不支持该视频的播放。请尝试使用另一个浏览器。",default_error_title:"无法播放视频。",default_error_message:"在尝试加载视频时出现了问题。"}},this.core.options.strings||{}),this._messages["de-DE"]=this._messages.de,this._messages["pt-BR"]=this._messages.pt,this._messages["en-US"]=this._messages.en,this._messages["bg-BG"]=this._messages.bg,this._messages["es-419"]=this._messages.es_am,this._messages["es-ES"]=this._messages.es,this._messages["fr-FR"]=this._messages.fr,this._messages["tr-TR"]=this._messages.tr,this._messages["et-EE"]=this._messages.et,this._messages["ar-IQ"]=this._messages.ar,this._messages["zh-CN"]=this._messages.zh}}]),r}(Je),ct=function(e){T(r,e);var t=L(r);function r(){return m(this,r),t.apply(this,arguments)}return A(r,[{key:"name",get:function(){return"sources"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"bindEvents",value:function(){this.listenTo(this.core,Te.CORE_CONTAINERS_CREATED,this.onContainersCreated)}},{key:"onContainersCreated",value:function(){var e=this.core.containers.filter((function(e){return"no_op"!==e.playback.name}))[0]||this.core.containers[0];e&&this.core.containers.forEach((function(t){t!==e&&t.destroy()}))}}]),r}(Je);Xe.registerPlugin(ut),Xe.registerPlugin(ct),Xe.registerPlayback(lt),Xe.registerPlayback(ot),Xe.registerPlayback(st),Xe.registerPlayback(at);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function dt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ht,ft,gt={exports:{}};ht=gt,"undefined"!=typeof window&&(ft=()=>(()=>{var e={"./src/config.ts":
1
+ var HlsjsPlayback=function(){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function t(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,d(i.key),i)}}function i(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function s(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=n(e);if(t){var a=n(this).constructor;r=Reflect.construct(i,arguments,a)}else r=i.apply(this,arguments);return s(this,r)}}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=n(e)););return e}(e,t);if(i){var a=Object.getOwnPropertyDescriptor(i,t);return a.get?a.get.call(arguments.length<3?e:r):a.value}},l.apply(this,arguments)}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function d(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function h(e,t,r){return t=S(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,r||[],S(e).constructor):t.apply(e,r))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){T(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,v(i.key),i)}}function E(e,t,r){return t&&A(e.prototype,t),r&&A(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function T(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=S(e)););return e}(e,t);if(i){var n=Object.getOwnPropertyDescriptor(i,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},k.apply(this,arguments)}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,a,s,o=[],l=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(o.push(i.value),o.length!==t);l=!0);}catch(e){u=!0,n=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw n}}return o}}(e,t)||R(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||R(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function I(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=R(e))||t){r&&(e=r);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}function O(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w=function(){var e,t,r,i,n,a,s=[],o=s.concat,l=s.filter,u=s.slice,c=window.document,d={},h={},f={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},g=/^\s*<(\w+|!)[^>]*>/,p=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,m=/^(?:body|html)$/i,y=/([A-Z])/g,A=["val","css","html","text","data","width","height","offset"],E=c.createElement("table"),T=c.createElement("tr"),b={tr:c.createElement("tbody"),tbody:E,thead:E,tfoot:E,td:T,th:T,"*":c.createElement("div")},S=/complete|loaded|interactive/,_=/^[\w-]*$/,k={},L=k.toString,D={},R=c.createElement("div"),C={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},I=Array.isArray||function(e){return e instanceof Array};function O(e){return null==e?String(e):k[L.call(e)]||"object"}function w(e){return"function"==O(e)}function P(e){return null!=e&&e==e.window}function x(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function N(e){return"object"==O(e)}function F(e){return N(e)&&!P(e)&&Object.getPrototypeOf(e)==Object.prototype}function M(e){var t=!!e&&"length"in e&&e.length,i=r.type(e);return"function"!=i&&!P(e)&&("array"==i||0===t||"number"==typeof t&&t>0&&t-1 in e)}function U(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function B(e){return e in h?h[e]:h[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function G(e,t){return"number"!=typeof t||f[U(e)]?t:t+"px"}function j(e){return"children"in e?u.call(e.children):r.map(e.childNodes,(function(e){if(1==e.nodeType)return e}))}function K(e,t){var r,i=e?e.length:0;for(r=0;r<i;r++)this[r]=e[r];this.length=i,this.selector=t||""}function H(r,i,n){for(t in i)n&&(F(i[t])||I(i[t]))?(F(i[t])&&!F(r[t])&&(r[t]={}),I(i[t])&&!I(r[t])&&(r[t]=[]),H(r[t],i[t],n)):i[t]!==e&&(r[t]=i[t])}function V(e,t){return null==t?r(e):r(e).filter(t)}function Y(e,t,r,i){return w(t)?t.call(e,r,i):t}function W(e,t,r){null==r?e.removeAttribute(t):e.setAttribute(t,r)}function z(t,r){var i=t.className||"",n=i&&i.baseVal!==e;if(r===e)return n?i.baseVal:i;n?i.baseVal=r:t.className=r}function q(e){try{return e?"true"==e||"false"!=e&&("null"==e?null:+e+""==e?+e:/^[\[\{]/.test(e)?r.parseJSON(e):e):e}catch(t){return e}}function X(e,t){t(e);for(var r=0,i=e.childNodes.length;r<i;r++)X(e.childNodes[r],t)}return D.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;var r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(r)return r.call(e,t);var i,n=e.parentNode,a=!n;return a&&(n=R).appendChild(e),i=~D.qsa(n,t).indexOf(e),a&&R.removeChild(e),i},n=function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},a=function(e){return l.call(e,(function(t,r){return e.indexOf(t)==r}))},D.fragment=function(t,i,n){var a,s,o;return p.test(t)&&(a=r(c.createElement(RegExp.$1))),a||(t.replace&&(t=t.replace(v,"<$1></$2>")),i===e&&(i=g.test(t)&&RegExp.$1),i in b||(i="*"),(o=b[i]).innerHTML=""+t,a=r.each(u.call(o.childNodes),(function(){o.removeChild(this)}))),F(n)&&(s=r(a),r.each(n,(function(e,t){A.indexOf(e)>-1?s[e](t):s.attr(e,t)}))),a},D.Z=function(e,t){return new K(e,t)},D.isZ=function(e){return e instanceof D.Z},D.init=function(t,i){var n,a;if(!t)return D.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&g.test(t))n=D.fragment(t,RegExp.$1,i),t=null;else{if(i!==e)return r(i).find(t);n=D.qsa(c,t)}else{if(w(t))return r(c).ready(t);if(D.isZ(t))return t;if(I(t))a=t,n=l.call(a,(function(e){return null!=e}));else if(N(t))n=[t],t=null;else if(g.test(t))n=D.fragment(t.trim(),RegExp.$1,i),t=null;else{if(i!==e)return r(i).find(t);n=D.qsa(c,t)}}return D.Z(n,t)},(r=function(e,t){return D.init(e,t)}).extend=function(e){var t,r=u.call(arguments,1);return"boolean"==typeof e&&(t=e,e=r.shift()),r.forEach((function(r){H(e,r,t)})),e},D.qsa=function(e,t){var r,i="#"==t[0],n=!i&&"."==t[0],a=i||n?t.slice(1):t,s=_.test(a);return e.getElementById&&s&&i?(r=e.getElementById(a))?[r]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:u.call(s&&!i&&e.getElementsByClassName?n?e.getElementsByClassName(a):e.getElementsByTagName(t):e.querySelectorAll(t))},r.contains=c.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},r.type=O,r.isFunction=w,r.isWindow=P,r.isArray=I,r.isPlainObject=F,r.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},r.isNumeric=function(e){var t=Number(e),r=typeof e;return null!=e&&"boolean"!=r&&("string"!=r||e.length)&&!isNaN(t)&&isFinite(t)||!1},r.inArray=function(e,t,r){return s.indexOf.call(t,e,r)},r.camelCase=n,r.trim=function(e){return null==e?"":String.prototype.trim.call(e)},r.uuid=0,r.support={},r.expr={},r.noop=function(){},r.map=function(e,t){var i,n,a,s,o=[];if(M(e))for(n=0;n<e.length;n++)null!=(i=t(e[n],n))&&o.push(i);else for(a in e)null!=(i=t(e[a],a))&&o.push(i);return(s=o).length>0?r.fn.concat.apply([],s):s},r.each=function(e,t){var r,i;if(M(e)){for(r=0;r<e.length;r++)if(!1===t.call(e[r],r,e[r]))return e}else for(i in e)if(!1===t.call(e[i],i,e[i]))return e;return e},r.grep=function(e,t){return l.call(e,t)},window.JSON&&(r.parseJSON=JSON.parse),r.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),(function(e,t){k["[object "+t+"]"]=t.toLowerCase()})),r.fn={constructor:D.Z,length:0,forEach:s.forEach,reduce:s.reduce,push:s.push,sort:s.sort,splice:s.splice,indexOf:s.indexOf,concat:function(){var e,t,r=[];for(e=0;e<arguments.length;e++)t=arguments[e],r[e]=D.isZ(t)?t.toArray():t;return o.apply(D.isZ(this)?this.toArray():this,r)},map:function(e){return r(r.map(this,(function(t,r){return e.call(t,r,t)})))},slice:function(){return r(u.apply(this,arguments))},ready:function(e){return S.test(c.readyState)&&c.body?e(r):c.addEventListener("DOMContentLoaded",(function(){e(r)}),!1),this},get:function(t){return t===e?u.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(e){return s.every.call(this,(function(t,r){return!1!==e.call(t,r,t)})),this},filter:function(e){return w(e)?this.not(this.not(e)):r(l.call(this,(function(t){return D.matches(t,e)})))},add:function(e,t){return r(a(this.concat(r(e,t))))},is:function(e){return this.length>0&&D.matches(this[0],e)},not:function(t){var i=[];if(w(t)&&t.call!==e)this.each((function(e){t.call(this,e)||i.push(this)}));else{var n="string"==typeof t?this.filter(t):M(t)&&w(t.item)?u.call(t):r(t);this.forEach((function(e){n.indexOf(e)<0&&i.push(e)}))}return r(i)},has:function(e){return this.filter((function(){return N(e)?r.contains(this,e):r(this).find(e).size()}))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!N(e)?e:r(e)},last:function(){var e=this[this.length-1];return e&&!N(e)?e:r(e)},find:function(e){var t=this;return e?"object"==typeof e?r(e).filter((function(){var e=this;return s.some.call(t,(function(t){return r.contains(t,e)}))})):1==this.length?r(D.qsa(this[0],e)):this.map((function(){return D.qsa(this,e)})):r()},closest:function(e,t){var i=[],n="object"==typeof e&&r(e);return this.each((function(r,a){for(;a&&!(n?n.indexOf(a)>=0:D.matches(a,e));)a=a!==t&&!x(a)&&a.parentNode;a&&i.indexOf(a)<0&&i.push(a)})),r(i)},parents:function(e){for(var t=[],i=this;i.length>0;)i=r.map(i,(function(e){if((e=e.parentNode)&&!x(e)&&t.indexOf(e)<0)return t.push(e),e}));return V(t,e)},parent:function(e){return V(a(this.pluck("parentNode")),e)},children:function(e){return V(this.map((function(){return j(this)})),e)},contents:function(){return this.map((function(){return this.contentDocument||u.call(this.childNodes)}))},siblings:function(e){return V(this.map((function(e,t){return l.call(j(t.parentNode),(function(e){return e!==t}))})),e)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(e){return r.map(this,(function(t){return t[e]}))},show:function(){return this.each((function(){var e,t,r;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(e=this.nodeName,d[e]||(t=c.createElement(e),c.body.appendChild(t),r=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==r&&(r="block"),d[e]=r),d[e]))}))},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var t=w(e);if(this[0]&&!t)var i=r(e).get(0),n=i.parentNode||this.length>1;return this.each((function(a){r(this).wrapAll(t?e.call(this,a):n?i.cloneNode(!0):i)}))},wrapAll:function(e){if(this[0]){var t;for(r(this[0]).before(e=r(e));(t=e.children()).length;)e=t.first();r(e).append(this)}return this},wrapInner:function(e){var t=w(e);return this.each((function(i){var n=r(this),a=n.contents(),s=t?e.call(this,i):e;a.length?a.wrapAll(s):n.append(s)}))},unwrap:function(){return this.parent().each((function(){r(this).replaceWith(r(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return this.each((function(){var i=r(this);(t===e?"none"==i.css("display"):t)?i.show():i.hide()}))},prev:function(e){return r(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return r(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each((function(t){var i=this.innerHTML;r(this).empty().append(Y(this,e,t,i))})):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each((function(t){var r=Y(this,e,t,this.textContent);this.textContent=null==r?"":""+r})):0 in this?this.pluck("textContent").join(""):null},attr:function(r,i){var n;return"string"!=typeof r||1 in arguments?this.each((function(e){if(1===this.nodeType)if(N(r))for(t in r)W(this,t,r[t]);else W(this,r,Y(this,i,e,this.getAttribute(r)))})):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(r))?n:e},removeAttr:function(e){return this.each((function(){1===this.nodeType&&e.split(" ").forEach((function(e){W(this,e)}),this)}))},prop:function(e,t){return e=C[e]||e,1 in arguments?this.each((function(r){this[e]=Y(this,t,r,this[e])})):this[0]&&this[0][e]},removeProp:function(e){return e=C[e]||e,this.each((function(){delete this[e]}))},data:function(t,r){var i="data-"+t.replace(y,"-$1").toLowerCase(),n=1 in arguments?this.attr(i,r):this.attr(i);return null!==n?q(n):e},val:function(e){return 0 in arguments?(null==e&&(e=""),this.each((function(t){this.value=Y(this,e,t,this.value)}))):this[0]&&(this[0].multiple?r(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var i=r(this),n=Y(this,e,t,i.offset()),a=i.offsetParent().offset(),s={top:n.top-a.top,left:n.left-a.left};"static"==i.css("position")&&(s.position="relative"),i.css(s)}));if(!this.length)return null;if(c.documentElement!==this[0]&&!r.contains(c.documentElement,this[0]))return{top:0,left:0};var t=this[0].getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,width:Math.round(t.width),height:Math.round(t.height)}},css:function(e,i){if(arguments.length<2){var a=this[0];if("string"==typeof e){if(!a)return;return a.style[n(e)]||getComputedStyle(a,"").getPropertyValue(e)}if(I(e)){if(!a)return;var s={},o=getComputedStyle(a,"");return r.each(e,(function(e,t){s[t]=a.style[n(t)]||o.getPropertyValue(t)})),s}}var l="";if("string"==O(e))i||0===i?l=U(e)+":"+G(e,i):this.each((function(){this.style.removeProperty(U(e))}));else for(t in e)e[t]||0===e[t]?l+=U(t)+":"+G(t,e[t])+";":this.each((function(){this.style.removeProperty(U(t))}));return this.each((function(){this.style.cssText+=";"+l}))},index:function(e){return e?this.indexOf(r(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&s.some.call(this,(function(e){return this.test(z(e))}),B(e))},addClass:function(e){return e?this.each((function(t){if("className"in this){i=[];var n=z(this);Y(this,e,t,n).split(/\s+/g).forEach((function(e){r(this).hasClass(e)||i.push(e)}),this),i.length&&z(this,n+(n?" ":"")+i.join(" "))}})):this},removeClass:function(t){return this.each((function(r){if("className"in this){if(t===e)return z(this,"");i=z(this),Y(this,t,r,i).split(/\s+/g).forEach((function(e){i=i.replace(B(e)," ")})),z(this,i.trim())}}))},toggleClass:function(t,i){return t?this.each((function(n){var a=r(this);Y(this,t,n,z(this)).split(/\s+/g).forEach((function(t){(i===e?!a.hasClass(t):i)?a.addClass(t):a.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var r="scrollTop"in this[0];return t===e?r?this[0].scrollTop:this[0].pageYOffset:this.each(r?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var r="scrollLeft"in this[0];return t===e?r?this[0].scrollLeft:this[0].pageXOffset:this.each(r?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var e=this[0],t=this.offsetParent(),i=this.offset(),n=m.test(t[0].nodeName)?{top:0,left:0}:t.offset();return i.top-=parseFloat(r(e).css("margin-top"))||0,i.left-=parseFloat(r(e).css("margin-left"))||0,n.top+=parseFloat(r(t[0]).css("border-top-width"))||0,n.left+=parseFloat(r(t[0]).css("border-left-width"))||0,{top:i.top-n.top,left:i.left-n.left}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||c.body;e&&!m.test(e.nodeName)&&"static"==r(e).css("position");)e=e.offsetParent;return e}))}},r.fn.detach=r.fn.remove,["width","height"].forEach((function(t){var i=t.replace(/./,(function(e){return e[0].toUpperCase()}));r.fn[t]=function(n){var a,s=this[0];return n===e?P(s)?s["inner"+i]:x(s)?s.documentElement["scroll"+i]:(a=this.offset())&&a[t]:this.each((function(e){(s=r(this)).css(t,Y(this,n,e,s[t]()))}))}})),["after","prepend","before","append"].forEach((function(t,i){var n=i%2;r.fn[t]=function(){var t,a,s=r.map(arguments,(function(i){var n=[];return"array"==(t=O(i))?(i.forEach((function(t){return t.nodeType!==e?n.push(t):r.zepto.isZ(t)?n=n.concat(t.get()):void(n=n.concat(D.fragment(t)))})),n):"object"==t||null==i?i:D.fragment(i)})),o=this.length>1;return s.length<1?this:this.each((function(e,t){a=n?t:t.parentNode,t=0==i?t.nextSibling:1==i?t.firstChild:2==i?t:null;var l=r.contains(c.documentElement,a);s.forEach((function(e){if(o)e=e.cloneNode(!0);else if(!a)return r(e).remove();a.insertBefore(e,t),l&&X(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var t=e.ownerDocument?e.ownerDocument.defaultView:window;t.eval.call(t,e.innerHTML)}}))}))}))},r.fn[n?t+"To":"insert"+(i?"Before":"After")]=function(e){return r(e)[t](this),this}})),D.Z.prototype=K.prototype=r.fn,D.uniq=a,D.deserializeValue=q,r.zepto=D,r}();window.Zepto=w,void 0===window.$&&(window.$=w),function(e){var t,r,i=+new Date,n=window.document,a=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,o=/^(?:text|application)\/xml/i,l="application/json",u="text/html",c=/^\s*$/,d=n.createElement("a");function h(t,r,i,a){if(t.global)return function(t,r,i){var n=e.Event(r);return e(t).trigger(n,i),!n.isDefaultPrevented()}(r||n,i,a)}function f(e,t){var r=t.context;if(!1===t.beforeSend.call(r,e,t)||!1===h(t,r,"ajaxBeforeSend",[e,t]))return!1;h(t,r,"ajaxSend",[e,t])}function g(e,t,r,i){var n=r.context,a="success";r.success.call(n,e,a,t),i&&i.resolveWith(n,[e,a,t]),h(r,n,"ajaxSuccess",[t,r,e]),v(a,t,r)}function p(e,t,r,i,n){var a=i.context;i.error.call(a,r,t,e),n&&n.rejectWith(a,[r,t,e]),h(i,a,"ajaxError",[r,i,e||t]),v(t,r,i)}function v(t,r,i){var n=i.context;i.complete.call(n,r,t),h(i,n,"ajaxComplete",[r,i]),function(t){t.global&&! --e.active&&h(t,null,"ajaxStop")}(i)}function m(){}function y(e,t){return""==t?e:(e+"&"+t).replace(/[&?]{1,2}/,"?")}function A(t,r,i,n){return e.isFunction(r)&&(n=i,i=r,r=void 0),e.isFunction(i)||(n=i,i=void 0),{url:t,data:r,success:i,dataType:n}}d.href=window.location.href,e.active=0,e.ajaxJSONP=function(t,r){if(!("type"in t))return e.ajax(t);var a,s,o=t.jsonpCallback,l=(e.isFunction(o)?o():o)||"Zepto"+i++,u=n.createElement("script"),c=window[l],d=function(t){e(u).triggerHandler("error",t||"abort")},h={abort:d};return r&&r.promise(h),e(u).on("load error",(function(i,n){clearTimeout(s),e(u).off().remove(),"error"!=i.type&&a?g(a[0],h,t,r):p(null,n||"error",h,t,r),window[l]=c,a&&e.isFunction(c)&&c(a[0]),c=a=void 0})),!1===f(h,t)?(d("abort"),h):(window[l]=function(){a=arguments},u.src=t.url.replace(/\?(.+)=\?/,"?$1="+l),n.head.appendChild(u),t.timeout>0&&(s=setTimeout((function(){d("timeout")}),t.timeout)),h)},e.ajaxSettings={type:"GET",beforeSend:m,success:m,error:m,complete:m,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:l,xml:"application/xml, text/xml",html:u,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:m},e.ajax=function(i){var a,v,A=e.extend({},i||{}),E=e.Deferred&&e.Deferred();for(t in e.ajaxSettings)void 0===A[t]&&(A[t]=e.ajaxSettings[t]);!function(t){t.global&&0==e.active++&&h(t,null,"ajaxStart")}(A),A.crossDomain||((a=n.createElement("a")).href=A.url,a.href=a.href,A.crossDomain=d.protocol+"//"+d.host!=a.protocol+"//"+a.host),A.url||(A.url=window.location.toString()),(v=A.url.indexOf("#"))>-1&&(A.url=A.url.slice(0,v)),function(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=y(t.url,t.data),t.data=void 0)}(A);var T=A.dataType,b=/\?.+=\?/.test(A.url);if(b&&(T="jsonp"),!1!==A.cache&&(i&&!0===i.cache||"script"!=T&&"jsonp"!=T)||(A.url=y(A.url,"_="+Date.now())),"jsonp"==T)return b||(A.url=y(A.url,A.jsonp?A.jsonp+"=?":!1===A.jsonp?"":"callback=?")),e.ajaxJSONP(A,E);var S,_=A.accepts[T],k={},L=function(e,t){k[e.toLowerCase()]=[e,t]},D=/^([\w-]+:)\/\//.test(A.url)?RegExp.$1:window.location.protocol,R=A.xhr(),C=R.setRequestHeader;if(E&&E.promise(R),A.crossDomain||L("X-Requested-With","XMLHttpRequest"),L("Accept",_||"*/*"),(_=A.mimeType||_)&&(_.indexOf(",")>-1&&(_=_.split(",",2)[0]),R.overrideMimeType&&R.overrideMimeType(_)),(A.contentType||!1!==A.contentType&&A.data&&"GET"!=A.type.toUpperCase())&&L("Content-Type",A.contentType||"application/x-www-form-urlencoded"),A.headers)for(r in A.headers)L(r,A.headers[r]);if(R.setRequestHeader=L,R.onreadystatechange=function(){if(4==R.readyState){R.onreadystatechange=m,clearTimeout(S);var t,r=!1;if(R.status>=200&&R.status<300||304==R.status||0==R.status&&"file:"==D){if(T=T||function(e){return e&&(e=e.split(";",2)[0]),e&&(e==u?"html":e==l?"json":s.test(e)?"script":o.test(e)&&"xml")||"text"}(A.mimeType||R.getResponseHeader("content-type")),"arraybuffer"==R.responseType||"blob"==R.responseType)t=R.response;else{t=R.responseText;try{t=function(e,t,r){if(r.dataFilter==m)return e;var i=r.context;return r.dataFilter.call(i,e,t)}(t,T,A),"script"==T?(0,eval)(t):"xml"==T?t=R.responseXML:"json"==T&&(t=c.test(t)?null:e.parseJSON(t))}catch(e){r=e}if(r)return p(r,"parsererror",R,A,E)}g(t,R,A,E)}else p(R.statusText||null,R.status?"error":"abort",R,A,E)}},!1===f(R,A))return R.abort(),p(null,"abort",R,A,E),R;var I=!("async"in A)||A.async;if(R.open(A.type,A.url,I,A.username,A.password),A.xhrFields)for(r in A.xhrFields)R[r]=A.xhrFields[r];for(r in k)C.apply(R,k[r]);return A.timeout>0&&(S=setTimeout((function(){R.onreadystatechange=m,R.abort(),p(null,"timeout",R,A,E)}),A.timeout)),R.send(A.data?A.data:null),R},e.get=function(){return e.ajax(A.apply(null,arguments))},e.post=function(){var t=A.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=A.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,r,i){if(!this.length)return this;var n,s=this,o=t.split(/\s/),l=A(t,r,i),u=l.success;return o.length>1&&(l.url=o[0],n=o[1]),l.success=function(t){s.html(n?e("<div>").html(t.replace(a,"")).find(n):t),u&&u.apply(s,arguments)},e.ajax(l),this};var E=encodeURIComponent;function T(t,r,i,n){var a,s=e.isArray(r),o=e.isPlainObject(r);e.each(r,(function(r,l){a=e.type(l),n&&(r=i?n:n+"["+(o||"object"==a||"array"==a?r:"")+"]"),!n&&s?t.add(l.name,l.value):"array"==a||!i&&"object"==a?T(t,l,i,r):t.add(r,l)}))}e.param=function(t,r){var i=[];return i.add=function(t,r){e.isFunction(r)&&(r=r()),null==r&&(r=""),this.push(E(t)+"="+E(r))},T(i,t,r),i.join("&").replace(/%20/g,"+")}}(w),function(e){e.Callbacks=function(t){t=e.extend({},t);var r,i,n,a,s,o,l=[],u=!t.once&&[],c=function(e){for(r=t.memory&&e,i=!0,o=a||0,a=0,s=l.length,n=!0;l&&o<s;++o)if(!1===l[o].apply(e[0],e[1])&&t.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l.length=0:d.disable())},d={add:function(){if(l){var i=l.length,o=function(r){e.each(r,(function(e,r){"function"==typeof r?t.unique&&d.has(r)||l.push(r):r&&r.length&&"string"!=typeof r&&o(r)}))};o(arguments),n?s=l.length:r&&(a=i,c(r))}return this},remove:function(){return l&&e.each(arguments,(function(t,r){for(var i;(i=e.inArray(r,l,i))>-1;)l.splice(i,1),n&&(i<=s&&--s,i<=o&&--o)})),this},has:function(t){return!(!l||!(t?e.inArray(t,l)>-1:l.length))},empty:function(){return s=l.length=0,this},disable:function(){return l=u=r=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,r||d.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=[e,(t=t||[]).slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return d.fireWith(this,arguments)},fired:function(){return!!i}};return d}}(w),function(e){var t=Array.prototype.slice;function r(t){var i=[["resolve","done",e.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",e.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",e.Callbacks({memory:1})]],n="pending",a={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var t=arguments;return r((function(r){e.each(i,(function(i,n){var o=e.isFunction(t[i])&&t[i];s[n[1]]((function(){var t=o&&o.apply(this,arguments);if(t&&e.isFunction(t.promise))t.promise().done(r.resolve).fail(r.reject).progress(r.notify);else{var i=this===a?r.promise():this,s=o?[t]:arguments;r[n[0]+"With"](i,s)}}))})),t=null})).promise()},promise:function(t){return null!=t?e.extend(t,a):a}},s={};return e.each(i,(function(e,t){var r=t[2],o=t[3];a[t[1]]=r.add,o&&r.add((function(){n=o}),i[1^e][2].disable,i[2][2].lock),s[t[0]]=function(){return s[t[0]+"With"](this===s?a:this,arguments),this},s[t[0]+"With"]=r.fireWith})),a.promise(s),t&&t.call(s,s),s}e.when=function(i){var n,a,s,o=t.call(arguments),l=o.length,u=0,c=1!==l||i&&e.isFunction(i.promise)?l:0,d=1===c?i:r(),h=function(e,r,i){return function(a){r[e]=this,i[e]=arguments.length>1?t.call(arguments):a,i===n?d.notifyWith(r,i):--c||d.resolveWith(r,i)}};if(l>1)for(n=new Array(l),a=new Array(l),s=new Array(l);u<l;++u)o[u]&&e.isFunction(o[u].promise)?o[u].promise().done(h(u,s,o)).fail(d.reject).progress(h(u,a,n)):--c;return c||d.resolveWith(s,o),d.promise()},e.Deferred=r}(w),function(e){var t,r=1,i=Array.prototype.slice,n=e.isFunction,a=function(e){return"string"==typeof e},s={},o={},l="onfocusin"in window,u={focus:"focusin",blur:"focusout"},c={mouseenter:"mouseover",mouseleave:"mouseout"};function d(e){return e._zid||(e._zid=r++)}function h(e,t,r,i){if((t=f(t)).ns)var n=(a=t.ns,new RegExp("(?:^| )"+a.replace(" "," .* ?")+"(?: |$)"));var a;return(s[d(e)]||[]).filter((function(e){return e&&(!t.e||e.e==t.e)&&(!t.ns||n.test(e.ns))&&(!r||d(e.fn)===d(r))&&(!i||e.sel==i)}))}function f(e){var t=(""+e).split(".");return{e:t[0],ns:t.slice(1).sort().join(" ")}}function g(e,t){return e.del&&!l&&e.e in u||!!t}function p(e){return c[e]||l&&u[e]||e}function v(r,i,n,a,o,l,u){var h=d(r),v=s[h]||(s[h]=[]);i.split(/\s/).forEach((function(i){if("ready"==i)return e(document).ready(n);var s=f(i);s.fn=n,s.sel=o,s.e in c&&(n=function(t){var r=t.relatedTarget;if(!r||r!==this&&!e.contains(this,r))return s.fn.apply(this,arguments)}),s.del=l;var d=l||n;s.proxy=function(e){if(!(e=b(e)).isImmediatePropagationStopped()){e.data=a;var i=d.apply(r,e._args==t?[e]:[e].concat(e._args));return!1===i&&(e.preventDefault(),e.stopPropagation()),i}},s.i=v.length,v.push(s),"addEventListener"in r&&r.addEventListener(p(s.e),s.proxy,g(s,u))}))}function m(e,t,r,i,n){var a=d(e);(t||"").split(/\s/).forEach((function(t){h(e,t,r,i).forEach((function(t){delete s[a][t.i],"removeEventListener"in e&&e.removeEventListener(p(t.e),t.proxy,g(t,n))}))}))}o.click=o.mousedown=o.mouseup=o.mousemove="MouseEvents",e.event={add:v,remove:m},e.proxy=function(t,r){var s=2 in arguments&&i.call(arguments,2);if(n(t)){var o=function(){return t.apply(r,s?s.concat(i.call(arguments)):arguments)};return o._zid=d(t),o}if(a(r))return s?(s.unshift(t[r],t),e.proxy.apply(null,s)):e.proxy(t[r],t);throw new TypeError("expected function")},e.fn.bind=function(e,t,r){return this.on(e,t,r)},e.fn.unbind=function(e,t){return this.off(e,t)},e.fn.one=function(e,t,r,i){return this.on(e,t,r,i,1)};var y=function(){return!0},A=function(){return!1},E=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,T={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function b(r,i){return!i&&r.isDefaultPrevented||(i||(i=r),e.each(T,(function(e,t){var n=i[e];r[e]=function(){return this[t]=y,n&&n.apply(i,arguments)},r[t]=A})),r.timeStamp||(r.timeStamp=Date.now()),(i.defaultPrevented!==t?i.defaultPrevented:"returnValue"in i?!1===i.returnValue:i.getPreventDefault&&i.getPreventDefault())&&(r.isDefaultPrevented=y)),r}function S(e){var r,i={originalEvent:e};for(r in e)E.test(r)||e[r]===t||(i[r]=e[r]);return b(i,e)}e.fn.delegate=function(e,t,r){return this.on(t,e,r)},e.fn.undelegate=function(e,t,r){return this.off(t,e,r)},e.fn.live=function(t,r){return e(document.body).delegate(this.selector,t,r),this},e.fn.die=function(t,r){return e(document.body).undelegate(this.selector,t,r),this},e.fn.on=function(r,s,o,l,u){var c,d,h=this;return r&&!a(r)?(e.each(r,(function(e,t){h.on(e,s,o,t,u)})),h):(a(s)||n(l)||!1===l||(l=o,o=s,s=t),l!==t&&!1!==o||(l=o,o=t),!1===l&&(l=A),h.each((function(t,n){u&&(c=function(e){return m(n,e.type,l),l.apply(this,arguments)}),s&&(d=function(t){var r,a=e(t.target).closest(s,n).get(0);if(a&&a!==n)return r=e.extend(S(t),{currentTarget:a,liveFired:n}),(c||l).apply(a,[r].concat(i.call(arguments,1)))}),v(n,r,l,o,s,d||c)})))},e.fn.off=function(r,i,s){var o=this;return r&&!a(r)?(e.each(r,(function(e,t){o.off(e,i,t)})),o):(a(i)||n(s)||!1===s||(s=i,i=t),!1===s&&(s=A),o.each((function(){m(this,r,s,i)})))},e.fn.trigger=function(t,r){return(t=a(t)||e.isPlainObject(t)?e.Event(t):b(t))._args=r,this.each((function(){t.type in u&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,r)}))},e.fn.triggerHandler=function(t,r){var i,n;return this.each((function(s,o){(i=S(a(t)?e.Event(t):t))._args=r,i.target=o,e.each(h(o,t.type||t),(function(e,t){if(n=t.proxy(i),i.isImmediatePropagationStopped())return!1}))})),n},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(e,t){a(e)||(e=(t=e).type);var r=document.createEvent(o[e]||"Events"),i=!0;if(t)for(var n in t)"bubbles"==n?i=!!t[n]:r[n]=t[n];return r.initEvent(e,i,!0),b(r)}}(w),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t,r){try{return e(t,r)}catch(e){return null}}}}(),function(e){var t=e.zepto,r=t.qsa,i=t.matches;function n(t){return!(!(t=e(t)).width()&&!t.height())&&"none"!==t.css("display")}var a=e.expr[":"]={visible:function(){if(n(this))return this},hidden:function(){if(!n(this))return this},selected:function(){if(this.selected)return this},checked:function(){if(this.checked)return this},parent:function(){return this.parentNode},first:function(e){if(0===e)return this},last:function(e,t){if(e===t.length-1)return this},eq:function(e,t,r){if(e===r)return this},contains:function(t,r,i){if(e(this).text().indexOf(i)>-1)return this},has:function(e,r,i){if(t.qsa(this,i).length)return this}},s=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),o=/^\s*>/,l="Zepto"+ +new Date;function u(e,t){e=e.replace(/=#\]/g,'="#"]');var r,i,n=s.exec(e);if(n&&n[2]in a&&(r=a[n[2]],i=n[3],e=n[1],i)){var o=Number(i);i=isNaN(o)?i.replace(/^["']|["']$/g,""):o}return t(e,r,i)}t.qsa=function(i,n){return u(n,(function(a,s,u){try{var c;!a&&s?a="*":o.test(a)&&(c=e(i).addClass(l),a="."+l+" "+a);var d=r(i,a)}catch(e){throw console.error("error performing selector: %o",n),e}finally{c&&c.removeClass(l)}return s?t.uniq(e.map(d,(function(e,t){return s.call(e,t,d,u)}))):d}))},t.matches=function(e,t){return u(t,(function(t,r,n){return(!t||i(e,t))&&(!r||r.call(e,null,n)===e)}))}}(w);var P=O(w);Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<r;){var a=t[n];if(e.call(i,a,n,t))return a;n++}}}),Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,i=new Array(r);r--;)i[r]=[t[r],e[t[r]]];return i}),Object.values||(Object.values=function(e){for(var t=Object.keys(e),r=t.length,i=new Array(r);r--;)i[r]=e[t[r]];return i}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])}return r},writable:!0,configurable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<r;){var a=t[n];if(e.call(i,a,n,t))return n;n++}return-1},configurable:!0,writable:!0});var x,N,F,M={mp4:"data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE="},U=[{name:"Chromium",group:"Chrome",identifier:"Chromium/([0-9.]*)"},{name:"Chrome Mobile",group:"Chrome",identifier:"Chrome/([0-9.]*) Mobile",versionIdentifier:"Chrome/([0-9.]*)"},{name:"Chrome",group:"Chrome",identifier:"Chrome/([0-9.]*)"},{name:"Chrome for iOS",group:"Chrome",identifier:"CriOS/([0-9.]*)"},{name:"Android Browser",group:"Chrome",identifier:"CrMo/([0-9.]*)"},{name:"Firefox",group:"Firefox",identifier:"Firefox/([0-9.]*)"},{name:"Opera Mini",group:"Opera",identifier:"Opera Mini/([0-9.]*)"},{name:"Opera",group:"Opera",identifier:"Opera ([0-9.]*)"},{name:"Opera",group:"Opera",identifier:"Opera/([0-9.]*)",versionIdentifier:"Version/([0-9.]*)"},{name:"IEMobile",group:"Explorer",identifier:"IEMobile/([0-9.]*)"},{name:"Internet Explorer",group:"Explorer",identifier:"MSIE ([a-zA-Z0-9.]*)"},{name:"Internet Explorer",group:"Explorer",identifier:"Trident/([0-9.]*)",versionIdentifier:"rv:([0-9.]*)"},{name:"Spartan",group:"Spartan",identifier:"Edge/([0-9.]*)",versionIdentifier:"Edge/([0-9.]*)"},{name:"Safari",group:"Safari",identifier:"Safari/([0-9.]*)",versionIdentifier:"Version/([0-9.]*)"}],B=[{name:"Windows 2000",group:"Windows",identifier:"Windows NT 5.0",version:"5.0"},{name:"Windows XP",group:"Windows",identifier:"Windows NT 5.1",version:"5.1"},{name:"Windows Vista",group:"Windows",identifier:"Windows NT 6.0",version:"6.0"},{name:"Windows 7",group:"Windows",identifier:"Windows NT 6.1",version:"7.0"},{name:"Windows 8",group:"Windows",identifier:"Windows NT 6.2",version:"8.0"},{name:"Windows 8.1",group:"Windows",identifier:"Windows NT 6.3",version:"8.1"},{name:"Windows 10",group:"Windows",identifier:"Windows NT 10.0",version:"10.0"},{name:"Windows Phone",group:"Windows Phone",identifier:"Windows Phone ([0-9.]*)"},{name:"Windows Phone",group:"Windows Phone",identifier:"Windows Phone OS ([0-9.]*)"},{name:"Windows",group:"Windows",identifier:"Windows"},{name:"Chrome OS",group:"Chrome OS",identifier:"CrOS"},{name:"Android",group:"Android",identifier:"Android",versionIdentifier:"Android ([a-zA-Z0-9.-]*)"},{name:"iPad",group:"iOS",identifier:"iPad",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"iPod",group:"iOS",identifier:"iPod",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"iPhone",group:"iOS",identifier:"iPhone OS",versionIdentifier:"OS ([0-9_]*)",versionSeparator:"[_|.]"},{name:"Mac OS X High Sierra",group:"Mac OS",identifier:"Mac OS X (10([_|.])13([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Sierra",group:"Mac OS",identifier:"Mac OS X (10([_|.])12([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X El Capitan",group:"Mac OS",identifier:"Mac OS X (10([_|.])11([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Yosemite",group:"Mac OS",identifier:"Mac OS X (10([_|.])10([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Mavericks",group:"Mac OS",identifier:"Mac OS X (10([_|.])9([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Mountain Lion",group:"Mac OS",identifier:"Mac OS X (10([_|.])8([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Lion",group:"Mac OS",identifier:"Mac OS X (10([_|.])7([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Snow Leopard",group:"Mac OS",identifier:"Mac OS X (10([_|.])6([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Leopard",group:"Mac OS",identifier:"Mac OS X (10([_|.])5([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Tiger",group:"Mac OS",identifier:"Mac OS X (10([_|.])4([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Panther",group:"Mac OS",identifier:"Mac OS X (10([_|.])3([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Jaguar",group:"Mac OS",identifier:"Mac OS X (10([_|.])2([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Puma",group:"Mac OS",identifier:"Mac OS X (10([_|.])1([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS X Cheetah",group:"Mac OS",identifier:"Mac OS X (10([_|.])0([0-9_.]*))",versionSeparator:"[_|.]"},{name:"Mac OS",group:"Mac OS",identifier:"Mac OS"},{name:"Ubuntu",group:"Linux",identifier:"Ubuntu",versionIdentifier:"Ubuntu/([0-9.]*)"},{name:"Debian",group:"Linux",identifier:"Debian"},{name:"Gentoo",group:"Linux",identifier:"Gentoo"},{name:"Linux",group:"Linux",identifier:"Linux"},{name:"BlackBerry",group:"BlackBerry",identifier:"BlackBerry"}],G={},j=function(e,t){var r=e.split(".",2);t.fullVersion=e,r[0]&&(t.majorVersion=parseInt(r[0])),r[1]&&(t.minorVersion=parseInt(r[1]))},K=function(e,t,r){var i="["==t.substr(0,1)?new RegExp(t,"g"):t,n=e.split(i,2);"."!=t&&(e=e.replace(new RegExp(t,"g"),".")),r.fullVersion=e,n&&n[0]&&(r.majorVersion=parseInt(n[0])),n&&n[1]&&(r.minorVersion=parseInt(n[1]))},H=function(e){var t,r=e.match(/\b(playstation 4|nx|opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];if(/trident/i.test(r[1]))return t=/\brv[ :]+(\d+)/g.exec(e)||[],{name:"IE",version:parseInt(t[1]||"")};if("Chrome"===r[1]){if(null!=(t=e.match(/\bOPR\/(\d+)/)))return{name:"Opera",version:parseInt(t[1])};if(null!=(t=e.match(/\bEdge\/(\d+)/)))return{name:"Edge",version:parseInt(t[1])}}else/android/i.test(e)&&(t=e.match(/version\/(\d+)/i))&&(r.splice(1,1,"Android WebView"),r.splice(2,1,t[1]));return{name:(r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"])[0],version:parseInt(r[1])}}(navigator.userAgent);G.isEdge=/Edg|EdgiOS|EdgA/i.test(navigator.userAgent),G.isChrome=/Chrome|CriOS/i.test(navigator.userAgent)&&!G.isEdge,G.isSafari=/Safari/i.test(navigator.userAgent)&&!G.isChrome&&!G.isEdge,G.isFirefox=/Firefox/i.test(navigator.userAgent),G.isLegacyIE=!!window.ActiveXObject,G.isIE=G.isLegacyIE||/trident.*rv:1\d/i.test(navigator.userAgent),G.isIE11=/trident.*rv:11/i.test(navigator.userAgent),G.isChromecast=G.isChrome&&/CrKey/i.test(navigator.userAgent),G.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone|IEMobile|Mobile Safari|Opera Mini/i.test(navigator.userAgent),G.isiOS=/iPad|iPhone|iPod/i.test(navigator.userAgent),G.isAndroid=/Android/i.test(navigator.userAgent),G.isWindowsPhone=/Windows Phone/i.test(navigator.userAgent),G.isWin8App=/MSAppHost/i.test(navigator.userAgent),G.isWiiU=/WiiU/i.test(navigator.userAgent),G.isPS4=/PlayStation 4/i.test(navigator.userAgent),G.hasLocalstorage=function(){try{return localStorage.setItem("clappr","clappr"),localStorage.removeItem("clappr"),!0}catch(e){return!1}}(),G.hasFlash=function(){try{return!!new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){return!(!navigator.mimeTypes||void 0===navigator.mimeTypes["application/x-shockwave-flash"]||!navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)}}(),G.name=H.name,G.version=H.version,G.userAgent=navigator.userAgent,G.data=function(){var e,t={},r=G.userAgent.toLowerCase(),i=I(U);try{for(i.s();!(e=i.n()).done;){var n=e.value,a=new RegExp(n.identifier.toLowerCase()).exec(r);if(null!=a&&a[1]){if(t.name=n.name,t.group=n.group,n.versionIdentifier){var s=new RegExp(n.versionIdentifier.toLowerCase()).exec(r);null!=s&&s[1]&&j(s[1],t)}else j(a[1],t);break}}}catch(e){i.e(e)}finally{i.f()}return t}(),G.os=function(){var e,t={},r=G.userAgent.toLowerCase(),i=I(B);try{for(i.s();!(e=i.n()).done;){var n=e.value,a=new RegExp(n.identifier.toLowerCase()).exec(r);if(null!=a){if(t.name=n.name,t.group=n.group,n.version)K(n.version,n.versionSeparator?n.versionSeparator:".",t);else if(a[1])K(a[1],n.versionSeparator?n.versionSeparator:".",t);else if(n.versionIdentifier){var s=new RegExp(n.versionIdentifier.toLowerCase()).exec(r);null!=s&&s[1]&&K(s[1],n.versionSeparator?n.versionSeparator:".",t)}break}}}catch(e){i.e(e)}finally{i.f()}return t}(),G.isWindows=/^Windows$/i.test(G.os.group),G.isMacOS=/^Mac OS$/i.test(G.os.group),G.isLinux=/^Linux$/i.test(G.os.group),G.viewport=((x={}).width=P(window).width(),x.height=P(window).height(),x),G.device=(N=G.userAgent,(F=/\((iP(?:hone|ad|od))?(?:[^;]*; ){0,2}([^)]+(?=\)))/.exec(N))&&(F[1]||F[2])||""),void 0!==window.orientation&&function(){switch(window.orientation){case-90:case 90:G.viewport.orientation="landscape";break;default:G.viewport.orientation="portrait"}}();var V={},Y=[],W=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}).bind(window),z=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);function q(e,t){if(t)for(var r in t){var i=Object.getOwnPropertyDescriptor(t,r);i?Object.defineProperty(e,r,i):e[r]=t[r]}return e}function X(e,t){var r=function(e){function r(){var e;y(this,r);for(var i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return e=h(this,r,[].concat(n)),t.initialize&&t.initialize.apply(e,n),e}return b(r,e),E(r)}(e);return q(r.prototype,t),r}var $={fullscreenElement:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},requestFullscreen:function(e){if(e.requestFullscreen)return e.requestFullscreen();if(e.webkitRequestFullscreen){if("function"==typeof e.then)return e.webkitRequestFullscreen();e.webkitRequestFullscreen()}else{if(e.mozRequestFullScreen)return e.mozRequestFullScreen();if(e.msRequestFullscreen)return e.msRequestFullscreen();e.querySelector&&e.querySelector("video")&&e.querySelector("video").webkitEnterFullScreen?e.querySelector("video").webkitEnterFullScreen():e.webkitEnterFullScreen&&e.webkitEnterFullScreen()}},cancelFullscreen:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;e.exitFullscreen?e.exitFullscreen():e.webkitCancelFullScreen?e.webkitCancelFullScreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen()},fullscreenEnabled:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},Z=function(){return E((function e(){y(this,e)}),null,[{key:"params",get:function(){var e=window.location.search.substring(1);return e!==this.query&&(this._urlParams=this.parse(e),this.query=e),this._urlParams}},{key:"hashParams",get:function(){var e=window.location.hash.substring(1);return e!==this.hash&&(this._hashParams=this.parse(e),this.hash=e),this._hashParams}},{key:"parse",value:function(e){for(var t,r=/\+/g,i=/([^&=]+)=?([^&]*)/g,n=function(e){return decodeURIComponent(e.replace(r," "))},a={};t=i.exec(e);)a[n(t[1]).toLowerCase()]=n(t[2]);return a}}])}();function Q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"t",t=0,r=Z.params[e]||Z.hashParams[e]||"",i=r.match(/[0-9]+[hms]+/g)||[];if(i.length>0){var n={h:3600,m:60,s:1};i.forEach((function(e){if(e){var r=e[e.length-1],i=parseInt(e.slice(0,e.length-1),10);t+=i*n[r]}}))}else r&&(t=parseInt(r,10));return t}function J(e){return V[e]||(V[e]=0),e+ ++V[e]}function ee(e){return e-parseFloat(e)+1>=0}function te(){var e=document.getElementsByTagName("script");return e.length?e[e.length-1].src:""}function re(){return window.navigator&&window.navigator.language}function ie(e,t){var r=(t=Object.assign({inline:!1,muted:!1,timeout:250,type:"video",source:M.mp4,element:null},t)).element?t.element:document.createElement(t.type);r.muted=t.muted,!0===t.muted&&r.setAttribute("muted","muted"),!0===t.inline&&r.setAttribute("playsinline","playsinline"),r.src=t.source;var i=r.play(),n=setTimeout((function(){a(!1,new Error("Timeout ".concat(t.timeout," ms has been reached")))}),t.timeout),a=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;clearTimeout(n),e(t,r)};void 0!==i?i.then((function(){return a(!0)})).catch((function(e){return a(!1,e)})):a(!0)}var ne=function(){return E((function e(){y(this,e)}),null,[{key:"configure",value:function(e){this.options=P.extend(!0,this.options,e)}},{key:"create",value:function(e){return this.options.recycleVideo&&"video"===e&&Y.length>0?Y.shift():document.createElement(e)}},{key:"garbage",value:function(e){this.options.recycleVideo&&"VIDEO"===e.tagName.toUpperCase()&&(P(e).children().remove(),Object.values(e.attributes).forEach((function(t){return e.removeAttribute(t.name)})),Y.push(e))}}])}();ne.options={recycleVideo:!1};var ae=function(){return E((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;y(this,e),this.delay=t,this.lastTime=0}),[{key:"handle",value:function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=(new Date).getTime(),n=i-this.lastTime;n<this.delay&&n>0&&(t(),r&&e.preventDefault()),this.lastTime=i}}])}(),se=function(){return window.performance&&window.performance.now?performance.now():Date.now()},oe=function(e,t){return void 0!==e&&void 0!==t&&void 0!==t.find((function(t){return e.toLowerCase()===t.toLowerCase()}))},le="font-weight: bold; font-size: 13px;",ue="color: #ff8000;"+le,ce="color: #ff0000;"+le,de=["color: #0000ff;"+le,"color: #006600;"+le,ue,ce,ce],he=["debug","info","warn","error","disabled"],fe=function(){return E((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;y(this,e),this.EXCLUDE_LIST=["timeupdate","playback:timeupdate","playback:progress","container:hover","container:timeupdate","container:progress"],this.level=t,this.previousLevel=this.level,this.offLevel=r}),[{key:"level",get:function(){return this._level},set:function(e){this._level=e}},{key:"debug",value:function(e){this.log(e,0,Array.prototype.slice.call(arguments,1))}},{key:"info",value:function(e){this.log(e,1,Array.prototype.slice.call(arguments,1))}},{key:"warn",value:function(e){this.log(e,2,Array.prototype.slice.call(arguments,1))}},{key:"error",value:function(e){this.log(e,3,Array.prototype.slice.call(arguments,1))}},{key:"onOff",value:function(){this.level===this.offLevel?this.level=this.previousLevel:(this.previousLevel=this.level,this.level=this.offLevel),window.console&&window.console.log&&window.console.log("%c[Clappr.Log] set log level to "+he[this.level],ue)}},{key:"log",value:function(e,t,r){if(!(this.EXCLUDE_LIST.indexOf(r[0])>=0||t<this.level)){r||(r=e,e=null);var i=de[t],n="";e&&(n="["+e+"]"),window.console&&window.console.log&&window.console.log.apply(console,["%c["+he[t]+"]"+n,i].concat(r))}}}])}();fe.LEVEL_DEBUG=0,fe.LEVEL_INFO=1,fe.LEVEL_WARN=2,fe.LEVEL_ERROR=3,fe.getInstance=function(){return void 0===this._instance&&(this._instance=new this),this._instance},fe.setLevel=function(e){this.getInstance().level=e},fe.debug=function(){this.getInstance().debug.apply(this.getInstance(),arguments)},fe.info=function(){this.getInstance().info.apply(this.getInstance(),arguments)},fe.warn=function(){this.getInstance().warn.apply(this.getInstance(),arguments)},fe.error=function(){this.getInstance().error.apply(this.getInstance(),arguments)};var ge=Array.prototype.slice,pe=/\s+/,ve=function(e,t,r,i){if(!r)return!0;if("object"===m(r)){for(var n in r)e[t].apply(e,[n,r[n]].concat(i));return!1}if(pe.test(r)){for(var a=r.split(pe),s=0,o=a.length;s<o;s++)e[t].apply(e,[a[s]].concat(i));return!1}return!0},me=function(e,t,r,i){var n,a=-1,s=e.length,o=t[0],l=t[1],u=t[2];!function c(){try{switch(t.length){case 0:for(;++a<s;)(n=e[a]).callback.call(n.ctx);return;case 1:for(;++a<s;)(n=e[a]).callback.call(n.ctx,o);return;case 2:for(;++a<s;)(n=e[a]).callback.call(n.ctx,o,l);return;case 3:for(;++a<s;)(n=e[a]).callback.call(n.ctx,o,l,u);return;default:for(;++a<s;)(n=e[a]).callback.apply(n.ctx,t);return}}catch(e){fe.error.apply(fe,[r,"error on event",i,"trigger","-",e]),c()}}()},ye=function(){function e(){y(this,e)}return E(e,[{key:"on",value:function(e,t,r){return ve(this,"on",e,[t,r])&&t?(this._events||(this._events={}),(this._events[e]||(this._events[e]=[])).push({callback:t,context:r,ctx:r||this}),this):this}},{key:"once",value:function(e,t,r){var i,n=this;if(!ve(this,"once",e,[t,r])||!t)return this;return i=function(){n.off(e,i),t.apply(this,arguments)},i._callback=t,this.on(e,i,r)}},{key:"off",value:function(e,t,r){var i,n,a,s,o,l,u,c;if(!this._events||!ve(this,"off",e,[t,r]))return this;if(!e&&!t&&!r)return this._events=void 0,this;for(o=0,l=(s=e?[e]:Object.keys(this._events)).length;o<l;o++)if(e=s[o],a=this._events[e]){if(this._events[e]=i=[],t||r)for(u=0,c=a.length;u<c;u++)n=a[u],(t&&t!==n.callback&&t!==n.callback._callback||r&&r!==n.context)&&i.push(n);i.length||delete this._events[e]}return this}},{key:"trigger",value:function(e){var t=this.name||this.constructor.name;if(fe.debug.apply(fe,[t].concat(Array.prototype.slice.call(arguments))),!this._events)return this;var r=ge.call(arguments,1);if(!ve(this,"trigger",e,r))return this;var i=this._events[e],n=this._events.all;return i&&me(i,r,t,e),n&&me(n,arguments,t,e),this}},{key:"stopListening",value:function(e,t,r){var i=this._listeningTo;if(!i)return this;var n=!t&&!r;for(var a in r||"object"!==m(t)||(r=this),e&&((i={})[e._listenId]=e),i)(e=i[a]).off(t,r,this),(n||0===Object.keys(e._events).length)&&delete this._listeningTo[a];return this}}],[{key:"register",value:function(t){e.Custom||(e.Custom={});var r="string"==typeof t&&t.toUpperCase().trim();r&&!e.Custom[r]?e.Custom[r]=r.toLowerCase().split("_").map((function(e,t){return 0===t?e:e=e[0].toUpperCase()+e.slice(1)})).join(""):fe.error("Events","Error when register event: "+t)}},{key:"listAvailableCustomEvents",value:function(){return e.Custom||(e.Custom={}),Object.keys(e.Custom).filter((function(t){return"string"==typeof e.Custom[t]}))}}])}();ye.prototype.listenTo=function(e,t,r){return(this._listeningTo||(this._listeningTo={}))[e._listenId||(e._listenId=J("l"))]=e,r||"object"!==m(t)||(r=this),e.on(t,r,this),this},ye.prototype.listenToOnce=function(e,t,r){return(this._listeningTo||(this._listeningTo={}))[e._listenId||(e._listenId=J("l"))]=e,r||"object"!==m(t)||(r=this),e.once(t,r,this),this},ye.PLAYER_READY="ready",ye.PLAYER_RESIZE="resize",ye.PLAYER_FULLSCREEN="fullscreen",ye.PLAYER_PLAY="play",ye.PLAYER_PAUSE="pause",ye.PLAYER_STOP="stop",ye.PLAYER_ENDED="ended",ye.PLAYER_SEEK="seek",ye.PLAYER_ERROR="playererror",ye.ERROR="error",ye.PLAYER_TIMEUPDATE="timeupdate",ye.PLAYER_VOLUMEUPDATE="volumeupdate",ye.PLAYER_SUBTITLE_AVAILABLE="subtitleavailable",ye.PLAYBACK_PIP_ENTER="playback:picture-in-picture:enter",ye.PLAYBACK_PIP_EXIT="playback:picture-in-picture:exit",ye.PLAYBACK_PROGRESS="playback:progress",ye.PLAYBACK_TIMEUPDATE="playback:timeupdate",ye.PLAYBACK_READY="playback:ready",ye.PLAYBACK_BUFFERING="playback:buffering",ye.PLAYBACK_BUFFERFULL="playback:bufferfull",ye.PLAYBACK_SETTINGSUPDATE="playback:settingsupdate",ye.PLAYBACK_LOADEDMETADATA="playback:loadedmetadata",ye.PLAYBACK_HIGHDEFINITIONUPDATE="playback:highdefinitionupdate",ye.PLAYBACK_BITRATE="playback:bitrate",ye.PLAYBACK_LEVELS_AVAILABLE="playback:levels:available",ye.PLAYBACK_LEVEL_SWITCH_START="playback:levels:switch:start",ye.PLAYBACK_LEVEL_SWITCH_END="playback:levels:switch:end",ye.PLAYBACK_PLAYBACKSTATE="playback:playbackstate",ye.PLAYBACK_DVR="playback:dvr",ye.PLAYBACK_MEDIACONTROL_DISABLE="playback:mediacontrol:disable",ye.PLAYBACK_MEDIACONTROL_ENABLE="playback:mediacontrol:enable",ye.PLAYBACK_ENDED="playback:ended",ye.PLAYBACK_PLAY_INTENT="playback:play:intent",ye.PLAYBACK_PLAY="playback:play",ye.PLAYBACK_PAUSE="playback:pause",ye.PLAYBACK_SEEK="playback:seek",ye.PLAYBACK_SEEKED="playback:seeked",ye.PLAYBACK_STOP="playback:stop",ye.PLAYBACK_ERROR="playback:error",ye.PLAYBACK_STATS_ADD="playback:stats:add",ye.PLAYBACK_FRAGMENT_LOADED="playback:fragment:loaded",ye.PLAYBACK_LEVEL_SWITCH="playback:level:switch",ye.PLAYBACK_SUBTITLE_AVAILABLE="playback:subtitle:available",ye.PLAYBACK_SUBTITLE_CHANGED="playback:subtitle:changed",ye.PLAYBACK_AUDIO_AVAILABLE="playback:audio:available",ye.PLAYBACK_AUDIO_CHANGED="playback:audio:changed",ye.CORE_CONTAINERS_CREATED="core:containers:created",ye.CORE_ACTIVE_CONTAINER_CHANGED="core:active:container:changed",ye.CORE_OPTIONS_CHANGE="core:options:change",ye.CORE_READY="core:ready",ye.CORE_FULLSCREEN="core:fullscreen",ye.CORE_RESIZE="core:resize",ye.CORE_SCREEN_ORIENTATION_CHANGED="core:screen:orientation:changed",ye.CORE_MOUSE_MOVE="core:mousemove",ye.CORE_MOUSE_LEAVE="core:mouseleave",ye.CONTAINER_PLAYBACKSTATE="container:playbackstate",ye.CONTAINER_PLAYBACKDVRSTATECHANGED="container:dvr",ye.CONTAINER_BITRATE="container:bitrate",ye.CONTAINER_STATS_REPORT="container:stats:report",ye.CONTAINER_DESTROYED="container:destroyed",ye.CONTAINER_READY="container:ready",ye.CONTAINER_RESIZE="container:resize",ye.CONTAINER_ERROR="container:error",ye.CONTAINER_LOADEDMETADATA="container:loadedmetadata",ye.CONTAINER_SUBTITLE_AVAILABLE="container:subtitle:available",ye.CONTAINER_SUBTITLE_CHANGED="container:subtitle:changed",ye.CONTAINER_AUDIO_AVAILABLE="container:audio:available",ye.CONTAINER_AUDIO_CHANGED="container:audio:changed",ye.CONTAINER_TIMEUPDATE="container:timeupdate",ye.CONTAINER_PROGRESS="container:progress",ye.CONTAINER_PLAY="container:play",ye.CONTAINER_STOP="container:stop",ye.CONTAINER_PAUSE="container:pause",ye.CONTAINER_ENDED="container:ended",ye.CONTAINER_CLICK="container:click",ye.CONTAINER_DBLCLICK="container:dblclick",ye.CONTAINER_CONTEXTMENU="container:contextmenu",ye.CONTAINER_MOUSE_ENTER="container:mouseenter",ye.CONTAINER_MOUSE_LEAVE="container:mouseleave",ye.CONTAINER_MOUSE_UP="container:mouseup",ye.CONTAINER_MOUSE_DOWN="container:mousedown",ye.CONTAINER_PIP_ENTER="container:picture-in-picture:enter",ye.CONTAINER_PIP_EXIT="container:picture-in-picture:exit",ye.CONTAINER_SEEK="container:seek",ye.CONTAINER_SEEKED="container:seeked",ye.CONTAINER_VOLUME="container:volume",ye.CONTAINER_FULLSCREEN="container:fullscreen",ye.CONTAINER_STATE_BUFFERING="container:state:buffering",ye.CONTAINER_STATE_BUFFERFULL="container:state:bufferfull",ye.CONTAINER_SETTINGSUPDATE="container:settingsupdate",ye.CONTAINER_HIGHDEFINITIONUPDATE="container:highdefinitionupdate",ye.CONTAINER_MEDIACONTROL_SHOW="container:mediacontrol:show",ye.CONTAINER_MEDIACONTROL_HIDE="container:mediacontrol:hide",ye.CONTAINER_MEDIACONTROL_DISABLE="container:mediacontrol:disable",ye.CONTAINER_MEDIACONTROL_ENABLE="container:mediacontrol:enable",ye.CONTAINER_STATS_ADD="container:stats:add",ye.CONTAINER_OPTIONS_CHANGE="container:options:change",ye.MEDIACONTROL_RENDERED="mediacontrol:rendered",ye.MEDIACONTROL_FULLSCREEN="mediacontrol:fullscreen",ye.MEDIACONTROL_SHOW="mediacontrol:show",ye.MEDIACONTROL_HIDE="mediacontrol:hide",ye.MEDIACONTROL_MOUSEMOVE_SEEKBAR="mediacontrol:mousemove:seekbar",ye.MEDIACONTROL_MOUSELEAVE_SEEKBAR="mediacontrol:mouseleave:seekbar",ye.MEDIACONTROL_PLAYING="mediacontrol:playing",ye.MEDIACONTROL_NOTPLAYING="mediacontrol:notplaying",ye.MEDIACONTROL_CONTAINERCHANGED="mediacontrol:containerchanged",ye.MEDIACONTROL_OPTIONS_CHANGE="mediacontrol:options:change";var Ae=function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return y(this,t),(e=h(this,t,[r]))._options=r,e.uniqueId=J("o"),e}return b(t,e),E(t,[{key:"options",get:function(){return this._options}}])}(ye),Ee={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Te=/(.)^/,be={"'":"'","\\":"\\","\r":"r","\n":"n","\t":"t","\u2028":"u2028","\u2029":"u2029"},Se=/\\|'|\r|\n|\t|\u2028|\u2029/g,_e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},ke=new RegExp("[&<>\"']","g"),Le=function(e){return null===e?"":(""+e).replace(ke,(function(e){return _e[e]}))},De=0,Re=function(e,t){var r,i=new RegExp([(Ee.escape||Te).source,(Ee.interpolate||Te).source,(Ee.evaluate||Te).source].join("|")+"|$","g"),n=0,a="__p+='";e.replace(i,(function(t,r,i,s,o){return a+=e.slice(n,o).replace(Se,(function(e){return"\\"+be[e]})),r&&(a+="'+\n((__t=("+r+"))==null?'':escapeExpr(__t))+\n'"),i&&(a+="'+\n((__t=("+i+"))==null?'':__t)+\n'"),s&&(a+="';\n"+s+"\n__p+='"),n=o+t.length,t})),a+="';\n",Ee.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n//# sourceURL=/microtemplates/source["+De+++"]";try{r=new Function(Ee.variable||"obj","escapeExpr",a)}catch(e){throw e.source=a,e}if(t)return r(t,Le);var s=function(e){return r.call(this,e,Le)};return s.source="function("+(Ee.variable||"obj")+"){\n"+a+"}",s};Re.settings=Ee;var Ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{baseUrl:""};return P('<style class="clappr-style"></style>').html(Re(e.toString())(t))},Ie=/^(\S+)\s*(.*)$/,Oe=function(e){function t(e){var r;return y(this,t),(r=h(this,t,[e])).cid=J("c"),r._ensureElement(),r.delegateEvents(),r}return b(t,e),E(t,[{key:"tagName",get:function(){return"div"}},{key:"events",get:function(){return{}}},{key:"attributes",get:function(){return{}}},{key:"$",value:function(e){return this.$el.find(e)}},{key:"render",value:function(){return this}},{key:"destroy",value:function(){return this.$el.remove(),this.stopListening(),this.undelegateEvents(),this}},{key:"setElement",value:function(e,t){return this.$el&&this.undelegateEvents(),this.$el=P.zepto.isZ(e)?e:P(e),this.el=this.$el[0],!1!==t&&this.delegateEvents(),this}},{key:"delegateEvents",value:function(e){for(var t in e||(e=this.events),this.undelegateEvents(),e){var r=e[t];if(r&&r.constructor!==Function&&(r=this[e[t]]),r){var i=t.match(Ie),n=i[1],a=i[2];n+=".delegateEvents"+this.cid,""===a?this.$el.on(n,r.bind(this)):this.$el.on(n,a,r.bind(this))}}return this}},{key:"undelegateEvents",value:function(){return this.$el.off(".delegateEvents"+this.cid),this}},{key:"_ensureElement",value:function(){if(this.el)this.setElement(this.el,!1);else{var e=P.extend(!0,{},this.attributes);this.id&&(e.id=this.id),this.className&&(e.class=this.className);var t=P(ne.create(this.tagName)).attr(e);this.setElement(t,!1)}}}])}(Ae),we=function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return y(this,t),(e=h(this,t,[r])).core=i,e}return b(t,e),E(t,[{key:"name",get:function(){return"error"}},{key:"createError",value:function(e){this.core?this.core.trigger(ye.ERROR,e):fe.warn(this.name,"Core is not set. Error: ",e)}}],[{key:"Levels",get:function(){return{FATAL:"FATAL",WARN:"WARN",INFO:"INFO"}}}])}(Ae),Pe={createError:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{useCodePrefix:!0},r=this.constructor&&this.constructor.type||"",i=this.name||r,n=this.i18n||this.core&&this.core.i18n||this.container&&this.container.i18n,a="".concat(i,":").concat(e&&e.code||"unknown"),s={description:"",level:we.Levels.FATAL,origin:i,scope:r,raw:{}},o=Object.assign({},s,e,{code:t.useCodePrefix?a:e.code});if(n&&o.level==we.Levels.FATAL&&!o.UI){var l={title:n.t("default_error_title"),message:n.t("default_error_message")};o.UI=l}return this.playerError?this.playerError.createError(o):fe.warn(i,"PlayerError is not defined. Error: ",o),o}},xe=function(e){function t(e){var r;return y(this,t),(r=h(this,t,[e.options])).core=e,r.enabled=!0,r.bindEvents(),r.render(),r}return b(t,e),E(t,[{key:"playerError",get:function(){return this.core.playerError}},{key:"bindEvents",value:function(){}},{key:"getExternalInterface",value:function(){return{}}},{key:"enable",value:function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)}},{key:"disable",value:function(){this.stopListening(),this.$el.hide(),this.enabled=!1}},{key:"render",value:function(){return this}}])}(Oe);Object.assign(xe.prototype,Pe),xe.extend=function(e){return X(xe,e)},xe.type="core";var Ne=function(e){function t(e,r,i){var n;return y(this,t),(n=h(this,t,[e]))._i18n=r,n.currentTime=0,n.volume=100,n.playback=e.playback,n.playerError=i,n.settings=P.extend(!0,{},n.playback.settings),n.isReady=!1,n.mediaControlDisabled=!1,n.plugins=[n.playback],n.dblTapHandler=new ae(500),n.clickTimer=null,n.clickDelay=200,n.actionsMetadata={},n.bindEvents(),n}return b(t,e),E(t,[{key:"name",get:function(){return"Container"}},{key:"attributes",get:function(){return{class:"container","data-container":""}}},{key:"events",get:function(){return{click:"clicked",dblclick:"dblClicked",touchend:"dblTap",contextmenu:"onContextMenu",mouseenter:"mouseEnter",mouseleave:"mouseLeave",mouseup:"onMouseUp",mousedown:"onMouseDown"}}},{key:"ended",get:function(){return this.playback.ended}},{key:"buffering",get:function(){return this.playback.buffering}},{key:"i18n",get:function(){return this._i18n}},{key:"hasClosedCaptionsTracks",get:function(){return this.playback.hasClosedCaptionsTracks}},{key:"closedCaptionsTracks",get:function(){return this.playback.closedCaptionsTracks}},{key:"closedCaptionsTrackId",get:function(){return this.playback.closedCaptionsTrackId},set:function(e){this.playback.closedCaptionsTrackId=e}},{key:"audioTracks",get:function(){return this.playback.audioTracks}},{key:"currentAudioTrack",get:function(){return this.playback.currentAudioTrack}},{key:"isPiPActive",get:function(){return this.playback.isPiPActive}},{key:"bindEvents",value:function(){this.listenTo(this.playback,ye.PLAYBACK_PROGRESS,this.onProgress),this.listenTo(this.playback,ye.PLAYBACK_TIMEUPDATE,this.timeUpdated),this.listenTo(this.playback,ye.PLAYBACK_READY,this.ready),this.listenTo(this.playback,ye.PLAYBACK_BUFFERING,this.onBuffering),this.listenTo(this.playback,ye.PLAYBACK_BUFFERFULL,this.bufferfull),this.listenTo(this.playback,ye.PLAYBACK_SETTINGSUPDATE,this.settingsUpdate),this.listenTo(this.playback,ye.PLAYBACK_LOADEDMETADATA,this.loadedMetadata),this.listenTo(this.playback,ye.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinitionUpdate),this.listenTo(this.playback,ye.PLAYBACK_BITRATE,this.updateBitrate),this.listenTo(this.playback,ye.PLAYBACK_PLAYBACKSTATE,this.playbackStateChanged),this.listenTo(this.playback,ye.PLAYBACK_DVR,this.playbackDvrStateChanged),this.listenTo(this.playback,ye.PLAYBACK_MEDIACONTROL_DISABLE,this.disableMediaControl),this.listenTo(this.playback,ye.PLAYBACK_MEDIACONTROL_ENABLE,this.enableMediaControl),this.listenTo(this.playback,ye.PLAYBACK_SEEK,this.onSeek),this.listenTo(this.playback,ye.PLAYBACK_SEEKED,this.onSeeked),this.listenTo(this.playback,ye.PLAYBACK_ENDED,this.onEnded),this.listenTo(this.playback,ye.PLAYBACK_PLAY,this.playing),this.listenTo(this.playback,ye.PLAYBACK_PAUSE,this.paused),this.listenTo(this.playback,ye.PLAYBACK_STOP,this.stopped),this.listenTo(this.playback,ye.PLAYBACK_ERROR,this.error),this.listenTo(this.playback,ye.PLAYBACK_SUBTITLE_AVAILABLE,this.subtitleAvailable),this.listenTo(this.playback,ye.PLAYBACK_SUBTITLE_CHANGED,this.subtitleChanged),this.listenTo(this.playback,ye.PLAYBACK_AUDIO_AVAILABLE,this.audioAvailable),this.listenTo(this.playback,ye.PLAYBACK_AUDIO_CHANGED,this.audioChanged),this.listenTo(this.playback,ye.PLAYBACK_PIP_ENTER,this.onEnterPiP),this.listenTo(this.playback,ye.PLAYBACK_PIP_EXIT,this.onExitPiP)}},{key:"subtitleAvailable",value:function(){this.trigger(ye.CONTAINER_SUBTITLE_AVAILABLE)}},{key:"subtitleChanged",value:function(e){this.trigger(ye.CONTAINER_SUBTITLE_CHANGED,e)}},{key:"audioAvailable",value:function(e){this.trigger(ye.CONTAINER_AUDIO_AVAILABLE,e)}},{key:"audioChanged",value:function(e){this.trigger(ye.CONTAINER_AUDIO_CHANGED,e)}},{key:"playbackStateChanged",value:function(e){this.trigger(ye.CONTAINER_PLAYBACKSTATE,e)}},{key:"playbackDvrStateChanged",value:function(e){this.settings=this.playback.settings,this.dvrInUse=e,this.trigger(ye.CONTAINER_PLAYBACKDVRSTATECHANGED,e)}},{key:"updateBitrate",value:function(e){this.trigger(ye.CONTAINER_BITRATE,e)}},{key:"statsReport",value:function(e){this.trigger(ye.CONTAINER_STATS_REPORT,e)}},{key:"getPlaybackType",value:function(){return this.playback.getPlaybackType()}},{key:"isDvrEnabled",value:function(){return!!this.playback.dvrEnabled}},{key:"isDvrInUse",value:function(){return!!this.dvrInUse}},{key:"destroy",value:function(){this.disableResizeObserver(),this.trigger(ye.CONTAINER_DESTROYED,this,this.name),this.stopListening(),this.plugins.forEach((function(e){return e.destroy()})),this.$el.remove(),this.undelegateEvents()}},{key:"setStyle",value:function(e){this.$el.css(e)}},{key:"animate",value:function(e,t){return this.$el.animate(e,t).promise()}},{key:"ready",value:function(){this.isReady=!0,this.trigger(ye.CONTAINER_READY,this.name)}},{key:"isPlaying",value:function(){return this.playback.isPlaying()}},{key:"getStartTimeOffset",value:function(){return this.playback.getStartTimeOffset()}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getDuration",value:function(){return this.playback.getDuration()}},{key:"error",value:function(e){this.isReady||this.ready(),this.trigger(ye.CONTAINER_ERROR,e,this.name)}},{key:"loadedMetadata",value:function(e){this.trigger(ye.CONTAINER_LOADEDMETADATA,e)}},{key:"timeUpdated",value:function(e){this.currentTime=e.current,this.trigger(ye.CONTAINER_TIMEUPDATE,e,this.name)}},{key:"onProgress",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.trigger.apply(this,[ye.CONTAINER_PROGRESS].concat(t,[this.name]))}},{key:"playing",value:function(){this.trigger(ye.CONTAINER_PLAY,this.name,this.actionsMetadata.playEvent||{}),this.actionsMetadata.playEvent={}}},{key:"paused",value:function(){this.trigger(ye.CONTAINER_PAUSE,this.name,this.actionsMetadata.pauseEvent||{}),this.actionsMetadata.pauseEvent={}}},{key:"stopped",value:function(){this.trigger(ye.CONTAINER_STOP,this.actionsMetadata.stopEvent||{}),this.actionsMetadata.stopEvent={}}},{key:"play",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.actionsMetadata.playEvent=e,this.playback.play(e)}},{key:"stop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.actionsMetadata.stopEvent=e,this.playback.stop(e),this.currentTime=0}},{key:"switchAudioTrack",value:function(e){this.playback.switchAudioTrack(e)}},{key:"pause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.actionsMetadata.pauseEvent=e,this.playback.pause(e)}},{key:"onEnded",value:function(){this.trigger(ye.CONTAINER_ENDED,this,this.name),this.currentTime=0}},{key:"clicked",value:function(){var e=this;this.options.chromeless&&!this.options.allowUserInteraction||(this.clickTimer=setTimeout((function(){e.clickTimer&&e.trigger(ye.CONTAINER_CLICK,e,e.name)}),this.clickDelay))}},{key:"cancelClicked",value:function(){clearTimeout(this.clickTimer),this.clickTimer=null}},{key:"dblClicked",value:function(){this.options.chromeless&&!this.options.allowUserInteraction||(this.cancelClicked(),this.trigger(ye.CONTAINER_DBLCLICK,this,this.name))}},{key:"dblTap",value:function(e){var t=this;this.options.chromeless&&!this.options.allowUserInteraction||this.dblTapHandler.handle(e,(function(){t.cancelClicked(),t.trigger(ye.CONTAINER_DBLCLICK,t,t.name)}))}},{key:"onContextMenu",value:function(e){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(ye.CONTAINER_CONTEXTMENU,e,this.name)}},{key:"seek",value:function(e){this.playback.seek(e)}},{key:"onSeek",value:function(e){this.trigger(ye.CONTAINER_SEEK,e,this.name)}},{key:"onSeeked",value:function(){this.trigger(ye.CONTAINER_SEEKED,this.name)}},{key:"seekPercentage",value:function(e){var t=this.getDuration();if(e>=0&&e<=100){var r=t*(e/100);this.seek(r)}}},{key:"setVolume",value:function(e){this.volume=parseFloat(e),this.trigger(ye.CONTAINER_VOLUME,this.volume,this.name),this.playback.volume(this.volume)}},{key:"fullscreen",value:function(){this.trigger(ye.CONTAINER_FULLSCREEN,this.name)}},{key:"onBuffering",value:function(){this.trigger(ye.CONTAINER_STATE_BUFFERING,this.name)}},{key:"bufferfull",value:function(){this.trigger(ye.CONTAINER_STATE_BUFFERFULL,this.name)}},{key:"onEnterPiP",value:function(){this.trigger(ye.CONTAINER_PIP_ENTER,this.name)}},{key:"onExitPiP",value:function(){this.trigger(ye.CONTAINER_PIP_EXIT,this.name)}},{key:"addPlugin",value:function(e){this.plugins.push(e)}},{key:"hasPlugin",value:function(e){return!!this.getPlugin(e)}},{key:"getPlugin",value:function(e){return this.plugins.filter((function(t){return t.name===e}))[0]}},{key:"mouseEnter",value:function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(ye.CONTAINER_MOUSE_ENTER)}},{key:"mouseLeave",value:function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(ye.CONTAINER_MOUSE_LEAVE)}},{key:"mouseUp",value:function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(ye.CONTAINER_MOUSE_UP)}},{key:"mouseDown",value:function(){this.options.chromeless&&!this.options.allowUserInteraction||this.trigger(ye.CONTAINER_MOUSE_DOWN)}},{key:"enterPiP",value:function(){this.playback.enterPiP()}},{key:"exitPiP",value:function(){this.playback.exitPiP()}},{key:"settingsUpdate",value:function(){this.settings=this.playback.settings,this.trigger(ye.CONTAINER_SETTINGSUPDATE)}},{key:"highDefinitionUpdate",value:function(e){this.trigger(ye.CONTAINER_HIGHDEFINITIONUPDATE,e)}},{key:"isHighDefinitionInUse",value:function(){return this.playback.isHighDefinitionInUse()}},{key:"disableMediaControl",value:function(){this.mediaControlDisabled||(this.mediaControlDisabled=!0,this.trigger(ye.CONTAINER_MEDIACONTROL_DISABLE))}},{key:"enableMediaControl",value:function(){this.mediaControlDisabled&&(this.mediaControlDisabled=!1,this.trigger(ye.CONTAINER_MEDIACONTROL_ENABLE))}},{key:"updateStyle",value:function(){!this.options.chromeless||this.options.allowUserInteraction?this.$el.removeClass("chromeless"):this.$el.addClass("chromeless")}},{key:"enableResizeObserver",value:function(){var e=this;this.disableResizeObserver(),this.resizeObserverInterval=setInterval((function(){return e.checkResize()}),500)}},{key:"disableResizeObserver",value:function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval)}},{key:"checkResize",value:function(){var e={width:this.el.clientWidth,height:this.el.clientHeight},t=this.currentSize||{},r=t.width;(t.height!==e.height||r!==e.width)&&(this.currentSize=e,this.trigger(ye.CONTAINER_RESIZE,e))}},{key:"configure",value:function(e){this._options=P.extend(!0,this._options,e),this.updateStyle(),this.playback.configure(this.options),this.trigger(ye.CONTAINER_OPTIONS_CHANGE)}},{key:"render",value:function(){var e=Ce(".container[data-container] {\n position: absolute;\n background-color: black;\n height: 100%;\n width: 100%;\n max-width: 100%; }\n .container[data-container] .chromeless {\n cursor: default; }\n\n[data-player]:not(.nocursor) .container[data-container]:not(.chromeless).pointer-enabled {\n cursor: pointer; }\n".toString(),{baseUrl:this.options.baseUrl});return this.$el.append(e[0]),this.$el.append(this.playback.render().el),this.updateStyle(),this.checkResize(),this.enableResizeObserver(),this}}])}(Oe);Object.assign(Ne.prototype,Pe);var Fe=function(e){function t(e,r,i){var n;return y(this,t),(n=h(this,t,[e])).settings={},n._i18n=r,n.playerError=i,n._consented=!1,n}return b(t,e),E(t,[{key:"isAudioOnly",get:function(){return!1}},{key:"isAdaptive",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"i18n",get:function(){return this._i18n}},{key:"buffering",get:function(){return!1}},{key:"latency",get:function(){return null}},{key:"currentProgramDateTime",get:function(){return null}},{key:"isPiPActive",get:function(){return!1}},{key:"consent",value:function(e){"function"==typeof e&&e()}},{key:"play",value:function(){}},{key:"pause",value:function(){}},{key:"stop",value:function(){}},{key:"enterPiP",value:function(){}},{key:"exitPiP",value:function(){}},{key:"seek",value:function(e){}},{key:"seekPercentage",value:function(e){}},{key:"getStartTimeOffset",value:function(){return 0}},{key:"getDuration",value:function(){return 0}},{key:"isPlaying",value:function(){return!1}},{key:"isReady",get:function(){return!1}},{key:"hasClosedCaptionsTracks",get:function(){return this.closedCaptionsTracks.length>0}},{key:"closedCaptionsTracks",get:function(){return[]}},{key:"closedCaptionsTrackId",get:function(){return-1},set:function(e){}},{key:"audioTracks",get:function(){return[]}},{key:"currentAudioTrack",get:function(){return null}},{key:"switchAudioTrack",value:function(e){}},{key:"getPlaybackType",value:function(){return t.NO_OP}},{key:"isHighDefinitionInUse",value:function(){return!1}},{key:"mute",value:function(){}},{key:"unmute",value:function(){}},{key:"volume",value:function(e){}},{key:"configure",value:function(e){this._options=P.extend(!0,this._options,e)}},{key:"attemptAutoPlay",value:function(){var e=this;this.canAutoPlay((function(t,r){t&&e.play()}))}},{key:"canAutoPlay",value:function(e){e(!0,null)}}])}(Oe);Object.assign(Fe.prototype,Pe),Fe.extend=function(e){return X(Fe,e)},Fe.canPlay=function(e,t){return!1},Fe.VOD="vod",Fe.AOD="aod",Fe.LIVE="live",Fe.NO_OP="no_op",Fe.type="playback";var Me=function(e){function t(e,r,i,n){var a;return y(this,t),(a=h(this,t,[e]))._i18n=i,a.loader=r,a.playerError=n,a}return b(t,e),E(t,[{key:"options",get:function(){return this._options},set:function(e){this._options=e}},{key:"createContainers",value:function(){var e=this;return P.Deferred((function(t){t.resolve(e.options.sources.map((function(t){return e.createContainer(t)})))}))}},{key:"findPlaybackPlugin",value:function(e,t){return this.loader.playbackPlugins.filter((function(r){return r.canPlay(e,t)}))[0]}},{key:"createContainer",value:function(e){var t=null,r=this.options.mimeType;"object"===m(e)?(t=e.source.toString(),e.mimeType&&(r=e.mimeType)):t=e.toString(),t.match(/^\/\//)&&(t=window.location.protocol+t);var i=p(p({},this.options),{},{src:t,mimeType:r}),n=this.findPlaybackPlugin(t,r),a=n?new n(i,this._i18n,this.playerError):new Fe;i=p(p({},i),{},{playback:a});var s=new Ne(i,this._i18n,this.playerError),o=P.Deferred();return o.promise(s),this.addContainerPlugins(s),this.listenToOnce(s,ye.CONTAINER_READY,(function(){return o.resolve(s)})),s}},{key:"addContainerPlugins",value:function(e){this.loader.containerPlugins.forEach((function(t){e.addPlugin(new t(e))}))}}])}(Ae),Ue=function(e){function t(e){var r;return y(this,t),(r=h(this,t,[e])).playerError=new we(e,r),r.configureDomRecycler(),r.firstResize=!0,r.styleRendered=!1,r.plugins=[],r.containers=[],r._boundFullscreenHandler=function(){return r.handleFullscreenChange()},r._boundHandleWindowResize=function(e){return r.handleWindowResize(e)},P(document).bind("fullscreenchange",r._boundFullscreenHandler),P(document).bind("MSFullscreenChange",r._boundFullscreenHandler),P(document).bind("mozfullscreenchange",r._boundFullscreenHandler),G.isMobile&&P(window).bind("resize",r._boundHandleWindowResize),r}return b(t,e),E(t,[{key:"events",get:function(){return{webkitfullscreenchange:"handleFullscreenChange",mousemove:"onMouseMove",mouseleave:"onMouseLeave"}}},{key:"attributes",get:function(){return{"data-player":"",tabindex:9999}}},{key:"isReady",get:function(){return!!this.ready}},{key:"i18n",get:function(){return this.getPlugin("strings")||{t:function(e){return e}}}},{key:"mediaControl",get:function(){return this._mediaControl||(this._mediaControl=this.getPlugin("media_control"))||this.dummyMediaControl}},{key:"dummyMediaControl",get:function(){return this._dummyMediaControl||(this._dummyMediaControl=new xe(this)),this._dummyMediaControl}},{key:"activeContainer",get:function(){return this._activeContainer},set:function(e){this._activeContainer=e,this.trigger(ye.CORE_ACTIVE_CONTAINER_CHANGED,this._activeContainer)}},{key:"activePlayback",get:function(){return this.activeContainer&&this.activeContainer.playback}},{key:"activePlaybackEl",get:function(){if(this.activePlayback)return this.activePlayback.$el?this.activePlayback.$el.find("video")[0]:this.activePlayback.el}},{key:"configureDomRecycler",value:function(){var e=this.options&&this.options.playback&&this.options.playback.recycleVideo;ne.configure({recycleVideo:e})}},{key:"createContainers",value:function(e){this.defer=P.Deferred(),this.defer.promise(this),this.containerFactory=new Me(e,e.loader,this.i18n,this.playerError),this.prepareContainers()}},{key:"prepareContainers",value:function(){var e=this;this.containerFactory.createContainers().then((function(t){return e.setupContainers(t)})).then((function(t){return e.resolveOnContainersReady(t)}))}},{key:"updateSize",value:function(){this.isFullscreen()?this.setFullscreen():this.setPlayerSize()}},{key:"setFullscreen",value:function(){G.isiOS||(this.$el.addClass("fullscreen"),this.$el.removeAttr("style"),this.previousSize={width:this.options.width,height:this.options.height},this.currentSize={width:P(window).width(),height:P(window).height()})}},{key:"setPlayerSize",value:function(){this.$el.removeClass("fullscreen"),this.currentSize=this.previousSize,this.previousSize={width:P(window).width(),height:P(window).height()},this.resize(this.currentSize)}},{key:"resize",value:function(e){ee(e.height)||ee(e.width)?(this.el.style.height="".concat(e.height,"px"),this.el.style.width="".concat(e.width,"px")):(this.el.style.height="".concat(e.height),this.el.style.width="".concat(e.width)),this.previousSize={width:this.options.width,height:this.options.height},this.options.width=e.width,this.options.height=e.height,this.currentSize=e,this.triggerResize(this.currentSize)}},{key:"enableResizeObserver",value:function(){var e=this;this.disableResizeObserver();this.resizeObserverInterval=setInterval((function(){e.triggerResize({width:e.el.clientWidth,height:e.el.clientHeight})}),500)}},{key:"triggerResize",value:function(e){(this.firstResize||this.oldHeight!==e.height||this.oldWidth!==e.width)&&(this.oldHeight=e.height,this.oldWidth=e.width,this.computedSize=e,this.firstResize=!1,this.trigger(ye.CORE_RESIZE,e))}},{key:"disableResizeObserver",value:function(){this.resizeObserverInterval&&clearInterval(this.resizeObserverInterval),this.resizeObserverInterval=null}},{key:"resolveOnContainersReady",value:function(e){var t=this;P.when.apply(P,e).done((function(){t.defer.resolve(t),t.ready=!0,t.trigger(ye.CORE_READY)}))}},{key:"addPlugin",value:function(e){this.plugins.push(e)}},{key:"hasPlugin",value:function(e){return!!this.getPlugin(e)}},{key:"getPlugin",value:function(e){return this.plugins.filter((function(t){return t.name===e}))[0]}},{key:"load",value:function(e,t){this.options.mimeType=t,e=e&&e.constructor===Array?e:[e],this.options.sources=e,this.containers.forEach((function(e){return e.destroy()})),this.containerFactory.options=P.extend(!0,this.options,{sources:e}),this.prepareContainers()}},{key:"destroy",value:function(){this.disableResizeObserver(),this.containers.forEach((function(e){return e.destroy()})),this.plugins.forEach((function(e){return e.destroy()})),this.$el.remove(),P(document).unbind("fullscreenchange",this._boundFullscreenHandler),P(document).unbind("MSFullscreenChange",this._boundFullscreenHandler),P(document).unbind("mozfullscreenchange",this._boundFullscreenHandler),G.isMobile&&P(window).unbind("resize",this._boundHandleWindowResize),this.stopListening(),this.undelegateEvents()}},{key:"handleFullscreenChange",value:function(){this.trigger(ye.CORE_FULLSCREEN,this.isFullscreen()),this.updateSize()}},{key:"handleWindowResize",value:function(e){var t=window.innerWidth>window.innerHeight?"landscape":"portrait";this._screenOrientation!==t&&(this._screenOrientation=t,this.triggerResize({width:this.el.clientWidth,height:this.el.clientHeight}),this.trigger(ye.CORE_SCREEN_ORIENTATION_CHANGED,{event:e,orientation:this._screenOrientation}))}},{key:"removeContainer",value:function(e){this.stopListening(e),this.containerFactory.stopListening(e),this.containers=this.containers.filter((function(t){return t!==e}))}},{key:"setupContainer",value:function(e){this.listenTo(e,ye.CONTAINER_DESTROYED,this.removeContainer),this.containers.push(e)}},{key:"setupContainers",value:function(e){return e.forEach(this.setupContainer.bind(this)),this.trigger(ye.CORE_CONTAINERS_CREATED),this.renderContainers(),this.activeContainer=e[0],this.render(),this.appendToParent(),this.containers}},{key:"renderContainers",value:function(){var e=this;this.containers.forEach((function(t){return e.el.appendChild(t.render().el)}))}},{key:"createContainer",value:function(e,t){var r=this.containerFactory.createContainer(e,t);return this.setupContainer(r),this.el.appendChild(r.render().el),r}},{key:"getCurrentContainer",value:function(){return this.activeContainer}},{key:"getCurrentPlayback",value:function(){return this.activePlayback}},{key:"getPlaybackType",value:function(){return this.activeContainer&&this.activeContainer.getPlaybackType()}},{key:"isFullscreen",value:function(){var e=$.fullscreenElement();return e&&e===this.el||e&&e===this.activePlaybackEl||this.activePlaybackEl&&this.activePlaybackEl.webkitDisplayingFullscreen||!1}},{key:"toggleFullscreen",value:function(){var e=this;if(this.isFullscreen()){var t=G.isiOS?this.activePlaybackEl:document;$.cancelFullscreen(t),!G.isiOS&&this.$el.removeClass("fullscreen nocursor")}else{var r=G.isiOS?this.activePlaybackEl:this.el;if(!r)return;G.isSafari||G.isiOS?$.requestFullscreen(r):$.requestFullscreen(r).then((function(e){return e}),(function(t){return setTimeout((function(){if(!e.isFullscreen())throw new ReferenceError(t)}),600)})),!G.isiOS&&this.$el.addClass("fullscreen")}}},{key:"onMouseMove",value:function(e){this.trigger(ye.CORE_MOUSE_MOVE,e)}},{key:"onMouseLeave",value:function(e){this.trigger(ye.CORE_MOUSE_LEAVE,e)}},{key:"configure",value:function(e){var t=this;this._options=P.extend(!0,this._options,e),this.configureDomRecycler();var r=e.source||e.sources;r&&this.load(r,e.mimeType||this.options.mimeType),this.trigger(ye.CORE_OPTIONS_CHANGE,e),this.containers.forEach((function(e){return e.configure(t.options)}))}},{key:"appendToParent",value:function(){!(this.$el.parent()&&this.$el.parent().length)&&this.$el.appendTo(this.options.parentElement)}},{key:"appendStyles",value:function(){if(!this.styleRendered){var e=Ce('[data-player] {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n user-select: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n transform: translate3d(0, 0, 0);\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n font-style: normal;\n font-weight: normal;\n text-align: center;\n overflow: hidden;\n font-size: 100%;\n font-family: "Roboto", "Open Sans", Arial, sans-serif;\n text-shadow: 0 0 0;\n box-sizing: border-box; }\n [data-player]:focus {\n outline: 0; }\n [data-player] * {\n box-sizing: inherit; }\n [data-player] > * {\n float: none;\n max-width: none; }\n [data-player] > div {\n display: block; }\n [data-player].fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0;\n left: 0; }\n [data-player].nocursor {\n cursor: none; }\n\n.clappr-style {\n display: none !important; }\n'.toString(),{baseUrl:this.options.baseUrl});if(this.$el.append(e[0]),this.options.includeResetStyle){var t=Ce('[data-player] div, [data-player] span, [data-player] applet, [data-player] object, [data-player] iframe,\n[data-player] h1, [data-player] h2, [data-player] h3, [data-player] h4, [data-player] h5, [data-player] h6, [data-player] p, [data-player] blockquote, [data-player] pre,\n[data-player] a, [data-player] abbr, [data-player] acronym, [data-player] address, [data-player] big, [data-player] cite, [data-player] code,\n[data-player] del, [data-player] dfn, [data-player] em, [data-player] img, [data-player] ins, [data-player] kbd, [data-player] q, [data-player] s, [data-player] samp,\n[data-player] small, [data-player] strike, [data-player] strong, [data-player] sub, [data-player] sup, [data-player] tt, [data-player] var,\n[data-player] b, [data-player] u, [data-player] i, [data-player] center,\n[data-player] dl, [data-player] dt, [data-player] dd, [data-player] ol, [data-player] ul, [data-player] li,\n[data-player] fieldset, [data-player] form, [data-player] label, [data-player] legend,\n[data-player] table, [data-player] caption, [data-player] tbody, [data-player] tfoot, [data-player] thead, [data-player] tr, [data-player] th, [data-player] td,\n[data-player] article, [data-player] aside, [data-player] canvas, [data-player] details, [data-player] embed,\n[data-player] figure, [data-player] figcaption, [data-player] footer, [data-player] header, [data-player] hgroup,\n[data-player] menu, [data-player] nav, [data-player] output, [data-player] ruby, [data-player] section, [data-player] summary,\n[data-player] time, [data-player] mark, [data-player] audio, [data-player] video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline; }\n\n[data-player] table {\n border-collapse: collapse;\n border-spacing: 0; }\n\n[data-player] caption, [data-player] th, [data-player] td {\n text-align: left;\n font-weight: normal;\n vertical-align: middle; }\n\n[data-player] q, [data-player] blockquote {\n quotes: none; }\n [data-player] q:before, [data-player] q:after, [data-player] blockquote:before, [data-player] blockquote:after {\n content: "";\n content: none; }\n\n[data-player] a img {\n border: none; }\n'.toString(),{baseUrl:this.options.baseUrl});this.$el.append(t[0])}this.styleRendered=!0}}},{key:"render",value:function(){this.appendStyles(),this.options.width=this.options.width||this.$el.width(),this.options.height=this.options.height||this.$el.height();var e={width:this.options.width,height:this.options.height};return this.previousSize=this.currentSize=this.computedSize=e,this.updateSize(),this.enableResizeObserver(),this}}])}(Oe);Object.assign(Ue.prototype,Pe);var Be,Ge,je=function(e){function t(e){var r;return y(this,t),(r=h(this,t,[e.options])).player=e,r}return b(t,e),E(t,[{key:"loader",get:function(){return this.player.loader}},{key:"create",value:function(){return this.options.loader=this.loader,this.core=new Ue(this.options),this.addCorePlugins(),this.core.createContainers(this.options),this.core}},{key:"addCorePlugins",value:function(){var e=this;return this.loader.corePlugins.forEach((function(t){var r=new t(e.core);e.core.addPlugin(r),e.setupExternalInterface(r)})),this.core}},{key:"setupExternalInterface",value:function(e){var t=e.getExternalInterface();for(var r in t)this.player[r]=t[r].bind(e)}}])}(Ae),Ke=/(\d+)(?:\.(\d+))?(?:\.(\d+))?/,He=function(){function e(t,r,i){y(this,e),this.major=parseInt(t||0,10),this.minor=parseInt(r||0,10),this.patch=parseInt(i||0,10)}return E(e,[{key:"compare",value:function(e){var t=this.major-e.major;return t=(t=t||this.minor-e.minor)||this.patch-e.patch}},{key:"inc",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"patch";return void 0!==this[e]&&(this[e]+=1),this}},{key:"satisfies",value:function(e,t){return this.compare(e)>=0&&(!t||this.compare(t)<0)}},{key:"toString",value:function(){return"".concat(this.major,".").concat(this.minor,".").concat(this.patch)}}],[{key:"parse",value:function(){var t=L((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").match(Ke)||[],4),r=t[1],i=t[2],n=t[3];return void 0===r?null:new e(r,i,n)}}])}(),Ve=function(e,t){return e&&t?Object.entries(e).filter((function(e){return L(e,2)[1].type===t})).reduce((function(e,t){var r=L(t,2),i=r[0],n=r[1];return e[i]=n,e}),{}):{}},Ye=(Be={plugins:{},playbacks:[]},Ge="0.8.0",function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;y(this,e),this.playerId=r,this.playbackPlugins=D(Be.playbacks);var i=e.registeredPlugins,n=i.core,a=i.container;this.containerPlugins=Object.values(a),this.corePlugins=Object.values(n),Array.isArray(t)||this.validateExternalPluginsType(t),this.addExternalPlugins(t)}return E(e,[{key:"groupPluginsByType",value:function(e){return Array.isArray(e)&&(e=e.reduce((function(e,t){return e[t.type]||(e[t.type]=[]),e[t.type].push(t),e}),{})),e}},{key:"removeDups",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.reduceRight((function(e,r){return e[r.prototype.name]&&t||(e[r.prototype.name]&&delete e[r.prototype.name],e[r.prototype.name]=r),e}),Object.create(null)),i=[];for(var n in r)i.unshift(r[n]);return i}},{key:"addExternalPlugins",value:function(t){var r="boolean"!=typeof t.loadExternalPluginsFirst||t.loadExternalPluginsFirst,i="boolean"!=typeof t.loadExternalPlaybacksFirst||t.loadExternalPlaybacksFirst;if((t=this.groupPluginsByType(t)).playback){var n=t.playback.filter((function(t){return e.checkVersionSupport(t),!0}));this.playbackPlugins=i?this.removeDups(n.concat(this.playbackPlugins)):this.removeDups(this.playbackPlugins.concat(n),!0)}if(t.container){var a=t.container.filter((function(t){return e.checkVersionSupport(t),!0}));this.containerPlugins=r?this.removeDups(a.concat(this.containerPlugins)):this.removeDups(this.containerPlugins.concat(a),!0)}if(t.core){var s=t.core.filter((function(t){return e.checkVersionSupport(t),!0}));this.corePlugins=r?this.removeDups(s.concat(this.corePlugins)):this.removeDups(this.corePlugins.concat(s),!0)}}},{key:"validateExternalPluginsType",value:function(e){["playback","container","core"].forEach((function(t){(e[t]||[]).forEach((function(e){var r="external "+e.type+" plugin on "+t+" array";if(e.type!==t)throw new ReferenceError(r)}))}))}}],[{key:"registeredPlaybacks",get:function(){return D(Be.playbacks)}},{key:"registeredPlugins",get:function(){var e=Be.plugins;return{core:Ve(e,"core"),container:Ve(e,"container")}}},{key:"checkVersionSupport",value:function(e){var t=e.prototype,r=t.supportedVersion,i=t.name;if(!r||!r.min)return fe.warn("Loader","missing version information for ".concat(i)),!1;var n=r.max?He.parse(r.max):He.parse(r.min).inc("minor"),a=He.parse(r.min);return!!He.parse(Ge).satisfies(a,n)||(fe.warn("Loader","unsupported plugin ".concat(i,": Clappr version ").concat(Ge," does not match required range [").concat(a,",").concat(n,")")),!1)}},{key:"registerPlugin",value:function(t){if(!t||!t.prototype.name)return fe.warn("Loader","missing information to register plugin: ".concat(t)),!1;e.checkVersionSupport(t);var r=Be.plugins;if(!r)return!1;var i=r[t.prototype.name];return i&&fe.warn("Loader","overriding plugin entry: ".concat(t.prototype.name," - ").concat(i)),r[t.prototype.name]=t,!0}},{key:"registerPlayback",value:function(t){if(!t||!t.prototype.name)return!1;e.checkVersionSupport(t);var r=Be.playbacks,i=r.findIndex((function(e){return e.prototype.name===t.prototype.name}));if(i>=0){var n=r[i];r.splice(i,1),fe.warn("Loader","overriding playback entry: ".concat(n.name," - ").concat(n))}return Be.playbacks=[t].concat(D(r)),!0}},{key:"unregisterPlugin",value:function(e){if(!e)return!1;var t=Be.plugins;return!!t[e]&&(delete t[e],!0)}},{key:"unregisterPlayback",value:function(e){if(!e)return!1;var t=Be.playbacks,r=t.findIndex((function(t){return t.prototype.name===e}));return!(r<0||(t.splice(r,1),Be.playbacks=t,0))}},{key:"clearPlugins",value:function(){Be.plugins={}}},{key:"clearPlaybacks",value:function(){Be.playbacks=[]}}])}()),We=te().replace(/\/[^/]+$/,""),ze=function(e){function t(e){var r;y(this,t),r=h(this,t,[e]);var i={playerId:J(""),persistConfig:!0,width:640,height:360,baseUrl:We,allowUserInteraction:G.isMobile,includeResetStyle:!0,playback:{recycleVideo:!0}};r._options=P.extend(!0,i,e),r.options.sources=r._normalizeSources(e),r.options.chromeless||(r.options.allowUserInteraction=!0),r.options.allowUserInteraction||(r.options.disableKeyboardShortcuts=!0),r._registerOptionEventListeners(r.options.events),r._coreFactory=new je(r);var n=r._getParentElement(r.options);return n&&r.attachTo(n),r}return b(t,e),E(t,[{key:"loader",get:function(){return this._loader||(this._loader=new Ye(this.options.plugins||{},this.options.playerId)),this._loader},set:function(e){this._loader=e}},{key:"ended",get:function(){return this.core.activeContainer.ended}},{key:"buffering",get:function(){return this.core.activeContainer.buffering}},{key:"isReady",get:function(){return!!this._ready}},{key:"eventsMapping",get:function(){return{onReady:ye.PLAYER_READY,onResize:ye.PLAYER_RESIZE,onPlay:ye.PLAYER_PLAY,onPause:ye.PLAYER_PAUSE,onStop:ye.PLAYER_STOP,onEnded:ye.PLAYER_ENDED,onSeek:ye.PLAYER_SEEK,onError:ye.PLAYER_ERROR,onTimeUpdate:ye.PLAYER_TIMEUPDATE,onVolumeUpdate:ye.PLAYER_VOLUMEUPDATE,onSubtitleAvailable:ye.PLAYER_SUBTITLE_AVAILABLE}}},{key:"_getParentElement",value:function(e){var t=e.parentId,r=e.parent;return t?document.querySelector(t):r}},{key:"attachTo",value:function(e){return this.options.parentElement=e,this.core=this._coreFactory.create(),this._addEventListeners(),this}},{key:"_addEventListeners",value:function(){return this.core.isReady?this._onReady():this.listenToOnce(this.core,ye.CORE_READY,this._onReady),this.listenTo(this.core,ye.CORE_ACTIVE_CONTAINER_CHANGED,this._containerChanged),this.listenTo(this.core,ye.CORE_FULLSCREEN,this._onFullscreenChange),this.listenTo(this.core,ye.CORE_RESIZE,this._onResize),this}},{key:"_addContainerEventListeners",value:function(){var e=this.core.activeContainer;return e&&(this.listenTo(e,ye.CONTAINER_PLAY,this._onPlay),this.listenTo(e,ye.CONTAINER_PAUSE,this._onPause),this.listenTo(e,ye.CONTAINER_STOP,this._onStop),this.listenTo(e,ye.CONTAINER_ENDED,this._onEnded),this.listenTo(e,ye.CONTAINER_SEEK,this._onSeek),this.listenTo(e,ye.CONTAINER_ERROR,this._onError),this.listenTo(e,ye.CONTAINER_TIMEUPDATE,this._onTimeUpdate),this.listenTo(e,ye.CONTAINER_VOLUME,this._onVolumeUpdate),this.listenTo(e,ye.CONTAINER_SUBTITLE_AVAILABLE,this._onSubtitleAvailable)),this}},{key:"_registerOptionEventListeners",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).length>0&&Object.keys(r).forEach((function(t){var i=e.eventsMapping[t];i&&e.off(i,r[t])})),Object.keys(t).forEach((function(r){var i=e.eventsMapping[r];if(i){var n=t[r];(n="function"==typeof n&&n)&&e.on(i,n)}})),this}},{key:"_containerChanged",value:function(){this.stopListening(),this._addEventListeners()}},{key:"_onReady",value:function(){this._ready=!0,this._addContainerEventListeners(),this.trigger(ye.PLAYER_READY)}},{key:"_onFullscreenChange",value:function(e){this.trigger(ye.PLAYER_FULLSCREEN,e)}},{key:"_onVolumeUpdate",value:function(e){this.trigger(ye.PLAYER_VOLUMEUPDATE,e)}},{key:"_onSubtitleAvailable",value:function(){this.trigger(ye.PLAYER_SUBTITLE_AVAILABLE)}},{key:"_onResize",value:function(e){this.trigger(ye.PLAYER_RESIZE,e)}},{key:"_onPlay",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.trigger(ye.PLAYER_PLAY,t)}},{key:"_onPause",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.trigger(ye.PLAYER_PAUSE,t)}},{key:"_onStop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.trigger(ye.PLAYER_STOP,this.getCurrentTime(),e)}},{key:"_onEnded",value:function(){this.trigger(ye.PLAYER_ENDED)}},{key:"_onSeek",value:function(e){this.trigger(ye.PLAYER_SEEK,e)}},{key:"_onTimeUpdate",value:function(e){this.trigger(ye.PLAYER_TIMEUPDATE,e)}},{key:"_onError",value:function(e){this.trigger(ye.PLAYER_ERROR,e)}},{key:"_normalizeSources",value:function(e){var t=e.sources||(void 0!==e.source?[e.source]:[]);return 0===t.length?[{source:"",mimeType:""}]:t}},{key:"resize",value:function(e){return this.core.resize(e),this}},{key:"load",value:function(e,t,r){return void 0!==r&&this.configure({autoPlay:!!r}),this.core.load(e,t),this}},{key:"destroy",value:function(){return this.stopListening(),this.core.destroy(),this}},{key:"consent",value:function(e){this.core.getCurrentPlayback().consent(e)}},{key:"play",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.core.activeContainer.play(e),this}},{key:"pause",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.core.activeContainer.pause(e),this}},{key:"stop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.core.activeContainer.stop(e),this}},{key:"seek",value:function(e){return this.core.activeContainer.seek(e),this}},{key:"seekPercentage",value:function(e){return this.core.activeContainer.seekPercentage(e),this}},{key:"mute",value:function(){return this.core.activePlayback.mute(),this}},{key:"unmute",value:function(){return this.core.activePlayback.unmute(),this}},{key:"isPlaying",value:function(){return this.core.activeContainer.isPlaying()}},{key:"isDvrEnabled",value:function(){return this.core.activeContainer.isDvrEnabled()}},{key:"isDvrInUse",value:function(){return this.core.activeContainer.isDvrInUse()}},{key:"configure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._registerOptionEventListeners(e.events,this.options.events),this.core.configure(e),this}},{key:"getPlugin",value:function(e){return this.core.plugins.concat(this.core.activeContainer.plugins).filter((function(t){return t.name===e}))[0]}},{key:"getCurrentTime",value:function(){return this.core.activeContainer.getCurrentTime()}},{key:"getStartTimeOffset",value:function(){return this.core.activeContainer.getStartTimeOffset()}},{key:"getDuration",value:function(){return this.core.activeContainer.getDuration()}}])}(Ae);Object.assign(ze.prototype,Pe);var qe=function(e){function t(e){var r;return y(this,t),(r=h(this,t,[e.options])).container=e,r.enabled=!0,r.bindEvents(),r}return b(t,e),E(t,[{key:"playerError",get:function(){return this.container.playerError}},{key:"enable",value:function(){this.enabled||(this.bindEvents(),this.enabled=!0)}},{key:"disable",value:function(){this.enabled&&(this.stopListening(),this.enabled=!1)}},{key:"bindEvents",value:function(){}},{key:"destroy",value:function(){this.stopListening()}}])}(Ae);Object.assign(qe.prototype,Pe),qe.extend=function(e){return X(qe,e)},qe.type="container";var Xe=function(e){function t(e){var r;return y(this,t),(r=h(this,t,[e.options])).core=e,r.enabled=!0,r.bindEvents(),r}return b(t,e),E(t,[{key:"playerError",get:function(){return this.core.playerError}},{key:"bindEvents",value:function(){}},{key:"enable",value:function(){this.enabled||(this.bindEvents(),this.enabled=!0)}},{key:"disable",value:function(){this.enabled&&(this.stopListening(),this.enabled=!1)}},{key:"getExternalInterface",value:function(){return{}}},{key:"destroy",value:function(){this.stopListening()}}])}(Ae);Object.assign(Xe.prototype,Pe),Xe.extend=function(e){return X(Xe,e)},Xe.type="core";var $e=function(e){function t(e){var r;return y(this,t),(r=h(this,t,[e.options])).container=e,r.enabled=!0,r.bindEvents(),r}return b(t,e),E(t,[{key:"playerError",get:function(){return this.container.playerError}},{key:"enable",value:function(){this.enabled||(this.bindEvents(),this.$el.show(),this.enabled=!0)}},{key:"disable",value:function(){this.stopListening(),this.$el.hide(),this.enabled=!1}},{key:"bindEvents",value:function(){}}])}(Oe);Object.assign($e.prototype,Pe),$e.extend=function(e){return X($e,e)},$e.type="container";var Ze={mp4:["avc1.42E01E","avc1.58A01E","avc1.4D401E","avc1.64001E","mp4v.20.8","mp4v.20.240","mp4a.40.2"].map((function(e){return'video/mp4; codecs="'+e+', mp4a.40.2"'})),ogg:['video/ogg; codecs="theora, vorbis"','video/ogg; codecs="dirac"','video/ogg; codecs="theora, speex"'],"3gpp":['video/3gpp; codecs="mp4v.20.8, samr"'],webm:['video/webm; codecs="vp8, vorbis"'],mkv:['video/x-matroska; codecs="theora, vorbis"'],m3u8:["application/x-mpegurl"]};Ze.ogv=Ze.ogg,Ze["3gp"]=Ze["3gpp"];var Qe={wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},Je=Object.keys(Qe).reduce((function(e,t){return[].concat(D(e),D(Qe[t]))}),[]),et={code:"unknown",message:"unknown"},tt=function(e){function t(){var e;y(this,t);for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];(e=h(this,t,[].concat(i)))._destroyed=!1,e._loadStarted=!1,e._isBuffering=!1,e._playheadMoving=!1,e._playheadMovingTimer=null,e._stopped=!1,e._ccTrackId=-1,e._playheadMovingCheckEnabled=!e.options.disablePlayheadMovingCheck,e._setupSrc(e.options.src),e._playheadMovingCheckInterval=e.options.playheadMovingCheckInterval||500,e.options.playback||(e.options.playback=e.options||{}),e.options.playback.disableContextMenu=e.options.playback.disableContextMenu||e.options.disableVideoTagContextMenu,e._minDvrSize=e.isValidMinimumDVRSizeConfig?e.minimumDVRSizeConfig:60;var a,s=e.options.playback,o=s.preload||(G.isSafari?"auto":e.options.preload);return e.options.poster&&("string"==typeof e.options.poster?a=e.options.poster:"string"==typeof e.options.poster.url&&(a=e.options.poster.url)),P.extend(!0,e.el,{muted:e.options.mute,defaultMuted:e.options.mute,loop:e.options.loop,poster:a,preload:o||"metadata",crossOrigin:s.crossOrigin,"x-webkit-playsinline":s.playInline}),(s.controls||e.options.useVideoTagDefaultControls)&&e.$el.attr("controls",""),s.playInline&&e.$el.attr({playsinline:"playsinline"}),s.crossOrigin&&e.$el.attr({crossorigin:s.crossOrigin}),e.settings={default:["seekbar"]},e.settings.left=["playpause","position","duration"],e.settings.right=["fullscreen","volume","hd-indicator"],s.externalTracks&&e._setupExternalTracks(s.externalTracks),e.options.autoPlay&&e.attemptAutoPlay(),e}return b(t,e),E(t,[{key:"name",get:function(){return"html5_video"}},{key:"supportedVersion",get:function(){return{min:"0.8.0"}}},{key:"tagName",get:function(){return this.isAudioOnly?"audio":"video"}},{key:"isAudioOnly",get:function(){var e=this.options.src,r=t._mimeTypesForUrl(e,Qe,this.options.mimeType);return this.options.playback&&this.options.playback.audioOnly||this.options.audioOnly||Je.indexOf(r[0])>=0}},{key:"attributes",get:function(){return{"data-html5-video":""}}},{key:"events",get:function(){return{canplay:"_onCanPlay",canplaythrough:"_handleBufferingEvents",durationchange:"_onDurationChange",ended:"_onEnded",error:"_onError",loadeddata:"_onLoadedData",loadedmetadata:"_onLoadedMetadata",pause:"_onPause",playing:"_onPlaying",progress:"_onProgress",seeking:"_onSeeking",seeked:"_onSeeked",stalled:"_handleBufferingEvents",timeupdate:"_onTimeUpdate",waiting:"_onWaiting",enterpictureinpicture:"_onEnterPiP",leavepictureinpicture:"_onExitPiP"}}},{key:"ended",get:function(){return this.el.ended}},{key:"buffering",get:function(){return this._isBuffering}},{key:"isPiPActive",get:function(){return this.el===document.pictureInPictureElement}},{key:"isLive",get:function(){return this.getPlaybackType()===Fe.LIVE}},{key:"dvrEnabled",get:function(){return this.getDuration()>=this._minDvrSize&&this.isLive}},{key:"minimumDVRSizeConfig",get:function(){return this.options.playback&&this.options.playback.minimumDvrSize}},{key:"isValidMinimumDVRSizeConfig",get:function(){return void 0!==this.minimumDVRSizeConfig&&"number"==typeof this.minimumDVRSizeConfig}},{key:"sourceMedia",get:function(){return this._src}},{key:"configure",value:function(e){k(S(t.prototype),"configure",this).call(this,e),this.el.loop=!!e.loop}},{key:"attemptAutoPlay",value:function(){var e=this;this.canAutoPlay((function(t,r){r&&fe.warn(e.name,"autoplay error.",{result:t,error:r}),t&&setTimeout((function(){return!e._destroyed&&e.play()}),0)}))}},{key:"canAutoPlay",value:function(e){if(this.options.disableCanAutoPlay)e(!0,null);else{var t={timeout:this.options.autoPlayTimeout||500,inline:this.options.playback.playInline||!1,muted:this.options.mute||!1};G.isMobile&&ne.options.recycleVideo&&(t.element=this.el),ie(e,t)}}},{key:"_setupExternalTracks",value:function(e){this._externalTracks=e.map((function(e){return{kind:e.kind||"subtitles",label:e.label,lang:e.lang,src:e.src}}))}},{key:"load",value:function(e){this._setupSrc(e)}},{key:"_setupSrc",value:function(e){this.el.src!==e&&(this._ccIsSetup=!1,this.el.src=e,this._src=this.el.src)}},{key:"_onLoadedMetadata",value:function(e){this._handleBufferingEvents(),this.trigger(ye.PLAYBACK_LOADEDMETADATA,{duration:e.target.duration,data:e}),this._updateSettings();var t=void 0===this._options.autoSeekFromUrl||this._options.autoSeekFromUrl;this.getPlaybackType()!==Fe.LIVE&&t&&this._checkInitialSeek()}},{key:"_onDurationChange",value:function(){this._updateSettings(),this._onTimeUpdate(),this._onProgress()}},{key:"_updateSettings",value:function(){this.getPlaybackType()===Fe.VOD||this.getPlaybackType()===Fe.AOD?this.settings.left=["playpause","position","duration"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(ye.PLAYBACK_SETTINGSUPDATE)}},{key:"isSeekEnabled",value:function(){return isFinite(this.getDuration())}},{key:"getPlaybackType",value:function(){var e="audio"===this.tagName?Fe.AOD:Fe.VOD;return[0,void 0,1/0].indexOf(this.el.duration)>=0?Fe.LIVE:e}},{key:"isHighDefinitionInUse",value:function(){return!1}},{key:"consent",value:function(e){var r=this;if(this.isPlaying()||this.el._consented)k(S(t.prototype),"consent",this).call(this,e);else{var i=function i(){r.el.removeEventListener("loadedmetadata",i,!1),r.el.removeEventListener("error",i,!1),r.el._consented=!0,k(S(t.prototype),"consent",r).call(r,e)};this.el.addEventListener("loadedmetadata",i,!1),this.el.addEventListener("error",i,!1),this.el.load()}}},{key:"play",value:function(){var e=this;this.trigger(ye.PLAYBACK_PLAY_INTENT),this._stopped=!1,this._setupSrc(this._src),this._handleBufferingEvents();var t=this.el.play();return t&&t.catch&&t.catch((function(t){return fe.warn(e.name,"HTML5 play failed",t)})),t}},{key:"pause",value:function(){this.el.pause(),this.dvrEnabled&&this._updateDvr(!0)}},{key:"stop",value:function(){this.pause(),this._stopped=!0,this.el.removeAttribute("src"),this.el.load(),this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(ye.PLAYBACK_STOP)}},{key:"volume",value:function(e){0===e?(this.$el.attr({muted:"true"}),this.el.muted=!0):(this.$el.attr({muted:null}),this.el.muted=!1,this.el.volume=e/100)}},{key:"mute",value:function(){this.el.muted=!0}},{key:"unmute",value:function(){this.el.muted=!1}},{key:"isMuted",value:function(){return!0===this.el.muted||0===this.el.volume}},{key:"isPlaying",value:function(){return!this.el.paused&&!this.el.ended}},{key:"isReady",get:function(){return this._isReadyState}},{key:"_startPlayheadMovingChecks",value:function(){null===this._playheadMovingTimer&&this._playheadMovingCheckEnabled&&(this._playheadMovingTimeOnCheck=null,this._determineIfPlayheadMoving(),this._playheadMovingTimer=setInterval(this._determineIfPlayheadMoving.bind(this),this._playheadMovingCheckInterval))}},{key:"_stopPlayheadMovingChecks",value:function(){null!==this._playheadMovingTimer&&(clearInterval(this._playheadMovingTimer),this._playheadMovingTimer=null,this._playheadMoving=!1)}},{key:"_determineIfPlayheadMoving",value:function(){var e=this._playheadMovingTimeOnCheck,t=this.el.currentTime;this._playheadMoving=e!==t,this._playheadMovingTimeOnCheck=t,this._handleBufferingEvents()}},{key:"_onWaiting",value:function(){this._loadStarted=!0,this._handleBufferingEvents()}},{key:"_onLoadedData",value:function(){this._loadStarted=!0,this._handleBufferingEvents()}},{key:"_onCanPlay",value:function(){this._handleBufferingEvents()}},{key:"_onPlaying",value:function(){this._checkForClosedCaptions(),this._startPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(ye.PLAYBACK_PLAY)}},{key:"_onPause",value:function(){this._stopPlayheadMovingChecks(),this._handleBufferingEvents(),this.trigger(ye.PLAYBACK_PAUSE)}},{key:"_onSeeking",value:function(){this.trigger(ye.PLAYBACK_SEEK,this.getCurrentTime()),this._handleBufferingEvents()}},{key:"_onSeeked",value:function(){this._handleBufferingEvents(),this.trigger(ye.PLAYBACK_SEEKED)}},{key:"_onEnded",value:function(){this._handleBufferingEvents(),this.trigger(ye.PLAYBACK_ENDED,this.name)}},{key:"_onEnterPiP",value:function(){this.trigger(ye.PLAYBACK_PIP_ENTER,this.name)}},{key:"_onExitPiP",value:function(){this.trigger(ye.PLAYBACK_PIP_EXIT,this.name)}},{key:"enterPiP",value:function(){var e=this;this.el.requestPictureInPicture().then((function(){fe.info(e.name,"enter PIP success")})).catch((function(t){fe.warn(e.name,"enter PIP failed",t)}))}},{key:"exitPiP",value:function(){var e=this;document.exitPictureInPicture().then((function(){fe.info(e.name,"exit PIP success")})).catch((function(t){fe.warn(e.name,"exit PIP failed",t)}))}},{key:"_handleBufferingEvents",value:function(){var e=this._loadStarted&&!this.el.ended&&!this._stopped,t=this.el.readyState<this.el.HAVE_FUTURE_DATA,r=!this.el.ended&&!this.el.paused&&!this._playheadMoving,i=e&&t;this._playheadMovingCheckEnabled&&(i=i||e&&r),this._isBuffering!==i&&(this._isBuffering=i,i?this.trigger(ye.PLAYBACK_BUFFERING,this.name):this.trigger(ye.PLAYBACK_BUFFERFULL,this.name))}},{key:"_onError",value:function(){var e=this.el.error||et,t=e.code,r=e.message,i=t===et.code,n=this.createError({code:t,description:r,raw:this.el.error,level:i?we.Levels.WARN:we.Levels.FATAL});i?fe.warn(this.name,"HTML5 unknown error: ",n):this.trigger(ye.PLAYBACK_ERROR,n)}},{key:"destroy",value:function(){this._destroyed=!0,this._stopPlayheadMovingChecks(),this.handleTextTrackChange&&this.el.textTracks.removeEventListener("change",this.handleTextTrackChange),this.$el.off("contextmenu"),k(S(t.prototype),"destroy",this).call(this),this.el.removeAttribute("src"),this.el.load(),this._src=null,ne.garbage(this.el)}},{key:"_updateDvr",value:function(e){this.trigger(ye.PLAYBACK_DVR,e),this.trigger(ye.PLAYBACK_STATS_ADD,{dvr:e})}},{key:"seek",value:function(e){e<0&&(fe.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this.getDuration()),this.dvrEnabled&&this._updateDvr(e<this.getDuration()-3),e+=this.el.seekable.start(0),this.el.currentTime=e}},{key:"seekPercentage",value:function(e){var t=this.el.duration*(e/100);this.seek(t)}},{key:"_checkInitialSeek",value:function(){var e=Q();0!==e&&this.seek(e)}},{key:"getCurrentTime",value:function(){return this.el.currentTime}},{key:"getDuration",value:function(){if(this.isLive){if(this.el.seekable.length>0)return this.el.seekable.end(0)-this.el.seekable.start(0);this._scheduleUpdateSettingsCheck()}return this.el.duration}},{key:"_scheduleUpdateSettingsCheck",value:function(){var e=this;this._updateSettingsCheckInFlight||(this._updateSettingsCheckInFlight=setTimeout((function(){e._updateSettings(),e._updateSettingsCheckInFlight=null}),1e3))}},{key:"_onTimeUpdate",value:function(){var e=this.isLive?this.getDuration():this.el.duration;this.trigger(ye.PLAYBACK_TIMEUPDATE,{current:this.el.currentTime,total:e},this.name)}},{key:"_onProgress",value:function(){if(this.el.buffered.length){for(var e=[],t=0,r=0;r<this.el.buffered.length;r++)e=[].concat(D(e),[{start:this.el.buffered.start(r),end:this.el.buffered.end(r)}]),this.el.currentTime>=e[r].start&&this.el.currentTime<=e[r].end&&(t=r);var i={start:e[t].start,current:e[t].end,total:this.el.duration};this.trigger(ye.PLAYBACK_PROGRESS,i,e)}}},{key:"_typeFor",value:function(e){var r=t._mimeTypesForUrl(e,Ze,this.options.mimeType);return 0===r.length&&(r=t._mimeTypesForUrl(e,Qe,this.options.mimeType)),(r[0]||"").split(";")[0]}},{key:"_ready",value:function(){this._isReadyState||(this._isReadyState=!0,this.trigger(ye.PLAYBACK_READY,this.name))}},{key:"_checkForClosedCaptions",value:function(){if(this.isHTML5Video&&!this._ccIsSetup){if(this.hasClosedCaptionsTracks){this.trigger(ye.PLAYBACK_SUBTITLE_AVAILABLE);var e=this.closedCaptionsTrackId;this.closedCaptionsTrackId=e,this.handleTextTrackChange=this._handleTextTrackChange.bind(this),this.el.textTracks.addEventListener("change",this.handleTextTrackChange)}this._ccIsSetup=!0}}},{key:"_handleTextTrackChange",value:function(){var e=this.closedCaptionsTracks.find((function(e){return"showing"===e.track.mode}))||{id:-1};this._ccTrackId!==e.id&&(this._ccTrackId=e.id,this.trigger(ye.PLAYBACK_SUBTITLE_CHANGED,{id:e.id}))}},{key:"isHTML5Video",get:function(){return this.name===t.prototype.name}},{key:"closedCaptionsTracks",get:function(){var e=0;return(this.el.textTracks?Array.from(this.el.textTracks):[]).filter((function(e){return"subtitles"===e.kind||"captions"===e.kind})).map((function(t){return{id:e++,name:t.label,track:t}}))}},{key:"closedCaptionsTrackId",get:function(){return this._ccTrackId},set:function(e){if(ee(e)){var t,r=this.closedCaptionsTracks;if(-1!==e){if(!(t=r.find((function(t){return t.id===e}))))return;if("showing"===t.track.mode)return}r.filter((function(e){return"hidden"!==e.track.mode})).forEach((function(e){return e.track.mode="hidden"})),t&&(t.track.mode="showing"),this._ccTrackId=e,this.trigger(ye.PLAYBACK_SUBTITLE_CHANGED,{id:e})}}},{key:"template",get:function(){return Re('<% for (var i = 0; i < tracks.length; i++) { %>\n <track data-html5-video-track="<%= i %>" kind="<%= tracks[i].kind %>" label="<%= tracks[i].label %>" srclang="<%= tracks[i].lang %>" src="<%= tracks[i].src %>">\n<% }; %>\n')}},{key:"render",value:function(){this.options.playback.disableContextMenu&&this.$el.on("contextmenu",(function(){return!1})),this._externalTracks&&this._externalTracks.length>0&&this.$el.html(this.template({tracks:this._externalTracks})),this._ready();var e=Ce("[data-html5-video] {\n position: absolute;\n height: 100%;\n width: 100%;\n display: block; }\n".toString(),{baseUrl:this.options.baseUrl});return this.$el.append(e[0]),this}}])}(Fe);tt._mimeTypesForUrl=function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,r=((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("?")[0].match(/.*\.(.*)$/)||[])[1],i=t||r&&e[r.toLowerCase()]||[];return i.constructor===Array?i:[i]},tt._canPlay=function(e,t,r,i){var n=tt._mimeTypesForUrl(r,t,i),a=document.createElement(e);return!!n.filter((function(e){return!!a.canPlayType(e).replace(/no/,"")}))[0]},tt.canPlay=function(e,t){return tt._canPlay("audio",Qe,e,t)||tt._canPlay("video",Ze,e,t)};var rt=function(e){function t(){return y(this,t),h(this,t,arguments)}return b(t,e),E(t,[{key:"name",get:function(){return"html5_audio"}},{key:"supportedVersion",get:function(){return{min:"0.8.0"}}},{key:"tagName",get:function(){return"audio"}},{key:"isAudioOnly",get:function(){return!0}},{key:"updateSettings",value:function(){this.settings.left=["playpause","position","duration"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(ye.PLAYBACK_SETTINGSUPDATE)}},{key:"getPlaybackType",value:function(){return Fe.AOD}}])}(tt);rt.canPlay=function(e,t){return tt._canPlay("audio",{wav:["audio/wav"],mp3:["audio/mp3",'audio/mpeg;codecs="mp3"'],aac:['audio/mp4;codecs="mp4a.40.5"'],oga:["audio/ogg"]},e,t)};var it=function(e){function t(e){var r;return y(this,t),(r=h(this,t,[e])).el.src=e.src,r}return b(t,e),E(t,[{key:"name",get:function(){return"html_img"}},{key:"supportedVersion",get:function(){return{min:"0.8.0"}}},{key:"tagName",get:function(){return"img"}},{key:"attributes",get:function(){return{"data-html-img":""}}},{key:"events",get:function(){return{load:"_onLoad",abort:"_onError",error:"_onError"}}},{key:"getPlaybackType",value:function(){return Fe.NO_OP}},{key:"render",value:function(){var e=Ce("[data-html-img] {\n max-width: 100%;\n max-height: 100%; }\n".toString(),{baseUrl:this.options.baseUrl});return this.$el.append(e[0]),this.trigger(ye.PLAYBACK_READY,this.name),this}},{key:"_onLoad",value:function(){this.trigger(ye.PLAYBACK_ENDED,this.name)}},{key:"_onError",value:function(e){var t="error"===e.type?"load error":"loading aborted";this.trigger(ye.PLAYBACK_ERROR,{message:t},this.name)}}])}(Fe);it.canPlay=function(e){return/\.(png|jpg|jpeg|gif|bmp|tiff|pgm|pnm|webp)(|\?.*)$/i.test(e)};var nt=function(e){function t(){var e;y(this,t);for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return(e=h(this,t,[].concat(i)))._noiseFrameNum=-1,e}return b(t,e),E(t,[{key:"name",get:function(){return"no_op"}},{key:"supportedVersion",get:function(){return{min:"0.8.0"}}},{key:"template",get:function(){return Re("<canvas data-no-op-canvas></canvas>\n<p data-no-op-msg><%=message%></p><p>\n</p>")}},{key:"attributes",get:function(){return{"data-no-op":""}}},{key:"render",value:function(){var e=this.options.playbackNotSupportedMessage||this.i18n.t("playback_not_supported"),t=Ce("[data-no-op] {\n position: absolute;\n height: 100%;\n width: 100%;\n text-align: center; }\n\n[data-no-op] p[data-no-op-msg] {\n position: absolute;\n text-align: center;\n font-size: 25px;\n left: 0;\n right: 0;\n color: white;\n padding: 10px;\n /* center vertically */\n top: 50%;\n transform: translateY(-50%);\n max-height: 100%;\n overflow: auto; }\n\n[data-no-op] canvas[data-no-op-canvas] {\n background-color: #777;\n height: 100%;\n width: 100%; }\n".toString(),{baseUrl:this.options.baseUrl});this.$el.append(t[0]),this.$el.html(this.template({message:e})),this.trigger(ye.PLAYBACK_READY,this.name);var r=!(!this.options.poster||!this.options.poster.showForNoOp);return!this.options.autoPlay&&r||this._animate(),this}},{key:"_noise",value:function(){if(this._noiseFrameNum=(this._noiseFrameNum+1)%5,!this._noiseFrameNum){var e,t=this.context.createImageData(this.context.canvas.width,this.context.canvas.height);try{e=new Uint32Array(t.data.buffer)}catch(n){e=new Uint32Array(this.context.canvas.width*this.context.canvas.height*4);for(var r=t.data,i=0;i<r.length;i++)e[i]=r[i]}for(var n=e.length,a=6*Math.random()+4,s=0,o=0,l=0;l<n;){if(s<0)s=a*Math.random(),o=255*Math.pow(Math.random(),.4)<<24;s-=1,e[l++]=o}this.context.putImageData(t,0,0)}}},{key:"_loop",value:function(){var e=this;this._stop||(this._noise(),this._animationHandle=W((function(){return e._loop()})))}},{key:"destroy",value:function(){this._animationHandle&&(z(this._animationHandle),this._stop=!0)}},{key:"_animate",value:function(){this.canvas=this.$el.find("canvas[data-no-op-canvas]")[0],this.context=this.canvas.getContext("2d"),this._loop()}}])}(Fe);nt.canPlay=function(e){return!0};var at=function(e){function t(e){var r;return y(this,t),(r=h(this,t,[e]))._initializeMessages(),r}return b(t,e),E(t,[{key:"name",get:function(){return"strings"}},{key:"supportedVersion",get:function(){return{min:"0.8.0"}}},{key:"t",value:function(e){var t=this._language(),r=this._messages.en;return(t&&this._messages[t]||r)[e]||r[e]||e}},{key:"_language",value:function(){return this.core.options.language||re()}},{key:"_initializeMessages",value:function(){this._messages=P.extend(!0,{en:{live:"live",back_to_live:"back to live",disabled:"Disabled",playback_not_supported:"Your browser does not support the playback of this video. Please try using a different browser.",default_error_title:"Could not play video.",default_error_message:"There was a problem trying to load the video."},de:{live:"Live",back_to_live:"Zurück zum Live-Video",disabled:"Deaktiviert",playback_not_supported:"Ihr Browser unterstützt das Playback Verfahren nicht. Bitte vesuchen Sie es mit einem anderen Browser.",default_error_title:"Video kann nicht abgespielt werden",default_error_message:"Es gab ein Problem beim Laden des Videos"},pt:{live:"ao vivo",back_to_live:"voltar para o ao vivo",disabled:"Desativado",playback_not_supported:"Seu navegador não suporta a reprodução deste video. Por favor, tente usar um navegador diferente.",default_error_title:"Não foi possível reproduzir o vídeo.",default_error_message:"Ocorreu um problema ao tentar carregar o vídeo."},es_am:{live:"vivo",back_to_live:"volver en vivo",disabled:"No disponible",playback_not_supported:"Su navegador no soporta la reproducción de este video. Por favor, utilice un navegador diferente.",default_error_title:"No se puede reproducir el video.",default_error_message:"Se ha producido un error al cargar el video."},es:{live:"en directo",back_to_live:"volver al directo",disabled:"No disponible",playback_not_supported:"Este navegador no es compatible para reproducir este vídeo. Utilice un navegador diferente.",default_error_title:"No se puede reproducir el vídeo.",default_error_message:"Se ha producido un problema al cargar el vídeo."},ru:{live:"прямой эфир",back_to_live:"к прямому эфиру",disabled:"Отключено",playback_not_supported:"Ваш браузер не поддерживает воспроизведение этого видео. Пожалуйста, попробуйте другой браузер."},bg:{live:"на живо",back_to_live:"Върни на живо",disabled:"Изключено",playback_not_supported:"Вашият браузър не поддържа възпроизвеждането на това видео. Моля, пробвайте с друг браузър.",default_error_title:"Видеото не може да се възпроизведе.",default_error_message:"Възникна проблем при зареждането на видеото."},fr:{live:"en direct",back_to_live:"retour au direct",disabled:"Désactivé",playback_not_supported:"Votre navigateur ne supporte pas la lecture de cette vidéo. Merci de tenter sur un autre navigateur.",default_error_title:"Impossible de lire la vidéo.",default_error_message:"Un problème est survenu lors du chargement de la vidéo."},tr:{live:"canlı",back_to_live:"canlı yayına dön",disabled:"Engelli",playback_not_supported:"Tarayıcınız bu videoyu oynatma desteğine sahip değil. Lütfen farklı bir tarayıcı ile deneyin."},et:{live:"Otseülekanne",back_to_live:"Tagasi otseülekande juurde",disabled:"Keelatud",playback_not_supported:"Teie brauser ei toeta selle video taasesitust. Proovige kasutada muud brauserit."},ar:{live:"مباشر",back_to_live:"الرجوع إلى المباشر",disabled:"معطّل",playback_not_supported:"المتصفح الذي تستخدمه لا يدعم تشغيل هذا الفيديو. الرجاء إستخدام متصفح آخر.",default_error_title:"غير قادر الى التشغيل.",default_error_message:"حدثت مشكلة أثناء تحميل الفيديو."},zh:{live:"直播",back_to_live:"返回直播",disabled:"已禁用",playback_not_supported:"您的浏览器不支持该视频的播放。请尝试使用另一个浏览器。",default_error_title:"无法播放视频。",default_error_message:"在尝试加载视频时出现了问题。"}},this.core.options.strings||{}),this._messages["de-DE"]=this._messages.de,this._messages["pt-BR"]=this._messages.pt,this._messages["en-US"]=this._messages.en,this._messages["bg-BG"]=this._messages.bg,this._messages["es-419"]=this._messages.es_am,this._messages["es-ES"]=this._messages.es,this._messages["fr-FR"]=this._messages.fr,this._messages["tr-TR"]=this._messages.tr,this._messages["et-EE"]=this._messages.et,this._messages["ar-IQ"]=this._messages.ar,this._messages["zh-CN"]=this._messages.zh}}])}(Xe),st=function(e){function t(){return y(this,t),h(this,t,arguments)}return b(t,e),E(t,[{key:"name",get:function(){return"sources"}},{key:"supportedVersion",get:function(){return{min:"0.8.0"}}},{key:"bindEvents",value:function(){this.listenTo(this.core,ye.CORE_CONTAINERS_CREATED,this.onContainersCreated)}},{key:"onContainersCreated",value:function(){var e=this.core.containers.filter((function(e){return"no_op"!==e.playback.name}))[0]||this.core.containers[0];e&&this.core.containers.forEach((function(t){t!==e&&t.destroy()}))}}])}(Xe);Ye.registerPlugin(at),Ye.registerPlugin(st),Ye.registerPlayback(nt),Ye.registerPlayback(it),Ye.registerPlayback(rt),Ye.registerPlayback(tt);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function ot(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt,ut,ct={exports:{}};lt=ct,"undefined"!=typeof window&&(ut=()=>(()=>{var e={"./src/config.ts":
2
2
  /*!***********************!*\
3
3
  !*** ./src/config.ts ***!
4
4
  \***********************/(e,t,r)=>{r.r(t),r.d(t,{enableStreamingMode:()=>k,hlsDefaultConfig:()=>S,mergeConfig:()=>_});var i=r(/*! ./controller/abr-controller */"./src/controller/abr-controller.ts"),n=r(/*! ./controller/audio-stream-controller */"./src/controller/audio-stream-controller.ts"),a=r(/*! ./controller/audio-track-controller */"./src/controller/audio-track-controller.ts"),s=r(/*! ./controller/subtitle-stream-controller */"./src/controller/subtitle-stream-controller.ts"),o=r(/*! ./controller/subtitle-track-controller */"./src/controller/subtitle-track-controller.ts"),l=r(/*! ./controller/buffer-controller */"./src/controller/buffer-controller.ts"),u=r(/*! ./controller/timeline-controller */"./src/controller/timeline-controller.ts"),c=r(/*! ./controller/cap-level-controller */"./src/controller/cap-level-controller.ts"),d=r(/*! ./controller/fps-controller */"./src/controller/fps-controller.ts"),h=r(/*! ./controller/eme-controller */"./src/controller/eme-controller.ts"),f=r(/*! ./controller/cmcd-controller */"./src/controller/cmcd-controller.ts"),g=r(/*! ./utils/xhr-loader */"./src/utils/xhr-loader.ts"),p=r(/*! ./utils/fetch-loader */"./src/utils/fetch-loader.ts"),v=r(/*! ./utils/cues */"./src/utils/cues.ts"),m=r(/*! ./utils/mediakeys-helper */"./src/utils/mediakeys-helper.ts"),y=r(/*! ./utils/logger */"./src/utils/logger.ts");function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},A.apply(this,arguments)}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var S=T(T({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!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:g.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:i.default,bufferController:l.default,capLevelController:c.default,fpsController:d.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:m.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0},{cueHandler:v.default,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:s.SubtitleStreamController,subtitleTrackController:o.default,timelineController:u.TimelineController,audioStreamController:n.default,audioTrackController:a.default,emeController:h.default,cmcdController:f.default});function _(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return A({},e,t)}function k(e){var t=e.loader;t!==p.default&&t!==g.default?(y.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):(0,p.fetchSupported)()&&(e.loader=p.default,e.progressive=!0,e.enableSoftwareAES=!0,y.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}},"./src/controller/abr-controller.ts":
@@ -145,7 +145,7 @@ var HlsjsPlayback=function(){"use strict";function e(e,t){var r=Object.keys(e);i
145
145
  \**********************************/(e,t,r)=>{r.r(t),r.d(t,{DateRange:()=>u,DateRangeAttribute:()=>i});var i,n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),a=r(/*! ../utils/attr-list */"./src/utils/attr-list.ts"),s=r(/*! ../utils/logger */"./src/utils/logger.ts");function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},o.apply(this,arguments)}function l(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}!function(e){e.ID="ID",e.CLASS="CLASS",e.START_DATE="START-DATE",e.DURATION="DURATION",e.END_DATE="END-DATE",e.END_ON_NEXT="END-ON-NEXT",e.PLANNED_DURATION="PLANNED-DURATION",e.SCTE35_OUT="SCTE35-OUT",e.SCTE35_IN="SCTE35-IN"}(i||(i={}));var u=function(){function e(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){var r=t.attr;for(var l in r)if(Object.prototype.hasOwnProperty.call(e,l)&&e[l]!==r[l]){s.logger.warn('DATERANGE tag attribute: "'+l+'" does not match for tags with ID: "'+e.ID+'"'),this._badValueForSameId=l;break}e=o(new a.AttrList({}),r,e)}if(this.attr=e,this._startDate=new Date(e[i.START_DATE]),i.END_DATE in this.attr){var u=new Date(this.attr[i.END_DATE]);(0,n.isFiniteNumber)(u.getTime())&&(this._endDate=u)}}var t,r,u;return t=e,(r=[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}},{key:"duration",get:function(){if(i.DURATION in this.attr){var e=this.attr.decimalFloatingPoint(i.DURATION);if((0,n.isFiniteNumber)(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return i.PLANNED_DURATION in this.attr?this.attr.decimalFloatingPoint(i.PLANNED_DURATION):null}},{key:"endOnNext",get:function(){return this.attr.bool(i.END_ON_NEXT)}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&(0,n.isFiniteNumber)(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}])&&l(t.prototype,r),u&&l(t,u),Object.defineProperty(t,"prototype",{writable:!1}),e}()},"./src/loader/fragment-loader.ts":
146
146
  /*!***************************************!*\
147
147
  !*** ./src/loader/fragment-loader.ts ***!
148
- \***************************************/(e,t,r)=>{r.r(t),r.d(t,{LoadError:()=>f,default:()=>d});var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../errors */"./src/errors.ts");function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return s(e,arguments,u(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),l(i,e)},a(e)}function s(e,t,r){return s=o()?Reflect.construct.bind():function(e,t,r){var i=[null];i.push.apply(i,t);var n=new(Function.bind.apply(e,i));return r&&l(n,r.prototype),n},s.apply(null,arguments)}function o(){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(e){return!1}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var c=Math.pow(2,17),d=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var r=this,i=e.url;if(!i)return Promise.reject(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(i?"part list":"url")));this.abort();var a=this.config,s=a.fLoader,o=a.loader;return new Promise((function(i,l){r.loader&&r.loader.destroy();var u=r.loader=e.loader=s?new s(a):new o(a),d=h(e),g={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:"initSegment"===e.sn?1/0:c};e.stats=u.stats,u.load(d,g,{onSuccess:function(t,n,a,s){r.resetLoader(e,u),i({frag:e,part:null,payload:t.data,networkDetails:s})},onError:function(t,i,a){r.resetLoader(e,u),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:a}))},onAbort:function(t,i,a){r.resetLoader(e,u),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:a}))},onTimeout:function(t,i,a){r.resetLoader(e,u),l(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:a}))},onProgress:function(r,i,n,a){t&&t({frag:e,part:null,payload:n,networkDetails:a})}})}))},t.loadPart=function(e,t,r){var i=this;this.abort();var a=this.config,s=a.fLoader,o=a.loader;return new Promise((function(l,u){i.loader&&i.loader.destroy();var d=i.loader=e.loader=s?new s(a):new o(a),g=h(e,t),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:c};t.stats=d.stats,d.load(g,p,{onSuccess:function(n,a,s,o){i.resetLoader(e,d),i.updateStatsFromPart(e,t);var u={frag:e,part:t,payload:n.data,networkDetails:o};r(u),l(u)},onError:function(r,a,s){i.resetLoader(e,d),u(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:r,networkDetails:s}))},onAbort:function(r,a,s){e.stats.aborted=t.stats.aborted,i.resetLoader(e,d),u(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:s}))},onTimeout:function(r,a,s){i.resetLoader(e,d),u(new f({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:s}))}})}))},t.updateStatsFromPart=function(e,t){var r=e.stats,i=t.stats,n=i.total;if(r.loaded+=i.loaded,n){var a=Math.round(e.duration/t.duration),s=Math.min(Math.round(r.loaded/n),a),o=(a-s)*Math.round(r.loaded/s);r.total=r.loaded+o}else r.total=Math.max(r.loaded,r.total);var l=r.loading,u=i.loading;l.start?l.first+=u.first-u.start:(l.start=u.start,l.first=u.first),l.end=u.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function h(e,t){void 0===t&&(t=null);var r=t||e,n={frag:e,part:t,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},a=r.byteRangeStartOffset,s=r.byteRangeEndOffset;return(0,i.isFiniteNumber)(a)&&(0,i.isFiniteNumber)(s)&&(n.rangeStart=a,n.rangeEnd=s),n}var f=function(e){var t,r;function i(t){for(var r,i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return(r=e.call.apply(e,[this].concat(n))||this).data=void 0,r.data=t,r}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,l(t,r),i}(a(Error))},"./src/loader/fragment.ts":
148
+ \***************************************/(e,t,r)=>{r.r(t),r.d(t,{LoadError:()=>h,default:()=>c});var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../errors */"./src/errors.ts");function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return s(e,arguments,l(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),o(i,e)},a(e)}function s(e,t,r){return 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(e){return!1}}()?Reflect.construct.bind():function(e,t,r){var i=[null];i.push.apply(i,t);var n=new(Function.bind.apply(e,i));return r&&o(n,r.prototype),n},s.apply(null,arguments)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var u=Math.pow(2,17),c=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var r=this,i=e.url;if(!i)return Promise.reject(new h({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(i?"part list":"url")));this.abort();var a=this.config,s=a.fLoader,o=a.loader;return new Promise((function(i,l){r.loader&&r.loader.destroy();var c=r.loader=e.loader=s?new s(a):new o(a),f=d(e),g={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:"initSegment"===e.sn?1/0:u};e.stats=c.stats,c.load(f,g,{onSuccess:function(t,n,a,s){r.resetLoader(e,c),i({frag:e,part:null,payload:t.data,networkDetails:s})},onError:function(t,i,a){r.resetLoader(e,c),l(new h({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:a}))},onAbort:function(t,i,a){r.resetLoader(e,c),l(new h({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:a}))},onTimeout:function(t,i,a){r.resetLoader(e,c),l(new h({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:a}))},onProgress:function(r,i,n,a){t&&t({frag:e,part:null,payload:n,networkDetails:a})}})}))},t.loadPart=function(e,t,r){var i=this;this.abort();var a=this.config,s=a.fLoader,o=a.loader;return new Promise((function(l,c){i.loader&&i.loader.destroy();var f=i.loader=e.loader=s?new s(a):new o(a),g=d(e,t),p={timeout:a.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:a.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=f.stats,f.load(g,p,{onSuccess:function(n,a,s,o){i.resetLoader(e,f),i.updateStatsFromPart(e,t);var u={frag:e,part:t,payload:n.data,networkDetails:o};r(u),l(u)},onError:function(r,a,s){i.resetLoader(e,f),c(new h({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:r,networkDetails:s}))},onAbort:function(r,a,s){e.stats.aborted=t.stats.aborted,i.resetLoader(e,f),c(new h({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:s}))},onTimeout:function(r,a,s){i.resetLoader(e,f),c(new h({type:n.ErrorTypes.NETWORK_ERROR,details:n.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:s}))}})}))},t.updateStatsFromPart=function(e,t){var r=e.stats,i=t.stats,n=i.total;if(r.loaded+=i.loaded,n){var a=Math.round(e.duration/t.duration),s=Math.min(Math.round(r.loaded/n),a),o=(a-s)*Math.round(r.loaded/s);r.total=r.loaded+o}else r.total=Math.max(r.loaded,r.total);var l=r.loading,u=i.loading;l.start?l.first+=u.first-u.start:(l.start=u.start,l.first=u.first),l.end=u.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function d(e,t){void 0===t&&(t=null);var r=t||e,n={frag:e,part:t,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},a=r.byteRangeStartOffset,s=r.byteRangeEndOffset;return(0,i.isFiniteNumber)(a)&&(0,i.isFiniteNumber)(s)&&(n.rangeStart=a,n.rangeEnd=s),n}var h=function(e){var t,r;function i(t){for(var r,i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return(r=e.call.apply(e,[this].concat(n))||this).data=void 0,r.data=t,r}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r),i}(a(Error))},"./src/loader/fragment.ts":
149
149
  /*!********************************!*\
150
150
  !*** ./src/loader/fragment.ts ***!
151
151
  \********************************/(e,t,r)=>{r.r(t),r.d(t,{BaseSegment:()=>f,ElementaryStreamTypes:()=>i,Fragment:()=>g,Part:()=>p});var i,n=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),a=r(/*! url-toolkit */"./node_modules/url-toolkit/src/url-toolkit.js"),s=r(/*! ../utils/logger */"./src/utils/logger.ts"),o=r(/*! ./level-key */"./src/loader/level-key.ts"),l=r(/*! ./load-stats */"./src/loader/load-stats.ts");function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c(e,t)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function d(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function h(e,t,r){return t&&d(e.prototype,t),r&&d(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}!function(e){e.AUDIO="audio",e.VIDEO="video",e.AUDIOVIDEO="audiovideo"}(i||(i={}));var f=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[i.AUDIO]=null,t[i.VIDEO]=null,t[i.AUDIOVIDEO]=null,t),this.baseurl=e}return e.prototype.setByteRange=function(e,t){var r=e.split("@",2),i=[];1===r.length?i[0]=t?t.byteRangeEndOffset:0:i[0]=parseInt(r[1]),i[1]=parseInt(r[0])+i[0],this._byteRange=i},h(e,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=(0,a.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),e}(),g=function(e){function t(t,r){var i;return(i=e.call(this,r)||this)._decryptdata=null,i.rawProgramDateTime=null,i.programDateTime=null,i.tagList=[],i.duration=0,i.sn=0,i.levelkey=void 0,i.type=void 0,i.loader=null,i.level=-1,i.cc=0,i.startPTS=void 0,i.endPTS=void 0,i.appendedPTS=void 0,i.startDTS=void 0,i.endDTS=void 0,i.start=0,i.deltaPTS=void 0,i.maxStartPTS=void 0,i.minEndPTS=void 0,i.stats=new l.LoadStats,i.urlId=0,i.data=void 0,i.bitrateTest=!1,i.title=null,i.initSegment=null,i.type=t,i}u(t,e);var r=t.prototype;return r.createInitializationVector=function(e){for(var t=new Uint8Array(16),r=12;r<16;r++)t[r]=e>>8*(15-r)&255;return t},r.setDecryptDataFromLevelKey=function(e,t){var r=e;return"AES-128"===(null==e?void 0:e.method)&&e.uri&&!e.iv&&((r=o.LevelKey.fromURI(e.uri)).method=e.method,r.iv=this.createInitializationVector(t),r.keyFormat="identity"),r},r.setElementaryStreamInfo=function(e,t,r,i,n,a){void 0===a&&(a=!1);var s=this.elementaryStreams,o=s[e];o?(o.startPTS=Math.min(o.startPTS,t),o.endPTS=Math.max(o.endPTS,r),o.startDTS=Math.min(o.startDTS,i),o.endDTS=Math.max(o.endDTS,n)):s[e]={startPTS:t,endPTS:r,startDTS:i,endDTS:n,partial:a}},r.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[i.AUDIO]=null,e[i.VIDEO]=null,e[i.AUDIOVIDEO]=null},h(t,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var e=this.sn;"number"!=typeof e&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&s.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),e=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,e)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!(0,n.isFiniteNumber)(this.programDateTime))return null;var e=(0,n.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;return!(null===(e=this.decryptdata)||void 0===e||!e.keyFormat||!this.decryptdata.uri)}}]),t}(f),p=function(e){function t(t,r,i,n,a){var s;(s=e.call(this,i)||this).fragOffset=0,s.duration=0,s.gap=!1,s.independent=!1,s.relurl=void 0,s.fragment=void 0,s.index=void 0,s.stats=new l.LoadStats,s.duration=t.decimalFloatingPoint("DURATION"),s.gap=t.bool("GAP"),s.independent=t.bool("INDEPENDENT"),s.relurl=t.enumeratedString("URI"),s.fragment=r,s.index=n;var o=t.enumeratedString("BYTERANGE");return o&&s.setByteRange(o,a),a&&(s.fragOffset=a.fragOffset+a.duration),s}return u(t,e),h(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(f)},"./src/loader/key-loader.ts":
@@ -229,13 +229,13 @@ var HlsjsPlayback=function(){"use strict";function e(e,t){var r=Object.keys(e);i
229
229
  \***************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});const i=function(){function e(e,t,r){void 0===t&&(t=0),void 0===r&&(r=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=r}var t=e.prototype;return t.sample=function(e,t){var r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}()},"./src/utils/fetch-loader.ts":
230
230
  /*!***********************************!*\
231
231
  !*** ./src/utils/fetch-loader.ts ***!
232
- \***********************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>v,fetchSupported:()=>h});var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=r(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return o(e,arguments,c(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),u(i,e)},s(e)}function o(e,t,r){return o=l()?Reflect.construct.bind():function(e,t,r){var i=[null];i.push.apply(i,t);var n=new(Function.bind.apply(e,i));return r&&u(n,r.prototype),n},o.apply(null,arguments)}function l(){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(e){return!1}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},d.apply(this,arguments)}function h(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}var f=function(){function e(e){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=e.fetchSetup||g,this.controller=new self.AbortController,this.stats=new n.LoadStats}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},t.abortInternal=function(){var e=this.response;e&&e.ok||(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},t.load=function(e,t,r){var n=this,a=this.stats;if(a.loading.start)throw new Error("Loader can only be used once.");a.loading.start=self.performance.now();var s=function(e,t){var r={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(d({},e.headers))};return e.rangeEnd&&r.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),r}(e,this.controller.signal),o=r.onProgress,l="arraybuffer"===e.responseType,u=l?"byteLength":"length";this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,s),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){n.abortInternal(),r.onTimeout(a,e,n.response)}),t.timeout),self.fetch(this.request).then((function(r){if(n.response=n.loader=r,!r.ok){var s=r.status,u=r.statusText;throw new p(u||"fetch, bad network response",s,r)}return a.loading.first=Math.max(self.performance.now(),a.loading.start),a.total=parseInt(r.headers.get("Content-Length")||"0"),o&&(0,i.isFiniteNumber)(t.highWaterMark)?n.loadProgressively(r,a,e,t.highWaterMark,o):l?r.arrayBuffer():r.text()})).then((function(s){var l=n.response;self.clearTimeout(n.requestTimeout),a.loading.end=Math.max(self.performance.now(),a.loading.first);var c=s[u];c&&(a.loaded=a.total=c);var d={url:l.url,data:s};o&&!(0,i.isFiniteNumber)(t.highWaterMark)&&o(a,e,s,l),r.onSuccess(d,a,e,l)})).catch((function(t){if(self.clearTimeout(n.requestTimeout),!a.aborted){var i=t&&t.code||0,s=t?t.message:null;r.onError({code:i,text:s},e,t?t.details:null)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.loadProgressively=function(e,t,r,i,n){void 0===i&&(i=0);var s=new a.default,o=e.body.getReader();return function a(){return o.read().then((function(o){if(o.done)return s.dataLength&&n(t,r,s.flush(),e),Promise.resolve(new ArrayBuffer(0));var l=o.value,u=l.length;return t.loaded+=u,u<i||s.dataLength?(s.push(l),s.dataLength>=i&&n(t,r,s.flush(),e)):n(t,r,l,e),a()})).catch((function(){return Promise.reject()}))}()},e}();function g(e,t){return new self.Request(e.url,t)}var p=function(e){var t,r;function i(t,r,i){var n;return(n=e.call(this,t)||this).code=void 0,n.details=void 0,n.code=r,n.details=i,n}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,u(t,r),i}(s(Error));const v=f},"./src/utils/imsc1-ttml-parser.ts":
232
+ \***********************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>p,fetchSupported:()=>d});var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=r(/*! ../demux/chunk-cache */"./src/demux/chunk-cache.ts");function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return o(e,arguments,u(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),l(i,e)},s(e)}function o(e,t,r){return 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(e){return!1}}()?Reflect.construct.bind():function(e,t,r){var i=[null];i.push.apply(i,t);var n=new(Function.bind.apply(e,i));return r&&l(n,r.prototype),n},o.apply(null,arguments)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},c.apply(this,arguments)}function d(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}var h=function(){function e(e){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=e.fetchSetup||f,this.controller=new self.AbortController,this.stats=new n.LoadStats}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},t.abortInternal=function(){var e=this.response;e&&e.ok||(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},t.load=function(e,t,r){var n=this,a=this.stats;if(a.loading.start)throw new Error("Loader can only be used once.");a.loading.start=self.performance.now();var s=function(e,t){var r={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(c({},e.headers))};return e.rangeEnd&&r.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),r}(e,this.controller.signal),o=r.onProgress,l="arraybuffer"===e.responseType,u=l?"byteLength":"length";this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,s),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){n.abortInternal(),r.onTimeout(a,e,n.response)}),t.timeout),self.fetch(this.request).then((function(r){if(n.response=n.loader=r,!r.ok){var s=r.status,u=r.statusText;throw new g(u||"fetch, bad network response",s,r)}return a.loading.first=Math.max(self.performance.now(),a.loading.start),a.total=parseInt(r.headers.get("Content-Length")||"0"),o&&(0,i.isFiniteNumber)(t.highWaterMark)?n.loadProgressively(r,a,e,t.highWaterMark,o):l?r.arrayBuffer():r.text()})).then((function(s){var l=n.response;self.clearTimeout(n.requestTimeout),a.loading.end=Math.max(self.performance.now(),a.loading.first);var c=s[u];c&&(a.loaded=a.total=c);var d={url:l.url,data:s};o&&!(0,i.isFiniteNumber)(t.highWaterMark)&&o(a,e,s,l),r.onSuccess(d,a,e,l)})).catch((function(t){if(self.clearTimeout(n.requestTimeout),!a.aborted){var i=t&&t.code||0,s=t?t.message:null;r.onError({code:i,text:s},e,t?t.details:null)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.loadProgressively=function(e,t,r,i,n){void 0===i&&(i=0);var s=new a.default,o=e.body.getReader();return function a(){return o.read().then((function(o){if(o.done)return s.dataLength&&n(t,r,s.flush(),e),Promise.resolve(new ArrayBuffer(0));var l=o.value,u=l.length;return t.loaded+=u,u<i||s.dataLength?(s.push(l),s.dataLength>=i&&n(t,r,s.flush(),e)):n(t,r,l,e),a()})).catch((function(){return Promise.reject()}))}()},e}();function f(e,t){return new self.Request(e.url,t)}var g=function(e){var t,r;function i(t,r,i){var n;return(n=e.call(this,t)||this).code=void 0,n.details=void 0,n.code=r,n.details=i,n}return r=e,(t=i).prototype=Object.create(r.prototype),t.prototype.constructor=t,l(t,r),i}(s(Error));const p=h},"./src/utils/imsc1-ttml-parser.ts":
233
233
  /*!****************************************!*\
234
234
  !*** ./src/utils/imsc1-ttml-parser.ts ***!
235
235
  \****************************************/(e,t,r)=>{r.r(t),r.d(t,{IMSC1_CODEC:()=>c,parseIMSC1:()=>g});var i=r(/*! ./mp4-tools */"./src/utils/mp4-tools.ts"),n=r(/*! ./vttparser */"./src/utils/vttparser.ts"),a=r(/*! ./vttcue */"./src/utils/vttcue.ts"),s=r(/*! ../demux/id3 */"./src/demux/id3.ts"),o=r(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),l=r(/*! ./webvtt-parser */"./src/utils/webvtt-parser.ts");function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},u.apply(this,arguments)}var c="stpp.ttml.im1t",d=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,h=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,f={left:"start",center:"center",right:"end",start:"start",end:"end"};function g(e,t,r,n,c){var d=(0,i.findBox)(new Uint8Array(e),["mdat"]);if(0!==d.length){var h=d.map((function(e){return(0,s.utf8ArrayToStr)(e)})),g=(0,o.toTimescaleFromScale)(t,1,r);try{h.forEach((function(e){return n(function(e,t){var r=(new DOMParser).parseFromString(e,"text/xml"),i=r.getElementsByTagName("tt")[0];if(!i)throw new Error("Invalid ttml");var n={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(n).reduce((function(e,t){return e[t]=i.getAttribute("ttp:"+t)||n[t],e}),{}),o="preserve"!==i.getAttribute("xml:space"),c=v(p(i,"styling","style")),d=v(p(i,"layout","region")),h=p(i,"body","[begin]");return[].map.call(h,(function(e){var r=m(e,o);if(!r||!e.hasAttribute("begin"))return null;var i=E(e.getAttribute("begin"),s),n=E(e.getAttribute("dur"),s),h=E(e.getAttribute("end"),s);if(null===i)throw A(e);if(null===h){if(null===n)throw A(e);h=i+n}var g=new a.default(i-t,h-t,r);g.id=(0,l.generateCueId)(g.startTime,g.endTime,g.text);var p=d[e.getAttribute("region")],v=c[e.getAttribute("style")];g.position=10,g.size=80;var T=function(e,t,r){var i="http://www.w3.org/ns/ttml#styling",n=null,a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;return s&&r.hasOwnProperty(s)&&(n=r[s]),a.reduce((function(r,a){var s=y(t,i,a)||y(e,i,a)||y(n,i,a);return s&&(r[a]=s),r}),{})}(p,v,c),b=T.textAlign;if(b){var S=f[b];S&&(g.lineAlign=S),g.align=b}return u(g,T),g})).filter((function(e){return null!==e}))}(e,g))}))}catch(e){c(e)}}else c(new Error("Could not parse IMSC1 mdat"))}function p(e,t,r){var i=e.getElementsByTagName(t)[0];return i?[].slice.call(i.querySelectorAll(r)):[]}function v(e){return e.reduce((function(e,t){var r=t.getAttribute("xml:id");return r&&(e[r]=t),e}),{})}function m(e,t){return[].slice.call(e.childNodes).reduce((function(e,r,i){var n;return"br"===r.nodeName&&i?e+"\n":null!==(n=r.childNodes)&&void 0!==n&&n.length?m(r,t):t?e+r.textContent.trim().replace(/\s+/g," "):e+r.textContent}),"")}function y(e,t,r){return e&&e.hasAttributeNS(t,r)?e.getAttributeNS(t,r):null}function A(e){return new Error("Could not parse ttml timestamp "+e)}function E(e,t){if(!e)return null;var r=(0,n.parseTimeStamp)(e);return null===r&&(d.test(e)?r=function(e,t){var r=d.exec(e),i=(0|r[4])+(0|r[5])/t.subFrameRate;return 3600*(0|r[1])+60*(0|r[2])+(0|r[3])+i/t.frameRate}(e,t):h.test(e)&&(r=function(e,t){var r=h.exec(e),i=Number(r[1]);switch(r[2]){case"h":return 3600*i;case"m":return 60*i;case"ms":return 1e3*i;case"f":return i/t.frameRate;case"t":return i/t.tickRate}return i}(e,t))),r}},"./src/utils/logger.ts":
236
236
  /*!*****************************!*\
237
237
  !*** ./src/utils/logger.ts ***!
238
- \*****************************/(e,t,r)=>{r.r(t),r.d(t,{enableLogs:()=>o,logger:()=>l});var i=function(){},n={trace:i,debug:i,log:i,warn:i,info:i,error:i},a=n;function s(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):i}function o(e,t){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];r.forEach((function(t){a[t]=e[t]?e[t].bind(e):s(t)}))}(e,"debug","log","info","warn","error");try{a.log('Debug logs enabled for "'+t+'"')}catch(e){a=n}}else a=n}var l=n},"./src/utils/mediakeys-helper.ts":
238
+ \*****************************/(e,t,r)=>{r.r(t),r.d(t,{enableLogs:()=>o,logger:()=>l});var i=function(){},n={trace:i,debug:i,log:i,warn:i,info:i,error:i},a=n;function s(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];r.forEach((function(t){a[t]=e[t]?e[t].bind(e):function(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):i}(t)}))}function o(e,t){if(self.console&&!0===e||"object"==typeof e){s(e,"debug","log","info","warn","error");try{a.log('Debug logs enabled for "'+t+'"')}catch(e){a=n}}else a=n}var l=n},"./src/utils/mediakeys-helper.ts":
239
239
  /*!***************************************!*\
240
240
  !*** ./src/utils/mediakeys-helper.ts ***!
241
241
  \***************************************/(e,t,r)=>{var i;r.r(t),r.d(t,{KeySystems:()=>i,requestMediaKeySystemAccess:()=>n}),function(e){e.WIDEVINE="com.widevine.alpha",e.PLAYREADY="com.microsoft.playready"}(i||(i={}));var n="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null},"./src/utils/mediasource-helper.ts":
@@ -256,7 +256,7 @@ var HlsjsPlayback=function(){"use strict";function e(e,t){var r=Object.keys(e);i
256
256
  \**********************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});const i={toString:function(e){for(var t="",r=e.length,i=0;i<r;i++)t+="["+e.start(i).toFixed(3)+","+e.end(i).toFixed(3)+"]";return t}}},"./src/utils/timescale-conversion.ts":
257
257
  /*!*******************************************!*\
258
258
  !*** ./src/utils/timescale-conversion.ts ***!
259
- \*******************************************/(e,t,r)=>{function i(e,t,r,i){void 0===r&&(r=1),void 0===i&&(i=!1);var n=e*t*r;return i?Math.round(n):n}function n(e,t,r,n){return void 0===r&&(r=1),void 0===n&&(n=!1),i(e,t,1/r,n)}function a(e,t){return void 0===t&&(t=!1),i(e,1e3,1/9e4,t)}function s(e,t){return void 0===t&&(t=1),i(e,9e4,1/t)}r.r(t),r.d(t,{toMpegTsClockFromTimescale:()=>s,toMsFromMpegTsClock:()=>a,toTimescaleFromBase:()=>i,toTimescaleFromScale:()=>n})},"./src/utils/typed-array.ts":
259
+ \*******************************************/(e,t,r)=>{r.r(t),r.d(t,{toMpegTsClockFromTimescale:()=>o,toMsFromMpegTsClock:()=>s,toTimescaleFromBase:()=>n,toTimescaleFromScale:()=>a});var i=9e4;function n(e,t,r,i){void 0===r&&(r=1),void 0===i&&(i=!1);var n=e*t*r;return i?Math.round(n):n}function a(e,t,r,i){return void 0===r&&(r=1),void 0===i&&(i=!1),n(e,t,1/r,i)}function s(e,t){return void 0===t&&(t=!1),n(e,1e3,1/i,t)}function o(e,t){return void 0===t&&(t=1),n(e,i,1/t)}},"./src/utils/typed-array.ts":
260
260
  /*!**********************************!*\
261
261
  !*** ./src/utils/typed-array.ts ***!
262
262
  \**********************************/(e,t,r)=>{function i(e,t,r){return Uint8Array.prototype.slice?e.slice(t,r):new Uint8Array(Array.prototype.slice.call(e,t,r))}r.r(t),r.d(t,{sliceUint8:()=>i})},"./src/utils/vttcue.ts":
@@ -268,7 +268,7 @@ var HlsjsPlayback=function(){"use strict";function e(e,t){var r=Object.keys(e);i
268
268
  \********************************/(e,t,r)=>{r.r(t),r.d(t,{VTTParser:()=>h,fixLineBreaks:()=>d,parseTimeStamp:()=>a});var i=r(/*! ./vttcue */"./src/utils/vttcue.ts"),n=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function a(e){function t(e,t,r,i){return 3600*(0|e)+60*(0|t)+(0|r)+parseFloat(i||0)}var r=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return r?parseFloat(r[2])>59?t(r[2],r[3],0,r[4]):t(r[1],r[2],r[3],r[4]):null}var s=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,r){for(var i=0;i<r.length;++i)if(t===r[i]){this.set(e,t);break}},t.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},t.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var r=parseFloat(t);if(r>=0&&r<=100)return this.set(e,r),!0}return!1},e}();function o(e,t,r,i){var n=i?e.split(i):[e];for(var a in n)if("string"==typeof n[a]){var s=n[a].split(r);2===s.length&&t(s[0],s[1])}}var l=new i.default(0,0,""),u="middle"===l.align?"middle":"center";function c(e,t,r){var i=e;function n(){var t=a(e);if(null===t)throw new Error("Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function c(){e=e.replace(/^\s+/,"")}if(c(),t.startTime=n(),c(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.slice(3),c(),t.endTime=n(),c(),function(e,t){var i=new s;o(e,(function(e,t){var n;switch(e){case"region":for(var a=r.length-1;a>=0;a--)if(r[a].id===t){i.set(e,r[a].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":n=t.split(","),i.integer(e,n[0]),i.percent(e,n[0])&&i.set("snapToLines",!1),i.alt(e,n[0],["auto"]),2===n.length&&i.alt("lineAlign",n[1],["start",u,"end"]);break;case"position":n=t.split(","),i.percent(e,n[0]),2===n.length&&i.alt("positionAlign",n[1],["start",u,"end","line-left","line-right","auto"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start",u,"end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical","");var n=i.get("line","auto");"auto"===n&&-1===l.line&&(n=-1),t.line=n,t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align",u);var a=i.get("position","auto");"auto"===a&&50===l.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function d(e){return e.replace(/<br(?: \/)?>/gi,"\n")}var h=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new n,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function r(){var e=t.buffer,r=0;for(e=d(e);r<e.length&&"\r"!==e[r]&&"\n"!==e[r];)++r;var i=e.slice(0,r);return"\r"===e[r]&&++r,"\n"===e[r]&&++r,t.buffer=e.slice(r),i}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var n="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var a=(n=r()).match(/^()?WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var s=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:n=r(),t.state){case"HEADER":/:/.test(n)?o(n,(function(e,t){}),/:/):n||(t.state="ID");continue;case"NOTE":n||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(n)){t.state="NOTE";break}if(!n)continue;if(t.cue=new i.default(0,0,""),t.state="CUE",-1===n.indexOf("--\x3e")){t.cue.id=n;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{c(n,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var l=-1!==n.indexOf("--\x3e");if(!n||l&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=n;continue;case"BADCUE":n||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},t.flush=function(){var e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this},e}()},"./src/utils/webvtt-parser.ts":
269
269
  /*!************************************!*\
270
270
  !*** ./src/utils/webvtt-parser.ts ***!
271
- \************************************/(e,t,r)=>{r.r(t),r.d(t,{generateCueId:()=>d,parseWebVTT:()=>h});var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ./vttparser */"./src/utils/vttparser.ts"),a=r(/*! ../demux/id3 */"./src/demux/id3.ts"),s=r(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),o=r(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,u=function(e,t,r){return void 0===r&&(r=0),e.slice(r,r+t.length)===t},c=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return(t>>>0).toString()};function d(e,t,r){return c(e.toString())+c(t.toString())+c(r)}function h(e,t,r,c,h,f,g,p){var v,m=new n.VTTParser,y=(0,a.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(l,"\n").split("\n"),A=[],E=(0,s.toMpegTsClockFromTimescale)(t,r),T="00:00.000",b=0,S=0,_=!0;m.oncue=function(e){var t=c[h],r=c.ccOffset,i=(b-E)/9e4;null!=t&&t.new&&(void 0!==S?r=c.ccOffset=t.start:function(e,t,r){var i=e[t],n=e[i.prevCC];if(!n||!n.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);for(;null!==(a=n)&&void 0!==a&&a.new;){var a;e.ccOffset+=i.start-n.start,i.new=!1,n=e[(i=n).prevCC]}e.presentationOffset=r}(c,h,i)),i&&(r=i-c.presentationOffset);var n=e.endTime-e.startTime,a=(0,o.normalizePts)(9e4*(e.startTime+r-S),9e4*f)/9e4;e.startTime=Math.max(a,0),e.endTime=Math.max(a+n,0);var s=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(s)),e.id||(e.id=d(e.startTime,e.endTime,s)),e.endTime>0&&A.push(e)},m.onparsingerror=function(e){v=e},m.onflush=function(){v?p(v):g(A)},y.forEach((function(e){if(_){if(u(e,"X-TIMESTAMP-MAP=")){_=!1,e.slice(16).split(",").forEach((function(e){u(e,"LOCAL:")?T=e.slice(6):u(e,"MPEGTS:")&&(b=parseInt(e.slice(7)))}));try{S=function(e){var t=parseInt(e.slice(-3)),r=parseInt(e.slice(-6,-4)),n=parseInt(e.slice(-9,-7)),a=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!((0,i.isFiniteNumber)(t)&&(0,i.isFiniteNumber)(r)&&(0,i.isFiniteNumber)(n)&&(0,i.isFiniteNumber)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*r,(t+=6e4*n)+36e5*a}(T)/1e3}catch(e){v=e}return}""===e&&(_=!1)}m.parse(e+"\n")})),m.flush()}},"./src/utils/xhr-loader.ts":
271
+ \************************************/(e,t,r)=>{r.r(t),r.d(t,{generateCueId:()=>h,parseWebVTT:()=>g});var i=r(/*! ./src/polyfills/number */"./src/polyfills/number.ts"),n=r(/*! ./vttparser */"./src/utils/vttparser.ts"),a=r(/*! ../demux/id3 */"./src/demux/id3.ts"),s=r(/*! ./timescale-conversion */"./src/utils/timescale-conversion.ts"),o=r(/*! ../remux/mp4-remuxer */"./src/remux/mp4-remuxer.ts"),l=/\r\n|\n\r|\n|\r/g,u=function(e,t,r){return void 0===r&&(r=0),e.slice(r,r+t.length)===t},c=function(e){var t=parseInt(e.slice(-3)),r=parseInt(e.slice(-6,-4)),n=parseInt(e.slice(-9,-7)),a=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!((0,i.isFiniteNumber)(t)&&(0,i.isFiniteNumber)(r)&&(0,i.isFiniteNumber)(n)&&(0,i.isFiniteNumber)(a)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*r,t+=6e4*n,t+=36e5*a},d=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return(t>>>0).toString()};function h(e,t,r){return d(e.toString())+d(t.toString())+d(r)}var f=function(e,t,r){var i=e[t],n=e[i.prevCC];if(!n||!n.new&&i.new)return e.ccOffset=e.presentationOffset=i.start,void(i.new=!1);for(;null!==(a=n)&&void 0!==a&&a.new;){var a;e.ccOffset+=i.start-n.start,i.new=!1,n=e[(i=n).prevCC]}e.presentationOffset=r};function g(e,t,r,i,d,g,p,v){var m,y=new n.VTTParser,A=(0,a.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(l,"\n").split("\n"),E=[],T=(0,s.toMpegTsClockFromTimescale)(t,r),b="00:00.000",S=0,_=0,k=!0;y.oncue=function(e){var t=i[d],r=i.ccOffset,n=(S-T)/9e4;null!=t&&t.new&&(void 0!==_?r=i.ccOffset=t.start:f(i,d,n)),n&&(r=n-i.presentationOffset);var a=e.endTime-e.startTime,s=(0,o.normalizePts)(9e4*(e.startTime+r-_),9e4*g)/9e4;e.startTime=Math.max(s,0),e.endTime=Math.max(s+a,0);var l=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(l)),e.id||(e.id=h(e.startTime,e.endTime,l)),e.endTime>0&&E.push(e)},y.onparsingerror=function(e){m=e},y.onflush=function(){m?v(m):p(E)},A.forEach((function(e){if(k){if(u(e,"X-TIMESTAMP-MAP=")){k=!1,e.slice(16).split(",").forEach((function(e){u(e,"LOCAL:")?b=e.slice(6):u(e,"MPEGTS:")&&(S=parseInt(e.slice(7)))}));try{_=c(b)/1e3}catch(e){m=e}return}""===e&&(k=!1)}y.parse(e+"\n")})),y.flush()}},"./src/utils/xhr-loader.ts":
272
272
  /*!*********************************!*\
273
273
  !*** ./src/utils/xhr-loader.ts ***!
274
274
  \*********************************/(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var i=r(/*! ../utils/logger */"./src/utils/logger.ts"),n=r(/*! ../loader/load-stats */"./src/loader/load-stats.ts"),a=/^age:\s*[\d.]+\s*$/m;const s=function(){function e(e){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=e?e.xhrSetup:null,this.stats=new n.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,r){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=r,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var n=this.xhrSetup;try{if(n)try{n(r,t.url)}catch(e){r.open("GET",t.url,!0),n(r,t.url)}r.readyState||r.open("GET",t.url,!0);var a=this.context.headers;if(a)for(var s in a)r.setRequestHeader(s,a[s])}catch(e){return void this.callbacks.onError({code:r.status,text:e.message},t,r)}t.rangeEnd&&r.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),r.onreadystatechange=this.readystatechange.bind(this),r.onprogress=this.loadprogress.bind(this),r.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),r.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,r=this.stats;if(e&&t){var n=t.readyState,a=this.config;if(!r.aborted&&n>=2)if(self.clearTimeout(this.requestTimeout),0===r.loading.first&&(r.loading.first=Math.max(self.performance.now(),r.loading.start)),4===n){t.onreadystatechange=null,t.onprogress=null;var s=t.status,o="arraybuffer"===t.responseType;if(s>=200&&s<300&&(o&&t.response||null!==t.responseText)){var l,u;if(r.loading.end=Math.max(self.performance.now(),r.loading.first),u=o?(l=t.response).byteLength:(l=t.responseText).length,r.loaded=r.total=u,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(r,e,l,t),!this.callbacks)return;var d={url:t.responseURL,data:l};this.callbacks.onSuccess(d,r,e,t)}else r.retry>=a.maxRetry||s>=400&&s<499?(i.logger.error(s+" while loading "+e.url),this.callbacks.onError({code:s,text:t.statusText},e,t)):(i.logger.warn(s+" while loading "+e.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,a.maxRetryDelay),r.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),a.timeout)}},t.loadtimeout=function(){i.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&a.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}()},"./node_modules/eventemitter3/index.js":
@@ -277,5 +277,5 @@ var HlsjsPlayback=function(){"use strict";function e(e,t){var r=Object.keys(e);i
277
277
  \*********************************************/e=>{var t=Object.prototype.hasOwnProperty,r="~";function i(){}function n(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,i,a,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new n(i,a||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function o(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),o.prototype.eventNames=function(){var e,i,n=[];if(0===this._eventsCount)return n;for(i in e=this._events)t.call(e,i)&&n.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},o.prototype.listeners=function(e){var t=r?r+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,a=i.length,s=new Array(a);n<a;n++)s[n]=i[n].fn;return s},o.prototype.listenerCount=function(e){var t=r?r+e:e,i=this._events[t];return i?i.fn?1:i.length:0},o.prototype.emit=function(e,t,i,n,a,s){var o=r?r+e:e;if(!this._events[o])return!1;var l,u,c=this._events[o],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,n),!0;case 5:return c.fn.call(c.context,t,i,n,a),!0;case 6:return c.fn.call(c.context,t,i,n,a,s),!0}for(u=1,l=new Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,i);break;case 4:c[u].fn.call(c[u].context,t,i,n);break;default:if(!l)for(h=1,l=new Array(d-1);h<d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},o.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},o.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},o.prototype.removeListener=function(e,t,i,n){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||n&&!o.once||i&&o.context!==i||s(this,a);else{for(var l=0,u=[],c=o.length;l<c;l++)(o[l].fn!==t||n&&!o[l].once||i&&o[l].context!==i)&&u.push(o[l]);u.length?this._events[a]=1===u.length?u[0]:u:s(this,a)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o},"./node_modules/url-toolkit/src/url-toolkit.js":
278
278
  /*!*****************************************************!*\
279
279
  !*** ./node_modules/url-toolkit/src/url-toolkit.js ***!
280
- \*****************************************************/function(e){var t,r,i,n,a;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var n=a.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=a.normalizePath(n.path),a.buildURLFromParts(n)}var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return i.alwaysNormalize?(s.path=a.normalizePath(s.path),a.buildURLFromParts(s)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=r.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(u.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+s.path;u.path=a.normalizePath(d)}else u.path=o.path,s.params||(u.params=o.params,s.query||(u.query=o.query));return null===u.path&&(u.path=i.alwaysNormalize?a.normalizePath(s.path):s.path),a.buildURLFromParts(u)},parseURL:function(e){var r=t.exec(e);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(n,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=a}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,r),a.exports}r.m=e,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i=r("./src/hls.ts");return i=i.default})(),ht.exports=ft());var pt=dt(gt.exports),vt=ue,mt=ce;Te.register("PLAYBACK_FRAGMENT_CHANGED"),Te.register("PLAYBACK_FRAGMENT_PARSING_METADATA");var yt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(f,e);var n,o,u,h=l(f);function f(){var e;r(this,f);for(var i=arguments.length,n=new Array(i),a=0;a<i;a++)n[a]=arguments[a];return(e=h.call.apply(h,[this].concat(n))).options.hlsPlayback=t(t({},e.defaultOptions),e.options.hlsPlayback),e._setInitialState(),e}return n=f,u=[{key:"HLSJS",get:function(){return pt}}],(o=[{key:"name",get:function(){return"hls"}},{key:"supportedVersion",get:function(){return{min:"0.4.27"}}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?-1:this._currentLevel},set:function(e){this._currentLevel=e,this.trigger(Te.PLAYBACK_LEVEL_SWITCH_START),this.options.playback.hlsUseNextLevel?this._hls.nextLevel=this._currentLevel:this._hls.currentLevel=this._currentLevel}},{key:"isReady",get:function(){return this._isReadyState}},{key:"latency",get:function(){return this._hls.latency}},{key:"currentProgramDateTime",get:function(){return this._hls.playingDate}},{key:"_startTime",get:function(){return this._playbackType===Ge.LIVE&&"EVENT"!==this._playlistType?this._extrapolatedStartTime:this._playableRegionStartTime}},{key:"_now",get:function(){return vt()}},{key:"_extrapolatedStartTime",get:function(){if(!this._localStartTimeCorrelation)return this._playableRegionStartTime;var e=this._localStartTimeCorrelation,t=this._now-e.local,r=(e.remote+t)/1e3;return Math.min(r,this._playableRegionStartTime+this._extrapolatedWindowDuration)}},{key:"_extrapolatedEndTime",get:function(){var e=this._playableRegionStartTime+this._playableRegionDuration;if(!this._localEndTimeCorrelation)return e;var t=this._localEndTimeCorrelation,r=this._now-t.local,i=(t.remote+r)/1e3;return Math.max(e-this._extrapolatedWindowDuration,Math.min(i,e))}},{key:"_duration",get:function(){return this._extrapolatedEndTime-this._startTime}},{key:"_extrapolatedWindowDuration",get:function(){return null===this._segmentTargetDuration?0:this._extrapolatedWindowNumSegments*this._segmentTargetDuration}},{key:"bandwidthEstimate",get:function(){return this._hls&&this._hls.bandwidthEstimate}},{key:"defaultOptions",get:function(){return{preload:!0}}},{key:"customListeners",get:function(){return this.options.hlsPlayback&&this.options.hlsPlayback.customListeners||[]}},{key:"sourceMedia",get:function(){return this.options.src}},{key:"currentTimestamp",get:function(){return this._currentFragment?(this._currentFragment.programDateTime+1e3*(this.el.currentTime-this._currentFragment.start))/1e3:null}},{key:"_setInitialState",value:function(){this._minDvrSize=void 0===this.options.hlsMinimumDvrSize?60:this.options.hlsMinimumDvrSize,this._extrapolatedWindowNumSegments=this.options.playback&&void 0!==this.options.playback.extrapolatedWindowNumSegments?this.options.playback.extrapolatedWindowNumSegments:2,this._playbackType=Ge.VOD,this._lastTimeUpdate={current:0,total:0},this._lastDuration=null,this._playableRegionStartTime=0,this._localStartTimeCorrelation=null,this._localEndTimeCorrelation=null,this._playableRegionDuration=0,this._programDateTime=0,this._durationExcludesAfterLiveSyncPoint=!1,this._segmentTargetDuration=null,this._playlistType=null,this._recoverAttemptsRemaining=this.options.hlsRecoverAttempts||16}},{key:"_setup",value:function(){this._destroyHLSInstance(),this._createHLSInstance(),this._listenHLSEvents(),this._attachHLSMedia()}},{key:"_destroyHLSInstance",value:function(){this._hls&&(this._manifestParsed=!1,this._ccIsSetup=!1,this._ccTracksUpdated=!1,this._setInitialState(),this._hls.destroy(),this._hls=null)}},{key:"_createHLSInstance",value:function(){var e=t({},this.options.playback.hlsjsConfig);this._hls=new pt(e)}},{key:"_attachHLSMedia",value:function(){this._hls&&this._hls.attachMedia(this.el)}},{key:"_listenHLSEvents",value:function(){var e=this;this._hls&&(this._hls.once(pt.Events.MEDIA_ATTACHED,(function(){e.options.hlsPlayback.preload&&e._hls.loadSource(e.options.src)})),this._hls.on(pt.Events.MANIFEST_PARSED,(function(){return e._manifestParsed=!0})),this._hls.on(pt.Events.LEVEL_LOADED,(function(t,r){return e._updatePlaybackType(t,r)})),this._hls.on(pt.Events.LEVEL_UPDATED,(function(t,r){return e._onLevelUpdated(t,r)})),this._hls.on(pt.Events.LEVEL_SWITCHING,(function(t,r){return e._onLevelSwitch(t,r)})),this._hls.on(pt.Events.FRAG_CHANGED,(function(t,r){return e._onFragmentChanged(t,r)})),this._hls.on(pt.Events.FRAG_LOADED,(function(t,r){return e._onFragmentLoaded(t,r)})),this._hls.on(pt.Events.FRAG_PARSING_METADATA,(function(t,r){return e._onFragmentParsingMetadata(t,r)})),this._hls.on(pt.Events.ERROR,(function(t,r){return e._onHLSJSError(t,r)})),this._hls.on(pt.Events.SUBTITLE_TRACK_LOADED,(function(t,r){return e._onSubtitleLoaded(t,r)})),this._hls.on(pt.Events.SUBTITLE_TRACKS_UPDATED,(function(){return e._ccTracksUpdated=!0})),this.bindCustomListeners())}},{key:"bindCustomListeners",value:function(){var e=this;this.customListeners.forEach((function(t){var r=t.eventName,i=t.once?"once":"on";r&&e._hls["".concat(i)](r,t.callback)}))}},{key:"unbindCustomListeners",value:function(){var e=this;this.customListeners.forEach((function(t){var r=t.eventName;r&&e._hls.off(r,t.callback)}))}},{key:"_onFragmentParsingMetadata",value:function(e,t){this.trigger(Te.Custom.PLAYBACK_FRAGMENT_PARSING_METADATA,{evt:e,data:t})}},{key:"render",value:function(){return this._ready(),c(a(f.prototype),"render",this).call(this)}},{key:"_ready",value:function(){this._isReadyState||(!this._hls&&this._setup(),this._isReadyState=!0,this.trigger(Te.PLAYBACK_READY,this.name))}},{key:"_recover",value:function(e,t,r){if(this._recoveredDecodingError)if(this._recoveredAudioCodecError){ve.error("hlsjs: failed to recover",{evt:e,data:t}),r.level=Fe.Levels.FATAL;var i=this.createError(r);this.trigger(Te.PLAYBACK_ERROR,i),this.stop()}else this._recoveredAudioCodecError=!0,this._hls.swapAudioCodec(),this._hls.recoverMediaError();else this._recoveredDecodingError=!0,this._hls.recoverMediaError()}},{key:"_setupSrc",value:function(e){}},{key:"_startTimeUpdateTimer",value:function(){var e=this;this._timeUpdateTimer||(this._timeUpdateTimer=setInterval((function(){e._onDurationChange(),e._onTimeUpdate()}),100))}},{key:"_stopTimeUpdateTimer",value:function(){this._timeUpdateTimer&&(clearInterval(this._timeUpdateTimer),this._timeUpdateTimer=null)}},{key:"getProgramDateTime",value:function(){return this._programDateTime}},{key:"getDuration",value:function(){return this._duration}},{key:"getCurrentTime",value:function(){return Math.max(0,this.el.currentTime-this._startTime)}},{key:"getStartTimeOffset",value:function(){return this._startTime}},{key:"seekPercentage",value:function(e){var t=e>0?this._duration*(e/100):this._duration;this.seek(t)}},{key:"seek",value:function(e){e<0&&(ve.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this.getDuration()),this.dvrEnabled&&this._updateDvr(e<this.getDuration()-3),e+=this._startTime,this.el.currentTime=e}},{key:"seekToLivePoint",value:function(){this.seek(this.getDuration())}},{key:"_updateDvr",value:function(e){this.trigger(Te.PLAYBACK_DVR,e),this.trigger(Te.PLAYBACK_STATS_ADD,{dvr:e})}},{key:"_updateSettings",value:function(){this._playbackType===Ge.VOD?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(Te.PLAYBACK_SETTINGSUPDATE)}},{key:"_onHLSJSError",value:function(e,t){var r,i={code:"".concat(t.type,"_").concat(t.details),description:"".concat(this.name," error: type: ").concat(t.type,", details: ").concat(t.details),raw:t};if(t.response&&(i.description+=", response: ".concat(JSON.stringify(t.response))),t.fatal)if(this._recoverAttemptsRemaining>0)switch(this._recoverAttemptsRemaining-=1,t.type){case pt.ErrorTypes.NETWORK_ERROR:switch(t.details){case pt.ErrorDetails.MANIFEST_LOAD_ERROR:case pt.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case pt.ErrorDetails.MANIFEST_PARSING_ERROR:case pt.ErrorDetails.LEVEL_LOAD_ERROR:case pt.ErrorDetails.LEVEL_LOAD_TIMEOUT:ve.error("hlsjs: unrecoverable network fatal error.",{evt:e,data:t}),r=this.createError(i),this.trigger(Te.PLAYBACK_ERROR,r),this.stop();break;default:ve.warn("hlsjs: trying to recover from network error.",{evt:e,data:t}),i.level=Fe.Levels.WARN,this._hls.startLoad()}break;case pt.ErrorTypes.MEDIA_ERROR:ve.warn("hlsjs: trying to recover from media error.",{evt:e,data:t}),i.level=Fe.Levels.WARN,this._recover(e,t,i);break;default:ve.error("hlsjs: could not recover from error.",{evt:e,data:t}),r=this.createError(i),this.trigger(Te.PLAYBACK_ERROR,r),this.stop()}else ve.error("hlsjs: could not recover from error after maximum number of attempts.",{evt:e,data:t}),r=this.createError(i),this.trigger(Te.PLAYBACK_ERROR,r),this.stop();else{if(this.options.playback.triggerFatalErrorOnResourceDenied&&this._keyIsDenied(t))return ve.error("hlsjs: could not load decrypt key.",{evt:e,data:t}),r=this.createError(i),this.trigger(Te.PLAYBACK_ERROR,r),void this.stop();i.level=Fe.Levels.WARN,ve.warn("hlsjs: non-fatal error occurred",{evt:e,data:t})}}},{key:"_keyIsDenied",value:function(e){return e.type===pt.ErrorTypes.NETWORK_ERROR&&e.details===pt.ErrorDetails.KEY_LOAD_ERROR&&e.response&&e.response.code>=400}},{key:"_onTimeUpdate",value:function(){var e={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:this.getProgramDateTime()};this._lastTimeUpdate&&e.current===this._lastTimeUpdate.current&&e.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=e,this.trigger(Te.PLAYBACK_TIMEUPDATE,e,this.name))}},{key:"_onDurationChange",value:function(){var e=this.getDuration();this._lastDuration!==e&&(this._lastDuration=e,c(a(f.prototype),"_onDurationChange",this).call(this))}},{key:"_onProgress",value:function(){if(this.el.buffered.length){for(var e=[],t=0,r=0;r<this.el.buffered.length;r++)e=[].concat(d(e),[{start:Math.max(0,this.el.buffered.start(r)-this._playableRegionStartTime),end:Math.max(0,this.el.buffered.end(r)-this._playableRegionStartTime)}]),this.el.currentTime>=e[r].start&&this.el.currentTime<=e[r].end&&(t=r);var i={start:e[t].start,current:e[t].end,total:this.getDuration()};this.trigger(Te.PLAYBACK_PROGRESS,i,e)}}},{key:"load",value:function(e){this._stopTimeUpdateTimer(),this.options.src=e,this._setup()}},{key:"play",value:function(){!this._hls&&this._setup(),!this._manifestParsed&&!this.options.hlsPlayback.preload&&this._hls.loadSource(this.options.src),c(a(f.prototype),"play",this).call(this),this._startTimeUpdateTimer()}},{key:"pause",value:function(){this._hls&&(this.el.pause(),this.dvrEnabled&&this._updateDvr(!0))}},{key:"stop",value:function(){this._stopTimeUpdateTimer(),this._hls&&c(a(f.prototype),"stop",this).call(this),this._destroyHLSInstance()}},{key:"destroy",value:function(){this._stopTimeUpdateTimer(),this._destroyHLSInstance(),c(a(f.prototype),"destroy",this).call(this)}},{key:"_updatePlaybackType",value:function(e,t){this._playbackType=t.details.live?Ge.LIVE:Ge.VOD,this._onLevelUpdated(e,t),this._ccTracksUpdated&&this._playbackType===Ge.LIVE&&this.hasClosedCaptionsTracks&&this._onSubtitleLoaded()}},{key:"_fillLevels",value:function(){this._levels=this._hls.levels.map((function(e,t){return{id:t,level:e,label:"".concat(e.bitrate/1e3,"Kbps")}})),this.trigger(Te.PLAYBACK_LEVELS_AVAILABLE,this._levels)}},{key:"_onLevelUpdated",value:function(e,t){this._segmentTargetDuration=t.details.targetduration,this._playlistType=t.details.type||null;var r=!1,i=!1,n=t.details.fragments,a=this._playableRegionStartTime,s=this._playableRegionDuration;if(0!==n.length){if(n[0].rawProgramDateTime&&(this._programDateTime=n[0].rawProgramDateTime),this._playableRegionStartTime!==n[0].start&&(r=!0,this._playableRegionStartTime=n[0].start),r)if(this._localStartTimeCorrelation){var o=this._localStartTimeCorrelation,l=this._now-o.local,u=(o.remote+l)/1e3;u<n[0].start?this._localStartTimeCorrelation={local:this._now,remote:1e3*n[0].start}:u>a+this._extrapolatedWindowDuration&&(this._localStartTimeCorrelation={local:this._now,remote:1e3*Math.max(n[0].start,a+this._extrapolatedWindowDuration)})}else this._localStartTimeCorrelation={local:this._now,remote:1e3*(n[0].start+this._extrapolatedWindowDuration/2)};var c=t.details.totalduration;if(this._playbackType===Ge.LIVE){var d=t.details.targetduration*((this.options.playback.hlsjsConfig||{}).liveSyncDurationCount||pt.DefaultConfig.liveSyncDurationCount);d<=c?(c-=d,this._durationExcludesAfterLiveSyncPoint=!0):this._durationExcludesAfterLiveSyncPoint=!1}c!==this._playableRegionDuration&&(i=!0,this._playableRegionDuration=c);var h=n[0].start+c,f=a+s;if(h!==f)if(this._localEndTimeCorrelation){var g=this._localEndTimeCorrelation,p=this._now-g.local,v=(g.remote+p)/1e3;v>h?this._localEndTimeCorrelation={local:this._now,remote:1e3*h}:v<h-this._extrapolatedWindowDuration?this._localEndTimeCorrelation={local:this._now,remote:1e3*(h-this._extrapolatedWindowDuration)}:v>f&&(this._localEndTimeCorrelation={local:this._now,remote:1e3*f})}else this._localEndTimeCorrelation={local:this._now,remote:1e3*h};i&&this._onDurationChange(),r&&this._onProgress()}}},{key:"_onFragmentChanged",value:function(e,t){this._currentFragment=t.frag,this.trigger(Te.Custom.PLAYBACK_FRAGMENT_CHANGED,t)}},{key:"_onFragmentLoaded",value:function(e,t){this.trigger(Te.PLAYBACK_FRAGMENT_LOADED,t)}},{key:"_onSubtitleLoaded",value:function(){if(!this._ccIsSetup){this.trigger(Te.PLAYBACK_SUBTITLE_AVAILABLE);var e=this._playbackType===Ge.LIVE?-1:this.closedCaptionsTrackId;this.closedCaptionsTrackId=e,this._ccIsSetup=!0}}},{key:"_onLevelSwitch",value:function(e,t){this.levels.length||this._fillLevels(),this.trigger(Te.PLAYBACK_LEVEL_SWITCH_END),this.trigger(Te.PLAYBACK_LEVEL_SWITCH,t);var r=this._hls.levels[t.level];r&&(this.highDefinition=r.height>=720||r.bitrate/1e3>=2e3,this.trigger(Te.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(Te.PLAYBACK_BITRATE,{height:r.height,width:r.width,bandwidth:r.bitrate,bitrate:r.bitrate,level:t.level}))}},{key:"dvrEnabled",get:function(){return this._durationExcludesAfterLiveSyncPoint&&this._duration>=this._minDvrSize&&this.getPlaybackType()===Ge.LIVE}},{key:"getPlaybackType",value:function(){return this._playbackType}},{key:"isSeekEnabled",value:function(){return this._playbackType===Ge.VOD||this.dvrEnabled}}])&&i(n.prototype,o),u&&i(n,u),Object.defineProperty(n,"prototype",{writable:!1}),f}(at);return yt.canPlay=function(e,t){var r=e.split("?")[0].match(/.*\.(.*)$/)||[],i=r.length>1&&"m3u8"===r[1].toLowerCase()||mt(t,["application/vnd.apple.mpegurl","application/x-mpegURL"]);return!(!pt.isSupported()||!i)},yt}();
280
+ \*****************************************************/function(e){var t,r,i,n,a;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var n=a.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");return n.path=a.normalizePath(n.path),a.buildURLFromParts(n)}var s=a.parseURL(t);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return i.alwaysNormalize?(s.path=a.normalizePath(s.path),a.buildURLFromParts(s)):t;var o=a.parseURL(e);if(!o)throw new Error("Error trying to parse base URL.");if(!o.netLoc&&o.path&&"/"!==o.path[0]){var l=r.exec(o.path);o.netLoc=l[1],o.path=l[2]}o.netLoc&&!o.path&&(o.path="/");var u={scheme:o.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(u.netLoc=o.netLoc,"/"!==s.path[0]))if(s.path){var c=o.path,d=c.substring(0,c.lastIndexOf("/")+1)+s.path;u.path=a.normalizePath(d)}else u.path=o.path,s.params||(u.params=o.params,s.query||(u.query=o.query));return null===u.path&&(u.path=i.alwaysNormalize?a.normalizePath(s.path):s.path),a.buildURLFromParts(u)},parseURL:function(e){var r=t.exec(e);return r?{scheme:r[1]||"",netLoc:r[2]||"",path:r[3]||"",params:r[4]||"",query:r[5]||"",fragment:r[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(n,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=a}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,r),a.exports}r.m=e,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i=r("./src/hls.ts");return i=i.default})(),lt.exports=ut());var dt=ot(ct.exports),ht=se,ft=oe;ye.register("PLAYBACK_FRAGMENT_CHANGED"),ye.register("PLAYBACK_FRAGMENT_PARSING_METADATA");var gt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(h,e);var i,s,c,d=o(h);function h(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h);for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return(e=d.call.apply(d,[this].concat(i))).options.hlsPlayback=t(t({},e.defaultOptions),e.options.hlsPlayback),e._setInitialState(),e}return i=h,c=[{key:"HLSJS",get:function(){return dt}}],(s=[{key:"name",get:function(){return"hls"}},{key:"supportedVersion",get:function(){return{min:"0.8.0"}}},{key:"levels",get:function(){return this._levels||[]}},{key:"currentLevel",get:function(){return null===this._currentLevel||void 0===this._currentLevel?-1:this._currentLevel},set:function(e){this._currentLevel=e,this.trigger(ye.PLAYBACK_LEVEL_SWITCH_START),this.options.playback.hlsUseNextLevel?this._hls.nextLevel=this._currentLevel:this._hls.currentLevel=this._currentLevel}},{key:"isReady",get:function(){return this._isReadyState}},{key:"latency",get:function(){return this._hls.latency}},{key:"currentProgramDateTime",get:function(){return this._hls.playingDate}},{key:"_startTime",get:function(){return this._playbackType===Fe.LIVE&&"EVENT"!==this._playlistType?this._extrapolatedStartTime:this._playableRegionStartTime}},{key:"_now",get:function(){return ht()}},{key:"_extrapolatedStartTime",get:function(){if(!this._localStartTimeCorrelation)return this._playableRegionStartTime;var e=this._localStartTimeCorrelation,t=this._now-e.local,r=(e.remote+t)/1e3;return Math.min(r,this._playableRegionStartTime+this._extrapolatedWindowDuration)}},{key:"_extrapolatedEndTime",get:function(){var e=this._playableRegionStartTime+this._playableRegionDuration;if(!this._localEndTimeCorrelation)return e;var t=this._localEndTimeCorrelation,r=this._now-t.local,i=(t.remote+r)/1e3;return Math.max(e-this._extrapolatedWindowDuration,Math.min(i,e))}},{key:"_duration",get:function(){return this._extrapolatedEndTime-this._startTime}},{key:"_extrapolatedWindowDuration",get:function(){return null===this._segmentTargetDuration?0:this._extrapolatedWindowNumSegments*this._segmentTargetDuration}},{key:"bandwidthEstimate",get:function(){return this._hls&&this._hls.bandwidthEstimate}},{key:"defaultOptions",get:function(){return{preload:!0}}},{key:"customListeners",get:function(){return this.options.hlsPlayback&&this.options.hlsPlayback.customListeners||[]}},{key:"sourceMedia",get:function(){return this.options.src}},{key:"currentTimestamp",get:function(){return this._currentFragment?(this._currentFragment.programDateTime+1e3*(this.el.currentTime-this._currentFragment.start))/1e3:null}},{key:"_setInitialState",value:function(){this._minDvrSize=void 0===this.options.hlsMinimumDvrSize?60:this.options.hlsMinimumDvrSize,this._extrapolatedWindowNumSegments=this.options.playback&&void 0!==this.options.playback.extrapolatedWindowNumSegments?this.options.playback.extrapolatedWindowNumSegments:2,this._playbackType=Fe.VOD,this._lastTimeUpdate={current:0,total:0},this._lastDuration=null,this._playableRegionStartTime=0,this._localStartTimeCorrelation=null,this._localEndTimeCorrelation=null,this._playableRegionDuration=0,this._programDateTime=0,this._durationExcludesAfterLiveSyncPoint=!1,this._segmentTargetDuration=null,this._playlistType=null,this._recoverAttemptsRemaining=this.options.hlsRecoverAttempts||16}},{key:"_setup",value:function(){this._destroyHLSInstance(),this._createHLSInstance(),this._listenHLSEvents(),this._attachHLSMedia()}},{key:"_destroyHLSInstance",value:function(){this._hls&&(this._manifestLoading=!1,this._ccIsSetup=!1,this._ccTracksUpdated=!1,this._setInitialState(),this._hls.destroy(),this._hls=null)}},{key:"_createHLSInstance",value:function(){var e=t({},this.options.playback.hlsjsConfig);this._hls=new dt(e)}},{key:"_attachHLSMedia",value:function(){this._hls&&this._hls.attachMedia(this.el)}},{key:"_listenHLSEvents",value:function(){var e=this;this._hls&&(this._hls.once(dt.Events.MEDIA_ATTACHED,(function(){e.options.hlsPlayback.preload&&e._hls.loadSource(e.options.src)})),this._hls.on(dt.Events.MANIFEST_LOADING,(function(){return e._manifestLoading=!0})),this._hls.on(dt.Events.LEVEL_LOADED,(function(t,r){return e._updatePlaybackType(t,r)})),this._hls.on(dt.Events.LEVEL_UPDATED,(function(t,r){return e._onLevelUpdated(t,r)})),this._hls.on(dt.Events.LEVEL_SWITCHING,(function(t,r){return e._onLevelSwitch(t,r)})),this._hls.on(dt.Events.FRAG_CHANGED,(function(t,r){return e._onFragmentChanged(t,r)})),this._hls.on(dt.Events.FRAG_LOADED,(function(t,r){return e._onFragmentLoaded(t,r)})),this._hls.on(dt.Events.FRAG_PARSING_METADATA,(function(t,r){return e._onFragmentParsingMetadata(t,r)})),this._hls.on(dt.Events.ERROR,(function(t,r){return e._onHLSJSError(t,r)})),this._hls.on(dt.Events.SUBTITLE_TRACK_LOADED,(function(t,r){return e._onSubtitleLoaded(t,r)})),this._hls.on(dt.Events.SUBTITLE_TRACKS_UPDATED,(function(){return e._ccTracksUpdated=!0})),this.bindCustomListeners())}},{key:"bindCustomListeners",value:function(){var e=this;this.customListeners.forEach((function(t){var r=t.eventName,i=t.once?"once":"on";r&&e._hls["".concat(i)](r,t.callback)}))}},{key:"unbindCustomListeners",value:function(){var e=this;this.customListeners.forEach((function(t){var r=t.eventName;r&&e._hls.off(r,t.callback)}))}},{key:"_onFragmentParsingMetadata",value:function(e,t){this.trigger(ye.Custom.PLAYBACK_FRAGMENT_PARSING_METADATA,{evt:e,data:t})}},{key:"render",value:function(){return this._ready(),l(n(h.prototype),"render",this).call(this)}},{key:"_ready",value:function(){this._isReadyState||(!this._hls&&this._setup(),this._isReadyState=!0,this.trigger(ye.PLAYBACK_READY,this.name))}},{key:"_recover",value:function(e,t,r){if(this._recoveredDecodingError)if(this._recoveredAudioCodecError){fe.error("hlsjs: failed to recover",{evt:e,data:t}),r.level=we.Levels.FATAL;var i=this.createError(r);this.trigger(ye.PLAYBACK_ERROR,i),this.stop()}else this._recoveredAudioCodecError=!0,this._hls.swapAudioCodec(),this._hls.recoverMediaError();else this._recoveredDecodingError=!0,this._hls.recoverMediaError()}},{key:"_setupSrc",value:function(e){}},{key:"_startTimeUpdateTimer",value:function(){var e=this;this._timeUpdateTimer||(this._timeUpdateTimer=setInterval((function(){e._onDurationChange(),e._onTimeUpdate()}),100))}},{key:"_stopTimeUpdateTimer",value:function(){this._timeUpdateTimer&&(clearInterval(this._timeUpdateTimer),this._timeUpdateTimer=null)}},{key:"getProgramDateTime",value:function(){return this._programDateTime}},{key:"getDuration",value:function(){return this._duration}},{key:"getCurrentTime",value:function(){return Math.max(0,this.el.currentTime-this._startTime)}},{key:"getStartTimeOffset",value:function(){return this._startTime}},{key:"seekPercentage",value:function(e){var t=e>0?this._duration*(e/100):this._duration;this.seek(t)}},{key:"seek",value:function(e){e<0&&(fe.warn("Attempt to seek to a negative time. Resetting to live point. Use seekToLivePoint() to seek to the live point."),e=this.getDuration()),this.dvrEnabled&&this._updateDvr(e<this.getDuration()-3),e+=this._startTime,this.el.currentTime=e}},{key:"seekToLivePoint",value:function(){this.seek(this.getDuration())}},{key:"_updateDvr",value:function(e){this.trigger(ye.PLAYBACK_DVR,e),this.trigger(ye.PLAYBACK_STATS_ADD,{dvr:e})}},{key:"_updateSettings",value:function(){this._playbackType===Fe.VOD?this.settings.left=["playpause","position","duration"]:this.dvrEnabled?this.settings.left=["playpause"]:this.settings.left=["playstop"],this.settings.seekEnabled=this.isSeekEnabled(),this.trigger(ye.PLAYBACK_SETTINGSUPDATE)}},{key:"_onHLSJSError",value:function(e,t){var r,i={code:"".concat(t.type,"_").concat(t.details),description:"".concat(this.name," error: type: ").concat(t.type,", details: ").concat(t.details),raw:t};if(t.response&&(i.description+=", response: ".concat(JSON.stringify(t.response))),t.fatal)if(this._recoverAttemptsRemaining>0)switch(this._recoverAttemptsRemaining-=1,t.type){case dt.ErrorTypes.NETWORK_ERROR:switch(t.details){case dt.ErrorDetails.MANIFEST_LOAD_ERROR:case dt.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case dt.ErrorDetails.MANIFEST_PARSING_ERROR:case dt.ErrorDetails.LEVEL_LOAD_ERROR:case dt.ErrorDetails.LEVEL_LOAD_TIMEOUT:fe.error("hlsjs: unrecoverable network fatal error.",{evt:e,data:t}),r=this.createError(i),this.trigger(ye.PLAYBACK_ERROR,r),this.stop();break;default:fe.warn("hlsjs: trying to recover from network error.",{evt:e,data:t}),i.level=we.Levels.WARN,this._hls.startLoad()}break;case dt.ErrorTypes.MEDIA_ERROR:fe.warn("hlsjs: trying to recover from media error.",{evt:e,data:t}),i.level=we.Levels.WARN,this._recover(e,t,i);break;default:fe.error("hlsjs: could not recover from error.",{evt:e,data:t}),r=this.createError(i),this.trigger(ye.PLAYBACK_ERROR,r),this.stop()}else fe.error("hlsjs: could not recover from error after maximum number of attempts.",{evt:e,data:t}),r=this.createError(i),this.trigger(ye.PLAYBACK_ERROR,r),this.stop();else{if(this.options.playback.triggerFatalErrorOnResourceDenied&&this._keyIsDenied(t))return fe.error("hlsjs: could not load decrypt key.",{evt:e,data:t}),r=this.createError(i),this.trigger(ye.PLAYBACK_ERROR,r),void this.stop();i.level=we.Levels.WARN,fe.warn("hlsjs: non-fatal error occurred",{evt:e,data:t})}}},{key:"_keyIsDenied",value:function(e){return e.type===dt.ErrorTypes.NETWORK_ERROR&&e.details===dt.ErrorDetails.KEY_LOAD_ERROR&&e.response&&e.response.code>=400}},{key:"_onTimeUpdate",value:function(){var e={current:this.getCurrentTime(),total:this.getDuration(),firstFragDateTime:this.getProgramDateTime()};this._lastTimeUpdate&&e.current===this._lastTimeUpdate.current&&e.total===this._lastTimeUpdate.total||(this._lastTimeUpdate=e,this.trigger(ye.PLAYBACK_TIMEUPDATE,e,this.name))}},{key:"_onDurationChange",value:function(){var e=this.getDuration();this._lastDuration!==e&&(this._lastDuration=e,l(n(h.prototype),"_onDurationChange",this).call(this))}},{key:"_onProgress",value:function(){if(this.el.buffered.length){for(var e=[],t=0,r=0;r<this.el.buffered.length;r++)e=[].concat(u(e),[{start:Math.max(0,this.el.buffered.start(r)-this._playableRegionStartTime),end:Math.max(0,this.el.buffered.end(r)-this._playableRegionStartTime)}]),this.el.currentTime>=e[r].start&&this.el.currentTime<=e[r].end&&(t=r);var i={start:e[t].start,current:e[t].end,total:this.getDuration()};this.trigger(ye.PLAYBACK_PROGRESS,i,e)}}},{key:"load",value:function(e){this._stopTimeUpdateTimer(),this.options.src=e,this._setup()}},{key:"play",value:function(){!this._hls&&this._setup(),!this._manifestLoading&&!this.options.hlsPlayback.preload&&this._hls.loadSource(this.options.src),l(n(h.prototype),"play",this).call(this),this._startTimeUpdateTimer()}},{key:"pause",value:function(){this._hls&&(this.el.pause(),this.dvrEnabled&&this._updateDvr(!0))}},{key:"stop",value:function(){this._stopTimeUpdateTimer(),this._hls&&l(n(h.prototype),"stop",this).call(this),this._destroyHLSInstance()}},{key:"destroy",value:function(){this._stopTimeUpdateTimer(),this._destroyHLSInstance(),l(n(h.prototype),"destroy",this).call(this)}},{key:"_updatePlaybackType",value:function(e,t){this._playbackType=t.details.live?Fe.LIVE:Fe.VOD,this._onLevelUpdated(e,t),this._ccTracksUpdated&&this._playbackType===Fe.LIVE&&this.hasClosedCaptionsTracks&&this._onSubtitleLoaded()}},{key:"_fillLevels",value:function(){this._levels=this._hls.levels.map((function(e,t){return{id:t,level:e,label:"".concat(e.bitrate/1e3,"Kbps")}})),this.trigger(ye.PLAYBACK_LEVELS_AVAILABLE,this._levels)}},{key:"_onLevelUpdated",value:function(e,t){this._segmentTargetDuration=t.details.targetduration,this._playlistType=t.details.type||null;var r=!1,i=!1,n=t.details.fragments,a=this._playableRegionStartTime,s=this._playableRegionDuration;if(0!==n.length){if(n[0].rawProgramDateTime&&(this._programDateTime=n[0].rawProgramDateTime),this._playableRegionStartTime!==n[0].start&&(r=!0,this._playableRegionStartTime=n[0].start),r)if(this._localStartTimeCorrelation){var o=this._localStartTimeCorrelation,l=this._now-o.local,u=(o.remote+l)/1e3;u<n[0].start?this._localStartTimeCorrelation={local:this._now,remote:1e3*n[0].start}:u>a+this._extrapolatedWindowDuration&&(this._localStartTimeCorrelation={local:this._now,remote:1e3*Math.max(n[0].start,a+this._extrapolatedWindowDuration)})}else this._localStartTimeCorrelation={local:this._now,remote:1e3*(n[0].start+this._extrapolatedWindowDuration/2)};var c=t.details.totalduration;if(this._playbackType===Fe.LIVE){var d=t.details.targetduration*((this.options.playback.hlsjsConfig||{}).liveSyncDurationCount||dt.DefaultConfig.liveSyncDurationCount);d<=c?(c-=d,this._durationExcludesAfterLiveSyncPoint=!0):this._durationExcludesAfterLiveSyncPoint=!1}c!==this._playableRegionDuration&&(i=!0,this._playableRegionDuration=c);var h=n[0].start+c,f=a+s;if(h!==f)if(this._localEndTimeCorrelation){var g=this._localEndTimeCorrelation,p=this._now-g.local,v=(g.remote+p)/1e3;v>h?this._localEndTimeCorrelation={local:this._now,remote:1e3*h}:v<h-this._extrapolatedWindowDuration?this._localEndTimeCorrelation={local:this._now,remote:1e3*(h-this._extrapolatedWindowDuration)}:v>f&&(this._localEndTimeCorrelation={local:this._now,remote:1e3*f})}else this._localEndTimeCorrelation={local:this._now,remote:1e3*h};i&&this._onDurationChange(),r&&this._onProgress()}}},{key:"_onFragmentChanged",value:function(e,t){this._currentFragment=t.frag,this.trigger(ye.Custom.PLAYBACK_FRAGMENT_CHANGED,t)}},{key:"_onFragmentLoaded",value:function(e,t){this.trigger(ye.PLAYBACK_FRAGMENT_LOADED,t)}},{key:"_onSubtitleLoaded",value:function(){if(!this._ccIsSetup){this.trigger(ye.PLAYBACK_SUBTITLE_AVAILABLE);var e=this._playbackType===Fe.LIVE?-1:this.closedCaptionsTrackId;this.closedCaptionsTrackId=e,this._ccIsSetup=!0}}},{key:"_onLevelSwitch",value:function(e,t){this.levels.length||this._fillLevels(),this.trigger(ye.PLAYBACK_LEVEL_SWITCH_END),this.trigger(ye.PLAYBACK_LEVEL_SWITCH,t);var r=this._hls.levels[t.level];r&&(this.highDefinition=r.height>=720||r.bitrate/1e3>=2e3,this.trigger(ye.PLAYBACK_HIGHDEFINITIONUPDATE,this.highDefinition),this.trigger(ye.PLAYBACK_BITRATE,{height:r.height,width:r.width,bandwidth:r.bitrate,bitrate:r.bitrate,level:t.level}))}},{key:"dvrEnabled",get:function(){return this._durationExcludesAfterLiveSyncPoint&&this._duration>=this._minDvrSize&&this.getPlaybackType()===Fe.LIVE}},{key:"getPlaybackType",value:function(){return this._playbackType}},{key:"isSeekEnabled",value:function(){return this._playbackType===Fe.VOD||this.dvrEnabled}}])&&r(i.prototype,s),c&&r(i,c),Object.defineProperty(i,"prototype",{writable:!1}),h}(tt);return gt.canPlay=function(e,t){var r=e.split("?")[0].match(/.*\.(.*)$/)||[],i=r.length>1&&"m3u8"===r[1].toLowerCase()||ft(t,["application/vnd.apple.mpegurl","application/x-mpegURL"]);return!(!dt.isSupported()||!i)},gt}();
281
281
  //# sourceMappingURL=hlsjs-playback.min.js.map