@clickview/reports 0.0.2-dev.2 → 0.0.2-rc.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.
Files changed (38) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/1-reports-2075650b5e.chunk.css +16 -0
  3. package/dist/css/reports-app-5c8a0d5da0.css +45 -0
  4. package/dist/en.json +1 -1
  5. package/dist/scripts/1-2b31538f14-reports.chunk.js +1 -0
  6. package/dist/scripts/2-c8c354b8c0-reports.chunk.js +1 -0
  7. package/dist/scripts/3-b01f7b432e-reports.chunk.js +1 -0
  8. package/dist/scripts/4-c7fc2911e5-reports.chunk.js +1 -0
  9. package/dist/scripts/5-8a0ecc848d-reports.chunk.js +1 -0
  10. package/dist/scripts/reports-app-315d9e9b73.min.js +378 -0
  11. package/package.json +3 -7
  12. package/tooling/externals.js +1 -2
  13. package/dist/css/11-reports-74c9a42f03.chunk.css +0 -2
  14. package/dist/css/12-reports-74c9a42f03.chunk.css +0 -2
  15. package/dist/css/2-reports-8ef526bc74.chunk.css +0 -8
  16. package/dist/css/5-reports-3affbe91d0.chunk.css +0 -84
  17. package/dist/css/6-reports-656d11eb5d.chunk.css +0 -6
  18. package/dist/css/7-reports-3f71e5f85a.chunk.css +0 -10
  19. package/dist/css/8-reports-742cb438e5.chunk.css +0 -6
  20. package/dist/css/9-reports-7c59dcb964.chunk.css +0 -6
  21. package/dist/css/reports-app-c2e91d7241.css +0 -59
  22. package/dist/scripts/0-1e4c0b5eb9-reports.chunk.js +0 -1
  23. package/dist/scripts/1-b35f8a09fb-reports.chunk.js +0 -1
  24. package/dist/scripts/10-38e429650c-reports.chunk.js +0 -1
  25. package/dist/scripts/11-c63b1134e6-reports.chunk.js +0 -1
  26. package/dist/scripts/12-2329ffd92d-reports.chunk.js +0 -1
  27. package/dist/scripts/13-b3e42309c7-reports.chunk.js +0 -1
  28. package/dist/scripts/14-0903627f22-reports.chunk.js +0 -1
  29. package/dist/scripts/15-808d11ec5c-reports.chunk.js +0 -1
  30. package/dist/scripts/2-81d7178059-reports.chunk.js +0 -1
  31. package/dist/scripts/4-5285b07356-reports.chunk.js +0 -88
  32. package/dist/scripts/5-d961897ef1-reports.chunk.js +0 -1
  33. package/dist/scripts/6-687ac1a2b0-reports.chunk.js +0 -1
  34. package/dist/scripts/7-0e9ab45794-reports.chunk.js +0 -1
  35. package/dist/scripts/8-7f04f03332-reports.chunk.js +0 -1
  36. package/dist/scripts/9-ddf5e0bbc1-reports.chunk.js +0 -1
  37. package/dist/scripts/reports-app-eaa891590a.min.js +0 -378
  38. package/typings/libs/videojs-contrib-quality-levels.d.ts +0 -29
@@ -1,88 +0,0 @@
1
- (window.webpackJsonp_clickview_reports=window.webpackJsonp_clickview_reports||[]).push([[4],{1e3:function(t,e){var i={"":1,lr:1,rl:1},n={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function r(t){return"string"==typeof t&&(!!n[t.toLowerCase()]&&t.toLowerCase())}function s(t,e,n){this.hasBeenReset=!1;var s="",a=!1,o=t,l=e,h=n,u=null,c="",d=!0,p="auto",f="start",g="auto",m="auto",v=100,y="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(t){s=""+t}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(t){a=!!t}},startTime:{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");o=t,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");l=t,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return h},set:function(t){h=""+t,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return u},set:function(t){u=t,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return c},set:function(t){var e=function(t){return"string"==typeof t&&(!!i[t.toLowerCase()]&&t.toLowerCase())}(t);if(!1===e)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");c=e,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(t){d=!!t,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=t,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(t){var e=r(t);e?(f=e,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return g},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");g=t,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(t){var e=r(t);e?(m=e,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return v},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");v=t,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return y},set:function(t){var e=r(t);if(!e)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");y=e,this.hasBeenReset=!0}}}),this.displayState=void 0}s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},t.exports=s},1001:function(t,e){var i={"":!0,up:!0};function n(t){return"number"==typeof t&&t>=0&&t<=100}t.exports=function(){var t=100,e=3,r=0,s=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!n(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(t){if(!n(t))throw new Error("RegionAnchorX must be between 0 and 100.");s=t}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(t){if(!n(t))throw new Error("RegionAnchorY must be between 0 and 100.");r=t}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!n(t))throw new Error("ViewportAnchorY must be between 0 and 100.");o=t}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(t){if(!n(t))throw new Error("ViewportAnchorX must be between 0 and 100.");a=t}},scroll:{enumerable:!0,get:function(){return l},set:function(t){var e=function(t){return"string"==typeof t&&(!!i[t.toLowerCase()]&&t.toLowerCase())}(t);!1===e?console.warn("Scroll: an invalid or illegal string was specified."):l=e}}})}},1002:function(t,e,i){var n=i(562),r=i(1003);function s(e,i,a){return r()?(t.exports=s=Reflect.construct,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=s=function(t,e,i){var r=[null];r.push.apply(r,e);var s=new(Function.bind.apply(t,r));return i&&n(s,i.prototype),s},t.exports.default=t.exports,t.exports.__esModule=!0),s.apply(null,arguments)}t.exports=s,t.exports.default=t.exports,t.exports.__esModule=!0},1003:function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.default=t.exports,t.exports.__esModule=!0},1004:function(t,e,i){var n=i(562);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0},1005:function(t,e,i){var n,r,s,a,o;n=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,r=/^([^\/?#]*)(.*)$/,s=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(t,e,i){if(i=i||{},t=t.trim(),!(e=e.trim())){if(!i.alwaysNormalize)return t;var n=o.parseURL(t);if(!n)throw new Error("Error trying to parse base URL.");return n.path=o.normalizePath(n.path),o.buildURLFromParts(n)}var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return i.alwaysNormalize?(s.path=o.normalizePath(s.path),o.buildURLFromParts(s)):e;var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var l=r.exec(a.path);a.netLoc=l[1],a.path=l[2]}a.netLoc&&!a.path&&(a.path="/");var h={scheme:a.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(h.netLoc=a.netLoc,"/"!==s.path[0]))if(s.path){var u=a.path,c=u.substring(0,u.lastIndexOf("/")+1)+s.path;h.path=o.normalizePath(c)}else h.path=a.path,s.params||(h.params=a.params,s.query||(h.query=a.query));return null===h.path&&(h.path=i.alwaysNormalize?o.normalizePath(s.path):s.path),o.buildURLFromParts(h)},parseURL:function(t){var e=n.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(s,"");t.length!==(t=t.replace(a,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=o},1006:function(t,e,i){"use strict";
2
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */var n=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},e.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t]=this.listeners[t].slice(0),this.listeners[t].splice(i,1),i>-1},e.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var i=e.length,n=0;n<i;++n)e[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=e.length,a=0;a<s;++a)e[a].apply(this,r)},e.dispose=function(){this.listeners={}},e.pipe=function(t){this.on("data",(function(e){t.push(e)}))},t}();t.exports=n},1007:function(t,e,i){"use strict";(function(t){
3
- /*!
4
- * The buffer module from node.js, for the browser.
5
- *
6
- * @author Feross Aboukhadijeh <http://feross.org>
7
- * @license MIT
8
- */
9
- var n=i(1008),r=i(1009),s=i(1010);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=l.prototype:(null===t&&(t=new l(e)),t.length=e),t}function l(t,e,i){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(t,e,i);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return h(this,t,e,i)}function h(t,e,i,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,i,n){if(e.byteLength,i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===i&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,i):new Uint8Array(e,i,n);l.TYPED_ARRAY_SUPPORT?(t=e).__proto__=l.prototype:t=d(t,e);return t}(t,e,i,n):"string"==typeof e?function(t,e,i){"string"==typeof i&&""!==i||(i="utf8");if(!l.isEncoding(i))throw new TypeError('"encoding" must be a valid string encoding');var n=0|f(e,i),r=(t=o(t,n)).write(e,i);r!==n&&(t=t.slice(0,r));return t}(t,e,i):function(t,e){if(l.isBuffer(e)){var i=0|p(e.length);return 0===(t=o(t,i)).length||e.copy(t,0,0,i),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?o(t,0):d(t,e);if("Buffer"===e.type&&s(e.data))return d(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e){if(u(e),t=o(t,e<0?0:0|p(e)),!l.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)t[i]=0;return t}function d(t,e){var i=e.length<0?0:0|p(e.length);t=o(t,i);for(var n=0;n<i;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function f(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var i=t.length;if(0===i)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return W(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,i){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,i);case"utf8":case"utf-8":return C(this,e,i);case"ascii":return E(this,e,i);case"latin1":case"binary":return A(this,e,i);case"base64":return k(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,i);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function v(t,e,i,n,r){if(0===t.length)return-1;if("string"==typeof i?(n=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(r)return-1;i=t.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:y(t,e,i,n,r);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):y(t,[e],i,n,r);throw new TypeError("val must be string, number or Buffer")}function y(t,e,i,n,r){var s,a=1,o=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,o/=2,l/=2,i/=2}function h(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(r){var u=-1;for(s=i;s<o;s++)if(h(t,s)===h(e,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===l)return u*a}else-1!==u&&(s-=s-u),u=-1}else for(i+l>o&&(i=o-l),s=i;s>=0;s--){for(var c=!0,d=0;d<l;d++)if(h(t,s+d)!==h(e,d)){c=!1;break}if(c)return s}return-1}function b(t,e,i,n){i=Number(i)||0;var r=t.length-i;n?(n=Number(n))>r&&(n=r):n=r;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a<n;++a){var o=parseInt(e.substr(2*a,2),16);if(isNaN(o))return a;t[i+a]=o}return a}function _(t,e,i,n){return z(F(e,t.length-i),t,i,n)}function T(t,e,i,n){return z(function(t){for(var e=[],i=0;i<t.length;++i)e.push(255&t.charCodeAt(i));return e}(e),t,i,n)}function x(t,e,i,n){return T(t,e,i,n)}function S(t,e,i,n){return z(W(e),t,i,n)}function w(t,e,i,n){return z(function(t,e){for(var i,n,r,s=[],a=0;a<t.length&&!((e-=2)<0);++a)i=t.charCodeAt(a),n=i>>8,r=i%256,s.push(r),s.push(n);return s}(e,t.length-i),t,i,n)}function k(t,e,i){return 0===e&&i===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,i))}function C(t,e,i){i=Math.min(t.length,i);for(var n=[],r=e;r<i;){var s,a,o,l,h=t[r],u=null,c=h>239?4:h>223?3:h>191?2:1;if(r+c<=i)switch(c){case 1:h<128&&(u=h);break;case 2:128==(192&(s=t[r+1]))&&(l=(31&h)<<6|63&s)>127&&(u=l);break;case 3:s=t[r+1],a=t[r+2],128==(192&s)&&128==(192&a)&&(l=(15&h)<<12|(63&s)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:s=t[r+1],a=t[r+2],o=t[r+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(l=(15&h)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(u=l)}null===u?(u=65533,c=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),r+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var i="",n=0;for(;n<e;)i+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return i}(n)}e.Buffer=l,e.SlowBuffer=function(t){+t!=t&&(t=0);return l.alloc(+t)},e.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),l.poolSize=8192,l._augment=function(t){return t.__proto__=l.prototype,t},l.from=function(t,e,i){return h(null,t,e,i)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(t,e,i){return function(t,e,i,n){return u(e),e<=0?o(t,e):void 0!==i?"string"==typeof n?o(t,e).fill(i,n):o(t,e).fill(i):o(t,e)}(null,t,e,i)},l.allocUnsafe=function(t){return c(null,t)},l.allocUnsafeSlow=function(t){return c(null,t)},l.isBuffer=function(t){return!(null==t||!t._isBuffer)},l.compare=function(t,e){if(!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var i=t.length,n=e.length,r=0,s=Math.min(i,n);r<s;++r)if(t[r]!==e[r]){i=t[r],n=e[r];break}return i<n?-1:n<i?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!s(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var i;if(void 0===e)for(e=0,i=0;i<t.length;++i)e+=t[i].length;var n=l.allocUnsafe(e),r=0;for(i=0;i<t.length;++i){var a=t[i];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,r),r+=a.length}return n},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},l.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):g.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",i=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),"<Buffer "+t+">"},l.prototype.compare=function(t,e,i,n,r){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),e<0||i>t.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&e>=i)return 0;if(n>=r)return-1;if(e>=i)return 1;if(this===t)return 0;for(var s=(r>>>=0)-(n>>>=0),a=(i>>>=0)-(e>>>=0),o=Math.min(s,a),h=this.slice(n,r),u=t.slice(e,i),c=0;c<o;++c)if(h[c]!==u[c]){s=h[c],a=u[c];break}return s<a?-1:a<s?1:0},l.prototype.includes=function(t,e,i){return-1!==this.indexOf(t,e,i)},l.prototype.indexOf=function(t,e,i){return v(this,t,e,i,!0)},l.prototype.lastIndexOf=function(t,e,i){return v(this,t,e,i,!1)},l.prototype.write=function(t,e,i,n){if(void 0===e)n="utf8",i=this.length,e=0;else if(void 0===i&&"string"==typeof e)n=e,i=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(i)?(i|=0,void 0===n&&(n="utf8")):(n=i,i=void 0)}var r=this.length-e;if((void 0===i||i>r)&&(i=r),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return b(this,t,e,i);case"utf8":case"utf-8":return _(this,t,e,i);case"ascii":return T(this,t,e,i);case"latin1":case"binary":return x(this,t,e,i);case"base64":return S(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(t,e,i){var n="";i=Math.min(t.length,i);for(var r=e;r<i;++r)n+=String.fromCharCode(127&t[r]);return n}function A(t,e,i){var n="";i=Math.min(t.length,i);for(var r=e;r<i;++r)n+=String.fromCharCode(t[r]);return n}function P(t,e,i){var n=t.length;(!e||e<0)&&(e=0),(!i||i<0||i>n)&&(i=n);for(var r="",s=e;s<i;++s)r+=U(t[s]);return r}function O(t,e,i){for(var n=t.slice(e,i),r="",s=0;s<n.length;s+=2)r+=String.fromCharCode(n[s]+256*n[s+1]);return r}function L(t,e,i){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>i)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,i,n,r,s){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<s)throw new RangeError('"value" argument is out of bounds');if(i+n>t.length)throw new RangeError("Index out of range")}function I(t,e,i,n){e<0&&(e=65535+e+1);for(var r=0,s=Math.min(t.length-i,2);r<s;++r)t[i+r]=(e&255<<8*(n?r:1-r))>>>8*(n?r:1-r)}function D(t,e,i,n){e<0&&(e=4294967295+e+1);for(var r=0,s=Math.min(t.length-i,4);r<s;++r)t[i+r]=e>>>8*(n?r:3-r)&255}function R(t,e,i,n,r,s){if(i+n>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function N(t,e,i,n,s){return s||R(t,0,i,4),r.write(t,e,i,n,23,4),i+4}function B(t,e,i,n,s){return s||R(t,0,i,8),r.write(t,e,i,n,52,8),i+8}l.prototype.slice=function(t,e){var i,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),l.TYPED_ARRAY_SUPPORT)(i=this.subarray(t,e)).__proto__=l.prototype;else{var r=e-t;i=new l(r,void 0);for(var s=0;s<r;++s)i[s]=this[s+t]}return i},l.prototype.readUIntLE=function(t,e,i){t|=0,e|=0,i||L(t,e,this.length);for(var n=this[t],r=1,s=0;++s<e&&(r*=256);)n+=this[t+s]*r;return n},l.prototype.readUIntBE=function(t,e,i){t|=0,e|=0,i||L(t,e,this.length);for(var n=this[t+--e],r=1;e>0&&(r*=256);)n+=this[t+--e]*r;return n},l.prototype.readUInt8=function(t,e){return e||L(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||L(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||L(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,i){t|=0,e|=0,i||L(t,e,this.length);for(var n=this[t],r=1,s=0;++s<e&&(r*=256);)n+=this[t+s]*r;return n>=(r*=128)&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,i){t|=0,e|=0,i||L(t,e,this.length);for(var n=e,r=1,s=this[t+--n];n>0&&(r*=256);)s+=this[t+--n]*r;return s>=(r*=128)&&(s-=Math.pow(2,8*e)),s},l.prototype.readInt8=function(t,e){return e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||L(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt16BE=function(t,e){e||L(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},l.prototype.readInt32LE=function(t,e){return e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||L(t,4,this.length),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||L(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||L(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||L(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,i,n){(t=+t,e|=0,i|=0,n)||M(this,t,e,i,Math.pow(2,8*i)-1,0);var r=1,s=0;for(this[e]=255&t;++s<i&&(r*=256);)this[e+s]=t/r&255;return e+i},l.prototype.writeUIntBE=function(t,e,i,n){(t=+t,e|=0,i|=0,n)||M(this,t,e,i,Math.pow(2,8*i)-1,0);var r=i-1,s=1;for(this[e+r]=255&t;--r>=0&&(s*=256);)this[e+r]=t/s&255;return e+i},l.prototype.writeUInt8=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,i,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*i-1);M(this,t,e,i,r-1,-r)}var s=0,a=1,o=0;for(this[e]=255&t;++s<i&&(a*=256);)t<0&&0===o&&0!==this[e+s-1]&&(o=1),this[e+s]=(t/a>>0)-o&255;return e+i},l.prototype.writeIntBE=function(t,e,i,n){if(t=+t,e|=0,!n){var r=Math.pow(2,8*i-1);M(this,t,e,i,r-1,-r)}var s=i-1,a=1,o=0;for(this[e+s]=255&t;--s>=0&&(a*=256);)t<0&&0===o&&0!==this[e+s+1]&&(o=1),this[e+s]=(t/a>>0)-o&255;return e+i},l.prototype.writeInt8=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,i){return t=+t,e|=0,i||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,i){return N(this,t,e,!0,i)},l.prototype.writeFloatBE=function(t,e,i){return N(this,t,e,!1,i)},l.prototype.writeDoubleLE=function(t,e,i){return B(this,t,e,!0,i)},l.prototype.writeDoubleBE=function(t,e,i){return B(this,t,e,!1,i)},l.prototype.copy=function(t,e,i,n){if(i||(i=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<i&&(n=i),n===i)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-i&&(n=t.length-e+i);var r,s=n-i;if(this===t&&i<e&&e<n)for(r=s-1;r>=0;--r)t[r+e]=this[r+i];else if(s<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r<s;++r)t[r+e]=this[r+i];else Uint8Array.prototype.set.call(t,this.subarray(i,i+s),e);return s},l.prototype.fill=function(t,e,i,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,i=this.length):"string"==typeof i&&(n=i,i=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<i)throw new RangeError("Out of range index");if(i<=e)return this;var s;if(e>>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(s=e;s<i;++s)this[s]=t;else{var a=l.isBuffer(t)?t:F(new l(t,n).toString()),o=a.length;for(s=0;s<i-e;++s)this[s+e]=a[s%o]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var i;e=e||1/0;for(var n=t.length,r=null,s=[],a=0;a<n;++a){if((i=t.charCodeAt(a))>55295&&i<57344){if(!r){if(i>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&s.push(239,191,189);continue}r=i;continue}if(i<56320){(e-=3)>-1&&s.push(239,191,189),r=i;continue}i=65536+(r-55296<<10|i-56320)}else r&&(e-=3)>-1&&s.push(239,191,189);if(r=null,i<128){if((e-=1)<0)break;s.push(i)}else if(i<2048){if((e-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return s}function W(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,i,n){for(var r=0;r<n&&!(r+i>=e.length||r>=t.length);++r)e[r+i]=t[r];return r}}).call(this,i(59))},1008:function(t,e,i){"use strict";e.byteLength=function(t){var e=h(t),i=e[0],n=e[1];return 3*(i+n)/4-n},e.toByteArray=function(t){var e,i,n=h(t),a=n[0],o=n[1],l=new s(function(t,e,i){return 3*(e+i)/4-i}(0,a,o)),u=0,c=o>0?a-4:a;for(i=0;i<c;i+=4)e=r[t.charCodeAt(i)]<<18|r[t.charCodeAt(i+1)]<<12|r[t.charCodeAt(i+2)]<<6|r[t.charCodeAt(i+3)],l[u++]=e>>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===o&&(e=r[t.charCodeAt(i)]<<2|r[t.charCodeAt(i+1)]>>4,l[u++]=255&e);1===o&&(e=r[t.charCodeAt(i)]<<10|r[t.charCodeAt(i+1)]<<4|r[t.charCodeAt(i+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},e.fromByteArray=function(t){for(var e,i=t.length,r=i%3,s=[],a=0,o=i-r;a<o;a+=16383)s.push(u(t,a,a+16383>o?o:a+16383));1===r?(e=t[i-1],s.push(n[e>>2]+n[e<<4&63]+"==")):2===r&&(e=(t[i-2]<<8)+t[i-1],s.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return s.join("")};for(var n=[],r=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=a.length;o<l;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function h(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");return-1===i&&(i=e),[i,i===e?0:4-i%4]}function u(t,e,i){for(var r,s,a=[],o=e;o<i;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),a.push(n[(s=r)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},1009:function(t,e){
10
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
11
- e.read=function(t,e,i,n,r){var s,a,o=8*r-n-1,l=(1<<o)-1,h=l>>1,u=-7,c=i?r-1:0,d=i?-1:1,p=t[e+c];for(c+=d,s=p&(1<<-u)-1,p>>=-u,u+=o;u>0;s=256*s+t[e+c],c+=d,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=n;u>0;a=256*a+t[e+c],c+=d,u-=8);if(0===s)s=1-h;else{if(s===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),s-=h}return(p?-1:1)*a*Math.pow(2,s-n)},e.write=function(t,e,i,n,r,s){var a,o,l,h=8*s-r-1,u=(1<<h)-1,c=u>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,f=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+c>=1?d/l:d*Math.pow(2,1-c))*l>=2&&(a++,l/=2),a+c>=u?(o=0,a=u):a+c>=1?(o=(e*l-1)*Math.pow(2,r),a+=c):(o=e*Math.pow(2,c-1)*Math.pow(2,r),a=0));r>=8;t[i+p]=255&o,p+=f,o/=256,r-=8);for(a=a<<r|o,h+=r;h>0;t[i+p]=255&a,p+=f,a/=256,h-=8);t[i+p-f]|=128*g}},1010:function(t,e){var i={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==i.call(t)}},1011:function(t,e,i){"use strict";
12
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(e,"__esModule",{value:!0});var n=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,r=/^application\/dash\+xml/i;e.simpleTypeFromSourceType=function(t){return n.test(t)?"hls":r.test(t)?"dash":"application/vnd.videojs.vhs+json"===t?"vhs-json":null}},1012:function(t,e,i){function n(t){this.options=t||{locator:{}}}function r(){this.cdata=!1}function s(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function a(t){if(t)return"\n@"+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function o(t,e,i){return"string"==typeof t?t.substr(e,i):t.length>=e+i||e?new java.lang.String(t,e,i)+"":t}function l(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}n.prototype.parseFromString=function(t,e){var i=this.options,n=new h,s=i.domBuilder||new r,o=i.errorHandler,l=i.locator,u=i.xmlns||{},c={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return l&&s.setDocumentLocator(l),n.errorHandler=function(t,e,i){if(!t){if(e instanceof r)return e;t=e}var n={},s=t instanceof Function;function o(e){var r=t[e];!r&&s&&(r=2==t.length?function(i){t(e,i)}:t),n[e]=r&&function(t){r("[xmldom "+e+"]\t"+t+a(i))}||function(){}}return i=i||{},o("warning"),o("error"),o("fatalError"),n}(o,s,l),n.domBuilder=i.domBuilder||s,/\/x?html?$/.test(e)&&(c.nbsp=" ",c.copy="©",u[""]="http://www.w3.org/1999/xhtml"),u.xml=u.xml||"http://www.w3.org/XML/1998/namespace",t?n.parse(t,u,c):n.errorHandler.error("invalid doc source"),s.doc},r.prototype={startDocument:function(){this.doc=(new u).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,i,n){var r=this.doc,a=r.createElementNS(t,i||e),o=n.length;l(this,a),this.currentElement=a,this.locator&&s(this.locator,a);for(var h=0;h<o;h++){t=n.getURI(h);var u=n.getValue(h),c=(i=n.getQName(h),r.createAttributeNS(t,i));this.locator&&s(n.getLocator(h),c),c.value=c.nodeValue=u,a.setAttributeNode(c)}},endElement:function(t,e,i){var n=this.currentElement;n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var i=this.doc.createProcessingInstruction(t,e);this.locator&&s(this.locator,i),l(this,i)},ignorableWhitespace:function(t,e,i){},characters:function(t,e,i){if(t=o.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(t);else n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&s(this.locator,n)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,i){t=o.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&s(this.locator,n),l(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,i){var n=this.doc.implementation;if(n&&n.createDocumentType){var r=n.createDocumentType(t,e,i);this.locator&&s(this.locator,r),l(this,r)}},warning:function(t){console.warn("[xmldom warning]\t"+t,a(this.locator))},error:function(t){console.error("[xmldom error]\t"+t,a(this.locator))},fatalError:function(t){throw console.error("[xmldom fatalError]\t"+t,a(this.locator)),t}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(t){r.prototype[t]=function(){return null}}));var h=i(1013).XMLReader,u=e.DOMImplementation=i(944).DOMImplementation;e.XMLSerializer=i(944).XMLSerializer,e.DOMParser=n},1013:function(t,e){var i=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,n=new RegExp("[\\-\\.0-9"+i.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),r=new RegExp("^"+i.source+n.source+"*(?::"+i.source+n.source+"*)?$");function s(){}function a(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function o(t,e,i,n,r,s){for(var a,o=++e,l=0;;){var h=t.charAt(o);switch(h){case"=":if(1===l)a=t.slice(e,o),l=3;else{if(2!==l)throw new Error("attribute equal must after attrName");l=3}break;case"'":case'"':if(3===l||1===l){if(1===l&&(s.warning('attribute value must after "="'),a=t.slice(e,o)),e=o+1,!((o=t.indexOf(h,e))>0))throw new Error("attribute value no end '"+h+"' match");u=t.slice(e,o).replace(/&#?\w+;/g,r),i.add(a,u,e-1),l=5}else{if(4!=l)throw new Error('attribute value must after "="');u=t.slice(e,o).replace(/&#?\w+;/g,r),i.add(a,u,e),s.warning('attribute "'+a+'" missed start quot('+h+")!!"),e=o+1,l=5}break;case"/":switch(l){case 0:i.setTagName(t.slice(e,o));case 5:case 6:case 7:l=7,i.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),0==l&&i.setTagName(t.slice(e,o)),o;case">":switch(l){case 0:i.setTagName(t.slice(e,o));case 5:case 6:case 7:break;case 4:case 1:"/"===(u=t.slice(e,o)).slice(-1)&&(i.closed=!0,u=u.slice(0,-1));case 2:2===l&&(u=a),4==l?(s.warning('attribute "'+u+'" missed quot(")!!'),i.add(a,u.replace(/&#?\w+;/g,r),e)):("http://www.w3.org/1999/xhtml"===n[""]&&u.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),i.add(u,u,e));break;case 3:throw new Error("attribute value missed!!")}return o;case"€":h=" ";default:if(h<=" ")switch(l){case 0:i.setTagName(t.slice(e,o)),l=6;break;case 1:a=t.slice(e,o),l=2;break;case 4:var u=t.slice(e,o).replace(/&#?\w+;/g,r);s.warning('attribute "'+u+'" missed quot(")!!'),i.add(a,u,e);case 5:l=6}else switch(l){case 2:i.tagName;"http://www.w3.org/1999/xhtml"===n[""]&&a.match(/^(?:disabled|checked|selected)$/i)||s.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),i.add(a,a,e),e=o,l=1;break;case 5:s.warning('attribute space is required"'+a+'"!!');case 6:l=1,e=o;break;case 3:l=4,e=o;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}o++}}function l(t,e,i){for(var n=t.tagName,r=null,s=t.length;s--;){var a=t[s],o=a.qName,l=a.value;if((p=o.indexOf(":"))>0)var h=a.prefix=o.slice(0,p),u=o.slice(p+1),d="xmlns"===h&&u;else u=o,h=null,d="xmlns"===o&&"";a.localName=u,!1!==d&&(null==r&&(r={},c(i,i={})),i[d]=r[d]=l,a.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(d,l))}for(s=t.length;s--;){(h=(a=t[s]).prefix)&&("xml"===h&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==h&&(a.uri=i[h||""]))}var p;(p=n.indexOf(":"))>0?(h=t.prefix=n.slice(0,p),u=t.localName=n.slice(p+1)):(h=null,u=t.localName=n);var f=t.uri=i[h||""];if(e.startElement(f,u,n,t),!t.closed)return t.currentNSMap=i,t.localNSMap=r,!0;if(e.endElement(f,u,n),r)for(h in r)e.endPrefixMapping(h)}function h(t,e,i,n,r){if(/^(?:script|textarea)$/i.test(i)){var s=t.indexOf("</"+i+">",e),a=t.substring(e+1,s);if(/[&<]/.test(a))return/^script$/i.test(i)?(r.characters(a,0,a.length),s):(a=a.replace(/&#?\w+;/g,n),r.characters(a,0,a.length),s)}return e+1}function u(t,e,i,n){var r=n[i];return null==r&&((r=t.lastIndexOf("</"+i+">"))<e&&(r=t.lastIndexOf("</"+i)),n[i]=r),r<e}function c(t,e){for(var i in t)e[i]=t[i]}function d(t,e,i,n){switch(t.charAt(e+2)){case"-":return"-"===t.charAt(e+3)?(r=t.indexOf("--\x3e",e+4))>e?(i.comment(t,e+4,r-e-4),r+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==t.substr(e+3,6)){var r=t.indexOf("]]>",e+9);return i.startCDATA(),i.characters(t,e+9,r-e-9),i.endCDATA(),r+3}var s=function(t,e){var i,n=[],r=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;r.lastIndex=e,r.exec(t);for(;i=r.exec(t);)if(n.push(i),i[1])return n}(t,e),a=s.length;if(a>1&&/!doctype/i.test(s[0][0])){var o=s[1][0],l=a>3&&/^public$/i.test(s[2][0])&&s[3][0],h=a>4&&s[4][0],u=s[a-1];return i.startDTD(o,l&&l.replace(/^(['"])(.*?)\1$/,"$2"),h&&h.replace(/^(['"])(.*?)\1$/,"$2")),i.endDTD(),u.index+u[0].length}}return-1}function p(t,e,i){var n=t.indexOf("?>",e);if(n){var r=t.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(r){r[0].length;return i.processingInstruction(r[1],r[2]),n+2}return-1}return-1}function f(t){}function g(t,e){return t.__proto__=e,t}s.prototype={parse:function(t,e,i){var n=this.domBuilder;n.startDocument(),c(e,e={}),function(t,e,i,n,r){function s(t){var e=t.slice(1,-1);return e in i?i[e]:"#"===e.charAt(0)?function(t){if(t>65535){var e=55296+((t-=65536)>>10),i=56320+(1023&t);return String.fromCharCode(e,i)}return String.fromCharCode(t)}(parseInt(e.substr(1).replace("x","0x"))):(r.error("entity not found:"+t),t)}function c(e){if(e>x){var i=t.substring(x,e).replace(/&#?\w+;/g,s);b&&g(x),n.characters(i,0,e-x),x=e}}function g(e,i){for(;e>=v&&(i=y.exec(t));)m=i.index,v=m+i[0].length,b.lineNumber++;b.columnNumber=e-m+1}var m=0,v=0,y=/.*(?:\r\n?|\n)|.*$/g,b=n.locator,_=[{currentNSMap:e}],T={},x=0;for(;;){try{var S=t.indexOf("<",x);if(S<0){if(!t.substr(x).match(/^\s*$/)){var w=n.doc,k=w.createTextNode(t.substr(x));w.appendChild(k),n.currentElement=k}return}switch(S>x&&c(S),t.charAt(S+1)){case"/":var C=t.indexOf(">",S+3),E=t.substring(S+2,C),A=_.pop();C<0?(E=t.substring(S+2).replace(/[\s<].*/,""),r.error("end tag name: "+E+" is not complete:"+A.tagName),C=S+1+E.length):E.match(/\s</)&&(E=E.replace(/[\s<].*/,""),r.error("end tag name: "+E+" maybe not complete"),C=S+1+E.length);var P=A.localNSMap,O=A.tagName==E;if(O||A.tagName&&A.tagName.toLowerCase()==E.toLowerCase()){if(n.endElement(A.uri,A.localName,E),P)for(var L in P)n.endPrefixMapping(L);O||r.fatalError("end tag name: "+E+" is not match the current start tagName:"+A.tagName)}else _.push(A);C++;break;case"?":b&&g(S),C=p(t,S,n);break;case"!":b&&g(S),C=d(t,S,n,r);break;default:b&&g(S);var M=new f,I=_[_.length-1].currentNSMap,D=(C=o(t,S,M,I,s,r),M.length);if(!M.closed&&u(t,C,M.tagName,T)&&(M.closed=!0,i.nbsp||r.warning("unclosed xml attribute")),b&&D){for(var R=a(b,{}),N=0;N<D;N++){var B=M[N];g(B.offset),B.locator=a(b,{})}n.locator=R,l(M,n,I)&&_.push(M),n.locator=b}else l(M,n,I)&&_.push(M);"http://www.w3.org/1999/xhtml"!==M.uri||M.closed?C++:C=h(t,C,M.tagName,s,n)}}catch(t){r.error("element parse error: "+t),C=-1}C>x?x=C:c(Math.max(S,x)+1)}}(t,e,i,n,this.errorHandler),n.endDocument()}},f.prototype={setTagName:function(t){if(!r.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},add:function(t,e,i){if(!r.test(t))throw new Error("invalid attribute:"+t);this[this.length++]={qName:t,value:e,offset:i}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},g({},g.prototype)instanceof g||(g=function(t,e){function i(){}for(e in i.prototype=e,i=new i,t)i[e]=t[e];return i}),e.XMLReader=s},1014:function(t,e){var i=Math.pow(2,32);t.exports=function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:e.getUint32(4),timescale:e.getUint32(8)},r=12;0===n.version?(n.earliestPresentationTime=e.getUint32(r),n.firstOffset=e.getUint32(r+4),r+=8):(n.earliestPresentationTime=e.getUint32(r)*i+e.getUint32(r+4),n.firstOffset=e.getUint32(r+8)*i+e.getUint32(r+12),r+=16),r+=2;var s=e.getUint16(r);for(r+=2;s>0;r+=12,s--)n.references.push({referenceType:(128&t[r])>>>7,referencedSize:2147483647&e.getUint32(r),subsegmentDuration:e.getUint32(r+4),startsWithSap:!!(128&t[r+8]),sapType:(112&t[r+8])>>>4,sapDeltaTime:268435455&e.getUint32(r+8)});return n}},1015:function(t,e,i){"use strict";
13
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return t instanceof Uint8Array?t:new Uint8Array(t&&t.buffer||t,t&&t.byteOffset||0,t&&t.byteLength||0)},r=function(t){if(!t)return"";t=Array.prototype.slice.call(t);var e=String.fromCharCode.apply(null,n(t));try{return decodeURIComponent(escape(e))}catch(t){}return e},s=function(t,e){void 0===e&&(e=0);var i=(t=n(t))[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return(16&t[e+5])>>4?i+20:i+10},a=function t(e,i){return void 0===i&&(i=0),(e=n(e)).length-i<10||"ID3"!==r(e.subarray(i,i+3))?i:t(e,i+=s(e,i))},o={aac:function(t){var e=a(t);return t.length>=e+2&&255==(255&t[e])&&224==(224&t[e+1])&&16==(22&t[e+1])},mp3:function(t){var e=a(t);return t.length>=e+2&&255==(255&t[e])&&224==(224&t[e+1])&&2==(6&t[e+1])},webm:function(t){return t.length>=4&&26==(255&t[0])&&69==(255&t[1])&&223==(255&t[2])&&163==(255&t[3])},mp4:function(t){return t.length>=8&&/^(f|s)typ$/.test(r(t.subarray(4,8)))&&!/^ftyp3g$/.test(r(t.subarray(4,10)))},"3gp":function(t){return t.length>=10&&/^ftyp3g$/.test(r(t.subarray(4,10)))},ts:function(t){if(t.length<189&&t.length>=1)return 71===t[0];for(var e=0;e+188<t.length&&e<188;){if(71===t[e]&&71===t[e+188])return!0;e+=1}return!1},flac:function(t){return t.length>=4&&/^fLaC$/.test(r(t.subarray(0,4)))},ogg:function(t){return t.length>=4&&/^OggS$/.test(r(t.subarray(0,4)))}},l=Object.keys(o).filter((function(t){return"ts"!==t})).concat("ts");l.forEach((function(t){var e=o[t];o[t]=function(t){return e(n(t))}}));e.detectContainerForBytes=function(t){t=n(t);for(var e=0;e<l.length;e++){var i=l[e];if(o[i](t))return i}return""},e.getId3Offset=a,e.id3Size=s,e.isLikely=o,e.isLikelyFmp4MediaSegment=function(t){t=n(t);for(var e=0;e<t.length;){var i=(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0;if("moof"===r(t.subarray(e+4,e+8)))return!0;0===i||i+e>t.length?e=t.length:e+=i}return!1}},1016:function(t,e,i){"use strict";
14
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return t instanceof Uint8Array?t:new Uint8Array(t&&t.buffer||t,t&&t.byteOffset||0,t&&t.byteLength||0)};e.bytesToString=function(t){if(!t)return"";t=Array.prototype.slice.call(t);var e=String.fromCharCode.apply(null,n(t));try{return decodeURIComponent(escape(e))}catch(t){}return e},e.concatTypedArrays=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var r=e.reduce((function(t,e){return t+=e&&(e.byteLength||e.length)||0}),0),s=new Uint8Array(r),a=0;return e.forEach((function(t){t=n(t),s.set(t,a),a+=t.byteLength})),s},e.isTypedArray=function(t){return ArrayBuffer.isView(t)},e.stringToBytes=function(t,e){void 0===e&&(e=!1);return"string"!=typeof t&&t&&"function"==typeof t.toString&&(t=t.toString()),"string"!=typeof t?[]:(e||(t=unescape(encodeURIComponent(t))),t.split("").map((function(t){return 255&t.charCodeAt(0)})))},e.toUint8=n},1017:function(t,e,i){"use strict";var n=i(945),r=i(1018).handleRollover,s={};s.ts=i(1020),s.aac=i(1021);var a=i(946).ONE_SECOND_IN_TS,o=function(t,e,i){for(var n,r,a,o,l=0,h=188,u=!1;h<=t.byteLength;)if(71!==t[l]||71!==t[h]&&h!==t.byteLength)l++,h++;else{switch(n=t.subarray(l,h),s.ts.parseType(n,e.pid)){case"pes":r=s.ts.parsePesType(n,e.table),a=s.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&a&&(o=s.ts.parsePesTime(n))&&(o.type="audio",i.audio.push(o),u=!0)}if(u)break;l+=188,h+=188}for(l=(h=t.byteLength)-188,u=!1;l>=0;)if(71!==t[l]||71!==t[h]&&h!==t.byteLength)l--,h--;else{switch(n=t.subarray(l,h),s.ts.parseType(n,e.pid)){case"pes":r=s.ts.parsePesType(n,e.table),a=s.ts.parsePayloadUnitStartIndicator(n),"audio"===r&&a&&(o=s.ts.parsePesTime(n))&&(o.type="audio",i.audio.push(o),u=!0)}if(u)break;l-=188,h-=188}},l=function(t,e,i){for(var n,r,a,o,l,h,u,c=0,d=188,p=!1,f={data:[],size:0};d<t.byteLength;)if(71!==t[c]||71!==t[d])c++,d++;else{switch(n=t.subarray(c,d),s.ts.parseType(n,e.pid)){case"pes":if(r=s.ts.parsePesType(n,e.table),a=s.ts.parsePayloadUnitStartIndicator(n),"video"===r&&(a&&!p&&(o=s.ts.parsePesTime(n))&&(o.type="video",i.video.push(o),p=!0),!i.firstKeyFrame)){if(a&&0!==f.size){for(l=new Uint8Array(f.size),h=0;f.data.length;)u=f.data.shift(),l.set(u,h),h+=u.byteLength;if(s.ts.videoPacketContainsKeyFrame(l)){var g=s.ts.parsePesTime(l);g?(i.firstKeyFrame=g,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}f.size=0}f.data.push(n),f.size+=n.byteLength}}if(p&&i.firstKeyFrame)break;c+=188,d+=188}for(c=(d=t.byteLength)-188,p=!1;c>=0;)if(71!==t[c]||71!==t[d])c--,d--;else{switch(n=t.subarray(c,d),s.ts.parseType(n,e.pid)){case"pes":r=s.ts.parsePesType(n,e.table),a=s.ts.parsePayloadUnitStartIndicator(n),"video"===r&&a&&(o=s.ts.parsePesTime(n))&&(o.type="video",i.video.push(o),p=!0)}if(p)break;c-=188,d-=188}},h=function(t){var e={pid:null,table:null},i={};for(var r in function(t,e){for(var i,n=0,r=188;r<t.byteLength;)if(71!==t[n]||71!==t[r])n++,r++;else{switch(i=t.subarray(n,r),s.ts.parseType(i,e.pid)){case"pat":e.pid||(e.pid=s.ts.parsePat(i));break;case"pmt":e.table||(e.table=s.ts.parsePmt(i))}if(e.pid&&e.table)return;n+=188,r+=188}}(t,e),e.table){if(e.table.hasOwnProperty(r))switch(e.table[r]){case n.H264_STREAM_TYPE:i.video=[],l(t,e,i),0===i.video.length&&delete i.video;break;case n.ADTS_STREAM_TYPE:i.audio=[],o(t,e,i),0===i.audio.length&&delete i.audio}}return i};t.exports={inspect:function(t,e){var i;return(i=s.aac.isLikelyAacData(t)?function(t){for(var e,i=!1,n=0,r=null,o=null,l=0,h=0;t.length-h>=3;){switch(s.aac.parseType(t,h)){case"timed-metadata":if(t.length-h<10){i=!0;break}if((l=s.aac.parseId3TagSize(t,h))>t.length){i=!0;break}null===o&&(e=t.subarray(h,h+l),o=s.aac.parseAacTimestamp(e)),h+=l;break;case"audio":if(t.length-h<7){i=!0;break}if((l=s.aac.parseAdtsSize(t,h))>t.length){i=!0;break}null===r&&(e=t.subarray(h,h+l),r=s.aac.parseSampleRate(e)),n++,h+=l;break;default:h++}if(i)return null}if(null===r||null===o)return null;var u=a/r;return{audio:[{type:"audio",dts:o,pts:o},{type:"audio",dts:o+1024*n*u,pts:o+1024*n*u}]}}(t):h(t))&&(i.audio||i.video)?(function(t,e){if(t.audio&&t.audio.length){var i=e;void 0===i&&(i=t.audio[0].dts),t.audio.forEach((function(t){t.dts=r(t.dts,i),t.pts=r(t.pts,i),t.dtsTime=t.dts/a,t.ptsTime=t.pts/a}))}if(t.video&&t.video.length){var n=e;if(void 0===n&&(n=t.video[0].dts),t.video.forEach((function(t){t.dts=r(t.dts,n),t.pts=r(t.pts,n),t.dtsTime=t.dts/a,t.ptsTime=t.pts/a})),t.firstKeyFrame){var s=t.firstKeyFrame;s.dts=r(s.dts,n),s.pts=r(s.pts,n),s.dtsTime=s.dts/a,s.ptsTime=s.dts/a}}}(i,e),i):null},parseAudioPes_:o}},1018:function(t,e,i){"use strict";var n=i(1019),r=function(t,e){var i=1;for(t>e&&(i=-1);Math.abs(e-t)>4294967296;)t+=8589934592*i;return t},s=function(t){var e,i;s.prototype.init.call(this),this.type_=t||"shared",this.push=function(t){"shared"!==this.type_&&t.type!==this.type_||(void 0===i&&(i=t.dts),t.dts=r(t.dts,i),t.pts=r(t.pts,i),e=t.dts,this.trigger("data",t))},this.flush=function(){i=e,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,e=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};s.prototype=new n,t.exports={TimestampRolloverStream:s,handleRollover:r}},1019:function(t,e,i){"use strict";var n=function(){this.init=function(){var t={};this.on=function(e,i){t[e]||(t[e]=[]),t[e]=t[e].concat(i)},this.off=function(e,i){var n;return!!t[e]&&(n=t[e].indexOf(i),t[e]=t[e].slice(),t[e].splice(n,1),n>-1)},this.trigger=function(e){var i,n,r,s;if(i=t[e])if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(s=[],n=arguments.length,n=1;n<arguments.length;++n)s.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,s)}},this.dispose=function(){t={}}}};n.prototype.pipe=function(t){return this.on("data",(function(e){t.push(e)})),this.on("done",(function(e){t.flush(e)})),this.on("partialdone",(function(e){t.partialFlush(e)})),this.on("endedtimeline",(function(e){t.endTimeline(e)})),this.on("reset",(function(e){t.reset(e)})),t},n.prototype.push=function(t){this.trigger("data",t)},n.prototype.flush=function(t){this.trigger("done",t)},n.prototype.partialFlush=function(t){this.trigger("partialdone",t)},n.prototype.endTimeline=function(t){this.trigger("endedtimeline",t)},n.prototype.reset=function(t){this.trigger("reset",t)},t.exports=n},1020:function(t,e,i){"use strict";var n=i(945),r=function(t){var e=31&t[1];return e<<=8,e|=t[2]},s=function(t){return!!(64&t[1])},a=function(t){var e=0;return(48&t[3])>>>4>1&&(e+=t[4]+1),e},o=function(t){switch(t){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};t.exports={parseType:function(t,e){var i=r(t);return 0===i?"pat":i===e?"pmt":e?"pes":null},parsePat:function(t){var e=s(t),i=4+a(t);return e&&(i+=t[i]+1),(31&t[i+10])<<8|t[i+11]},parsePmt:function(t){var e={},i=s(t),n=4+a(t);if(i&&(n+=t[n]+1),1&t[n+5]){var r;r=3+((15&t[n+1])<<8|t[n+2])-4;for(var o=12+((15&t[n+10])<<8|t[n+11]);o<r;){var l=n+o;e[(31&t[l+1])<<8|t[l+2]]=t[l],o+=5+((15&t[l+3])<<8|t[l+4])}return e}},parsePayloadUnitStartIndicator:s,parsePesType:function(t,e){switch(e[r(t)]){case n.H264_STREAM_TYPE:return"video";case n.ADTS_STREAM_TYPE:return"audio";case n.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(t){if(!s(t))return null;var e=4+a(t);if(e>=t.byteLength)return null;var i,n=null;return 192&(i=t[e+7])&&((n={}).pts=(14&t[e+9])<<27|(255&t[e+10])<<20|(254&t[e+11])<<12|(255&t[e+12])<<5|(254&t[e+13])>>>3,n.pts*=4,n.pts+=(6&t[e+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&t[e+14])<<27|(255&t[e+15])<<20|(254&t[e+16])<<12|(255&t[e+17])<<5|(254&t[e+18])>>>3,n.dts*=4,n.dts+=(6&t[e+18])>>>1)),n},videoPacketContainsKeyFrame:function(t){for(var e=4+a(t),i=t.subarray(e),n=0,r=0,s=!1;r<i.byteLength-3;r++)if(1===i[r+2]){n=r+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}r+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===o(31&i[r+3])&&(s=!0);do{n++}while(1!==i[n]&&n<i.length);r=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}"slice_layer_without_partitioning_rbsp_idr"===o(31&i[r+3])&&(s=!0),r=n-2,n+=3;break;default:n+=3}return i=i.subarray(r),n-=r,r=0,i&&i.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===o(31&i[r+3])&&(s=!0),s}}},1021:function(t,e,i){"use strict";var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return i=i>=0?i:0,(16&t[e+5])>>4?i+20:i+10},s=function(t,e){return t.length-e<10||t[e]!=="I".charCodeAt(0)||t[e+1]!=="D".charCodeAt(0)||t[e+2]!=="3".charCodeAt(0)?e:(e+=r(t,e),s(t,e))},a=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]};t.exports={isLikelyAacData:function(t){var e=s(t,0);return t.length>=e+2&&255==(255&t[e])&&240==(240&t[e+1])&&16==(22&t[e+1])},parseId3TagSize:r,parseAdtsSize:function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i},parseType:function(t,e){return t[e]==="I".charCodeAt(0)&&t[e+1]==="D".charCodeAt(0)&&t[e+2]==="3".charCodeAt(0)?"timed-metadata":!0&t[e]&&240==(240&t[e+1])?"audio":null},parseSampleRate:function(t){for(var e=0;e+5<t.length;){if(255===t[e]&&240==(246&t[e+1]))return n[(60&t[e+2])>>>2];e++}return null},parseAacTimestamp:function(t){var e,i,n;e=10,64&t[5]&&(e+=4,e+=a(t.subarray(10,14)));do{if((i=a(t.subarray(e+4,e+8)))<1)return null;if("PRIV"===String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])){n=t.subarray(e+10,e+i+10);for(var r=0;r<n.byteLength;r++)if(0===n[r]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(t,e,i){var n,r="";for(n=e;n<i;n++)r+="%"+("00"+t[n].toString(16)).slice(-2);return r}(n,0,r))){var s=n.subarray(r+1),o=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2;return o*=4,o+=3&s[7]}break}}e+=10,e+=i}while(e<t.byteLength);return null}}},1022:function(t,e,i){"use strict";var n,r,s,a,o,l,h=i(784).toUnsigned,u=i(784).toHexString,c=i(1023),d=i(947),p=i(1024),f=i(1025),g=i(1027);n=function(t){return c(t,["moov","trak"]).reduce((function(t,e){var i,n,r,s,a;return(i=c(e,["tkhd"])[0])?(n=i[0],s=h(i[r=0===n?12:20]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),(a=c(e,["mdia","mdhd"])[0])?(r=0===(n=a[0])?12:20,t[s]=h(a[r]<<24|a[r+1]<<16|a[r+2]<<8|a[r+3]),t):null):null}),{})},r=function(t,e){var i,n,r;return i=c(e,["moof","traf"]),n=[].concat.apply([],i.map((function(e){return c(e,["tfhd"]).map((function(i){var n,r,s;return n=h(i[4]<<24|i[5]<<16|i[6]<<8|i[7]),r=t[n]||9e4,(s="number"!=typeof(s=c(e,["tfdt"]).map((function(t){var e,i;return e=t[0],i=h(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(i*=Math.pow(2,32),i+=h(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),i}))[0])||isNaN(s)?1/0:s)/r}))}))),r=Math.min.apply(null,n),isFinite(r)?r:0},s=function(t,e){var i,n=c(e,["moof","traf"]),r=0,s=0;if(n&&n.length){var a=c(n[0],["tfhd"])[0],o=c(n[0],["trun"])[0],l=c(n[0],["tfdt"])[0];if(a)i=p(a).trackId;if(l)r=g(l).baseMediaDecodeTime;if(o){var h=f(o);h.samples&&h.samples.length&&(s=h.samples[0].compositionTimeOffset||0)}}return(r+s)/(t[i]||9e4)},a=function(t){var e=c(t,["moov","trak"]),i=[];return e.forEach((function(t){var e=c(t,["mdia","hdlr"]),n=c(t,["tkhd"]);e.forEach((function(t,e){var r,s,a=d(t.subarray(8,12)),o=n[e];"vide"===a&&(s=0===(r=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?r.getUint32(12):r.getUint32(20),i.push(s))}))})),i},l=function(t){var e=0===t[0]?12:20;return h(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])},o=function(t){var e=c(t,["moov","trak"]),i=[];return e.forEach((function(t){var e,n,r={},s=c(t,["tkhd"])[0];s&&(n=(e=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0),r.id=0===n?e.getUint32(12):e.getUint32(20));var a=c(t,["mdia","hdlr"])[0];if(a){var o=d(a.subarray(8,12));r.type="vide"===o?"video":"soun"===o?"audio":o}var h=c(t,["mdia","minf","stbl","stsd"])[0];if(h){var p=h.subarray(8);r.codec=d(p.subarray(4,8));var f,g=c(p,[r.codec])[0];g&&(/^[a-z]vc[1-9]$/i.test(r.codec)?(f=g.subarray(78),"avcC"===d(f.subarray(4,8))&&f.length>11?(r.codec+=".",r.codec+=u(f[9]),r.codec+=u(f[10]),r.codec+=u(f[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(f=g.subarray(28),"esds"===d(f.subarray(4,8))&&f.length>20&&0!==f[19]?(r.codec+="."+u(f[19]),r.codec+="."+u(f[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase())}var m=c(t,["mdia","mdhd"])[0];m&&(r.timescale=l(m)),i.push(r)})),i},t.exports={findBox:c,parseType:d,timescale:n,startTime:r,compositionStartTime:s,videoTrackIds:a,tracks:o,getTimescaleFromMediaHeader:l}},1023:function(t,e,i){var n=i(784).toUnsigned,r=i(947),s=function(t,e){var i,a,o,l,h,u=[];if(!e.length)return null;for(i=0;i<t.byteLength;)a=n(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3]),o=r(t.subarray(i+4,i+8)),l=a>1?i+a:t.byteLength,o===e[0]&&(1===e.length?u.push(t.subarray(i+8,l)):(h=s(t.subarray(i+8,l),e.slice(1))).length&&(u=u.concat(h))),i=l;return u};t.exports=s},1024:function(t,e){t.exports=function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],s=2&n.flags[2],a=8&n.flags[2],o=16&n.flags[2],l=32&n.flags[2],h=65536&n.flags[0],u=131072&n.flags[0];return e=8,r&&(e+=4,n.baseDataOffset=i.getUint32(12),e+=4),s&&(n.sampleDescriptionIndex=i.getUint32(e),e+=4),a&&(n.defaultSampleDuration=i.getUint32(e),e+=4),o&&(n.defaultSampleSize=i.getUint32(e),e+=4),l&&(n.defaultSampleFlags=i.getUint32(e)),h&&(n.durationIsEmpty=!0),!r&&u&&(n.baseDataOffsetIsMoof=!0),n}},1025:function(t,e,i){var n=i(1026);t.exports=function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},r=new DataView(t.buffer,t.byteOffset,t.byteLength),s=1&i.flags[2],a=4&i.flags[2],o=1&i.flags[1],l=2&i.flags[1],h=4&i.flags[1],u=8&i.flags[1],c=r.getUint32(4),d=8;for(s&&(i.dataOffset=r.getInt32(d),d+=4),a&&c&&(e={flags:n(t.subarray(d,d+4))},d+=4,o&&(e.duration=r.getUint32(d),d+=4),l&&(e.size=r.getUint32(d),d+=4),u&&(1===i.version?e.compositionTimeOffset=r.getInt32(d):e.compositionTimeOffset=r.getUint32(d),d+=4),i.samples.push(e),c--);c--;)e={},o&&(e.duration=r.getUint32(d),d+=4),l&&(e.size=r.getUint32(d),d+=4),h&&(e.flags=n(t.subarray(d,d+4)),d+=4),u&&(1===i.version?e.compositionTimeOffset=r.getInt32(d):e.compositionTimeOffset=r.getUint32(d),d+=4),i.samples.push(e);return i}},1026:function(t,e){t.exports=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}}},1027:function(t,e,i){var n=i(784).toUnsigned;t.exports=function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:n(t[4]<<24|t[5]<<16|t[6]<<8|t[7])};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=n(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),e}},1028:function(t,e,i){"use strict";
15
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(e,"__esModule",{value:!0});var n,r=(n=i(764))&&"object"==typeof n&&"default"in n?n.default:n,s={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],o=["Video","Audio","Text"],l=function(t){return t?t.replace(/avc1\.(\d+)\.(\d+)/i,(function(t,e,i){return"avc1."+("00"+Number(e).toString(16)).slice(-2)+"00"+("00"+Number(i).toString(16)).slice(-2)})):t},h=function(t){return t.map(l)},u=function(t){void 0===t&&(t="");var e=t.split(","),i={},n=[];return e.forEach((function(t){var e;t=t.trim(),a.forEach((function(n){var r=s[n].exec(t.toLowerCase());if(r&&!(r.length<=1)){e=n;var a=t.substring(0,r[1].length),o=t.replace(a,"");i[n]={type:a,details:o}}})),e||n.push(t)})),n.length&&(i.unknown=n),i},c=function(t){return void 0===t&&(t=""),s.audio.test(t.trim().toLowerCase())},d=function(t){return void 0===t&&(t=""),s.text.test(t.trim().toLowerCase())},p=function(t){if(t&&"string"==typeof t){var e=t.toLowerCase().split(",").map((function(t){return l(t.trim())})),i="video";1===e.length&&c(e[0])?i="audio":1===e.length&&d(e[0])&&(i="application");var n="mp4";return e.every((function(t){return s.mp4.test(t)}))?n="mp4":e.every((function(t){return s.webm.test(t)}))?n="webm":e.every((function(t){return s.ogg.test(t)}))&&(n="ogg"),i+"/"+n+';codecs="'+t+'"'}};e.DEFAULT_AUDIO_CODEC="mp4a.40.2",e.DEFAULT_VIDEO_CODEC="avc1.4d400d",e.browserSupportsCodec=function(t){return void 0===t&&(t=""),r.MediaSource&&r.MediaSource.isTypeSupported&&r.MediaSource.isTypeSupported(p(t))||!1},e.codecsFromDefault=function(t,e){if(!t.mediaGroups.AUDIO||!e)return null;var i=t.mediaGroups.AUDIO[e];if(!i)return null;for(var n in i){var r=i[n];if(r.default&&r.playlists)return u(r.playlists[0].attributes.CODECS)}return null},e.getMimeForCodec=p,e.isAudioCodec=c,e.isTextCodec=d,e.isVideoCodec=function(t){return void 0===t&&(t=""),s.video.test(t.trim().toLowerCase())},e.mapLegacyAvcCodecs=function(t){return t.replace(/avc1\.(\d+)\.(\d+)/i,(function(t){return h([t])[0]}))},e.muxerSupportsCodec=function(t){return void 0===t&&(t=""),t.toLowerCase().split(",").every((function(t){t=t.trim();for(var e=0;e<o.length;e++){if(s["muxer"+o[e]].test(t))return!0}return!1}))},e.parseCodecs=u,e.translateLegacyCodec=l,e.translateLegacyCodecs=h},1029:function(t,e,i){"use strict";var n=i(740),r=i(941),s=i.n(r);function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var o=function t(e){var i=this;if(n.a.browser.IS_IE8)for(var r in i=s.a.createElement("custom"),t.prototype)"constructor"!==r&&(i[r]=t.prototype[r]);return i.id=e.id,i.label=i.id,i.width=e.width,i.height=e.height,i.bitrate=e.bandwidth,i.enabled_=e.enabled,Object.defineProperty(i,"enabled",{get:function(){return i.enabled_()},set:function(t){i.enabled_(t)}}),i},l=function(t){
16
- /*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */
17
- var e,i;function r(){var e,i=a(a(e=t.call(this)||this));if(n.a.browser.IS_IE8)for(var o in i=s.a.createElement("custom"),r.prototype)"constructor"!==o&&(i[o]=r.prototype[o]);return i.levels_=[],i.selectedIndex_=-1,Object.defineProperty(i,"selectedIndex",{get:function(){return i.selectedIndex_}}),Object.defineProperty(i,"length",{get:function(){return i.levels_.length}}),i||a(e)}i=t,(e=r).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var l=r.prototype;return l.addQualityLevel=function(t){var e=this.getQualityLevelById(t.id);if(e)return e;var i=this.levels_.length;return e=new o(t),""+i in this||Object.defineProperty(this,i,{get:function(){return this.levels_[i]}}),this.levels_.push(e),this.trigger({qualityLevel:e,type:"addqualitylevel"}),e},l.removeQualityLevel=function(t){for(var e=null,i=0,n=this.length;i<n;i++)if(this[i]===t){e=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return e&&this.trigger({qualityLevel:t,type:"removequalitylevel"}),e},l.getQualityLevelById=function(t){for(var e=0,i=this.length;e<i;e++){var n=this[e];if(n.id===t)return n}return null},l.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(n.a.EventTarget);for(var h in l.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},l.prototype.allowedEvents_)l.prototype["on"+h]=null;var u=n.a.registerPlugin||n.a.plugin,c=function(t){return e=this,n.a.mergeOptions({},t),i=e.qualityLevels,r=new l,e.on("dispose",(function t(){r.dispose(),e.qualityLevels=i,e.off("dispose",t)})),e.qualityLevels=function(){return r},e.qualityLevels.VERSION="2.0.9",r;var e,i,r};u("qualityLevels",c),c.VERSION="2.0.9"},1039:function(t,e,i){"use strict";i(1040),i(1051);var n=i(1052),r=i.n(n),s=(i(1053),i(963),i(1063),i(1065),i(1067),i(1070),i(1071),i(1080),i(1081)),a=i.n(s),o=i(1082),l=i.n(o),h=i(1083),u=i.n(h),c=i(1084),d=(i(1085),i(1087),i(1088),i(1090),i(1091),null),p=null;function f(){if(null===d){if("undefined"==typeof document)return d=0;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var i=e.getBoundingClientRect().right;t.removeChild(e),d=i}return d}r.a&&window.addEventListener("resize",(function(){p!==window.devicePixelRatio&&(p=window.devicePixelRatio,d=null)}));var g=function(t){return Array.prototype.reduce.call(t,(function(t,e){var i=e.name.match(/data-simplebar-(.+)/);if(i){var n=i[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[n]=!0;break;case"false":t[n]=!1;break;case void 0:t[n]=!0;break;default:t[n]=e.value}}return t}),{})};function m(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function v(t){return t&&t.ownerDocument?t.ownerDocument:document}var y=function(){function t(e,i){var n=this;this.onScroll=function(){var t=m(n.el);n.scrollXTicking||(t.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(t.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0)},this.scrollX=function(){n.axis.x.isOverflowing&&(n.showScrollbar("x"),n.positionScrollbar("x")),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&(n.showScrollbar("y"),n.positionScrollbar("y")),n.scrollYTicking=!1},this.onMouseEnter=function(){n.showScrollbar("x"),n.showScrollbar("y")},this.onMouseMove=function(t){n.mouseX=t.clientX,n.mouseY=t.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this.onWindowResize=function(){n.scrollbarWidth=n.getScrollbarWidth(),n.hideNativeScrollbar()},this.hideScrollbars=function(){n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.track.rect)||(n.axis.y.scrollbar.el.classList.remove(n.classNames.visible),n.axis.y.isVisible=!1),n.isWithinBounds(n.axis.x.track.rect)||(n.axis.x.scrollbar.el.classList.remove(n.classNames.visible),n.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,i;n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(e=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(i=n.isWithinBounds(n.axis.y.track.rect)),(e||i)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(t,"x"):n.onTrackClick(t,"x")),i&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(t,"y"):n.onTrackClick(t,"y"))))},this.drag=function(e){var i=n.axis[n.draggedAxis].track,r=i.rect[n.axis[n.draggedAxis].sizeAttr],s=n.axis[n.draggedAxis].scrollbar,a=n.contentWrapperEl[n.axis[n.draggedAxis].scrollSizeAttr],o=parseInt(n.elStyles[n.axis[n.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var l=(("y"===n.draggedAxis?e.pageY:e.pageX)-i.rect[n.axis[n.draggedAxis].offsetAttr]-n.axis[n.draggedAxis].dragOffset)/(r-s.size)*(a-o);"x"===n.draggedAxis&&(l=n.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?l-(r+s.size):l,l=n.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-l:l),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=l},this.onEndDrag=function(t){var e=v(n.el),i=m(n.el);t.preventDefault(),t.stopPropagation(),n.el.classList.remove(n.classNames.dragging),e.removeEventListener("mousemove",n.drag,!0),e.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=i.setTimeout((function(){e.removeEventListener("click",n.preventClick,!0),e.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},i),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=a()(this.recalculate.bind(this),64),this.onMouseMove=a()(this.onMouseMove.bind(this),64),this.hideScrollbars=l()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=l()(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=u()(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var i=e.firstElementChild;document.body.appendChild(i);var n=i.firstElementChild;i.scrollLeft=0;var r=t.getOffset(i),s=t.getOffset(n);i.scrollLeft=999;var a=t.getOffset(n);return{isRtlScrollingInverted:r.left!==s.left&&s.left-a.left!=0,isRtlScrollbarInverted:r.left!==s.left}},t.getOffset=function(t){var e=t.getBoundingClientRect(),i=v(t),n=m(t);return{top:e.top+(n.pageYOffset||i.documentElement.scrollTop),left:e.left+(n.pageXOffset||i.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),r.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),i=document.createElement("div");e.classList.add(this.classNames.track),i.classList.add(this.classNames.scrollbar),e.appendChild(i),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var t=this,e=m(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize);var i=!1,n=e.ResizeObserver||c.a;this.resizeObserver=new n((function(){i&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame((function(){i=!0})),this.mutationObserver=new e.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var t=m(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1,n=this.contentEl.offsetWidth,r=this.contentWrapperEl.offsetWidth,s=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var o=this.contentEl.scrollHeight,l=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=i?n+"px":"auto",this.placeholderEl.style.height=o+"px";var h=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=l>n,this.axis.y.isOverflowing=o>h,this.axis.x.isOverflowing="hidden"!==s&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0,c=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&l>r-c,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&o>h-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,i=this.contentEl[this.axis[t].scrollSizeAttr],n=this.axis[t].track.el[this.axis[t].offsetSizeAttr],r=n/i;return e=Math.max(~~(r*n),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var i=this.contentWrapperEl[this.axis[e].scrollSizeAttr],n=this.axis[e].track.el[this.axis[e].offsetSizeAttr],r=parseInt(this.elStyles[this.axis[e].sizeAttr],10),s=this.axis[e].scrollbar,a=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],o=(a="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-a:a)/(i-r),l=~~((n-s.size)*o);l="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?l+(n-s.size):l,s.el.style.transform="x"===e?"translate3d("+l+"px, 0, 0)":"translate3d(0, "+l+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,i=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?i.style.display="block":i.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var i=v(this.el),n=m(this.el),r=this.axis[e].scrollbar,s="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=s-r.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(n.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(t,e){var i=this;if(void 0===e&&(e="y"),this.options.clickOnTrack){var n=m(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();var r=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],s=parseInt(this.elStyles[this.axis[e].sizeAttr],10),a=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],o=("y"===e?this.mouseY-r:this.mouseX-r)<0?-1:1,l=-1===o?a-s:a+s;!function t(){var r,s;-1===o?a>l&&(a-=i.options.clickOnTrackSpeed,i.contentWrapperEl.scrollTo(((r={})[i.axis[e].offsetAttr]=a,r)),n.requestAnimationFrame(t)):a<l&&(a+=i.options.clickOnTrackSpeed,i.contentWrapperEl.scrollTo(((s={})[i.axis[e].offsetAttr]=a,s)),n.requestAnimationFrame(t))}()}},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:f()}catch(t){return f()}},e.removeListeners=function(){var t=this,e=m(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var i=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return i.call(t,e)}))[0]},t}();y.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},y.instances=new WeakMap,y.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||y.instances.has(t)||new y(t,g(t.attributes))}))},y.removeObserver=function(){this.globalObserver.disconnect()},y.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(y.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},y.handleMutations=function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!y.instances.has(t)&&new y(t,g(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||y.instances.has(t)||new y(t,g(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&(t.hasAttribute('[data-simplebar="init"]')?y.instances.has(t)&&y.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){y.instances.has(t)&&y.instances.get(t).unMount()})))}))}))},y.getOptions=g,r.a&&y.initHtmlApi(),e.a=y},1040:function(t,e,i){"use strict";var n=i(757),r=i(958);n({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},1041:function(t,e,i){var n=i(743),r=i(799),s=n["__core-js_shared__"]||r("__core-js_shared__",{});t.exports=s},1042:function(t,e,i){var n=i(750),r=i(1043),s=i(948),a=i(766);t.exports=function(t,e){for(var i=r(e),o=a.f,l=s.f,h=0;h<i.length;h++){var u=i[h];n(t,u)||o(t,u,l(e,u))}}},1043:function(t,e,i){var n=i(802),r=i(1045),s=i(956),a=i(748);t.exports=n("Reflect","ownKeys")||function(t){var e=r.f(a(t)),i=s.f;return i?e.concat(i(t)):e}},1044:function(t,e,i){t.exports=i(743)},1045:function(t,e,i){var n=i(955),r=i(803).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,r)}},1046:function(t,e,i){var n=i(785),r=i(768),s=i(1047),a=function(t){return function(e,i,a){var o,l=n(e),h=r(l.length),u=s(a,h);if(t&&i!=i){for(;h>u;)if((o=l[u++])!=o)return!0}else for(;h>u;u++)if((t||u in l)&&l[u]===i)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},1047:function(t,e,i){var n=i(790),r=Math.max,s=Math.min;t.exports=function(t,e){var i=n(t);return i<0?r(i+e,0):s(i,e)}},1048:function(t,e,i){var n=i(747),r=i(1049),s=i(745)("species");t.exports=function(t,e){var i;return r(t)&&("function"!=typeof(i=t.constructor)||i!==Array&&!r(i.prototype)?n(i)&&null===(i=i[s])&&(i=void 0):i=void 0),new(void 0===i?Array:i)(0===e?0:e)}},1049:function(t,e,i){var n=i(787);t.exports=Array.isArray||function(t){return"Array"==n(t)}},1050:function(t,e,i){var n=i(746);t.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},1051:function(t,e,i){var n=i(743),r=i(962),s=i(958),a=i(751);for(var o in r){var l=n[o],h=l&&l.prototype;if(h&&h.forEach!==s)try{a(h,"forEach",s)}catch(t){h.forEach=s}}},1052:function(t,e){var i=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=i},1053:function(t,e,i){"use strict";var n=i(757),r=i(804).filter;n({target:"Array",proto:!0,forced:!i(1054)("filter")},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},1054:function(t,e,i){var n=i(746),r=i(745),s=i(1055),a=r("species");t.exports=function(t){return s>=51||!n((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},1055:function(t,e,i){var n,r,s=i(743),a=i(1056),o=s.process,l=o&&o.versions,h=l&&l.v8;h?r=(n=h.split("."))[0]+n[1]:a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(r=n[1]),t.exports=r&&+r},1056:function(t,e,i){var n=i(802);t.exports=n("navigator","userAgent")||""},1057:function(t,e,i){var n=i(745),r=i(964),s=i(751),a=n("unscopables"),o=Array.prototype;null==o[a]&&s(o,a,r(null)),t.exports=function(t){o[a][t]=!0}},1058:function(t,e,i){var n=i(760),r=i(766),s=i(748),a=i(965);t.exports=n?Object.defineProperties:function(t,e){s(t);for(var i,n=a(e),o=n.length,l=0;o>l;)r.f(t,i=n[l++],e[i]);return t}},1059:function(t,e,i){var n=i(802);t.exports=n("document","documentElement")},1060:function(t,e,i){"use strict";var n=i(967).IteratorPrototype,r=i(964),s=i(797),a=i(805),o=i(775),l=function(){return this};t.exports=function(t,e,i){var h=e+" Iterator";return t.prototype=r(n,{next:s(1,i)}),a(t,h,!1,!0),o[h]=l,t}},1061:function(t,e,i){var n=i(746);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},1062:function(t,e,i){var n=i(747);t.exports=function(t){if(!n(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},1063:function(t,e,i){var n=i(757),r=i(1064);n({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},1064:function(t,e,i){"use strict";var n=i(760),r=i(746),s=i(965),a=i(956),o=i(949),l=i(774),h=i(786),u=Object.assign;t.exports=!u||r((function(){var t={},e={},i=Symbol();return t[i]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=u({},t)[i]||"abcdefghijklmnopqrst"!=s(u({},e)).join("")}))?function(t,e){for(var i=l(t),r=arguments.length,u=1,c=a.f,d=o.f;r>u;)for(var p,f=h(arguments[u++]),g=c?s(f).concat(c(f)):s(f),m=g.length,v=0;m>v;)p=g[v++],n&&!d.call(f,p)||(i[p]=f[p]);return i}:u},1065:function(t,e,i){var n=i(767),r=i(1066),s=Object.prototype;r!==s.toString&&n(s,"toString",r,{unsafe:!0})},1066:function(t,e,i){"use strict";var n=i(970),r={};r[i(745)("toStringTag")]="z",t.exports="[object z]"!==String(r)?function(){return"[object "+n(this)+"]"}:r.toString},1067:function(t,e,i){var n=i(757),r=i(1068);n({global:!0,forced:parseInt!=r},{parseInt:r})},1068:function(t,e,i){var n=i(743),r=i(1069).trim,s=i(971),a=n.parseInt,o=/^[+-]?0[Xx]/,l=8!==a(s+"08")||22!==a(s+"0x16");t.exports=l?function(t,e){var i=r(String(t));return a(i,e>>>0||(o.test(i)?16:10))}:a},1069:function(t,e,i){var n=i(765),r="["+i(971)+"]",s=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),o=function(t){return function(e){var i=String(n(e));return 1&t&&(i=i.replace(s,"")),2&t&&(i=i.replace(a,"")),i}};t.exports={start:o(1),end:o(2),trim:o(3)}},1070:function(t,e,i){"use strict";var n=i(972).charAt,r=i(773),s=i(966),a=r.set,o=r.getterFor("String Iterator");s(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=o(this),i=e.string,r=e.index;return r>=i.length?{value:void 0,done:!0}:(t=n(i,r),e.index+=t.length,{value:t,done:!1})}))},1071:function(t,e,i){"use strict";var n,r=i(743),s=i(973),a=i(806),o=i(1073),l=i(1079),h=i(747),u=i(773).enforce,c=i(954),d=!r.ActiveXObject&&"ActiveXObject"in r,p=Object.isExtensible,f=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},g=t.exports=o("WeakMap",f,l,!0,!0);if(c&&d){n=l.getConstructor(f,"WeakMap",!0),a.REQUIRED=!0;var m=g.prototype,v=m.delete,y=m.has,b=m.get,_=m.set;s(m,{delete:function(t){if(h(t)&&!p(t)){var e=u(this);return e.frozen||(e.frozen=new n),v.call(this,t)||e.frozen.delete(t)}return v.call(this,t)},has:function(t){if(h(t)&&!p(t)){var e=u(this);return e.frozen||(e.frozen=new n),y.call(this,t)||e.frozen.has(t)}return y.call(this,t)},get:function(t){if(h(t)&&!p(t)){var e=u(this);return e.frozen||(e.frozen=new n),y.call(this,t)?b.call(this,t):e.frozen.get(t)}return b.call(this,t)},set:function(t,e){if(h(t)&&!p(t)){var i=u(this);i.frozen||(i.frozen=new n),y.call(this,t)?_.call(this,t,e):i.frozen.set(t,e)}else _.call(this,t,e);return this}})}},1072:function(t,e,i){var n=i(746);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},1073:function(t,e,i){"use strict";var n=i(757),r=i(743),s=i(957),a=i(767),o=i(806),l=i(974),h=i(975),u=i(747),c=i(746),d=i(1077),p=i(805),f=i(1078);t.exports=function(t,e,i,g,m){var v=r[t],y=v&&v.prototype,b=v,_=g?"set":"add",T={},x=function(t){var e=y[t];a(y,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(m&&!u(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!u(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!u(t))&&e.call(this,0===t?0:t)}:function(t,i){return e.call(this,0===t?0:t,i),this})};if(s(t,"function"!=typeof v||!(m||y.forEach&&!c((function(){(new v).entries().next()})))))b=i.getConstructor(e,t,g,_),o.REQUIRED=!0;else if(s(t,!0)){var S=new b,w=S[_](m?{}:-0,1)!=S,k=c((function(){S.has(1)})),C=d((function(t){new v(t)})),E=!m&&c((function(){for(var t=new v,e=5;e--;)t[_](e,e);return!t.has(-0)}));C||((b=e((function(e,i){h(e,b,t);var n=f(new v,e,b);return null!=i&&l(i,n[_],n,g),n}))).prototype=y,y.constructor=b),(k||E)&&(x("delete"),x("has"),g&&x("get")),(E||w)&&x(_),m&&y.clear&&delete y.clear}return T[t]=b,n({global:!0,forced:b!=v},T),p(b,t),m||i.setStrong(b,t,g),b}},1074:function(t,e,i){var n=i(745),r=i(775),s=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[s]===t)}},1075:function(t,e,i){var n=i(970),r=i(775),s=i(745)("iterator");t.exports=function(t){if(null!=t)return t[s]||t["@@iterator"]||r[n(t)]}},1076:function(t,e,i){var n=i(748);t.exports=function(t,e,i,r){try{return r?e(n(i)[0],i[1]):e(i)}catch(e){var s=t.return;throw void 0!==s&&n(s.call(t)),e}}},1077:function(t,e,i){var n=i(745)("iterator"),r=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){r=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!r)return!1;var i=!1;try{var s={};s[n]=function(){return{next:function(){return{done:i=!0}}}},t(s)}catch(t){}return i}},1078:function(t,e,i){var n=i(747),r=i(969);t.exports=function(t,e,i){var s,a;return r&&"function"==typeof(s=e.constructor)&&s!==i&&n(a=s.prototype)&&a!==i.prototype&&r(t,a),t}},1079:function(t,e,i){"use strict";var n=i(973),r=i(806).getWeakData,s=i(748),a=i(747),o=i(975),l=i(974),h=i(804),u=i(750),c=i(773),d=c.set,p=c.getterFor,f=h.find,g=h.findIndex,m=0,v=function(t){return t.frozen||(t.frozen=new y)},y=function(){this.entries=[]},b=function(t,e){return f(t.entries,(function(t){return t[0]===e}))};y.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var i=b(this,t);i?i[1]=e:this.entries.push([t,e])},delete:function(t){var e=g(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,i,h){var c=t((function(t,n){o(t,c,e),d(t,{type:e,id:m++,frozen:void 0}),null!=n&&l(n,t[h],t,i)})),f=p(e),g=function(t,e,i){var n=f(t),a=r(s(e),!0);return!0===a?v(n).set(e,i):a[n.id]=i,t};return n(c.prototype,{delete:function(t){var e=f(this);if(!a(t))return!1;var i=r(t);return!0===i?v(e).delete(t):i&&u(i,e.id)&&delete i[e.id]},has:function(t){var e=f(this);if(!a(t))return!1;var i=r(t);return!0===i?v(e).has(t):i&&u(i,e.id)}}),n(c.prototype,i?{get:function(t){var e=f(this);if(a(t)){var i=r(t);return!0===i?v(e).get(t):i?i[e.id]:void 0}},set:function(t,e){return g(this,t,e)}}:{add:function(t){return g(this,t,!0)}}),c}}},1080:function(t,e,i){var n=i(743),r=i(962),s=i(963),a=i(751),o=i(745),l=o("iterator"),h=o("toStringTag"),u=s.values;for(var c in r){var d=n[c],p=d&&d.prototype;if(p){if(p[l]!==u)try{a(p,l,u)}catch(t){p[l]=u}if(p[h]||a(p,h,c),r[c])for(var f in s)if(p[f]!==s[f])try{a(p,f,s[f])}catch(t){p[f]=s[f]}}}},1081:function(t,e,i){(function(e){var i=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,o="object"==typeof e&&e&&e.Object===Object&&e,l="object"==typeof self&&self&&self.Object===Object&&self,h=o||l||Function("return this")(),u=Object.prototype.toString,c=Math.max,d=Math.min,p=function(){return h.Date.now()};function f(t,e,i){var n,r,s,a,o,l,h=0,u=!1,f=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var i=n,s=r;return n=r=void 0,h=e,a=t.apply(s,i)}function b(t){return h=t,o=setTimeout(T,e),u?y(t):a}function _(t){var i=t-l;return void 0===l||i>=e||i<0||f&&t-h>=s}function T(){var t=p();if(_(t))return x(t);o=setTimeout(T,function(t){var i=e-(t-l);return f?d(i,s-(t-h)):i}(t))}function x(t){return o=void 0,v&&n?y(t):(n=r=void 0,a)}function S(){var t=p(),i=_(t);if(n=arguments,r=this,l=t,i){if(void 0===o)return b(l);if(f)return o=setTimeout(T,e),y(l)}return void 0===o&&(o=setTimeout(T,e)),a}return e=m(e)||0,g(i)&&(u=!!i.leading,s=(f="maxWait"in i)?c(m(i.maxWait)||0,e):s,v="trailing"in i?!!i.trailing:v),S.cancel=function(){void 0!==o&&clearTimeout(o),h=0,n=l=r=o=void 0},S.flush=function(){return void 0===o?a:x(p())},S}function g(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function m(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==u.call(t)}(t))return NaN;if(g(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=g(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var o=r.test(t);return o||s.test(t)?a(t.slice(2),o?2:8):n.test(t)?NaN:+t}t.exports=function(t,e,i){var n=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return g(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),f(t,e,{leading:n,maxWait:e,trailing:r})}}).call(this,i(59))},1082:function(t,e,i){(function(e){var i=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,o="object"==typeof e&&e&&e.Object===Object&&e,l="object"==typeof self&&self&&self.Object===Object&&self,h=o||l||Function("return this")(),u=Object.prototype.toString,c=Math.max,d=Math.min,p=function(){return h.Date.now()};function f(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function g(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==u.call(t)}(t))return NaN;if(f(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=f(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var o=r.test(t);return o||s.test(t)?a(t.slice(2),o?2:8):n.test(t)?NaN:+t}t.exports=function(t,e,i){var n,r,s,a,o,l,h=0,u=!1,m=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var i=n,s=r;return n=r=void 0,h=e,a=t.apply(s,i)}function b(t){return h=t,o=setTimeout(T,e),u?y(t):a}function _(t){var i=t-l;return void 0===l||i>=e||i<0||m&&t-h>=s}function T(){var t=p();if(_(t))return x(t);o=setTimeout(T,function(t){var i=e-(t-l);return m?d(i,s-(t-h)):i}(t))}function x(t){return o=void 0,v&&n?y(t):(n=r=void 0,a)}function S(){var t=p(),i=_(t);if(n=arguments,r=this,l=t,i){if(void 0===o)return b(l);if(m)return o=setTimeout(T,e),y(l)}return void 0===o&&(o=setTimeout(T,e)),a}return e=g(e)||0,f(i)&&(u=!!i.leading,s=(m="maxWait"in i)?c(g(i.maxWait)||0,e):s,v="trailing"in i?!!i.trailing:v),S.cancel=function(){void 0!==o&&clearTimeout(o),h=0,n=l=r=o=void 0},S.flush=function(){return void 0===o?a:x(p())},S}}).call(this,i(59))},1083:function(t,e,i){(function(e){var i=/^\[object .+?Constructor\]$/,n="object"==typeof e&&e&&e.Object===Object&&e,r="object"==typeof self&&self&&self.Object===Object&&self,s=n||r||Function("return this")();var a,o=Array.prototype,l=Function.prototype,h=Object.prototype,u=s["__core-js_shared__"],c=(a=/[^.]+$/.exec(u&&u.keys&&u.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",d=l.toString,p=h.hasOwnProperty,f=h.toString,g=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=o.splice,v=k(s,"Map"),y=k(Object,"create");function b(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function _(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function T(t){var e=-1,i=t?t.length:0;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function x(t,e){for(var i,n,r=t.length;r--;)if((i=t[r][0])===(n=e)||i!=i&&n!=n)return r;return-1}function S(t){return!(!E(t)||(e=t,c&&c in e))&&(function(t){var e=E(t)?f.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?g:i).test(function(t){if(null!=t){try{return d.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function w(t,e){var i=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?i["string"==typeof e?"string":"hash"]:i.map}function k(t,e){var i=function(t,e){return null==t?void 0:t[e]}(t,e);return S(i)?i:void 0}function C(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var n=arguments,r=e?e.apply(this,n):n[0],s=i.cache;if(s.has(r))return s.get(r);var a=t.apply(this,n);return i.cache=s.set(r,a),a};return i.cache=new(C.Cache||T),i}function E(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}b.prototype.clear=function(){this.__data__=y?y(null):{}},b.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},b.prototype.get=function(t){var e=this.__data__;if(y){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return p.call(e,t)?e[t]:void 0},b.prototype.has=function(t){var e=this.__data__;return y?void 0!==e[t]:p.call(e,t)},b.prototype.set=function(t,e){return this.__data__[t]=y&&void 0===e?"__lodash_hash_undefined__":e,this},_.prototype.clear=function(){this.__data__=[]},_.prototype.delete=function(t){var e=this.__data__,i=x(e,t);return!(i<0)&&(i==e.length-1?e.pop():m.call(e,i,1),!0)},_.prototype.get=function(t){var e=this.__data__,i=x(e,t);return i<0?void 0:e[i][1]},_.prototype.has=function(t){return x(this.__data__,t)>-1},_.prototype.set=function(t,e){var i=this.__data__,n=x(i,t);return n<0?i.push([t,e]):i[n][1]=e,this},T.prototype.clear=function(){this.__data__={hash:new b,map:new(v||_),string:new b}},T.prototype.delete=function(t){return w(this,t).delete(t)},T.prototype.get=function(t){return w(this,t).get(t)},T.prototype.has=function(t){return w(this,t).has(t)},T.prototype.set=function(t,e){return w(this,t).set(t,e),this},C.Cache=T,t.exports=C}).call(this,i(59))},1084:function(t,e,i){"use strict";(function(t){var i=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var i=-1;return t.some((function(t,n){return t[0]===e&&(i=n,!0)})),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var i=t(this.__entries__,e),n=this.__entries__[i];return n&&n[1]},e.prototype.set=function(e,i){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=i:this.__entries__.push([e,i])},e.prototype.delete=function(e){var i=this.__entries__,n=t(i,e);~n&&i.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,n=this.__entries__;i<n.length;i++){var r=n[i];t.call(e,r[1],r[0])}},e}()}(),n="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,r=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),s="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],o="undefined"!=typeof MutationObserver,l=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,n=!1,r=0;function a(){i&&(i=!1,t()),n&&l()}function o(){s(a)}function l(){var t=Date.now();if(i){if(t-r<2)return;n=!0}else i=!0,n=!1,setTimeout(o,e);r=t}return l}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),o?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;a.some((function(t){return!!~i.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),h=function(t,e){for(var i=0,n=Object.keys(e);i<n.length;i++){var r=n[i];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},u=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||r},c=v(0,0,0,0);function d(t){return parseFloat(t)||0}function p(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce((function(e,i){return e+d(t["border-"+i+"-width"])}),0)}function f(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return c;var n=u(t).getComputedStyle(t),r=function(t){for(var e={},i=0,n=["top","right","bottom","left"];i<n.length;i++){var r=n[i],s=t["padding-"+r];e[r]=d(s)}return e}(n),s=r.left+r.right,a=r.top+r.bottom,o=d(n.width),l=d(n.height);if("border-box"===n.boxSizing&&(Math.round(o+s)!==e&&(o-=p(n,"left","right")+s),Math.round(l+a)!==i&&(l-=p(n,"top","bottom")+a)),!function(t){return t===u(t).document.documentElement}(t)){var h=Math.round(o+s)-e,f=Math.round(l+a)-i;1!==Math.abs(h)&&(o-=h),1!==Math.abs(f)&&(l-=f)}return v(r.left,r.top,o,l)}var g="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof u(t).SVGGraphicsElement}:function(t){return t instanceof u(t).SVGElement&&"function"==typeof t.getBBox};function m(t){return n?g(t)?function(t){var e=t.getBBox();return v(0,0,e.width,e.height)}(t):f(t):c}function v(t,e,i,n){return{x:t,y:e,width:i,height:n}}var y=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=m(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),b=function(t,e){var i,n,r,s,a,o,l,u=(n=(i=e).x,r=i.y,s=i.width,a=i.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(o.prototype),h(l,{x:n,y:r,width:s,height:a,top:r,right:n+s,bottom:a+r,left:n}),l);h(this,{target:t,contentRect:u})},_=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new i,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof u(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new y(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof u(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new b(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),T="undefined"!=typeof WeakMap?new WeakMap:new i,x=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=l.getInstance(),n=new _(e,i,this);T.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){x.prototype[t]=function(){var e;return(e=T.get(this))[t].apply(e,arguments)}}));var S=void 0!==r.ResizeObserver?r.ResizeObserver:x;e.a=S}).call(this,i(59))},1085:function(t,e,i){"use strict";var n=i(757),r=i(1086).left;n({target:"Array",proto:!0,forced:i(961)("reduce")},{reduce:function(t){return r(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},1086:function(t,e,i){var n=i(960),r=i(774),s=i(786),a=i(768),o=function(t){return function(e,i,o,l){n(i);var h=r(e),u=s(h),c=a(h.length),d=t?c-1:0,p=t?-1:1;if(o<2)for(;;){if(d in u){l=u[d],d+=p;break}if(d+=p,t?d<0:c<=d)throw TypeError("Reduce of empty array with no initial value")}for(;t?d>=0:c>d;d+=p)d in u&&(l=i(l,u[d],d,h));return l}};t.exports={left:o(!1),right:o(!0)}},1087:function(t,e,i){var n=i(760),r=i(766).f,s=Function.prototype,a=s.toString,o=/^\s*function ([^ (]*)/;n&&!("name"in s)&&r(s,"name",{configurable:!0,get:function(){try{return a.call(this).match(o)[1]}catch(t){return""}}})},1088:function(t,e,i){"use strict";var n=i(757),r=i(807);n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},1089:function(t,e,i){"use strict";var n=i(748);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},1090:function(t,e,i){"use strict";var n=i(976),r=i(748),s=i(768),a=i(765),o=i(977),l=i(978);n("match",1,(function(t,e,i){return[function(e){var i=a(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,i):new RegExp(e)[t](String(i))},function(t){var n=i(e,t,this);if(n.done)return n.value;var a=r(t),h=String(this);if(!a.global)return l(a,h);var u=a.unicode;a.lastIndex=0;for(var c,d=[],p=0;null!==(c=l(a,h));){var f=String(c[0]);d[p]=f,""===f&&(a.lastIndex=o(h,s(a.lastIndex),u)),p++}return 0===p?null:d}]}))},1091:function(t,e,i){"use strict";var n=i(976),r=i(748),s=i(774),a=i(768),o=i(790),l=i(765),h=i(977),u=i(978),c=Math.max,d=Math.min,p=Math.floor,f=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g;n("replace",2,(function(t,e,i){return[function(i,n){var r=l(this),s=null==i?void 0:i[t];return void 0!==s?s.call(i,r,n):e.call(String(r),i,n)},function(t,s){var l=i(e,t,this,s);if(l.done)return l.value;var p=r(t),f=String(this),g="function"==typeof s;g||(s=String(s));var m=p.global;if(m){var v=p.unicode;p.lastIndex=0}for(var y=[];;){var b=u(p,f);if(null===b)break;if(y.push(b),!m)break;""===String(b[0])&&(p.lastIndex=h(f,a(p.lastIndex),v))}for(var _,T="",x=0,S=0;S<y.length;S++){b=y[S];for(var w=String(b[0]),k=c(d(o(b.index),f.length),0),C=[],E=1;E<b.length;E++)C.push(void 0===(_=b[E])?_:String(_));var A=b.groups;if(g){var P=[w].concat(C,k,f);void 0!==A&&P.push(A);var O=String(s.apply(void 0,P))}else O=n(w,f,k,C,A,s);k>=x&&(T+=f.slice(x,k)+O,x=k+w.length)}return T+f.slice(x)}];function n(t,i,n,r,a,o){var l=n+t.length,h=r.length,u=g;return void 0!==a&&(a=s(a),u=f),e.call(o,u,(function(e,s){var o;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return i.slice(0,n);case"'":return i.slice(l);case"<":o=a[s.slice(1,-1)];break;default:var u=+s;if(0===u)return e;if(u>h){var c=p(u/10);return 0===c?e:c<=h?void 0===r[c-1]?s.charAt(1):r[c-1]+s.charAt(1):e}o=r[u-1]}return void 0===o?"":o}))}}))},1116:function(t,e,i){"use strict";var n="URLSearchParams"in self,r="Symbol"in self&&"iterator"in Symbol,s="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in self,o="ArrayBuffer"in self;if(o)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(t){return t&&l.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function c(t){return"string"!=typeof t&&(t=String(t)),t}function d(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function g(t){return new Promise((function(e,i){t.onload=function(){e(t.result)},t.onerror=function(){i(t.error)}}))}function m(t){var e=new FileReader,i=g(e);return e.readAsArrayBuffer(t),i}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:s&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():o&&s&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(t)||h(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var t,e,i,n=f(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,i=g(e),e.readAsText(t),i;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),i=new Array(e.length),n=0;n<e.length;n++)i[n]=String.fromCharCode(e[n]);return i.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(T)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=u(t),e=c(e);var i=this.map[t];this.map[t]=i?i+", "+e:e},p.prototype.delete=function(t){delete this.map[u(t)]},p.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},p.prototype.set=function(t,e){this.map[u(t)]=c(e)},p.prototype.forEach=function(t,e){for(var i in this.map)this.map.hasOwnProperty(i)&&t.call(e,this.map[i],i,this)},p.prototype.keys=function(){var t=[];return this.forEach((function(e,i){t.push(i)})),d(t)},p.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),d(t)},p.prototype.entries=function(){var t=[];return this.forEach((function(e,i){t.push([i,e])})),d(t)},r&&(p.prototype[Symbol.iterator]=p.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(t,e){var i,n,r=(e=e||{}).body;if(t instanceof _){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(i=e.method||this.method||"GET",n=i.toUpperCase(),b.indexOf(n)>-1?n:i),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function T(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var i=t.split("="),n=i.shift().replace(/\+/g," "),r=i.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(r))}})),e}function x(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"",this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},y.call(_.prototype),y.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},x.error=function(){var t=new x(null,{status:0,statusText:""});return t.type="error",t};var S=[301,302,303,307,308];x.redirect=function(t,e){if(-1===S.indexOf(e))throw new RangeError("Invalid status code");return new x(null,{status:e,headers:{location:t}})};var w=self.DOMException;try{new w}catch(t){(w=function(t,e){this.message=t,this.name=e;var i=Error(t);this.stack=i.stack}).prototype=Object.create(Error.prototype),w.prototype.constructor=w}function k(t,e){return new Promise((function(i,n){var r=new _(t,e);if(r.signal&&r.signal.aborted)return n(new w("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var t,e,n={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var i=t.split(":"),n=i.shift().trim();if(n){var r=i.join(":").trim();e.append(n,r)}})),e)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var r="response"in a?a.response:a.responseText;setTimeout((function(){i(new x(r,n))}),0)},a.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){n(new w("Aborted","AbortError"))}),0)},a.open(r.method,function(t){try{return""===t&&self.location.href?self.location.href:t}catch(e){return t}}(r.url),!0),"include"===r.credentials?a.withCredentials=!0:"omit"===r.credentials&&(a.withCredentials=!1),"responseType"in a&&(s?a.responseType="blob":o&&-1!==r.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),r.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),r.signal&&(r.signal.addEventListener("abort",l),a.onreadystatechange=function(){4===a.readyState&&r.signal.removeEventListener("abort",l)}),a.send(void 0===r._bodyInit?null:r._bodyInit)}))}k.polyfill=!0,self.fetch||(self.fetch=k,self.Headers=p,self.Request=_,self.Response=x)},1117:function(t,e,i){t.exports=function(){"use strict";var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)},e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function i(t,e,i,n){var r,s,a,o=e||[0],l=(i=i||0)>>>3,h=-1===n?3:0;for(r=0;r<t.length;r+=1)s=(a=r+l)>>>2,o.length<=s&&o.push(0),o[s]|=t[r]<<8*(h+n*(a%4));return{value:o,binLen:8*t.length+i}}function n(t,n,r){switch(n){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(t){case"HEX":return function(t,e,i){return function(t,e,i,n){var r,s,a,o;if(0!=t.length%2)throw new Error("String of HEX type must be in byte increments");var l=e||[0],h=(i=i||0)>>>3,u=-1===n?3:0;for(r=0;r<t.length;r+=2){if(s=parseInt(t.substr(r,2),16),isNaN(s))throw new Error("String of HEX type contains invalid characters");for(a=(o=(r>>>1)+h)>>>2;l.length<=a;)l.push(0);l[a]|=s<<8*(u+n*(o%4))}return{value:l,binLen:4*t.length+i}}(t,e,i,r)};case"TEXT":return function(t,e,i){return function(t,e,i,n,r){var s,a,o,l,h,u,c,d,p=0,f=i||[0],g=(n=n||0)>>>3;if("UTF8"===e)for(c=-1===r?3:0,o=0;o<t.length;o+=1)for(a=[],128>(s=t.charCodeAt(o))?a.push(s):2048>s?(a.push(192|s>>>6),a.push(128|63&s)):55296>s||57344<=s?a.push(224|s>>>12,128|s>>>6&63,128|63&s):(o+=1,s=65536+((1023&s)<<10|1023&t.charCodeAt(o)),a.push(240|s>>>18,128|s>>>12&63,128|s>>>6&63,128|63&s)),l=0;l<a.length;l+=1){for(h=(u=p+g)>>>2;f.length<=h;)f.push(0);f[h]|=a[l]<<8*(c+r*(u%4)),p+=1}else for(c=-1===r?2:0,d="UTF16LE"===e&&1!==r||"UTF16LE"!==e&&1===r,o=0;o<t.length;o+=1){for(s=t.charCodeAt(o),!0===d&&(s=(l=255&s)<<8|s>>>8),h=(u=p+g)>>>2;f.length<=h;)f.push(0);f[h]|=s<<8*(c+r*(u%4)),p+=2}return{value:f,binLen:8*p+n}}(t,n,e,i,r)};case"B64":return function(t,i,n){return function(t,i,n,r){var s,a,o,l,h,u,c=0,d=i||[0],p=(n=n||0)>>>3,f=-1===r?3:0,g=t.indexOf("=");if(-1===t.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(t=t.replace(/=/g,""),-1!==g&&g<t.length)throw new Error("Invalid '=' found in base-64 string");for(s=0;s<t.length;s+=4){for(l=t.substr(s,4),o=0,a=0;a<l.length;a+=1)o|=e.indexOf(l.charAt(a))<<18-6*a;for(a=0;a<l.length-1;a+=1){for(h=(u=c+p)>>>2;d.length<=h;)d.push(0);d[h]|=(o>>>16-8*a&255)<<8*(f+r*(u%4)),c+=1}}return{value:d,binLen:8*c+n}}(t,i,n,r)};case"BYTES":return function(t,e,i){return function(t,e,i,n){var r,s,a,o,l=e||[0],h=(i=i||0)>>>3,u=-1===n?3:0;for(s=0;s<t.length;s+=1)r=t.charCodeAt(s),a=(o=s+h)>>>2,l.length<=a&&l.push(0),l[a]|=r<<8*(u+n*(o%4));return{value:l,binLen:8*t.length+i}}(t,e,i,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error("ARRAYBUFFER not supported by this environment")}return function(t,e,n){return function(t,e,n,r){return i(new Uint8Array(t),e,n,r)}(t,e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error("UINT8ARRAY not supported by this environment")}return function(t,e,n){return i(t,e,n,r)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function r(t,i,n,r){switch(t){case"HEX":return function(t){return function(t,e,i,n){var r,s,a="",o=e/8,l=-1===i?3:0;for(r=0;r<o;r+=1)s=t[r>>>2]>>>8*(l+i*(r%4)),a+="0123456789abcdef".charAt(s>>>4&15)+"0123456789abcdef".charAt(15&s);return n.outputUpper?a.toUpperCase():a}(t,i,n,r)};case"B64":return function(t){return function(t,i,n,r){var s,a,o,l,h,u="",c=i/8,d=-1===n?3:0;for(s=0;s<c;s+=3)for(l=s+1<c?t[s+1>>>2]:0,h=s+2<c?t[s+2>>>2]:0,o=(t[s>>>2]>>>8*(d+n*(s%4))&255)<<16|(l>>>8*(d+n*((s+1)%4))&255)<<8|h>>>8*(d+n*((s+2)%4))&255,a=0;a<4;a+=1)u+=8*s+6*a<=i?e.charAt(o>>>6*(3-a)&63):r.b64Pad;return u}(t,i,n,r)};case"BYTES":return function(t){return function(t,e,i){var n,r,s="",a=e/8,o=-1===i?3:0;for(n=0;n<a;n+=1)r=t[n>>>2]>>>8*(o+i*(n%4))&255,s+=String.fromCharCode(r);return s}(t,i,n)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error("ARRAYBUFFER not supported by this environment")}return function(t){return function(t,e,i){var n,r=e/8,s=new ArrayBuffer(r),a=new Uint8Array(s),o=-1===i?3:0;for(n=0;n<r;n+=1)a[n]=t[n>>>2]>>>8*(o+i*(n%4))&255;return s}(t,i,n)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error("UINT8ARRAY not supported by this environment")}return function(t){return function(t,e,i){var n,r=e/8,s=-1===i?3:0,a=new Uint8Array(r);for(n=0;n<r;n+=1)a[n]=t[n>>>2]>>>8*(s+i*(n%4))&255;return a}(t,i,n)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function s(t){var e={outputUpper:!1,b64Pad:"=",outputLen:-1},i=t||{},n="Output length must be a multiple of 8";if(e.outputUpper=i.outputUpper||!1,i.b64Pad&&(e.b64Pad=i.b64Pad),i.outputLen){if(i.outputLen%8!=0)throw new Error(n);e.outputLen=i.outputLen}else if(i.shakeLen){if(i.shakeLen%8!=0)throw new Error(n);e.outputLen=i.shakeLen}if("boolean"!=typeof e.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof e.b64Pad)throw new Error("Invalid b64Pad formatting option");return e}function a(t,e){return t<<e|t>>>32-e}function o(t,e,i){return t^e^i}function l(t,e,i){return t&e^t&i^e&i}function h(t,e){var i=(65535&t)+(65535&e);return(65535&(t>>>16)+(e>>>16)+(i>>>16))<<16|65535&i}function u(t,e,i,n,r){var s=(65535&t)+(65535&e)+(65535&i)+(65535&n)+(65535&r);return(65535&(t>>>16)+(e>>>16)+(i>>>16)+(n>>>16)+(r>>>16)+(s>>>16))<<16|65535&s}function c(t){return[1732584193,4023233417,2562383102,271733878,3285377520]}function d(t,e){var i,n,r,s,c,d,p,f,g=[];for(i=e[0],n=e[1],r=e[2],s=e[3],c=e[4],p=0;p<80;p+=1)g[p]=p<16?t[p]:a(g[p-3]^g[p-8]^g[p-14]^g[p-16],1),d=p<20?u(a(i,5),(f=n)&r^~f&s,c,1518500249,g[p]):p<40?u(a(i,5),o(n,r,s),c,1859775393,g[p]):p<60?u(a(i,5),l(n,r,s),c,2400959708,g[p]):u(a(i,5),o(n,r,s),c,3395469782,g[p]),c=s,s=r,r=a(n,30),n=i,i=d;return e[0]=h(i,e[0]),e[1]=h(n,e[1]),e[2]=h(r,e[2]),e[3]=h(s,e[3]),e[4]=h(c,e[4]),e}function p(t,e,i,n){for(var r,s=15+(e+65>>>9<<4),a=e+i;t.length<=s;)t.push(0);for(t[e>>>5]|=128<<24-e%32,t[s]=4294967295&a,t[s-1]=a/4294967296|0,r=0;r<t.length;r+=16)n=d(t.slice(r,r+16),n);return n}return function(e){function i(t,i,r){var s=this;if("SHA-1"!==t)throw new Error("Chosen SHA variant is not supported");var a=r||{};return(s=e.call(this,t,i,r)||this).t=!0,s.i=s.o,s.u=-1,s.s=n(s.h,s.v,s.u),s.A=d,s.p=function(t){return t.slice()},s.l=c,s.R=p,s.U=[1732584193,4023233417,2562383102,271733878,3285377520],s.T=512,s.m=160,s.F=!1,a.hmacKey&&s.B(function(t,e,i,r){var s="hmacKey must include a value and format";if(!e)throw new Error(s);if(void 0===e.value||!e.format)throw new Error(s);return n(e.format,e.encoding||"UTF8",i)(e.value)}(0,a.hmacKey,s.u)),s}return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}(i,e),i}(function(){function t(t,e,i){var n=i||{};if(this.h=e,this.v=n.encoding||"UTF8",this.numRounds=n.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=t,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return t.prototype.update=function(t){var e,i=0,n=this.T>>>5,r=this.s(t,this.Y,this.I),s=r.binLen,a=r.value,o=s>>>5;for(e=0;e<o;e+=n)i+this.T<=s&&(this.U=this.A(a.slice(e,e+n),this.U),i+=this.T);this.H+=i,this.Y=a.slice(i>>>5),this.I=s%this.T,this.C=!0},t.prototype.getHash=function(t,e){var i,n,a=this.m,o=s(e);if(!0===this.F){if(-1===o.outputLen)throw new Error("Output length must be specified in options");a=o.outputLen}var l=r(t,a,this.u,o);if(!0===this.L&&this.i)return l(this.i(o));for(n=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),i=1;i<this.numRounds;i+=1)!0===this.F&&a%32!=0&&(n[n.length-1]&=16777215>>>24-a%32),n=this.R(n,a,0,this.l(this.g),a);return l(n)},t.prototype.setHMACKey=function(t,e,i){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var r=n(e,(i||{}).encoding||"UTF8",this.u);this.B(r(t))},t.prototype.B=function(t){var e,i=this.T>>>3,n=i/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(i<t.binLen/8&&(t.value=this.R(t.value,t.binLen,0,this.l(this.g),this.m));t.value.length<=n;)t.value.push(0);for(e=0;e<=n;e+=1)this.N[e]=909522486^t.value[e],this.S[e]=1549556828^t.value[e];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},t.prototype.getHMAC=function(t,e){var i=s(e);return r(t,this.m,this.u,i)(this.o())},t.prototype.o=function(){var t;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var e=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return t=this.A(this.S,this.l(this.g)),this.R(e,this.m,this.T,t,this.m)},t}())}()},1120:function(t,e,i){var n;!function(r,s){t.exports?(s.default=s,t.exports=r.document?s(r):s):void 0===(n=function(){return s(r)}.call(e,i,e,t))||(t.exports=n)}("undefined"!=typeof window?window:this,(function(t){function e(t,e,i,n){t.hasOwnProperty(e)||(t[e]=n.apply(null,i))}var i={};return e(i,"Core/Globals.js",[],(function(){var e,i=void 0!==t?t:"undefined"!=typeof window?window:{};return function(t){t.SVG_NS="http://www.w3.org/2000/svg",t.product="Highcharts",t.version="9.1.0",t.win=i,t.doc=t.win.document,t.svg=t.doc&&t.doc.createElementNS&&!!t.doc.createElementNS(t.SVG_NS,"svg").createSVGRect,t.userAgent=t.win.navigator&&t.win.navigator.userAgent||"",t.isChrome=-1!==t.userAgent.indexOf("Chrome"),t.isFirefox=-1!==t.userAgent.indexOf("Firefox"),t.isMS=/(edge|msie|trident)/i.test(t.userAgent)&&!t.win.opera,t.isSafari=!t.isChrome&&-1!==t.userAgent.indexOf("Safari"),t.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(t.userAgent),t.isWebKit=-1!==t.userAgent.indexOf("AppleWebKit"),t.deg2rad=2*Math.PI/360,t.hasBidiBug=t.isFirefox&&4>parseInt(t.userAgent.split("Firefox/")[1],10),t.hasTouch=!!t.win.TouchEvent,t.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],t.noop=function(){},t.supportsPassiveEvents=function(){var e=!1;if(!t.isMS){var i=Object.defineProperty({},"passive",{get:function(){e=!0}});t.win.addEventListener&&t.win.removeEventListener&&(t.win.addEventListener("testPassive",t.noop,i),t.win.removeEventListener("testPassive",t.noop,i))}return e}(),t.charts=[],t.dateFormats={},t.seriesTypes={},t.symbolSizes={}}(e||(e={})),e})),e(i,"Core/Utilities.js",[i["Core/Globals.js"]],(function(t){function e(t,i,n,r){var s=i?"Highcharts error":"Highcharts warning";32===t&&(t=s+": Deprecated member");var a=l(t),o=a?s+" #"+t+": www.highcharts.com/errors/"+t+"/":t.toString();if(void 0!==r){var h="";a&&(o+="?"),m(r,(function(t,e){h+="\n - "+e+": "+t,a&&(o+=encodeURI(e)+"="+encodeURI(t))})),o+=h}y(Highcharts,"displayError",{chart:n,code:t,message:o,params:r},(function(){if(i)throw Error(o);x.console&&-1===e.messages.indexOf(o)&&console.warn(o)})),e.messages.push(o)}function i(t,e){return parseInt(t,e||10)}function n(t){return"string"==typeof t}function r(t){return"[object Array]"===(t=Object.prototype.toString.call(t))||"[object Array Iterator]"===t}function s(t,e){return!(!t||"object"!=typeof t||e&&r(t))}function a(t){return s(t)&&"number"==typeof t.nodeType}function o(t){var e=t&&t.constructor;return!(!s(t,!0)||a(t)||!e||!e.name||"Object"===e.name)}function l(t){return"number"==typeof t&&!isNaN(t)&&1/0>t&&-1/0<t}function h(t){return null!=t}function u(t,e,i){var r;return n(e)?h(i)?t.setAttribute(e,i):t&&t.getAttribute&&((r=t.getAttribute(e))||"class"!==e||(r=t.getAttribute(e+"Name"))):m(e,(function(e,i){t.setAttribute(i,e)})),r}function c(t,e){var i;for(i in t||(t={}),e)t[i]=e[i];return t}function d(){for(var t=arguments,e=t.length,i=0;i<e;i++){var n=t[i];if(null!=n)return n}}function p(e,i){t.isMS&&!t.svg&&i&&void 0!==i.opacity&&(i.filter="alpha(opacity="+100*i.opacity+")"),c(e.style,i)}function f(t,e,i,n,r){return t=T.createElement(t),e&&c(t,e),r&&p(t,{padding:"0",border:"none",margin:"0"}),i&&p(t,i),n&&n.appendChild(t),t}function g(t,e){return parseFloat(t.toPrecision(e||14))}function m(t,e,i){for(var n in t)Object.hasOwnProperty.call(t,n)&&e.call(i||t[n],t[n],n,t)}function v(e,i,n){function r(i,n){var r=e.removeEventListener||t.removeEventListenerPolyfill;r&&r.call(e,i,n,!1)}function s(t){var n;if(e.nodeName){if(i){var s={};s[i]=!0}else s=t;m(s,(function(e,i){if(t[i])for(n=t[i].length;n--;)r(i,t[i][n].fn)}))}}var a="function"==typeof e&&e.prototype||e;if(Object.hasOwnProperty.call(a,"hcEvents")){var o=a.hcEvents;i?(a=o[i]||[],n?(o[i]=a.filter((function(t){return n!==t.fn})),r(i,n)):(s(o),o[i]=[])):(s(o),delete a.hcEvents)}}function y(e,i,n,r){if(n=n||{},T.createEvent&&(e.dispatchEvent||e.fireEvent&&e!==t)){var s=T.createEvent("Events");s.initEvent(i,!0,!0),n=c(s,n),e.dispatchEvent?e.dispatchEvent(n):e.fireEvent(i,n)}else if(e.hcEvents){n.target||c(n,{preventDefault:function(){n.defaultPrevented=!0},target:e,type:i}),s=[];for(var a=e,o=!1;a.hcEvents;)Object.hasOwnProperty.call(a,"hcEvents")&&a.hcEvents[i]&&(s.length&&(o=!0),s.unshift.apply(s,a.hcEvents[i])),a=Object.getPrototypeOf(a);o&&s.sort((function(t,e){return t.order-e.order})),s.forEach((function(t){!1===t.fn.call(e,n)&&n.preventDefault()}))}r&&!n.defaultPrevented&&r.call(e,n)}var b,_=t.charts,T=t.doc,x=t.win;(e||(e={})).messages=[],Math.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)};var S=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){var i,n=t.length;for(i=0;i<n;i++)if(e(t[i],i))return t[i]};m({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},(function(i,n){t[n]=function(t){var r;return e(32,!1,void 0,((r={})["Highcharts."+n]="use Array."+i,r)),Array.prototype[i].apply(t,[].slice.call(arguments,1))}}));var w,k=function(){var t=Math.random().toString(36).substring(2,9)+"-",e=0;return function(){return"highcharts-"+(w?"":t)+e++}}();return x.jQuery&&(x.jQuery.fn.highcharts=function(){var e=[].slice.call(arguments);if(this[0])return e[0]?(new(t[n(e[0])?e.shift():"Chart"])(this[0],e[0],e[1]),this):_[u(this[0],"data-highcharts-chart")]}),{addEvent:function(e,i,n,r){void 0===r&&(r={});var s="function"==typeof e&&e.prototype||e;Object.hasOwnProperty.call(s,"hcEvents")||(s.hcEvents={}),s=s.hcEvents,t.Point&&e instanceof t.Point&&e.series&&e.series.chart&&(e.series.chart.runTrackerClick=!0);var a=e.addEventListener||t.addEventListenerPolyfill;return a&&a.call(e,i,n,!!t.supportsPassiveEvents&&{passive:void 0===r.passive?-1!==i.indexOf("touch"):r.passive,capture:!1}),s[i]||(s[i]=[]),s[i].push({fn:n,order:"number"==typeof r.order?r.order:1/0}),s[i].sort((function(t,e){return t.order-e.order})),function(){v(e,i,n)}},arrayMax:function(t){for(var e=t.length,i=t[0];e--;)t[e]>i&&(i=t[e]);return i},arrayMin:function(t){for(var e=t.length,i=t[0];e--;)t[e]<i&&(i=t[e]);return i},attr:u,clamp:function(t,e,i){return t>e?t<i?t:i:e},cleanRecursively:function t(e,i){var n={};return m(e,(function(r,a){s(e[a],!0)&&!e.nodeType&&i[a]?(r=t(e[a],i[a]),Object.keys(r).length&&(n[a]=r)):(s(e[a])||e[a]!==i[a])&&(n[a]=e[a])})),n},clearTimeout:function(t){h(t)&&clearTimeout(t)},correctFloat:g,createElement:f,css:p,defined:h,destroyObjectProperties:function(t,e){m(t,(function(i,n){i&&i!==e&&i.destroy&&i.destroy(),delete t[n]}))},discardElement:function(t){b||(b=f("div")),t&&b.appendChild(t),b.innerHTML=""},erase:function(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}},error:e,extend:c,extendClass:function(t,e){var i=function(){};return c(i.prototype=new t,e),i},find:S,fireEvent:y,getMagnitude:function(t){return Math.pow(10,Math.floor(Math.log(t)/Math.LN10))},getNestedProperty:function(t,e){for(t=t.split(".");t.length&&h(e);){var i=t.shift();if(void 0===i||"__proto__"===i)return;if(!h(e=e[i])||"function"==typeof e||"number"==typeof e.nodeType||e===x)return}return e},getStyle:function n(r,s,a){var o=t.getStyle||n;if("width"===s)return s=Math.min(r.offsetWidth,r.scrollWidth),(a=r.getBoundingClientRect&&r.getBoundingClientRect().width)<s&&a>=s-1&&(s=Math.floor(a)),Math.max(0,s-(o(r,"padding-left",!0)||0)-(o(r,"padding-right",!0)||0));if("height"===s)return Math.max(0,Math.min(r.offsetHeight,r.scrollHeight)-(o(r,"padding-top",!0)||0)-(o(r,"padding-bottom",!0)||0));if(x.getComputedStyle||e(27,!0),r=x.getComputedStyle(r,void 0)){var l=r.getPropertyValue(s);d(a,"opacity"!==s)&&(l=i(l))}return l},inArray:function(t,i,n){return e(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),i.indexOf(t,n)},isArray:r,isClass:o,isDOMElement:a,isFunction:function(t){return"function"==typeof t},isNumber:l,isObject:s,isString:n,keys:function(t){return e(32,!1,void 0,{"Highcharts.keys":"use Object.keys"}),Object.keys(t)},merge:function(){var t,e=arguments,i={},n=function(t,e){return"object"!=typeof t&&(t={}),m(e,(function(i,r){"__proto__"!==r&&"constructor"!==r&&(!s(i,!0)||o(i)||a(i)?t[r]=e[r]:t[r]=n(t[r]||{},i))})),t};!0===e[0]&&(i=e[1],e=Array.prototype.slice.call(e,2));var r=e.length;for(t=0;t<r;t++)i=n(i,e[t]);return i},normalizeTickInterval:function(t,e,i,n,r){var s=t,a=t/(i=d(i,1));for(e||(e=r?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===n&&(1===i?e=e.filter((function(t){return 0==t%1})):.1>=i&&(e=[1/i]))),n=0;n<e.length&&(s=e[n],!(r&&s*i>=t||!r&&a<=(e[n]+(e[n+1]||e[n]))/2));n++);return g(s*i,-Math.round(Math.log(.001)/Math.LN10))},objectEach:m,offset:function(t){var e=T.documentElement;return{top:(t=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0,width:0,height:0}).top+(x.pageYOffset||e.scrollTop)-(e.clientTop||0),left:t.left+(x.pageXOffset||e.scrollLeft)-(e.clientLeft||0),width:t.width,height:t.height}},pad:function(t,e,i){return Array((e||2)+1-String(t).replace("-","").length).join(i||"0")+t},pick:d,pInt:i,relativeLength:function(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)},removeEvent:v,splat:function(t){return r(t)?t:[t]},stableSort:function(t,e){var i,n,r=t.length;for(n=0;n<r;n++)t[n].safeI=n;for(t.sort((function(t,n){return 0===(i=e(t,n))?t.safeI-n.safeI:i})),n=0;n<r;n++)delete t[n].safeI},syncTimeout:function(t,e,i){return 0<e?setTimeout(t,e,i):(t.call(0,i),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:k,useSerialIds:function(t){return w=d(t,w)},wrap:function(t,e,i){var n=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments),e=arguments,r=this;return r.proceed=function(){n.apply(r,arguments.length?arguments:e)},t.unshift(n),t=i.apply(this,t),r.proceed=null,t}}}})),e(i,"Core/Color/Color.js",[i["Core/Globals.js"],i["Core/Utilities.js"]],(function(t,e){var i=e.isNumber,n=e.merge,r=e.pInt;return e=function(){function e(i){return this.parsers=[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),parseFloat(t[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),1]}}],this.rgba=[],t.Color!==e?new t.Color(i):this instanceof e?void this.init(i):new e(i)}return e.parse=function(t){return new e(t)},e.prototype.init=function(t){var i,n;if((this.input=t=e.names[t&&t.toLowerCase?t.toLowerCase():""]||t)&&t.stops)this.stops=t.stops.map((function(t){return new e(t[1])}));else{if(t&&t.charAt&&"#"===t.charAt()){var r=t.length;t=parseInt(t.substr(1),16),7===r?i=[(16711680&t)>>16,(65280&t)>>8,255&t,1]:4===r&&(i=[(3840&t)>>4|(3840&t)>>8,(240&t)>>4|240&t,(15&t)<<4|15&t,1])}if(!i)for(n=this.parsers.length;n--&&!i;){var s=this.parsers[n];(r=s.regex.exec(t))&&(i=s.parse(r))}}this.rgba=i||[]},e.prototype.get=function(t){var e=this.input,r=this.rgba;if(void 0!==this.stops){var s=n(e);s.stops=[].concat(s.stops),this.stops.forEach((function(e,i){s.stops[i]=[s.stops[i][0],e.get(t)]}))}else s=r&&i(r[0])?"rgb"===t||!t&&1===r[3]?"rgb("+r[0]+","+r[1]+","+r[2]+")":"a"===t?r[3]:"rgba("+r.join(",")+")":e;return s},e.prototype.brighten=function(t){var e,n=this.rgba;if(this.stops)this.stops.forEach((function(e){e.brighten(t)}));else if(i(t)&&0!==t)for(e=0;3>e;e++)n[e]+=r(255*t),0>n[e]&&(n[e]=0),255<n[e]&&(n[e]=255);return this},e.prototype.setOpacity=function(t){return this.rgba[3]=t,this},e.prototype.tweenTo=function(t,e){var i=this.rgba,n=t.rgba;return n.length&&i&&i.length?e=((t=1!==n[3]||1!==i[3])?"rgba(":"rgb(")+Math.round(n[0]+(i[0]-n[0])*(1-e))+","+Math.round(n[1]+(i[1]-n[1])*(1-e))+","+Math.round(n[2]+(i[2]-n[2])*(1-e))+(t?","+(n[3]+(i[3]-n[3])*(1-e)):"")+")":e=t.input||"none",e},e.names={white:"#ffffff",black:"#000000"},e}(),t.Color=e,t.color=e.parse,e})),e(i,"Core/Color/Palette.js",[],(function(){return{colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),backgroundColor:"#ffffff",neutralColor100:"#000000",neutralColor80:"#333333",neutralColor60:"#666666",neutralColor40:"#999999",neutralColor20:"#cccccc",neutralColor10:"#e6e6e6",neutralColor5:"#f2f2f2",neutralColor3:"#f7f7f7",highlightColor100:"#003399",highlightColor80:"#335cad",highlightColor60:"#6685c2",highlightColor20:"#ccd6eb",highlightColor10:"#e6ebf5",positiveColor:"#06b535",negativeColor:"#f21313"}})),e(i,"Core/Time.js",[i["Core/Globals.js"],i["Core/Utilities.js"]],(function(t,e){var i=t.win,n=e.defined,r=e.error,s=e.extend,a=e.isObject,o=e.merge,l=e.objectEach,h=e.pad,u=e.pick,c=e.splat,d=e.timeUnits;return e=function(){function e(t){this.options={},this.variableTimezone=this.useUTC=!1,this.Date=i.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(t)}return e.prototype.get=function(t,e){if(this.variableTimezone||this.timezoneOffset){var i=e.getTime(),n=i-this.getTimezoneOffset(e);return e.setTime(n),t=e["getUTC"+t](),e.setTime(i),t}return this.useUTC?e["getUTC"+t]():e["get"+t]()},e.prototype.set=function(t,e,i){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===t||"Seconds"===t||"Minutes"===t&&0==this.getTimezoneOffset(e)%36e5)return e["setUTC"+t](i);var n=this.getTimezoneOffset(e);return n=e.getTime()-n,e.setTime(n),e["setUTC"+t](i),t=this.getTimezoneOffset(e),n=e.getTime()+t,e.setTime(n)}return this.useUTC?e["setUTC"+t](i):e["set"+t](i)},e.prototype.update=function(t){var e=u(t&&t.useUTC,!0);this.options=t=o(!0,this.options||{},t),this.Date=t.Date||i.Date||Date,this.timezoneOffset=(this.useUTC=e)&&t.timezoneOffset,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=e&&!(!t.getTimezoneOffset&&!t.timezone)},e.prototype.makeTime=function(e,i,n,r,s,a){if(this.useUTC){var o=this.Date.UTC.apply(0,arguments),l=this.getTimezoneOffset(o);o+=l;var h=this.getTimezoneOffset(o);l!==h?o+=h-l:l-36e5!==this.getTimezoneOffset(o-36e5)||t.isSafari||(o-=36e5)}else o=new this.Date(e,i,u(n,1),u(r,0),u(s,0),u(a,0)).getTime();return o},e.prototype.timezoneOffsetFunction=function(){var t=this,e=this.options,n=e.moment||i.moment;if(!this.useUTC)return function(t){return 6e4*new Date(t.toString()).getTimezoneOffset()};if(e.timezone){if(n)return function(t){return 6e4*-n.tz(t,e.timezone).utcOffset()};r(25)}return this.useUTC&&e.getTimezoneOffset?function(t){return 6e4*e.getTimezoneOffset(t.valueOf())}:function(){return 6e4*(t.timezoneOffset||0)}},e.prototype.dateFormat=function(e,i,r){if(!n(i)||isNaN(i))return t.defaultOptions.lang&&t.defaultOptions.lang.invalidDate||"";e=u(e,"%Y-%m-%d %H:%M:%S");var a=this,o=new this.Date(i),c=this.get("Hours",o),d=this.get("Day",o),p=this.get("Date",o),f=this.get("Month",o),g=this.get("FullYear",o),m=t.defaultOptions.lang,v=m&&m.weekdays,y=m&&m.shortWeekdays;return o=s({a:y?y[d]:v[d].substr(0,3),A:v[d],d:h(p),e:h(p,2," "),w:d,b:m.shortMonths[f],B:m.months[f],m:h(f+1),o:f+1,y:g.toString().substr(2,2),Y:g,H:h(c),k:c,I:h(c%12||12),l:c%12||12,M:h(this.get("Minutes",o)),p:12>c?"AM":"PM",P:12>c?"am":"pm",S:h(o.getSeconds()),L:h(Math.floor(i%1e3),3)},t.dateFormats),l(o,(function(t,n){for(;-1!==e.indexOf("%"+n);)e=e.replace("%"+n,"function"==typeof t?t.call(a,i):t)})),r?e.substr(0,1).toUpperCase()+e.substr(1):e},e.prototype.resolveDTLFormat=function(t){return a(t,!0)?t:{main:(t=c(t))[0],from:t[1],to:t[2]}},e.prototype.getTimeTicks=function(t,e,i,r){var a,o=this,l=[],h={},c=new o.Date(e),p=t.unitRange,f=t.count||1;if(r=u(r,1),n(e)){if(o.set("Milliseconds",c,p>=d.second?0:f*Math.floor(o.get("Milliseconds",c)/f)),p>=d.second&&o.set("Seconds",c,p>=d.minute?0:f*Math.floor(o.get("Seconds",c)/f)),p>=d.minute&&o.set("Minutes",c,p>=d.hour?0:f*Math.floor(o.get("Minutes",c)/f)),p>=d.hour&&o.set("Hours",c,p>=d.day?0:f*Math.floor(o.get("Hours",c)/f)),p>=d.day&&o.set("Date",c,p>=d.month?1:Math.max(1,f*Math.floor(o.get("Date",c)/f))),p>=d.month){o.set("Month",c,p>=d.year?0:f*Math.floor(o.get("Month",c)/f));var g=o.get("FullYear",c)}p>=d.year&&o.set("FullYear",c,g-g%f),p===d.week&&(g=o.get("Day",c),o.set("Date",c,o.get("Date",c)-g+r+(g<r?-7:0))),g=o.get("FullYear",c),r=o.get("Month",c);var m=o.get("Date",c),v=o.get("Hours",c);for(e=c.getTime(),!o.variableTimezone&&o.useUTC||!n(i)||(a=i-e>4*d.month||o.getTimezoneOffset(e)!==o.getTimezoneOffset(i)),e=c.getTime(),c=1;e<i;)l.push(e),e=p===d.year?o.makeTime(g+c*f,0):p===d.month?o.makeTime(g,r+c*f):!a||p!==d.day&&p!==d.week?a&&p===d.hour&&1<f?o.makeTime(g,r,m,v+c*f):e+p*f:o.makeTime(g,r,m+c*f*(p===d.day?1:7)),c++;l.push(e),p<=d.hour&&1e4>l.length&&l.forEach((function(t){0==t%18e5&&"000000000"===o.dateFormat("%H%M%S%L",t)&&(h[t]="day")}))}return l.info=s(t,{higherRanks:h,totalRange:p*f}),l},e}(),t.Time=e,t.Time})),e(i,"Core/Options.js",[i["Core/Globals.js"],i["Core/Color/Color.js"],i["Core/Color/Palette.js"],i["Core/Time.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r){var s=t.isTouchDevice,a=t.svg;e=e.parse;var o=r.merge,l={colors:i.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:{panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},zoomBySingleTouch:!1,width:null,height:null,borderColor:i.highlightColor80,backgroundColor:i.backgroundColor,plotBorderColor:i.neutralColor20},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},labels:{style:{position:"absolute",color:i.neutralColor80}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:i.neutralColor40,borderRadius:0,navigation:{activeColor:i.highlightColor100,inactiveColor:i.neutralColor20},itemStyle:{color:i.neutralColor80,cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:i.neutralColor100},itemHiddenStyle:{color:i.neutralColor20},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:i.backgroundColor,opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:a,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:s?25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:e(i.neutralColor3).setOpacity(.85).get(),borderWidth:1,shadow:!0,style:{color:i.neutralColor80,cursor:"default",fontSize:"12px",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:i.neutralColor40,fontSize:"9px"},text:"Highcharts.com"}};l.chart.styledMode=!1;var h=new n(o(l.global,l.time));return{defaultOptions:l,defaultTime:h,getOptions:function(){return l},setOptions:function(e){return o(!0,l,e),(e.time||e.global)&&(t.time?t.time.update(o(l.global,l.time,e.global,e.time)):t.time=h),l}}})),e(i,"Core/Animation/Fx.js",[i["Core/Color/Color.js"],i["Core/Globals.js"],i["Core/Utilities.js"]],(function(t,e,i){var n=t.parse,r=e.win,s=i.isNumber,a=i.objectEach;return function(){function t(t,e,i){this.pos=NaN,this.options=e,this.elem=t,this.prop=i}return t.prototype.dSetter=function(){var t=this.paths,e=t&&t[0];t=t&&t[1];var i=this.now||0,n=[];if(1!==i&&e&&t)if(e.length===t.length&&1>i)for(var r=0;r<t.length;r++){for(var a=e[r],o=t[r],l=[],h=0;h<o.length;h++){var u=a[h],c=o[h];s(u)&&s(c)&&("A"!==o[0]||4!==h&&5!==h)?l[h]=u+i*(c-u):l[h]=c}n.push(l)}else n=t;else n=this.toD||[];this.elem.attr("d",n,void 0,!0)},t.prototype.update=function(){var t=this.elem,e=this.prop,i=this.now,n=this.options.step;this[e+"Setter"]?this[e+"Setter"]():t.attr?t.element&&t.attr(e,i,null,!0):t.style[e]=i+this.unit,n&&n.call(t,i,this)},t.prototype.run=function(e,i,n){var s=this,a=s.options,o=function(t){return!o.stopped&&s.step(t)},l=r.requestAnimationFrame||function(t){setTimeout(t,13)},h=function(){for(var e=0;e<t.timers.length;e++)t.timers[e]()||t.timers.splice(e--,1);t.timers.length&&l(h)};e!==i||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=e,this.end=i,this.unit=n,this.now=this.start,this.pos=0,o.elem=this.elem,o.prop=this.prop,o()&&1===t.timers.push(o)&&l(h)):(delete a.curAnim[this.prop],a.complete&&0===Object.keys(a.curAnim).length&&a.complete.call(this.elem))},t.prototype.step=function(t){var e=+new Date,i=this.options,n=this.elem,r=i.complete,s=i.duration,o=i.curAnim;if(n.attr&&!n.element)t=!1;else if(t||e>=s+this.startTime){this.now=this.end,this.pos=1,this.update();var l=o[this.prop]=!0;a(o,(function(t){!0!==t&&(l=!1)})),l&&r&&r.call(n),t=!1}else this.pos=i.easing((e-this.startTime)/s),this.now=this.start+(this.end-this.start)*this.pos,this.update(),t=!0;return t},t.prototype.initPath=function(t,e,i){function n(t,e){for(;t.length<d;){var i=t[0],n=e[d-t.length];n&&"M"===i[0]&&(t[0]="C"===n[0]?["C",i[1],i[2],i[1],i[2],i[1],i[2]]:["L",i[1],i[2]]),t.unshift(i),l&&(i=t.pop(),t.push(t[t.length-1],i))}}function r(t,e){for(;t.length<d;)if("C"===(e=t[Math.floor(t.length/h)-1].slice())[0]&&(e[1]=e[5],e[2]=e[6]),l){var i=t[Math.floor(t.length/h)].slice();t.splice(t.length/2,0,e,i)}else t.push(e)}var a=t.startX,o=t.endX;i=i.slice();var l=t.isArea,h=l?2:1;if(!(e=e&&e.slice()))return[i,i];if(a&&o&&o.length){for(t=0;t<a.length;t++){if(a[t]===o[0]){var u=t;break}if(a[0]===o[o.length-a.length+t]){u=t;var c=!0;break}if(a[a.length-1]===o[o.length-a.length+t]){u=a.length-t;break}}void 0===u&&(e=[])}if(e.length&&s(u)){var d=i.length+u*h;c?(n(e,i),r(i,e)):(n(i,e),r(e,i))}return[e,i]},t.prototype.fillSetter=function(){t.prototype.strokeSetter.apply(this,arguments)},t.prototype.strokeSetter=function(){this.elem.attr(this.prop,n(this.start).tweenTo(n(this.end),this.pos),null,!0)},t.timers=[],t}()})),e(i,"Core/Animation/AnimationUtilities.js",[i["Core/Animation/Fx.js"],i["Core/Utilities.js"]],(function(t,e){function i(t){return l(t)?h({duration:500,defer:0},t):{duration:t?500:0,defer:0}}function n(e,i){for(var n=t.timers.length;n--;)t.timers[n].elem!==e||i&&i!==t.timers[n].prop||(t.timers[n].stopped=!0)}var r=e.defined,s=e.getStyle,a=e.isArray,o=e.isNumber,l=e.isObject,h=e.merge,u=e.objectEach,c=e.pick;return{animate:function(e,i,r){var c,d,p,f="";if(!l(r)){var g=arguments;r={duration:g[2],easing:g[3],complete:g[4]}}o(r.duration)||(r.duration=400),r.easing="function"==typeof r.easing?r.easing:Math[r.easing]||Math.easeInOutSine,r.curAnim=h(i),u(i,(function(o,l){n(e,l),p=new t(e,r,l),d=void 0,"d"===l&&a(i.d)?(p.paths=p.initPath(e,e.pathArray,i.d),p.toD=i.d,c=0,d=1):e.attr?c=e.attr(l):(c=parseFloat(s(e,l))||0,"opacity"!==l&&(f="px")),d||(d=o),"string"==typeof d&&d.match("px")&&(d=d.replace(/px/g,"")),p.run(c,d,f)}))},animObject:i,getDeferredAnimation:function(t,e,n){var s=i(e),a=0,o=0;return(n?[n]:t.series).forEach((function(t){t=i(t.options.animation),a=e&&r(e.defer)?s.defer:Math.max(a,t.duration+t.defer),o=Math.min(s.duration,t.duration)})),t.renderer.forExport&&(a=0),{defer:Math.max(0,a-o),duration:Math.min(a,o)}},setAnimation:function(t,e){e.renderer.globalAnimation=c(t,e.options.chart.animation,!0)},stop:n}})),e(i,"Core/Renderer/HTML/AST.js",[i["Core/Globals.js"],i["Core/Utilities.js"]],(function(t,e){var i=t.SVG_NS,n=e.attr,r=e.createElement,s=e.discardElement,a=e.error,o=e.isString,l=e.objectEach,h=e.splat,u=!1;try{u=!!(new DOMParser).parseFromString("","text/html")}catch(t){}return function(){function e(t){this.nodes="string"==typeof t?this.parseMarkup(t):t}return e.filterUserAttributes=function(t){return l(t,(function(i,n){var r=!0;-1===e.allowedAttributes.indexOf(n)&&(r=!1),-1!==["background","dynsrc","href","lowsrc","src"].indexOf(n)&&(r=o(i)&&e.allowedReferences.some((function(t){return 0===i.indexOf(t)}))),r||(a("Highcharts warning: Invalid attribute '"+n+"' in config"),delete t[n])})),t},e.setElementHTML=function(t,i){t.innerHTML="",i&&new e(i).addToDOM(t)},e.prototype.addToDOM=function(r){return function r(s,o){var u;return h(s).forEach((function(s){var h=s.tagName,c=s.textContent?t.doc.createTextNode(s.textContent):void 0;if(h)if("#text"===h)var d=c;else if(-1!==e.allowedTags.indexOf(h)){h=t.doc.createElementNS("svg"===h?i:o.namespaceURI||i,h);var p=s.attributes||{};l(s,(function(t,e){"tagName"!==e&&"attributes"!==e&&"children"!==e&&"textContent"!==e&&(p[e]=t)})),n(h,e.filterUserAttributes(p)),c&&h.appendChild(c),r(s.children||[],h),d=h}else a("Highcharts warning: Invalid tagName '"+h+"' in config");d&&o.appendChild(d),u=d})),u}(this.nodes,r)},e.prototype.parseMarkup=function(t){var e=[];if(u)t=(new DOMParser).parseFromString(t,"text/html");else{var i=r("div");i.innerHTML=t,t={body:i}}var n=function(t,e){var i=t.nodeName.toLowerCase(),r={tagName:i};if("#text"===i){if(i=t.textContent||"",/^[\s]*$/.test(i))return;r.textContent=i}if(i=t.attributes){var s={};[].forEach.call(i,(function(t){s[t.name]=t.value})),r.attributes=s}if(t.childNodes.length){var a=[];[].forEach.call(t.childNodes,(function(t){n(t,a)})),a.length&&(r.children=a)}e.push(r)};return[].forEach.call(t.body.childNodes,(function(t){return n(t,e)})),i&&s(i),e},e.allowedTags="a b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "),e.allowedAttributes="aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style result rowspan summary target tabindex text-align textAnchor textLength type valign width x x1 x2 y y1 y2 zIndex".split(" "),e.allowedReferences="https:// http:// mailto: / ../ ./ #".split(" "),e}()})),e(i,"Core/FormatUtilities.js",[i["Core/Options.js"],i["Core/Utilities.js"]],(function(t,e){function i(t,e,i,r){t=+t||0,e=+e;var s=n.lang,h=(t.toString().split(".")[1]||"").split("e")[0].length,u=t.toString().split("e"),c=e;if(-1===e)e=Math.min(h,20);else if(a(e)){if(e&&u[1]&&0>u[1]){var d=e+ +u[1];0<=d?(u[0]=(+u[0]).toExponential(d).split("e")[0],e=d):(u[0]=u[0].split(".")[0]||0,t=20>e?(u[0]*Math.pow(10,u[1])).toFixed(e):0,u[1]=0)}}else e=2;d=(Math.abs(u[1]?u[0]:t)+Math.pow(10,-Math.max(e,h)-1)).toFixed(e);var p=3<(h=String(l(d))).length?h.length%3:0;return i=o(i,s.decimalPoint),r=o(r,s.thousandsSep),t=(0>t?"-":"")+(p?h.substr(0,p)+r:""),t=0>+u[1]&&!c?"0":t+h.substr(p).replace(/(\d{3})(?=\d)/g,"$1"+r),e&&(t+=i+d.slice(-e)),u[1]&&0!=+t&&(t+="e"+u[1]),t}var n=t.defaultOptions,r=t.defaultTime,s=e.getNestedProperty,a=e.isNumber,o=e.pick,l=e.pInt;return{dateFormat:function(t,e,i){return r.dateFormat(t,e,i)},format:function(t,e,a){var o="{",l=!1,h=/f$/,u=/\.([0-9])/,c=n.lang,d=a&&a.time||r;a=a&&a.numberFormatter||i;for(var p=[];t;){var f=t.indexOf(o);if(-1===f)break;var g=t.slice(0,f);if(l){if(g=g.split(":"),o=s(g.shift()||"",e),g.length&&"number"==typeof o)if(g=g.join(":"),h.test(g)){var m=parseInt((g.match(u)||["","-1"])[1],10);null!==o&&(o=a(o,m,c.decimalPoint,-1<g.indexOf(",")?c.thousandsSep:""))}else o=d.dateFormat(g,o);p.push(o)}else p.push(g);t=t.slice(f+1),o=(l=!l)?"}":"{"}return p.push(t),p.join("")},numberFormat:i}})),e(i,"Core/Renderer/SVG/SVGElement.js",[i["Core/Animation/AnimationUtilities.js"],i["Core/Renderer/HTML/AST.js"],i["Core/Color/Color.js"],i["Core/Globals.js"],i["Core/Color/Palette.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r,s){var a=t.animate,o=t.animObject,l=t.stop,h=n.deg2rad,u=n.doc,c=n.noop,d=n.svg,p=n.SVG_NS,f=n.win,g=s.addEvent,m=s.attr,v=s.createElement,y=s.css,b=s.defined,_=s.erase,T=s.extend,x=s.fireEvent,S=s.isArray,w=s.isFunction,k=s.isNumber,C=s.isString,E=s.merge,A=s.objectEach,P=s.pick,O=s.pInt,L=s.syncTimeout,M=s.uniqueKey;return(t=function(){function t(){this.element=void 0,this.onEvents={},this.opacity=1,this.renderer=void 0,this.SVG_NS=p,this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ")}return t.prototype._defaultGetter=function(t){return t=P(this[t+"Value"],this[t],this.element?this.element.getAttribute(t):null,0),/^[\-0-9\.]+$/.test(t)&&(t=parseFloat(t)),t},t.prototype._defaultSetter=function(t,e,i){i.setAttribute(e,t)},t.prototype.add=function(t){var e=this.renderer,i=this.element;if(t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&"text"===this.element.nodeName&&e.buildText(this),this.added=!0,!t||t.handleZ||this.zIndex)var n=this.zIndexSetter();return n||(t?t.element:e.box).appendChild(i),this.onAdd&&this.onAdd(),this},t.prototype.addClass=function(t,e){var i=e?"":this.attr("class")||"";return(t=(t||"").split(/ /g).reduce((function(t,e){return-1===i.indexOf(e)&&t.push(e),t}),i?[i]:[]).join(" "))!==i&&this.attr("class",t),this},t.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},t.prototype.align=function(t,e,i){var n,r,s,a={},o=this.renderer,l=o.alignedObjects;t?(this.alignOptions=t,this.alignByTranslate=e,(!i||C(i))&&(this.alignTo=n=i||"renderer",_(l,this),l.push(this),i=void 0)):(t=this.alignOptions,e=this.alignByTranslate,n=this.alignTo),i=P(i,o[n],"scrollablePlotBox"===n?o.plotBox:void 0,o),n=t.align;var h=t.verticalAlign;return o=(i.x||0)+(t.x||0),l=(i.y||0)+(t.y||0),"right"===n?r=1:"center"===n&&(r=2),r&&(o+=(i.width-(t.width||0))/r),a[e?"translateX":"x"]=Math.round(o),"bottom"===h?s=1:"middle"===h&&(s=2),s&&(l+=(i.height-(t.height||0))/s),a[e?"translateY":"y"]=Math.round(l),this[this.placed?"animate":"attr"](a),this.placed=!0,this.alignAttr=a,this},t.prototype.alignSetter=function(t){var e={left:"start",center:"middle",right:"end"};e[t]&&(this.alignValue=t,this.element.setAttribute("text-anchor",e[t]))},t.prototype.animate=function(t,e,i){var n=this,r=o(P(e,this.renderer.globalAnimation,!0));return e=r.defer,P(u.hidden,u.msHidden,u.webkitHidden,!1)&&(r.duration=0),0!==r.duration?(i&&(r.complete=i),L((function(){n.element&&a(n,t,r)}),e)):(this.attr(t,void 0,i),A(t,(function(t,e){r.step&&r.step.call(this,t,{prop:e,pos:1,elem:this})}),this)),this},t.prototype.applyTextOutline=function(t){var e=this.element;-1!==t.indexOf("contrast")&&(t=t.replace(/contrast/g,this.renderer.getContrast(e.style.fill)));var i=t.split(" ");if(t=i[i.length-1],(i=i[0])&&"none"!==i&&n.svg){this.fakeTS=!0,this.ySetter=this.xSetter,i=i.replace(/(^[\d\.]+)(.*?)$/g,(function(t,e,i){return 2*Number(e)+i})),this.removeTextOutline();var r=u.createElementNS(p,"tspan");m(r,{class:"highcharts-text-outline",fill:t,stroke:t,"stroke-width":i,"stroke-linejoin":"round"}),[].forEach.call(e.childNodes,(function(t){var e=t.cloneNode(!0);e.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach((function(t){return e.removeAttribute(t)})),r.appendChild(e)}));var s=u.createElementNS(p,"tspan");s.textContent="​",["x","y"].forEach((function(t){var i=e.getAttribute(t);i&&s.setAttribute(t,i)})),r.appendChild(s),e.insertBefore(r,e.firstChild)}},t.prototype.attr=function(t,e,i,n){var r,s,a,o=this.element,h=this.symbolCustomAttribs,u=this;if("string"==typeof t&&void 0!==e){var c=t;(t={})[c]=e}return"string"==typeof t?u=(this[t+"Getter"]||this._defaultGetter).call(this,t,o):(A(t,(function(e,i){s=!1,n||l(this,i),this.symbolName&&-1!==h.indexOf(i)&&(r||(this.symbolAttr(t),r=!0),s=!0),!this.rotation||"x"!==i&&"y"!==i||(this.doTransform=!0),s||((a=this[i+"Setter"]||this._defaultSetter).call(this,e,i,o),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(i)&&this.updateShadows(i,e,a))}),this),this.afterSetters()),i&&i.call(this),u},t.prototype.clip=function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":"none")},t.prototype.crisp=function(t,e){e=e||t.strokeWidth||0;var i=Math.round(e)%2/2;return t.x=Math.floor(t.x||this.x||0)+i,t.y=Math.floor(t.y||this.y||0)+i,t.width=Math.floor((t.width||this.width||0)-2*i),t.height=Math.floor((t.height||this.height||0)-2*i),b(t.strokeWidth)&&(t.strokeWidth=e),t},t.prototype.complexColor=function(t,e,n){var r,s,a,o,l,h,u,c,d,p,f,g=this.renderer,m=[];x(this.renderer,"complexColor",{args:arguments},(function(){if(t.radialGradient?s="radialGradient":t.linearGradient&&(s="linearGradient"),s){if(a=t[s],l=g.gradients,h=t.stops,d=n.radialReference,S(a)&&(t[s]=a={x1:a[0],y1:a[1],x2:a[2],y2:a[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===s&&d&&!b(a.gradientUnits)&&(o=a,a=E(a,g.getRadialAttr(d,o),{gradientUnits:"userSpaceOnUse"})),A(a,(function(t,e){"id"!==e&&m.push(e,t)})),A(h,(function(t){m.push(t)})),m=m.join(","),l[m])p=l[m].attr("id");else{a.id=p=M();var v=l[m]=g.createElement(s).attr(a).add(g.defs);v.radAttr=o,v.stops=[],h.forEach((function(t){0===t[1].indexOf("rgba")?(r=i.parse(t[1]),u=r.get("rgb"),c=r.get("a")):(u=t[1],c=1),t=g.createElement("stop").attr({offset:t[0],"stop-color":u,"stop-opacity":c}).add(v),v.stops.push(t)}))}f="url("+g.url+"#"+p+")",n.setAttribute(e,f),n.gradient=m,t.toString=function(){return f}}}))},t.prototype.css=function(t){var e=this.styles,i={},n=this.element,r=["textOutline","textOverflow","width"],s="",a=!e;if(t&&t.color&&(t.fill=t.color),e&&A(t,(function(t,n){e&&e[n]!==t&&(i[n]=t,a=!0)})),a){if(e&&(t=T(e,i)),t)if(null===t.width||"auto"===t.width)delete this.textWidth;else if("text"===n.nodeName.toLowerCase()&&t.width)var o=this.textWidth=O(t.width);if(this.styles=t,o&&!d&&this.renderer.forExport&&delete t.width,n.namespaceURI===this.SVG_NS){var l=function(t,e){return"-"+e.toLowerCase()};A(t,(function(t,e){-1===r.indexOf(e)&&(s+=e.replace(/([A-Z])/g,l)+":"+t+";")})),s&&m(n,"style",s)}else y(n,t);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),t&&t.textOutline&&this.applyTextOutline(t.textOutline))}return this},t.prototype.dashstyleSetter=function(t){var e=this["stroke-width"];if("inherit"===e&&(e=1),t=t&&t.toLowerCase()){var i=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(t=i.length;t--;)i[t]=""+O(i[t])*P(e,NaN);t=i.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t)}},t.prototype.destroy=function(){var t=this,e=t.element||{},i=t.renderer,n=e.ownerSVGElement,r=i.isSVG&&"SPAN"===e.nodeName&&t.parentGroup||void 0;if(e.onclick=e.onmouseout=e.onmouseover=e.onmousemove=e.point=null,l(t),t.clipPath&&n){var s=t.clipPath;[].forEach.call(n.querySelectorAll("[clip-path],[CLIP-PATH]"),(function(t){-1<t.getAttribute("clip-path").indexOf(s.element.id)&&t.removeAttribute("clip-path")})),t.clipPath=s.destroy()}if(t.stops){for(n=0;n<t.stops.length;n++)t.stops[n].destroy();t.stops.length=0,t.stops=void 0}for(t.safeRemoveChild(e),i.styledMode||t.destroyShadows();r&&r.div&&0===r.div.childNodes.length;)e=r.parentGroup,t.safeRemoveChild(r.div),delete r.div,r=e;t.alignTo&&_(i.alignedObjects,t),A(t,(function(e,i){t[i]&&t[i].parentGroup===t&&t[i].destroy&&t[i].destroy(),delete t[i]}))},t.prototype.destroyShadows=function(){(this.shadows||[]).forEach((function(t){this.safeRemoveChild(t)}),this),this.shadows=void 0},t.prototype.destroyTextPath=function(t,e){var i=t.getElementsByTagName("text")[0];if(i){if(i.removeAttribute("dx"),i.removeAttribute("dy"),e.element.setAttribute("id",""),this.textPathWrapper&&i.getElementsByTagName("textPath").length){for(t=this.textPathWrapper.element.childNodes;t.length;)i.appendChild(t[0]);i.removeChild(this.textPathWrapper.element)}}else(t.getAttribute("dx")||t.getAttribute("dy"))&&(t.removeAttribute("dx"),t.removeAttribute("dy"));this.textPathWrapper&&(this.textPathWrapper=this.textPathWrapper.destroy())},t.prototype.dSetter=function(t,e,i){S(t)&&("string"==typeof t[0]&&(t=this.renderer.pathToSegments(t)),this.pathArray=t,t=t.reduce((function(t,e,i){return e&&e.join?(i?t+" ":"")+e.join(" "):(e||"").toString()}),"")),/(NaN| {2}|^$)/.test(t)&&(t="M 0 0"),this[e]!==t&&(i.setAttribute(e,t),this[e]=t)},t.prototype.fadeOut=function(t){var e=this;e.animate({opacity:0},{duration:P(t,150),complete:function(){e.attr({y:-9999}).hide()}})},t.prototype.fillSetter=function(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.complexColor(t,e,i)},t.prototype.getBBox=function(e,i){var n=this.renderer,r=this.element,s=this.styles,a=this.textStr,o=n.cache,l=n.cacheKeys,u=r.namespaceURI===this.SVG_NS;i=P(i,this.rotation,0);var c,d=n.styledMode?r&&t.prototype.getStyle.call(r,"font-size"):s&&s.fontSize;if(b(a)){var p=a.toString();-1===p.indexOf("<")&&(p=p.replace(/[0-9]/g,"0")),p+=["",i,d,this.textWidth,s&&s.textOverflow,s&&s.fontWeight].join()}if(p&&!e&&(c=o[p]),!c){if(u||n.forExport){try{var f=this.fakeTS&&function(t){var e=r.querySelector(".highcharts-text-outline");e&&y(e,{display:t})};w(f)&&f("none"),c=r.getBBox?T({},r.getBBox()):{width:r.offsetWidth,height:r.offsetHeight},w(f)&&f("")}catch(t){}(!c||0>c.width)&&(c={width:0,height:0})}else c=this.htmlGetBBox();if(n.isSVG&&(e=c.width,n=c.height,u&&(c.height=n={"11px,17":14,"13px,20":16}[s&&s.fontSize+","+Math.round(n)]||n),i&&(s=i*h,c.width=Math.abs(n*Math.sin(s))+Math.abs(e*Math.cos(s)),c.height=Math.abs(n*Math.cos(s))+Math.abs(e*Math.sin(s)))),p&&0<c.height){for(;250<l.length;)delete o[l.shift()];o[p]||l.push(p),o[p]=c}}return c},t.prototype.getStyle=function(t){return f.getComputedStyle(this.element||this,"").getPropertyValue(t)},t.prototype.hasClass=function(t){return-1!==(""+this.attr("class")).split(" ").indexOf(t)},t.prototype.hide=function(t){return t?this.attr({y:-9999}):this.attr({visibility:"hidden"}),this},t.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}},t.prototype.init=function(t,e){this.element="span"===e?v(e):u.createElementNS(this.SVG_NS,e),this.renderer=t,x(this,"afterInit")},t.prototype.invert=function(t){return this.inverted=t,this.updateTransform(),this},t.prototype.on=function(t,e){var i=this.onEvents;return i[t]&&i[t](),i[t]=g(this.element,t,e),this},t.prototype.opacitySetter=function(t,e,i){this.opacity=t=Number(Number(t).toFixed(3)),i.setAttribute(e,t)},t.prototype.removeClass=function(t){return this.attr("class",(""+this.attr("class")).replace(C(t)?new RegExp("(^| )"+t+"( |$)"):t," ").replace(/ +/g," ").trim())},t.prototype.removeTextOutline=function(){var t=this.element.querySelector("tspan.highcharts-text-outline");t&&this.safeRemoveChild(t)},t.prototype.safeRemoveChild=function(t){var e=t.parentNode;e&&e.removeChild(t)},t.prototype.setRadialReference=function(t){var e=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=t,e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(t,e.radAttr)),this},t.prototype.setTextPath=function(t,i){var n=this.element,r=this.text?this.text.element:n,s={textAnchor:"text-anchor"},a=!1,o=this.textPathWrapper,l=!o;i=E(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},i);var h=e.filterUserAttributes(i.attributes);if(t&&i&&i.enabled){o&&null===o.element.parentNode?(l=!0,o=o.destroy()):o&&this.removeTextOutline.call(o.parentGroup),this.options&&this.options.padding&&(h.dx=-this.options.padding),o||(this.textPathWrapper=o=this.renderer.createElement("textPath"),a=!0);var u=o.element;if((i=t.element.getAttribute("id"))||t.element.setAttribute("id",i=M()),l)for(r.setAttribute("y",0),k(h.dx)&&r.setAttribute("x",-h.dx),t=[].slice.call(r.childNodes),l=0;l<t.length;l++){var d=t[l];d.nodeType!==Node.TEXT_NODE&&"tspan"!==d.nodeName||u.appendChild(d)}a&&o&&o.add({element:r}),u.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+i),b(h.dy)&&(u.parentNode.setAttribute("dy",h.dy),delete h.dy),b(h.dx)&&(u.parentNode.setAttribute("dx",h.dx),delete h.dx),A(h,(function(t,e){u.setAttribute(s[e]||e,t)})),n.removeAttribute("transform"),this.removeTextOutline.call(o),this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0}),this.applyTextOutline=this.updateTransform=c}else o&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(n,t),this.updateTransform(),this.options&&this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this},t.prototype.shadow=function(t,e,i){var n,s=[],a=this.element,o=this.oldShadowOptions,l={color:r.neutralColor100,offsetX:1,offsetY:1,opacity:.15,width:3},h=!1;if(!0===t?n=l:"object"==typeof t&&(n=T(l,t)),n&&(n&&o&&A(n,(function(t,e){t!==o[e]&&(h=!0)})),h&&this.destroyShadows(),this.oldShadowOptions=n),n){if(!this.shadows){var u=n.opacity/n.width,c=this.parentInverted?"translate(-1,-1)":"translate("+n.offsetX+", "+n.offsetY+")";for(l=1;l<=n.width;l++){var d=a.cloneNode(!1),p=2*n.width+1-2*l;m(d,{stroke:t.color||r.neutralColor100,"stroke-opacity":u*l,"stroke-width":p,transform:c,fill:"none"}),d.setAttribute("class",(d.getAttribute("class")||"")+" highcharts-shadow"),i&&(m(d,"height",Math.max(m(d,"height")-p,0)),d.cutHeight=p),e?e.element.appendChild(d):a.parentNode&&a.parentNode.insertBefore(d,a),s.push(d)}this.shadows=s}}else this.destroyShadows();return this},t.prototype.show=function(t){return this.attr({visibility:t?"inherit":"visible"})},t.prototype.strokeSetter=function(e,i,n){this[i]=e,this.stroke&&this["stroke-width"]?(t.prototype.fillSetter.call(this,this.stroke,"stroke",n),n.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===i&&0===e&&this.hasStroke?(n.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(n.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)},t.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var t=this.getStyle("stroke-width"),e=0;if(t.indexOf("px")===t.length-2)e=O(t);else if(""!==t){var i=u.createElementNS(p,"rect");m(i,{width:t,"stroke-width":0}),this.element.parentNode.appendChild(i),e=i.getBBox().width,i.parentNode.removeChild(i)}return e},t.prototype.symbolAttr=function(t){var e=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach((function(i){e[i]=P(t[i],e[i])})),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},t.prototype.textSetter=function(t){t!==this.textStr&&(delete this.textPxLength,this.textStr=t,this.added&&this.renderer.buildText(this))},t.prototype.titleSetter=function(t){var e=this.element,i=e.getElementsByTagName("title")[0]||u.createElementNS(this.SVG_NS,"title");e.insertBefore?e.insertBefore(i,e.firstChild):e.appendChild(i),i.textContent=String(P(t,"")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")},t.prototype.toFront=function(){var t=this.element;return t.parentNode.appendChild(t),this},t.prototype.translate=function(t,e){return this.attr({translateX:t,translateY:e})},t.prototype.updateShadows=function(t,e,i){var n=this.shadows;if(n)for(var r=n.length;r--;)i.call(n[r],"height"===t?Math.max(e-(n[r].cutHeight||0),0):"d"===t?this.d:e,t,n[r])},t.prototype.updateTransform=function(){var t=this.scaleX,e=this.scaleY,i=this.inverted,n=this.rotation,r=this.matrix,s=this.element,a=this.translateX||0,o=this.translateY||0;i&&(a+=this.width,o+=this.height),a=["translate("+a+","+o+")"],b(r)&&a.push("matrix("+r.join(",")+")"),i?a.push("rotate(90) scale(-1,1)"):n&&a.push("rotate("+n+" "+P(this.rotationOriginX,s.getAttribute("x"),0)+" "+P(this.rotationOriginY,s.getAttribute("y")||0)+")"),(b(t)||b(e))&&a.push("scale("+P(t,1)+" "+P(e,1)+")"),a.length&&s.setAttribute("transform",a.join(" "))},t.prototype.visibilitySetter=function(t,e,i){"inherit"===t?i.removeAttribute(e):this[e]!==t&&i.setAttribute(e,t),this[e]=t},t.prototype.xGetter=function(t){return"circle"===this.element.nodeName&&("x"===t?t="cx":"y"===t&&(t="cy")),this._defaultGetter(t)},t.prototype.zIndexSetter=function(t,e){var i=this.renderer,n=this.parentGroup,r=(n||i).element||i.box,s=this.element;i=r===i.box;var a,o=!1,l=this.added;if(b(t)?(s.setAttribute("data-z-index",t),t=+t,this[e]===t&&(l=!1)):b(this[e])&&s.removeAttribute("data-z-index"),this[e]=t,l){for((t=this.zIndex)&&n&&(n.handleZ=!0),a=(e=r.childNodes).length-1;0<=a&&!o;a--){l=(n=e[a]).getAttribute("data-z-index");var h=!b(l);n!==s&&(0>t&&h&&!i&&!a?(r.insertBefore(s,e[a]),o=!0):(O(l)<=t||h&&(!b(t)||0<=t))&&(r.insertBefore(s,e[a+1]||null),o=!0))}o||(r.insertBefore(s,e[i?3:0]||null),o=!0)}return o},t}()).prototype["stroke-widthSetter"]=t.prototype.strokeSetter,t.prototype.yGetter=t.prototype.xGetter,t.prototype.matrixSetter=t.prototype.rotationOriginXSetter=t.prototype.rotationOriginYSetter=t.prototype.rotationSetter=t.prototype.scaleXSetter=t.prototype.scaleYSetter=t.prototype.translateXSetter=t.prototype.translateYSetter=t.prototype.verticalAlignSetter=function(t,e){this[e]=t,this.doTransform=!0},t})),e(i,"Core/Renderer/SVG/SVGLabel.js",[i["Core/Renderer/SVG/SVGElement.js"],i["Core/Utilities.js"]],(function(t,e){function i(t,e){a(t)?t!==this[e]&&(this[e]=t,this.updateTextPadding()):this[e]=void 0}var n=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=e.defined,s=e.extend,a=e.isNumber,o=e.merge,l=e.pick,h=e.removeEvent;return function(e){function u(t,n,r,s,a,o,l,h,c,d){var p=e.call(this)||this;if(p.paddingSetter=i,p.paddingLeftSetter=i,p.paddingRightSetter=i,p.init(t,"g"),p.textStr=n,p.x=r,p.y=s,p.anchorX=o,p.anchorY=l,p.baseline=c,p.className=d,"button"!==d&&p.addClass("highcharts-label"),d&&p.addClass("highcharts-"+d),p.text=t.text("",0,0,h).attr({zIndex:1}),"string"==typeof a){var f=/^url\((.*?)\)$/.test(a);(p.renderer.symbols[a]||f)&&(p.symbolKey=a)}return p.bBox=u.emptyBBox,p.padding=3,p.baselineOffset=0,p.needsBox=t.styledMode||f,p.deferredAttr={},p.alignFactor=0,p}return n(u,e),u.prototype.alignSetter=function(t){(t={left:0,center:.5,right:1}[t])!==this.alignFactor&&(this.alignFactor=t,this.bBox&&a(this.xSetting)&&this.attr({x:this.xSetting}))},u.prototype.anchorXSetter=function(t,e){this.anchorX=t,this.boxAttr(e,Math.round(t)-this.getCrispAdjust()-this.xSetting)},u.prototype.anchorYSetter=function(t,e){this.anchorY=t,this.boxAttr(e,t-this.ySetting)},u.prototype.boxAttr=function(t,e){this.box?this.box.attr(t,e):this.deferredAttr[t]=e},u.prototype.css=function(e){if(e){var i,n={};e=o(e),u.textProps.forEach((function(t){void 0!==e[t]&&(n[t]=e[t],delete e[t])})),this.text.css(n),i="width"in n,"fontSize"in n||"fontWeight"in n?this.updateTextPadding():i&&this.updateBoxSize()}return t.prototype.css.call(this,e)},u.prototype.destroy=function(){h(this.element,"mouseenter"),h(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),t.prototype.destroy.call(this)},u.prototype.fillSetter=function(t,e){t&&(this.needsBox=!0),this.fill=t,this.boxAttr(e,t)},u.prototype.getBBox=function(){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();var t=this.padding,e=l(this.paddingLeft,t);return{width:this.width,height:this.height,x:this.bBox.x-e,y:this.bBox.y-t}},u.prototype.getCrispAdjust=function(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2},u.prototype.heightSetter=function(t){this.heightSetting=t},u.prototype.on=function(e,i){var n=this,r=n.text,s=r&&"SPAN"===r.element.tagName?r:void 0;if(s){var a=function(t){("mouseenter"===e||"mouseleave"===e)&&t.relatedTarget instanceof Element&&(n.element.compareDocumentPosition(t.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY||s.element.compareDocumentPosition(t.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||i.call(n.element,t)};s.on(e,a)}return t.prototype.on.call(n,e,a||i),n},u.prototype.onAdd=function(){var t=this.textStr;this.text.add(this),this.attr({text:r(t)?t:"",x:this.x,y:this.y}),this.box&&r(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})},u.prototype.rSetter=function(t,e){this.boxAttr(e,t)},u.prototype.shadow=function(t){return t&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(t)),this},u.prototype.strokeSetter=function(t,e){this.stroke=t,this.boxAttr(e,t)},u.prototype["stroke-widthSetter"]=function(t,e){t&&(this.needsBox=!0),this["stroke-width"]=t,this.boxAttr(e,t)},u.prototype["text-alignSetter"]=function(t){this.textAlign=t},u.prototype.textSetter=function(t){void 0!==t&&this.text.attr({text:t}),this.updateTextPadding()},u.prototype.updateBoxSize=function(){var t=this.text.element.style,e={},i=this.padding,n=this.bBox=a(this.widthSetting)&&a(this.heightSetting)&&!this.textAlign||!r(this.text.textStr)?u.emptyBBox:this.text.getBBox();this.width=this.getPaddedWidth(),this.height=(this.heightSetting||n.height||0)+2*i,this.baselineOffset=i+Math.min(this.renderer.fontMetrics(t&&t.fontSize,this.text).b,n.height||1/0),this.needsBox&&(this.box||((t=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect()).addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),t.add(this)),t=this.getCrispAdjust(),e.x=t,e.y=(this.baseline?-this.baselineOffset:0)+t,e.width=Math.round(this.width),e.height=Math.round(this.height),this.box.attr(s(e,this.deferredAttr)),this.deferredAttr={})},u.prototype.updateTextPadding=function(){var t=this.text;this.updateBoxSize();var e=this.baseline?0:this.baselineOffset,i=l(this.paddingLeft,this.padding);r(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(i+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width)),i===t.x&&e===t.y||(t.attr("x",i),t.hasBoxWidthChanged&&(this.bBox=t.getBBox(!0)),void 0!==e&&t.attr("y",e)),t.x=i,t.y=e},u.prototype.widthSetter=function(t){this.widthSetting=a(t)?t:void 0},u.prototype.getPaddedWidth=function(){var t=this.padding,e=l(this.paddingLeft,t);return t=l(this.paddingRight,t),(this.widthSetting||this.bBox.width||0)+e+t},u.prototype.xSetter=function(t){this.x=t,this.alignFactor&&(t-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(t),this.attr("translateX",this.xSetting)},u.prototype.ySetter=function(t){this.ySetting=this.y=Math.round(t),this.attr("translateY",this.ySetting)},u.emptyBBox={width:0,height:0,x:0,y:0},u.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "),u}(t)})),e(i,"Core/Renderer/SVG/TextBuilder.js",[i["Core/Globals.js"],i["Core/Utilities.js"],i["Core/Renderer/HTML/AST.js"]],(function(t,e,i){var n=t.doc,r=t.SVG_NS,s=e.attr,a=e.isString,o=e.objectEach,l=e.pick;return function(){function t(t){var e=t.styles;this.renderer=t.renderer,this.svgElement=t,this.width=t.textWidth,this.textLineHeight=e&&e.lineHeight,this.textOutline=e&&e.textOutline,this.ellipsis=!(!e||"ellipsis"!==e.textOverflow),this.noWrap=!(!e||"nowrap"!==e.whiteSpace),this.fontSize=e&&e.fontSize}return t.prototype.buildSVG=function(){var t=this.svgElement,e=t.element,r=t.renderer,s=l(t.textStr,"").toString(),o=-1!==s.indexOf("<"),h=e.childNodes,u=h.length;r=this.width&&!t.added&&r.box;var c=[s,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,this.fontSize,this.width].join();if(c!==t.textCache){for(t.textCache=c,delete t.actualWidth;u--;)e.removeChild(h[u]);o||this.ellipsis||this.width||-1!==s.indexOf(" ")&&(!this.noWrap||/<br.*?>/g.test(s))?""!==s&&(r&&r.appendChild(e),s=new i(s),this.modifyTree(s.nodes),s.addToDOM(t.element),this.modifyDOM(),this.ellipsis&&-1!==(e.textContent||"").indexOf("…")&&t.attr("title",this.unescapeEntities(t.textStr||"",["&lt;","&gt;"])),r&&r.removeChild(e)):e.appendChild(n.createTextNode(this.unescapeEntities(s))),a(this.textOutline)&&t.applyTextOutline&&t.applyTextOutline(this.textOutline)}},t.prototype.modifyDOM=function(){var t=this,e=this.svgElement,i=s(e.element,"x");[].forEach.call(e.element.querySelectorAll("tspan.highcharts-br"),(function(e){e.nextSibling&&e.previousSibling&&s(e,{dy:t.getLineHeight(e.nextSibling),x:i})}));var a=this.width||0;if(a){var o=function(o,l){var h=o.textContent||"",u=h.replace(/([^\^])-/g,"$1- ").split(" "),c=!t.noWrap&&(1<u.length||1<e.element.childNodes.length),d=t.getLineHeight(l),p=0,f=e.actualWidth;if(t.ellipsis)h&&t.truncate(o,h,void 0,0,Math.max(0,a-parseInt(t.fontSize||12,10)),(function(t,e){return t.substring(0,e)+"…"}));else if(c){for(h=[],c=[];l.firstChild&&l.firstChild!==o;)c.push(l.firstChild),l.removeChild(l.firstChild);for(;u.length;)u.length&&!t.noWrap&&0<p&&(h.push(o.textContent||""),o.textContent=u.join(" ").replace(/- /g,"-")),t.truncate(o,void 0,u,0===p&&f||0,a,(function(t,e){return u.slice(0,e).join(" ").replace(/- /g,"-")})),f=e.actualWidth,p++;c.forEach((function(t){l.insertBefore(t,o)})),h.forEach((function(t){l.insertBefore(n.createTextNode(t),o),(t=n.createElementNS(r,"tspan")).textContent="​",s(t,{dy:d,x:i}),l.insertBefore(t,o)}))}},l=function(t){[].slice.call(t.childNodes).forEach((function(i){i.nodeType===Node.TEXT_NODE?o(i,t):(-1!==i.className.baseVal.indexOf("highcharts-br")&&(e.actualWidth=0),l(i))}))};l(e.element)}},t.prototype.getLineHeight=function(t){var e;return t=t.nodeType===Node.TEXT_NODE?t.parentElement:t,this.renderer.styledMode||(e=t&&/(px|em)$/.test(t.style.fontSize)?t.style.fontSize:this.fontSize||this.renderer.style.fontSize||12),this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(e,t||this.svgElement.element).h},t.prototype.modifyTree=function(t){var e=this,i=function(n,r){var s=n.tagName,o=e.renderer.styledMode,l=n.attributes||{};"b"===s||"strong"===s?o?l.class="highcharts-strong":l.style="font-weight:bold;"+(l.style||""):"i"!==s&&"em"!==s||(o?l.class="highcharts-emphasized":l.style="font-style:italic;"+(l.style||"")),a(l.style)&&(l.style=l.style.replace(/(;| |^)color([ :])/,"$1fill$2")),"br"===s&&(l.class="highcharts-br",n.textContent="​",(r=t[r+1])&&r.textContent&&(r.textContent=r.textContent.replace(/^ +/gm,""))),"#text"!==s&&"a"!==s&&(n.tagName="tspan"),n.attributes=l,n.children&&n.children.filter((function(t){return"#text"!==t.tagName})).forEach(i)};for(t.forEach(i);t[0]&&"tspan"===t[0].tagName&&!t[0].children;)t.splice(0,1)},t.prototype.truncate=function(t,e,i,n,r,s){var a,o=this.svgElement,l=o.renderer,h=o.rotation,u=[],c=i?1:0,d=(e||i||"").length,p=d,f=function(r,a){a=a||r;var h=t.parentNode;if(h&&void 0===u[a])if(h.getSubStringLength)try{u[a]=n+h.getSubStringLength(0,i?a+1:a)}catch(t){}else l.getSpanWidth&&(t.textContent=s(e||i,r),u[a]=n+l.getSpanWidth(o,t));return u[a]};o.rotation=0;var g=f(t.textContent.length);if(n+g>r){for(;c<=d;)p=Math.ceil((c+d)/2),i&&(a=s(i,p)),g=f(p,a&&a.length-1),c===d?c=d+1:g>r?d=p-1:c=p;0===d?t.textContent="":e&&d===e.length-1||(t.textContent=a||s(e||i,p))}i&&i.splice(0,p),o.actualWidth=g,o.rotation=h},t.prototype.unescapeEntities=function(t,e){return o(this.renderer.escapes,(function(i,n){e&&-1!==e.indexOf(i)||(t=t.toString().replace(new RegExp(i,"g"),n))})),t},t}()})),e(i,"Core/Renderer/SVG/SVGRenderer.js",[i["Core/Color/Color.js"],i["Core/Globals.js"],i["Core/Color/Palette.js"],i["Core/Renderer/SVG/SVGElement.js"],i["Core/Renderer/SVG/SVGLabel.js"],i["Core/Renderer/HTML/AST.js"],i["Core/Renderer/SVG/TextBuilder.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r,s,a,o){var l,h=o.addEvent,u=o.attr,c=o.createElement,d=o.css,p=o.defined,f=o.destroyObjectProperties,g=o.extend,m=o.isArray,v=o.isNumber,y=o.isObject,b=o.isString,_=o.merge,T=o.pick,x=o.pInt,S=o.uniqueKey,w=e.charts,k=e.deg2rad,C=e.doc,E=e.isFirefox,A=e.isMS,P=e.isWebKit,O=e.noop,L=e.SVG_NS,M=e.symbolSizes,I=e.win;(o=function(){function e(t,e,i,n,r,s,a){this.width=this.url=this.style=this.isSVG=this.imgCount=this.height=this.gradients=this.globalAnimation=this.defs=this.chartIndex=this.cacheKeys=this.cache=this.boxWrapper=this.box=this.alignedObjects=void 0,this.init(t,e,i,n,r,s,a)}return e.prototype.init=function(t,e,i,n,r,s,a){var o,l=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"});a||l.css(this.getStyle(n)),n=l.element,t.appendChild(n),u(t,"dir","ltr"),-1===t.innerHTML.indexOf("xmlns")&&u(n,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=n,this.boxWrapper=l,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(C.createTextNode("Created with Highcharts 9.1.0")),this.defs=this.createElement("defs").add(),this.allowHTML=s,this.forExport=r,this.styledMode=a,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(e,i,!1),E&&t.getBoundingClientRect&&((e=function(){d(t,{left:0,top:0}),o=t.getBoundingClientRect(),d(t,{left:Math.ceil(o.left)-o.left+"px",top:Math.ceil(o.top)-o.top+"px"})})(),this.unSubPixelFix=h(I,"resize",e))},e.prototype.definition=function(t){return new s([t]).addToDOM(this.defs.element)},e.prototype.getReferenceURL=function(){if((E||P)&&C.getElementsByTagName("base").length){if(!p(l)){var t=S();t=new s([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:t},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":"url(#"+t+")",fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(C.body),d(t,{position:"fixed",top:0,left:0,zIndex:9e5});var e=C.elementFromPoint(6,6);l="hitme"===(e&&e.id),C.body.removeChild(t)}if(l)return I.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""},e.prototype.getStyle=function(t){return this.style=g({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},t)},e.prototype.setStyle=function(t){this.boxWrapper.css(this.getStyle(t))},e.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width},e.prototype.destroy=function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),f(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},e.prototype.createElement=function(t){var e=new this.Element;return e.init(this,t),e},e.prototype.getRadialAttr=function(t,e){return{cx:t[0]-t[2]/2+(e.cx||0)*t[2],cy:t[1]-t[2]/2+(e.cy||0)*t[2],r:(e.r||0)*t[2]}},e.prototype.buildText=function(t){new a(t).buildSVG()},e.prototype.getContrast=function(e){return(e=t.parse(e).rgba)[0]*=1,e[1]*=1.2,e[2]*=.5,459<e[0]+e[1]+e[2]?"#000000":"#FFFFFF"},e.prototype.button=function(t,e,n,r,a,o,l,u,c,d){var p=this.label(t,e,n,c,void 0,void 0,d,void 0,"button"),f=0,m=this.styledMode,v=a?_(a):{};if(t=v&&v.style||{},v=s.filterUserAttributes(v),p.attr(_({padding:8,r:2},v)),!m){var y=(v=_({fill:i.neutralColor3,stroke:i.neutralColor20,"stroke-width":1,style:{color:i.neutralColor80,cursor:"pointer",fontWeight:"normal"}},{style:t},v)).style;delete v.style;var b=(o=_(v,{fill:i.neutralColor10},s.filterUserAttributes(o||{}))).style;delete o.style;var T=(l=_(v,{fill:i.highlightColor10,style:{color:i.neutralColor100,fontWeight:"bold"}},s.filterUserAttributes(l||{}))).style;delete l.style;var x=(u=_(v,{style:{color:i.neutralColor20}},s.filterUserAttributes(u||{}))).style;delete u.style}return h(p.element,A?"mouseover":"mouseenter",(function(){3!==f&&p.setState(1)})),h(p.element,A?"mouseout":"mouseleave",(function(){3!==f&&p.setState(f)})),p.setState=function(t){1!==t&&(p.state=f=t),p.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][t||0]),m||p.attr([v,o,l,u][t||0]).css([y,b,T,x][t||0])},m||p.attr(v).css(g({cursor:"default"},y)),p.on("touchstart",(function(t){return t.stopPropagation()})).on("click",(function(t){3!==f&&r.call(p,t)}))},e.prototype.crispLine=function(t,e,i){void 0===i&&(i="round");var n=t[0],r=t[1];return n[1]===r[1]&&(n[1]=r[1]=Math[i](n[1])-e%2/2),n[2]===r[2]&&(n[2]=r[2]=Math[i](n[2])+e%2/2),t},e.prototype.path=function(t){var e=this.styledMode?{}:{fill:"none"};return m(t)?e.d=t:y(t)&&g(e,t),this.createElement("path").attr(e)},e.prototype.circle=function(t,e,i){return t=y(t)?t:void 0===t?{}:{x:t,y:e,r:i},(e=this.createElement("circle")).xSetter=e.ySetter=function(t,e,i){i.setAttribute("c"+e,t)},e.attr(t)},e.prototype.arc=function(t,e,i,n,r,s){return y(t)?(e=(n=t).y,i=n.r,t=n.x):n={innerR:n,start:r,end:s},(t=this.symbol("arc",t,e,i,i,n)).r=i,t},e.prototype.rect=function(t,e,i,n,r,s){r=y(t)?t.r:r;var a=this.createElement("rect");return t=y(t)?t:void 0===t?{}:{x:t,y:e,width:Math.max(i,0),height:Math.max(n,0)},this.styledMode||(void 0!==s&&(t["stroke-width"]=s,t=a.crisp(t)),t.fill="none"),r&&(t.r=r),a.rSetter=function(t,e,i){a.r=t,u(i,{rx:t,ry:t})},a.rGetter=function(){return a.r||0},a.attr(t)},e.prototype.setSize=function(t,e,i){this.width=t,this.height=e,this.boxWrapper.animate({width:t,height:e},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:T(i,!0)?void 0:0}),this.alignElements()},e.prototype.g=function(t){var e=this.createElement("g");return t?e.attr({class:"highcharts-"+t}):e},e.prototype.image=function(t,e,i,n,r,s){var a={preserveAspectRatio:"none"},o=function(t,e){t.setAttributeNS?t.setAttributeNS("http://www.w3.org/1999/xlink","href",e):t.setAttribute("hc-svg-href",e)},l=function(e){o(u.element,t),s.call(u,e)};1<arguments.length&&g(a,{x:e,y:i,width:n,height:r});var u=this.createElement("image").attr(a);return s?(o(u.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),a=new I.Image,h(a,"load",l),a.src=t,a.complete&&l({})):o(u.element,t),u},e.prototype.symbol=function(t,e,i,n,r,s){var a,o=this,l=/^url\((.*?)\)$/,h=l.test(t),u=!h&&(this.symbols[t]?t:"circle"),f=u&&this.symbols[u];if(f){"number"==typeof e&&(a=f.call(this.symbols,Math.round(e||0),Math.round(i||0),n||0,r||0,s));var m=this.path(a);o.styledMode||m.attr("fill","none"),g(m,{symbolName:u,x:e,y:i,width:n,height:r}),s&&g(m,s)}else if(h){var v=t.match(l)[1];(m=this.image(v)).imgwidth=T(M[v]&&M[v].width,s&&s.width),m.imgheight=T(M[v]&&M[v].height,s&&s.height);var y=function(){m.attr({width:m.width,height:m.height})};["width","height"].forEach((function(t){m[t+"Setter"]=function(t,e){var i=this["img"+e];this[e]=t,p(i)&&(s&&"within"===s.backgroundSize&&this.width&&this.height&&(i=Math.round(i*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(e,i),this.alignByTranslate||(t=((this[e]||0)-i)/2,this.attr("width"===e?{translateX:t}:{translateY:t})))}})),p(e)&&m.attr({x:e,y:i}),m.isImg=!0,p(m.imgwidth)&&p(m.imgheight)?y():(m.attr({width:0,height:0}),c("img",{onload:function(){var t=w[o.chartIndex];0===this.width&&(d(this,{position:"absolute",top:"-999em"}),C.body.appendChild(this)),M[v]={width:this.width,height:this.height},m.imgwidth=this.width,m.imgheight=this.height,m.element&&y(),this.parentNode&&this.parentNode.removeChild(this),o.imgCount--,o.imgCount||!t||t.hasLoaded||t.onload()},src:v}),this.imgCount++)}return m},e.prototype.clipRect=function(t,e,i,n){var r=S()+"-",s=this.createElement("clipPath").attr({id:r}).add(this.defs);return(t=this.rect(t,e,i,n,0).add(s)).id=r,t.clipPath=s,t.count=0,t},e.prototype.text=function(t,e,i,n){var r={};return!n||!this.allowHTML&&this.forExport?(r.x=Math.round(e||0),i&&(r.y=Math.round(i)),p(t)&&(r.text=t),t=this.createElement("text").attr(r),n||(t.xSetter=function(t,e,i){var n,r=i.getElementsByTagName("tspan"),s=i.getAttribute(e);for(n=0;n<r.length;n++){var a=r[n];a.getAttribute(e)===s&&a.setAttribute(e,t)}i.setAttribute(e,t)}),t):this.html(t,e,i)},e.prototype.fontMetrics=function(t,e){return t=!this.styledMode&&/px/.test(t)||!I.getComputedStyle?t||e&&e.style&&e.style.fontSize||this.style&&this.style.fontSize:e&&n.prototype.getStyle.call(e,"font-size"),{h:e=24>(t=/px/.test(t)?x(t):12)?t+3:Math.round(1.2*t),b:Math.round(.8*e),f:t}},e.prototype.rotCorr=function(t,e,i){var n=t;return e&&i&&(n=Math.max(n*Math.cos(e*k),4)),{x:-t/3*Math.sin(e*k),y:n}},e.prototype.pathToSegments=function(t){for(var e=[],i=[],n={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2},r=0;r<t.length;r++)b(i[0])&&v(t[r])&&i.length===n[i[0].toUpperCase()]&&t.splice(r,0,i[0].replace("M","L").replace("m","l")),"string"==typeof t[r]&&(i.length&&e.push(i.slice(0)),i.length=0),i.push(t[r]);return e.push(i.slice(0)),e},e.prototype.label=function(t,e,i,n,s,a,o,l,h){return new r(this,t,e,i,n,s,a,o,l,h)},e.prototype.alignElements=function(){this.alignedObjects.forEach((function(t){return t.align()}))},e}()).prototype.Element=n,o.prototype.SVG_NS=L,o.prototype.draw=O,o.prototype.escapes={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"};var D=function(t,e,i,n,r){return[["M",t+(r=r&&r.r||0),e],["L",t+i-r,e],["C",t+i,e,t+i,e,t+i,e+r],["L",t+i,e+n-r],["C",t+i,e+n,t+i,e+n,t+i-r,e+n],["L",t+r,e+n],["C",t,e+n,t,e+n,t,e+n-r],["L",t,e+r],["C",t,e,t,e,t+r,e]]};return O=function(t,e,i,n,r){return r&&r.r?D(t,e,i,n,r):[["M",t,e],["L",t+i,e],["L",t+i,e+n],["L",t,e+n],["Z"]]},o.prototype.symbols={circle:function(t,e,i,n){return this.arc(t+i/2,e+n/2,i/2,n/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},rect:O,square:O,triangle:function(t,e,i,n){return[["M",t+i/2,e],["L",t+i,e+n],["L",t,e+n],["Z"]]},"triangle-down":function(t,e,i,n){return[["M",t,e],["L",t+i,e],["L",t+i/2,e+n],["Z"]]},diamond:function(t,e,i,n){return[["M",t+i/2,e],["L",t+i,e+n/2],["L",t+i/2,e+n],["L",t,e+n/2],["Z"]]},arc:function(t,e,i,n,r){var s=[];if(r){var a=r.start||0,o=T(r.r,i);i=T(r.r,n||i);var l=(r.end||0)-.001;n=r.innerR;var h=T(r.open,.001>Math.abs((r.end||0)-a-2*Math.PI)),u=Math.cos(a),c=Math.sin(a),d=Math.cos(l),f=Math.sin(l);a=T(r.longArc,.001>l-a-Math.PI?0:1),s.push(["M",t+o*u,e+i*c],["A",o,i,0,a,T(r.clockwise,1),t+o*d,e+i*f]),p(n)&&s.push(h?["M",t+n*d,e+n*f]:["L",t+n*d,e+n*f],["A",n,n,0,a,p(r.clockwise)?1-r.clockwise:0,t+n*u,e+n*c]),h||s.push(["Z"])}return s},callout:function(t,e,i,n,r){var s=Math.min(r&&r.r||0,i,n),a=s+6,o=r&&r.anchorX;r=r&&r.anchorY||0;var l=D(t,e,i,n,{r:s});return v(o)?(t+o>=i?r>e+a&&r<e+n-a?l.splice(3,1,["L",t+i,r-6],["L",t+i+6,r],["L",t+i,r+6],["L",t+i,e+n-s]):l.splice(3,1,["L",t+i,n/2],["L",o,r],["L",t+i,n/2],["L",t+i,e+n-s]):0>=t+o?r>e+a&&r<e+n-a?l.splice(7,1,["L",t,r+6],["L",t-6,r],["L",t,r-6],["L",t,e+s]):l.splice(7,1,["L",t,n/2],["L",o,r],["L",t,n/2],["L",t,e+s]):r&&r>n&&o>t+a&&o<t+i-a?l.splice(5,1,["L",o+6,e+n],["L",o,e+n+6],["L",o-6,e+n],["L",t+s,e+n]):r&&0>r&&o>t+a&&o<t+i-a&&l.splice(1,1,["L",o-6,e],["L",o,e-6],["L",o+6,e],["L",i-s,e]),l):l}},e.SVGRenderer=o,e.Renderer=e.SVGRenderer,e.Renderer})),e(i,"Core/Renderer/HTML/HTMLElement.js",[i["Core/Globals.js"],i["Core/Renderer/SVG/SVGElement.js"],i["Core/Utilities.js"]],(function(t,e,i){var n=t.isFirefox,r=t.isMS,s=t.isWebKit,a=t.win,o=i.css,l=i.defined,h=i.extend,u=i.pick,c=i.pInt;return h(e.prototype,{htmlCss:function(t){var e="SPAN"===this.element.tagName&&t&&"width"in t,i=u(e&&t.width,void 0);if(e){delete t.width,this.textWidth=i;var n=!0}return t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=h(this.styles,t),o(this.element,t),n&&this.htmlUpdateTransform(),this},htmlGetBBox:function(){var t=this.element;return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,i=this.translateX||0,n=this.translateY||0,r=this.x||0,s=this.y||0,a=this.textAlign||"left",h={left:0,center:.5,right:1}[a],u=this.styles;if(u=u&&u.whiteSpace,o(e,{marginLeft:i,marginTop:n}),!t.styledMode&&this.shadows&&this.shadows.forEach((function(t){o(t,{marginLeft:i+1,marginTop:n+1})})),this.inverted&&[].forEach.call(e.childNodes,(function(i){t.invertChild(i,e)})),"SPAN"===e.tagName){var d=this.rotation,p=void 0;p=this.textWidth&&c(this.textWidth);var f,g=[d,a,e.innerHTML,this.textWidth,this.textAlign].join();(f=p!==this.oldTextWidth)&&!(f=p>this.oldTextWidth)&&((f=this.textPxLength)||(o(e,{width:"",whiteSpace:u||"nowrap"}),f=e.offsetWidth),f=f>p),f&&(/[ \-]/.test(e.textContent||e.innerText)||"ellipsis"===e.style.textOverflow)?(o(e,{width:p+"px",display:"block",whiteSpace:u||"normal"}),this.oldTextWidth=p,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1,g!==this.cTT&&(p=t.fontMetrics(e.style.fontSize,e).b,!l(d)||d===(this.oldRotation||0)&&a===this.oldAlign||this.setSpanRotation(d,h,p),this.getSpanCorrection(!l(d)&&this.textPxLength||e.offsetWidth,p,h,d,a)),o(e,{left:r+(this.xCorr||0)+"px",top:s+(this.yCorr||0)+"px"}),this.cTT=g,this.oldRotation=d,this.oldAlign=a}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var l={},h=r&&!/Edge/.test(a.navigator.userAgent)?"-ms-transform":s?"-webkit-transform":n?"MozTransform":a.opera?"-o-transform":void 0;h&&(l[h]=l.transform="rotate("+t+"deg)",l[h+(n?"Origin":"-origin")]=l.transformOrigin=100*e+"% "+i+"px",o(this.element,l))},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),e})),e(i,"Core/Renderer/HTML/HTMLRenderer.js",[i["Core/Renderer/HTML/AST.js"],i["Core/Renderer/SVG/SVGElement.js"],i["Core/Renderer/SVG/SVGRenderer.js"],i["Core/Utilities.js"]],(function(t,e,i,n){var r=n.attr,s=n.createElement,a=n.extend,o=n.pick;return a(i.prototype,{html:function(i,n,l){var h=this.createElement("span"),u=h.element,c=h.renderer,d=c.isSVG,p=function(t,i){["opacity","visibility"].forEach((function(n){t[n+"Setter"]=function(r,s,a){var o=t.div?t.div.style:i;e.prototype[n+"Setter"].call(this,r,s,a),o&&(o[s]=r)}})),t.addedSetters=!0};return h.textSetter=function(e){e!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,t.setElementHTML(this.element,o(e,"")),this.textStr=e,h.doTransform=!0)},d&&p(h,h.element.style),h.xSetter=h.ySetter=h.alignSetter=h.rotationSetter=function(t,e){"align"===e?h.alignValue=h.textAlign=t:h[e]=t,h.doTransform=!0},h.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},h.attr({text:i,x:Math.round(n),y:Math.round(l)}).css({position:"absolute"}),c.styledMode||h.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),u.style.whiteSpace="nowrap",h.css=h.htmlCss,d&&(h.add=function(t){var e=c.box.parentNode,i=[];if(this.parentGroup=t){var n=t.div;if(!n){for(;t;)i.push(t),t=t.parentGroup;i.reverse().forEach((function(t){function o(e,i){t[i]=e,"translateX"===i?c.left=e+"px":c.top=e+"px",t.doTransform=!0}var l=r(t.element,"class"),u=t.styles||{},c=(n=t.div=t.div||s("div",l?{className:l}:void 0,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px",display:t.display,opacity:t.opacity,cursor:u.cursor,pointerEvents:u.pointerEvents},n||e)).style;a(t,{classSetter:function(t){return function(e){this.element.setAttribute("class",e),t.className=e}}(n),on:function(){return i[0].div&&h.on.apply({element:i[0].div,onEvents:h.onEvents},arguments),t},translateXSetter:o,translateYSetter:o}),t.addedSetters||p(t)}))}}else n=e;return n.appendChild(u),h.added=!0,h.alignOnAdd&&h.htmlUpdateTransform(),h}),h}}),i})),e(i,"Core/Axis/Tick.js",[i["Core/FormatUtilities.js"],i["Core/Globals.js"],i["Core/Utilities.js"]],(function(t,e,i){var n=e.deg2rad,r=i.clamp,s=i.correctFloat,a=i.defined,o=i.destroyObjectProperties,l=i.extend,h=i.fireEvent,u=i.isNumber,c=i.merge,d=i.objectEach,p=i.pick;return i=function(){function e(t,e,i,n,r){this.isNewLabel=this.isNew=!0,this.axis=t,this.pos=e,this.type=i||"",this.parameters=r||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,h(this,"init"),i||n||this.addLabel()}return e.prototype.addLabel=function(){var e,i,n=this,r=n.axis,o=r.options,c=r.chart,d=r.categories,f=r.logarithmic,g=r.names,m=n.pos,v=p(n.options&&n.options.labels,o.labels),y=r.tickPositions,b=m===y[0],_=m===y[y.length-1],T=n.label,x=(!v.step||1===v.step)&&1===r.tickInterval;if(y=y.info,d=this.parameters.category||(d?p(d[m],g[m],m):m),f&&u(d)&&(d=s(f.lin2log(d))),r.dateTime&&y)var S=c.time.resolveDTLFormat(o.dateTimeLabelFormats[!o.grid&&y.higherRanks[m]||y.unitName]),w=S.main;n.isFirst=b,n.isLast=_;var k={axis:r,chart:c,dateTimeLabelFormat:w,isFirst:b,isLast:_,pos:m,tick:n,tickPositionInfo:y,value:d};h(this,"labelFormat",k);var C=function(e){return v.formatter?v.formatter.call(e,e):v.format?(e.text=r.defaultLabelFormatter.call(e),t.format(v.format,e,c)):r.defaultLabelFormatter.call(e,e)};o=C.call(k,k),(i=S&&S.list)&&(n.shortenLabel=function(){for(e=0;e<i.length;e++)if(l(k,{dateTimeLabelFormat:i[e]}),T.attr({text:C.call(k,k)}),T.getBBox().width<r.getSlotWidth(n)-2*v.padding)return;T.attr({text:""})}),x&&r._addedPlotLB&&n.moveLabel(o,v),a(T)||n.movedLabel?T&&T.textStr!==o&&!x&&(!T.textWidth||v.style.width||T.styles.width||T.css({width:null}),T.attr({text:o}),T.textPxLength=T.getBBox().width):(n.label=T=n.createLabel({x:0,y:0},o,v),n.rotation=0)},e.prototype.createLabel=function(t,e,i){var n=this.axis,r=n.chart;return(t=a(e)&&i.enabled?r.renderer.text(e,t.x,t.y,i.useHTML).add(n.labelGroup):null)&&(r.styledMode||t.css(c(i.style)),t.textPxLength=t.getBBox().width),t},e.prototype.destroy=function(){o(this,this.axis)},e.prototype.getPosition=function(t,e,i,n){var a=this.axis,o=a.chart,l=n&&o.oldChartHeight||o.chartHeight;return(t={x:t?s(a.translate(e+i,null,null,n)+a.transB):a.left+a.offset+(a.opposite?(n&&o.oldChartWidth||o.chartWidth)-a.right-a.left:0),y:t?l-a.bottom+a.offset-(a.opposite?a.height:0):s(l-a.translate(e+i,null,null,n)-a.transB)}).y=r(t.y,-1e5,1e5),h(this,"afterGetPosition",{pos:t}),t},e.prototype.getLabelPosition=function(t,e,i,r,s,o,l,u){var c=this.axis,d=c.transA,p=c.isLinked&&c.linkedParent?c.linkedParent.reversed:c.reversed,f=c.staggerLines,g=c.tickRotCorr||{x:0,y:0},m=s.y,v=r||c.reserveSpaceDefault?0:-c.labelOffset*("center"===c.labelAlign?.5:1),y={};return a(m)||(m=0===c.side?i.rotation?-8:-i.getBBox().height:2===c.side?g.y+8:Math.cos(i.rotation*n)*(g.y-i.getBBox(!1,0).height/2)),t=t+s.x+v+g.x-(o&&r?o*d*(p?-1:1):0),e=e+m-(o&&!r?o*d*(p?1:-1):0),f&&(i=l/(u||1)%f,c.opposite&&(i=f-i-1),e+=c.labelOffset/f*i),y.x=t,y.y=Math.round(e),h(this,"afterGetLabelPosition",{pos:y,tickmarkOffset:o,index:l}),y},e.prototype.getLabelSize=function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},e.prototype.getMarkPath=function(t,e,i,n,r,s){return s.crispLine([["M",t,e],["L",t+(r?0:-i),e+(r?i:0)]],n)},e.prototype.handleOverflow=function(t){var e=this.axis,i=e.options.labels,r=t.x,s=e.chart.chartWidth,a=e.chart.spacing,o=p(e.labelLeft,Math.min(e.pos,a[3]));a=p(e.labelRight,Math.max(e.isRadial?0:e.pos+e.len,s-a[1]));var l,h=this.label,u=this.rotation,c={left:0,center:.5,right:1}[e.labelAlign||h.attr("align")],d=h.getBBox().width,f=e.getSlotWidth(this),g=f,m=1,v={};u||"justify"!==i.overflow?0>u&&r-c*d<o?l=Math.round(r/Math.cos(u*n)-o):0<u&&r+c*d>a&&(l=Math.round((s-r)/Math.cos(u*n))):(s=r+(1-c)*d,r-c*d<o?g=t.x+g*(1-c)-o:s>a&&(g=a-t.x+g*c,m=-1),(g=Math.min(f,g))<f&&"center"===e.labelAlign&&(t.x+=m*(f-g-c*(f-Math.min(d,g)))),(d>g||e.autoRotation&&(h.styles||{}).width)&&(l=g)),l&&(this.shortenLabel?this.shortenLabel():(v.width=Math.floor(l)+"px",(i.style||{}).textOverflow||(v.textOverflow="ellipsis"),h.css(v)))},e.prototype.moveLabel=function(t,e){var i=this,n=i.label,r=!1,s=i.axis,a=s.reversed;if(n&&n.textStr===t?(i.movedLabel=n,r=!0,delete i.label):d(s.ticks,(function(e){r||e.isNew||e===i||!e.label||e.label.textStr!==t||(i.movedLabel=e.label,r=!0,e.labelPos=i.movedLabel.xy,delete e.label)})),!r&&(i.labelPos||n)){var o=i.labelPos||n.xy;n=s.horiz?a?0:s.width+s.left:o.x,s=s.horiz?o.y:a?s.width+s.left:0,i.movedLabel=i.createLabel({x:n,y:s},t,e),i.movedLabel&&i.movedLabel.attr({opacity:0})}},e.prototype.render=function(t,e,i){var n=this.axis,r=n.horiz,s=this.pos,a=p(this.tickmarkOffset,n.tickmarkOffset);a=(s=this.getPosition(r,s,a,e)).x;var o=s.y;n=r&&a===n.pos+n.len||!r&&o===n.pos?-1:1,r=p(i,this.label&&this.label.newOpacity,1),i=p(i,1),this.isActive=!0,this.renderGridLine(e,i,n),this.renderMark(s,i,n),this.renderLabel(s,e,r,t),this.isNew=!1,h(this,"afterRender")},e.prototype.renderGridLine=function(t,e,i){var n=this.axis,r=n.options,s=this.gridLine,a={},o=this.pos,l=this.type,h=p(this.tickmarkOffset,n.tickmarkOffset),u=n.chart.renderer,c=r.gridLineWidth,d=r.gridLineColor,f=r.gridLineDashStyle;"minor"===this.type&&(c=r.minorGridLineWidth,d=r.minorGridLineColor,f=r.minorGridLineDashStyle),s||(n.chart.styledMode||(a.stroke=d,a["stroke-width"]=c||0,a.dashstyle=f),l||(a.zIndex=1),t&&(e=0),this.gridLine=s=u.path().attr(a).addClass("highcharts-"+(l?l+"-":"")+"grid-line").add(n.gridGroup)),s&&(i=n.getPlotLinePath({value:o+h,lineWidth:s.strokeWidth()*i,force:"pass",old:t}))&&s[t||this.isNew?"attr":"animate"]({d:i,opacity:e})},e.prototype.renderMark=function(t,e,i){var n=this.axis,r=n.options,s=n.chart.renderer,a=this.type,o=n.tickSize(a?a+"Tick":"tick"),l=this.mark,h=!l,u=t.x;t=t.y;var c=p(r["minor"!==a?"tickWidth":"minorTickWidth"],!a&&n.isXAxis?1:0);r=r["minor"!==a?"tickColor":"minorTickColor"],o&&(n.opposite&&(o[0]=-o[0]),h&&(this.mark=l=s.path().addClass("highcharts-"+(a?a+"-":"")+"tick").add(n.axisGroup),n.chart.styledMode||l.attr({stroke:r,"stroke-width":c})),l[h?"attr":"animate"]({d:this.getMarkPath(u,t,o[0],l.strokeWidth()*i,n.horiz,s),opacity:e}))},e.prototype.renderLabel=function(t,e,i,n){var r=this.axis,s=r.horiz,a=r.options,o=this.label,l=a.labels,h=l.step;r=p(this.tickmarkOffset,r.tickmarkOffset);var c=!0,d=t.x;t=t.y,o&&u(d)&&(o.xy=t=this.getLabelPosition(d,t,o,s,l,r,n,h),this.isFirst&&!this.isLast&&!a.showFirstLabel||this.isLast&&!this.isFirst&&!a.showLastLabel?c=!1:!s||l.step||l.rotation||e||0===i||this.handleOverflow(t),h&&n%h&&(c=!1),c&&u(t.y)?(t.opacity=i,o[this.isNewLabel?"attr":"animate"](t),this.isNewLabel=!1):(o.attr("y",-9999),this.isNewLabel=!0))},e.prototype.replaceMovedLabel=function(){var t=this.label,e=this.axis,i=e.reversed;if(t&&!this.isNew){var n=e.horiz?i?e.left:e.width+e.left:t.xy.x;i=e.horiz?t.xy.y:i?e.width+e.top:e.top,t.animate({x:n,y:i,opacity:0},void 0,t.destroy),delete this.label}e.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel},e}(),e.Tick=i,e.Tick})),e(i,"Core/Axis/Axis.js",[i["Core/Animation/AnimationUtilities.js"],i["Core/Color/Color.js"],i["Core/Globals.js"],i["Core/Color/Palette.js"],i["Core/Options.js"],i["Core/Axis/Tick.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r,s,a){var o=t.animObject,l=r.defaultOptions,h=a.addEvent,u=a.arrayMax,c=a.arrayMin,d=a.clamp,p=a.correctFloat,f=a.defined,g=a.destroyObjectProperties,m=a.erase,v=a.error,y=a.extend,b=a.fireEvent,_=a.getMagnitude,T=a.isArray,x=a.isFunction,S=a.isNumber,w=a.isString,k=a.merge,C=a.normalizeTickInterval,E=a.objectEach,A=a.pick,P=a.relativeLength,O=a.removeEvent,L=a.splat,M=a.syncTimeout,I=i.deg2rad;return t=function(){function t(t,e){this.zoomEnabled=this.width=this.visible=this.userOptions=this.translationSlope=this.transB=this.transA=this.top=this.ticks=this.tickRotCorr=this.tickPositions=this.tickmarkOffset=this.tickInterval=this.tickAmount=this.side=this.series=this.right=this.positiveValuesOnly=this.pos=this.pointRangePadding=this.pointRange=this.plotLinesAndBandsGroups=this.plotLinesAndBands=this.paddedTicks=this.overlap=this.options=this.offset=this.names=this.minPixelPadding=this.minorTicks=this.minorTickInterval=this.min=this.maxLabelLength=this.max=this.len=this.left=this.labelFormatter=this.labelEdge=this.isLinked=this.height=this.hasVisibleSeries=this.hasNames=this.coll=this.closestPointRange=this.chart=this.categories=this.bottom=this.alternateBands=void 0,this.init(t,e)}return t.prototype.init=function(t,e){var i=e.isX,n=this;n.chart=t,n.horiz=t.inverted&&!n.isZAxis?!i:i,n.isXAxis=i,n.coll=n.coll||(i?"xAxis":"yAxis"),b(this,"init",{userOptions:e}),n.opposite=A(e.opposite,n.opposite),n.side=A(e.side,n.side,n.horiz?n.opposite?0:2:n.opposite?1:3),n.setOptions(e);var r=this.options,s=r.labels,a=r.type;n.userOptions=e,n.minPixelPadding=0,n.reversed=A(r.reversed,n.reversed),n.visible=r.visible,n.zoomEnabled=r.zoomEnabled,n.hasNames="category"===a||!0===r.categories,n.categories=r.categories||n.hasNames,n.names||(n.names=[],n.names.keys={}),n.plotLinesAndBandsGroups={},n.positiveValuesOnly=!!n.logarithmic,n.isLinked=f(r.linkedTo),n.ticks={},n.labelEdge=[],n.minorTicks={},n.plotLinesAndBands=[],n.alternateBands={},n.len=0,n.minRange=n.userMinRange=r.minRange||r.maxZoom,n.range=r.range,n.offset=r.offset||0,n.max=null,n.min=null,e=A(r.crosshair,L(t.options.tooltip.crosshairs)[i?0:1]),n.crosshair=!0===e?{}:e,e=n.options.events,-1===t.axes.indexOf(n)&&(i?t.axes.splice(t.xAxis.length,0,n):t.axes.push(n),t[n.coll].push(n)),n.series=n.series||[],t.inverted&&!n.isZAxis&&i&&void 0===n.reversed&&(n.reversed=!0),n.labelRotation=S(s.rotation)?s.rotation:void 0,E(e,(function(t,e){x(t)&&h(n,e,t)})),b(this,"afterInit")},t.prototype.setOptions=function(e){this.options=k(t.defaultOptions,"yAxis"===this.coll&&t.defaultYAxisOptions,[t.defaultTopAxisOptions,t.defaultRightAxisOptions,t.defaultBottomAxisOptions,t.defaultLeftAxisOptions][this.side],k(l[this.coll],e)),b(this,"afterSetOptions",{userOptions:e})},t.prototype.defaultLabelFormatter=function(){var t=this.axis,e=S(this.value)?this.value:NaN,i=t.chart.time,n=this.dateTimeLabelFormat,r=l.lang,s=r.numericSymbols;r=r.numericSymbolMagnitude||1e3;var a=s&&s.length,o=t.logarithmic?Math.abs(e):t.tickInterval,h=this.chart.numberFormatter;if(t.categories)var u=""+this.value;else if(n)u=i.dateFormat(n,e);else if(a&&1e3<=o)for(;a--&&void 0===u;)o>=(t=Math.pow(r,a+1))&&0==10*e%t&&null!==s[a]&&0!==e&&(u=h(e/t,-1)+s[a]);return void 0===u&&(u=1e4<=Math.abs(e)?h(e,-1):h(e,-1,void 0,"")),u},t.prototype.getSeriesExtremes=function(){var t,e=this,i=e.chart;b(this,"getSeriesExtremes",null,(function(){e.hasVisibleSeries=!1,e.dataMin=e.dataMax=e.threshold=null,e.softThreshold=!e.isXAxis,e.stacking&&e.stacking.buildStacks(),e.series.forEach((function(n){if(n.visible||!i.options.chart.ignoreHiddenSeries){var r=n.options,s=r.threshold;if(e.hasVisibleSeries=!0,e.positiveValuesOnly&&0>=s&&(s=null),e.isXAxis){if((r=n.xData).length){r=e.logarithmic?r.filter(e.validatePositiveValue):r;var a=(t=n.getXExtremes(r)).min,o=t.max;S(a)||a instanceof Date||(r=r.filter(S),a=(t=n.getXExtremes(r)).min,o=t.max),r.length&&(e.dataMin=Math.min(A(e.dataMin,a),a),e.dataMax=Math.max(A(e.dataMax,o),o))}}else n=n.applyExtremes(),S(n.dataMin)&&(a=n.dataMin,e.dataMin=Math.min(A(e.dataMin,a),a)),S(n.dataMax)&&(o=n.dataMax,e.dataMax=Math.max(A(e.dataMax,o),o)),f(s)&&(e.threshold=s),(!r.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1)}}))})),b(this,"afterGetSeriesExtremes")},t.prototype.translate=function(t,e,i,n,r,s){var a=this.linkedParent||this,o=1,l=0,h=n&&a.old?a.old.transA:a.transA;n=n&&a.old?a.old.min:a.min;var u=a.minPixelPadding;return r=(a.isOrdinal||a.brokenAxis&&a.brokenAxis.hasBreaks||a.logarithmic&&r)&&a.lin2val,h||(h=a.transA),i&&(o*=-1,l=a.len),a.reversed&&(l-=(o*=-1)*(a.sector||a.len)),e?(t=(t*o+l-u)/h+n,r&&(t=a.lin2val(t))):(r&&(t=a.val2lin(t)),t=S(n)?o*(t-n)*h+l+o*u+(S(s)?h*s:0):void 0),t},t.prototype.toPixels=function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},t.prototype.toValue=function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},t.prototype.getPlotLinePath=function(t){function e(t,e,i){return("pass"!==m&&t<e||t>i)&&(m?t=d(t,e,i):a=!0),t}var i,n,r,s,a,o=this,l=o.chart,h=o.left,u=o.top,c=t.old,p=t.value,f=t.translatedValue,g=t.lineWidth,m=t.force,v=c&&l.oldChartHeight||l.chartHeight,y=c&&l.oldChartWidth||l.chartWidth,_=o.transB;return t={value:p,lineWidth:g,old:c,force:m,acrossPanes:t.acrossPanes,translatedValue:f},b(this,"getPlotLinePath",t,(function(t){f=A(f,o.translate(p,null,null,c)),f=d(f,-1e5,1e5),i=r=Math.round(f+_),n=s=Math.round(v-f-_),S(f)?o.horiz?(n=u,s=v-o.bottom,i=r=e(i,h,h+o.width)):(i=h,r=y-o.right,n=s=e(n,u,u+o.height)):(a=!0,m=!1),t.path=a&&!m?null:l.renderer.crispLine([["M",i,n],["L",r,s]],g||1)})),t.path},t.prototype.getLinearTickPositions=function(t,e,i){var n=p(Math.floor(e/t)*t);i=p(Math.ceil(i/t)*t);var r,s=[];if(p(n+t)===n&&(r=20),this.single)return[e];for(e=n;e<=i&&(s.push(e),(e=p(e+t,r))!==a);)var a=e;return s},t.prototype.getMinorTickInterval=function(){var t=this.options;return!0===t.minorTicks?A(t.minorTickInterval,"auto"):!1===t.minorTicks?null:t.minorTickInterval},t.prototype.getMinorTickPositions=function(){var t=this.options,e=this.tickPositions,i=this.minorTickInterval,n=[],r=this.pointRangePadding||0,s=this.min-r,a=(r=this.max+r)-s;if(a&&a/i<this.len/3){var o=this.logarithmic;if(o)this.paddedTicks.forEach((function(t,e,r){e&&n.push.apply(n,o.getLogTickPositions(i,r[e-1],r[e],!0))}));else if(this.dateTime&&"auto"===this.getMinorTickInterval())n=n.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(i),s,r,t.startOfWeek));else for(t=s+(e[0]-s)%i;t<=r&&t!==n[0];t+=i)n.push(t)}return 0!==n.length&&this.trimTicks(n),n},t.prototype.adjustForMinRange=function(){var t,e,i,n,r=this.options,s=this.min,a=this.max,o=this.logarithmic,l=0;if(this.isXAxis&&void 0===this.minRange&&!o&&(f(r.min)||f(r.max)?this.minRange=null:(this.series.forEach((function(r){if(i=r.xData,n=r.xIncrement?1:i.length-1,1<i.length)for(t=n;0<t;t--)e=i[t]-i[t-1],(!l||e<l)&&(l=e)})),this.minRange=Math.min(5*l,this.dataMax-this.dataMin))),a-s<this.minRange){var h=this.dataMax-this.dataMin>=this.minRange,d=this.minRange,p=(d-a+s)/2;p=[s-p,A(r.min,s-p)],h&&(p[2]=this.logarithmic?this.logarithmic.log2lin(this.dataMin):this.dataMin),a=[(s=u(p))+d,A(r.max,s+d)],h&&(a[2]=o?o.log2lin(this.dataMax):this.dataMax),(a=c(a))-s<d&&(p[0]=a-d,p[1]=A(r.min,a-d),s=u(p))}this.min=s,this.max=a},t.prototype.getClosest=function(){var t;return this.categories?t=1:this.series.forEach((function(e){var i=e.closestPointRange,n=e.visible||!e.chart.options.chart.ignoreHiddenSeries;!e.noSharedTooltip&&f(i)&&n&&(t=f(t)?Math.min(t,i):i)})),t},t.prototype.nameToX=function(t){var e=T(this.categories),i=e?this.categories:this.names,n=t.options.x;if(t.series.requireSorting=!1,f(n)||(n=this.options.uniqueNames?e?i.indexOf(t.name):A(i.keys[t.name],-1):t.series.autoIncrement()),-1===n){if(!e)var r=i.length}else r=n;return void 0!==r&&(this.names[r]=t.name,this.names.keys[t.name]=r),r},t.prototype.updateNames=function(){var t=this,e=this.names;0<e.length&&(Object.keys(e.keys).forEach((function(t){delete e.keys[t]})),e.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach((function(e){e.xIncrement=null,e.points&&!e.isDirtyData||(t.max=Math.max(t.max,e.xData.length-1),e.processData(),e.generatePoints()),e.data.forEach((function(i,n){if(i&&i.options&&void 0!==i.name){var r=t.nameToX(i);void 0!==r&&r!==i.x&&(i.x=r,e.xData[n]=r)}}))})))},t.prototype.setAxisTranslation=function(){var t=this,e=t.max-t.min,i=t.axisPointRange||0,n=0,r=0,s=t.linkedParent,a=!!t.categories,o=t.transA,l=t.isXAxis;if(l||a||i){var h=t.getClosest();s?(n=s.minPointOffset,r=s.pointRangePadding):t.series.forEach((function(e){var s=a?1:l?A(e.options.pointRange,h,0):t.axisPointRange||0,o=e.options.pointPlacement;i=Math.max(i,s),t.single&&!a||(e=e.is("xrange")?!l:l,n=Math.max(n,e&&w(o)?0:s/2),r=Math.max(r,e&&"on"===o?0:s))})),s=t.ordinal&&t.ordinal.slope&&h?t.ordinal.slope/h:1,t.minPointOffset=n*=s,t.pointRangePadding=r*=s,t.pointRange=Math.min(i,t.single&&a?1:e),l&&(t.closestPointRange=h)}t.translationSlope=t.transA=o=t.staticScale||t.len/(e+r||1),t.transB=t.horiz?t.left:t.bottom,t.minPixelPadding=o*n,b(this,"afterSetAxisTranslation")},t.prototype.minFromRange=function(){return this.max-this.range},t.prototype.setTickInterval=function(t){var e=this,i=e.chart,n=e.logarithmic,r=e.options,s=e.isXAxis,a=e.isLinked,o=r.maxPadding,l=r.minPadding,h=r.tickInterval,u=r.tickPixelInterval,c=e.categories,d=S(e.threshold)?e.threshold:null,g=e.softThreshold;e.dateTime||c||a||this.getTickAmount();var m=A(e.userMin,r.min),y=A(e.userMax,r.max);if(a){e.linkedParent=i[e.coll][r.linkedTo];var T=e.linkedParent.getExtremes();e.min=A(T.min,T.dataMin),e.max=A(T.max,T.dataMax),r.type!==e.linkedParent.options.type&&v(11,1,i)}else{if(g&&f(d))if(e.dataMin>=d)T=d,l=0;else if(e.dataMax<=d){var x=d;o=0}e.min=A(m,T,e.dataMin),e.max=A(y,x,e.dataMax)}n&&(e.positiveValuesOnly&&!t&&0>=Math.min(e.min,A(e.dataMin,e.min))&&v(10,1,i),e.min=p(n.log2lin(e.min),16),e.max=p(n.log2lin(e.max),16)),e.range&&f(e.max)&&(e.userMin=e.min=m=Math.max(e.dataMin,e.minFromRange()),e.userMax=y=e.max,e.range=null),b(e,"foundExtremes"),e.beforePadding&&e.beforePadding(),e.adjustForMinRange(),!(c||e.axisPointRange||e.stacking&&e.stacking.usePercentage||a)&&f(e.min)&&f(e.max)&&(i=e.max-e.min)&&(!f(m)&&l&&(e.min-=i*l),!f(y)&&o&&(e.max+=i*o)),S(e.userMin)||(S(r.softMin)&&r.softMin<e.min&&(e.min=m=r.softMin),S(r.floor)&&(e.min=Math.max(e.min,r.floor))),S(e.userMax)||(S(r.softMax)&&r.softMax>e.max&&(e.max=y=r.softMax),S(r.ceiling)&&(e.max=Math.min(e.max,r.ceiling))),g&&f(e.dataMin)&&(d=d||0,!f(m)&&e.min<d&&e.dataMin>=d?e.min=e.options.minRange?Math.min(d,e.max-e.minRange):d:!f(y)&&e.max>d&&e.dataMax<=d&&(e.max=e.options.minRange?Math.max(d,e.min+e.minRange):d)),S(e.min)&&S(e.max)&&!this.chart.polar&&e.min>e.max&&(f(e.options.min)?e.max=e.min:f(e.options.max)&&(e.min=e.max)),e.tickInterval=e.min===e.max||void 0===e.min||void 0===e.max?1:a&&e.linkedParent&&!h&&u===e.linkedParent.options.tickPixelInterval?h=e.linkedParent.tickInterval:A(h,this.tickAmount?(e.max-e.min)/Math.max(this.tickAmount-1,1):void 0,c?1:(e.max-e.min)*u/Math.max(e.len,u)),s&&!t&&e.series.forEach((function(t){t.processData(e.min!==(e.old&&e.old.min)||e.max!==(e.old&&e.old.max))})),e.setAxisTranslation(),b(this,"initialAxisTranslation"),e.pointRange&&!h&&(e.tickInterval=Math.max(e.pointRange,e.tickInterval)),t=A(r.minTickInterval,e.dateTime&&!e.series.some((function(t){return t.noSharedTooltip}))?e.closestPointRange:0),!h&&e.tickInterval<t&&(e.tickInterval=t),e.dateTime||e.logarithmic||h||(e.tickInterval=C(e.tickInterval,void 0,_(e.tickInterval),A(r.allowDecimals,.5>e.tickInterval||void 0!==this.tickAmount),!!this.tickAmount)),this.tickAmount||(e.tickInterval=e.unsquish()),this.setTickPositions()},t.prototype.setTickPositions=function(){var t=this.options,e=t.tickPositions,i=this.getMinorTickInterval(),n=t.tickPositioner,r=this.hasVerticalPanning(),s="colorAxis"===this.coll,a=(s||!r)&&t.startOnTick;r=(s||!r)&&t.endOnTick,this.tickmarkOffset=this.categories&&"between"===t.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===i&&this.tickInterval?this.tickInterval/5:i,this.single=this.min===this.max&&f(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==t.allowDecimals),this.tickPositions=i=e&&e.slice(),!i&&(this.ordinal&&this.ordinal.positions||!((this.max-this.min)/this.tickInterval>Math.max(2*this.len,200))?i=this.dateTime?this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,t.units),this.min,this.max,t.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,!0):this.logarithmic?this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max):(i=[this.min,this.max],v(19,!1,this.chart)),i.length>this.len&&((i=[i[0],i.pop()])[0]===i[1]&&(i.length=1)),this.tickPositions=i,n&&(n=n.apply(this,[this.min,this.max])))&&(this.tickPositions=i=n),this.paddedTicks=i.slice(0),this.trimTicks(i,a,r),this.isLinked||(this.single&&2>i.length&&!this.categories&&!this.series.some((function(t){return t.is("heatmap")&&"between"===t.options.pointPlacement}))&&(this.min-=.5,this.max+=.5),e||n||this.adjustTickAmount()),b(this,"afterSetTickPositions")},t.prototype.trimTicks=function(t,e,i){var n=t[0],r=t[t.length-1],s=!this.isOrdinal&&this.minPointOffset||0;if(b(this,"trimTicks"),!this.isLinked){if(e&&-1/0!==n)this.min=n;else for(;this.min-s>t[0];)t.shift();if(i)this.max=r;else for(;this.max+s<t[t.length-1];)t.pop();0===t.length&&f(n)&&!this.options.tickPositions&&t.push((r+n)/2)}},t.prototype.alignToOthers=function(){var t,e={},i=this.options;return!1!==this.chart.options.chart.alignTicks&&i.alignTicks&&!1!==i.startOnTick&&!1!==i.endOnTick&&!this.logarithmic&&this.chart[this.coll].forEach((function(i){var n=i.options;n=[i.horiz?n.left:n.top,n.width,n.height,n.pane].join(),i.series.length&&(e[n]?t=!0:e[n]=1)})),t},t.prototype.getTickAmount=function(){var t=this.options,e=t.tickAmount,i=t.tickPixelInterval;!f(t.tickInterval)&&!e&&this.len<i&&!this.isRadial&&!this.logarithmic&&t.startOnTick&&t.endOnTick&&(e=2),!e&&this.alignToOthers()&&(e=Math.ceil(this.len/i)+1),4>e&&(this.finalTickAmt=e,e=5),this.tickAmount=e},t.prototype.adjustTickAmount=function(){var t=this.options,e=this.tickInterval,i=this.tickPositions,n=this.tickAmount,r=this.finalTickAmt,s=i&&i.length,a=A(this.threshold,this.softThreshold?0:null);if(this.hasData()&&S(this.min)&&S(this.max)){if(s<n){for(;i.length<n;)i.length%2||this.min===a?i.push(p(i[i.length-1]+e)):i.unshift(p(i[0]-e));this.transA*=(s-1)/(n-1),this.min=t.startOnTick?i[0]:Math.min(this.min,i[0]),this.max=t.endOnTick?i[i.length-1]:Math.max(this.max,i[i.length-1])}else s>n&&(this.tickInterval*=2,this.setTickPositions());if(f(r)){for(e=t=i.length;e--;)(3===r&&1==e%2||2>=r&&0<e&&e<t-1)&&i.splice(e,1);this.finalTickAmt=void 0}}},t.prototype.setScale=function(){var t,e=!1,i=!1;this.series.forEach((function(t){e=e||t.isDirtyData||t.isDirty,i=i||t.xAxis&&t.xAxis.isDirty||!1})),this.setAxisSize(),(t=this.len!==(this.old&&this.old.len))||e||i||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?(this.stacking&&this.stacking.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.isDirty||(this.isDirty=t||this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max))):this.stacking&&this.stacking.cleanStacks(),e&&this.panningState&&(this.panningState.isDirty=!0),b(this,"afterSetScale")},t.prototype.setExtremes=function(t,e,i,n,r){var s=this,a=s.chart;i=A(i,!0),s.series.forEach((function(t){delete t.kdTree})),r=y(r,{min:t,max:e}),b(s,"setExtremes",r,(function(){s.userMin=t,s.userMax=e,s.eventArgs=r,i&&a.redraw(n)}))},t.prototype.zoom=function(t,e){var i=this,n=this.dataMin,r=this.dataMax,s=this.options,a=Math.min(n,A(s.min,n)),o=Math.max(r,A(s.max,r));return b(this,"zoom",t={newMin:t,newMax:e},(function(t){var e=t.newMin,s=t.newMax;e===i.min&&s===i.max||(i.allowZoomOutside||(f(n)&&(e<a&&(e=a),e>o&&(e=o)),f(r)&&(s<a&&(s=a),s>o&&(s=o))),i.displayBtn=void 0!==e||void 0!==s,i.setExtremes(e,s,!1,void 0,{trigger:"zoom"})),t.zoomed=!0})),t.zoomed},t.prototype.setAxisSize=function(){var t=this.chart,e=this.options,i=e.offsets||[0,0,0,0],n=this.horiz,r=this.width=Math.round(P(A(e.width,t.plotWidth-i[3]+i[1]),t.plotWidth)),s=this.height=Math.round(P(A(e.height,t.plotHeight-i[0]+i[2]),t.plotHeight)),a=this.top=Math.round(P(A(e.top,t.plotTop+i[0]),t.plotHeight,t.plotTop));e=this.left=Math.round(P(A(e.left,t.plotLeft+i[3]),t.plotWidth,t.plotLeft)),this.bottom=t.chartHeight-s-a,this.right=t.chartWidth-r-e,this.len=Math.max(n?r:s,0),this.pos=n?e:a},t.prototype.getExtremes=function(){var t=this.logarithmic;return{min:t?p(t.lin2log(this.min)):this.min,max:t?p(t.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},t.prototype.getThreshold=function(t){var e=this.logarithmic,i=e?e.lin2log(this.min):this.min;return e=e?e.lin2log(this.max):this.max,null===t||-1/0===t?t=i:1/0===t?t=e:i>t?t=i:e<t&&(t=e),this.translate(t,0,1,0,1)},t.prototype.autoLabelAlign=function(t){var e=(A(t,0)-90*this.side+720)%360;return b(this,"autoLabelAlign",t={align:"center"},(function(t){15<e&&165>e?t.align="right":195<e&&345>e&&(t.align="left")})),t.align},t.prototype.tickSize=function(t){var e=this.options,i=e["tick"===t?"tickLength":"minorTickLength"],n=A(e["tick"===t?"tickWidth":"minorTickWidth"],"tick"===t&&this.isXAxis&&!this.categories?1:0);if(n&&i){"inside"===e[t+"Position"]&&(i=-i);var r=[i,n]}return b(this,"afterTickSize",t={tickSize:r}),t.tickSize},t.prototype.labelMetrics=function(){var t=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize,this.ticks[t]&&this.ticks[t].label)},t.prototype.unsquish=function(){var t,e,i=this.options.labels,n=this.horiz,r=this.tickInterval,s=r,a=this.len/(((this.categories?1:0)+this.max-this.min)/r),o=i.rotation,l=this.labelMetrics(),h=Number.MAX_VALUE,u=Math.max(this.max-this.min,0),c=function(t){var e=t/(a||1);return(e=1<e?Math.ceil(e):1)*r>u&&1/0!==t&&1/0!==a&&u&&(e=Math.ceil(u/r)),p(e*r)};if(n){if(!i.staggerLines&&!i.step)if(S(o))var d=[o];else a<i.autoRotationLimit&&(d=i.autoRotation);d&&d.forEach((function(i){if(i===o||i&&-90<=i&&90>=i){var n=(e=c(Math.abs(l.h/Math.sin(I*i))))+Math.abs(i/360);n<h&&(h=n,t=i,s=e)}}))}else i.step||(s=c(l.h));return this.autoRotation=d,this.labelRotation=A(t,S(o)?o:0),s},t.prototype.getSlotWidth=function(t){var e=this.chart,i=this.horiz,n=this.options.labels,r=Math.max(this.tickPositions.length-(this.categories?0:1),1),s=e.margin[3];if(t&&S(t.slotWidth))return t.slotWidth;if(i&&2>n.step)return n.rotation?0:(this.staggerLines||1)*this.len/r;if(!i){if(void 0!==(t=n.style.width))return parseInt(String(t),10);if(s)return s-e.spacing[3]}return.33*e.chartWidth},t.prototype.renderUnsquish=function(){var t=this.chart,e=t.renderer,i=this.tickPositions,n=this.ticks,r=this.options.labels,s=r.style,a=this.horiz,o=this.getSlotWidth(),l=Math.max(1,Math.round(o-2*r.padding)),h={},u=this.labelMetrics(),c=s.textOverflow,d=0;if(w(r.rotation)||(h.rotation=r.rotation||0),i.forEach((function(t){(t=n[t]).movedLabel&&t.replaceMovedLabel(),t&&t.label&&t.label.textPxLength>d&&(d=t.label.textPxLength)})),this.maxLabelLength=d,this.autoRotation)d>l&&d>u.h?h.rotation=this.labelRotation:this.labelRotation=0;else if(o){var p=l;if(!c){var f="clip";for(l=i.length;!a&&l--;){var g=i[l];(g=n[g].label)&&(g.styles&&"ellipsis"===g.styles.textOverflow?g.css({textOverflow:"clip"}):g.textPxLength>o&&g.css({width:o+"px"}),g.getBBox().height>this.len/i.length-(u.h-u.f)&&(g.specificTextOverflow="ellipsis"))}}}h.rotation&&(p=d>.5*t.chartHeight?.33*t.chartHeight:d,c||(f="ellipsis")),(this.labelAlign=r.align||this.autoLabelAlign(this.labelRotation))&&(h.align=this.labelAlign),i.forEach((function(t){var e=(t=n[t])&&t.label,i=s.width,r={};e&&(e.attr(h),t.shortenLabel?t.shortenLabel():p&&!i&&"nowrap"!==s.whiteSpace&&(p<e.textPxLength||"SPAN"===e.element.tagName)?(r.width=p+"px",c||(r.textOverflow=e.specificTextOverflow||f),e.css(r)):e.styles&&e.styles.width&&!r.width&&!i&&e.css({width:null}),delete e.specificTextOverflow,t.rotation=h.rotation)}),this),this.tickRotCorr=e.rotCorr(u.b,this.labelRotation||0,0!==this.side)},t.prototype.hasData=function(){return this.series.some((function(t){return t.hasData()}))||this.options.showEmpty&&f(this.min)&&f(this.max)},t.prototype.addTitle=function(t){var e,i=this.chart.renderer,n=this.horiz,r=this.opposite,s=this.options.title,a=this.chart.styledMode;this.axisTitle||((e=s.textAlign)||(e=(n?{low:"left",middle:"center",high:"right"}:{low:r?"right":"left",middle:"center",high:r?"left":"right"})[s.align]),this.axisTitle=i.text(s.text||"",0,0,s.useHTML).attr({zIndex:7,rotation:s.rotation,align:e}).addClass("highcharts-axis-title"),a||this.axisTitle.css(k(s.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),a||s.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[t?"show":"hide"](t)},t.prototype.generateTick=function(t){var e=this.ticks;e[t]?e[t].addLabel():e[t]=new s(this,t)},t.prototype.getOffset=function(){var t,e=this,i=this,n=i.chart,r=n.renderer,s=i.options,a=i.tickPositions,o=i.ticks,l=i.horiz,h=i.side,u=n.inverted&&!i.isZAxis?[1,0,3,2][h]:h,c=0,d=0,p=s.title,g=s.labels,m=0,v=n.axisOffset;n=n.clipOffset;var y=[-1,1,1,-1][h],_=s.className,T=i.axisParent,x=i.hasData();if(i.showAxis=t=x||s.showEmpty,i.staggerLines=i.horiz&&g.staggerLines||void 0,!i.axisGroup){var S=function(t,i,n){return r.g(t).attr({zIndex:n}).addClass("highcharts-"+e.coll.toLowerCase()+i+" "+(e.isRadial?"highcharts-radial-axis"+i+" ":"")+(_||"")).add(T)};i.gridGroup=S("grid","-grid",s.gridZIndex),i.axisGroup=S("axis","",s.zIndex),i.labelGroup=S("axis-labels","-labels",g.zIndex)}if(x||i.isLinked?(a.forEach((function(t,e){i.generateTick(t,e)})),i.renderUnsquish(),i.reserveSpaceDefault=0===h||2===h||{1:"left",3:"right"}[h]===i.labelAlign,A(g.reserveSpace,"center"===i.labelAlign||null,i.reserveSpaceDefault)&&a.forEach((function(t){m=Math.max(o[t].getLabelSize(),m)})),i.staggerLines&&(m*=i.staggerLines),i.labelOffset=m*(i.opposite?-1:1)):E(o,(function(t,e){t.destroy(),delete o[e]})),p&&p.text&&!1!==p.enabled&&(i.addTitle(t),t&&!1!==p.reserveSpace)){i.titleOffset=c=i.axisTitle.getBBox()[l?"height":"width"];var w=p.offset;d=f(w)?0:A(p.margin,l?5:10)}i.renderLine(),i.offset=y*A(s.offset,v[h]?v[h]+(s.margin||0):0),i.tickRotCorr=i.tickRotCorr||{x:0,y:0},p=0===h?-i.labelMetrics().h:2===h?i.tickRotCorr.y:0,d=Math.abs(m)+d,m&&(d=d-p+y*(l?A(g.y,i.tickRotCorr.y+8*y):g.x)),i.axisTitleMargin=A(w,d),i.getMaxLabelDimensions&&(i.maxLabelDimensions=i.getMaxLabelDimensions(o,a)),l=this.tickSize("tick"),v[h]=Math.max(v[h],(i.axisTitleMargin||0)+c+y*i.offset,d,a&&a.length&&l?l[0]+y*i.offset:0),s=s.offset?0:2*Math.floor(i.axisLine.strokeWidth()/2),n[u]=Math.max(n[u],s),b(this,"afterGetOffset")},t.prototype.getLinePath=function(t){var e=this.chart,i=this.opposite,n=this.offset,r=this.horiz,s=this.left+(i?this.width:0)+n;return n=e.chartHeight-this.bottom-(i?this.height:0)+n,i&&(t*=-1),e.renderer.crispLine([["M",r?this.left:s,r?n:this.top],["L",r?e.chartWidth-this.right:s,r?n:e.chartHeight-this.bottom]],t)},t.prototype.renderLine=function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},t.prototype.getTitlePosition=function(){var t=this.horiz,e=this.left,i=this.top,n=this.len,r=this.options.title,s=t?e:i,a=this.opposite,o=this.offset,l=r.x,h=r.y,u=this.axisTitle,c=this.chart.renderer.fontMetrics(r.style.fontSize,u);return u=Math.max(u.getBBox(null,0).height-c.h-1,0),n={low:s+(t?0:n),middle:s+n/2,high:s+(t?n:0)}[r.align],e=(t?i+this.height:e)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+[-u,u,c.f,-u][this.side],t={x:t?n+l:e+(a?this.width:0)+o+l,y:t?e+h-(a?this.height:0)+o:n+h},b(this,"afterGetTitlePosition",{titlePosition:t}),t},t.prototype.renderMinorTick=function(t){var e=this.chart.hasRendered&&this.old,i=this.minorTicks;i[t]||(i[t]=new s(this,t,"minor")),e&&i[t].isNew&&i[t].render(null,!0),i[t].render(null,!1,1)},t.prototype.renderTick=function(t,e){var i=this.ticks,n=this.chart.hasRendered&&this.old;(!this.isLinked||t>=this.min&&t<=this.max||this.grid&&this.grid.isColumn)&&(i[t]||(i[t]=new s(this,t)),n&&i[t].isNew&&i[t].render(e,!0,-1),i[t].render(e))},t.prototype.render=function(){var t,e,n=this,r=n.chart,a=n.logarithmic,l=n.options,h=n.isLinked,u=n.tickPositions,c=n.axisTitle,d=n.ticks,p=n.minorTicks,f=n.alternateBands,g=l.stackLabels,m=l.alternateGridColor,v=n.tickmarkOffset,y=n.axisLine,_=n.showAxis,T=o(r.renderer.globalAnimation);n.labelEdge.length=0,n.overlap=!1,[d,p,f].forEach((function(t){E(t,(function(t){t.isActive=!1}))})),(n.hasData()||h)&&(n.minorTickInterval&&!n.categories&&n.getMinorTickPositions().forEach((function(t){n.renderMinorTick(t)})),u.length&&(u.forEach((function(t,e){n.renderTick(t,e)})),v&&(0===n.min||n.single)&&(d[-1]||(d[-1]=new s(n,-1,null,!0)),d[-1].render(-1))),m&&u.forEach((function(s,o){e=void 0!==u[o+1]?u[o+1]+v:n.max-v,0==o%2&&s<n.max&&e<=n.max+(r.polar?-v:v)&&(f[s]||(f[s]=new i.PlotLineOrBand(n)),t=s+v,f[s].options={from:a?a.lin2log(t):t,to:a?a.lin2log(e):e,color:m,className:"highcharts-alternate-grid"},f[s].render(),f[s].isActive=!0)})),n._addedPlotLB||(n._addedPlotLB=!0,(l.plotLines||[]).concat(l.plotBands||[]).forEach((function(t){n.addPlotBandOrLine(t)})))),[d,p,f].forEach((function(t){var e,i=[],n=T.duration;E(t,(function(t,e){t.isActive||(t.render(e,!1,0),t.isActive=!1,i.push(e))})),M((function(){for(e=i.length;e--;)t[i[e]]&&!t[i[e]].isActive&&(t[i[e]].destroy(),delete t[i[e]])}),t!==f&&r.hasRendered&&n?n:0)})),y&&(y[y.isPlaced?"animate":"attr"]({d:this.getLinePath(y.strokeWidth())}),y.isPlaced=!0,y[_?"show":"hide"](_)),c&&_&&(l=n.getTitlePosition(),S(l.y)?(c[c.isNew?"attr":"animate"](l),c.isNew=!1):(c.attr("y",-9999),c.isNew=!0)),g&&g.enabled&&n.stacking&&n.stacking.renderStackTotals(),n.old={len:n.len,max:n.max,min:n.min,transA:n.transA,userMax:n.userMax,userMin:n.userMin},n.isDirty=!1,b(this,"afterRender")},t.prototype.redraw=function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach((function(t){t.render()}))),this.series.forEach((function(t){t.isDirty=!0}))},t.prototype.getKeepProps=function(){return this.keepProps||t.keepProps},t.prototype.destroy=function(t){var e,i=this,n=i.plotLinesAndBands;if(b(this,"destroy",{keepEvents:t}),t||O(i),[i.ticks,i.minorTicks,i.alternateBands].forEach((function(t){g(t)})),n)for(t=n.length;t--;)n[t].destroy();for(e in"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach((function(t){i[t]&&(i[t]=i[t].destroy())})),i.plotLinesAndBandsGroups)i.plotLinesAndBandsGroups[e]=i.plotLinesAndBandsGroups[e].destroy();E(i,(function(t,e){-1===i.getKeepProps().indexOf(e)&&delete i[e]}))},t.prototype.drawCrosshair=function(t,i){var r,s=this.crosshair,a=A(s&&s.snap,!0),o=this.cross,l=this.chart;if(b(this,"drawCrosshair",{e:t,point:i}),t||(t=this.cross&&this.cross.e),s&&!1!==(f(i)||!a)){if(a?f(i)&&(r=A("colorAxis"!==this.coll?i.crosshairPos:null,this.isXAxis?i.plotX:this.len-i.plotY)):r=t&&(this.horiz?t.chartX-this.pos:this.len-t.chartY+this.pos),f(r)){var h={value:i&&(this.isXAxis?i.x:A(i.stackY,i.y)),translatedValue:r};l.polar&&y(h,{isCrosshair:!0,chartX:t&&t.chartX,chartY:t&&t.chartY,point:i}),h=this.getPlotLinePath(h)||null}if(!f(h))return void this.hideCrosshair();a=this.categories&&!this.isRadial,o||(this.cross=o=l.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(a?"category ":"thin ")+(s.className||"")).attr({zIndex:A(s.zIndex,2)}).add(),l.styledMode||(o.attr({stroke:s.color||(a?e.parse(n.highlightColor20).setOpacity(.25).get():n.neutralColor20),"stroke-width":A(s.width,1)}).css({"pointer-events":"none"}),s.dashStyle&&o.attr({dashstyle:s.dashStyle}))),o.show().attr({d:h}),a&&!s.width&&o.attr({"stroke-width":this.transA}),this.cross.e=t}else this.hideCrosshair();b(this,"afterDrawCrosshair",{e:t,point:i})},t.prototype.hideCrosshair=function(){this.cross&&this.cross.hide(),b(this,"afterHideCrosshair")},t.prototype.hasVerticalPanning=function(){var t=this.chart.options.chart.panning;return!!(t&&t.enabled&&/y/.test(t.type))},t.prototype.validatePositiveValue=function(t){return S(t)&&0<t},t.prototype.update=function(t,e){var i=this.chart,n=t&&t.events||{};t=k(this.userOptions,t),E(i.options[this.coll].events,(function(t,e){void 0===n[e]&&(n[e]=void 0)})),this.destroy(!0),this.init(i,y(t,{events:n})),i.isDirtyBox=!0,A(e,!0)&&i.redraw()},t.prototype.remove=function(t){for(var e=this.chart,i=this.coll,n=this.series,r=n.length;r--;)n[r]&&n[r].remove(!1);m(e.axes,this),m(e[i],this),e[i].forEach((function(t,e){t.options.index=t.userOptions.index=e})),this.destroy(),e.isDirtyBox=!0,A(t,!0)&&e.redraw()},t.prototype.setTitle=function(t,e){this.update({title:t},e)},t.prototype.setCategories=function(t,e){this.update({categories:t},e)},t.defaultOptions={alignTicks:!0,allowDecimals:void 0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:void 0,enabled:!0,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,x:0,zIndex:7,style:{color:n.neutralColor60,cursor:"default",fontSize:"11px"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minPadding:.01,offset:void 0,opposite:!1,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:!1,x:0,y:0,style:{color:n.neutralColor60}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:n.neutralColor5,minorGridLineWidth:1,minorTickColor:n.neutralColor40,lineColor:n.highlightColor20,lineWidth:1,gridLineColor:n.neutralColor10,gridLineWidth:void 0,tickColor:n.highlightColor20},t.defaultYAxisOptions={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){return(0,this.axis.chart.numberFormatter)(this.total,-1)},style:{color:n.neutralColor100,fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},t.defaultLeftAxisOptions={labels:{x:-15},title:{rotation:270}},t.defaultRightAxisOptions={labels:{x:15},title:{rotation:90}},t.defaultBottomAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},t.defaultTopAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},t.keepProps="extKey hcEvents names series userMax userMin".split(" "),t}(),i.Axis=t,i.Axis})),e(i,"Core/Axis/DateTimeAxis.js",[i["Core/Axis/Axis.js"],i["Core/Utilities.js"]],(function(t,e){var i=e.addEvent,n=e.getMagnitude,r=e.normalizeTickInterval,s=e.timeUnits,a=function(){function t(t){this.axis=t}return t.prototype.normalizeTimeTickInterval=function(t,e){var i=e||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];e=i[i.length-1];var a,o=s[e[0]],l=e[1];for(a=0;a<i.length&&(e=i[a],o=s[e[0]],l=e[1],!(i[a+1]&&t<=(o*l[l.length-1]+s[i[a+1][0]])/2));a++);return o===s.year&&t<5*o&&(l=[1,2,5]),{unitRange:o,count:t=r(t/o,l,"year"===e[0]?Math.max(n(t/o),1):1),unitName:e[0]}},t}();return(e=function(){function t(){}return t.compose=function(t){t.keepProps.push("dateTime"),t.prototype.getTimeTicks=function(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)},i(t,"init",(function(t){"datetime"!==t.userOptions.type?this.dateTime=void 0:this.dateTime||(this.dateTime=new a(this))}))},t.AdditionsClass=a,t}()).compose(t),e})),e(i,"Core/Axis/LogarithmicAxis.js",[i["Core/Axis/Axis.js"],i["Core/Utilities.js"]],(function(t,e){var i=e.addEvent,n=e.getMagnitude,r=e.normalizeTickInterval,s=e.pick,a=function(){function t(t){this.axis=t}return t.prototype.getLogTickPositions=function(t,e,i,a){var o=this.axis,l=o.len,h=o.options,u=[];if(a||(this.minorAutoInterval=void 0),.5<=t)t=Math.round(t),u=o.getLinearTickPositions(t,e,i);else if(.08<=t){var c,d=Math.floor(e),p=h=void 0;for(l=.3<t?[1,2,4]:.15<t?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];d<i+1&&!p;d++){var f=l.length;for(c=0;c<f&&!p;c++){var g=this.log2lin(this.lin2log(d)*l[c]);g>e&&(!a||h<=i)&&void 0!==h&&u.push(h),h>i&&(p=!0),h=g}}}else e=this.lin2log(e),i=this.lin2log(i),t=a?o.getMinorTickInterval():h.tickInterval,t=s("auto"===t?null:t,this.minorAutoInterval,h.tickPixelInterval/(a?5:1)*(i-e)/((a?l/o.tickPositions.length:l)||1)),t=r(t,void 0,n(t)),u=o.getLinearTickPositions(t,e,i).map(this.log2lin),a||(this.minorAutoInterval=t/5);return a||(o.tickInterval=t),u},t.prototype.lin2log=function(t){return Math.pow(10,t)},t.prototype.log2lin=function(t){return Math.log(t)/Math.LN10},t}();return(e=function(){function t(){}return t.compose=function(t){t.keepProps.push("logarithmic"),i(t,"init",(function(t){var e=this.logarithmic;"logarithmic"!==t.userOptions.type?this.logarithmic=void 0:e||(this.logarithmic=new a(this))})),i(t,"afterInit",(function(){var t=this.logarithmic;t&&(this.lin2val=function(e){return t.lin2log(e)},this.val2lin=function(e){return t.log2lin(e)})}))},t}()).compose(t),e})),e(i,"Core/Axis/PlotLineOrBand.js",[i["Core/Axis/Axis.js"],i["Core/Globals.js"],i["Core/Color/Palette.js"],i["Core/Utilities.js"]],(function(t,e,i,n){var r=n.arrayMax,s=n.arrayMin,a=n.defined,o=n.destroyObjectProperties,l=n.erase,h=n.extend,u=n.fireEvent,c=n.isNumber,d=n.merge,p=n.objectEach,f=n.pick;return n=function(){function t(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)}return t.prototype.render=function(){u(this,"render");var t=this,e=t.axis,n=e.horiz,r=e.logarithmic,s=t.options,o=s.label,l=t.label,h=s.to,c=s.from,g=s.value,m=a(c)&&a(h),v=a(g),y=t.svgElem,b=!y,_=[],T=s.color,x=f(s.zIndex,0),S=s.events;_={class:"highcharts-plot-"+(m?"band ":"line ")+(s.className||"")};var w={},k=e.chart.renderer,C=m?"bands":"lines";if(r&&(c=r.log2lin(c),h=r.log2lin(h),g=r.log2lin(g)),e.chart.styledMode||(v?(_.stroke=T||i.neutralColor40,_["stroke-width"]=f(s.width,1),s.dashStyle&&(_.dashstyle=s.dashStyle)):m&&(_.fill=T||i.highlightColor10,s.borderWidth&&(_.stroke=s.borderColor,_["stroke-width"]=s.borderWidth))),w.zIndex=x,C+="-"+x,(r=e.plotLinesAndBandsGroups[C])||(e.plotLinesAndBandsGroups[C]=r=k.g("plot-"+C).attr(w).add()),b&&(t.svgElem=y=k.path().attr(_).add(r)),v)_=e.getPlotLinePath({value:g,lineWidth:y.strokeWidth(),acrossPanes:s.acrossPanes});else{if(!m)return;_=e.getPlotBandPath(c,h,s)}return!t.eventsAdded&&S&&(p(S,(function(e,i){y.on(i,(function(e){S[i].apply(t,[e])}))})),t.eventsAdded=!0),(b||!y.d)&&_&&_.length?y.attr({d:_}):y&&(_?(y.show(!0),y.animate({d:_})):y.d&&(y.hide(),l&&(t.label=l=l.destroy()))),o&&(a(o.text)||a(o.formatter))&&_&&_.length&&0<e.width&&0<e.height&&!_.isFlat?(o=d({align:n&&m&&"center",x:n?!m&&4:10,verticalAlign:!n&&m&&"middle",y:n?m?16:10:m?6:-4,rotation:n&&!m&&90},o),this.renderLabel(o,_,m,x)):l&&l.hide(),t},t.prototype.renderLabel=function(t,e,i,n){var a=this.label,o=this.axis.chart.renderer;a||((a={align:t.textAlign||t.align,rotation:t.rotation,class:"highcharts-plot-"+(i?"band":"line")+"-label "+(t.className||"")}).zIndex=n,n=this.getLabelText(t),this.label=a=o.text(n,0,0,t.useHTML).attr(a).add(),this.axis.chart.styledMode||a.css(t.style)),o=e.xBounds||[e[0][1],e[1][1],i?e[2][1]:e[0][1]],e=e.yBounds||[e[0][2],e[1][2],i?e[2][2]:e[0][2]],i=s(o),n=s(e),a.align(t,!1,{x:i,y:n,width:r(o)-i,height:r(e)-n}),a.show(!0)},t.prototype.getLabelText=function(t){return a(t.formatter)?t.formatter.call(this):t.text},t.prototype.destroy=function(){l(this.axis.plotLinesAndBands,this),delete this.axis,o(this)},t}(),h(t.prototype,{getPlotBandPath:function(t,e,i){void 0===i&&(i=this.options);var n=this.getPlotLinePath({value:e,force:!0,acrossPanes:i.acrossPanes});i=this.getPlotLinePath({value:t,force:!0,acrossPanes:i.acrossPanes});var r=[],s=this.horiz,a=1;if(t=!c(this.min)||!c(this.max)||t<this.min&&e<this.min||t>this.max&&e>this.max,i&&n){if(t){var o=i.toString()===n.toString();a=0}for(t=0;t<i.length;t+=2){e=i[t];var l=i[t+1],h=n[t],u=n[t+1];"M"!==e[0]&&"L"!==e[0]||"M"!==l[0]&&"L"!==l[0]||"M"!==h[0]&&"L"!==h[0]||"M"!==u[0]&&"L"!==u[0]||(s&&h[1]===e[1]?(h[1]+=a,u[1]+=a):s||h[2]!==e[2]||(h[2]+=a,u[2]+=a),r.push(["M",e[1],e[2]],["L",l[1],l[2]],["L",u[1],u[2]],["L",h[1],h[2]],["Z"])),r.isFlat=o}}return r},addPlotBand:function(t){return this.addPlotBandOrLine(t,"plotBands")},addPlotLine:function(t){return this.addPlotBandOrLine(t,"plotLines")},addPlotBandOrLine:function(t,i){var n=this,r=new e.PlotLineOrBand(this,t),s=this.userOptions;if(this.visible&&(r=r.render()),r){if(this._addedPlotLB||(this._addedPlotLB=!0,(s.plotLines||[]).concat(s.plotBands||[]).forEach((function(t){n.addPlotBandOrLine(t)}))),i){var a=s[i]||[];a.push(t),s[i]=a}this.plotLinesAndBands.push(r)}return r},removePlotBandOrLine:function(t){for(var e=this.plotLinesAndBands,i=this.options,n=this.userOptions,r=e.length;r--;)e[r].id===t&&e[r].destroy();[i.plotLines||[],n.plotLines||[],i.plotBands||[],n.plotBands||[]].forEach((function(e){for(r=e.length;r--;)(e[r]||{}).id===t&&l(e,e[r])}))},removePlotBand:function(t){this.removePlotBandOrLine(t)},removePlotLine:function(t){this.removePlotBandOrLine(t)}}),e.PlotLineOrBand=n,e.PlotLineOrBand})),e(i,"Core/Tooltip.js",[i["Core/FormatUtilities.js"],i["Core/Globals.js"],i["Core/Color/Palette.js"],i["Core/Utilities.js"]],(function(t,e,i,n){var r=t.format,s=e.doc,a=n.clamp,o=n.css,l=n.defined,h=n.discardElement,u=n.extend,c=n.fireEvent,d=n.isArray,p=n.isNumber,f=n.isString,g=n.merge,m=n.pick,v=n.splat,y=n.syncTimeout,b=n.timeUnits;return t=function(){function t(t,e){this.container=void 0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.now={},this.options={},this.outside=!1,this.chart=t,this.init(t,e)}return t.prototype.applyFilter=function(){var t=this.chart;t.renderer.definition({tagName:"filter",attributes:{id:"drop-shadow-"+t.index,opacity:.5},children:[{tagName:"feGaussianBlur",attributes:{in:"SourceAlpha",stdDeviation:1}},{tagName:"feOffset",attributes:{dx:1,dy:1}},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",attributes:{type:"linear",slope:.3}}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",attributes:{in:"SourceGraphic"}}]}]}),t.renderer.definition({tagName:"style",textContent:".highcharts-tooltip-"+t.index+"{filter:url(#drop-shadow-"+t.index+")}"})},t.prototype.bodyFormatter=function(t){return t.map((function(t){var e=t.series.tooltipOptions;return(e[(t.point.formatPrefix||"point")+"Formatter"]||t.point.tooltipFormatter).call(t.point,e[(t.point.formatPrefix||"point")+"Format"]||"")}))},t.prototype.cleanSplit=function(t){this.chart.series.forEach((function(e){var i=e&&e.tt;i&&(!i.isActive||t?e.tt=i.destroy():i.isActive=!1)}))},t.prototype.defaultFormatter=function(t){var e=this.points||v(this),i=[t.tooltipFooterHeaderFormatter(e[0])];return(i=i.concat(t.bodyFormatter(e))).push(t.tooltipFooterHeaderFormatter(e[0],!0)),i},t.prototype.destroy=function(){this.label&&(this.label=this.label.destroy()),this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy()),this.renderer&&(this.renderer=this.renderer.destroy(),h(this.container)),n.clearTimeout(this.hideTimer),n.clearTimeout(this.tooltipTimeout)},t.prototype.getAnchor=function(t,e){var i,n,r=this.chart,s=r.pointer,a=r.inverted,o=r.plotTop,l=r.plotLeft,h=0,u=0;return t=v(t),this.followPointer&&e?(void 0===e.chartX&&(e=s.normalize(e)),s=[e.chartX-l,e.chartY-o]):t[0].tooltipPos?s=t[0].tooltipPos:(t.forEach((function(t){i=t.series.yAxis,n=t.series.xAxis,h+=t.plotX||0,u+=t.plotLow?(t.plotLow+(t.plotHigh||0))/2:t.plotY||0,n&&i&&(a?(h+=o+r.plotHeight-n.len-n.pos,u+=l+r.plotWidth-i.len-i.pos):(h+=n.pos-l,u+=i.pos-o))})),h/=t.length,u/=t.length,s=[a?r.plotWidth-u:h,a?r.plotHeight-h:u],this.shared&&1<t.length&&e&&(a?s[0]=e.chartX-l:s[1]=e.chartY-o)),s.map(Math.round)},t.prototype.getDateFormat=function(t,e,i,n){var r=this.chart.time,s=r.dateFormat("%m-%d %H:%M:%S.%L",e),a={millisecond:15,second:12,minute:9,hour:6,day:3},o="millisecond";for(l in b){if(t===b.week&&+r.dateFormat("%w",e)===i&&"00:00:00.000"===s.substr(6)){var l="week";break}if(b[l]>t){l=o;break}if(a[l]&&s.substr(a[l])!=="01-01 00:00:00.000".substr(a[l]))break;"week"!==l&&(o=l)}if(l)var h=r.resolveDTLFormat(n[l]).main;return h},t.prototype.getLabel=function(){var t,i=this,n=this.chart.renderer,r=this.chart.styledMode,s=this.options,a="tooltip"+(l(s.className)?" "+s.className:""),h=s.style&&s.style.pointerEvents||(!this.followPointer&&s.stickOnContact?"auto":"none");if(!this.label){if(this.outside){var u=this.chart.options.chart.style;this.container=t=e.doc.createElement("div"),t.className="highcharts-tooltip-container",o(t,{position:"absolute",top:"1px",pointerEvents:h,zIndex:Math.max(this.options.style&&this.options.style.zIndex||0,(u&&u.zIndex||0)+3)}),e.doc.body.appendChild(t),this.renderer=n=new e.Renderer(t,0,0,u,void 0,void 0,n.styledMode)}if(this.split?this.label=n.g(a):(this.label=n.label("",0,0,s.shape||"callout",null,null,s.useHTML,null,a).attr({padding:s.padding,r:s.borderRadius}),r||this.label.attr({fill:s.backgroundColor,"stroke-width":s.borderWidth}).css(s.style).css({pointerEvents:h}).shadow(s.shadow)),r&&(this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index)),i.outside&&!i.split){var c=this.label,d=c.xSetter,p=c.ySetter;c.xSetter=function(e){d.call(c,i.distance),t.style.left=e+"px"},c.ySetter=function(e){p.call(c,i.distance),t.style.top=e+"px"}}this.label.on("mouseenter",(function(){i.inContact=!0})).on("mouseleave",(function(){var t=i.chart.hoverSeries;i.inContact=!1,t&&t.onMouseOut&&t.onMouseOut()})).attr({zIndex:8}).add()}return this.label},t.prototype.getPosition=function(t,e,i){var n,r=this.chart,a=this.distance,o={},l=r.inverted&&i.h||0,h=this.outside,u=h?s.documentElement.clientWidth-2*a:r.chartWidth,c=h?Math.max(s.body.scrollHeight,s.documentElement.scrollHeight,s.body.offsetHeight,s.documentElement.offsetHeight,s.documentElement.clientHeight):r.chartHeight,d=r.pointer.getChartPosition(),p=function(n){var s="x"===n;return[n,s?u:c,s?t:e].concat(h?[s?t*d.scaleX:e*d.scaleY,s?d.left-a+(i.plotX+r.plotLeft)*d.scaleX:d.top-a+(i.plotY+r.plotTop)*d.scaleY,0,s?u:c]:[s?t:e,s?i.plotX+r.plotLeft:i.plotY+r.plotTop,s?r.plotLeft:r.plotTop,s?r.plotLeft+r.plotWidth:r.plotTop+r.plotHeight])},f=p("y"),g=p("x"),v=!this.followPointer&&m(i.ttBelow,!r.inverted==!!i.negative),y=function(t,e,i,n,r,s,u){var c=h?"y"===t?a*d.scaleY:a*d.scaleX:a,p=(i-n)/2,f=n<r-a,g=r+a+n<e,m=r-c-i+p;if(r=r+c-p,v&&g)o[t]=r;else if(!v&&f)o[t]=m;else if(f)o[t]=Math.min(u-n,0>m-l?m:m-l);else{if(!g)return!1;o[t]=Math.max(s,r+l+i>e?r:r+l)}},b=function(t,e,i,n,r){var s;return r<a||r>e-a?s=!1:o[t]=r<i/2?1:r>e-n/2?e-n-2:r-i/2,s},_=function(t){var e=f;f=g,g=e,n=t},T=function(){!1!==y.apply(0,f)?!1!==b.apply(0,g)||n||(_(!0),T()):n?o.x=o.y=0:(_(!0),T())};return(r.inverted||1<this.len)&&_(),T(),o},t.prototype.getXDateFormat=function(t,e,i){e=e.dateTimeLabelFormats;var n=i&&i.closestPointRange;return(n?this.getDateFormat(n,t.x,i.options.startOfWeek,e):e.day)||e.year},t.prototype.hide=function(t){var e=this;n.clearTimeout(this.hideTimer),t=m(t,this.options.hideDelay,500),this.isHidden||(this.hideTimer=y((function(){e.getLabel().fadeOut(t?void 0:t),e.isHidden=!0}),t))},t.prototype.init=function(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=e.split&&!t.inverted&&!t.polar,this.shared=e.shared||this.split,this.outside=m(e.outside,!(!t.scrollablePixelsX&&!t.scrollablePixelsY))},t.prototype.isStickyOnContact=function(){return!(this.followPointer||!this.options.stickOnContact||!this.inContact)},t.prototype.move=function(t,e,i,r){var s=this,a=s.now,o=!1!==s.options.animation&&!s.isHidden&&(1<Math.abs(t-a.x)||1<Math.abs(e-a.y)),l=s.followPointer||1<s.len;u(a,{x:o?(2*a.x+t)/3:t,y:o?(a.y+e)/2:e,anchorX:l?void 0:o?(2*a.anchorX+i)/3:i,anchorY:l?void 0:o?(a.anchorY+r)/2:r}),s.getLabel().attr(a),s.drawTracker(),o&&(n.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout((function(){s&&s.move(t,e,i,r)}),32))},t.prototype.refresh=function(t,e){var r=this.chart,s=this.options,a=v(t),o=a[0],l={},h=[],u=s.formatter||this.defaultFormatter;l=this.shared;var p=r.styledMode;if(s.enabled){n.clearTimeout(this.hideTimer),this.followPointer=!this.split&&o.series.tooltipOptions.followPointer;var f=this.getAnchor(t,e),g=f[0],y=f[1];if(!l||!d(t)&&t.series&&t.series.noSharedTooltip?l=o.getLabelConfig():(r.pointer.applyInactiveState(a),a.forEach((function(t){t.setState("hover"),h.push(t.getLabelConfig())})),(l={x:o.category,y:o.y}).points=h),this.len=h.length,t=u.call(l,this),u=o.series,this.distance=m(u.tooltipOptions.distance,16),!1===t)this.hide();else{if(this.split)this.renderSplit(t,a);else{if(a=g,l=y,e&&r.pointer.isDirectTouch&&(a=e.chartX-r.plotLeft,l=e.chartY-r.plotTop),!r.polar&&!1!==u.options.clip&&!u.shouldShowTooltip(a,l))return void this.hide();e=this.getLabel(),s.style.width&&!p||e.css({width:this.chart.spacingBox.width+"px"}),e.attr({text:t&&t.join?t.join(""):t}),e.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+m(o.colorIndex,u.colorIndex)),p||e.attr({stroke:s.borderColor||o.color||u.color||i.neutralColor60}),this.updatePosition({plotX:g,plotY:y,negative:o.negative,ttBelow:o.ttBelow,h:f[2]||0})}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}c(this,"refresh")}},t.prototype.renderSplit=function(t,n){function r(t,e,i,n,r){return void 0===r&&(r=!0),i?(e=O?0:D,t=a(t-n/2,E.left,E.right-n-(o.outside?L:0))):(e-=M,t=a(t=r?t-n-w:t+w,r?t:E.left,E.right)),{x:t,y:e}}var o=this,l=o.chart,h=o.chart,c=h.chartWidth,d=h.chartHeight,p=h.plotHeight,g=h.plotLeft,v=h.plotTop,y=h.pointer,b=h.scrollablePixelsY;b=void 0===b?0:b;var _=h.scrollablePixelsX,T=h.scrollingContainer,x=(T=void 0===T?{scrollLeft:0,scrollTop:0}:T).scrollLeft;T=T.scrollTop;var S=h.styledMode,w=o.distance,k=o.options,C=o.options.positioner,E=o.outside&&"number"!=typeof _?s.documentElement.getBoundingClientRect():{left:x,right:x+c,top:T,bottom:T+d},A=o.getLabel(),P=this.renderer||l.renderer,O=!(!l.xAxis[0]||!l.xAxis[0].opposite),L=(l=y.getChartPosition()).left;l=l.top;var M=v+T,I=0,D=p-b;f(t)&&(t=[!1,t]),t=t.slice(0,n.length+1).reduce((function(t,e,s){if(!1!==e&&""!==e){var l=(s=n[s-1]||{isHeader:!0,plotX:n[0].plotX,plotY:p,series:{}}).isHeader,h=l?o:s.series;e=e.toString();var u=h.tt,c=s.isHeader,d=s.series,f="highcharts-color-"+m(s.colorIndex,d.colorIndex,"none");if(u||(u={padding:k.padding,r:k.borderRadius},S||(u.fill=k.backgroundColor,u["stroke-width"]=k.borderWidth),u=P.label("",0,0,k[c?"headerShape":"shape"]||"callout",void 0,void 0,k.useHTML).addClass((c?"highcharts-tooltip-header ":"")+"highcharts-tooltip-box "+f).attr(u).add(A)),u.isActive=!0,u.attr({text:e}),S||u.css(k.style).shadow(k.shadow).attr({stroke:k.borderColor||s.color||d.color||i.neutralColor80}),e=(c=(h=h.tt=u).getBBox()).width+h.strokeWidth(),l&&(I=c.height,D+=I,O&&(M-=I)),d=void 0===(d=s.plotX)?0:d,f=void 0===(f=s.plotY)?0:f,u=s.series,s.isHeader){d=g+d;var y=v+p/2}else{var b=u.xAxis,_=u.yAxis;d=b.pos+a(d,-w,b.len+w),u.shouldShowTooltip(0,_.pos-v+f,{ignoreX:!0})&&(y=_.pos+f)}d=a(d,E.left-w,E.right+w),"number"==typeof y?(c=c.height+1,f=C?C.call(o,e,c,s):r(d,y,l,e),t.push({align:C?0:void 0,anchorX:d,anchorY:y,boxWidth:e,point:s,rank:m(f.rank,l?1:0),size:c,target:f.y,tt:h,x:f.x})):h.isActive=!1}return t}),[]),!C&&t.some((function(t){var e=(o.outside?L:0)+t.anchorX;return e<E.left&&e+t.boxWidth<E.right||e<L-E.left+t.boxWidth&&E.right-e>e}))&&(t=t.map((function(t){var e=r(t.anchorX,t.anchorY,t.point.isHeader,t.boxWidth,!1);return u(t,{target:e.y,x:e.x})}))),o.cleanSplit(),e.distribute(t,D);var R=L,N=L;t.forEach((function(t){var e=t.x,i=t.boxWidth;(t=t.isHeader)||(o.outside&&L+e<R&&(R=L+e),!t&&o.outside&&R+i>N&&(N=L+e))})),t.forEach((function(t){var e=t.x,i=t.anchorX,n=t.pos,r=t.point.isHeader;if(n={visibility:void 0===n?"hidden":"inherit",x:e,y:n+M,anchorX:i,anchorY:t.anchorY},o.outside&&e<i){var s=L-R;0<s&&(r||(n.x=e+s,n.anchorX=i+s),r&&(n.x=(N-R)/2,n.anchorX=i+s))}t.tt.attr(n)})),t=o.container,b=o.renderer,o.outside&&t&&b&&(h=A.getBBox(),b.setSize(h.width+h.x,h.height+h.y,!1),t.style.left=R+"px",t.style.top=l+"px")},t.prototype.drawTracker=function(){if(this.followPointer||!this.options.stickOnContact)this.tracker&&this.tracker.destroy();else{var t=this.chart,e=this.label,i=t.hoverPoint;if(e&&i){var n={x:0,y:0,width:0,height:0};i=this.getAnchor(i);var r=e.getBBox();i[0]+=t.plotLeft-e.translateX,i[1]+=t.plotTop-e.translateY,n.x=Math.min(0,i[0]),n.y=Math.min(0,i[1]),n.width=0>i[0]?Math.max(Math.abs(i[0]),r.width-i[0]):Math.max(Math.abs(i[0]),r.width),n.height=0>i[1]?Math.max(Math.abs(i[1]),r.height-Math.abs(i[1])):Math.max(Math.abs(i[1]),r.height),this.tracker?this.tracker.attr(n):(this.tracker=e.renderer.rect(n).addClass("highcharts-tracker").add(e),t.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}},t.prototype.styledModeFormat=function(t){return t.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')},t.prototype.tooltipFooterHeaderFormatter=function(t,e){var i=e?"footer":"header",n=t.series,s=n.tooltipOptions,a=s.xDateFormat,o=n.xAxis,l=o&&"datetime"===o.options.type&&p(t.key),h=s[i+"Format"];return c(this,"headerFormatter",e={isFooter:e,labelConfig:t},(function(e){l&&!a&&(a=this.getXDateFormat(t,s,o)),l&&a&&(t.point&&t.point.tooltipDateKeys||["key"]).forEach((function(t){h=h.replace("{point."+t+"}","{point."+t+":"+a+"}")})),n.chart.styledMode&&(h=this.styledModeFormat(h)),e.text=r(h,{point:t,series:n},this.chart)})),e.text},t.prototype.update=function(t){this.destroy(),g(!0,this.chart.options.tooltip.userOptions,t),this.init(this.chart,g(!0,this.options,t))},t.prototype.updatePosition=function(t){var e=this.chart,i=e.pointer,n=this.getLabel(),r=t.plotX+e.plotLeft;if(e=t.plotY+e.plotTop,i=i.getChartPosition(),t=(this.options.positioner||this.getPosition).call(this,n.width,n.height,t),this.outside){var s=(this.options.borderWidth||0)+2*this.distance;this.renderer.setSize(n.width+s,n.height+s,!1),1===i.scaleX&&1===i.scaleY||(o(this.container,{transform:"scale("+i.scaleX+", "+i.scaleY+")"}),r*=i.scaleX,e*=i.scaleY),r+=i.left-t.x,e+=i.top-t.y}this.move(Math.round(t.x),Math.round(t.y||0),r,e)},t}(),e.Tooltip=t,e.Tooltip})),e(i,"Core/Pointer.js",[i["Core/Color/Color.js"],i["Core/Globals.js"],i["Core/Color/Palette.js"],i["Core/Tooltip.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r){var s=t.parse,a=e.charts,o=e.noop,l=r.addEvent,h=r.attr,u=r.css,c=r.defined,d=r.extend,p=r.find,f=r.fireEvent,g=r.isNumber,m=r.isObject,v=r.objectEach,y=r.offset,b=r.pick,_=r.splat;return t=function(){function t(t,e){this.lastValidTouch={},this.pinchDown=[],this.runChartClick=!1,this.eventsToUnbind=[],this.chart=t,this.hasDragged=!1,this.options=e,this.init(t,e)}return t.prototype.applyInactiveState=function(t){var e,i=[];(t||[]).forEach((function(t){e=t.series,i.push(e),e.linkedParent&&i.push(e.linkedParent),e.linkedSeries&&(i=i.concat(e.linkedSeries)),e.navigatorSeries&&i.push(e.navigatorSeries)})),this.chart.series.forEach((function(t){-1===i.indexOf(t)?t.setState("inactive",!0):t.options.inactiveOtherPoints&&t.setAllPointsToState("inactive")}))},t.prototype.destroy=function(){var t=this;this.eventsToUnbind.forEach((function(t){return t()})),this.eventsToUnbind=[],e.chartCount||(e.unbindDocumentMouseUp&&(e.unbindDocumentMouseUp=e.unbindDocumentMouseUp()),e.unbindDocumentTouchEnd&&(e.unbindDocumentTouchEnd=e.unbindDocumentTouchEnd())),clearInterval(t.tooltipTimeout),v(t,(function(e,i){t[i]=void 0}))},t.prototype.drag=function(t){var e=this.chart,n=e.options.chart,r=t.chartX,a=t.chartY,o=this.zoomHor,l=this.zoomVert,h=e.plotLeft,u=e.plotTop,c=e.plotWidth,d=e.plotHeight,p=this.selectionMarker,f=this.mouseDownX||0,g=this.mouseDownY||0,v=m(n.panning)?n.panning&&n.panning.enabled:n.panning,y=n.panKey&&t[n.panKey+"Key"];if((!p||!p.touch)&&(r<h?r=h:r>h+c&&(r=h+c),a<u?a=u:a>u+d&&(a=u+d),this.hasDragged=Math.sqrt(Math.pow(f-r,2)+Math.pow(g-a,2)),10<this.hasDragged)){var b=e.isInsidePlot(f-h,g-u,{visiblePlotOnly:!0});e.hasCartesianSeries&&(this.zoomX||this.zoomY)&&b&&!y&&!p&&(this.selectionMarker=p=e.renderer.rect(h,u,o?1:c,l?1:d,0).attr({class:"highcharts-selection-marker",zIndex:7}).add(),e.styledMode||p.attr({fill:n.selectionMarkerFill||s(i.highlightColor80).setOpacity(.25).get()})),p&&o&&(r-=f,p.attr({width:Math.abs(r),x:(0<r?0:r)+f})),p&&l&&(r=a-g,p.attr({height:Math.abs(r),y:(0<r?0:r)+g})),b&&!p&&v&&e.pan(t,n.panning)}},t.prototype.dragStart=function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},t.prototype.drop=function(t){var e=this,i=this.chart,n=this.hasPinched;if(this.selectionMarker){var r,s={originalEvent:t,xAxis:[],yAxis:[]},a=this.selectionMarker,o=a.attr?a.attr("x"):a.x,l=a.attr?a.attr("y"):a.y,h=a.attr?a.attr("width"):a.width,p=a.attr?a.attr("height"):a.height;(this.hasDragged||n)&&(i.axes.forEach((function(i){if(i.zoomEnabled&&c(i.min)&&(n||e[{xAxis:"zoomX",yAxis:"zoomY"}[i.coll]])&&g(o)&&g(l)){var a=i.horiz,u="touchend"===t.type?i.minPixelPadding:0,d=i.toValue((a?o:l)+u);a=i.toValue((a?o+h:l+p)-u),s[i.coll].push({axis:i,min:Math.min(d,a),max:Math.max(d,a)}),r=!0}})),r&&f(i,"selection",s,(function(t){i.zoom(d(t,n?{animation:!1}:null))}))),g(i.index)&&(this.selectionMarker=this.selectionMarker.destroy()),n&&this.scaleGroups()}i&&g(i.index)&&(u(i.container,{cursor:i._cursor}),i.cancelClick=10<this.hasDragged,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},t.prototype.findNearestKDPoint=function(t,e,i){var n,r=this.chart,s=r.hoverPoint;return r=r.tooltip,s&&r&&r.isStickyOnContact()?s:(t.forEach((function(t){var r=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y");if(t=t.searchPoint(i,r),(r=m(t,!0)&&t.series)&&!(r=!m(n,!0))){r=n.distX-t.distX;var s=n.dist-t.dist,a=(t.series.group&&t.series.group.zIndex)-(n.series.group&&n.series.group.zIndex);r=0<(0!==r&&e?r:0!==s?s:0!==a?a:n.series.index>t.series.index?-1:1)}r&&(n=t)})),n)},t.prototype.getChartCoordinatesFromPoint=function(t,e){var i=t.series,n=i.xAxis;i=i.yAxis;var r=t.shapeArgs;if(n&&i){var s=b(t.clientX,t.plotX),a=t.plotY||0;return t.isNode&&r&&g(r.x)&&g(r.y)&&(s=r.x,a=r.y),e?{chartX:i.len+i.pos-a,chartY:n.len+n.pos-s}:{chartX:s+n.pos,chartY:a+i.pos}}if(r&&r.x&&r.y)return{chartX:r.x,chartY:r.y}},t.prototype.getChartPosition=function(){if(this.chartPosition)return this.chartPosition;var t=this.chart.container,e=y(t);this.chartPosition={left:e.left,top:e.top,scaleX:1,scaleY:1};var i=t.offsetWidth;return t=t.offsetHeight,2<i&&2<t&&(this.chartPosition.scaleX=e.width/i,this.chartPosition.scaleY=e.height/t),this.chartPosition},t.prototype.getCoordinates=function(t){var e={xAxis:[],yAxis:[]};return this.chart.axes.forEach((function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})})),e},t.prototype.getHoverData=function(t,e,i,n,r,s){var a,o=[];n=!(!n||!t);var l=e&&!e.stickyTracking,h={chartX:s?s.chartX:void 0,chartY:s?s.chartY:void 0,shared:r};return f(this,"beforeGetHoverData",h),l=l?[e]:i.filter((function(t){return h.filter?h.filter(t):t.visible&&!(!r&&t.directTouch)&&b(t.options.enableMouseTracking,!0)&&t.stickyTracking})),e=(a=n||!s?t:this.findNearestKDPoint(l,r,s))&&a.series,a&&(r&&!e.noSharedTooltip?(l=i.filter((function(t){return h.filter?h.filter(t):t.visible&&!(!r&&t.directTouch)&&b(t.options.enableMouseTracking,!0)&&!t.noSharedTooltip}))).forEach((function(t){var e=p(t.points,(function(t){return t.x===a.x&&!t.isNull}));m(e)&&(t.chart.isBoosting&&(e=t.getPoint(e)),o.push(e))})):o.push(a)),f(this,"afterGetHoverData",h={hoverPoint:a}),{hoverPoint:h.hoverPoint,hoverSeries:e,hoverPoints:o}},t.prototype.getPointFromEvent=function(t){t=t.target;for(var e;t&&!e;)e=t.point,t=t.parentNode;return e},t.prototype.onTrackerMouseOut=function(t){t=t.relatedTarget||t.toElement;var e=this.chart.hoverSeries;this.isDirectTouch=!1,!e||!t||e.stickyTracking||this.inClass(t,"highcharts-tooltip")||this.inClass(t,"highcharts-series-"+e.index)&&this.inClass(t,"highcharts-tracker")||e.onMouseOut()},t.prototype.inClass=function(t,e){for(var i;t;){if(i=h(t,"class")){if(-1!==i.indexOf(e))return!0;if(-1!==i.indexOf("highcharts-container"))return!1}t=t.parentNode}},t.prototype.init=function(t,e){this.options=e,this.chart=t,this.runChartClick=!(!e.chart.events||!e.chart.events.click),this.pinchDown=[],this.lastValidTouch={},n&&(t.tooltip=new n(t,e.tooltip),this.followTouchMove=b(e.tooltip.followTouchMove,!0)),this.setDOMEvents()},t.prototype.normalize=function(t,e){var i=t.touches,n=i?i.length?i.item(0):b(i.changedTouches,t.changedTouches)[0]:t;return e||(e=this.getChartPosition()),i=n.pageX-e.left,n=n.pageY-e.top,i/=e.scaleX,n/=e.scaleY,d(t,{chartX:Math.round(i),chartY:Math.round(n)})},t.prototype.onContainerClick=function(t){var e=this.chart,i=e.hoverPoint;t=this.normalize(t);var n=e.plotLeft,r=e.plotTop;e.cancelClick||(i&&this.inClass(t.target,"highcharts-tracker")?(f(i.series,"click",d(t,{point:i})),e.hoverPoint&&i.firePointEvent("click",t)):(d(t,this.getCoordinates(t)),e.isInsidePlot(t.chartX-n,t.chartY-r,{visiblePlotOnly:!0})&&f(e,"click",t)))},t.prototype.onContainerMouseDown=function(t){var i=1==(1&(t.buttons||t.button));t=this.normalize(t),e.isFirefox&&0!==t.button&&this.onContainerMouseMove(t),(void 0===t.button||i)&&(this.zoomOption(t),i&&t.preventDefault&&t.preventDefault(),this.dragStart(t))},t.prototype.onContainerMouseLeave=function(t){var i=a[b(e.hoverChartIndex,-1)],n=this.chart.tooltip;t=this.normalize(t),i&&(t.relatedTarget||t.toElement)&&(i.pointer.reset(),i.pointer.chartPosition=void 0),n&&!n.isHidden&&this.reset()},t.prototype.onContainerMouseEnter=function(t){delete this.chartPosition},t.prototype.onContainerMouseMove=function(t){var e=this.chart;t=this.normalize(t),this.setHoverChartIndex(),t.preventDefault||(t.returnValue=!1),("mousedown"===e.mouseIsDown||this.touchSelect(t))&&this.drag(t),e.openMenu||!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop,{visiblePlotOnly:!0})||this.runPointActions(t)},t.prototype.onDocumentTouchEnd=function(t){a[e.hoverChartIndex]&&a[e.hoverChartIndex].pointer.drop(t)},t.prototype.onContainerTouchMove=function(t){this.touchSelect(t)?this.onContainerMouseMove(t):this.touch(t)},t.prototype.onContainerTouchStart=function(t){this.touchSelect(t)?this.onContainerMouseDown(t):(this.zoomOption(t),this.touch(t,!0))},t.prototype.onDocumentMouseMove=function(t){var e=this.chart,i=this.chartPosition;t=this.normalize(t,i);var n=e.tooltip;!i||n&&n.isStickyOnContact()||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop,{visiblePlotOnly:!0})||this.inClass(t.target,"highcharts-tracker")||this.reset()},t.prototype.onDocumentMouseUp=function(t){var i=a[b(e.hoverChartIndex,-1)];i&&i.pointer.drop(t)},t.prototype.pinch=function(t){var e=this,i=e.chart,n=e.pinchDown,r=t.touches||[],s=r.length,a=e.lastValidTouch,l=e.hasZoom,h=e.selectionMarker,u={},c=1===s&&(e.inClass(t.target,"highcharts-tracker")&&i.runTrackerClick||e.runChartClick),p={};1<s&&(e.initiated=!0),l&&e.initiated&&!c&&!1!==t.cancelable&&t.preventDefault(),[].map.call(r,(function(t){return e.normalize(t)})),"touchstart"===t.type?([].forEach.call(r,(function(t,e){n[e]={chartX:t.chartX,chartY:t.chartY}})),a.x=[n[0].chartX,n[1]&&n[1].chartX],a.y=[n[0].chartY,n[1]&&n[1].chartY],i.axes.forEach((function(t){if(t.zoomEnabled){var e=i.bounds[t.horiz?"h":"v"],n=t.minPixelPadding,r=t.toPixels(Math.min(b(t.options.min,t.dataMin),t.dataMin)),s=t.toPixels(Math.max(b(t.options.max,t.dataMax),t.dataMax)),a=Math.max(r,s);e.min=Math.min(t.pos,Math.min(r,s)-n),e.max=Math.max(t.pos+t.len,a+n)}})),e.res=!0):e.followTouchMove&&1===s?this.runPointActions(e.normalize(t)):n.length&&(h||(e.selectionMarker=h=d({destroy:o,touch:!0},i.plotBox)),e.pinchTranslate(n,r,u,h,p,a),e.hasPinched=l,e.scaleGroups(u,p),e.res&&(e.res=!1,this.reset(!1,0)))},t.prototype.pinchTranslate=function(t,e,i,n,r,s){this.zoomHor&&this.pinchTranslateDirection(!0,t,e,i,n,r,s),this.zoomVert&&this.pinchTranslateDirection(!1,t,e,i,n,r,s)},t.prototype.pinchTranslateDirection=function(t,e,i,n,r,s,a,o){var l,h,u=this.chart,c=t?"x":"y",d=t?"X":"Y",p="chart"+d,f=t?"width":"height",g=u["plot"+(t?"Left":"Top")],m=o||1,v=u.inverted,y=u.bounds[t?"h":"v"],b=1===e.length,_=e[0][p],T=i[0][p],x=!b&&e[1][p],S=!b&&i[1][p];if((i=function(){"number"==typeof S&&20<Math.abs(_-x)&&(m=o||Math.abs(T-S)/Math.abs(_-x)),h=(g-T)/m+_,l=u["plot"+(t?"Width":"Height")]/m})(),(e=h)<y.min){e=y.min;var w=!0}else e+l>y.max&&(e=y.max-l,w=!0);w?(T-=.8*(T-a[c][0]),"number"==typeof S&&(S-=.8*(S-a[c][1])),i()):a[c]=[T,S],v||(s[c]=h-g,s[f]=l),s=v?1/m:m,r[f]=l,r[c]=e,n[v?t?"scaleY":"scaleX":"scale"+d]=m,n["translate"+d]=s*g+(T-s*_)},t.prototype.reset=function(t,e){var i=this.chart,n=i.hoverSeries,r=i.hoverPoint,s=i.hoverPoints,a=i.tooltip,o=a&&a.shared?s:r;t&&o&&_(o).forEach((function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)})),t?a&&o&&_(o).length&&(a.refresh(o),a.shared&&s?s.forEach((function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))})):r&&(r.setState(r.state,!0),i.axes.forEach((function(t){t.crosshair&&r.series[t.coll]===t&&t.drawCrosshair(null,r)})))):(r&&r.onMouseOut(),s&&s.forEach((function(t){t.setState()})),n&&n.onMouseOut(),a&&a.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i.axes.forEach((function(t){t.hideCrosshair()})),this.hoverX=i.hoverPoints=i.hoverPoint=null)},t.prototype.runPointActions=function(t,i){var n=this.chart,r=n.tooltip&&n.tooltip.options.enabled?n.tooltip:void 0,s=!!r&&r.shared,o=i||n.hoverPoint,h=o&&o.series||n.hoverSeries;o=(h=this.getHoverData(o,h,n.series,(!t||"touchmove"!==t.type)&&(!!i||h&&h.directTouch&&this.isDirectTouch),s,t)).hoverPoint;var u=h.hoverPoints;if(i=(h=h.hoverSeries)&&h.tooltipOptions.followPointer&&!h.tooltipOptions.split,s=s&&h&&!h.noSharedTooltip,o&&(o!==n.hoverPoint||r&&r.isHidden)){if((n.hoverPoints||[]).forEach((function(t){-1===u.indexOf(t)&&t.setState()})),n.hoverSeries!==h&&h.onMouseOver(),this.applyInactiveState(u),(u||[]).forEach((function(t){t.setState("hover")})),n.hoverPoint&&n.hoverPoint.firePointEvent("mouseOut"),!o.series)return;n.hoverPoints=u,n.hoverPoint=o,o.firePointEvent("mouseOver"),r&&r.refresh(s?u:o,t)}else i&&r&&!r.isHidden&&(o=r.getAnchor([{}],t),n.isInsidePlot(o[0],o[1],{visiblePlotOnly:!0})&&r.updatePosition({plotX:o[0],plotY:o[1]}));this.unDocMouseMove||(this.unDocMouseMove=l(n.container.ownerDocument,"mousemove",(function(t){var i=a[e.hoverChartIndex];i&&i.pointer.onDocumentMouseMove(t)})),this.eventsToUnbind.push(this.unDocMouseMove)),n.axes.forEach((function(e){var i,r=b((e.crosshair||{}).snap,!0);r&&((i=n.hoverPoint)&&i.series[e.coll]===e||(i=p(u,(function(t){return t.series[e.coll]===e})))),i||!r?e.drawCrosshair(t,i):e.hideCrosshair()}))},t.prototype.scaleGroups=function(t,e){var i,n=this.chart;n.series.forEach((function(r){i=t||r.getPlotBox(),r.xAxis&&r.xAxis.zoomEnabled&&r.group&&(r.group.attr(i),r.markerGroup&&(r.markerGroup.attr(i),r.markerGroup.clip(e?n.clipRect:null)),r.dataLabelsGroup&&r.dataLabelsGroup.attr(i))})),n.clipRect.attr(e||n.clipBox)},t.prototype.setDOMEvents=function(){var t=this,i=this.chart.container,n=i.ownerDocument;i.onmousedown=this.onContainerMouseDown.bind(this),i.onmousemove=this.onContainerMouseMove.bind(this),i.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(l(i,"mouseenter",this.onContainerMouseEnter.bind(this))),this.eventsToUnbind.push(l(i,"mouseleave",this.onContainerMouseLeave.bind(this))),e.unbindDocumentMouseUp||(e.unbindDocumentMouseUp=l(n,"mouseup",this.onDocumentMouseUp.bind(this)));for(var r=this.chart.renderTo.parentElement;r&&"BODY"!==r.tagName;)this.eventsToUnbind.push(l(r,"scroll",(function(){delete t.chartPosition}))),r=r.parentElement;e.hasTouch&&(this.eventsToUnbind.push(l(i,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1})),this.eventsToUnbind.push(l(i,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),e.unbindDocumentTouchEnd||(e.unbindDocumentTouchEnd=l(n,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})))},t.prototype.setHoverChartIndex=function(){var t=this.chart,i=e.charts[b(e.hoverChartIndex,-1)];i&&i!==t&&i.pointer.onContainerMouseLeave({relatedTarget:!0}),i&&i.mouseIsDown||(e.hoverChartIndex=t.index)},t.prototype.touch=function(t,e){var i=this.chart;if(this.setHoverChartIndex(),1===t.touches.length)if(t=this.normalize(t),i.isInsidePlot(t.chartX-i.plotLeft,t.chartY-i.plotTop,{visiblePlotOnly:!0})&&!i.openMenu){if(e&&this.runPointActions(t),"touchmove"===t.type)var n=!!(e=this.pinchDown)[0]&&4<=Math.sqrt(Math.pow(e[0].chartX-t.chartX,2)+Math.pow(e[0].chartY-t.chartY,2));b(n,!0)&&this.pinch(t)}else e&&this.reset();else 2===t.touches.length&&this.pinch(t)},t.prototype.touchSelect=function(t){return!(!this.chart.options.chart.zoomBySingleTouch||!t.touches||1!==t.touches.length)},t.prototype.zoomOption=function(t){var e=this.chart,i=e.options.chart,n=i.zoomType||"";e=e.inverted,/touch/.test(t.type)&&(n=b(i.pinchType,n)),this.zoomX=t=/x/.test(n),this.zoomY=n=/y/.test(n),this.zoomHor=t&&!e||n&&e,this.zoomVert=n&&!e||t&&e,this.hasZoom=t||n},t}(),e.Pointer=t})),e(i,"Core/MSPointer.js",[i["Core/Globals.js"],i["Core/Pointer.js"],i["Core/Utilities.js"]],(function(t,e,i){function n(){var t=[];return t.item=function(t){return this[t]},c(p,(function(e){t.push({pageX:e.pageX,pageY:e.pageY,target:e.target})})),t}function r(e,i,r,s){"touch"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_TOUCH||!a[t.hoverChartIndex]||(s(e),(s=a[t.hoverChartIndex].pointer)[i]({type:r,target:e.currentTarget,preventDefault:l,touches:n()}))}var s=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=t.charts,o=t.doc,l=t.noop,h=i.addEvent,u=i.css,c=i.objectEach,d=i.removeEvent,p={},f=!!t.win.PointerEvent;return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.batchMSEvents=function(t){t(this.chart.container,f?"pointerdown":"MSPointerDown",this.onContainerPointerDown),t(this.chart.container,f?"pointermove":"MSPointerMove",this.onContainerPointerMove),t(o,f?"pointerup":"MSPointerUp",this.onDocumentPointerUp)},e.prototype.destroy=function(){this.batchMSEvents(d),t.prototype.destroy.call(this)},e.prototype.init=function(e,i){t.prototype.init.call(this,e,i),this.hasZoom&&u(e.container,{"-ms-touch-action":"none","touch-action":"none"})},e.prototype.onContainerPointerDown=function(t){r(t,"onContainerTouchStart","touchstart",(function(t){p[t.pointerId]={pageX:t.pageX,pageY:t.pageY,target:t.currentTarget}}))},e.prototype.onContainerPointerMove=function(t){r(t,"onContainerTouchMove","touchmove",(function(t){p[t.pointerId]={pageX:t.pageX,pageY:t.pageY},p[t.pointerId].target||(p[t.pointerId].target=t.currentTarget)}))},e.prototype.onDocumentPointerUp=function(t){r(t,"onDocumentTouchEnd","touchend",(function(t){delete p[t.pointerId]}))},e.prototype.setDOMEvents=function(){t.prototype.setDOMEvents.call(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(h)},e}(e)})),e(i,"Core/Series/Point.js",[i["Core/Renderer/HTML/AST.js"],i["Core/Animation/AnimationUtilities.js"],i["Core/FormatUtilities.js"],i["Core/Globals.js"],i["Core/Options.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r,s){var a=e.animObject,o=i.format,l=r.defaultOptions,h=s.addEvent,u=s.defined,c=s.erase,d=s.extend,p=s.fireEvent,f=s.getNestedProperty,g=s.isArray,m=s.isFunction,v=s.isNumber,y=s.isObject,b=s.merge,_=s.objectEach,T=s.pick,x=s.syncTimeout,S=s.removeEvent,w=s.uniqueKey;return e=function(){function e(){this.colorIndex=this.category=void 0,this.formatPrefix="point",this.id=void 0,this.isNull=!1,this.percentage=this.options=this.name=void 0,this.selected=!1,this.total=this.series=void 0,this.visible=!0,this.x=void 0}return e.prototype.animateBeforeDestroy=function(){var t,e=this,i={x:e.startXPos,opacity:0},n=e.getGraphicalProps();n.singular.forEach((function(n){t="dataLabel"===n,e[n]=e[n].animate(t?{x:e[n].startXPos,y:e[n].startYPos,opacity:0}:i)})),n.plural.forEach((function(t){e[t].forEach((function(t){t.element&&t.animate(d({x:e.startXPos},t.startYPos?{x:t.startXPos,y:t.startYPos}:{}))}))}))},e.prototype.applyOptions=function(t,i){var n=this.series,r=n.options.pointValKey||n.pointValKey;return t=e.prototype.optionsToObject.call(this,t),d(this,t),this.options=this.options?d(this.options,t):t,t.group&&delete this.group,t.dataLabels&&delete this.dataLabels,r&&(this.y=e.prototype.getNestedProperty.call(this,r)),this.formatPrefix=(this.isNull=T(this.isValid&&!this.isValid(),null===this.x||!v(this.y)))?"null":"point",this.selected&&(this.state="select"),"name"in this&&void 0===i&&n.xAxis&&n.xAxis.hasNames&&(this.x=n.xAxis.nameToX(this)),void 0===this.x&&n&&(this.x=void 0===i?n.autoIncrement(this):i),this},e.prototype.destroy=function(){function t(){for(r in(e.graphic||e.dataLabel||e.dataLabels)&&(S(e),e.destroyElements()),e)e[r]=null}var e=this,i=e.series,n=i.chart;i=i.options.dataSorting;var r,s=n.hoverPoints,o=a(e.series.chart.renderer.globalAnimation);e.legendItem&&n.legend.destroyItem(e),s&&(e.setState(),c(s,e),s.length||(n.hoverPoints=null)),e===n.hoverPoint&&e.onMouseOut(),i&&i.enabled?(this.animateBeforeDestroy(),x(t,o.duration)):t(),n.pointCount--},e.prototype.destroyElements=function(t){var e=this;(t=e.getGraphicalProps(t)).singular.forEach((function(t){e[t]=e[t].destroy()})),t.plural.forEach((function(t){e[t].forEach((function(t){t.element&&t.destroy()})),delete e[t]}))},e.prototype.firePointEvent=function(t,e,i){var n=this,r=this.series.options;(r.point.events[t]||n.options&&n.options.events&&n.options.events[t])&&n.importEvents(),"click"===t&&r.allowPointSelect&&(i=function(t){n.select&&n.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),p(n,t,e,i)},e.prototype.getClassName=function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},e.prototype.getGraphicalProps=function(t){var e,i=this,n=[],r={singular:[],plural:[]};for((t=t||{graphic:1,dataLabel:1}).graphic&&n.push("graphic","upperGraphic","shadowGroup"),t.dataLabel&&n.push("dataLabel","dataLabelUpper","connector"),e=n.length;e--;){var s=n[e];i[s]&&r.singular.push(s)}return["dataLabel","connector"].forEach((function(e){var n=e+"s";t[e]&&i[n]&&r.plural.push(n)})),r},e.prototype.getLabelConfig=function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},e.prototype.getNestedProperty=function(t){if(t)return 0===t.indexOf("custom.")?f(t,this.options):this[t]},e.prototype.getZone=function(){var t=this.series,e=t.zones;t=t.zoneAxis||"y";var i,n=0;for(i=e[n];this[t]>=i.value;)i=e[++n];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=i&&i.color&&!this.options.color?i.color:this.nonZonedColor,i},e.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType},e.prototype.init=function(t,e,i){return this.series=t,this.applyOptions(e,i),this.id=u(this.id)?this.id:w(),this.resolveColor(),t.chart.pointCount++,p(this,"afterInit"),this},e.prototype.optionsToObject=function(t){var i={},n=this.series,r=n.options.keys,s=r||n.pointArrayMap||["y"],a=s.length,o=0,l=0;if(v(t)||null===t)i[s[0]]=t;else if(g(t))for(!r&&t.length>a&&("string"===(n=typeof t[0])?i.name=t[0]:"number"===n&&(i.x=t[0]),o++);l<a;)r&&void 0===t[o]||(0<s[l].indexOf(".")?e.prototype.setNestedProperty(i,t[o],s[l]):i[s[l]]=t[o]),o++,l++;else"object"==typeof t&&(i=t,t.dataLabels&&(n._hasPointLabels=!0),t.marker&&(n._hasPointMarkers=!0));return i},e.prototype.resolveColor=function(){var t=this.series,e=t.chart.options.chart.colorCount,i=t.chart.styledMode;if(delete this.nonZonedColor,t.options.colorByPoint){if(!i){var n=(e=t.options.colors||t.chart.options.colors)[t.colorCounter];e=e.length}i=t.colorCounter,t.colorCounter++,t.colorCounter===e&&(t.colorCounter=0)}else i||(n=t.color),i=t.colorIndex;this.colorIndex=T(this.options.colorIndex,i),this.color=T(this.options.color,n)},e.prototype.setNestedProperty=function(t,e,i){return i.split(".").reduce((function(t,i,n,r){return t[i]=r.length-1===n?e:y(t[i],!0)?t[i]:{},t[i]}),t),t},e.prototype.tooltipFormatter=function(t){var e=this.series,i=e.tooltipOptions,n=T(i.valueDecimals,""),r=i.valuePrefix||"",s=i.valueSuffix||"";return e.chart.styledMode&&(t=e.chart.tooltip.styledModeFormat(t)),(e.pointArrayMap||["y"]).forEach((function(e){e="{point."+e,(r||s)&&(t=t.replace(RegExp(e+"}","g"),r+e+"}"+s)),t=t.replace(RegExp(e+"}","g"),e+":,."+n+"f}")})),o(t,{point:this,series:this.series},e.chart)},e.prototype.update=function(t,e,i,n){function r(){a.applyOptions(t);var n=l&&a.hasDummyGraphic;n=null===a.y?!n:n,l&&n&&(a.graphic=l.destroy(),delete a.hasDummyGraphic),y(t,!0)&&(l&&l.element&&t&&t.marker&&void 0!==t.marker.symbol&&(a.graphic=l.destroy()),t&&t.dataLabels&&a.dataLabel&&(a.dataLabel=a.dataLabel.destroy()),a.connector&&(a.connector=a.connector.destroy())),s=a.index,o.updateParallelArrays(a,s),u.data[s]=y(u.data[s],!0)||y(t,!0)?a.options:T(t,u.data[s]),o.isDirty=o.isDirtyData=!0,!o.fixedBox&&o.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===u.legendType&&(h.isDirtyLegend=!0),e&&h.redraw(i)}var s,a=this,o=a.series,l=a.graphic,h=o.chart,u=o.options;e=T(e,!0),!1===n?r():a.firePointEvent("update",{options:t},r)},e.prototype.remove=function(t,e){this.series.removePoint(this.series.data.indexOf(this),t,e)},e.prototype.select=function(t,e){var i=this,n=i.series,r=n.chart;this.selectedStaging=t=T(t,!i.selected),i.firePointEvent(t?"select":"unselect",{accumulate:e},(function(){i.selected=i.options.selected=t,n.options.data[n.data.indexOf(i)]=i.options,i.setState(t&&"select"),e||r.getSelectedPoints().forEach((function(t){var e=t.series;t.selected&&t!==i&&(t.selected=t.options.selected=!1,e.options.data[e.data.indexOf(t)]=t.options,t.setState(r.hoverPoints&&e.options.inactiveOtherPoints?"inactive":""),t.firePointEvent("unselect"))}))})),delete this.selectedStaging},e.prototype.onMouseOver=function(t){var e=this.series.chart,i=e.pointer;t=t?i.normalize(t):i.getChartCoordinatesFromPoint(this,e.inverted),i.runPointActions(t,this)},e.prototype.onMouseOut=function(){var t=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(t.hoverPoints||[]).forEach((function(t){t.setState()})),t.hoverPoints=t.hoverPoint=null},e.prototype.importEvents=function(){if(!this.hasImportedEvents){var t=this,e=b(t.series.options.point,t.options).events;t.events=e,_(e,(function(e,i){m(e)&&h(t,i,e)})),this.hasImportedEvents=!0}},e.prototype.setState=function(e,i){var n,r=this.series,s=this.state,a=r.options.states[e||"normal"]||{},o=l.plotOptions[r.type].marker&&r.options.marker,h=o&&!1===o.enabled,u=o&&o.states&&o.states[e||"normal"]||{},c=!1===u.enabled,f=r.stateMarkerGraphic,g=this.marker||{},m=r.chart,y=r.halo,b=o&&r.markerAttribs;if(!((e=e||"")===this.state&&!i||this.selected&&"select"!==e||!1===a.enabled||e&&(c||h&&!1===u.enabled)||e&&g.states&&g.states[e]&&!1===g.states[e].enabled)){if(this.state=e,b&&(n=r.markerAttribs(this,e)),this.graphic&&!this.hasDummyGraphic){if(s&&this.graphic.removeClass("highcharts-point-"+s),e&&this.graphic.addClass("highcharts-point-"+e),!m.styledMode){var _=r.pointAttribs(this,e),x=T(m.options.chart.animation,a.animation);r.options.inactiveOtherPoints&&v(_.opacity)&&((this.dataLabels||[]).forEach((function(t){t&&t.animate({opacity:_.opacity},x)})),this.connector&&this.connector.animate({opacity:_.opacity},x)),this.graphic.animate(_,x)}n&&this.graphic.animate(n,T(m.options.chart.animation,u.animation,o.animation)),f&&f.hide()}else e&&u&&(s=g.symbol||r.symbol,f&&f.currentSymbol!==s&&(f=f.destroy()),n&&(f?f[i?"animate":"attr"]({x:n.x,y:n.y}):s&&(r.stateMarkerGraphic=f=m.renderer.symbol(s,n.x,n.y,n.width,n.height).add(r.markerGroup),f.currentSymbol=s)),!m.styledMode&&f&&f.attr(r.pointAttribs(this,e))),f&&(f[e&&this.isInside?"show":"hide"](),f.element.point=this);a=a.halo,n=(f=this.graphic||f)&&f.visibility||"inherit",a&&a.size&&f&&"hidden"!==n&&!this.isCluster?(y||(r.halo=y=m.renderer.path().add(f.parentGroup)),y.show()[i?"animate":"attr"]({d:this.haloPath(a.size)}),y.attr({class:"highcharts-halo highcharts-color-"+T(this.colorIndex,r.colorIndex)+(this.className?" "+this.className:""),visibility:n,zIndex:-1}),y.point=this,m.styledMode||y.attr(d({fill:this.color||r.color,"fill-opacity":a.opacity},t.filterUserAttributes(a.attributes||{})))):y&&y.point&&y.point.haloPath&&y.animate({d:y.point.haloPath(0)},null,y.hide),p(this,"afterSetState",{state:e})}},e.prototype.haloPath=function(t){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-t,this.plotY-t,2*t,2*t)},e}(),n.Point=e})),e(i,"Core/Legend.js",[i["Core/Animation/AnimationUtilities.js"],i["Core/FormatUtilities.js"],i["Core/Globals.js"],i["Core/Series/Point.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r){var s=t.animObject,a=t.setAnimation,o=e.format;t=i.isFirefox;var l=i.marginNames;e=i.win;var h=r.addEvent,u=r.createElement,c=r.css,d=r.defined,p=r.discardElement,f=r.find,g=r.fireEvent,m=r.isNumber,v=r.merge,y=r.pick,b=r.relativeLength,_=r.stableSort,T=r.syncTimeout;r=r.wrap;var x=function(){function t(t,e){this.allItems=[],this.contentGroup=this.box=void 0,this.display=!1,this.group=void 0,this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop=this.itemMarginBottom=this.itemHeight=this.initialItemY=0,this.options={},this.padding=0,this.pages=[],this.proximate=!1,this.scrollGroup=void 0,this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0,this.chart=t,this.init(t,e)}return t.prototype.init=function(t,e){this.chart=t,this.setOptions(e),e.enabled&&(this.render(),h(this.chart,"endResize",(function(){this.legend.positionCheckboxes()})),this.proximate?this.unchartrender=h(this.chart,"render",(function(){this.legend.proximatePositions(),this.legend.positionItems()})):this.unchartrender&&this.unchartrender())},t.prototype.setOptions=function(t){var e=y(t.padding,8);this.options=t,this.chart.styledMode||(this.itemStyle=t.itemStyle,this.itemHiddenStyle=v(this.itemStyle,t.itemHiddenStyle)),this.itemMarginTop=t.itemMarginTop||0,this.itemMarginBottom=t.itemMarginBottom||0,this.padding=e,this.initialItemY=e-5,this.symbolWidth=y(t.symbolWidth,16),this.pages=[],this.proximate="proximate"===t.layout&&!this.chart.inverted,this.baseline=void 0},t.prototype.update=function(t,e){var i=this.chart;this.setOptions(v(!0,this.options,t)),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,y(e,!0)&&i.redraw(),g(this,"afterUpdate")},t.prototype.colorizeItem=function(t,e){if(t.legendGroup[e?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){var i=this.options,n=t.legendItem,r=t.legendLine,s=t.legendSymbol,a=this.itemHiddenStyle.color;i=e?i.itemStyle.color:a;var o=e&&t.color||a,l=t.options&&t.options.marker,h={fill:o};n&&n.css({fill:i,color:i}),r&&r.attr({stroke:o}),s&&(l&&s.isMarker&&(h=t.pointAttribs(),e||(h.stroke=h.fill=a)),s.attr(h))}g(this,"afterColorizeItem",{item:t,visible:e})},t.prototype.positionItems=function(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()},t.prototype.positionItem=function(t){var e=this,i=this.options,n=i.symbolPadding,r=!i.rtl,s=t._legendItemPos;i=s[0],s=s[1];var a=t.checkbox,o=t.legendGroup;o&&o.element&&(n={translateX:r?i:this.legendWidth-i-2*n-4,translateY:s},r=function(){g(e,"afterPositionItem",{item:t})},d(o.translateY)?o.animate(n,void 0,r):(o.attr(n),r())),a&&(a.x=i,a.y=s)},t.prototype.destroyItem=function(t){var e=t.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach((function(e){t[e]&&(t[e]=t[e].destroy())})),e&&p(t.checkbox)},t.prototype.destroy=function(){function t(t){this[t]&&(this[t]=this[t].destroy())}this.getAllItems().forEach((function(e){["legendItem","legendGroup"].forEach(t,e)})),"clipRect up down pager nav box title group".split(" ").forEach(t,this),this.display=null},t.prototype.positionCheckboxes=function(){var t=this.group&&this.group.alignAttr,e=this.clipHeight||this.legendHeight,i=this.titleHeight;if(t){var n=t.translateY;this.allItems.forEach((function(r){var s=r.checkbox;if(s){var a=n+i+s.y+(this.scrollOffset||0)+3;c(s,{left:t.translateX+r.checkboxOffset+s.x-20+"px",top:a+"px",display:this.proximate||a>n-6&&a<n+e-6?"":"none"})}}),this)}},t.prototype.renderTitle=function(){var t=this.options,e=this.padding,i=t.title,n=0;i.text&&(this.title||(this.title=this.chart.renderer.label(i.text,e-3,e-4,null,null,null,t.useHTML,null,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(i.style),this.title.add(this.group)),i.width||this.title.css({width:this.maxLegendWidth+"px"}),n=(t=this.title.getBBox()).height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:n})),this.titleHeight=n},t.prototype.setText=function(t){var e=this.options;t.legendItem.attr({text:e.labelFormat?o(e.labelFormat,t,this.chart):e.labelFormatter.call(t)})},t.prototype.renderItem=function(t){var e=this.chart,i=e.renderer,n=this.options,r=this.symbolWidth,s=n.symbolPadding||0,a=this.itemStyle,o=this.itemHiddenStyle,l="horizontal"===n.layout?y(n.itemDistance,20):0,h=!n.rtl,u=t.legendItem,c=!t.series,d=!c&&t.series.drawLegendSymbol?t.series:t,p=d.options,f=this.createCheckboxForItem&&p&&p.showCheckbox;p=r+s+l+(f?20:0);var g=n.useHTML,m=t.options.className;u||(t.legendGroup=i.g("legend-item").addClass("highcharts-"+d.type+"-series highcharts-color-"+t.colorIndex+(m?" "+m:"")+(c?" highcharts-series-"+t.index:"")).attr({zIndex:1}).add(this.scrollGroup),t.legendItem=u=i.text("",h?r+s:-s,this.baseline||0,g),e.styledMode||u.css(v(t.visible?a:o)),u.attr({align:h?"left":"right",zIndex:2}).add(t.legendGroup),this.baseline||(this.fontMetrics=i.fontMetrics(e.styledMode?12:a.fontSize,u),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,u.attr("y",this.baseline),this.symbolHeight=n.symbolHeight||this.fontMetrics.f,n.squareSymbol&&(this.symbolWidth=y(n.symbolWidth,Math.max(this.symbolHeight,16)),p=this.symbolWidth+s+l+(f?20:0),h&&u.attr("x",this.symbolWidth+s))),d.drawLegendSymbol(this,t),this.setItemEvents&&this.setItemEvents(t,u,g)),f&&!t.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem(t),this.colorizeItem(t,t.visible),!e.styledMode&&a.width||u.css({width:(n.itemWidth||this.widthOption||e.spacingBox.width)-p+"px"}),this.setText(t),e=u.getBBox(),t.itemWidth=t.checkboxOffset=n.itemWidth||t.legendItemWidth||e.width+p,this.maxItemWidth=Math.max(this.maxItemWidth,t.itemWidth),this.totalItemWidth+=t.itemWidth,this.itemHeight=t.itemHeight=Math.round(t.legendItemHeight||e.height||this.symbolHeight)},t.prototype.layoutItem=function(t){var e=this.options,i=this.padding,n="horizontal"===e.layout,r=t.itemHeight,s=this.itemMarginBottom,a=this.itemMarginTop,o=n?y(e.itemDistance,20):0,l=this.maxLegendWidth;e=e.alignColumns&&this.totalItemWidth>l?this.maxItemWidth:t.itemWidth,n&&this.itemX-i+e>l&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=a+this.lastLineHeight+s),this.lastLineHeight=0),this.lastItemY=a+this.itemY+s,this.lastLineHeight=Math.max(r,this.lastLineHeight),t._legendItemPos=[this.itemX,this.itemY],n?this.itemX+=e:(this.itemY+=a+r+s,this.lastLineHeight=r),this.offsetWidth=this.widthOption||Math.max((n?this.itemX-i-(t.checkbox?0:o):e)+i,this.offsetWidth)},t.prototype.getAllItems=function(){var t=[];return this.chart.series.forEach((function(e){var i=e&&e.options;e&&y(i.showInLegend,!d(i.linkedTo)&&void 0,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))})),g(this,"afterGetAllItems",{allItems:t}),t},t.prototype.getAlignment=function(){var t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)},t.prototype.adjustMargins=function(t,e){var i=this.chart,n=this.options,r=this.getAlignment();r&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach((function(s,a){s.test(r)&&!d(t[a])&&(i[l[a]]=Math.max(i[l[a]],i.legend[(a+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][a]*n[a%2?"x":"y"]+y(n.margin,12)+e[a]+(i.titleOffset[a]||0)))}))},t.prototype.proximatePositions=function(){var t=this.chart,e=[],n="left"===this.options.align;this.allItems.forEach((function(i){var r,s=n;if(i.yAxis){i.xAxis.options.reversed&&(s=!s),i.points&&(r=f(s?i.points:i.points.slice(0).reverse(),(function(t){return m(t.plotY)}))),s=this.itemMarginTop+i.legendItem.getBBox().height+this.itemMarginBottom;var a=i.yAxis.top-t.plotTop;i.visible?(r=r?r.plotY:i.yAxis.height,r+=a-.3*s):r=a+i.yAxis.height,e.push({target:r,size:s,item:i})}}),this),i.distribute(e,t.plotHeight),e.forEach((function(e){e.item._legendItemPos[1]=t.plotTop-t.spacing[0]+e.pos}))},t.prototype.render=function(){var t=this.chart,e=t.renderer,i=this.group,n=this.box,r=this.options,s=this.padding;this.itemX=s,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=b(r.width,t.spacingBox.width-s);var a=t.spacingBox.width-2*s-r.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(a/=2),this.maxLegendWidth=this.widthOption||a,i||(this.group=i=e.g("legend").attr({zIndex:7}).add(),this.contentGroup=e.g().attr({zIndex:1}).add(i),this.scrollGroup=e.g().add(this.contentGroup)),this.renderTitle();var o=this.getAllItems();_(o,(function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)})),r.reversed&&o.reverse(),this.allItems=o,this.display=a=!!o.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,o.forEach(this.renderItem,this),o.forEach(this.layoutItem,this),o=(this.widthOption||this.offsetWidth)+s;var l=this.lastItemY+this.lastLineHeight+this.titleHeight;l=this.handleOverflow(l),l+=s,n||(this.box=n=e.rect().addClass("highcharts-legend-box").attr({r:r.borderRadius}).add(i),n.isNew=!0),t.styledMode||n.attr({stroke:r.borderColor,"stroke-width":r.borderWidth||0,fill:r.backgroundColor||"none"}).shadow(r.shadow),0<o&&0<l&&(n[n.isNew?"attr":"animate"](n.crisp.call({},{x:0,y:0,width:o,height:l},n.strokeWidth())),n.isNew=!1),n[a?"show":"hide"](),t.styledMode&&"none"===i.getStyle("display")&&(o=l=0),this.legendWidth=o,this.legendHeight=l,a&&this.align(),this.proximate||this.positionItems(),g(this,"afterRender")},t.prototype.align=function(t){void 0===t&&(t=this.chart.spacingBox);var e=this.chart,i=this.options,n=t.y;/(lth|ct|rth)/.test(this.getAlignment())&&0<e.titleOffset[0]?n+=e.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<e.titleOffset[2]&&(n-=e.titleOffset[2]),n!==t.y&&(t=v(t,{y:n})),this.group.align(v(i,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":i.verticalAlign}),!0,t)},t.prototype.handleOverflow=function(t){var e=this,i=this.chart,n=i.renderer,r=this.options,s=r.y,a=this.padding;s=i.spacingBox.height+("top"===r.verticalAlign?-s:s)-a;var o,l,h=r.maxHeight,u=this.clipRect,c=r.navigation,d=y(c.animation,!0),p=c.arrowSize||12,f=this.nav,g=this.pages,m=this.allItems,v=function(t){"number"==typeof t?u.attr({height:t}):u&&(e.clipRect=u.destroy(),e.contentGroup.clip()),e.contentGroup.div&&(e.contentGroup.div.style.clip=t?"rect("+a+"px,9999px,"+(a+t)+"px,0)":"auto")},b=function(t){return e[t]=n.circle(0,0,1.3*p).translate(p/2,p/2).add(f),i.styledMode||e[t].attr("fill","rgba(0,0,0,0.0001)"),e[t]};return"horizontal"!==r.layout||"middle"===r.verticalAlign||r.floating||(s/=2),h&&(s=Math.min(s,h)),g.length=0,t&&0<s&&t>s&&!1!==c.enabled?(this.clipHeight=o=Math.max(s-20-this.titleHeight-a,0),this.currentPage=y(this.currentPage,1),this.fullHeight=t,m.forEach((function(t,e){var i=t._legendItemPos[1],n=Math.round(t.legendItem.getBBox().height),r=g.length;(!r||i-g[r-1]>o&&(l||i)!==g[r-1])&&(g.push(l||i),r++),t.pageIx=r-1,l&&(m[e-1].pageIx=r-1),e===m.length-1&&i+n-g[r-1]>o&&i!==l&&(g.push(i),t.pageIx=r),i!==l&&(l=i)})),u||(u=e.clipRect=n.clipRect(0,a,9999,0),e.contentGroup.clip(u)),v(o),f||(this.nav=f=n.g().attr({zIndex:1}).add(this.group),this.up=n.symbol("triangle",0,0,p,p).add(f),b("upTracker").on("click",(function(){e.scroll(-1,d)})),this.pager=n.text("",15,10).addClass("highcharts-legend-navigation"),i.styledMode||this.pager.css(c.style),this.pager.add(f),this.down=n.symbol("triangle-down",0,0,p,p).add(f),b("downTracker").on("click",(function(){e.scroll(1,d)}))),e.scroll(0),t=s):f&&(v(),this.nav=f.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},t.prototype.scroll=function(t,e){var i=this,n=this.chart,r=this.pages,o=r.length,l=this.currentPage+t;t=this.clipHeight;var h=this.options.navigation,u=this.pager,c=this.padding;l>o&&(l=o),0<l&&(void 0!==e&&a(e,n),this.nav.attr({translateX:c,translateY:t+this.padding+7+this.titleHeight,visibility:"visible"}),[this.up,this.upTracker].forEach((function(t){t.attr({class:1===l?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})})),u.attr({text:l+"/"+o}),[this.down,this.downTracker].forEach((function(t){t.attr({x:18+this.pager.getBBox().width,class:l===o?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),this),n.styledMode||(this.up.attr({fill:1===l?h.inactiveColor:h.activeColor}),this.upTracker.css({cursor:1===l?"default":"pointer"}),this.down.attr({fill:l===o?h.inactiveColor:h.activeColor}),this.downTracker.css({cursor:l===o?"default":"pointer"})),this.scrollOffset=-r[l-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=l,this.positionCheckboxes(),e=s(y(e,n.renderer.globalAnimation,!0)),T((function(){g(i,"afterScroll",{currentPage:l})}),e.duration))},t.prototype.setItemEvents=function(t,e,i){var r=this,s=r.chart.renderer.boxWrapper,a=t instanceof n,o="highcharts-legend-"+(a?"point":"series")+"-active",l=r.chart.styledMode;(i?[e,t.legendSymbol]:[t.legendGroup]).forEach((function(i){i&&i.on("mouseover",(function(){t.visible&&r.allItems.forEach((function(e){t!==e&&e.setState("inactive",!a)})),t.setState("hover"),t.visible&&s.addClass(o),l||e.css(r.options.itemHoverStyle)})).on("mouseout",(function(){r.chart.styledMode||e.css(v(t.visible?r.itemStyle:r.itemHiddenStyle)),r.allItems.forEach((function(e){t!==e&&e.setState("",!a)})),s.removeClass(o),t.setState()})).on("click",(function(e){var i=function(){t.setVisible&&t.setVisible(),r.allItems.forEach((function(e){t!==e&&e.setState(t.visible?"inactive":"",!a)}))};s.removeClass(o),e={browserEvent:e},t.firePointEvent?t.firePointEvent("legendItemClick",e,i):g(t,"legendItemClick",e,i)}))}))},t.prototype.createCheckboxForItem=function(t){t.checkbox=u("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),h(t.checkbox,"click",(function(e){g(t.series||t,"checkboxClick",{checked:e.target.checked,item:t},(function(){t.select()}))}))},t}();return(/Trident\/7\.0/.test(e.navigator&&e.navigator.userAgent)||t)&&r(x.prototype,"positionItem",(function(t,e){var i=this,n=function(){e._legendItemPos&&t.call(i,e)};n(),i.bubbleLegend||setTimeout(n)})),i.Legend=x,i.Legend})),e(i,"Core/Series/SeriesRegistry.js",[i["Core/Globals.js"],i["Core/Options.js"],i["Core/Series/Point.js"],i["Core/Utilities.js"]],(function(t,e,i,n){var r,s=e.defaultOptions,a=n.error,o=n.extendClass,l=n.merge;return function(e){function n(t,n){var r=s.plotOptions||{},a=n.defaultOptions;n.prototype.pointClass||(n.prototype.pointClass=i),n.prototype.type=t,a&&(r[t]=a),e.seriesTypes[t]=n}e.seriesTypes=t.seriesTypes,e.getSeries=function(t,i){void 0===i&&(i={});var n=t.options.chart;n=i.type||n.type||n.defaultSeriesType||"";var r=e.seriesTypes[n];return e||a(17,!0,t,{missingModuleFor:n}),"function"==typeof(n=new r).init&&n.init(t,i),n},e.registerSeriesType=n,e.seriesType=function(t,r,a,h,u){var c=s.plotOptions||{};return r=r||"",c[t]=l(c[r],a),n(t,o(e.seriesTypes[r]||function(){},h)),e.seriesTypes[t].prototype.type=t,u&&(e.seriesTypes[t].prototype.pointClass=o(i,u)),e.seriesTypes[t]}}(r||(r={})),t.seriesType=r.seriesType,r})),e(i,"Core/Chart/Chart.js",[i["Core/Animation/AnimationUtilities.js"],i["Core/Axis/Axis.js"],i["Core/FormatUtilities.js"],i["Core/Globals.js"],i["Core/Legend.js"],i["Core/MSPointer.js"],i["Core/Options.js"],i["Core/Color/Palette.js"],i["Core/Pointer.js"],i["Core/Series/SeriesRegistry.js"],i["Core/Time.js"],i["Core/Utilities.js"],i["Core/Renderer/HTML/AST.js"]],(function(t,e,i,n,r,s,a,o,l,h,u,c,d){var p=t.animate,f=t.animObject,g=t.setAnimation,m=i.numberFormat,v=n.charts,y=n.doc,b=n.win,_=a.defaultOptions,T=a.defaultTime,x=h.seriesTypes,S=c.addEvent,w=c.attr,k=c.cleanRecursively,C=c.createElement,E=c.css,A=c.defined,P=c.discardElement,O=c.erase,L=c.error,M=c.extend,I=c.find,D=c.fireEvent,R=c.getStyle,N=c.isArray,B=c.isFunction,j=c.isNumber,U=c.isObject,F=c.isString,W=c.merge,z=c.objectEach,H=c.pick,V=c.pInt,G=c.relativeLength,X=c.removeEvent,q=c.splat,Y=c.syncTimeout,K=c.uniqueKey,$=n.marginNames,Q=function(){function t(t,e,i){this.series=this.renderTo=this.renderer=this.pointer=this.pointCount=this.plotWidth=this.plotTop=this.plotLeft=this.plotHeight=this.plotBox=this.options=this.numberFormatter=this.margin=this.legend=this.labelCollectors=this.isResizing=this.index=this.container=this.colorCounter=this.clipBox=this.chartWidth=this.chartHeight=this.bounds=this.axisOffset=this.axes=void 0,this.sharedClips={},this.yAxis=this.xAxis=this.userOptions=this.titleOffset=this.time=this.symbolCounter=this.spacingBox=this.spacing=void 0,this.getArgs(t,e,i)}return t.prototype.getArgs=function(t,e,i){F(t)||t.nodeName?(this.renderTo=t,this.init(e,i)):this.init(t,e)},t.prototype.init=function(t,e){var i=t.plotOptions||{};D(this,"init",{args:arguments},(function(){var r=W(_,t),s=r.chart;z(r.plotOptions,(function(t,e){U(t)&&(t.tooltip=i[e]&&W(i[e].tooltip)||void 0)})),r.tooltip.userOptions=t.chart&&t.chart.forExport&&t.tooltip.userOptions||t.tooltip,this.userOptions=t;var a=s.events;this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.labelCollectors=[],this.callback=e,this.isResizing=0,this.options=r,this.axes=[],this.series=[],this.time=t.time&&Object.keys(t.time).length?new u(t.time):n.time,this.numberFormatter=s.numberFormatter||m,this.styledMode=s.styledMode,this.hasCartesianSeries=s.showAxes;var o=this;o.index=v.length,v.push(o),n.chartCount++,a&&z(a,(function(t,e){B(t)&&S(o,e,t)})),o.xAxis=[],o.yAxis=[],o.pointCount=o.colorCounter=o.symbolCounter=0,D(o,"afterInit"),o.firstRender()}))},t.prototype.initSeries=function(t){var e=this.options.chart;e=t.type||e.type||e.defaultSeriesType;var i=x[e];return i||L(17,!0,this,{missingModuleFor:e}),"function"==typeof(e=new i).init&&e.init(this,t),e},t.prototype.setSeriesData=function(){this.getSeriesOrderByLinks().forEach((function(t){t.points||t.data||!t.enabledDataSorting||t.setData(t.options.data,!1)}))},t.prototype.getSeriesOrderByLinks=function(){return this.series.concat().sort((function(t,e){return t.linkedSeries.length||e.linkedSeries.length?e.linkedSeries.length-t.linkedSeries.length:0}))},t.prototype.orderSeries=function(t){var e=this.series;for(t=t||0;t<e.length;t++)e[t]&&(e[t].index=t,e[t].name=e[t].getName())},t.prototype.isInsidePlot=function(t,e,i){void 0===i&&(i={});var n=this.inverted,r=this.plotBox,s=this.plotLeft,a=this.plotTop,o=this.scrollablePlotBox,l=this.scrollingContainer,h=(l=void 0===l?{scrollLeft:0,scrollTop:0}:l).scrollLeft;l=l.scrollTop;var u=i.series;if(r=i.visiblePlotOnly&&o||r,t={x:o=i.inverted?e:t,y:e=i.inverted?t:e,isInsidePlot:!0},!i.ignoreX){var c=u&&(n?u.yAxis:u.xAxis)||{pos:s,len:1/0};(o=i.paneCoordinates?c.pos+o:s+o)>=Math.max(h+s,c.pos)&&o<=Math.min(h+s+r.width,c.pos+c.len)||(t.isInsidePlot=!1)}return!i.ignoreY&&t.isInsidePlot&&(n=u&&(n?u.xAxis:u.yAxis)||{pos:a,len:1/0},(i=i.paneCoordinates?n.pos+e:a+e)>=Math.max(l+a,n.pos)&&i<=Math.min(l+a+r.height,n.pos+n.len)||(t.isInsidePlot=!1)),D(this,"afterIsInsidePlot",t),t.isInsidePlot},t.prototype.redraw=function(t){D(this,"beforeRedraw");var e=this.hasCartesianSeries?this.axes:this.colorAxis||[],i=this.series,n=this.pointer,r=this.legend,s=this.userOptions.legend,a=this.isDirtyLegend,o=this.isDirtyBox,l=this.renderer,h=l.isHidden(),u=[];for(this.setResponsive&&this.setResponsive(!1),g(!!this.hasRendered&&t,this),h&&this.temporaryDisplay(),this.layOutTitles(),t=i.length;t--;){var c=i[t];if(c.options.stacking||c.options.centerInCategory){var d=!0;if(c.isDirty){var p=!0;break}}}if(p)for(t=i.length;t--;)(c=i[t]).options.stacking&&(c.isDirty=!0);i.forEach((function(t){t.isDirty&&("point"===t.options.legendType?("function"==typeof t.updateTotals&&t.updateTotals(),a=!0):s&&(s.labelFormatter||s.labelFormat)&&(a=!0)),t.isDirtyData&&D(t,"updatedData")})),a&&r&&r.options.enabled&&(r.render(),this.isDirtyLegend=!1),d&&this.getStacks(),e.forEach((function(t){t.updateNames(),t.setScale()})),this.getMargins(),e.forEach((function(t){t.isDirty&&(o=!0)})),e.forEach((function(t){var e=t.min+","+t.max;t.extKey!==e&&(t.extKey=e,u.push((function(){D(t,"afterSetExtremes",M(t.eventArgs,t.getExtremes())),delete t.eventArgs}))),(o||d)&&t.redraw()})),o&&this.drawChartBox(),D(this,"predraw"),i.forEach((function(t){(o||t.isDirty)&&t.visible&&t.redraw(),t.isDirtyData=!1})),n&&n.reset(!0),l.draw(),D(this,"redraw"),D(this,"render"),h&&this.temporaryDisplay(!0),u.forEach((function(t){t.call()}))},t.prototype.get=function(t){function e(e){return e.id===t||e.options&&e.options.id===t}var i,n=this.series,r=I(this.axes,e)||I(this.series,e);for(i=0;!r&&i<n.length;i++)r=I(n[i].points||[],e);return r},t.prototype.getAxes=function(){var t=this,i=this.options,n=i.xAxis=q(i.xAxis||{});i=i.yAxis=q(i.yAxis||{}),D(this,"getAxes"),n.forEach((function(t,e){t.index=e,t.isX=!0})),i.forEach((function(t,e){t.index=e})),n.concat(i).forEach((function(i){new e(t,i)})),D(this,"afterGetAxes")},t.prototype.getSelectedPoints=function(){var t=[];return this.series.forEach((function(e){t=t.concat(e.getPointsCollection().filter((function(t){return H(t.selectedStaging,t.selected)})))})),t},t.prototype.getSelectedSeries=function(){return this.series.filter((function(t){return t.selected}))},t.prototype.setTitle=function(t,e,i){this.applyDescription("title",t),this.applyDescription("subtitle",e),this.applyDescription("caption",void 0),this.layOutTitles(i)},t.prototype.applyDescription=function(t,e){var i=this,n="title"===t?{color:o.neutralColor80,fontSize:this.options.isStock?"16px":"18px"}:{color:o.neutralColor60};n=this.options[t]=W(!this.styledMode&&{style:n},this.options[t],e);var r=this[t];r&&e&&(this[t]=r=r.destroy()),n&&!r&&((r=this.renderer.text(n.text,0,0,n.useHTML).attr({align:n.align,class:"highcharts-"+t,zIndex:n.zIndex||4}).add()).update=function(e){i[{title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"}[t]](e)},this.styledMode||r.css(n.style),this[t]=r)},t.prototype.layOutTitles=function(t){var e=[0,0,0],i=this.renderer,n=this.spacingBox;["title","subtitle","caption"].forEach((function(t){var r=this[t],s=this.options[t],a=s.verticalAlign||"top";if(t="title"===t?-3:"top"===a?e[0]+2:0,r){if(!this.styledMode)var o=s.style.fontSize;o=i.fontMetrics(o,r).b,r.css({width:(s.width||n.width+(s.widthAdjust||0))+"px"});var l=Math.round(r.getBBox(s.useHTML).height);r.align(M({y:"bottom"===a?o:t+o,height:l},s),!1,"spacingBox"),s.floating||("top"===a?e[0]=Math.ceil(e[0]+l):"bottom"===a&&(e[2]=Math.ceil(e[2]+l)))}}),this),e[0]&&"top"===(this.options.title.verticalAlign||"top")&&(e[0]+=this.options.title.margin),e[2]&&"bottom"===this.options.caption.verticalAlign&&(e[2]+=this.options.caption.margin);var r=!this.titleOffset||this.titleOffset.join(",")!==e.join(",");this.titleOffset=e,D(this,"afterLayOutTitles"),!this.isDirtyBox&&r&&(this.isDirtyBox=this.isDirtyLegend=r,this.hasRendered&&H(t,!0)&&this.isDirtyBox&&this.redraw())},t.prototype.getChartSize=function(){var t=this.options.chart,e=t.width;t=t.height;var i=this.renderTo;A(e)||(this.containerWidth=R(i,"width")),A(t)||(this.containerHeight=R(i,"height")),this.chartWidth=Math.max(0,e||this.containerWidth||600),this.chartHeight=Math.max(0,G(t,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},t.prototype.temporaryDisplay=function(t){var e=this.renderTo;if(t)for(;e&&e.style;)e.hcOrigStyle&&(E(e,e.hcOrigStyle),delete e.hcOrigStyle),e.hcOrigDetached&&(y.body.removeChild(e),e.hcOrigDetached=!1),e=e.parentNode;else for(;e&&e.style&&(y.body.contains(e)||e.parentNode||(e.hcOrigDetached=!0,y.body.appendChild(e)),("none"===R(e,"display",!1)||e.hcOricDetached)&&(e.hcOrigStyle={display:e.style.display,height:e.style.height,overflow:e.style.overflow},t={display:"block",overflow:"hidden"},e!==this.renderTo&&(t.height=0),E(e,t),e.offsetWidth||e.style.setProperty("display","block","important")),(e=e.parentNode)!==y.body););},t.prototype.setClassName=function(t){this.container.className="highcharts-container "+(t||"")},t.prototype.getContainer=function(){var t,e,i=this.options,r=i.chart,s=this.renderTo,a=K();s||(this.renderTo=s=r.renderTo),F(s)&&(this.renderTo=s=y.getElementById(s)),s||L(13,!0,this);var o=V(w(s,"data-highcharts-chart"));j(o)&&v[o]&&v[o].hasRendered&&v[o].destroy(),w(s,"data-highcharts-chart",this.index),s.innerHTML="",r.skipClone||s.offsetWidth||this.temporaryDisplay(),this.getChartSize(),o=this.chartWidth;var l=this.chartHeight;if(E(s,{overflow:"hidden"}),this.styledMode||(t=M({position:"relative",overflow:"hidden",width:o+"px",height:l+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none"},r.style||{})),this.container=s=C("div",{id:a},t,s),this._cursor=s.style.cursor,this.renderer=new(n[r.renderer]||n.Renderer)(s,o,l,null,r.forExport,i.exporting&&i.exporting.allowHTML,this.styledMode),g(void 0,this),this.setClassName(r.className),this.styledMode)for(e in i.defs)this.renderer.definition(i.defs[e]);else this.renderer.setStyle(r.style);this.renderer.chartIndex=this.index,D(this,"afterGetContainer")},t.prototype.getMargins=function(t){var e=this.spacing,i=this.margin,n=this.titleOffset;this.resetMargins(),n[0]&&!A(i[0])&&(this.plotTop=Math.max(this.plotTop,n[0]+e[0])),n[2]&&!A(i[2])&&(this.marginBottom=Math.max(this.marginBottom,n[2]+e[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(i,e),D(this,"getMargins"),t||this.getAxisMargins()},t.prototype.getAxisMargins=function(){var t=this,e=t.axisOffset=[0,0,0,0],i=t.colorAxis,n=t.margin,r=function(t){t.forEach((function(t){t.visible&&t.getOffset()}))};t.hasCartesianSeries?r(t.axes):i&&i.length&&r(i),$.forEach((function(i,r){A(n[r])||(t[i]+=e[r])})),t.setChartSize()},t.prototype.reflow=function(t){var e=this,i=e.options.chart,n=e.renderTo,r=A(i.width)&&A(i.height),s=i.width||R(n,"width");i=i.height||R(n,"height"),n=t?t.target:b,delete e.pointer.chartPosition,r||e.isPrinting||!s||!i||n!==b&&n!==y||(s===e.containerWidth&&i===e.containerHeight||(c.clearTimeout(e.reflowTimeout),e.reflowTimeout=Y((function(){e.container&&e.setSize(void 0,void 0,!1)}),t?100:0)),e.containerWidth=s,e.containerHeight=i)},t.prototype.setReflow=function(t){var e=this;!1===t||this.unbindReflow?!1===t&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=S(b,"resize",(function(t){e.options&&e.reflow(t)})),S(this,"destroy",this.unbindReflow))},t.prototype.setSize=function(t,e,i){var n=this,r=n.renderer;n.isResizing+=1,g(i,n),i=r.globalAnimation,n.oldChartHeight=n.chartHeight,n.oldChartWidth=n.chartWidth,void 0!==t&&(n.options.chart.width=t),void 0!==e&&(n.options.chart.height=e),n.getChartSize(),n.styledMode||(i?p:E)(n.container,{width:n.chartWidth+"px",height:n.chartHeight+"px"},i),n.setChartSize(!0),r.setSize(n.chartWidth,n.chartHeight,i),n.axes.forEach((function(t){t.isDirty=!0,t.setScale()})),n.isDirtyLegend=!0,n.isDirtyBox=!0,n.layOutTitles(),n.getMargins(),n.redraw(i),n.oldChartHeight=null,D(n,"resize"),Y((function(){n&&D(n,"endResize",null,(function(){--n.isResizing}))}),f(i).duration)},t.prototype.setChartSize=function(t){var e,i,n,r,s=this.inverted,a=this.renderer,o=this.chartWidth,l=this.chartHeight,h=this.options.chart,u=this.spacing,c=this.clipOffset;this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=i=Math.round(this.plotTop),this.plotWidth=n=Math.max(0,Math.round(o-e-this.marginRight)),this.plotHeight=r=Math.max(0,Math.round(l-i-this.marginBottom)),this.plotSizeX=s?r:n,this.plotSizeY=s?n:r,this.plotBorderWidth=h.plotBorderWidth||0,this.spacingBox=a.spacingBox={x:u[3],y:u[0],width:o-u[3]-u[1],height:l-u[0]-u[2]},this.plotBox=a.plotBox={x:e,y:i,width:n,height:r},l=2*Math.floor(this.plotBorderWidth/2),s=Math.ceil(Math.max(l,c[3])/2),o=Math.ceil(Math.max(l,c[0])/2),this.clipBox={x:s,y:o,width:Math.floor(this.plotSizeX-Math.max(l,c[1])/2-s),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(l,c[2])/2-o))},t||(this.axes.forEach((function(t){t.setAxisSize(),t.setAxisTranslation()})),a.alignElements()),D(this,"afterSetChartSize",{skipAxes:t})},t.prototype.resetMargins=function(){D(this,"resetMargins");var t=this,e=t.options.chart;["margin","spacing"].forEach((function(i){var n=e[i],r=U(n)?n:[n,n,n,n];["Top","Right","Bottom","Left"].forEach((function(n,s){t[i][s]=H(e[i+n],r[s])}))})),$.forEach((function(e,i){t[e]=H(t.margin[i],t.spacing[i])})),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},t.prototype.drawChartBox=function(){var t,e=this.options.chart,i=this.renderer,n=this.chartWidth,r=this.chartHeight,s=this.chartBackground,a=this.plotBackground,o=this.plotBorder,l=this.styledMode,h=this.plotBGImage,u=e.backgroundColor,c=e.plotBackgroundColor,d=e.plotBackgroundImage,p=this.plotLeft,f=this.plotTop,g=this.plotWidth,m=this.plotHeight,v=this.plotBox,y=this.clipRect,b=this.clipBox,_="animate";if(s||(this.chartBackground=s=i.rect().addClass("highcharts-background").add(),_="attr"),l)var T=t=s.strokeWidth();else t=(T=e.borderWidth||0)+(e.shadow?8:0),u={fill:u||"none"},(T||s["stroke-width"])&&(u.stroke=e.borderColor,u["stroke-width"]=T),s.attr(u).shadow(e.shadow);s[_]({x:t/2,y:t/2,width:n-t-T%2,height:r-t-T%2,r:e.borderRadius}),_="animate",a||(_="attr",this.plotBackground=a=i.rect().addClass("highcharts-plot-background").add()),a[_](v),l||(a.attr({fill:c||"none"}).shadow(e.plotShadow),d&&(h?(d!==h.attr("href")&&h.attr("href",d),h.animate(v)):this.plotBGImage=i.image(d,p,f,g,m).add())),y?y.animate({width:b.width,height:b.height}):this.clipRect=i.clipRect(b),_="animate",o||(_="attr",this.plotBorder=o=i.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),l||o.attr({stroke:e.plotBorderColor,"stroke-width":e.plotBorderWidth||0,fill:"none"}),o[_](o.crisp({x:p,y:f,width:g,height:m},-o.strokeWidth())),this.isDirtyBox=!1,D(this,"afterDrawChartBox")},t.prototype.propFromSeries=function(){var t,e,i,n=this,r=n.options.chart,s=n.options.series;["inverted","angular","polar"].forEach((function(a){for(t=x[r.type||r.defaultSeriesType],i=r[a]||t&&t.prototype[a],e=s&&s.length;!i&&e--;)(t=x[s[e].type])&&t.prototype[a]&&(i=!0);n[a]=i}))},t.prototype.linkSeries=function(){var t=this,e=t.series;e.forEach((function(t){t.linkedSeries.length=0})),e.forEach((function(e){var i=e.options.linkedTo;F(i)&&(i=":previous"===i?t.series[e.index-1]:t.get(i))&&i.linkedParent!==e&&(i.linkedSeries.push(e),e.linkedParent=i,i.enabledDataSorting&&e.setDataSortingOptions(),e.visible=H(e.options.visible,i.options.visible,e.visible))})),D(this,"afterLinkSeries")},t.prototype.renderSeries=function(){this.series.forEach((function(t){t.translate(),t.render()}))},t.prototype.renderLabels=function(){var t=this,e=t.options.labels;e.items&&e.items.forEach((function(i){var n=M(e.style,i.style),r=V(n.left)+t.plotLeft,s=V(n.top)+t.plotTop+12;delete n.left,delete n.top,t.renderer.text(i.html,r,s).attr({zIndex:2}).css(n).add()}))},t.prototype.render=function(){var t=this.axes,e=this.colorAxis,i=this.renderer,n=this.options,s=0,a=function(t){t.forEach((function(t){t.visible&&t.render()}))};this.setTitle(),this.legend=new r(this,n.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),n=this.plotWidth,t.some((function(t){if(t.horiz&&t.visible&&t.options.labels.enabled&&t.series.length)return s=21,!0}));var o=this.plotHeight=Math.max(this.plotHeight-s,0);t.forEach((function(t){t.setScale()})),this.getAxisMargins();var l=1.1<n/this.plotWidth,h=1.05<o/this.plotHeight;(l||h)&&(t.forEach((function(t){(t.horiz&&l||!t.horiz&&h)&&t.setTickInterval(!0)})),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries?a(t):e&&e.length&&a(e),this.seriesGroup||(this.seriesGroup=i.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0},t.prototype.addCredits=function(t){var e=this,i=W(!0,this.options.credits,t);i.enabled&&!this.credits&&(this.credits=this.renderer.text(i.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",(function(){i.href&&(b.location.href=i.href)})).attr({align:i.position.align,zIndex:8}),e.styledMode||this.credits.css(i.style),this.credits.add().align(i.position),this.credits.update=function(t){e.credits=e.credits.destroy(),e.addCredits(t)})},t.prototype.destroy=function(){var t,e=this,i=e.axes,r=e.series,s=e.container,a=s&&s.parentNode;for(D(e,"destroy"),e.renderer.forExport?O(v,e):v[e.index]=void 0,n.chartCount--,e.renderTo.removeAttribute("data-highcharts-chart"),X(e),t=i.length;t--;)i[t]=i[t].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),t=r.length;t--;)r[t]=r[t].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach((function(t){var i=e[t];i&&i.destroy&&(e[t]=i.destroy())})),s&&(s.innerHTML="",X(s),a&&P(s)),z(e,(function(t,i){delete e[i]}))},t.prototype.firstRender=function(){var t=this,e=t.options;t.isReadyToRender&&!t.isReadyToRender()||(t.getContainer(),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),(N(e.series)?e.series:[]).forEach((function(e){t.initSeries(e)})),t.linkSeries(),t.setSeriesData(),D(t,"beforeRender"),l&&(t.pointer=n.hasTouch||!b.PointerEvent&&!b.MSPointerEvent?new l(t,e):new s(t,e)),t.render(),t.pointer.getChartPosition(),t.renderer.imgCount||t.hasLoaded||t.onload(),t.temporaryDisplay(!0))},t.prototype.onload=function(){this.callbacks.concat([this.callback]).forEach((function(t){t&&void 0!==this.index&&t.apply(this,[this])}),this),D(this,"load"),D(this,"render"),A(this.index)&&this.setReflow(this.options.chart.reflow),this.hasLoaded=!0},t.prototype.addSeries=function(t,e,i){var n,r=this;return t&&(e=H(e,!0),D(r,"addSeries",{options:t},(function(){n=r.initSeries(t),r.isDirtyLegend=!0,r.linkSeries(),n.enabledDataSorting&&n.setData(t.data,!1),D(r,"afterAddSeries",{series:n}),e&&r.redraw(i)}))),n},t.prototype.addAxis=function(t,e,i,n){return this.createAxis(e?"xAxis":"yAxis",{axis:t,redraw:i,animation:n})},t.prototype.addColorAxis=function(t,e,i){return this.createAxis("colorAxis",{axis:t,redraw:e,animation:i})},t.prototype.createAxis=function(t,i){var r="colorAxis"===t,s=i.redraw,a=i.animation;return t=W(i.axis,{index:this[t].length,isX:"xAxis"===t}),t=r?new n.ColorAxis(this,t):new e(this,t),r&&(this.isDirtyLegend=!0,this.axes.forEach((function(t){t.series=[]})),this.series.forEach((function(t){t.bindAxes(),t.isDirtyData=!0}))),H(s,!0)&&this.redraw(a),t},t.prototype.showLoading=function(t){var e=this,i=e.options,n=e.loadingDiv,r=e.loadingSpan,s=i.loading,a=function(){n&&E(n,{left:e.plotLeft+"px",top:e.plotTop+"px",width:e.plotWidth+"px",height:e.plotHeight+"px"})};n||(e.loadingDiv=n=C("div",{className:"highcharts-loading highcharts-loading-hidden"},null,e.container)),r||(e.loadingSpan=r=C("span",{className:"highcharts-loading-inner"},null,n),S(e,"redraw",a)),n.className="highcharts-loading",d.setElementHTML(r,H(t,i.lang.loading,"")),e.styledMode||(E(n,M(s.style,{zIndex:10})),E(r,s.labelStyle),e.loadingShown||(E(n,{opacity:0,display:""}),p(n,{opacity:s.style.opacity||.5},{duration:s.showDuration||0}))),e.loadingShown=!0,a()},t.prototype.hideLoading=function(){var t=this.options,e=this.loadingDiv;e&&(e.className="highcharts-loading highcharts-loading-hidden",this.styledMode||p(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){E(e,{display:"none"})}})),this.loadingShown=!1},t.prototype.update=function(t,e,i,n){var r,s,a,o=this,l={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},h=t.isResponsiveOptions,c=[];if(D(o,"update",{options:t}),h||o.setResponsive(!1,!0),t=k(t,o.options),o.userOptions=W(o.userOptions,t),r=t.chart){if(W(!0,o.options.chart,r),"className"in r&&o.setClassName(r.className),"reflow"in r&&o.setReflow(r.reflow),"inverted"in r||"polar"in r||"type"in r){o.propFromSeries();var d=!0}"alignTicks"in r&&(d=!0),z(r,(function(t,e){-1!==o.propsRequireUpdateSeries.indexOf("chart."+e)&&(s=!0),-1!==o.propsRequireDirtyBox.indexOf(e)&&(o.isDirtyBox=!0),-1!==o.propsRequireReflow.indexOf(e)&&(h?o.isDirtyBox=!0:a=!0)})),!o.styledMode&&"style"in r&&o.renderer.setStyle(r.style)}!o.styledMode&&t.colors&&(this.options.colors=t.colors),t.time&&(this.time===T&&(this.time=new u(t.time)),W(!0,o.options.time,t.time)),z(t,(function(e,i){o[i]&&"function"==typeof o[i].update?o[i].update(e,!1):"function"==typeof o[l[i]]?o[l[i]](e):"colors"!==i&&-1===o.collectionsWithUpdate.indexOf(i)&&W(!0,o.options[i],t[i]),"chart"!==i&&-1!==o.propsRequireUpdateSeries.indexOf(i)&&(s=!0)})),this.collectionsWithUpdate.forEach((function(e){if(t[e]){var n=[];o[e].forEach((function(t,e){t.options.isInternal||n.push(H(t.options.index,e))})),q(t[e]).forEach((function(t,r){var s,a=A(t.id);a&&(s=o.get(t.id)),!s&&o[e]&&(s=o[e][n?n[r]:r])&&a&&A(s.options.id)&&(s=void 0),s&&s.coll===e&&(s.update(t,!1),i&&(s.touched=!0)),!s&&i&&o.collectionsWithInit[e]&&(o.collectionsWithInit[e][0].apply(o,[t].concat(o.collectionsWithInit[e][1]||[]).concat([!1])).touched=!0)})),i&&o[e].forEach((function(t){t.touched||t.options.isInternal?delete t.touched:c.push(t)}))}})),c.forEach((function(t){t.chart&&t.remove(!1)})),d&&o.axes.forEach((function(t){t.update({},!1)})),s&&o.getSeriesOrderByLinks().forEach((function(t){t.chart&&t.update({},!1)}),this),d=r&&r.width,r=r&&r.height,F(r)&&(r=G(r,d||o.chartWidth)),a||j(d)&&d!==o.chartWidth||j(r)&&r!==o.chartHeight?o.setSize(d,r,n):H(e,!0)&&o.redraw(n),D(o,"afterUpdate",{options:t,redraw:e,animation:n})},t.prototype.setSubtitle=function(t,e){this.applyDescription("subtitle",t),this.layOutTitles(e)},t.prototype.setCaption=function(t,e){this.applyDescription("caption",t),this.layOutTitles(e)},t.prototype.showResetZoom=function(){function t(){e.zoomOut()}var e=this,i=_.lang,n=e.options.chart.resetZoomButton,r=n.theme,s=r.states,a="chart"===n.relativeTo||"spacingBox"===n.relativeTo?null:"scrollablePlotBox";D(this,"beforeShowResetZoom",null,(function(){e.resetZoomButton=e.renderer.button(i.resetZoom,null,null,t,r,s&&s.hover).attr({align:n.position.align,title:i.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(n.position,!1,a)})),D(this,"afterShowResetZoom")},t.prototype.zoomOut=function(){D(this,"selection",{resetSelection:!0},this.zoom)},t.prototype.zoom=function(t){var e,i=this,n=i.pointer,r=!1,s=i.inverted?n.mouseDownX:n.mouseDownY;!t||t.resetSelection?(i.axes.forEach((function(t){e=t.zoom()})),n.initiated=!1):t.xAxis.concat(t.yAxis).forEach((function(t){var a=t.axis,o=i.inverted?a.left:a.top,l=i.inverted?o+a.width:o+a.height,h=a.isXAxis,u=!1;(!h&&s>=o&&s<=l||h||!A(s))&&(u=!0),n[h?"zoomX":"zoomY"]&&u&&(e=a.zoom(t.min,t.max),a.displayBtn&&(r=!0))}));var a=i.resetZoomButton;r&&!a?i.showResetZoom():!r&&U(a)&&(i.resetZoomButton=a.destroy()),e&&i.redraw(H(i.options.chart.animation,t&&t.animation,100>i.pointCount))},t.prototype.pan=function(t,e){var i,n=this,r=n.hoverPoints,s=n.options.chart,a=n.options.mapNavigation&&n.options.mapNavigation.enabled;e="object"==typeof e?e:{enabled:e,type:"x"},s&&s.panning&&(s.panning=e);var o=e.type;D(this,"pan",{originalEvent:t},(function(){r&&r.forEach((function(t){t.setState()}));var e=[1];"xy"===o?e=[1,0]:"y"===o&&(e=[0]),e.forEach((function(e){var r=n[e?"xAxis":"yAxis"][0],s=r.horiz,l=t[s?"chartX":"chartY"],h=n[s=s?"mouseDownX":"mouseDownY"],u=(r.pointRange||0)/2,c=r.reversed&&!n.inverted||!r.reversed&&n.inverted?-1:1,d=r.getExtremes(),p=r.toValue(h-l,!0)+u*c,f=(c=r.toValue(h+r.len-l,!0)-u*c)<p;h=f?c:p,p=f?p:c,c=r.hasVerticalPanning();var g=r.panningState;!c||e||g&&!g.isDirty||r.series.forEach((function(t){var e=t.getProcessedData(!0);e=t.getExtremes(e.yData,!0),g||(g={startMin:Number.MAX_VALUE,startMax:-Number.MAX_VALUE}),j(e.dataMin)&&j(e.dataMax)&&(g.startMin=Math.min(H(t.options.threshold,1/0),e.dataMin,g.startMin),g.startMax=Math.max(H(t.options.threshold,-1/0),e.dataMax,g.startMax))})),e=Math.min(H(g&&g.startMin,d.dataMin),u?d.min:r.toValue(r.toPixels(d.min)-r.minPixelPadding)),u=Math.max(H(g&&g.startMax,d.dataMax),u?d.max:r.toValue(r.toPixels(d.max)+r.minPixelPadding)),r.panningState=g,r.isOrdinal||(0<(c=e-h)&&(p+=c,h=e),0<(c=p-u)&&(p=u,h-=c),r.series.length&&h!==d.min&&p!==d.max&&h>=e&&p<=u&&(r.setExtremes(h,p,!1,!1,{trigger:"pan"}),n.resetZoomButton||a||h===e||p===u||!o.match("y")||(n.showResetZoom(),r.displayBtn=!1),i=!0),n[s]=l)})),i&&n.redraw(!1),E(n.container,{cursor:"move"})}))},t}();return M(Q.prototype,{callbacks:[],collectionsWithInit:{xAxis:[Q.prototype.addAxis,[!0]],yAxis:[Q.prototype.addAxis,[!1]],series:[Q.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","zAxis","series"],propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")}),n.chart=function(t,e,i){return new Q(t,e,i)},n.Chart=Q,Q})),e(i,"Mixins/LegendSymbol.js",[i["Core/Globals.js"],i["Core/Utilities.js"]],(function(t,e){var i=e.merge,n=e.pick;return t.LegendSymbolMixin={drawRectangle:function(t,e){var i=t.symbolHeight,r=t.options.squareSymbol;e.legendSymbol=this.chart.renderer.rect(r?(t.symbolWidth-i)/2:0,t.baseline-i+1,r?i:t.symbolWidth,i,n(t.options.symbolRadius,i/2)).addClass("highcharts-point").attr({zIndex:3}).add(e.legendGroup)},drawLineMarker:function(t){var e=this.options,r=e.marker,s=t.symbolWidth,a=t.symbolHeight,o=a/2,l=this.chart.renderer,h=this.legendGroup;t=t.baseline-Math.round(.3*t.fontMetrics.b);var u={};this.chart.styledMode||(u={"stroke-width":e.lineWidth||0},e.dashStyle&&(u.dashstyle=e.dashStyle)),this.legendLine=l.path([["M",0,t],["L",s,t]]).addClass("highcharts-graph").attr(u).add(h),r&&!1!==r.enabled&&s&&(e=Math.min(n(r.radius,o),o),0===this.symbol.indexOf("url")&&(r=i(r,{width:a,height:a}),e=0),this.legendSymbol=r=l.symbol(this.symbol,s/2-e,t-e,2*e,2*e,r).addClass("highcharts-point").add(h),r.isMarker=!0)}}})),e(i,"Core/Series/Series.js",[i["Core/Animation/AnimationUtilities.js"],i["Core/Globals.js"],i["Mixins/LegendSymbol.js"],i["Core/Options.js"],i["Core/Color/Palette.js"],i["Core/Series/Point.js"],i["Core/Series/SeriesRegistry.js"],i["Core/Renderer/SVG/SVGElement.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r,s,a,o,l){var h=t.animObject,u=t.setAnimation,c=e.hasTouch,d=e.svg,p=e.win,f=n.defaultOptions,g=a.seriesTypes,m=l.addEvent,v=l.arrayMax,y=l.arrayMin,b=l.clamp,_=l.cleanRecursively,T=l.correctFloat,x=l.defined,S=l.erase,w=l.error,k=l.extend,C=l.find,E=l.fireEvent,A=l.getNestedProperty,P=l.isArray,O=l.isFunction,L=l.isNumber,M=l.isString,I=l.merge,D=l.objectEach,R=l.pick,N=l.removeEvent,B=l.splat,j=l.syncTimeout;return t=function(){function t(){this.zones=this.yAxis=this.xAxis=this.userOptions=this.tooltipOptions=this.processedYData=this.processedXData=this.points=this.options=this.linkedSeries=this.index=this.eventsToUnbind=this.eventOptions=this.data=this.chart=this._i=void 0}return t.prototype.init=function(t,e){E(this,"init",{options:e});var i,n=this,r=t.series;this.eventOptions=this.eventOptions||{},this.eventsToUnbind=[],n.chart=t,n.options=n.setOptions(e);var s=n.options;n.linkedSeries=[],n.bindAxes(),k(n,{name:s.name,state:"",visible:!1!==s.visible,selected:!0===s.selected}),e=s.events,D(e,(function(t,e){O(t)&&n.eventOptions[e]!==t&&(O(n.eventOptions[e])&&N(n,e,n.eventOptions[e]),n.eventOptions[e]=t,m(n,e,t))})),(e&&e.click||s.point&&s.point.events&&s.point.events.click||s.allowPointSelect)&&(t.runTrackerClick=!0),n.getColor(),n.getSymbol(),n.parallelArrays.forEach((function(t){n[t+"Data"]||(n[t+"Data"]=[])})),n.isCartesian&&(t.hasCartesianSeries=!0),r.length&&(i=r[r.length-1]),n._i=R(i&&i._i,-1)+1,n.opacity=n.options.opacity,t.orderSeries(this.insert(r)),s.dataSorting&&s.dataSorting.enabled?n.setDataSortingOptions():n.points||n.data||n.setData(s.data,!1),E(this,"afterInit")},t.prototype.is=function(t){return g[t]&&this instanceof g[t]},t.prototype.insert=function(t){var e,i=this.options.index;if(L(i)){for(e=t.length;e--;)if(i>=R(t[e].options.index,t[e]._i)){t.splice(e+1,0,this);break}-1===e&&t.unshift(this),e+=1}else t.push(this);return R(e,t.length-1)},t.prototype.bindAxes=function(){var t,e=this,i=e.options,n=e.chart;E(this,"bindAxes",null,(function(){(e.axisTypes||[]).forEach((function(r){var s=0;n[r].forEach((function(n){t=n.options,(i[r]===s&&!t.isInternal||void 0!==i[r]&&i[r]===t.id||void 0===i[r]&&0===t.index)&&(e.insert(n.series),e[r]=n,n.isDirty=!0),t.isInternal||s++})),e[r]||e.optionalAxis===r||w(18,!0,n)}))})),E(this,"afterBindAxes")},t.prototype.updateParallelArrays=function(t,e){var i=t.series,n=arguments,r=L(e)?function(n){var r="y"===n&&i.toYData?i.toYData(t):t[n];i[n+"Data"][e]=r}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(n,2))};i.parallelArrays.forEach(r)},t.prototype.hasData=function(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&0<this.yData.length},t.prototype.autoIncrement=function(){var t,e=this.options,i=this.xIncrement,n=e.pointIntervalUnit,r=this.chart.time;return i=R(i,e.pointStart,0),this.pointInterval=t=R(this.pointInterval,e.pointInterval,1),n&&(e=new r.Date(i),"day"===n?r.set("Date",e,r.get("Date",e)+t):"month"===n?r.set("Month",e,r.get("Month",e)+t):"year"===n&&r.set("FullYear",e,r.get("FullYear",e)+t),t=e.getTime()-i),this.xIncrement=i+t,i},t.prototype.setDataSortingOptions=function(){var t=this.options;k(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),x(t.pointRange)||(t.pointRange=1)},t.prototype.setOptions=function(t){var e=this.chart,i=e.options,n=i.plotOptions,r=e.userOptions||{};t=I(t),e=e.styledMode;var s={plotOptions:n,userOptions:t};E(this,"setOptions",s);var a=s.plotOptions[this.type],o=r.plotOptions||{};return this.userOptions=s.userOptions,r=I(a,n.series,r.plotOptions&&r.plotOptions[this.type],t),this.tooltipOptions=I(f.tooltip,f.plotOptions.series&&f.plotOptions.series.tooltip,f.plotOptions[this.type].tooltip,i.tooltip.userOptions,n.series&&n.series.tooltip,n[this.type].tooltip,t.tooltip),this.stickyTracking=R(t.stickyTracking,o[this.type]&&o[this.type].stickyTracking,o.series&&o.series.stickyTracking,!(!this.tooltipOptions.shared||this.noSharedTooltip)||r.stickyTracking),null===a.marker&&delete r.marker,this.zoneAxis=r.zoneAxis,i=this.zones=(r.zones||[]).slice(),!r.negativeColor&&!r.negativeFillColor||r.zones||(n={value:r[this.zoneAxis+"Threshold"]||r.threshold||0,className:"highcharts-negative"},e||(n.color=r.negativeColor,n.fillColor=r.negativeFillColor),i.push(n)),i.length&&x(i[i.length-1].value)&&i.push(e?{}:{color:this.color,fillColor:this.fillColor}),E(this,"afterSetOptions",{options:r}),r},t.prototype.getName=function(){return R(this.options.name,"Series "+(this.index+1))},t.prototype.getCyclic=function(t,e,i){var n=this.chart,r=this.userOptions,s=t+"Index",a=t+"Counter",o=i?i.length:R(n.options.chart[t+"Count"],n[t+"Count"]);if(!e){var l=R(r[s],r["_"+s]);x(l)||(n.series.length||(n[a]=0),r["_"+s]=l=n[a]%o,n[a]+=1),i&&(e=i[l])}void 0!==l&&(this[s]=l),this[t]=e},t.prototype.getColor=function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color=r.neutralColor20:this.getCyclic("color",this.options.color||f.plotOptions[this.type].color,this.chart.options.colors)},t.prototype.getPointsCollection=function(){return(this.hasGroupedData?this.points:this.data)||[]},t.prototype.getSymbol=function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},t.prototype.findPointIndex=function(t,e){var i,n=t.id,r=t.x,s=this.points,a=this.options.dataSorting;if(n)var o=this.chart.get(n);else if(this.linkedParent||this.enabledDataSorting){var l=a&&a.matchByName?"name":"index";if(!(o=C(s,(function(e){return!e.touched&&e[l]===t[l]}))))return}if(o){var h=o&&o.index;void 0!==h&&(i=!0)}return void 0===h&&L(r)&&(h=this.xData.indexOf(r,e)),-1!==h&&void 0!==h&&this.cropped&&(h=h>=this.cropStart?h-this.cropStart:h),!i&&s[h]&&s[h].touched&&(h=void 0),h},t.prototype.updateData=function(t,e){var i,n,r,s=this.options,a=s.dataSorting,o=this.points,l=[],h=this.requireSorting,u=t.length===o.length,c=!0;if(this.xIncrement=null,t.forEach((function(t,e){var n=x(t)&&this.pointClass.prototype.optionsToObject.call({series:this},t)||{},c=n.x;n.id||L(c)?(-1===(c=this.findPointIndex(n,r))||void 0===c?l.push(t):o[c]&&t!==s.data[c]?(o[c].update(t,!1,null,!1),o[c].touched=!0,h&&(r=c+1)):o[c]&&(o[c].touched=!0),(!u||e!==c||a&&a.enabled||this.hasDerivedData)&&(i=!0)):l.push(t)}),this),i)for(t=o.length;t--;)(n=o[t])&&!n.touched&&n.remove&&n.remove(!1,e);else!u||a&&a.enabled?c=!1:(t.forEach((function(t,e){o[e].update&&t!==o[e].y&&o[e].update(t,!1,null,!1)})),l.length=0);return o.forEach((function(t){t&&(t.touched=!1)})),!!c&&(l.forEach((function(t){this.addPoint(t,!1,null,null,!1)}),this),null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=v(this.xData),this.autoIncrement()),!0)},t.prototype.setData=function(t,e,i,n){var r,s=this,a=s.points,o=a&&a.length||0,l=s.options,h=s.chart,u=l.dataSorting,c=null,d=s.xAxis;c=l.turboThreshold;var p,f=this.xData,g=this.yData,m=(r=s.pointArrayMap)&&r.length,v=l.keys,y=0,b=1;if(r=(t=t||[]).length,e=R(e,!0),u&&u.enabled&&(t=this.sortData(t)),!1!==n&&r&&o&&!s.cropped&&!s.hasGroupedData&&s.visible&&!s.isSeriesBoosting&&(p=this.updateData(t,i)),!p){if(s.xIncrement=null,s.colorCounter=0,this.parallelArrays.forEach((function(t){s[t+"Data"].length=0})),c&&r>c)if(c=s.getFirstValidPoint(t),L(c))for(i=0;i<r;i++)f[i]=this.autoIncrement(),g[i]=t[i];else if(P(c))if(m)for(i=0;i<r;i++)n=t[i],f[i]=n[0],g[i]=n.slice(1,m+1);else for(v&&(y=0<=(y=v.indexOf("x"))?y:0,b=0<=(b=v.indexOf("y"))?b:1),i=0;i<r;i++)n=t[i],f[i]=n[y],g[i]=n[b];else w(12,!1,h);else for(i=0;i<r;i++)void 0!==t[i]&&(n={series:s},s.pointClass.prototype.applyOptions.apply(n,[t[i]]),s.updateParallelArrays(n,i));for(g&&M(g[0])&&w(14,!0,h),s.data=[],s.options.data=s.userOptions.data=t,i=o;i--;)a[i]&&a[i].destroy&&a[i].destroy();d&&(d.minRange=d.userMinRange),s.isDirty=h.isDirtyBox=!0,s.isDirtyData=!!a,i=!1}"point"===l.legendType&&(this.processData(),this.generatePoints()),e&&h.redraw(i)},t.prototype.sortData=function(t){var e=this,i=e.options.dataSorting.sortKey||"y",n=function(t,e){return x(e)&&t.pointClass.prototype.optionsToObject.call({series:t},e)||{}};return t.forEach((function(i,r){t[r]=n(e,i),t[r].index=r}),this),t.concat().sort((function(t,e){return t=A(i,t),(e=A(i,e))<t?-1:e>t?1:0})).forEach((function(t,e){t.x=e}),this),e.linkedSeries&&e.linkedSeries.forEach((function(e){var i=e.options,r=i.data;i.dataSorting&&i.dataSorting.enabled||!r||(r.forEach((function(i,s){r[s]=n(e,i),t[s]&&(r[s].x=t[s].x,r[s].index=s)})),e.setData(r,!1))})),t},t.prototype.getProcessedData=function(t){var e=this.xData,i=this.yData,n=e.length,r=0,s=this.xAxis,a=this.options,o=a.cropThreshold,l=t||this.getExtremesFromAll||a.getExtremesFromAll,h=this.isCartesian;t=s&&s.val2lin,a=!(!s||!s.logarithmic);var u=this.requireSorting;if(s)var c=(s=s.getExtremes()).min,d=s.max;if(h&&this.sorted&&!l&&(!o||n>o||this.forceCrop))if(e[n-1]<c||e[0]>d)e=[],i=[];else if(this.yData&&(e[0]<c||e[n-1]>d)){e=(r=this.cropData(this.xData,this.yData,c,d)).xData,i=r.yData,r=r.start;var p=!0}for(o=e.length||1;--o;)if(0<(n=a?t(e[o])-t(e[o-1]):e[o]-e[o-1])&&(void 0===f||n<f))var f=n;else 0>n&&u&&(w(15,!1,this.chart),u=!1);return{xData:e,yData:i,cropped:p,cropStart:r,closestPointRange:f}},t.prototype.processData=function(t){var e=this.xAxis;if(this.isCartesian&&!this.isDirty&&!e.isDirty&&!this.yAxis.isDirty&&!t)return!1;t=this.getProcessedData(),this.cropped=t.cropped,this.cropStart=t.cropStart,this.processedXData=t.xData,this.processedYData=t.yData,this.closestPointRange=this.basePointRange=t.closestPointRange},t.prototype.cropData=function(t,e,i,n,r){var s,a=t.length,o=0,l=a;for(r=R(r,this.cropShoulder),s=0;s<a;s++)if(t[s]>=i){o=Math.max(0,s-r);break}for(i=s;i<a;i++)if(t[i]>n){l=i+r;break}return{xData:t.slice(o,l),yData:e.slice(o,l),start:o,end:l}},t.prototype.generatePoints=function(){var t,e,i=this.options,n=i.data,r=this.data,s=this.processedXData,a=this.processedYData,o=this.pointClass,l=s.length,h=this.cropStart||0,u=this.hasGroupedData,c=i.keys,d=[];for(i=i.dataGrouping&&i.dataGrouping.groupAll?h:0,r||u||((r=[]).length=n.length,r=this.data=r),c&&u&&(this.options.keys=!1),e=0;e<l;e++){var p=h+e;if(u){var f=(new o).init(this,[s[e]].concat(B(a[e])));f.dataGroup=this.groupMap[i+e],f.dataGroup.options&&(f.options=f.dataGroup.options,k(f,f.dataGroup.options),delete f.dataLabels)}else(f=r[p])||void 0===n[p]||(r[p]=f=(new o).init(this,n[p],s[e]));f&&(f.index=u?i+e:p,d[e]=f)}if(this.options.keys=c,r&&(l!==(t=r.length)||u))for(e=0;e<t;e++)e!==h||u||(e+=l),r[e]&&(r[e].destroyElements(),r[e].plotX=void 0);this.data=r,this.points=d,E(this,"afterGeneratePoints")},t.prototype.getXExtremes=function(t){return{min:y(t),max:v(t)}},t.prototype.getExtremes=function(t,e){var i,n=this.xAxis,r=this.yAxis,s=this.processedXData||this.xData,a=[],o=0,l=0,h=0,u=this.requireSorting?this.cropShoulder:0,c=!!r&&r.positiveValuesOnly;for(r=(t=t||this.stackedYData||this.processedYData||[]).length,n&&(l=(h=n.getExtremes()).min,h=h.max),i=0;i<r;i++){var d=s[i],p=t[i],f=(L(p)||P(p))&&(p.length||0<p||!c);if(d=e||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!n||(s[i+u]||d)>=l&&(s[i-u]||d)<=h,f&&d)if(f=p.length)for(;f--;)L(p[f])&&(a[o++]=p[f]);else a[o++]=p}return t={dataMin:y(a),dataMax:v(a)},E(this,"afterGetExtremes",{dataExtremes:t}),t},t.prototype.applyExtremes=function(){var t=this.getExtremes();return this.dataMin=t.dataMin,this.dataMax=t.dataMax,t},t.prototype.getFirstValidPoint=function(t){for(var e=null,i=t.length,n=0;null===e&&n<i;)e=t[n],n++;return e},t.prototype.translate=function(){this.processedXData||this.processData(),this.generatePoints();var t,e,i=this.options,n=i.stacking,r=this.xAxis,s=r.categories,a=this.enabledDataSorting,o=this.yAxis,l=this.points,h=l.length,u=!!this.modifyValue,c=this.pointPlacementToXValue(),d=!!c,p=i.threshold,f=i.startFromThreshold?p:0,g=this.zoneAxis||"y",m=Number.MAX_VALUE;for(t=0;t<h;t++){var v=l[t],y=v.x,_=v.y,S=v.low,w=n&&o.stacking&&o.stacking.stacks[(this.negStacks&&_<(f?0:p)?"-":"")+this.stackKey],k=void 0,C=void 0;if((o.positiveValuesOnly&&!o.validatePositiveValue(_)||r.positiveValuesOnly&&!r.validatePositiveValue(y))&&(v.isNull=!0),v.plotX=e=T(b(r.translate(y,0,0,0,1,c,"flags"===this.type),-1e5,1e5)),n&&this.visible&&w&&w[y]){var A=this.getStackIndicator(A,y,this.index);v.isNull||(C=(k=w[y]).points[A.key])}if(P(C)&&(S=C[0],_=C[1],S===f&&A.key===w[y].base&&(S=R(L(p)&&p,o.min)),o.positiveValuesOnly&&0>=S&&(S=null),v.total=v.stackTotal=k.total,v.percentage=k.total&&v.y/k.total*100,v.stackY=_,this.irregularWidths||k.setOffset(this.pointXOffset||0,this.barW||0)),v.yBottom=x(S)?b(o.translate(S,0,1,0,1),-1e5,1e5):null,u&&(_=this.modifyValue(_,v)),v.plotY=void 0,L(_)&&(void 0!==(_=o.translate(_,!1,!0,!1,!0))&&(v.plotY=b(_,-1e5,1e5))),v.isInside=this.isPointInside(v),v.clientX=d?T(r.translate(y,0,0,0,1,c)):e,v.negative=v[g]<(i[g+"Threshold"]||p||0),v.category=s&&void 0!==s[v.x]?s[v.x]:v.x,!v.isNull&&!1!==v.visible){void 0!==O&&(m=Math.min(m,Math.abs(e-O)));var O=e}v.zone=this.zones.length&&v.getZone(),!v.graphic&&this.group&&a&&(v.isNew=!0)}this.closestPointRangePx=m,E(this,"afterTranslate")},t.prototype.getValidPoints=function(t,e,i){var n=this.chart;return(t||this.points||[]).filter((function(t){return!(e&&!n.isInsidePlot(t.plotX,t.plotY,{inverted:n.inverted}))&&(!1!==t.visible&&(i||!t.isNull))}))},t.prototype.getClipBox=function(t,e){var i=this.options,n=this.chart,r=n.inverted,s=this.xAxis,a=s&&this.yAxis,o=n.options.chart.scrollablePlotArea||{};return t&&!1===i.clip&&a?t=r?{y:-n.chartWidth+a.len+a.pos,height:n.chartWidth,width:n.chartHeight,x:-n.chartHeight+s.len+s.pos}:{y:-a.pos,height:n.chartHeight,width:n.chartWidth,x:-s.pos}:(t=this.clipBox||n.clipBox,e&&(t.width=n.plotSizeX,t.x=(n.scrollablePixelsX||0)*(o.scrollPositionX||0))),e?{width:t.width,x:t.x}:t},t.prototype.getSharedClipKey=function(t){if(this.sharedClipKey)return this.sharedClipKey;var e=[t&&t.duration,t&&t.easing,t&&t.defer,this.getClipBox(t).height,this.options.xAxis,this.options.yAxis].join();return(!1!==this.options.clip||t)&&(this.sharedClipKey=e),e},t.prototype.setClip=function(t){var e=this.chart,i=this.options,n=e.renderer,r=e.inverted,s=this.clipBox,a=this.getClipBox(t),o=this.getSharedClipKey(t),l=e.sharedClips[o],h=e.sharedClips[o+"m"];t&&(a.width=0,r&&(a.x=e.plotHeight+(!1!==i.clip?0:e.plotTop))),l?e.hasLoaded||l.attr(a):(t&&(e.sharedClips[o+"m"]=h=n.clipRect(r?(e.plotSizeX||0)+99:-99,r?-e.plotLeft:-e.plotTop,99,r?e.chartWidth:e.chartHeight)),e.sharedClips[o]=l=n.clipRect(a),l.count={length:0}),t&&!l.count[this.index]&&(l.count[this.index]=!0,l.count.length+=1),(!1!==i.clip||t)&&(this.group.clip(t||s?l:e.clipRect),this.markerGroup.clip(h)),t||(l.count[this.index]&&(delete l.count[this.index],--l.count.length),0===l.count.length&&(s||(e.sharedClips[o]=l.destroy()),h&&(e.sharedClips[o+"m"]=h.destroy())))},t.prototype.animate=function(t){var e=this.chart,i=h(this.options.animation),n=this.sharedClipKey;if(t)this.setClip(i);else if(n){t=e.sharedClips[n],n=e.sharedClips[n+"m"];var r=this.getClipBox(i,!0);t&&t.animate(r,i),n&&n.animate({width:r.width+99,x:r.x-(e.inverted?0:99)},i)}},t.prototype.afterAnimate=function(){this.setClip(),E(this,"afterAnimate"),this.finishedAnimating=!0},t.prototype.drawPoints=function(){var t,e,i=this.points,n=this.chart,r=this.options.marker,s=this[this.specialGroup]||this.markerGroup,a=this.xAxis,o=R(r.enabled,!(a&&!a.isRadial)||null,this.closestPointRangePx>=r.enabledThreshold*r.radius);if(!1!==r.enabled||this._hasPointMarkers)for(t=0;t<i.length;t++){var l=i[t],h=(e=l.graphic)?"animate":"attr",u=l.marker||{},c=!!l.marker;if((o&&void 0===u.enabled||u.enabled)&&!l.isNull&&!1!==l.visible){var d=R(u.symbol,this.symbol),p=this.markerAttribs(l,l.selected&&"select");this.enabledDataSorting&&(l.startXPos=a.reversed?-(p.width||0):a.width);var f=!1!==l.isInside;e?e[f?"show":"hide"](f).animate(p):f&&(0<(p.width||0)||l.hasImage)&&(l.graphic=e=n.renderer.symbol(d,p.x,p.y,p.width,p.height,c?u:r).add(s),this.enabledDataSorting&&n.hasRendered&&(e.attr({x:l.startXPos}),h="animate")),e&&"animate"===h&&e[f?"show":"hide"](f).animate(p),e&&!n.styledMode&&e[h](this.pointAttribs(l,l.selected&&"select")),e&&e.addClass(l.getClassName(),!0)}else e&&(l.graphic=e.destroy())}},t.prototype.markerAttribs=function(t,e){var i=this.options,n=i.marker,r=t.marker||{},s=r.symbol||n.symbol,a=R(r.radius,n.radius);return e&&(n=n.states[e],e=r.states&&r.states[e],a=R(e&&e.radius,n&&n.radius,a+(n&&n.radiusPlus||0))),t.hasImage=s&&0===s.indexOf("url"),t.hasImage&&(a=0),t={x:i.crisp?Math.floor(t.plotX-a):t.plotX-a,y:t.plotY-a},a&&(t.width=t.height=2*a),t},t.prototype.pointAttribs=function(t,e){var i=this.options.marker,n=t&&t.options,r=n&&n.marker||{},s=this.color,a=n&&n.color,o=t&&t.color;n=R(r.lineWidth,i.lineWidth);var l=t&&t.zone&&t.zone.color;return t=1,s=a||l||o||s,a=r.fillColor||i.fillColor||s,s=r.lineColor||i.lineColor||s,e=e||"normal",i=i.states[e],e=r.states&&r.states[e]||{},n=R(e.lineWidth,i.lineWidth,n+R(e.lineWidthPlus,i.lineWidthPlus,0)),a=e.fillColor||i.fillColor||a,{stroke:s=e.lineColor||i.lineColor||s,"stroke-width":n,fill:a,opacity:t=R(e.opacity,i.opacity,t)}},t.prototype.destroy=function(t){var e,i,n,r=this,s=r.chart,a=/AppleWebKit\/533/.test(p.navigator.userAgent),h=r.data||[];for(E(r,"destroy"),this.removeEvents(t),(r.axisTypes||[]).forEach((function(t){(n=r[t])&&n.series&&(S(n.series,r),n.isDirty=n.forceRedraw=!0)})),r.legendItem&&r.chart.legend.destroyItem(r),e=h.length;e--;)(i=h[e])&&i.destroy&&i.destroy();r.clips&&r.clips.forEach((function(t){return t.destroy()})),l.clearTimeout(r.animationTimeout),D(r,(function(t,e){t instanceof o&&!t.survive&&t[a&&"group"===e?"hide":"destroy"]()})),s.hoverSeries===r&&(s.hoverSeries=void 0),S(s.series,r),s.orderSeries(),D(r,(function(e,i){t&&"hcEvents"===i||delete r[i]}))},t.prototype.applyZones=function(){var t,e,i,n,r,s,a,o,l=this,h=this.chart,u=h.renderer,c=this.zones,d=this.clips||[],p=this.graph,f=this.area,g=Math.max(h.chartWidth,h.chartHeight),m=this[(this.zoneAxis||"y")+"Axis"],v=h.inverted,y=!1;if(c.length&&(p||f)&&m&&void 0!==m.min){var _=m.reversed,T=m.horiz;p&&!this.showLine&&p.hide(),f&&f.hide();var x=m.getExtremes();c.forEach((function(c,S){t=_?T?h.plotWidth:0:T?0:m.toPixels(x.min)||0,t=b(R(e,t),0,g),e=b(Math.round(m.toPixels(R(c.value,x.max),!0)||0),0,g),y&&(t=e=m.toPixels(x.max)),n=Math.abs(t-e),r=Math.min(t,e),s=Math.max(t,e),m.isXAxis?(i={x:v?s:r,y:0,width:n,height:g},T||(i.x=h.plotHeight-i.x)):(i={x:0,y:v?s:r,width:g,height:n},T&&(i.y=h.plotWidth-i.y)),v&&u.isVML&&(i=m.isXAxis?{x:0,y:_?r:s,height:i.width,width:h.chartWidth}:{x:i.y-h.plotLeft-h.spacingBox.x,y:0,width:i.height,height:h.chartHeight}),d[S]?d[S].animate(i):d[S]=u.clipRect(i),a=l["zone-area-"+S],o=l["zone-graph-"+S],p&&o&&o.clip(d[S]),f&&a&&a.clip(d[S]),y=c.value>x.max,l.resetZones&&0===e&&(e=void 0)})),this.clips=d}else l.visible&&(p&&p.show(!0),f&&f.show(!0))},t.prototype.invertGroups=function(t){function e(){["group","markerGroup"].forEach((function(e){i[e]&&(n.renderer.isVML&&i[e].attr({width:i.yAxis.len,height:i.xAxis.len}),i[e].width=i.yAxis.len,i[e].height=i.xAxis.len,i[e].invert(!i.isRadialSeries&&t))}))}var i=this,n=i.chart;i.xAxis&&(i.eventsToUnbind.push(m(n,"resize",e)),e(),i.invertGroups=e)},t.prototype.plotGroup=function(t,e,i,n,r){var s=this[t],a=!s;return i={visibility:i,zIndex:n||.1},void 0===this.opacity||this.chart.styledMode||"inactive"===this.state||(i.opacity=this.opacity),a&&(this[t]=s=this.chart.renderer.g().add(r)),s.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(x(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(s.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),s.attr(i)[a?"attr":"animate"](this.getPlotBox()),s},t.prototype.getPlotBox=function(){var t=this.chart,e=this.xAxis,i=this.yAxis;return t.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:t.plotLeft,translateY:i?i.top:t.plotTop,scaleX:1,scaleY:1}},t.prototype.removeEvents=function(t){t||N(this),this.eventsToUnbind.length&&(this.eventsToUnbind.forEach((function(t){t()})),this.eventsToUnbind.length=0)},t.prototype.render=function(){var t=this,e=t.chart,i=t.options,n=h(i.animation),r=!t.finishedAnimating&&e.renderer.isSVG&&n.duration,s=t.visible?"inherit":"hidden",a=i.zIndex,o=t.hasRendered,l=e.seriesGroup,u=e.inverted;E(this,"render");var c=t.plotGroup("group","series",s,a,l);t.markerGroup=t.plotGroup("markerGroup","markers",s,a,l),r&&t.animate&&t.animate(!0),c.inverted=!!R(t.invertible,t.isCartesian)&&u,t.drawGraph&&(t.drawGraph(),t.applyZones()),t.visible&&t.drawPoints(),t.drawDataLabels&&t.drawDataLabels(),t.redrawPoints&&t.redrawPoints(),t.drawTracker&&!1!==t.options.enableMouseTracking&&t.drawTracker(),t.invertGroups(u),!1===i.clip||t.sharedClipKey||o||c.clip(e.clipRect),r&&t.animate&&t.animate(),o||(r&&n.defer&&(r+=n.defer),t.animationTimeout=j((function(){t.afterAnimate()}),r||0)),t.isDirty=!1,t.hasRendered=!0,E(t,"afterRender")},t.prototype.redraw=function(){var t=this.chart,e=this.isDirty||this.isDirtyData,i=this.group,n=this.xAxis,r=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:R(n&&n.left,t.plotLeft),translateY:R(r&&r.top,t.plotTop)})),this.translate(),this.render(),e&&delete this.kdTree},t.prototype.searchPoint=function(t,e){var i=this.xAxis,n=this.yAxis,r=this.chart.inverted;return this.searchKDTree({clientX:r?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:r?n.len-t.chartX+n.pos:t.chartY-n.pos},e,t)},t.prototype.buildKDTree=function(t){this.buildingKdTree=!0;var e=this,i=-1<e.options.findNearestPointBy.indexOf("y")?2:1;delete e.kdTree,j((function(){e.kdTree=function t(i,n,r){var s;if(s=i&&i.length){var a=e.kdAxisArray[n%r];return i.sort((function(t,e){return t[a]-e[a]})),{point:i[s=Math.floor(s/2)],left:t(i.slice(0,s),n+1,r),right:t(i.slice(s+1),n+1,r)}}}(e.getValidPoints(null,!e.directTouch),i,i),e.buildingKdTree=!1}),e.options.kdNow||t&&"touchstart"===t.type?0:1)},t.prototype.searchKDTree=function(t,e,i){var n=this,r=this.kdAxisArray[0],s=this.kdAxisArray[1],a=e?"distX":"dist";if(e=-1<n.options.findNearestPointBy.indexOf("y")?2:1,this.kdTree||this.buildingKdTree||this.buildKDTree(i),this.kdTree)return function t(e,i,o,l){var h=i.point,u=n.kdAxisArray[o%l],c=h,d=x(e[r])&&x(h[r])?Math.pow(e[r]-h[r],2):null,p=x(e[s])&&x(h[s])?Math.pow(e[s]-h[s],2):null;return p=(d||0)+(p||0),h.dist=x(p)?Math.sqrt(p):Number.MAX_VALUE,h.distX=x(d)?Math.sqrt(d):Number.MAX_VALUE,d=0>(u=e[u]-h[u])?"right":"left",i[p=0>u?"left":"right"]&&(c=(p=t(e,i[p],o+1,l))[a]<c[a]?p:h),i[d]&&Math.sqrt(u*u)<c[a]&&(c=(e=t(e,i[d],o+1,l))[a]<c[a]?e:c),c}(t,this.kdTree,e,e)},t.prototype.pointPlacementToXValue=function(){var t=this.options,e=t.pointRange,i=this.xAxis;return"between"===(t=t.pointPlacement)&&(t=i.reversed?-.5:.5),L(t)?t*(e||i.pointRange):0},t.prototype.isPointInside=function(t){return void 0!==t.plotY&&void 0!==t.plotX&&0<=t.plotY&&t.plotY<=this.yAxis.len&&0<=t.plotX&&t.plotX<=this.xAxis.len},t.prototype.drawTracker=function(){var t=this,e=t.options,i=e.trackByArea,n=[].concat(i?t.areaPath:t.graphPath),r=t.chart,s=r.pointer,a=r.renderer,o=r.options.tooltip.snap,l=t.tracker,h=function(e){r.hoverSeries!==t&&t.onMouseOver()},u="rgba(192,192,192,"+(d?1e-4:.002)+")";l?l.attr({d:n}):t.graph&&(t.tracker=a.path(n).attr({visibility:t.visible?"visible":"hidden",zIndex:2}).addClass(i?"highcharts-tracker-area":"highcharts-tracker-line").add(t.group),r.styledMode||t.tracker.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:u,fill:i?u:"none","stroke-width":t.graph.strokeWidth()+(i?0:2*o)}),[t.tracker,t.markerGroup,t.dataLabelsGroup].forEach((function(t){t&&(t.addClass("highcharts-tracker").on("mouseover",h).on("mouseout",(function(t){s.onTrackerMouseOut(t)})),e.cursor&&!r.styledMode&&t.css({cursor:e.cursor}),c)&&t.on("touchstart",h)}))),E(this,"afterDrawTracker")},t.prototype.addPoint=function(t,e,i,n,r){var s=this.options,a=this.data,o=this.chart,l=this.xAxis;l=l&&l.hasNames&&l.names;var h,u=s.data,c=this.xData;e=R(e,!0);var d={series:this};this.pointClass.prototype.applyOptions.apply(d,[t]);var p=d.x,f=c.length;if(this.requireSorting&&p<c[f-1])for(h=!0;f&&c[f-1]>p;)f--;this.updateParallelArrays(d,"splice",f,0,0),this.updateParallelArrays(d,f),l&&d.name&&(l[p]=d.name),u.splice(f,0,t),h&&(this.data.splice(f,0,null),this.processData()),"point"===s.legendType&&this.generatePoints(),i&&(a[0]&&a[0].remove?a[0].remove(!1):(a.shift(),this.updateParallelArrays(d,"shift"),u.shift())),!1!==r&&E(this,"addPoint",{point:d}),this.isDirtyData=this.isDirty=!0,e&&o.redraw(n)},t.prototype.removePoint=function(t,e,i){var n=this,r=n.data,s=r[t],a=n.points,o=n.chart,l=function(){a&&a.length===r.length&&a.splice(t,1),r.splice(t,1),n.options.data.splice(t,1),n.updateParallelArrays(s||{series:n},"splice",t,1),s&&s.destroy(),n.isDirty=!0,n.isDirtyData=!0,e&&o.redraw()};u(i,o),e=R(e,!0),s?s.firePointEvent("remove",null,l):l()},t.prototype.remove=function(t,e,i,n){function r(){s.destroy(n),a.isDirtyLegend=a.isDirtyBox=!0,a.linkSeries(),R(t,!0)&&a.redraw(e)}var s=this,a=s.chart;!1!==i?E(s,"remove",null,r):r()},t.prototype.update=function(t,e){t=_(t,this.userOptions),E(this,"update",{options:t});var i,n=this,r=n.chart,s=n.userOptions,a=n.initialType||n.type,o=r.options.plotOptions,l=t.type||s.type||r.options.chart.type,h=!(this.hasDerivedData||l&&l!==this.type||void 0!==t.pointStart||void 0!==t.pointInterval||n.hasOptionChanged("dataGrouping")||n.hasOptionChanged("pointStart")||n.hasOptionChanged("pointInterval")||n.hasOptionChanged("pointIntervalUnit")||n.hasOptionChanged("keys")),u=g[a].prototype,c=["eventOptions","navigatorSeries","baseSeries"],d=n.finishedAnimating&&{animation:!1},p={};if(l=l||a,h&&(c.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","_hasPointLabels","clips","nodes","layout","mapMap","mapData","minY","maxY","minX","maxX"),!1!==t.visible&&c.push("area","graph"),n.parallelArrays.forEach((function(t){c.push(t+"Data")})),t.data&&(t.dataSorting&&k(n.options.dataSorting,t.dataSorting),this.setData(t.data,!1))),t=I(s,d,{index:void 0===s.index?n.index:s.index,pointStart:R(o&&o.series&&o.series.pointStart,s.pointStart,n.xData[0])},!h&&{data:n.options.data},t),h&&t.data&&(t.data=n.options.data),(c=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(c)).forEach((function(t){c[t]=n[t],delete n[t]})),s=!1,g[l]){if(s=l!==n.type,n.remove(!1,!1,!1,!0),s)if(Object.setPrototypeOf)Object.setPrototypeOf(n,g[l].prototype);else{for(i in o=Object.hasOwnProperty.call(n,"hcEvents")&&n.hcEvents,u)n[i]=void 0;k(n,g[l].prototype),o?n.hcEvents=o:delete n.hcEvents}}else w(17,!0,r,{missingModuleFor:l});if(c.forEach((function(t){n[t]=c[t]})),n.init(r,t),h&&this.points){var f=n.options;!1===f.visible?(p.graphic=1,p.dataLabel=1):n._hasPointLabels||(t=f.marker,l=f.dataLabels,t&&(!1===t.enabled||"symbol"in t)&&(p.graphic=1),l&&!1===l.enabled&&(p.dataLabel=1)),this.points.forEach((function(t){t&&t.series&&(t.resolveColor(),Object.keys(p).length&&t.destroyElements(p),!1===f.showInLegend&&t.legendItem&&r.legend.destroyItem(t))}),this)}n.initialType=a,r.linkSeries(),s&&n.linkedSeries.length&&(n.isDirtyData=!0),E(this,"afterUpdate"),R(e,!0)&&r.redraw(!!h&&void 0)},t.prototype.setName=function(t){this.name=this.options.name=this.userOptions.name=t,this.chart.isDirtyLegend=!0},t.prototype.hasOptionChanged=function(t){var e=this.options[t],i=this.chart.options.plotOptions,n=this.userOptions[t];return n?e!==n:e!==R(i&&i[this.type]&&i[this.type][t],i&&i.series&&i.series[t],e)},t.prototype.onMouseOver=function(){var t=this.chart,e=t.hoverSeries;t.pointer.setHoverChartIndex(),e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&E(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},t.prototype.onMouseOut=function(){var t=this.options,e=this.chart,i=e.tooltip,n=e.hoverPoint;e.hoverSeries=null,n&&n.onMouseOut(),this&&t.events.mouseOut&&E(this,"mouseOut"),!i||this.stickyTracking||i.shared&&!this.noSharedTooltip||i.hide(),e.series.forEach((function(t){t.setState("",!0)}))},t.prototype.setState=function(t,e){var i=this,n=i.options,r=i.graph,s=n.inactiveOtherPoints,a=n.states,o=n.lineWidth,l=n.opacity,h=R(a[t||"normal"]&&a[t||"normal"].animation,i.chart.options.chart.animation);if(n=0,t=t||"",i.state!==t&&([i.group,i.markerGroup,i.dataLabelsGroup].forEach((function(e){e&&(i.state&&e.removeClass("highcharts-series-"+i.state),t&&e.addClass("highcharts-series-"+t))})),i.state=t,!i.chart.styledMode)){if(a[t]&&!1===a[t].enabled)return;if(t&&(o=a[t].lineWidth||o+(a[t].lineWidthPlus||0),l=R(a[t].opacity,l)),r&&!r.dashstyle)for(a={"stroke-width":o},r.animate(a,h);i["zone-graph-"+n];)i["zone-graph-"+n].animate(a,h),n+=1;s||[i.group,i.markerGroup,i.dataLabelsGroup,i.labelBySeries].forEach((function(t){t&&t.animate({opacity:l},h)}))}e&&s&&i.points&&i.setAllPointsToState(t||void 0)},t.prototype.setAllPointsToState=function(t){this.points.forEach((function(e){e.setState&&e.setState(t)}))},t.prototype.setVisible=function(t,e){var i=this,n=i.chart,r=i.legendItem,s=n.options.chart.ignoreHiddenSeries,a=i.visible,o=(i.visible=t=i.options.visible=i.userOptions.visible=void 0===t?!a:t)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach((function(t){i[t]&&i[t][o]()})),n.hoverSeries!==i&&(n.hoverPoint&&n.hoverPoint.series)!==i||i.onMouseOut(),r&&n.legend.colorizeItem(i,t),i.isDirty=!0,i.options.stacking&&n.series.forEach((function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)})),i.linkedSeries.forEach((function(e){e.setVisible(t,!1)})),s&&(n.isDirtyBox=!0),E(i,o),!1!==e&&n.redraw()},t.prototype.show=function(){this.setVisible(!0)},t.prototype.hide=function(){this.setVisible(!1)},t.prototype.select=function(t){this.selected=t=this.options.selected=void 0===t?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),E(this,t?"select":"unselect")},t.prototype.shouldShowTooltip=function(t,e,i){return void 0===i&&(i={}),i.series=this,i.visiblePlotOnly=!0,this.chart.isInsidePlot(t,e,i)},t.defaultOptions={lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{enabledThreshold:2,lineColor:r.backgroundColor,lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:r.neutralColor20,lineColor:r.neutralColor100,lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",defer:!0,formatter:function(){var t=this.series.chart.numberFormatter;return"number"!=typeof this.y?"":t(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"},t}(),k(t.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,drawLegendSymbol:i.drawLineMarker,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:s,requireSorting:!0,sorted:!0}),a.series=t,t})),e(i,"Extensions/ScrollablePlotArea.js",[i["Core/Animation/AnimationUtilities.js"],i["Core/Axis/Axis.js"],i["Core/Chart/Chart.js"],i["Core/Series/Series.js"],i["Core/Globals.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r,s){var a=t.stop,o=s.addEvent,l=s.createElement,h=s.merge,u=s.pick;o(i,"afterSetChartSize",(function(t){var e=this.options.chart.scrollablePlotArea,i=e&&e.minWidth;if(e=e&&e.minHeight,!this.renderer.forExport){if(i){if(this.scrollablePixelsX=i=Math.max(0,i-this.chartWidth)){this.scrollablePlotBox=this.renderer.scrollablePlotBox=h(this.plotBox),this.plotBox.width=this.plotWidth+=i,this.inverted?this.clipBox.height+=i:this.clipBox.width+=i;var n={1:{name:"right",value:i}}}}else e&&(this.scrollablePixelsY=i=Math.max(0,e-this.chartHeight))&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=h(this.plotBox),this.plotBox.height=this.plotHeight+=i,this.inverted?this.clipBox.width+=i:this.clipBox.height+=i,n={2:{name:"bottom",value:i}});n&&!t.skipAxes&&this.axes.forEach((function(t){n[t.side]?t.getPlotLinePath=function(){var e=n[t.side].name,i=this[e];this[e]=i-n[t.side].value;var s=r.Axis.prototype.getPlotLinePath.apply(this,arguments);return this[e]=i,s}:(t.setAxisSize(),t.setAxisTranslation())}))}})),o(i,"render",(function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()})),i.prototype.setUpScrolling=function(){var t=this,e={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(e.overflowX="auto"),this.scrollablePixelsY&&(e.overflowY="auto"),this.scrollingParent=l("div",{className:"highcharts-scrolling-parent"},{position:"relative"},this.renderTo),this.scrollingContainer=l("div",{className:"highcharts-scrolling"},e,this.scrollingParent),o(this.scrollingContainer,"scroll",(function(){t.pointer&&delete t.pointer.chartPosition})),this.innerContainer=l("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},i.prototype.moveFixedElements=function(){var t,e=this.container,i=this.fixedRenderer,n=".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" ");this.scrollablePixelsX&&!this.inverted?t=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted||this.scrollablePixelsY&&!this.inverted?t=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(t=".highcharts-yaxis"),t&&n.push(t+":not(.highcharts-radial-axis)",t+"-labels:not(.highcharts-radial-axis-labels)"),n.forEach((function(t){[].forEach.call(e.querySelectorAll(t),(function(t){(t.namespaceURI===i.SVG_NS?i.box:i.box.parentNode).appendChild(t),t.style.pointerEvents="auto"}))}))},i.prototype.applyFixed=function(){var t=!this.fixedDiv,e=this.options.chart,i=e.scrollablePlotArea;t?(this.fixedDiv=l("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(e.style&&e.style.zIndex||0)+2,top:0},null,!0),this.scrollingContainer&&this.scrollingContainer.parentNode.insertBefore(this.fixedDiv,this.scrollingContainer),this.renderTo.style.overflow="visible",this.fixedRenderer=e=new r.Renderer(this.fixedDiv,this.chartWidth,this.chartHeight,this.options.chart.style),this.scrollableMask=e.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":u(i.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),o(this,"afterShowResetZoom",this.moveFixedElements),o(this,"afterDrilldown",this.moveFixedElements),o(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),(this.scrollableDirty||t)&&(this.scrollableDirty=!1,this.moveFixedElements()),e=this.chartWidth+(this.scrollablePixelsX||0);var n=this.chartHeight+(this.scrollablePixelsY||0);a(this.container),this.container.style.width=e+"px",this.container.style.height=n+"px",this.renderer.boxWrapper.attr({width:e,height:n,viewBox:[0,0,e,n].join(" ")}),this.chartBackground.attr({width:e,height:n}),this.scrollingContainer.style.height=this.chartHeight+"px",t&&(i.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*i.scrollPositionX),i.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*i.scrollPositionY)),n=this.axisOffset,t=this.plotTop-n[0]-1,i=this.plotLeft-n[3]-1,e=this.plotTop+this.plotHeight+n[2]+1,n=this.plotLeft+this.plotWidth+n[1]+1;var s=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),h=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);t=this.scrollablePixelsX?[["M",0,t],["L",this.plotLeft-1,t],["L",this.plotLeft-1,e],["L",0,e],["Z"],["M",s,t],["L",this.chartWidth,t],["L",this.chartWidth,e],["L",s,e],["Z"]]:this.scrollablePixelsY?[["M",i,0],["L",i,this.plotTop-1],["L",n,this.plotTop-1],["L",n,0],["Z"],["M",i,h],["L",i,this.chartHeight],["L",n,this.chartHeight],["L",n,h],["Z"]]:[["M",0,0]],"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:t})},o(e,"afterInit",(function(){this.chart.scrollableDirty=!0})),o(n,"show",(function(){this.chart.scrollableDirty=!0}))})),e(i,"Core/Axis/StackingAxis.js",[i["Core/Animation/AnimationUtilities.js"],i["Core/Utilities.js"]],(function(t,e){var i=t.getDeferredAnimation,n=e.addEvent,r=e.destroyObjectProperties,s=e.fireEvent,a=e.isNumber,o=e.objectEach,l=function(){function t(t){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=t}return t.prototype.buildStacks=function(){var t,e=this.axis,i=e.series,n=e.options.reversedStacks,r=i.length;if(!e.isXAxis){for(this.usePercentage=!1,t=r;t--;){var a=i[n?t:r-t-1];a.setStackedPoints(),a.setGroupedPoints()}for(t=0;t<r;t++)i[t].modifyStacks();s(e,"afterBuildStacks")}},t.prototype.cleanStacks=function(){if(!this.axis.isXAxis){if(this.oldStacks)var t=this.stacks=this.oldStacks;o(t,(function(t){o(t,(function(t){t.cumulative=t.total}))}))}},t.prototype.resetStacks=function(){var t=this,e=this.stacks;this.axis.isXAxis||o(e,(function(e){o(e,(function(i,n){a(i.touched)&&i.touched<t.stacksTouched?(i.destroy(),delete e[n]):(i.total=null,i.cumulative=null)}))}))},t.prototype.renderStackTotals=function(){var t=this.axis,e=t.chart,n=e.renderer,r=this.stacks;t=i(e,t.options.stackLabels&&t.options.stackLabels.animation||!1);var s=this.stackTotalGroup=this.stackTotalGroup||n.g("stack-labels").attr({visibility:"visible",zIndex:6,opacity:0}).add();s.translate(e.plotLeft,e.plotTop),o(r,(function(t){o(t,(function(t){t.render(s)}))})),s.animate({opacity:1},t)},t}();return function(){function t(){}return t.compose=function(e){n(e,"init",t.onInit),n(e,"destroy",t.onDestroy)},t.onDestroy=function(){var t=this.stacking;if(t){var e=t.stacks;o(e,(function(t,i){r(t),e[i]=null})),t&&t.stackTotalGroup&&t.stackTotalGroup.destroy()}},t.onInit=function(){this.stacking||(this.stacking=new l(this))},t}()})),e(i,"Extensions/Stacking.js",[i["Core/Axis/Axis.js"],i["Core/Chart/Chart.js"],i["Core/FormatUtilities.js"],i["Core/Globals.js"],i["Core/Series/Series.js"],i["Core/Axis/StackingAxis.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r,s,a){var o=i.format,l=a.correctFloat,h=a.defined,u=a.destroyObjectProperties,c=a.isArray,d=a.isNumber,p=a.objectEach,f=a.pick,g=function(){function t(t,e,i,n,r){var s=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e=e||{},this.x=n,this.total=null,this.points={},this.hasValidPoints=!1,this.stack=r,this.rightCliff=this.leftCliff=0,this.alignOptions={align:e.align||(s?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(s?"middle":i?"bottom":"top"),y:e.y,x:e.x},this.textAlign=e.textAlign||(s?i?"right":"left":"center")}return t.prototype.destroy=function(){u(this,this.axis)},t.prototype.render=function(t){var e=this.axis.chart,i=this.options,n=i.format;n=n?o(n,this,e):i.formatter.call(this),this.label?this.label.attr({text:n,visibility:"hidden"}):(this.label=e.renderer.label(n,null,null,i.shape,null,null,i.useHTML,!1,"stack-labels"),n={r:i.borderRadius||0,text:n,rotation:i.rotation,padding:f(i.padding,5),visibility:"hidden"},e.styledMode||(n.fill=i.backgroundColor,n.stroke=i.borderColor,n["stroke-width"]=i.borderWidth,this.label.css(i.style)),this.label.attr(n),this.label.added||this.label.add(t)),this.label.labelrank=e.plotSizeY},t.prototype.setOffset=function(t,e,i,n,s){var a=this.axis,o=a.chart;n=a.translate(a.stacking.usePercentage?100:n||this.total,0,0,0,1),i=a.translate(i||0),i=h(n)&&Math.abs(n-i),t=f(s,o.xAxis[0].translate(this.x))+t,a=h(n)&&this.getStackBox(o,this,t,n,e,i,a),e=this.label,i=this.isNegative,t="justify"===f(this.options.overflow,"justify");var l=this.textAlign;e&&a&&(s=e.getBBox(),n=e.padding,l="left"===l?o.inverted?-n:n:"right"===l?s.width:o.inverted&&"center"===l?s.width/2:o.inverted?i?s.width+n:-n:s.width/2,i=o.inverted?s.height/2:i?-n:s.height,this.alignOptions.x=f(this.options.x,0),this.alignOptions.y=f(this.options.y,0),a.x-=l,a.y-=i,e.align(this.alignOptions,null,a),o.isInsidePlot(e.alignAttr.x+l-this.alignOptions.x,e.alignAttr.y+i-this.alignOptions.y)?e.show():(e.alignAttr.y=-9999,t=!1),t&&r.prototype.justifyDataLabel.call(this.axis,e,this.alignOptions,e.alignAttr,s,a),e.attr({x:e.alignAttr.x,y:e.alignAttr.y}),f(!t&&this.options.crop,!0)&&((o=d(e.x)&&d(e.y)&&o.isInsidePlot(e.x-n+e.width,e.y)&&o.isInsidePlot(e.x+n,e.y))||e.hide()))},t.prototype.getStackBox=function(t,e,i,n,r,s,a){var o=e.axis.reversed,l=t.inverted,h=a.height+a.pos-(l?t.plotLeft:t.plotTop);return e=e.isNegative&&!o||!e.isNegative&&o,{x:l?e?n-a.right:n-s+a.pos-t.plotLeft:i+t.xAxis[0].transB-t.plotLeft,y:l?a.height-i-r:e?h-n-s:h-n,width:l?s:r,height:l?r:s}},t}();return e.prototype.getStacks=function(){var t=this,e=t.inverted;t.yAxis.forEach((function(t){t.stacking&&t.stacking.stacks&&t.hasVisibleSeries&&(t.stacking.oldStacks=t.stacking.stacks)})),t.series.forEach((function(i){var n=i.xAxis&&i.xAxis.options||{};!i.options.stacking||!0!==i.visible&&!1!==t.options.chart.ignoreHiddenSeries||(i.stackKey=[i.type,f(i.options.stack,""),e?n.top:n.left,e?n.height:n.width].join())}))},s.compose(t),r.prototype.setGroupedPoints=function(){var t=this.yAxis.stacking;this.options.centerInCategory&&(this.is("column")||this.is("columnrange"))&&!this.options.stacking&&1<this.chart.series.length?r.prototype.setStackedPoints.call(this,"group"):t&&p(t.stacks,(function(e,i){"group"===i.slice(-5)&&(p(e,(function(t){return t.destroy()})),delete t.stacks[i])}))},r.prototype.setStackedPoints=function(t){var e=t||this.options.stacking;if(e&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var i=this.processedXData,n=this.processedYData,r=[],s=n.length,a=this.options,o=a.threshold,u=f(a.startFromThreshold&&o,0);a=a.stack;var d,p,m="-"+(t=t?this.type+","+e:this.stackKey),v=this.negStacks,y=this.yAxis,b=y.stacking.stacks,_=y.stacking.oldStacks;for(y.stacking.stacksTouched+=1,p=0;p<s;p++){var T=i[p],x=n[p],S=this.getStackIndicator(S,T,this.index),w=S.key,k=(d=v&&x<(u?0:o))?m:t;b[k]||(b[k]={}),b[k][T]||(_[k]&&_[k][T]?(b[k][T]=_[k][T],b[k][T].total=null):b[k][T]=new g(y,y.options.stackLabels,d,T,a)),k=b[k][T],null!==x?(k.points[w]=k.points[this.index]=[f(k.cumulative,u)],h(k.cumulative)||(k.base=w),k.touched=y.stacking.stacksTouched,0<S.index&&!1===this.singleStacks&&(k.points[w][0]=k.points[this.index+","+T+",0"][0])):k.points[w]=k.points[this.index]=null,"percent"===e?(d=d?t:m,v&&b[d]&&b[d][T]?(d=b[d][T],k.total=d.total=Math.max(d.total,k.total)+Math.abs(x)||0):k.total=l(k.total+(Math.abs(x)||0))):"group"===e?(c(x)&&(x=x[0]),null!==x&&(k.total=(k.total||0)+1)):k.total=l(k.total+(x||0)),k.cumulative="group"===e?(k.total||1)-1:f(k.cumulative,u)+(x||0),null!==x&&(k.points[w].push(k.cumulative),r[p]=k.cumulative,k.hasValidPoints=!0)}"percent"===e&&(y.stacking.usePercentage=!0),"group"!==e&&(this.stackedYData=r),y.stacking.oldStacks={}}},r.prototype.modifyStacks=function(){var t,e=this,i=e.stackKey,n=e.yAxis.stacking.stacks,r=e.processedXData,s=e.options.stacking;e[s+"Stacker"]&&[i,"-"+i].forEach((function(i){for(var a,o,l=r.length;l--;)a=r[l],t=e.getStackIndicator(t,a,e.index,i),(o=(a=n[i]&&n[i][a])&&a.points[t.key])&&e[s+"Stacker"](o,a,l)}))},r.prototype.percentStacker=function(t,e,i){e=e.total?100/e.total:0,t[0]=l(t[0]*e),t[1]=l(t[1]*e),this.stackedYData[i]=t[1]},r.prototype.getStackIndicator=function(t,e,i,n){return!h(t)||t.x!==e||n&&t.key!==n?t={x:e,index:0,key:n}:t.index++,t.key=[i,e,t.index].join(),t},n.StackItem=g,n.StackItem})),e(i,"Series/Line/LineSeries.js",[i["Core/Color/Palette.js"],i["Core/Series/Series.js"],i["Core/Series/SeriesRegistry.js"],i["Core/Utilities.js"]],(function(t,e,i,n){var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),s=n.defined,a=n.merge;return n=function(i){function n(){var t=null!==i&&i.apply(this,arguments)||this;return t.data=void 0,t.options=void 0,t.points=void 0,t}return r(n,i),n.prototype.drawGraph=function(){var e=this,i=this.options,n=(this.gappedPath||this.getGraphPath).call(this),r=this.chart.styledMode,s=[["graph","highcharts-graph"]];r||s[0].push(i.lineColor||this.color||t.neutralColor20,i.dashStyle),(s=e.getZonesGraphs(s)).forEach((function(t,s){var a=t[0],o=e[a],l=o?"animate":"attr";o?(o.endX=e.preventGraphAnimation?null:n.xMap,o.animate({d:n})):n.length&&(e[a]=o=e.chart.renderer.path(n).addClass(t[1]).attr({zIndex:1}).add(e.group)),o&&!r&&(a={stroke:t[2],"stroke-width":i.lineWidth,fill:e.fillGraph&&e.color||"none"},t[3]?a.dashstyle=t[3]:"square"!==i.linecap&&(a["stroke-linecap"]=a["stroke-linejoin"]="round"),o[l](a).shadow(2>s&&i.shadow)),o&&(o.startX=n.xMap,o.isArea=n.isArea)}))},n.prototype.getGraphPath=function(t,e,i){var n,r,a=this,o=a.options,l=o.step,h=[],u=[];return(n=(t=t||a.points).reversed)&&t.reverse(),(l={right:1,center:2}[l]||l&&3)&&n&&(l=4-l),(t=this.getValidPoints(t,!1,!(o.connectNulls&&!e&&!i))).forEach((function(n,c){var d=n.plotX,p=n.plotY,f=t[c-1];(n.leftCliff||f&&f.rightCliff)&&!i&&(r=!0),n.isNull&&!s(e)&&0<c?r=!o.connectNulls:n.isNull&&!e?r=!0:(0===c||r?c=[["M",n.plotX,n.plotY]]:a.getPointSpline?c=[a.getPointSpline(t,n,c)]:l?(c=1===l?[["L",f.plotX,p]]:2===l?[["L",(f.plotX+d)/2,f.plotY],["L",(f.plotX+d)/2,p]]:[["L",d,f.plotY]]).push(["L",d,p]):c=[["L",d,p]],u.push(n.x),l&&(u.push(n.x),2===l&&u.push(n.x)),h.push.apply(h,c),r=!1)})),h.xMap=u,a.graphPath=h},n.prototype.getZonesGraphs=function(t){return this.zones.forEach((function(e,i){i=["zone-graph-"+i,"highcharts-graph highcharts-zone-graph-"+i+" "+(e.className||"")],this.chart.styledMode||i.push(e.color||this.color,e.dashStyle||this.options.dashStyle),t.push(i)}),this),t},n.defaultOptions=a(e.defaultOptions,{}),n}(e),i.registerSeriesType("line",n),n})),e(i,"Series/Area/AreaSeries.js",[i["Core/Color/Color.js"],i["Mixins/LegendSymbol.js"],i["Core/Series/SeriesRegistry.js"],i["Core/Utilities.js"]],(function(t,e,i,n){var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),s=t.parse,a=i.seriesTypes.line;t=n.extend;var o=n.merge,l=n.objectEach,h=n.pick;return n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e}return r(e,t),e.prototype.drawGraph=function(){this.areaPath=[],t.prototype.drawGraph.apply(this);var e=this,i=this.areaPath,n=this.options,r=[["area","highcharts-area",this.color,n.fillColor]];this.zones.forEach((function(t,i){r.push(["zone-area-"+i,"highcharts-area highcharts-zone-area-"+i+" "+t.className,t.color||e.color,t.fillColor||n.fillColor])})),r.forEach((function(t){var r=t[0],a=e[r],o=a?"animate":"attr",l={};a?(a.endX=e.preventGraphAnimation?null:i.xMap,a.animate({d:i})):(l.zIndex=0,(a=e[r]=e.chart.renderer.path(i).addClass(t[1]).add(e.group)).isArea=!0),e.chart.styledMode||(l.fill=h(t[3],s(t[2]).setOpacity(h(n.fillOpacity,.75)).get())),a[o](l),a.startX=i.xMap,a.shiftUnit=n.step?2:1}))},e.prototype.getGraphPath=function(t){var e,i=a.prototype.getGraphPath,n=this.options,r=n.stacking,s=this.yAxis,o=[],l=[],u=this.index,c=s.stacking.stacks[this.stackKey],d=n.threshold,p=Math.round(s.getThreshold(n.threshold));n=h(n.connectNulls,"percent"===r);var f=function(e,i,n){var a=t[e];e=r&&c[a.x].points[u];var h=a[n+"Null"]||0;if(n=a[n+"Cliff"]||0,a=!0,n||h){var f=(h?e[0]:e[1])+n,g=e[0]+n;a=!!h}else!r&&t[i]&&t[i].isNull&&(f=g=d);void 0!==f&&(l.push({plotX:m,plotY:null===f?p:s.getThreshold(f),isNull:a,isCliff:!0}),o.push({plotX:m,plotY:null===g?p:s.getThreshold(g),doCurve:!1}))};for(t=t||this.points,r&&(t=this.getStackPoints(t)),e=0;e<t.length;e++){r||(t[e].leftCliff=t[e].rightCliff=t[e].leftNull=t[e].rightNull=void 0);var g=t[e].isNull,m=h(t[e].rectPlotX,t[e].plotX),v=r?h(t[e].yBottom,p):p;g&&!n||(n||f(e,e-1,"left"),g&&!r&&n||(l.push(t[e]),o.push({x:e,plotX:m,plotY:v})),n||f(e,e+1,"right"))}return e=i.call(this,l,!0,!0),o.reversed=!0,(v=(g=i.call(this,o,!0,!0))[0])&&"M"===v[0]&&(g[0]=["L",v[1],v[2]]),(g=e.concat(g)).length&&g.push(["Z"]),i=i.call(this,l,!1,n),g.xMap=e.xMap,this.areaPath=g,i},e.prototype.getStackPoints=function(t){var e=this,i=[],n=[],r=this.xAxis,s=this.yAxis,a=s.stacking.stacks[this.stackKey],o={},u=s.series,c=u.length,d=s.options.reversedStacks?1:-1,p=u.indexOf(e);if(t=t||this.points,this.options.stacking){for(var f=0;f<t.length;f++)t[f].leftNull=t[f].rightNull=void 0,o[t[f].x]=t[f];l(a,(function(t,e){null!==t.total&&n.push(e)})),n.sort((function(t,e){return t-e}));var g=u.map((function(t){return t.visible}));n.forEach((function(t,l){var f,m,v=0;if(o[t]&&!o[t].isNull)i.push(o[t]),[-1,1].forEach((function(i){var r=1===i?"rightNull":"leftNull",s=0,h=a[n[l+i]];if(h)for(var v=p;0<=v&&v<c;){var y=u[v].index;(f=h.points[y])||(y===e.index?o[t][r]=!0:g[v]&&(m=a[t].points[y])&&(s-=m[1]-m[0])),v+=d}o[t][1===i?"rightCliff":"leftCliff"]=s}));else{for(var y=p;0<=y&&y<c;){if(f=a[t].points[u[y].index]){v=f[1];break}y+=d}v=h(v,0),v=s.translate(v,0,1,0,1),i.push({isNull:!0,plotX:r.translate(t,0,0,0,1),x:t,plotY:v,yBottom:v})}}))}return i},e.defaultOptions=o(a.defaultOptions,{threshold:0}),e}(a),t(n.prototype,{singleStacks:!1,drawLegendSymbol:e.drawRectangle}),i.registerSeriesType("area",n),n})),e(i,"Series/Spline/SplineSeries.js",[i["Core/Series/SeriesRegistry.js"],i["Core/Utilities.js"]],(function(t,e){var i=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),n=t.seriesTypes.line,r=e.merge,s=e.pick;return e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e}return i(e,t),e.prototype.getPointSpline=function(t,e,i){var n=e.plotX||0,r=e.plotY||0,a=t[i-1];if(i=t[i+1],a&&!a.isNull&&!1!==a.doCurve&&!e.isCliff&&i&&!i.isNull&&!1!==i.doCurve&&!e.isCliff){t=a.plotY||0;var o=i.plotX||0;i=i.plotY||0;var l=0,h=(1.5*n+(a.plotX||0))/2.5,u=(1.5*r+t)/2.5,c=(1.5*r+i)/2.5;(o=(1.5*n+o)/2.5)!==h&&(l=(c-u)*(o-n)/(o-h)+r-c),c+=l,(u+=l)>t&&u>r?c=2*r-(u=Math.max(t,r)):u<t&&u<r&&(c=2*r-(u=Math.min(t,r))),c>i&&c>r?u=2*r-(c=Math.max(i,r)):c<i&&c<r&&(u=2*r-(c=Math.min(i,r))),e.rightContX=o,e.rightContY=c}return e=["C",s(a.rightContX,a.plotX,0),s(a.rightContY,a.plotY,0),s(h,n,0),s(u,r,0),n,r],a.rightContX=a.rightContY=void 0,e},e.defaultOptions=r(n.defaultOptions),e}(n),t.registerSeriesType("spline",e),e})),e(i,"Series/AreaSpline/AreaSplineSeries.js",[i["Series/Area/AreaSeries.js"],i["Series/Spline/SplineSeries.js"],i["Mixins/LegendSymbol.js"],i["Core/Series/SeriesRegistry.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r){var s=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=t.prototype,o=r.extend,l=r.merge;return o((r=function(i){function n(){var t=null!==i&&i.apply(this,arguments)||this;return t.data=void 0,t.points=void 0,t.options=void 0,t}return s(n,i),n.defaultOptions=l(e.defaultOptions,t.defaultOptions),n}(e)).prototype,{getGraphPath:a.getGraphPath,getStackPoints:a.getStackPoints,drawGraph:a.drawGraph,drawLegendSymbol:i.drawRectangle}),n.registerSeriesType("areaspline",r),r})),e(i,"Series/Column/ColumnSeries.js",[i["Core/Animation/AnimationUtilities.js"],i["Core/Color/Color.js"],i["Core/Globals.js"],i["Mixins/LegendSymbol.js"],i["Core/Color/Palette.js"],i["Core/Series/Series.js"],i["Core/Series/SeriesRegistry.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r,s,a,o){var l,h=this&&this.__extends||(l=function(t,e){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),u=t.animObject,c=e.parse,d=i.hasTouch;t=i.noop;var p=o.clamp,f=o.css,g=o.defined,m=o.extend,v=o.fireEvent,y=o.isArray,b=o.isNumber,_=o.merge,T=o.pick,x=o.objectEach;return o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.borderWidth=void 0,e.data=void 0,e.group=void 0,e.options=void 0,e.points=void 0,e}return h(e,t),e.prototype.animate=function(t){var e=this,i=this.yAxis,n=e.options,r=this.chart.inverted,s={},a=r?"translateX":"translateY";if(t)s.scaleY=.001,t=p(i.toPixels(n.threshold),i.pos,i.pos+i.len),r?s.translateX=t-i.len:s.translateY=t,e.clipBox&&e.setClip(),e.group.attr(s);else{var o=Number(e.group.attr(a));e.group.animate({scaleY:1},m(u(e.options.animation),{step:function(t,n){e.group&&(s[a]=o+n.pos*(i.pos-o),e.group.attr(s))}}))}},e.prototype.init=function(e,i){t.prototype.init.apply(this,arguments);var n=this;(e=n.chart).hasRendered&&e.series.forEach((function(t){t.type===n.type&&(t.isDirty=!0)}))},e.prototype.getColumnMetrics=function(){var t=this,e=t.options,i=t.xAxis,n=t.yAxis,r=i.options.reversedStacks;r=i.reversed&&!r||!i.reversed&&r;var s,a={},o=0;!1===e.grouping?o=1:t.chart.series.forEach((function(e){var i=e.yAxis,r=e.options;if(e.type===t.type&&(e.visible||!t.chart.options.chart.ignoreHiddenSeries)&&n.len===i.len&&n.pos===i.pos){if(r.stacking&&"group"!==r.stacking){s=e.stackKey,void 0===a[s]&&(a[s]=o++);var l=a[s]}else!1!==r.grouping&&(l=o++);e.columnIndex=l}}));var l=Math.min(Math.abs(i.transA)*(i.ordinal&&i.ordinal.slope||e.pointRange||i.closestPointRange||i.tickInterval||1),i.len),h=l*e.groupPadding,u=(l-2*h)/(o||1);return e=Math.min(e.maxPointWidth||i.len,T(e.pointWidth,u*(1-2*e.pointPadding))),t.columnMetrics={width:e,offset:(u-e)/2+(h+((t.columnIndex||0)+(r?1:0))*u-l/2)*(r?-1:1),paddedWidth:u,columnCount:o},t.columnMetrics},e.prototype.crispCol=function(t,e,i,n){var r=this.chart,s=this.borderWidth,a=-(s%2?.5:0);return s=s%2?.5:1,r.inverted&&r.renderer.isVML&&(s+=1),this.options.crisp&&(i=Math.round(t+i)+a,i-=t=Math.round(t)+a),n=Math.round(e+n)+s,a=.5>=Math.abs(e)&&.5<n,n-=e=Math.round(e)+s,a&&n&&(--e,n+=1),{x:t,y:e,width:i,height:n}},e.prototype.adjustForMissingColumns=function(t,e,i,n){var r=this,s=this.options.stacking;if(!i.isNull&&1<n.columnCount){var a=0,o=0;x(this.yAxis.stacking&&this.yAxis.stacking.stacks,(function(t){if("number"==typeof i.x&&(t=t[i.x.toString()])){var e=t.points[r.index],n=t.total;s?(e&&(a=o),t.hasValidPoints&&o++):y(e)&&(a=e[1],o=n||0)}})),t=(i.plotX||0)+((o-1)*n.paddedWidth+e)/2-e-a*n.paddedWidth}return t},e.prototype.translate=function(){var t=this,e=t.chart,i=t.options,n=t.dense=2>t.closestPointRange*t.xAxis.transA;n=t.borderWidth=T(i.borderWidth,n?0:1);var r=t.xAxis,a=t.yAxis,o=i.threshold,l=t.translatedThreshold=a.getThreshold(o),h=T(i.minPointLength,5),u=t.getColumnMetrics(),c=u.width,d=t.barW=Math.max(c,1+2*n),f=t.pointXOffset=u.offset,m=t.dataMin,v=t.dataMax;e.inverted&&(l-=.5),i.pointPadding&&(d=Math.ceil(d)),s.prototype.translate.apply(t),t.points.forEach((function(n){var s=T(n.yBottom,l),y=999+Math.abs(s),_=c,x=n.plotX||0;y=p(n.plotY,-y,a.len+y),x+=f;var S=d,w=Math.min(y,s),k=Math.max(y,s)-w;if(h&&Math.abs(k)<h){k=h;var C=!a.reversed&&!n.negative||a.reversed&&n.negative;b(o)&&b(v)&&n.y===o&&v<=o&&(a.min||0)<o&&(m!==v||(a.max||0)<=o)&&(C=!C),w=Math.abs(w-l)>h?s-h:l-(C?h:0)}g(n.options.pointWidth)&&(_=S=Math.ceil(n.options.pointWidth),x-=Math.round((_-c)/2)),i.centerInCategory&&(x=t.adjustForMissingColumns(x,_,n,u)),n.barX=x,n.pointWidth=_,n.tooltipPos=e.inverted?[p(a.len+a.pos-e.plotLeft-y,a.pos-e.plotLeft,a.len+a.pos-e.plotLeft),r.len+r.pos-e.plotTop-x-S/2,k]:[r.left-e.plotLeft+x+S/2,p(y+a.pos-e.plotTop,a.pos-e.plotTop,a.len+a.pos-e.plotTop),k],n.shapeType=t.pointClass.prototype.shapeType||"rect",n.shapeArgs=t.crispCol.apply(t,n.isNull?[x,l,S,0]:[x,w,S,k])}))},e.prototype.drawGraph=function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},e.prototype.pointAttribs=function(t,e){var i=this.options,n=this.pointAttrToOptions||{},r=n.stroke||"borderColor",s=n["stroke-width"]||"borderWidth",a=t&&t.color||this.color,o=t&&t[r]||i[r]||a,l=t&&t[s]||i[s]||this[s]||0;n=t&&t.options.dashStyle||i.dashStyle;var h=T(t&&t.opacity,i.opacity,1);if(t&&this.zones.length){var u=t.getZone();a=t.options.color||u&&(u.color||t.nonZonedColor)||this.color,u&&(o=u.borderColor||o,n=u.dashStyle||n,l=u.borderWidth||l)}return e&&t&&(e=(t=_(i.states[e],t.options.states&&t.options.states[e]||{})).brightness,a=t.color||void 0!==e&&c(a).brighten(t.brightness).get()||a,o=t[r]||o,l=t[s]||l,n=t.dashStyle||n,h=T(t.opacity,h)),r={fill:a,stroke:o,"stroke-width":l,opacity:h},n&&(r.dashstyle=n),r},e.prototype.drawPoints=function(){var t,e=this,i=this.chart,n=e.options,r=i.renderer,s=n.animationLimit||250;e.points.forEach((function(a){var o=a.graphic,l=!!o,h=o&&i.pointCount<s?"animate":"attr";b(a.plotY)&&null!==a.y?(t=a.shapeArgs,o&&a.hasNewShapeType()&&(o=o.destroy()),e.enabledDataSorting&&(a.startXPos=e.xAxis.reversed?-(t&&t.width||0):e.xAxis.width),o||(a.graphic=o=r[a.shapeType](t).add(a.group||e.group))&&e.enabledDataSorting&&i.hasRendered&&i.pointCount<s&&(o.attr({x:a.startXPos}),l=!0,h="animate"),o&&l&&o[h](_(t)),n.borderRadius&&o[h]({r:n.borderRadius}),i.styledMode||o[h](e.pointAttribs(a,a.selected&&"select")).shadow(!1!==a.allowShadow&&n.shadow,null,n.stacking&&!n.borderRadius),o&&(o.addClass(a.getClassName(),!0),o.attr({visibility:a.visible?"inherit":"hidden"}))):o&&(a.graphic=o.destroy())}))},e.prototype.drawTracker=function(){var t,e=this,i=e.chart,n=i.pointer,r=function(t){var e=n.getPointFromEvent(t);void 0!==e&&(n.isDirectTouch=!0,e.onMouseOver(t))};e.points.forEach((function(e){t=y(e.dataLabels)?e.dataLabels:e.dataLabel?[e.dataLabel]:[],e.graphic&&(e.graphic.element.point=e),t.forEach((function(t){t.div?t.div.point=e:t.element.point=e}))})),e._hasTracking||(e.trackerGroups.forEach((function(t){e[t]&&(e[t].addClass("highcharts-tracker").on("mouseover",r).on("mouseout",(function(t){n.onTrackerMouseOut(t)})),d&&e[t].on("touchstart",r),!i.styledMode&&e.options.cursor&&e[t].css(f).css({cursor:e.options.cursor}))})),e._hasTracking=!0),v(this,"afterDrawTracker")},e.prototype.remove=function(){var t=this,e=t.chart;e.hasRendered&&e.series.forEach((function(e){e.type===t.type&&(e.isDirty=!0)})),s.prototype.remove.apply(t,arguments)},e.defaultOptions=_(s.defaultOptions,{borderRadius:0,centerInCategory:!1,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:r.neutralColor20,borderColor:r.neutralColor100}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:r.backgroundColor}),e}(s),m(o.prototype,{cropShoulder:0,directTouch:!0,drawLegendSymbol:n.drawRectangle,getSymbol:t,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]}),a.registerSeriesType("column",o),o})),e(i,"Series/Bar/BarSeries.js",[i["Series/Column/ColumnSeries.js"],i["Core/Series/SeriesRegistry.js"],i["Core/Utilities.js"]],(function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=i.extend,s=i.merge;return r((i=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.data=void 0,t.options=void 0,t.points=void 0,t}return n(i,e),i.defaultOptions=s(t.defaultOptions,{}),i}(t)).prototype,{inverted:!0}),e.registerSeriesType("bar",i),i})),e(i,"Series/Scatter/ScatterSeries.js",[i["Series/Column/ColumnSeries.js"],i["Series/Line/LineSeries.js"],i["Core/Series/SeriesRegistry.js"],i["Core/Utilities.js"]],(function(t,e,i,n){var r=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),s=n.addEvent,a=n.extend,o=n.merge;return a((n=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e}return r(i,t),i.prototype.applyJitter=function(){var t=this,e=this.options.jitter,i=this.points.length;e&&this.points.forEach((function(n,r){["x","y"].forEach((function(s,a){var o="plot"+s.toUpperCase();if(e[s]&&!n.isNull){var l=t[s+"Axis"],h=e[s]*l.transA;if(l&&!l.isLog){var u=Math.max(0,n[o]-h);l=Math.min(l.len,n[o]+h),a=1e4*Math.sin(r+a*i),n[o]=u+(l-u)*(a-Math.floor(a)),"x"===s&&(n.clientX=n.plotX)}}}))}))},i.prototype.drawGraph=function(){(this.options.lineWidth||0===this.options.lineWidth&&this.graph&&this.graph.strokeWidth())&&t.prototype.drawGraph.call(this)},i.defaultOptions=o(e.defaultOptions,{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">●</span> <span style="font-size: 10px"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}),i}(e)).prototype,{drawTracker:t.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1}),s(n,"afterTranslate",(function(){this.applyJitter()})),i.registerSeriesType("scatter",n),n})),e(i,"Mixins/CenteredSeries.js",[i["Core/Globals.js"],i["Core/Series/Series.js"],i["Core/Utilities.js"]],(function(t,e,i){var n=i.isNumber,r=i.pick,s=i.relativeLength,a=t.deg2rad;return t.CenteredSeriesMixin={getCenter:function(){var t=this.options,i=this.chart,n=2*(t.slicedOffset||0),a=i.plotWidth-2*n,o=i.plotHeight-2*n,l=t.center,h=Math.min(a,o),u=t.size,c=t.innerSize||0;for("string"==typeof u&&(u=parseFloat(u)),"string"==typeof c&&(c=parseFloat(c)),t=[r(l[0],"50%"),r(l[1],"50%"),r(u&&0>u?void 0:t.size,"100%"),r(c&&0>c?void 0:t.innerSize||0,"0%")],!i.angular||this instanceof e||(t[3]=0),l=0;4>l;++l)u=t[l],i=2>l||2===l&&/%$/.test(u),t[l]=s(u,[a,o,h,t[2]][l])+(i?n:0);return t[3]>t[2]&&(t[3]=t[2]),t},getStartAndEndRadians:function(t,e){return t=n(t)?t:0,e=n(e)&&e>t&&360>e-t?e:t+360,{start:a*(t+-90),end:a*(e+-90)}}}})),e(i,"Series/Pie/PiePoint.js",[i["Core/Animation/AnimationUtilities.js"],i["Core/Series/Point.js"],i["Core/Utilities.js"]],(function(t,e,i){var n=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),r=t.setAnimation,s=i.addEvent,a=i.defined;t=i.extend;var o=i.isNumber,l=i.pick,h=i.relativeLength;return i=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.labelDistance=void 0,e.options=void 0,e.series=void 0,e}return n(i,t),i.prototype.getConnectorPath=function(){var t=this.labelPosition,e=this.series.options.dataLabels,i=e.connectorShape,n=this.connectorShapes;return n[i]&&(i=n[i]),i.call(this,{x:t.final.x,y:t.final.y,alignment:t.alignment},t.connectorPosition,e)},i.prototype.getTranslate=function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},i.prototype.haloPath=function(t){var e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+t,e.r+t,{innerR:e.r-1,start:e.start,end:e.end})},i.prototype.init=function(){e.prototype.init.apply(this,arguments);var t=this;t.name=l(t.name,"Slice");var i=function(e){t.slice("select"===e.type)};return s(t,"select",i),s(t,"unselect",i),t},i.prototype.isValid=function(){return o(this.y)&&0<=this.y},i.prototype.setVisible=function(t,e){var i=this,n=i.series,r=n.chart,s=n.options.ignoreHiddenPoint;e=l(e,s),t!==i.visible&&(i.visible=i.options.visible=t=void 0===t?!i.visible:t,n.options.data[n.data.indexOf(i)]=i.options,["graphic","dataLabel","connector","shadowGroup"].forEach((function(e){i[e]&&i[e][t?"show":"hide"](t)})),i.legendItem&&r.legend.colorizeItem(i,t),t||"hover"!==i.state||i.setState(""),s&&(n.isDirty=!0),e&&r.redraw())},i.prototype.slice=function(t,e,i){var n=this.series;r(i,n.chart),l(e,!0),this.sliced=this.options.sliced=a(t)?t:!this.sliced,n.options.data[n.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},i}(e),t(i.prototype,{connectorShapes:{fixedOffset:function(t,e,i){var n=e.breakAt;return e=e.touchingSliceAt,[["M",t.x,t.y],i.softConnector?["C",t.x+("left"===t.alignment?-5:5),t.y,2*n.x-e.x,2*n.y-e.y,n.x,n.y]:["L",n.x,n.y],["L",e.x,e.y]]},straight:function(t,e){return e=e.touchingSliceAt,[["M",t.x,t.y],["L",e.x,e.y]]},crookedLine:function(t,e,i){e=e.touchingSliceAt;var n=this.series,r=n.center[0],s=n.chart.plotWidth,a=n.chart.plotLeft;n=t.alignment;var o=this.shapeArgs.r;return i=h(i.crookDistance,1),i=["L",s="left"===n?r+o+(s+a-r-o)*(1-i):a+(r-o)*i,t.y],r=!0,("left"===n?s>t.x||s<e.x:s<t.x||s>e.x)&&(r=!1),t=[["M",t.x,t.y]],r&&t.push(i),t.push(["L",e.x,e.y]),t}}}),i})),e(i,"Series/Pie/PieSeries.js",[i["Mixins/CenteredSeries.js"],i["Series/Column/ColumnSeries.js"],i["Core/Globals.js"],i["Mixins/LegendSymbol.js"],i["Core/Color/Palette.js"],i["Series/Pie/PiePoint.js"],i["Core/Series/Series.js"],i["Core/Series/SeriesRegistry.js"],i["Core/Renderer/SVG/SVGRenderer.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r,s,a,o,l,h){var u=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),c=t.getStartAndEndRadians;i=i.noop;var d=h.clamp,p=h.extend,f=h.fireEvent,g=h.merge,m=h.pick,v=h.relativeLength;return p((h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.center=void 0,e.data=void 0,e.maxLabelDistance=void 0,e.options=void 0,e.points=void 0,e}return u(e,t),e.prototype.animate=function(t){var e=this,i=e.points,n=e.startAngleRad;t||i.forEach((function(t){var i=t.graphic,r=t.shapeArgs;i&&r&&(i.attr({r:m(t.startR,e.center&&e.center[3]/2),start:n,end:n}),i.animate({r:r.r,start:r.start,end:r.end},e.options.animation))}))},e.prototype.drawEmpty=function(){var t=this.startAngleRad,e=this.endAngleRad,i=this.options;if(0===this.total&&this.center){var n=this.center[0],s=this.center[1];this.graph||(this.graph=this.chart.renderer.arc(n,s,this.center[1]/2,0,t,e).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:l.prototype.symbols.arc(n,s,this.center[2]/2,0,{start:t,end:e,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":i.borderWidth,fill:i.fillColor||"none",stroke:i.color||r.neutralColor20})}else this.graph&&(this.graph=this.graph.destroy())},e.prototype.drawPoints=function(){var t=this.chart.renderer;this.points.forEach((function(e){e.graphic&&e.hasNewShapeType()&&(e.graphic=e.graphic.destroy()),e.graphic||(e.graphic=t[e.shapeType](e.shapeArgs).add(e.series.group),e.delayedRendering=!0)}))},e.prototype.generatePoints=function(){t.prototype.generatePoints.call(this),this.updateTotals()},e.prototype.getX=function(t,e,i){var n=this.center,r=this.radii?this.radii[i.index]||0:n[2]/2;return t=Math.asin(d((t-n[1])/(r+i.labelDistance),-1,1)),n[0]+(e?-1:1)*Math.cos(t)*(r+i.labelDistance)+(0<i.labelDistance?(e?-1:1)*this.options.dataLabels.padding:0)},e.prototype.hasData=function(){return!!this.processedXData.length},e.prototype.redrawPoints=function(){var t,e,i,n,r=this,s=r.chart,a=s.renderer,o=r.options.shadow;this.drawEmpty(),!o||r.shadowGroup||s.styledMode||(r.shadowGroup=a.g("shadow").attr({zIndex:-1}).add(r.group)),r.points.forEach((function(l){var h={};if(e=l.graphic,!l.isNull&&e){var u=void 0;n=l.shapeArgs,t=l.getTranslate(),s.styledMode||(u=l.shadowGroup,o&&!u&&(u=l.shadowGroup=a.g("shadow").add(r.shadowGroup)),u&&u.attr(t),i=r.pointAttribs(l,l.selected&&"select")),l.delayedRendering?(e.setRadialReference(r.center).attr(n).attr(t),s.styledMode||e.attr(i).attr({"stroke-linejoin":"round"}).shadow(o,u),l.delayedRendering=!1):(e.setRadialReference(r.center),s.styledMode||g(!0,h,i),g(!0,h,n,t),e.animate(h)),e.attr({visibility:l.visible?"inherit":"hidden"}),e.addClass(l.getClassName(),!0)}else e&&(l.graphic=e.destroy())}))},e.prototype.sortByAngle=function(t,e){t.sort((function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e}))},e.prototype.translate=function(t){this.generatePoints();var e=0,i=this.options,n=i.slicedOffset,r=n+(i.borderWidth||0),s=c(i.startAngle,i.endAngle),a=this.startAngleRad=s.start;s=(this.endAngleRad=s.end)-a;var o=this.points,l=i.dataLabels.distance;i=i.ignoreHiddenPoint;var h,u=o.length;for(t||(this.center=t=this.getCenter()),h=0;h<u;h++){var d=o[h],p=a+e*s;!d.isValid()||i&&!d.visible||(e+=d.percentage/100);var g=a+e*s,y={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:Math.round(1e3*p)/1e3,end:Math.round(1e3*g)/1e3};d.shapeType="arc",d.shapeArgs=y,d.labelDistance=m(d.options.dataLabels&&d.options.dataLabels.distance,l),d.labelDistance=v(d.labelDistance,y.r),this.maxLabelDistance=Math.max(this.maxLabelDistance||0,d.labelDistance),(g=(g+p)/2)>1.5*Math.PI?g-=2*Math.PI:g<-Math.PI/2&&(g+=2*Math.PI),d.slicedTranslation={translateX:Math.round(Math.cos(g)*n),translateY:Math.round(Math.sin(g)*n)},y=Math.cos(g)*t[2]/2;var b=Math.sin(g)*t[2]/2;d.tooltipPos=[t[0]+.7*y,t[1]+.7*b],d.half=g<-Math.PI/2||g>Math.PI/2?1:0,d.angle=g,p=Math.min(r,d.labelDistance/5),d.labelPosition={natural:{x:t[0]+y+Math.cos(g)*d.labelDistance,y:t[1]+b+Math.sin(g)*d.labelDistance},final:{},alignment:0>d.labelDistance?"center":d.half?"right":"left",connectorPosition:{breakAt:{x:t[0]+y+Math.cos(g)*p,y:t[1]+b+Math.sin(g)*p},touchingSliceAt:{x:t[0]+y,y:t[1]+b}}}}f(this,"afterTranslate")},e.prototype.updateTotals=function(){var t,e=0,i=this.points,n=i.length,r=this.options.ignoreHiddenPoint;for(t=0;t<n;t++){var s=i[t];!s.isValid()||r&&!s.visible||(e+=s.y)}for(this.total=e,t=0;t<n;t++)(s=i[t]).percentage=0<e&&(s.visible||!r)?s.y/e*100:0,s.total=e},e.defaultOptions=g(a.defaultOptions,{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,connectorShape:"fixedOffset",crookDistance:"70%",distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:r.backgroundColor,borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}),e}(a)).prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawLegendSymbol:n.drawRectangle,drawTracker:e.prototype.drawTracker,getCenter:t.getCenter,getSymbol:i,isCartesian:!1,noSharedTooltip:!0,pointAttribs:e.prototype.pointAttribs,pointClass:s,requireSorting:!1,searchPoint:i,trackerGroups:["group","dataLabelsGroup"]}),o.registerSeriesType("pie",h),h})),e(i,"Core/Series/DataLabels.js",[i["Core/Animation/AnimationUtilities.js"],i["Core/FormatUtilities.js"],i["Core/Globals.js"],i["Core/Color/Palette.js"],i["Core/Series/Series.js"],i["Core/Series/SeriesRegistry.js"],i["Core/Utilities.js"]],(function(t,e,i,n,r,s,a){var o=t.getDeferredAnimation,l=e.format;t=i.noop,s=s.seriesTypes;var h=a.arrayMax,u=a.clamp,c=a.defined,d=a.extend,p=a.fireEvent,f=a.isArray,g=a.merge,m=a.objectEach,v=a.pick,y=a.relativeLength,b=a.splat,_=a.stableSort;i.distribute=function(t,e,n){function r(t,e){return t.target-e.target}var s,a=!0,o=t,l=[],h=0,c=o.reducedLen||e;for(s=t.length;s--;)h+=t[s].size;if(h>c){for(_(t,(function(t,e){return(e.rank||0)-(t.rank||0)})),h=s=0;h<=c;)h+=t[s].size,s++;l=t.splice(s-1,t.length)}for(_(t,r),t=t.map((function(t){return{size:t.size,targets:[t.target],align:v(t.align,.5)}}));a;){for(s=t.length;s--;)a=t[s],h=(Math.min.apply(0,a.targets)+Math.max.apply(0,a.targets))/2,a.pos=u(h-a.size*a.align,0,e-a.size);for(s=t.length,a=!1;s--;)0<s&&t[s-1].pos+t[s-1].size>t[s].pos&&(t[s-1].size+=t[s].size,t[s-1].targets=t[s-1].targets.concat(t[s].targets),t[s-1].align=.5,t[s-1].pos+t[s-1].size>e&&(t[s-1].pos=e-t[s-1].size),t.splice(s,1),a=!0)}o.push.apply(o,l),s=0,t.some((function(t){var r=0;if(t.targets.some((function(){if(o[s].pos=t.pos+r,void 0!==n&&Math.abs(o[s].pos-o[s].target)>n)return o.slice(0,s+1).forEach((function(t){delete t.pos})),o.reducedLen=(o.reducedLen||e)-.1*e,o.reducedLen>.1*e&&i.distribute(o,e,n),!0;r+=o[s].size,s++})))return!0})),_(o,r)},r.prototype.drawDataLabels=function(){function t(t,e){var i,n=[];if(f(t)&&!f(e))n=t.map((function(t){return g(t,e)}));else if(f(e)&&!f(t))n=e.map((function(e){return g(t,e)}));else if(f(t)||f(e))for(i=Math.max(t.length,e.length);i--;)n[i]=g(t[i],e[i]);else n=g(t,e);return n}var e=this,i=e.chart,r=e.options,s=r.dataLabels,a=e.points,h=e.hasRendered||0,u=s.animation;u=s.defer?o(i,u,e):{defer:0,duration:0};var d=i.renderer;if(s=t(t(i.options.plotOptions&&i.options.plotOptions.series&&i.options.plotOptions.series.dataLabels,i.options.plotOptions&&i.options.plotOptions[e.type]&&i.options.plotOptions[e.type].dataLabels),s),p(this,"drawDataLabels"),f(s)||s.enabled||e._hasPointLabels){var y=e.plotGroup("dataLabelsGroup","data-labels",h?"inherit":"hidden",s.zIndex||6);y.attr({opacity:+h}),!h&&(h=e.dataLabelsGroup)&&(e.visible&&y.show(!0),h[r.animation?"animate":"attr"]({opacity:1},u)),a.forEach((function(a){b(t(s,a.dlOptions||a.options&&a.options.dataLabels)).forEach((function(t,s){var o=t.enabled&&(!a.isNull||a.dataLabelOnNull)&&function(t,e){var i=e.filter;return!i||(e=i.operator,t=t[i.property],i=i.value,">"===e&&t>i||"<"===e&&t<i||">="===e&&t>=i||"<="===e&&t<=i||"=="===e&&t==i||"==="===e&&t===i)}(a,t),h=a.dataLabels?a.dataLabels[s]:a.dataLabel,u=a.connectors?a.connectors[s]:a.connector,p=v(t.distance,a.labelDistance),f=!h;if(o){var g=a.getLabelConfig(),b=v(t[a.formatPrefix+"Format"],t.format);g=c(b)?l(b,g,i):(t[a.formatPrefix+"Formatter"]||t.formatter).call(g,t),b=t.style;var _=t.rotation;i.styledMode||(b.color=v(t.color,b.color,e.color,n.neutralColor100),"contrast"===b.color?(a.contrastColor=d.getContrast(a.color||e.color),b.color=!c(p)&&t.inside||0>p||r.stacking?a.contrastColor:n.neutralColor100):delete a.contrastColor,r.cursor&&(b.cursor=r.cursor));var T={r:t.borderRadius||0,rotation:_,padding:t.padding,zIndex:1};i.styledMode||(T.fill=t.backgroundColor,T.stroke=t.borderColor,T["stroke-width"]=t.borderWidth),m(T,(function(t,e){void 0===t&&delete T[e]}))}!h||o&&c(g)?o&&c(g)&&(h?T.text=g:(a.dataLabels=a.dataLabels||[],h=a.dataLabels[s]=_?d.text(g,0,-9999,t.useHTML).addClass("highcharts-data-label"):d.label(g,0,-9999,t.shape,null,null,t.useHTML,null,"data-label"),s||(a.dataLabel=h),h.addClass(" highcharts-data-label-color-"+a.colorIndex+" "+(t.className||"")+(t.useHTML?" highcharts-tracker":""))),h.options=t,h.attr(T),i.styledMode||h.css(b).shadow(t.shadow),h.added||h.add(y),t.textPath&&!t.useHTML&&(h.setTextPath(a.getDataLabelPath&&a.getDataLabelPath(h)||a.graphic,t.textPath),a.dataLabelPath&&!t.textPath.enabled&&(a.dataLabelPath=a.dataLabelPath.destroy())),e.alignDataLabel(a,h,t,null,f)):(a.dataLabel=a.dataLabel&&a.dataLabel.destroy(),a.dataLabels&&(1===a.dataLabels.length?delete a.dataLabels:delete a.dataLabels[s]),s||delete a.dataLabel,u&&(a.connector=a.connector.destroy(),a.connectors&&(1===a.connectors.length?delete a.connectors:delete a.connectors[s])))}))}))}p(this,"afterDrawDataLabels")},r.prototype.alignDataLabel=function(t,e,i,n,r){var s=this,a=this.chart,o=this.isCartesian&&a.inverted,l=this.enabledDataSorting,h=v(t.dlBox&&t.dlBox.centerX,t.plotX,-9999),u=v(t.plotY,-9999),c=e.getBBox(),p=i.rotation,f=i.align,g=a.isInsidePlot(h,Math.round(u),{inverted:o,paneCoordinates:!0,series:s}),m="justify"===v(i.overflow,l?"none":"justify"),y=this.visible&&!1!==t.visible&&(t.series.forceDL||l&&!m||g||v(i.inside,!!this.options.stacking)&&n&&a.isInsidePlot(h,o?n.x+1:n.y+n.height-1,{inverted:o,paneCoordinates:!0,series:s})),b=function(i){l&&s.xAxis&&!m&&s.setDataLabelStartPos(t,e,r,g,i)};if(y){var _=a.renderer.fontMetrics(a.styledMode?void 0:i.style.fontSize,e).b;n=d({x:o?this.yAxis.len-u:h,y:Math.round(o?this.xAxis.len-h:u),width:0,height:0},n),d(i,{width:c.width,height:c.height}),p?(m=!1,h=a.renderer.rotCorr(_,p),b(h={x:n.x+(i.x||0)+n.width/2+h.x,y:n.y+(i.y||0)+{top:0,middle:.5,bottom:1}[i.verticalAlign]*n.height}),e[r?"attr":"animate"](h).attr({align:f}),b=180<(b=(p+720)%360)&&360>b,"left"===f?h.y-=b?c.height:0:"center"===f?(h.x-=c.width/2,h.y-=c.height/2):"right"===f&&(h.x-=c.width,h.y-=b?0:c.height),e.placed=!0,e.alignAttr=h):(b(n),e.align(i,void 0,n),h=e.alignAttr),m&&0<=n.height?this.justifyDataLabel(e,i,h,c,n,r):v(i.crop,!0)&&(y=a.isInsidePlot(h.x,h.y,{paneCoordinates:!0,series:s})&&a.isInsidePlot(h.x+c.width,h.y+c.height,{paneCoordinates:!0,series:s})),i.shape&&!p&&e[r?"attr":"animate"]({anchorX:o?a.plotWidth-t.plotY:t.plotX,anchorY:o?a.plotHeight-t.plotX:t.plotY})}r&&l&&(e.placed=!1),y||l&&!m||(e.hide(!0),e.placed=!1)},r.prototype.setDataLabelStartPos=function(t,e,i,n,r){var s=this.chart,a=s.inverted,o=this.xAxis,l=o.reversed,h=a?e.height/2:e.width/2;t=(t=t.pointWidth)?t/2:0,o=a?r.x:l?-h-t:o.width-h+t,r=a?l?this.yAxis.height-h+t:-h-t:r.y,e.startXPos=o,e.startYPos=r,n?"hidden"===e.visibility&&(e.show(),e.attr({opacity:0}).animate({opacity:1})):e.attr({opacity:1}).animate({opacity:0},void 0,e.hide),s.hasRendered&&(i&&e.attr({x:e.startXPos,y:e.startYPos}),e.placed=!0)},r.prototype.justifyDataLabel=function(t,e,i,n,r,s){var a=this.chart,o=e.align,l=e.verticalAlign,h=t.box?0:t.padding||0,u=e.x;u=void 0===u?0:u;var c=e.y,d=void 0===c?0:c;if(0>(c=(i.x||0)+h)){"right"===o&&0<=u?(e.align="left",e.inside=!0):u-=c;var p=!0}return(c=(i.x||0)+n.width-h)>a.plotWidth&&("left"===o&&0>=u?(e.align="right",e.inside=!0):u+=a.plotWidth-c,p=!0),0>(c=i.y+h)&&("bottom"===l&&0<=d?(e.verticalAlign="top",e.inside=!0):d-=c,p=!0),(c=(i.y||0)+n.height-h)>a.plotHeight&&("top"===l&&0>=d?(e.verticalAlign="bottom",e.inside=!0):d+=a.plotHeight-c,p=!0),p&&(e.x=u,e.y=d,t.placed=!s,t.align(e,void 0,r)),p},s.pie&&(s.pie.prototype.dataLabelPositioners={radialDistributionY:function(t){return t.top+t.distributeBox.pos},radialDistributionX:function(t,e,i,n){return t.getX(i<e.top+2||i>e.bottom-2?n:i,e.half,e)},justify:function(t,e,i){return i[0]+(t.half?-1:1)*(e+t.labelDistance)},alignToPlotEdges:function(t,e,i,n){return t=t.getBBox().width,e?t+n:i-t-n},alignToConnectors:function(t,e,i,n){var r,s=0;return t.forEach((function(t){(r=t.dataLabel.getBBox().width)>s&&(s=r)})),e?s+n:i-s-n}},s.pie.prototype.drawDataLabels=function(){var t,e,s,a,o,l,u,d,p,f,m,y,b=this,_=b.data,T=b.chart,x=b.options.dataLabels||{},S=x.connectorPadding,w=T.plotWidth,k=T.plotHeight,C=T.plotLeft,E=Math.round(T.chartWidth/3),A=b.center,P=A[2]/2,O=A[1],L=[[],[]],M=[0,0,0,0],I=b.dataLabelPositioners;b.visible&&(x.enabled||b._hasPointLabels)&&(_.forEach((function(t){t.dataLabel&&t.visible&&t.dataLabel.shortened&&(t.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t.dataLabel.shortened=!1)})),r.prototype.drawDataLabels.apply(b),_.forEach((function(t){t.dataLabel&&(t.visible?(L[t.half].push(t),t.dataLabel._pos=null,!c(x.style.width)&&!c(t.options.dataLabels&&t.options.dataLabels.style&&t.options.dataLabels.style.width)&&t.dataLabel.getBBox().width>E&&(t.dataLabel.css({width:Math.round(.7*E)+"px"}),t.dataLabel.shortened=!0)):(t.dataLabel=t.dataLabel.destroy(),t.dataLabels&&1===t.dataLabels.length&&delete t.dataLabels))})),L.forEach((function(e,n){var r,s=e.length,h=[];if(s){if(b.sortByAngle(e,n-.5),0<b.maxLabelDistance){var g=Math.max(0,O-P-b.maxLabelDistance),_=Math.min(O+P+b.maxLabelDistance,T.plotHeight);e.forEach((function(t){0<t.labelDistance&&t.dataLabel&&(t.top=Math.max(0,O-P-t.labelDistance),t.bottom=Math.min(O+P+t.labelDistance,T.plotHeight),r=t.dataLabel.getBBox().height||21,t.distributeBox={target:t.labelPosition.natural.y-t.top+r/2,size:r,rank:t.y},h.push(t.distributeBox))})),g=_+r-g,i.distribute(h,g,g/5)}for(m=0;m<s;m++){if(t=e[m],l=t.labelPosition,a=t.dataLabel,f=!1===t.visible?"hidden":"inherit",p=g=l.natural.y,h&&c(t.distributeBox)&&(void 0===t.distributeBox.pos?f="hidden":(u=t.distributeBox.size,p=I.radialDistributionY(t))),delete t.positionIndex,x.justify)d=I.justify(t,P,A);else switch(x.alignTo){case"connectors":d=I.alignToConnectors(e,n,w,C);break;case"plotEdges":d=I.alignToPlotEdges(a,n,w,C);break;default:d=I.radialDistributionX(b,t,p,g)}a._attr={visibility:f,align:l.alignment},y=t.options.dataLabels||{},a._pos={x:d+v(y.x,x.x)+({left:S,right:-S}[l.alignment]||0),y:p+v(y.y,x.y)-10},l.final.x=d,l.final.y=p,v(x.crop,!0)&&(o=a.getBBox().width,g=null,d-o<S&&1===n?(g=Math.round(o-d+S),M[3]=Math.max(g,M[3])):d+o>w-S&&0===n&&(g=Math.round(d+o-w+S),M[1]=Math.max(g,M[1])),0>p-u/2?M[0]=Math.max(Math.round(u/2-p),M[0]):p+u/2>k&&(M[2]=Math.max(Math.round(p+u/2-k),M[2])),a.sideOverflow=g)}}})),0===h(M)||this.verifyDataLabelOverflow(M))&&(this.placeDataLabels(),this.points.forEach((function(t){var i;(y=g(x,t.options.dataLabels),e=v(y.connectorWidth,1))&&(s=t.connector,(a=t.dataLabel)&&a._pos&&t.visible&&0<t.labelDistance?(f=a._attr.visibility,(i=!s)&&(t.connector=s=T.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+t.colorIndex+(t.className?" "+t.className:"")).add(b.dataLabelsGroup),T.styledMode||s.attr({"stroke-width":e,stroke:y.connectorColor||t.color||n.neutralColor60})),s[i?"attr":"animate"]({d:t.getConnectorPath()}),s.attr("visibility",f)):s&&(t.connector=s.destroy()))})))},s.pie.prototype.placeDataLabels=function(){this.points.forEach((function(t){var e,i=t.dataLabel;i&&t.visible&&((e=i._pos)?(i.sideOverflow&&(i._attr.width=Math.max(i.getBBox().width-i.sideOverflow,0),i.css({width:i._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),i.shortened=!0),i.attr(i._attr),i[i.moved?"animate":"attr"](e),i.moved=!0):i&&i.attr({y:-9999})),delete t.distributeBox}),this)},s.pie.prototype.alignDataLabel=t,s.pie.prototype.verifyDataLabelOverflow=function(t){var e=this.center,i=this.options,n=i.center,r=i.minSize||80,s=null!==i.size;if(!s){if(null!==n[0])var a=Math.max(e[2]-Math.max(t[1],t[3]),r);else a=Math.max(e[2]-t[1]-t[3],r),e[0]+=(t[3]-t[1])/2;null!==n[1]?a=u(a,r,e[2]-Math.max(t[0],t[2])):(a=u(a,r,e[2]-t[0]-t[2]),e[1]+=(t[0]-t[2])/2),a<e[2]?(e[2]=a,e[3]=Math.min(y(i.innerSize||0,a),a),this.translate(e),this.drawDataLabels&&this.drawDataLabels()):s=!0}return s}),s.column&&(s.column.prototype.alignDataLabel=function(t,e,i,n,s){var a=this.chart.inverted,o=t.series,l=t.dlBox||t.shapeArgs,h=v(t.below,t.plotY>v(this.translatedThreshold,o.yAxis.len)),u=v(i.inside,!!this.options.stacking);l&&(0>(n=g(l)).y&&(n.height+=n.y,n.y=0),0<(l=n.y+n.height-o.yAxis.len)&&l<n.height&&(n.height-=l),a&&(n={x:o.yAxis.len-n.y-n.height,y:o.xAxis.len-n.x-n.width,width:n.height,height:n.width}),u||(a?(n.x+=h?0:n.width,n.width=0):(n.y+=h?n.height:0,n.height=0))),i.align=v(i.align,!a||u?"center":h?"right":"left"),i.verticalAlign=v(i.verticalAlign,a||u?"middle":h?"top":"bottom"),r.prototype.alignDataLabel.call(this,t,e,i,n,s),i.inside&&t.contrastColor&&e.css({color:t.contrastColor})})})),e(i,"Extensions/OverlappingDataLabels.js",[i["Core/Chart/Chart.js"],i["Core/Utilities.js"]],(function(t,e){function i(t,e){var i=!1;if(t){var n=t.newOpacity;t.oldOpacity!==n&&(t.alignAttr&&t.placed?(t[n?"removeClass":"addClass"]("highcharts-data-label-hidden"),i=!0,t.alignAttr.opacity=n,t[t.isOld?"animate":"attr"](t.alignAttr,null,(function(){e.styledMode||t.css({pointerEvents:n?"auto":"none"}),t.visibility=n?"inherit":"hidden"})),r(e,"afterHideOverlappingLabel")):t.attr({opacity:n})),t.isOld=!0}return i}var n=e.addEvent,r=e.fireEvent,s=e.isArray,a=e.isNumber,o=e.objectEach,l=e.pick;n(t,"render",(function(){var t=this,e=[];(this.labelCollectors||[]).forEach((function(t){e=e.concat(t())})),(this.yAxis||[]).forEach((function(t){t.stacking&&t.options.stackLabels&&!t.options.stackLabels.allowOverlap&&o(t.stacking.stacks,(function(t){o(t,(function(t){e.push(t.label)}))}))})),(this.series||[]).forEach((function(n){var r=n.options.dataLabels;n.visible&&(!1!==r.enabled||n._hasPointLabels)&&((r=function(n){return n.forEach((function(n){n.visible&&(s(n.dataLabels)?n.dataLabels:n.dataLabel?[n.dataLabel]:[]).forEach((function(r){var s=r.options;r.labelrank=l(s.labelrank,n.labelrank,n.shapeArgs&&n.shapeArgs.height),s.allowOverlap?(r.oldOpacity=r.opacity,r.newOpacity=1,i(r,t)):e.push(r)}))}))})(n.nodes||[]),r(n.points))})),this.hideOverlappingLabels(e)})),t.prototype.hideOverlappingLabels=function(t){var e,n,s,o=this,l=t.length,h=o.renderer,u=!1,c=function(t){var e,i,n=t.box?0:t.padding||0,r=e=0;if(t&&(!t.alignAttr||t.placed)){var s=t.alignAttr||{x:t.attr("x"),y:t.attr("y")},o=t.parentGroup;t.width||(e=t.getBBox(),t.width=e.width,t.height=e.height,e=h.fontMetrics(null,t.element).h);var l=t.width-2*n;return(i={left:"0",center:"0.5",right:"1"}[t.alignValue])?r=+i*l:a(t.x)&&Math.round(t.x)!==t.translateX&&(r=t.x-t.translateX),{x:s.x+(o.translateX||0)+n-(r||0),y:s.y+(o.translateY||0)+n-e,width:t.width-2*n,height:t.height-2*n}}};for(n=0;n<l;n++)(e=t[n])&&(e.oldOpacity=e.opacity,e.newOpacity=1,e.absoluteBox=c(e));for(t.sort((function(t,e){return(e.labelrank||0)-(t.labelrank||0)})),n=0;n<l;n++){var d=(c=t[n])&&c.absoluteBox;for(e=n+1;e<l;++e){var p=(s=t[e])&&s.absoluteBox;!d||!p||c===s||0===c.newOpacity||0===s.newOpacity||p.x>=d.x+d.width||p.x+p.width<=d.x||p.y>=d.y+d.height||p.y+p.height<=d.y||((c.labelrank<s.labelrank?c:s).newOpacity=0)}}t.forEach((function(t){i(t,o)&&(u=!0)})),u&&r(o,"afterHideAllOverlappingLabels")}})),e(i,"Core/Responsive.js",[i["Core/Chart/Chart.js"],i["Core/Utilities.js"]],(function(t,e){var i=e.find,n=e.isArray,r=e.isObject,s=e.merge,a=e.objectEach,o=e.pick,l=e.splat,h=e.uniqueKey;t.prototype.setResponsive=function(t,e){var n=this.options.responsive,r=[],a=this.currentResponsive;!e&&n&&n.rules&&n.rules.forEach((function(t){void 0===t._id&&(t._id=h()),this.matchResponsiveRule(t,r)}),this),(e=s.apply(0,r.map((function(t){return i(n.rules,(function(e){return e._id===t})).chartOptions})))).isResponsiveOptions=!0,(r=r.toString()||void 0)!==(a&&a.ruleIds)&&(a&&this.update(a.undoOptions,t,!0),r?((a=this.currentOptions(e)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:r,mergedOptions:e,undoOptions:a},this.update(e,t,!0)):this.currentResponsive=void 0)},t.prototype.matchResponsiveRule=function(t,e){var i=t.condition;(i.callback||function(){return this.chartWidth<=o(i.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=o(i.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=o(i.minWidth,0)&&this.chartHeight>=o(i.minHeight,0)}).call(this)&&e.push(t._id)},t.prototype.currentOptions=function(t){var e=this,i={};return function t(i,s,o,h){var u;a(i,(function(i,a){if(!h&&-1<e.collectionsWithUpdate.indexOf(a)&&s[a])for(i=l(i),o[a]=[],u=0;u<Math.max(i.length,s[a].length);u++)s[a][u]&&(void 0===i[u]?o[a][u]=s[a][u]:(o[a][u]={},t(i[u],s[a][u],o[a][u],h+1)));else r(i)?(o[a]=n(i)?[]:{},t(i,s[a]||{},o[a],h+1)):o[a]=void 0===s[a]?null:s[a]}))}(t,this.options,i,0),i}})),e(i,"masters/highcharts.src.js",[i["Core/Globals.js"],i["Core/Utilities.js"],i["Core/Options.js"],i["Core/Animation/Fx.js"],i["Core/Animation/AnimationUtilities.js"],i["Core/Renderer/HTML/AST.js"],i["Core/FormatUtilities.js"],i["Core/Renderer/SVG/SVGElement.js"],i["Core/Series/Series.js"]],(function(t,e,i,n,r,s,a,o,l){return t.animate=r.animate,t.animObject=r.animObject,t.getDeferredAnimation=r.getDeferredAnimation,t.setAnimation=r.setAnimation,t.stop=r.stop,t.timers=n.timers,t.AST=s,t.Fx=n,t.Series=l,t.SVGElement=o,t.dateFormat=a.dateFormat,t.format=a.format,t.numberFormat=a.numberFormat,t.defaultOptions=i.defaultOptions,t.getOptions=i.getOptions,t.time=i.defaultTime,t.setOptions=i.setOptions,t.addEvent=e.addEvent,t.arrayMax=e.arrayMax,t.arrayMin=e.arrayMin,t.attr=e.attr,t.clearTimeout=e.clearTimeout,t.correctFloat=e.correctFloat,t.createElement=e.createElement,t.css=e.css,t.defined=e.defined,t.destroyObjectProperties=e.destroyObjectProperties,t.discardElement=e.discardElement,t.erase=e.erase,t.error=e.error,t.extend=e.extend,t.extendClass=e.extendClass,t.find=e.find,t.fireEvent=e.fireEvent,t.getMagnitude=e.getMagnitude,t.getStyle=e.getStyle,t.inArray=e.inArray,t.isArray=e.isArray,t.isClass=e.isClass,t.isDOMElement=e.isDOMElement,t.isFunction=e.isFunction,t.isNumber=e.isNumber,t.isObject=e.isObject,t.isString=e.isString,t.keys=e.keys,t.merge=e.merge,t.normalizeTickInterval=e.normalizeTickInterval,t.objectEach=e.objectEach,t.offset=e.offset,t.pad=e.pad,t.pick=e.pick,t.pInt=e.pInt,t.relativeLength=e.relativeLength,t.removeEvent=e.removeEvent,t.splat=e.splat,t.stableSort=e.stableSort,t.syncTimeout=e.syncTimeout,t.timeUnits=e.timeUnits,t.uniqueKey=e.uniqueKey,t.useSerialIds=e.useSerialIds,t.wrap=e.wrap,t})),i["masters/highcharts.src.js"]._modules=i,i["masters/highcharts.src.js"]}))},1123:function(t,e,i){
18
- /**
19
- * chroma.js - JavaScript library for color conversions
20
- *
21
- * Copyright (c) 2011-2019, Gregor Aisch
22
- * All rights reserved.
23
- *
24
- * Redistribution and use in source and binary forms, with or without
25
- * modification, are permitted provided that the following conditions are met:
26
- *
27
- * 1. Redistributions of source code must retain the above copyright notice, this
28
- * list of conditions and the following disclaimer.
29
- *
30
- * 2. Redistributions in binary form must reproduce the above copyright notice,
31
- * this list of conditions and the following disclaimer in the documentation
32
- * and/or other materials provided with the distribution.
33
- *
34
- * 3. The name Gregor Aisch may not be used to endorse or promote products
35
- * derived from this software without specific prior written permission.
36
- *
37
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
38
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
39
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
40
- * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
41
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
42
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
43
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
44
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
45
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
46
- * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47
- *
48
- * -------------------------------------------------------
49
- *
50
- * chroma.js includes colors from colorbrewer2.org, which are released under
51
- * the following license:
52
- *
53
- * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
54
- * and The Pennsylvania State University.
55
- *
56
- * Licensed under the Apache License, Version 2.0 (the "License");
57
- * you may not use this file except in compliance with the License.
58
- * You may obtain a copy of the License at
59
- * http://www.apache.org/licenses/LICENSE-2.0
60
- *
61
- * Unless required by applicable law or agreed to in writing,
62
- * software distributed under the License is distributed on an
63
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
64
- * either express or implied. See the License for the specific
65
- * language governing permissions and limitations under the License.
66
- *
67
- * ------------------------------------------------------
68
- *
69
- * Named colors are taken from X11 Color Names.
70
- * http://www.w3.org/TR/css3-color/#svg-color
71
- *
72
- * @preserve
73
- */
74
- t.exports=function(){"use strict";for(var t=function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=1),t<e?e:t>i?i:t},e={},i=0,n=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];i<n.length;i+=1){var r=n[i];e["[object "+r+"]"]=r.toLowerCase()}var s=function(t){return e[Object.prototype.toString.call(t)]||"object"},a=Math.PI,o={clip_rgb:function(e){e._clipped=!1,e._unclipped=e.slice(0);for(var i=0;i<=3;i++)i<3?((e[i]<0||e[i]>255)&&(e._clipped=!0),e[i]=t(e[i],0,255)):3===i&&(e[i]=t(e[i],0,1));return e},limit:t,type:s,unpack:function(t,e){return void 0===e&&(e=null),t.length>=3?Array.prototype.slice.call(t):"object"==s(t[0])&&e?e.split("").filter((function(e){return void 0!==t[0][e]})).map((function(e){return t[0][e]})):t[0]},last:function(t){if(t.length<2)return null;var e=t.length-1;return"string"==s(t[e])?t[e].toLowerCase():null},PI:a,TWOPI:2*a,PITHIRD:a/3,DEG2RAD:a/180,RAD2DEG:180/a},l={format:{},autodetect:[]},h=o.last,u=o.clip_rgb,c=o.type,d=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=this;if("object"===c(t[0])&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];var n=h(t),r=!1;if(!n){r=!0,l.sorted||(l.autodetect=l.autodetect.sort((function(t,e){return e.p-t.p})),l.sorted=!0);for(var s=0,a=l.autodetect;s<a.length;s+=1){var o=a[s];if(n=o.test.apply(o,t))break}}if(!l.format[n])throw new Error("unknown format: "+t);var d=l.format[n].apply(null,r?t:t.slice(0,-1));i._rgb=u(d),3===i._rgb.length&&i._rgb.push(1)};d.prototype.toString=function(){return"function"==c(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var p=d,f=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(f.Color,[null].concat(t)))};f.Color=p,f.version="2.1.2";var g=f,m=o.unpack,v=Math.max,y=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=m(t,"rgb"),n=i[0],r=i[1],s=i[2],a=1-v(n/=255,v(r/=255,s/=255)),o=a<1?1/(1-a):0,l=(1-n-a)*o,h=(1-r-a)*o,u=(1-s-a)*o;return[l,h,u,a]},b=o.unpack,_=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=(t=b(t,"cmyk"))[0],n=t[1],r=t[2],s=t[3],a=t.length>4?t[4]:1;return 1===s?[0,0,0,a]:[i>=1?0:255*(1-i)*(1-s),n>=1?0:255*(1-n)*(1-s),r>=1?0:255*(1-r)*(1-s),a]},T=o.unpack,x=o.type;p.prototype.cmyk=function(){return y(this._rgb)},g.cmyk=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["cmyk"])))},l.format.cmyk=_,l.autodetect.push({p:2,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=T(t,"cmyk"),"array"===x(t)&&4===t.length)return"cmyk"}});var S=o.unpack,w=o.last,k=function(t){return Math.round(100*t)/100},C=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=S(t,"hsla"),n=w(t)||"lsa";return i[0]=k(i[0]||0),i[1]=k(100*i[1])+"%",i[2]=k(100*i[2])+"%","hsla"===n||i.length>3&&i[3]<1?(i[3]=i.length>3?i[3]:1,n="hsla"):i.length=3,n+"("+i.join(",")+")"},E=o.unpack,A=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=(t=E(t,"rgba"))[0],n=t[1],r=t[2];i/=255,n/=255,r/=255;var s,a,o=Math.min(i,n,r),l=Math.max(i,n,r),h=(l+o)/2;return l===o?(s=0,a=Number.NaN):s=h<.5?(l-o)/(l+o):(l-o)/(2-l-o),i==l?a=(n-r)/(l-o):n==l?a=2+(r-i)/(l-o):r==l&&(a=4+(i-n)/(l-o)),(a*=60)<0&&(a+=360),t.length>3&&void 0!==t[3]?[a,s,h,t[3]]:[a,s,h]},P=o.unpack,O=o.last,L=Math.round,M=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=P(t,"rgba"),n=O(t)||"rgb";return"hsl"==n.substr(0,3)?C(A(i),n):(i[0]=L(i[0]),i[1]=L(i[1]),i[2]=L(i[2]),("rgba"===n||i.length>3&&i[3]<1)&&(i[3]=i.length>3?i[3]:1,n="rgba"),n+"("+i.slice(0,"rgb"===n?3:4).join(",")+")")},I=o.unpack,D=Math.round,R=function(){for(var t,e=[],i=arguments.length;i--;)e[i]=arguments[i];var n,r,s,a=(e=I(e,"hsl"))[0],o=e[1],l=e[2];if(0===o)n=r=s=255*l;else{var h=[0,0,0],u=[0,0,0],c=l<.5?l*(1+o):l+o-l*o,d=2*l-c,p=a/360;h[0]=p+1/3,h[1]=p,h[2]=p-1/3;for(var f=0;f<3;f++)h[f]<0&&(h[f]+=1),h[f]>1&&(h[f]-=1),6*h[f]<1?u[f]=d+6*(c-d)*h[f]:2*h[f]<1?u[f]=c:3*h[f]<2?u[f]=d+(c-d)*(2/3-h[f])*6:u[f]=d;n=(t=[D(255*u[0]),D(255*u[1]),D(255*u[2])])[0],r=t[1],s=t[2]}return e.length>3?[n,r,s,e[3]]:[n,r,s,1]},N=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,B=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,j=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,U=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,F=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,W=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,z=Math.round,H=function(t){var e;if(t=t.toLowerCase().trim(),l.format.named)try{return l.format.named(t)}catch(t){}if(e=t.match(N)){for(var i=e.slice(1,4),n=0;n<3;n++)i[n]=+i[n];return i[3]=1,i}if(e=t.match(B)){for(var r=e.slice(1,5),s=0;s<4;s++)r[s]=+r[s];return r}if(e=t.match(j)){for(var a=e.slice(1,4),o=0;o<3;o++)a[o]=z(2.55*a[o]);return a[3]=1,a}if(e=t.match(U)){for(var h=e.slice(1,5),u=0;u<3;u++)h[u]=z(2.55*h[u]);return h[3]=+h[3],h}if(e=t.match(F)){var c=e.slice(1,4);c[1]*=.01,c[2]*=.01;var d=R(c);return d[3]=1,d}if(e=t.match(W)){var p=e.slice(1,4);p[1]*=.01,p[2]*=.01;var f=R(p);return f[3]=+e[4],f}};H.test=function(t){return N.test(t)||B.test(t)||j.test(t)||U.test(t)||F.test(t)||W.test(t)};var V=H,G=o.type;p.prototype.css=function(t){return M(this._rgb,t)},g.css=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["css"])))},l.format.css=V,l.autodetect.push({p:5,test:function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];if(!e.length&&"string"===G(t)&&V.test(t))return"css"}});var X=o.unpack;l.format.gl=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=X(t,"rgba");return i[0]*=255,i[1]*=255,i[2]*=255,i},g.gl=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["gl"])))},p.prototype.gl=function(){var t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]};var q=o.unpack,Y=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,n=q(t,"rgb"),r=n[0],s=n[1],a=n[2],o=Math.min(r,s,a),l=Math.max(r,s,a),h=l-o,u=100*h/255,c=o/(255-h)*100;return 0===h?i=Number.NaN:(r===l&&(i=(s-a)/h),s===l&&(i=2+(a-r)/h),a===l&&(i=4+(r-s)/h),(i*=60)<0&&(i+=360)),[i,u,c]},K=o.unpack,$=Math.floor,Q=function(){for(var t,e,i,n,r,s,a=[],o=arguments.length;o--;)a[o]=arguments[o];var l,h,u,c=(a=K(a,"hcg"))[0],d=a[1],p=a[2];p*=255;var f=255*d;if(0===d)l=h=u=p;else{360===c&&(c=0),c>360&&(c-=360),c<0&&(c+=360);var g=$(c/=60),m=c-g,v=p*(1-d),y=v+f*(1-m),b=v+f*m,_=v+f;switch(g){case 0:l=(t=[_,b,v])[0],h=t[1],u=t[2];break;case 1:l=(e=[y,_,v])[0],h=e[1],u=e[2];break;case 2:l=(i=[v,_,b])[0],h=i[1],u=i[2];break;case 3:l=(n=[v,y,_])[0],h=n[1],u=n[2];break;case 4:l=(r=[b,v,_])[0],h=r[1],u=r[2];break;case 5:l=(s=[_,v,y])[0],h=s[1],u=s[2]}}return[l,h,u,a.length>3?a[3]:1]},Z=o.unpack,J=o.type;p.prototype.hcg=function(){return Y(this._rgb)},g.hcg=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["hcg"])))},l.format.hcg=Q,l.autodetect.push({p:1,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=Z(t,"hcg"),"array"===J(t)&&3===t.length)return"hcg"}});var tt=o.unpack,et=o.last,it=Math.round,nt=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=tt(t,"rgba"),n=i[0],r=i[1],s=i[2],a=i[3],o=et(t)||"auto";void 0===a&&(a=1),"auto"===o&&(o=a<1?"rgba":"rgb");var l=(n=it(n))<<16|(r=it(r))<<8|(s=it(s)),h="000000"+l.toString(16);h=h.substr(h.length-6);var u="0"+it(255*a).toString(16);switch(u=u.substr(u.length-2),o.toLowerCase()){case"rgba":return"#"+h+u;case"argb":return"#"+u+h;default:return"#"+h}},rt=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,st=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,at=function(t){if(t.match(rt)){4!==t.length&&7!==t.length||(t=t.substr(1)),3===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var e=parseInt(t,16);return[e>>16,e>>8&255,255&e,1]}if(t.match(st)){5!==t.length&&9!==t.length||(t=t.substr(1)),4===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);var i=parseInt(t,16);return[i>>24&255,i>>16&255,i>>8&255,Math.round((255&i)/255*100)/100]}throw new Error("unknown hex color: "+t)},ot=o.type;p.prototype.hex=function(t){return nt(this._rgb,t)},g.hex=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["hex"])))},l.format.hex=at,l.autodetect.push({p:4,test:function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];if(!e.length&&"string"===ot(t)&&[3,4,5,6,7,8,9].indexOf(t.length)>=0)return"hex"}});var lt=o.unpack,ht=o.TWOPI,ut=Math.min,ct=Math.sqrt,dt=Math.acos,pt=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,n=lt(t,"rgb"),r=n[0],s=n[1],a=n[2],o=ut(r/=255,s/=255,a/=255),l=(r+s+a)/3,h=l>0?1-o/l:0;return 0===h?i=NaN:(i=(r-s+(r-a))/2,i/=ct((r-s)*(r-s)+(r-a)*(s-a)),i=dt(i),a>s&&(i=ht-i),i/=ht),[360*i,h,l]},ft=o.unpack,gt=o.limit,mt=o.TWOPI,vt=o.PITHIRD,yt=Math.cos,bt=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,n,r,s=(t=ft(t,"hsi"))[0],a=t[1],o=t[2];return isNaN(s)&&(s=0),isNaN(a)&&(a=0),s>360&&(s-=360),s<0&&(s+=360),(s/=360)<1/3?n=1-((r=(1-a)/3)+(i=(1+a*yt(mt*s)/yt(vt-mt*s))/3)):s<2/3?r=1-((i=(1-a)/3)+(n=(1+a*yt(mt*(s-=1/3))/yt(vt-mt*s))/3)):i=1-((n=(1-a)/3)+(r=(1+a*yt(mt*(s-=2/3))/yt(vt-mt*s))/3)),[255*(i=gt(o*i*3)),255*(n=gt(o*n*3)),255*(r=gt(o*r*3)),t.length>3?t[3]:1]},_t=o.unpack,Tt=o.type;p.prototype.hsi=function(){return pt(this._rgb)},g.hsi=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["hsi"])))},l.format.hsi=bt,l.autodetect.push({p:2,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=_t(t,"hsi"),"array"===Tt(t)&&3===t.length)return"hsi"}});var xt=o.unpack,St=o.type;p.prototype.hsl=function(){return A(this._rgb)},g.hsl=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["hsl"])))},l.format.hsl=R,l.autodetect.push({p:2,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=xt(t,"hsl"),"array"===St(t)&&3===t.length)return"hsl"}});var wt=o.unpack,kt=Math.min,Ct=Math.max,Et=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,n,r,s=(t=wt(t,"rgb"))[0],a=t[1],o=t[2],l=kt(s,a,o),h=Ct(s,a,o),u=h-l;return r=h/255,0===h?(i=Number.NaN,n=0):(n=u/h,s===h&&(i=(a-o)/u),a===h&&(i=2+(o-s)/u),o===h&&(i=4+(s-a)/u),(i*=60)<0&&(i+=360)),[i,n,r]},At=o.unpack,Pt=Math.floor,Ot=function(){for(var t,e,i,n,r,s,a=[],o=arguments.length;o--;)a[o]=arguments[o];var l,h,u,c=(a=At(a,"hsv"))[0],d=a[1],p=a[2];if(p*=255,0===d)l=h=u=p;else{360===c&&(c=0),c>360&&(c-=360),c<0&&(c+=360);var f=Pt(c/=60),g=c-f,m=p*(1-d),v=p*(1-d*g),y=p*(1-d*(1-g));switch(f){case 0:l=(t=[p,y,m])[0],h=t[1],u=t[2];break;case 1:l=(e=[v,p,m])[0],h=e[1],u=e[2];break;case 2:l=(i=[m,p,y])[0],h=i[1],u=i[2];break;case 3:l=(n=[m,v,p])[0],h=n[1],u=n[2];break;case 4:l=(r=[y,m,p])[0],h=r[1],u=r[2];break;case 5:l=(s=[p,m,v])[0],h=s[1],u=s[2]}}return[l,h,u,a.length>3?a[3]:1]},Lt=o.unpack,Mt=o.type;p.prototype.hsv=function(){return Et(this._rgb)},g.hsv=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["hsv"])))},l.format.hsv=Ot,l.autodetect.push({p:2,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=Lt(t,"hsv"),"array"===Mt(t)&&3===t.length)return"hsv"}});var It=18,Dt=.95047,Rt=1,Nt=1.08883,Bt=.137931034,jt=.206896552,Ut=.12841855,Ft=.008856452,Wt=o.unpack,zt=Math.pow,Ht=function(t){return(t/=255)<=.04045?t/12.92:zt((t+.055)/1.055,2.4)},Vt=function(t){return t>Ft?zt(t,1/3):t/Ut+Bt},Gt=function(t,e,i){return t=Ht(t),e=Ht(e),i=Ht(i),[Vt((.4124564*t+.3575761*e+.1804375*i)/Dt),Vt((.2126729*t+.7151522*e+.072175*i)/Rt),Vt((.0193339*t+.119192*e+.9503041*i)/Nt)]},Xt=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=Wt(t,"rgb"),n=i[0],r=i[1],s=i[2],a=Gt(n,r,s),o=a[0],l=a[1],h=a[2],u=116*l-16;return[u<0?0:u,500*(o-l),200*(l-h)]},qt=o.unpack,Yt=Math.pow,Kt=function(t){return 255*(t<=.00304?12.92*t:1.055*Yt(t,1/2.4)-.055)},$t=function(t){return t>jt?t*t*t:Ut*(t-Bt)},Qt=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i,n,r,s=(t=qt(t,"lab"))[0],a=t[1],o=t[2];return n=(s+16)/116,i=isNaN(a)?n:n+a/500,r=isNaN(o)?n:n-o/200,n=Rt*$t(n),i=Dt*$t(i),r=Nt*$t(r),[Kt(3.2404542*i-1.5371385*n-.4985314*r),Kt(-.969266*i+1.8760108*n+.041556*r),Kt(.0556434*i-.2040259*n+1.0572252*r),t.length>3?t[3]:1]},Zt=o.unpack,Jt=o.type;p.prototype.lab=function(){return Xt(this._rgb)},g.lab=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["lab"])))},l.format.lab=Qt,l.autodetect.push({p:2,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=Zt(t,"lab"),"array"===Jt(t)&&3===t.length)return"lab"}});var te=o.unpack,ee=o.RAD2DEG,ie=Math.sqrt,ne=Math.atan2,re=Math.round,se=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=te(t,"lab"),n=i[0],r=i[1],s=i[2],a=ie(r*r+s*s),o=(ne(s,r)*ee+360)%360;return 0===re(1e4*a)&&(o=Number.NaN),[n,a,o]},ae=o.unpack,oe=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=ae(t,"rgb"),n=i[0],r=i[1],s=i[2],a=Xt(n,r,s),o=a[0],l=a[1],h=a[2];return se(o,l,h)},le=o.unpack,he=o.DEG2RAD,ue=Math.sin,ce=Math.cos,de=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=le(t,"lch"),n=i[0],r=i[1],s=i[2];return isNaN(s)&&(s=0),[n,ce(s*=he)*r,ue(s)*r]},pe=o.unpack,fe=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=(t=pe(t,"lch"))[0],n=t[1],r=t[2],s=de(i,n,r),a=s[0],o=s[1],l=s[2],h=Qt(a,o,l),u=h[0],c=h[1],d=h[2];return[u,c,d,t.length>3?t[3]:1]},ge=o.unpack,me=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=ge(t,"hcl").reverse();return fe.apply(void 0,i)},ve=o.unpack,ye=o.type;p.prototype.lch=function(){return oe(this._rgb)},p.prototype.hcl=function(){return oe(this._rgb).reverse()},g.lch=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["lch"])))},g.hcl=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["hcl"])))},l.format.lch=fe,l.format.hcl=me,["lch","hcl"].forEach((function(t){return l.autodetect.push({p:2,test:function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];if(e=ve(e,t),"array"===ye(e)&&3===e.length)return t}})}));var be={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_e=o.type;p.prototype.name=function(){for(var t=nt(this._rgb,"rgb"),e=0,i=Object.keys(be);e<i.length;e+=1){var n=i[e];if(be[n]===t)return n.toLowerCase()}return t},l.format.named=function(t){if(t=t.toLowerCase(),be[t])return at(be[t]);throw new Error("unknown color name: "+t)},l.autodetect.push({p:5,test:function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];if(!e.length&&"string"===_e(t)&&be[t.toLowerCase()])return"named"}});var Te=o.unpack,xe=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=Te(t,"rgb"),n=i[0],r=i[1],s=i[2];return(n<<16)+(r<<8)+s},Se=o.type,we=function(t){if("number"==Se(t)&&t>=0&&t<=16777215)return[t>>16,t>>8&255,255&t,1];throw new Error("unknown num color: "+t)},ke=o.type;p.prototype.num=function(){return xe(this._rgb)},g.num=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["num"])))},l.format.num=we,l.autodetect.push({p:5,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(1===t.length&&"number"===ke(t[0])&&t[0]>=0&&t[0]<=16777215)return"num"}});var Ce=o.unpack,Ee=o.type,Ae=Math.round;p.prototype.rgb=function(t){return void 0===t&&(t=!0),!1===t?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Ae)},p.prototype.rgba=function(t){return void 0===t&&(t=!0),this._rgb.slice(0,4).map((function(e,i){return i<3?!1===t?e:Ae(e):e}))},g.rgb=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["rgb"])))},l.format.rgb=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=Ce(t,"rgba");return void 0===i[3]&&(i[3]=1),i},l.autodetect.push({p:3,test:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(t=Ce(t,"rgba"),"array"===Ee(t)&&(3===t.length||4===t.length&&"number"==Ee(t[3])&&t[3]>=0&&t[3]<=1))return"rgb"}});var Pe=Math.log,Oe=function(t){var e,i,n,r=t/100;return r<66?(e=255,i=-155.25485562709179-.44596950469579133*(i=r-2)+104.49216199393888*Pe(i),n=r<20?0:.8274096064007395*(n=r-10)-254.76935184120902+115.67994401066147*Pe(n)):(e=351.97690566805693+.114206453784165*(e=r-55)-40.25366309332127*Pe(e),i=325.4494125711974+.07943456536662342*(i=r-50)-28.0852963507957*Pe(i),n=255),[e,i,n,1]},Le=o.unpack,Me=Math.round,Ie=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i,n=Le(t,"rgb"),r=n[0],s=n[2],a=1e3,o=4e4,l=.4;o-a>l;){var h=Oe(i=.5*(o+a));h[2]/h[0]>=s/r?o=i:a=i}return Me(i)};p.prototype.temp=p.prototype.kelvin=p.prototype.temperature=function(){return Ie(this._rgb)},g.temp=g.kelvin=g.temperature=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return new(Function.prototype.bind.apply(p,[null].concat(t,["temp"])))},l.format.temp=l.format.kelvin=l.format.temperature=Oe;var De=o.type;p.prototype.alpha=function(t,e){return void 0===e&&(e=!1),void 0!==t&&"number"===De(t)?e?(this._rgb[3]=t,this):new p([this._rgb[0],this._rgb[1],this._rgb[2],t],"rgb"):this._rgb[3]},p.prototype.clipped=function(){return this._rgb._clipped||!1},p.prototype.darken=function(t){void 0===t&&(t=1);var e=this.lab();return e[0]-=It*t,new p(e,"lab").alpha(this.alpha(),!0)},p.prototype.brighten=function(t){return void 0===t&&(t=1),this.darken(-t)},p.prototype.darker=p.prototype.darken,p.prototype.brighter=p.prototype.brighten,p.prototype.get=function(t){var e=t.split("."),i=e[0],n=e[1],r=this[i]();if(n){var s=i.indexOf(n);if(s>-1)return r[s];throw new Error("unknown channel "+n+" in mode "+i)}return r};var Re=o.type,Ne=Math.pow;p.prototype.luminance=function(t){if(void 0!==t&&"number"===Re(t)){if(0===t)return new p([0,0,0,this._rgb[3]],"rgb");if(1===t)return new p([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),i=20,n=function(e,r){var s=e.interpolate(r,.5,"rgb"),a=s.luminance();return Math.abs(t-a)<1e-7||!i--?s:a>t?n(e,s):n(s,r)},r=(e>t?n(new p([0,0,0]),this):n(this,new p([255,255,255]))).rgb();return new p(r.concat([this._rgb[3]]))}return Be.apply(void 0,this._rgb.slice(0,3))};var Be=function(t,e,i){return.2126*(t=je(t))+.7152*(e=je(e))+.0722*(i=je(i))},je=function(t){return(t/=255)<=.03928?t/12.92:Ne((t+.055)/1.055,2.4)},Ue={},Fe=o.type,We=function(t,e,i){void 0===i&&(i=.5);for(var n=[],r=arguments.length-3;r-- >0;)n[r]=arguments[r+3];var s=n[0]||"lrgb";if(Ue[s]||n.length||(s=Object.keys(Ue)[0]),!Ue[s])throw new Error("interpolation mode "+s+" is not defined");return"object"!==Fe(t)&&(t=new p(t)),"object"!==Fe(e)&&(e=new p(e)),Ue[s](t,e,i).alpha(t.alpha()+i*(e.alpha()-t.alpha()))};p.prototype.mix=p.prototype.interpolate=function(t,e){void 0===e&&(e=.5);for(var i=[],n=arguments.length-2;n-- >0;)i[n]=arguments[n+2];return We.apply(void 0,[this,t,e].concat(i))},p.prototype.premultiply=function(t){void 0===t&&(t=!1);var e=this._rgb,i=e[3];return t?(this._rgb=[e[0]*i,e[1]*i,e[2]*i,i],this):new p([e[0]*i,e[1]*i,e[2]*i,i],"rgb")},p.prototype.saturate=function(t){void 0===t&&(t=1);var e=this.lch();return e[1]+=It*t,e[1]<0&&(e[1]=0),new p(e,"lch").alpha(this.alpha(),!0)},p.prototype.desaturate=function(t){return void 0===t&&(t=1),this.saturate(-t)};var ze=o.type;p.prototype.set=function(t,e,i){void 0===i&&(i=!1);var n=t.split("."),r=n[0],s=n[1],a=this[r]();if(s){var o=r.indexOf(s);if(o>-1){if("string"==ze(e))switch(e.charAt(0)){case"+":case"-":a[o]+=+e;break;case"*":a[o]*=+e.substr(1);break;case"/":a[o]/=+e.substr(1);break;default:a[o]=+e}else{if("number"!==ze(e))throw new Error("unsupported value for Color.set");a[o]=e}var l=new p(a,r);return i?(this._rgb=l._rgb,this):l}throw new Error("unknown channel "+s+" in mode "+r)}return a},Ue.rgb=function(t,e,i){var n=t._rgb,r=e._rgb;return new p(n[0]+i*(r[0]-n[0]),n[1]+i*(r[1]-n[1]),n[2]+i*(r[2]-n[2]),"rgb")};var He=Math.sqrt,Ve=Math.pow;Ue.lrgb=function(t,e,i){var n=t._rgb,r=n[0],s=n[1],a=n[2],o=e._rgb,l=o[0],h=o[1],u=o[2];return new p(He(Ve(r,2)*(1-i)+Ve(l,2)*i),He(Ve(s,2)*(1-i)+Ve(h,2)*i),He(Ve(a,2)*(1-i)+Ve(u,2)*i),"rgb")},Ue.lab=function(t,e,i){var n=t.lab(),r=e.lab();return new p(n[0]+i*(r[0]-n[0]),n[1]+i*(r[1]-n[1]),n[2]+i*(r[2]-n[2]),"lab")};var Ge=function(t,e,i,n){var r,s,a,o,l,h,u,c,d,f,g,m;return"hsl"===n?(a=t.hsl(),o=e.hsl()):"hsv"===n?(a=t.hsv(),o=e.hsv()):"hcg"===n?(a=t.hcg(),o=e.hcg()):"hsi"===n?(a=t.hsi(),o=e.hsi()):"lch"!==n&&"hcl"!==n||(n="hcl",a=t.hcl(),o=e.hcl()),"h"===n.substr(0,1)&&(l=(r=a)[0],u=r[1],d=r[2],h=(s=o)[0],c=s[1],f=s[2]),isNaN(l)||isNaN(h)?isNaN(l)?isNaN(h)?m=Number.NaN:(m=h,1!=d&&0!=d||"hsv"==n||(g=c)):(m=l,1!=f&&0!=f||"hsv"==n||(g=u)):m=l+i*(h>l&&h-l>180?h-(l+360):h<l&&l-h>180?h+360-l:h-l),void 0===g&&(g=u+i*(c-u)),new p([m,g,d+i*(f-d)],n)},Xe=function(t,e,i){return Ge(t,e,i,"lch")};Ue.lch=Xe,Ue.hcl=Xe,Ue.num=function(t,e,i){var n=t.num(),r=e.num();return new p(n+i*(r-n),"num")},Ue.hcg=function(t,e,i){return Ge(t,e,i,"hcg")},Ue.hsi=function(t,e,i){return Ge(t,e,i,"hsi")},Ue.hsl=function(t,e,i){return Ge(t,e,i,"hsl")},Ue.hsv=function(t,e,i){return Ge(t,e,i,"hsv")};var qe=o.clip_rgb,Ye=Math.pow,Ke=Math.sqrt,$e=Math.PI,Qe=Math.cos,Ze=Math.sin,Je=Math.atan2,ti=function(t,e){for(var i=t.length,n=[0,0,0,0],r=0;r<t.length;r++){var s=t[r],a=e[r]/i,o=s._rgb;n[0]+=Ye(o[0],2)*a,n[1]+=Ye(o[1],2)*a,n[2]+=Ye(o[2],2)*a,n[3]+=o[3]*a}return n[0]=Ke(n[0]),n[1]=Ke(n[1]),n[2]=Ke(n[2]),n[3]>.9999999&&(n[3]=1),new p(qe(n))},ei=o.type,ii=Math.pow,ni=function(t){var e="rgb",i=g("#ccc"),n=0,r=[0,1],s=[],a=[0,0],o=!1,l=[],h=!1,u=0,c=1,d=!1,p={},f=!0,m=1,v=function(t){if((t=t||["#fff","#000"])&&"string"===ei(t)&&g.brewer&&g.brewer[t.toLowerCase()]&&(t=g.brewer[t.toLowerCase()]),"array"===ei(t)){1===t.length&&(t=[t[0],t[0]]),t=t.slice(0);for(var e=0;e<t.length;e++)t[e]=g(t[e]);s.length=0;for(var i=0;i<t.length;i++)s.push(i/(t.length-1))}return T(),l=t},y=function(t){return t},b=function(t){return t},_=function(t,n){var r,h;if(null==n&&(n=!1),isNaN(t)||null===t)return i;h=n?t:o&&o.length>2?function(t){if(null!=o){for(var e=o.length-1,i=0;i<e&&t>=o[i];)i++;return i-1}return 0}(t)/(o.length-2):c!==u?(t-u)/(c-u):1,h=b(h),n||(h=y(h)),1!==m&&(h=ii(h,m)),h=a[0]+h*(1-a[0]-a[1]),h=Math.min(1,Math.max(0,h));var d=Math.floor(1e4*h);if(f&&p[d])r=p[d];else{if("array"===ei(l))for(var v=0;v<s.length;v++){var _=s[v];if(h<=_){r=l[v];break}if(h>=_&&v===s.length-1){r=l[v];break}if(h>_&&h<s[v+1]){h=(h-_)/(s[v+1]-_),r=g.interpolate(l[v],l[v+1],h,e);break}}else"function"===ei(l)&&(r=l(h));f&&(p[d]=r)}return r},T=function(){return p={}};v(t);var x=function(t){var e=g(_(t));return h&&e[h]?e[h]():e};return x.classes=function(t){if(null!=t){if("array"===ei(t))o=t,r=[t[0],t[t.length-1]];else{var e=g.analyze(r);o=0===t?[e.min,e.max]:g.limits(e,"e",t)}return x}return o},x.domain=function(t){if(!arguments.length)return r;u=t[0],c=t[t.length-1],s=[];var e=l.length;if(t.length===e&&u!==c)for(var i=0,n=Array.from(t);i<n.length;i+=1){var a=n[i];s.push((a-u)/(c-u))}else{for(var o=0;o<e;o++)s.push(o/(e-1));if(t.length>2){var h=t.map((function(e,i){return i/(t.length-1)})),d=t.map((function(t){return(t-u)/(c-u)}));d.every((function(t,e){return h[e]===t}))||(b=function(t){if(t<=0||t>=1)return t;for(var e=0;t>=d[e+1];)e++;var i=(t-d[e])/(d[e+1]-d[e]);return h[e]+i*(h[e+1]-h[e])})}}return r=[u,c],x},x.mode=function(t){return arguments.length?(e=t,T(),x):e},x.range=function(t,e){return v(t),x},x.out=function(t){return h=t,x},x.spread=function(t){return arguments.length?(n=t,x):n},x.correctLightness=function(t){return null==t&&(t=!0),d=t,T(),y=d?function(t){for(var e=_(0,!0).lab()[0],i=_(1,!0).lab()[0],n=e>i,r=_(t,!0).lab()[0],s=e+(i-e)*t,a=r-s,o=0,l=1,h=20;Math.abs(a)>.01&&h-- >0;)n&&(a*=-1),a<0?(o=t,t+=.5*(l-t)):(l=t,t+=.5*(o-t)),r=_(t,!0).lab()[0],a=r-s;return t}:function(t){return t},x},x.padding=function(t){return null!=t?("number"===ei(t)&&(t=[t,t]),a=t,x):a},x.colors=function(e,i){arguments.length<2&&(i="hex");var n=[];if(0===arguments.length)n=l.slice(0);else if(1===e)n=[x(.5)];else if(e>1){var s=r[0],a=r[1]-s;n=ri(0,e,!1).map((function(t){return x(s+t/(e-1)*a)}))}else{t=[];var h=[];if(o&&o.length>2)for(var u=1,c=o.length,d=1<=c;d?u<c:u>c;d?u++:u--)h.push(.5*(o[u-1]+o[u]));else h=r;n=h.map((function(t){return x(t)}))}return g[i]&&(n=n.map((function(t){return t[i]()}))),n},x.cache=function(t){return null!=t?(f=t,x):f},x.gamma=function(t){return null!=t?(m=t,x):m},x.nodata=function(t){return null!=t?(i=g(t),x):i},x};function ri(t,e,i){for(var n=[],r=t<e,s=i?r?e+1:e-1:e,a=t;r?a<s:a>s;r?a++:a--)n.push(a);return n}var si=function(t){var e,i,n,r,s,a,o;if(2===(t=t.map((function(t){return new p(t)}))).length)e=t.map((function(t){return t.lab()})),s=e[0],a=e[1],r=function(t){var e=[0,1,2].map((function(e){return s[e]+t*(a[e]-s[e])}));return new p(e,"lab")};else if(3===t.length)i=t.map((function(t){return t.lab()})),s=i[0],a=i[1],o=i[2],r=function(t){var e=[0,1,2].map((function(e){return(1-t)*(1-t)*s[e]+2*(1-t)*t*a[e]+t*t*o[e]}));return new p(e,"lab")};else if(4===t.length){var l;n=t.map((function(t){return t.lab()})),s=n[0],a=n[1],o=n[2],l=n[3],r=function(t){var e=[0,1,2].map((function(e){return(1-t)*(1-t)*(1-t)*s[e]+3*(1-t)*(1-t)*t*a[e]+3*(1-t)*t*t*o[e]+t*t*t*l[e]}));return new p(e,"lab")}}else if(5===t.length){var h=si(t.slice(0,3)),u=si(t.slice(2,5));r=function(t){return t<.5?h(2*t):u(2*(t-.5))}}return r},ai=function(t,e,i){if(!ai[i])throw new Error("unknown blend mode "+i);return ai[i](t,e)},oi=function(t){return function(e,i){var n=g(i).rgb(),r=g(e).rgb();return g.rgb(t(n,r))}},li=function(t){return function(e,i){var n=[];return n[0]=t(e[0],i[0]),n[1]=t(e[1],i[1]),n[2]=t(e[2],i[2]),n}};ai.normal=oi(li((function(t){return t}))),ai.multiply=oi(li((function(t,e){return t*e/255}))),ai.screen=oi(li((function(t,e){return 255*(1-(1-t/255)*(1-e/255))}))),ai.overlay=oi(li((function(t,e){return e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255))}))),ai.darken=oi(li((function(t,e){return t>e?e:t}))),ai.lighten=oi(li((function(t,e){return t>e?t:e}))),ai.dodge=oi(li((function(t,e){return 255===t||(t=e/255*255/(1-t/255))>255?255:t}))),ai.burn=oi(li((function(t,e){return 255*(1-(1-e/255)/(t/255))})));for(var hi=ai,ui=o.type,ci=o.clip_rgb,di=o.TWOPI,pi=Math.pow,fi=Math.sin,gi=Math.cos,mi=Math.floor,vi=Math.random,yi=Math.log,bi=Math.pow,_i=Math.floor,Ti=Math.abs,xi=function(t,e){void 0===e&&(e=null);var i={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===s(t)&&(t=Object.values(t)),t.forEach((function(t){e&&"object"===s(t)&&(t=t[e]),null==t||isNaN(t)||(i.values.push(t),i.sum+=t,t<i.min&&(i.min=t),t>i.max&&(i.max=t),i.count+=1)})),i.domain=[i.min,i.max],i.limits=function(t,e){return Si(i,t,e)},i},Si=function(t,e,i){void 0===e&&(e="equal"),void 0===i&&(i=7),"array"==s(t)&&(t=xi(t));var n=t.min,r=t.max,a=t.values.sort((function(t,e){return t-e}));if(1===i)return[n,r];var o=[];if("c"===e.substr(0,1)&&(o.push(n),o.push(r)),"e"===e.substr(0,1)){o.push(n);for(var l=1;l<i;l++)o.push(n+l/i*(r-n));o.push(r)}else if("l"===e.substr(0,1)){if(n<=0)throw new Error("Logarithmic scales are only possible for values > 0");var h=Math.LOG10E*yi(n),u=Math.LOG10E*yi(r);o.push(n);for(var c=1;c<i;c++)o.push(bi(10,h+c/i*(u-h)));o.push(r)}else if("q"===e.substr(0,1)){o.push(n);for(var d=1;d<i;d++){var p=(a.length-1)*d/i,f=_i(p);if(f===p)o.push(a[f]);else{var g=p-f;o.push(a[f]*(1-g)+a[f+1]*g)}}o.push(r)}else if("k"===e.substr(0,1)){var m,v=a.length,y=new Array(v),b=new Array(i),_=!0,T=0,x=null;(x=[]).push(n);for(var S=1;S<i;S++)x.push(n+S/i*(r-n));for(x.push(r);_;){for(var w=0;w<i;w++)b[w]=0;for(var k=0;k<v;k++)for(var C=a[k],E=Number.MAX_VALUE,A=void 0,P=0;P<i;P++){var O=Ti(x[P]-C);O<E&&(E=O,A=P),b[A]++,y[k]=A}for(var L=new Array(i),M=0;M<i;M++)L[M]=null;for(var I=0;I<v;I++)null===L[m=y[I]]?L[m]=a[I]:L[m]+=a[I];for(var D=0;D<i;D++)L[D]*=1/b[D];_=!1;for(var R=0;R<i;R++)if(L[R]!==x[R]){_=!0;break}x=L,++T>200&&(_=!1)}for(var N={},B=0;B<i;B++)N[B]=[];for(var j=0;j<v;j++)N[m=y[j]].push(a[j]);for(var U=[],F=0;F<i;F++)U.push(N[F][0]),U.push(N[F][N[F].length-1]);U=U.sort((function(t,e){return t-e})),o.push(U[0]);for(var W=1;W<U.length;W+=2){var z=U[W];isNaN(z)||-1!==o.indexOf(z)||o.push(z)}}return o},wi={analyze:xi,limits:Si},ki=Math.sqrt,Ci=Math.atan2,Ei=Math.abs,Ai=Math.cos,Pi=Math.PI,Oi={cool:function(){return ni([g.hsl(180,1,.9),g.hsl(250,.7,.4)])},hot:function(){return ni(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Li={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Mi=0,Ii=Object.keys(Li);Mi<Ii.length;Mi+=1){var Di=Ii[Mi];Li[Di.toLowerCase()]=Li[Di]}var Ri=Li;return g.average=function(t,e,i){void 0===e&&(e="lrgb"),void 0===i&&(i=null);var n=t.length;i||(i=Array.from(new Array(n)).map((function(){return 1})));var r=n/i.reduce((function(t,e){return t+e}));if(i.forEach((function(t,e){i[e]*=r})),t=t.map((function(t){return new p(t)})),"lrgb"===e)return ti(t,i);for(var s=t.shift(),a=s.get(e),o=[],l=0,h=0,u=0;u<a.length;u++)if(a[u]=(a[u]||0)*i[0],o.push(isNaN(a[u])?0:i[0]),"h"===e.charAt(u)&&!isNaN(a[u])){var c=a[u]/180*$e;l+=Qe(c)*i[0],h+=Ze(c)*i[0]}var d=s.alpha()*i[0];t.forEach((function(t,n){var r=t.get(e);d+=t.alpha()*i[n+1];for(var s=0;s<a.length;s++)if(!isNaN(r[s]))if(o[s]+=i[n+1],"h"===e.charAt(s)){var u=r[s]/180*$e;l+=Qe(u)*i[n+1],h+=Ze(u)*i[n+1]}else a[s]+=r[s]*i[n+1]}));for(var f=0;f<a.length;f++)if("h"===e.charAt(f)){for(var g=Je(h/o[f],l/o[f])/$e*180;g<0;)g+=360;for(;g>=360;)g-=360;a[f]=g}else a[f]=a[f]/o[f];return d/=n,new p(a,e).alpha(d>.99999?1:d,!0)},g.bezier=function(t){var e=si(t);return e.scale=function(){return ni(e)},e},g.blend=hi,g.cubehelix=function(t,e,i,n,r){void 0===t&&(t=300),void 0===e&&(e=-1.5),void 0===i&&(i=1),void 0===n&&(n=1),void 0===r&&(r=[0,1]);var s,a=0;"array"===ui(r)?s=r[1]-r[0]:(s=0,r=[r,r]);var o=function(o){var l=di*((t+120)/360+e*o),h=pi(r[0]+s*o,n),u=(0!==a?i[0]+o*a:i)*h*(1-h)/2,c=gi(l),d=fi(l);return g(ci([255*(h+u*(-.14861*c+1.78277*d)),255*(h+u*(-.29227*c-.90649*d)),255*(h+u*(1.97294*c)),1]))};return o.start=function(e){return null==e?t:(t=e,o)},o.rotations=function(t){return null==t?e:(e=t,o)},o.gamma=function(t){return null==t?n:(n=t,o)},o.hue=function(t){return null==t?i:("array"===ui(i=t)?0==(a=i[1]-i[0])&&(i=i[1]):a=0,o)},o.lightness=function(t){return null==t?r:("array"===ui(t)?(r=t,s=t[1]-t[0]):(r=[t,t],s=0),o)},o.scale=function(){return g.scale(o)},o.hue(i),o},g.mix=g.interpolate=We,g.random=function(){for(var t="#",e=0;e<6;e++)t+="0123456789abcdef".charAt(mi(16*vi()));return new p(t,"hex")},g.scale=ni,g.analyze=wi.analyze,g.contrast=function(t,e){t=new p(t),e=new p(e);var i=t.luminance(),n=e.luminance();return i>n?(i+.05)/(n+.05):(n+.05)/(i+.05)},g.deltaE=function(t,e,i,n){void 0===i&&(i=1),void 0===n&&(n=1),t=new p(t),e=new p(e);for(var r=Array.from(t.lab()),s=r[0],a=r[1],o=r[2],l=Array.from(e.lab()),h=l[0],u=l[1],c=l[2],d=ki(a*a+o*o),f=ki(u*u+c*c),g=s<16?.511:.040975*s/(1+.01765*s),m=.0638*d/(1+.0131*d)+.638,v=d<1e-6?0:180*Ci(o,a)/Pi;v<0;)v+=360;for(;v>=360;)v-=360;var y=v>=164&&v<=345?.56+Ei(.2*Ai(Pi*(v+168)/180)):.36+Ei(.4*Ai(Pi*(v+35)/180)),b=d*d*d*d,_=ki(b/(b+1900)),T=m*(_*y+1-_),x=d-f,S=a-u,w=o-c,k=(s-h)/(i*g),C=x/(n*m);return ki(k*k+C*C+(S*S+w*w-x*x)/(T*T))},g.distance=function(t,e,i){void 0===i&&(i="lab"),t=new p(t),e=new p(e);var n=t.get(i),r=e.get(i),s=0;for(var a in n){var o=(n[a]||0)-(r[a]||0);s+=o*o}return Math.sqrt(s)},g.limits=wi.limits,g.valid=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];try{return new(Function.prototype.bind.apply(p,[null].concat(t))),!0}catch(t){return!1}},g.scales=Oi,g.colors=be,g.brewer=Ri,g}()},740:function(t,e,i){"use strict";var n=i(989),r=i.n(n),s=i(990),a=i.n(s),o=i(30),l=i.n(o),h=i(11),u=i.n(h),c=(i(992),i(993),i(29)),d=i.n(c),p=i(994),f=i.n(p),g=i(940),m=i.n(g),v=i(995),y=i.n(v),b=i(997),_=i.n(b),T=i(1002),x=i.n(T),S=i(1004),w=i.n(S),k=i(942),C=i.n(k),E=i(1006),A=i.n(E),P=i(943),O=i.n(P),L=function(t){function e(){var e;return(e=t.call(this)||this).buffer="",e}return d()(e,t),e.prototype.push=function(t){var e;for(this.buffer+=t,e=this.buffer.indexOf("\n");e>-1;e=this.buffer.indexOf("\n"))this.trigger("data",this.buffer.substring(0,e)),this.buffer=this.buffer.substring(e+1)},e}(A.a),M=function(t){for(var e,i=t.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),n={},r=i.length;r--;)""!==i[r]&&((e=/([^=]*)=(.*)/.exec(i[r]).slice(1))[0]=e[0].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^\s+|\s+$/g,""),e[1]=e[1].replace(/^['"](.*)['"]$/g,"$1"),n[e[0]]=e[1]);return n},I=function(t){function e(){var e;return(e=t.call(this)||this).customParsers=[],e.tagMappers=[],e}d()(e,t);var i=e.prototype;return i.push=function(t){var e,i,n=this;0!==(t=t.trim()).length&&("#"===t[0]?this.tagMappers.reduce((function(e,i){var n=i(t);return n===t?e:e.concat([n])}),[t]).forEach((function(t){for(var r=0;r<n.customParsers.length;r++)if(n.customParsers[r].call(n,t))return;if(0===t.indexOf("#EXT"))if(t=t.replace("\r",""),e=/^#EXTM3U/.exec(t))n.trigger("data",{type:"tag",tagType:"m3u"});else{if(e=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(t))return i={type:"tag",tagType:"inf"},e[1]&&(i.duration=parseFloat(e[1])),e[2]&&(i.title=e[2]),void n.trigger("data",i);if(e=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"targetduration"},e[1]&&(i.duration=parseInt(e[1],10)),void n.trigger("data",i);if(e=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"totalduration"},e[1]&&(i.duration=parseInt(e[1],10)),void n.trigger("data",i);if(e=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"version"},e[1]&&(i.version=parseInt(e[1],10)),void n.trigger("data",i);if(e=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return i={type:"tag",tagType:"media-sequence"},e[1]&&(i.number=parseInt(e[1],10)),void n.trigger("data",i);if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(t))return i={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(i.number=parseInt(e[1],10)),void n.trigger("data",i);if(e=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(t))return i={type:"tag",tagType:"playlist-type"},e[1]&&(i.playlistType=e[1]),void n.trigger("data",i);if(e=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(t))return i={type:"tag",tagType:"byterange"},e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),void n.trigger("data",i);if(e=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(t))return i={type:"tag",tagType:"allow-cache"},e[1]&&(i.allowed=!/NO/.test(e[1])),void n.trigger("data",i);if(e=/^#EXT-X-MAP:?(.*)$/.exec(t)){if(i={type:"tag",tagType:"map"},e[1]){var s=M(e[1]);if(s.URI&&(i.uri=s.URI),s.BYTERANGE){var a=s.BYTERANGE.split("@"),o=a[0],l=a[1];i.byterange={},o&&(i.byterange.length=parseInt(o,10)),l&&(i.byterange.offset=parseInt(l,10))}}n.trigger("data",i)}else if(e=/^#EXT-X-STREAM-INF:?(.*)$/.exec(t)){if(i={type:"tag",tagType:"stream-inf"},e[1]){if(i.attributes=M(e[1]),i.attributes.RESOLUTION){var h=i.attributes.RESOLUTION.split("x"),u={};h[0]&&(u.width=parseInt(h[0],10)),h[1]&&(u.height=parseInt(h[1],10)),i.attributes.RESOLUTION=u}i.attributes.BANDWIDTH&&(i.attributes.BANDWIDTH=parseInt(i.attributes.BANDWIDTH,10)),i.attributes["PROGRAM-ID"]&&(i.attributes["PROGRAM-ID"]=parseInt(i.attributes["PROGRAM-ID"],10))}n.trigger("data",i)}else{if(e=/^#EXT-X-MEDIA:?(.*)$/.exec(t))return i={type:"tag",tagType:"media"},e[1]&&(i.attributes=M(e[1])),void n.trigger("data",i);if(e=/^#EXT-X-ENDLIST/.exec(t))n.trigger("data",{type:"tag",tagType:"endlist"});else if(e=/^#EXT-X-DISCONTINUITY/.exec(t))n.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(e=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(t))return i={type:"tag",tagType:"program-date-time"},e[1]&&(i.dateTimeString=e[1],i.dateTimeObject=new Date(e[1])),void n.trigger("data",i);if(e=/^#EXT-X-KEY:?(.*)$/.exec(t))return i={type:"tag",tagType:"key"},e[1]&&(i.attributes=M(e[1]),i.attributes.IV&&("0x"===i.attributes.IV.substring(0,2).toLowerCase()&&(i.attributes.IV=i.attributes.IV.substring(2)),i.attributes.IV=i.attributes.IV.match(/.{8}/g),i.attributes.IV[0]=parseInt(i.attributes.IV[0],16),i.attributes.IV[1]=parseInt(i.attributes.IV[1],16),i.attributes.IV[2]=parseInt(i.attributes.IV[2],16),i.attributes.IV[3]=parseInt(i.attributes.IV[3],16),i.attributes.IV=new Uint32Array(i.attributes.IV))),void n.trigger("data",i);if(e=/^#EXT-X-START:?(.*)$/.exec(t))return i={type:"tag",tagType:"start"},e[1]&&(i.attributes=M(e[1]),i.attributes["TIME-OFFSET"]=parseFloat(i.attributes["TIME-OFFSET"]),i.attributes.PRECISE=/YES/.test(i.attributes.PRECISE)),void n.trigger("data",i);if(e=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-out-cont"},e[1]?i.data=e[1]:i.data="",void n.trigger("data",i);if(e=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-out"},e[1]?i.data=e[1]:i.data="",void n.trigger("data",i);if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(t))return i={type:"tag",tagType:"cue-in"},e[1]?i.data=e[1]:i.data="",void n.trigger("data",i);n.trigger("data",{type:"tag",data:t.slice(4)})}}}else n.trigger("data",{type:"comment",text:t.slice(1)})})):this.trigger("data",{type:"uri",uri:t}))},i.addParser=function(t){var e=this,i=t.expression,n=t.customType,r=t.dataParser,s=t.segment;"function"!=typeof r&&(r=function(t){return t}),this.customParsers.push((function(t){if(i.exec(t))return e.trigger("data",{type:"custom",data:r(t),customType:n,segment:s}),!0}))},i.addTagMapper=function(t){var e=t.expression,i=t.map;this.tagMappers.push((function(t){return e.test(t)?i(t):t}))},e}(A.a),D=function(t){function e(){var e;(e=t.call(this)||this).lineStream=new L,e.parseStream=new I,e.lineStream.pipe(e.parseStream);var i,n,r=u()(e),s=[],a={},o=function(){},h={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},c=0;e.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var d=0;return e.parseStream.on("data",(function(t){var e,u;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=t.allowed,"allowed"in t||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var e={};"length"in t&&(a.byterange=e,e.length=t.length,"offset"in t||(t.offset=d)),"offset"in t&&(a.byterange=e,e.offset=t.offset),d=e.offset+e.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),t.duration>0&&(a.duration=t.duration),0===t.duration&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=s},key:function(){if(t.attributes)if("NONE"!==t.attributes.METHOD)if(t.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===t.attributes.KEYFORMAT){return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(t.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===t.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==t.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):t.attributes.KEYID&&"0x"===t.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:t.attributes.KEYFORMAT,keyId:t.attributes.KEYID.substring(2)},pssh:O()(t.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}))}t.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),n={method:t.attributes.METHOD||"AES-128",uri:t.attributes.URI},void 0!==t.attributes.IV&&(n.iv=t.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else n=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(t.number)?this.manifest.mediaSequence=t.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+t.number})},"discontinuity-sequence":function(){isFinite(t.number)?(this.manifest.discontinuitySequence=t.number,c=t.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+t.number})},"playlist-type":function(){/VOD|EVENT/.test(t.playlistType)?this.manifest.playlistType=t.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+t.playlist})},map:function(){i={},t.uri&&(i.uri=t.uri),t.byterange&&(i.byterange=t.byterange)},"stream-inf":function(){this.manifest.playlists=s,this.manifest.mediaGroups=this.manifest.mediaGroups||h,t.attributes?(a.attributes||(a.attributes={}),l()(a.attributes,t.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||h,t.attributes&&t.attributes.TYPE&&t.attributes["GROUP-ID"]&&t.attributes.NAME){var i=this.manifest.mediaGroups[t.attributes.TYPE];i[t.attributes["GROUP-ID"]]=i[t.attributes["GROUP-ID"]]||{},e=i[t.attributes["GROUP-ID"]],(u={default:/yes/i.test(t.attributes.DEFAULT)}).default?u.autoselect=!0:u.autoselect=/yes/i.test(t.attributes.AUTOSELECT),t.attributes.LANGUAGE&&(u.language=t.attributes.LANGUAGE),t.attributes.URI&&(u.uri=t.attributes.URI),t.attributes["INSTREAM-ID"]&&(u.instreamId=t.attributes["INSTREAM-ID"]),t.attributes.CHARACTERISTICS&&(u.characteristics=t.attributes.CHARACTERISTICS),t.attributes.FORCED&&(u.forced=/yes/i.test(t.attributes.FORCED)),e[t.attributes.NAME]=u}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){c+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(s.length)},"program-date-time":function(){void 0===this.manifest.dateTimeString&&(this.manifest.dateTimeString=t.dateTimeString,this.manifest.dateTimeObject=t.dateTimeObject),a.dateTimeString=t.dateTimeString,a.dateTimeObject=t.dateTimeObject},targetduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+t.duration}):this.manifest.targetDuration=t.duration},totalduration:function(){!isFinite(t.duration)||t.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+t.duration}):this.manifest.totalDuration=t.duration},start:function(){t.attributes&&!isNaN(t.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:t.attributes["TIME-OFFSET"],precise:t.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){a.cueOut=t.data},"cue-out-cont":function(){a.cueOutCont=t.data},"cue-in":function(){a.cueIn=t.data}}[t.tagType]||o).call(r)},uri:function(){a.uri=t.uri,s.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),n&&(a.key=n),a.timeline=c,i&&(a.map=i),a={}},comment:function(){},custom:function(){t.segment?(a.custom=a.custom||{},a.custom[t.customType]=t.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[t.customType]=t.data)}})[t.type].call(r)})),e}d()(e,t);var i=e.prototype;return i.push=function(t){this.lineStream.push(t)},i.end=function(){this.lineStream.push("\n")},i.addParser=function(t){this.parseStream.addParser(t)},i.addTagMapper=function(t){this.parseStream.addTagMapper(t)},e}(A.a),R=i(1011),N=i(764),B=i.n(N),j=i(1012),U=function(t){return!!t&&"object"==typeof t},F=function t(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return i.reduce((function(e,i){return"object"!=typeof i||Object.keys(i).forEach((function(n){Array.isArray(e[n])&&Array.isArray(i[n])?e[n]=e[n].concat(i[n]):U(e[n])&&U(i[n])?e[n]=t(e[n],i[n]):e[n]=i[n]})),e}),{})},W=function(t){return t.reduce((function(t,e){return t.concat(e)}),[])},z=function(t){if(!t.length)return[];for(var e=[],i=0;i<t.length;i++)e.push(t[i]);return e},H="INVALID_NUMBER_OF_PERIOD",V="DASH_EMPTY_MANIFEST",G="DASH_INVALID_XML",X="NO_BASE_URL",q="SEGMENT_TIME_UNSPECIFIED",Y="UNSUPPORTED_UTC_TIMING_SCHEME",K=function(t){var e=t.baseUrl,i=void 0===e?"":e,n=t.source,r=void 0===n?"":n,s=t.range,a=void 0===s?"":s,o=t.indexRange,l=void 0===o?"":o,h={uri:r,resolvedUri:C()(i||"",r)};if(a||l){var u=(a||l).split("-"),c=parseInt(u[0],10),d=parseInt(u[1],10);h.byterange={length:d-c+1,offset:c}}return h},$={static:function(t){var e=t.duration,i=t.timescale,n=void 0===i?1:i,r=t.sourceDuration;return{start:0,end:Math.ceil(r/(e/n))}},dynamic:function(t){var e=t.NOW,i=t.clientOffset,n=t.availabilityStartTime,r=t.timescale,s=void 0===r?1:r,a=t.duration,o=t.start,l=void 0===o?0:o,h=t.minimumUpdatePeriod,u=void 0===h?0:h,c=t.timeShiftBufferDepth,d=void 0===c?1/0:c,p=(e+i)/1e3,f=n+l,g=p+u-f,m=Math.ceil(g*s/a),v=Math.floor((p-f-d)*s/a),y=Math.floor((p-f)*s/a);return{start:Math.max(0,v),end:Math.min(m,y)}}},Q=function(t){var e=t.type,i=void 0===e?"static":e,n=t.duration,r=t.timescale,s=void 0===r?1:r,a=t.sourceDuration,o=$[i](t),l=function(t,e){for(var i=[],n=t;n<e;n++)i.push(n);return i}(o.start,o.end).map(function(t){return function(e,i){var n=t.duration,r=t.timescale,s=void 0===r?1:r,a=t.periodIndex,o=t.startNumber;return{number:(void 0===o?1:o)+e,duration:n/s,timeline:a,time:i*n}}}(t));if("static"===i){var h=l.length-1;l[h].duration=a-n/s*h}return l},Z=function(t){var e=t.baseUrl,i=t.initialization,n=void 0===i?{}:i,r=t.sourceDuration,s=t.indexRange,a=void 0===s?"":s,o=t.duration;if(!e)throw new Error(X);var l=K({baseUrl:e,source:n.sourceURL,range:n.range}),h=K({baseUrl:e,source:e,indexRange:a});if(h.map=l,o){var u=Q(t);u.length&&(h.duration=u[0].duration,h.timeline=u[0].timeline)}else r&&(h.duration=r,h.timeline=0);return h.number=0,[h]},J=function(t,e,i){for(var n=t.sidx.map?t.sidx.map:null,r=t.sidx.duration,s=t.timeline||0,a=t.sidx.byterange,o=a.offset+a.length,l=e.timescale,h=e.references.filter((function(t){return 1!==t.referenceType})),u=[],c=o+e.firstOffset,d=0;d<h.length;d++){var p=e.references[d],f=p.referencedSize,g=p.subsegmentDuration,m=Z({baseUrl:i,timescale:l,timeline:s,periodIndex:s,duration:g,sourceDuration:r,indexRange:c+"-"+(c+f-1)})[0];n&&(m.map=n),u.push(m),c+=f}return t.segments=u,t},tt=function(t){var e;return(e=t.reduce((function(t,e){var i,n=e.attributes.id+(e.attributes.lang||"");return t[n]?(e.segments[0]&&(e.segments[0].discontinuity=!0),(i=t[n].segments).push.apply(i,e.segments),e.attributes.contentProtection&&(t[n].attributes.contentProtection=e.attributes.contentProtection)):t[n]=e,t}),{}),Object.keys(e).map((function(t){return e[t]}))).map((function(t){var e,i;return t.discontinuityStarts=(e=t.segments,i="discontinuity",e.reduce((function(t,e,n){return e[i]&&t.push(n),t}),[])),t}))},et=function(t,e){if(void 0===e&&(e={}),!Object.keys(e).length)return t;for(var i in t){var n=t[i];if(n.sidx){var r=n.sidx.uri+"-"+(a=n.sidx.byterange,o=void 0,o=a.offset+a.length-1,a.offset+"-"+o),s=e[r]&&e[r].sidx;n.sidx&&s&&J(n,s,n.sidx.resolvedUri)}}var a,o;return t},it=function(t){var e,i=t.attributes,n=t.segments,r=t.sidx,s={attributes:(e={NAME:i.id,BANDWIDTH:i.bandwidth,CODECS:i.codecs},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};return i.contentProtection&&(s.contentProtection=i.contentProtection),r&&(s.sidx=r),s},nt=function(t){var e,i=t.attributes,n=t.segments;void 0===n&&(n=[{uri:i.baseUrl,timeline:i.periodIndex,resolvedUri:i.baseUrl||"",duration:i.sourceDuration,number:0}],i.duration=i.sourceDuration);var r=((e={NAME:i.id,BANDWIDTH:i.bandwidth})["PROGRAM-ID"]=1,e);return i.codecs&&(r.CODECS=i.codecs),{attributes:r,uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:i.baseUrl||"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1}},rt=function(t){var e,i=t.attributes,n=t.segments,r=t.sidx,s={attributes:(e={NAME:i.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:i.width,height:i.height},CODECS:i.codecs,BANDWIDTH:i.bandwidth},e["PROGRAM-ID"]=1,e),uri:"",endList:"static"===(i.type||"static"),timeline:i.periodIndex,resolvedUri:"",targetDuration:i.duration,segments:n,mediaSequence:n.length?n[0].number:1};return i.contentProtection&&(s.contentProtection=i.contentProtection),r&&(s.sidx=r),s},st=function(t,e,i){var n;if(void 0===i&&(i={}),!t.length)return{};var r=t[0].attributes,s=r.sourceDuration,a=r.type,o=void 0===a?"static":a,l=r.suggestedPresentationDelay,h=r.minimumUpdatePeriod,u=tt(t.filter((function(t){var e=t.attributes;return"video/mp4"===e.mimeType||"video/webm"===e.mimeType||"video"===e.contentType}))).map(rt),c=tt(t.filter((function(t){var e=t.attributes;return"audio/mp4"===e.mimeType||"audio/webm"===e.mimeType||"audio"===e.contentType}))),d=t.filter((function(t){var e=t.attributes;return"text/vtt"===e.mimeType||"text"===e.contentType})),p={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(n={AUDIO:{},VIDEO:{}},n["CLOSED-CAPTIONS"]={},n.SUBTITLES={},n),uri:"",duration:s,playlists:et(u,i)};return h>=0&&(p.minimumUpdatePeriod=1e3*h),e&&(p.locations=e),"dynamic"===o&&(p.suggestedPresentationDelay=l),c.length&&(p.mediaGroups.AUDIO.audio=function(t,e){var i;void 0===e&&(e={});var n=t.reduce((function(t,n){var r=n.attributes.role&&n.attributes.role.value||"",s=n.attributes.lang||"",a="main";if(s){var o=r?" ("+r+")":"";a=""+n.attributes.lang+o}return t[a]&&t[a].playlists[0].attributes.BANDWIDTH>n.attributes.bandwidth||(t[a]={language:s,autoselect:!0,default:"main"===r,playlists:et([it(n)],e),uri:""},void 0===i&&"main"===r&&((i=n).default=!0)),t}),{});i||(n[Object.keys(n)[0]].default=!0);return n}(c,i)),d.length&&(p.mediaGroups.SUBTITLES.subs=function(t,e){return void 0===e&&(e={}),t.reduce((function(t,i){var n=i.attributes.lang||"text";return t[n]||(t[n]={language:n,default:!1,autoselect:!1,playlists:et([nt(i)],e),uri:""}),t}),{})}(d,i)),p},at=function(t,e,i){var n=t.NOW,r=t.clientOffset,s=t.availabilityStartTime,a=t.timescale,o=void 0===a?1:a,l=t.start,h=void 0===l?0:l,u=t.minimumUpdatePeriod,c=(n+r)/1e3+(void 0===u?0:u)-(s+h);return Math.ceil((c*o-e)/i)},ot=function(t,e){for(var i=t.type,n=void 0===i?"static":i,r=t.minimumUpdatePeriod,s=void 0===r?0:r,a=t.media,o=void 0===a?"":a,l=t.sourceDuration,h=t.timescale,u=void 0===h?1:h,c=t.startNumber,d=void 0===c?1:c,p=t.periodIndex,f=[],g=-1,m=0;m<e.length;m++){var v=e[m],y=v.d,b=v.r||0,_=v.t||0;g<0&&(g=_),_&&_>g&&(g=_);var T=void 0;if(b<0){var x=m+1;T=x===e.length?"dynamic"===n&&s>0&&o.indexOf("$Number$")>0?at(t,g,y):(l*u-g)/y:(e[x].t-g)/y}else T=b+1;for(var S=d+f.length+T,w=d+f.length;w<S;)f.push({number:w,duration:y/u,time:g,timeline:p}),g+=y,w++}return f},lt=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,ht=function(t,e){return t.replace(lt,function(t){return function(e,i,n,r){if("$$"===e)return"$";if(void 0===t[i])return e;var s=""+t[i];return"RepresentationID"===i?s:(r=n?parseInt(r,10):1,s.length>=r?s:""+new Array(r-s.length+1).join("0")+s)}}(e))},ut=function(t,e){var i={RepresentationID:t.id,Bandwidth:t.bandwidth||0},n=t.initialization,r=void 0===n?{sourceURL:"",range:""}:n,s=K({baseUrl:t.baseUrl,source:ht(r.sourceURL,i),range:r.range});return function(t,e){return t.duration||e?t.duration?Q(t):ot(t,e):[{number:t.startNumber||1,duration:t.sourceDuration,time:0,timeline:t.periodIndex}]}(t,e).map((function(e){i.Number=e.number,i.Time=e.time;var n=ht(t.media||"",i);return{uri:n,timeline:e.timeline,duration:e.duration,resolvedUri:C()(t.baseUrl||"",n),map:s,number:e.number}}))},ct=function(t,e){var i=t.duration,n=t.segmentUrls,r=void 0===n?[]:n;if(!i&&!e||i&&e)throw new Error(q);var s,a=r.map((function(e){return function(t,e){var i=t.baseUrl,n=t.initialization,r=void 0===n?{}:n,s=K({baseUrl:i,source:r.sourceURL,range:r.range}),a=K({baseUrl:i,source:e.media,range:e.mediaRange});return a.map=s,a}(t,e)}));return i&&(s=Q(t)),e&&(s=ot(t,e)),s.map((function(t,e){if(a[e]){var i=a[e];return i.timeline=t.timeline,i.duration=t.duration,i.number=t.number,i}})).filter((function(t){return t}))},dt=function(t){var e,i,n=t.attributes,r=t.segmentInfo;r.template?(i=ut,e=F(n,r.template)):r.base?(i=Z,e=F(n,r.base)):r.list&&(i=ct,e=F(n,r.list));var s={attributes:n};if(!i)return s;var a=i(e,r.timeline);if(e.duration){var o=e,l=o.duration,h=o.timescale,u=void 0===h?1:h;e.duration=l/u}else a.length?e.duration=a.reduce((function(t,e){return Math.max(t,Math.ceil(e.duration))}),0):e.duration=0;return s.attributes=e,s.segments=a,r.base&&e.indexRange&&(s.sidx=a[0],s.segments=[]),s},pt=function(t,e){return z(t.childNodes).filter((function(t){return t.tagName===e}))},ft=function(t){return t.textContent.trim()},gt=function(t){var e=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(t);if(!e)return 0;var i=e.slice(1),n=i[0],r=i[1],s=i[2],a=i[3],o=i[4],l=i[5];return 31536e3*parseFloat(n||0)+2592e3*parseFloat(r||0)+86400*parseFloat(s||0)+3600*parseFloat(a||0)+60*parseFloat(o||0)+parseFloat(l||0)},mt={mediaPresentationDuration:function(t){return gt(t)},availabilityStartTime:function(t){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e=t)&&(e+="Z"),Date.parse(e)/1e3;var e},minimumUpdatePeriod:function(t){return gt(t)},suggestedPresentationDelay:function(t){return gt(t)},type:function(t){return t},timeShiftBufferDepth:function(t){return gt(t)},start:function(t){return gt(t)},width:function(t){return parseInt(t,10)},height:function(t){return parseInt(t,10)},bandwidth:function(t){return parseInt(t,10)},startNumber:function(t){return parseInt(t,10)},timescale:function(t){return parseInt(t,10)},duration:function(t){var e=parseInt(t,10);return isNaN(e)?gt(t):e},d:function(t){return parseInt(t,10)},t:function(t){return parseInt(t,10)},r:function(t){return parseInt(t,10)},DEFAULT:function(t){return t}},vt=function(t){return t&&t.attributes?z(t.attributes).reduce((function(t,e){var i=mt[e.name]||mt.DEFAULT;return t[e.name]=i(e.value),t}),{}):{}},yt={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},bt=function(t,e){return e.length?W(t.map((function(t){return e.map((function(e){return C()(t,ft(e))}))}))):t},_t=function(t){var e=pt(t,"SegmentTemplate")[0],i=pt(t,"SegmentList")[0],n=i&&pt(i,"SegmentURL").map((function(t){return F({tag:"SegmentURL"},vt(t))})),r=pt(t,"SegmentBase")[0],s=i||e,a=s&&pt(s,"SegmentTimeline")[0],o=i||r||e,l=o&&pt(o,"Initialization")[0],h=e&&vt(e);h&&l?h.initialization=l&&vt(l):h&&h.initialization&&(h.initialization={sourceURL:h.initialization});var u={template:h,timeline:a&&pt(a,"S").map((function(t){return vt(t)})),list:i&&F(vt(i),{segmentUrls:n,initialization:vt(l)}),base:r&&F(vt(r),{initialization:vt(l)})};return Object.keys(u).forEach((function(t){u[t]||delete u[t]})),u},Tt=function(t,e,i){return function(n){var r=vt(n),s=bt(e,pt(n,"BaseURL")),a=pt(n,"Role")[0],o={role:vt(a)},l=F(t,r,o),h=pt(n,"ContentProtection").reduce((function(t,e){var i=vt(e),n=yt[i.schemeIdUri];if(n){t[n]={attributes:i};var r=pt(e,"cenc:pssh")[0];if(r){var s=ft(r),a=s&&O()(s);t[n].pssh=a}}return t}),{});Object.keys(h).length&&(l=F(l,{contentProtection:h}));var u=_t(n),c=pt(n,"Representation"),d=F(i,u);return W(c.map(function(t,e,i){return function(n){var r=pt(n,"BaseURL"),s=bt(e,r),a=F(t,vt(n)),o=_t(n);return s.map((function(t){return{segmentInfo:F(i,o),attributes:F(a,{baseUrl:t})}}))}}(l,s,d)))}},xt=function(t,e){return function(i,n){var r=bt(e,pt(i,"BaseURL")),s=vt(i),a=parseInt(s.id,10),o=B.a.isNaN(a)?n:a,l=F(t,{periodIndex:o}),h=pt(i,"AdaptationSet"),u=_t(i);return W(h.map(Tt(l,r,u)))}},St=function(t){if(""===t)throw new Error(V);var e,i,n=new j.DOMParser;try{i=(e=n.parseFromString(t,"application/xml"))&&"MPD"===e.documentElement.tagName?e.documentElement:null}catch(t){}if(!i||i&&i.getElementsByTagName("parsererror").length>0)throw new Error(G);return i},wt=function(t,e){void 0===e&&(e={});var i=function(t,e){void 0===e&&(e={});var i=e,n=i.manifestUri,r=void 0===n?"":n,s=i.NOW,a=void 0===s?Date.now():s,o=i.clientOffset,l=void 0===o?0:o,h=pt(t,"Period");if(!h.length)throw new Error(H);var u=pt(t,"Location"),c=vt(t),d=bt([r],pt(t,"BaseURL"));return c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=a,c.clientOffset=l,u.length&&(c.locations=u.map(ft)),{locations:c.locations,representationInfo:W(h.map(xt(c,d)))}}(St(t),e),n=i.representationInfo.map(dt);return st(n,i.locations,e.sidxMapping)},kt=function(t){return function(t){var e=pt(t,"UTCTiming")[0];if(!e)return null;var i=vt(e);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Y)}return i}(St(t))},Ct=J,Et=i(1014),At=i.n(Et),Pt=i(1015),Ot=i(1016),Lt=i(1017),Mt=i.n(Lt),It=i(946),Dt=i(1022),Rt=i.n(Dt),Nt=i(1028),Bt=[];var jt=function t(e){var i,n="info",s=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];i("log",n,e)};return i=function(t,e){return function(i,n,s){var a=e.levels[n],o=new RegExp("^("+a+")$");if("log"!==i&&s.unshift(i.toUpperCase()+":"),s.unshift(t+":"),Bt){Bt.push([].concat(s));var l=Bt.length-1e3;Bt.splice(0,l>0?l:0)}if(r.a.console){var h=r.a.console[i];h||"debug"!==i||(h=r.a.console.info||r.a.console.log),h&&a&&o.test(i)&&h[Array.isArray(s)?"apply":"call"](r.a.console,s)}}}(e,s),s.createLogger=function(i){return t(e+": "+i)},s.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},s.level=function(t){if("string"==typeof t){if(!s.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');n=t}return n},(s.history=function(){return Bt?[].concat(Bt):[]}).filter=function(t){return(Bt||[]).filter((function(e){return new RegExp(".*"+t+".*").test(e[0])}))},s.history.clear=function(){Bt&&(Bt.length=0)},s.history.disable=function(){null!==Bt&&(Bt.length=0,Bt=null)},s.history.enable=function(){null===Bt&&(Bt=[])},s.error=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return i("error",n,e)},s.warn=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return i("warn",n,e)},s.debug=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return i("debug",n,e)},s}("VIDEOJS"),Ut=jt.createLogger,Ft=Object.prototype.toString,Wt=function(t){return Vt(t)?Object.keys(t):[]};function zt(t,e){Wt(t).forEach((function(i){return e(t[i],i)}))}function Ht(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return Object.assign?l.a.apply(void 0,[t].concat(i)):(i.forEach((function(e){e&&zt(e,(function(e,i){t[i]=e}))})),t)}function Vt(t){return!!t&&"object"==typeof t}function Gt(t){return Vt(t)&&"[object Object]"===Ft.call(t)&&t.constructor===Object}function Xt(t,e){if(!t||!e)return"";if("function"==typeof r.a.getComputedStyle){var i=r.a.getComputedStyle(t);return i?i.getPropertyValue(e)||i[e]:""}return""}function qt(t){return"string"==typeof t&&Boolean(t.trim())}function Yt(t){if(t.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function Kt(){return a.a===r.a.document}function $t(t){return Vt(t)&&1===t.nodeType}function Qt(){try{return r.a.parent!==r.a.self}catch(t){return!0}}function Zt(t){return function(e,i){if(!qt(e))return a.a[t](null);qt(i)&&(i=a.a.querySelector(i));var n=$t(i)?i:a.a;return n[t]&&n[t](e)}}function Jt(t,e,i,n){void 0===t&&(t="div"),void 0===e&&(e={}),void 0===i&&(i={});var r=a.a.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var i=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(jt.warn("Setting attributes in the second argument of createEl()\nhas been deprecated. Use the third argument instead.\ncreateEl(type, properties, attributes). Attempting to set "+t+" to "+i+"."),r.setAttribute(t,i)):"textContent"===t?te(r,i):r[t]===i&&"tabIndex"!==t||(r[t]=i)})),Object.getOwnPropertyNames(i).forEach((function(t){r.setAttribute(t,i[t])})),n&&be(r,n),r}function te(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function ee(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function ie(t,e){return Yt(e),t.classList?t.classList.contains(e):(i=e,new RegExp("(^|\\s)"+i+"($|\\s)")).test(t.className);var i}function ne(t,e){return t.classList?t.classList.add(e):ie(t,e)||(t.className=(t.className+" "+e).trim()),t}function re(t,e){return t.classList?t.classList.remove(e):(Yt(e),t.className=t.className.split(/\s+/).filter((function(t){return t!==e})).join(" ")),t}function se(t,e,i){var n=ie(t,e);if("function"==typeof i&&(i=i(t,e)),"boolean"!=typeof i&&(i=!n),i!==n)return i?ne(t,e):re(t,e),t}function ae(t,e){Object.getOwnPropertyNames(e).forEach((function(i){var n=e[i];null==n||!1===n?t.removeAttribute(i):t.setAttribute(i,!0===n?"":n)}))}function oe(t){var e={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,r=n.length-1;r>=0;r--){var s=n[r].name,a=n[r].value;"boolean"!=typeof t[s]&&-1===i.indexOf(","+s+",")||(a=null!==a),e[s]=a}return e}function le(t,e){return t.getAttribute(e)}function he(t,e,i){t.setAttribute(e,i)}function ue(t,e){t.removeAttribute(e)}function ce(){a.a.body.focus(),a.a.onselectstart=function(){return!1}}function de(){a.a.onselectstart=function(){return!0}}function pe(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((function(t){void 0!==e[t]&&(i[t]=e[t])})),i.height||(i.height=parseFloat(Xt(t,"height"))),i.width||(i.width=parseFloat(Xt(t,"width"))),i}}function fe(t){if(!t||t&&!t.offsetParent)return{left:0,top:0,width:0,height:0};var e=t.offsetWidth,i=t.offsetHeight,n=0,r=0;do{n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent}while(t);return{left:n,top:r,width:e,height:i}}function ge(t,e){var i={},n=fe(e.target),r=fe(t),s=r.width,a=r.height,o=e.offsetY-(r.top-n.top),l=e.offsetX-(r.left-n.left);return e.changedTouches&&(l=e.changedTouches[0].pageX-r.left,o=e.changedTouches[0].pageY+r.top),i.y=1-Math.max(0,Math.min(1,o/a)),i.x=Math.max(0,Math.min(1,l/s)),i}function me(t){return Vt(t)&&3===t.nodeType}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function ye(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),$t(t)||me(t)?t:"string"==typeof t&&/\S/.test(t)?a.a.createTextNode(t):void 0})).filter((function(t){return t}))}function be(t,e){return ye(e).forEach((function(e){return t.appendChild(e)})),t}function _e(t,e){return be(ve(t),e)}function Te(t){return void 0===t.button&&void 0===t.buttons||(0===t.button&&void 0===t.buttons||("mouseup"===t.type&&0===t.button&&0===t.buttons||0===t.button&&1===t.buttons))}var xe,Se=Zt("querySelector"),we=Zt("querySelectorAll"),ke=Object.freeze({__proto__:null,isReal:Kt,isEl:$t,isInFrame:Qt,createEl:Jt,textContent:te,prependTo:ee,hasClass:ie,addClass:ne,removeClass:re,toggleClass:se,setAttributes:ae,getAttributes:oe,getAttribute:le,setAttribute:he,removeAttribute:ue,blockTextSelection:ce,unblockTextSelection:de,getBoundingClientRect:pe,findPosition:fe,getPointerPosition:ge,isTextNode:me,emptyEl:ve,normalizeContent:ye,appendContent:be,insertContent:_e,isSingleLeftClick:Te,$:Se,$$:we}),Ce=!1,Ee=function(){if(Kt()&&!1!==xe.options.autoSetup){var t=Array.prototype.slice.call(a.a.getElementsByTagName("video")),e=Array.prototype.slice.call(a.a.getElementsByTagName("audio")),i=Array.prototype.slice.call(a.a.getElementsByTagName("video-js")),n=t.concat(e,i);if(n&&n.length>0)for(var r=0,s=n.length;r<s;r++){var o=n[r];if(!o||!o.getAttribute){Ae(1);break}void 0===o.player&&null!==o.getAttribute("data-setup")&&xe(o)}else Ce||Ae(1)}};function Ae(t,e){e&&(xe=e),r.a.setTimeout(Ee,t)}function Pe(){Ce=!0,r.a.removeEventListener("load",Pe)}Kt()&&("complete"===a.a.readyState?Pe():r.a.addEventListener("load",Pe));var Oe,Le=function(t){var e=a.a.createElement("style");return e.className=t,e},Me=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},Ie=3;function De(){return Ie++}r.a.WeakMap||(Oe=function(){function t(){this.vdata="vdata"+Math.floor(r.a.performance&&r.a.performance.now()||Date.now()),this.data={}}var e=t.prototype;return e.set=function(t,e){var i=t[this.vdata]||De();return t[this.vdata]||(t[this.vdata]=i),this.data[i]=e,this},e.get=function(t){var e=t[this.vdata];if(e)return this.data[e];jt("We have no data for this element",t)},e.has=function(t){return t[this.vdata]in this.data},e.delete=function(t){var e=t[this.vdata];e&&(delete this.data[e],delete t[this.vdata])},t}());var Re,Ne=r.a.WeakMap?new WeakMap:new Oe;function Be(t,e){if(Ne.has(t)){var i=Ne.get(t);0===i.handlers[e].length&&(delete i.handlers[e],t.removeEventListener?t.removeEventListener(e,i.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&Ne.delete(t)}}function je(t,e,i,n){i.forEach((function(i){t(e,i,n)}))}function Ue(t){if(t.fixed_)return t;function e(){return!0}function i(){return!1}if(!t||!t.isPropagationStopped){var n=t||r.a.event;for(var s in t={},n)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&n.preventDefault||(t[s]=n[s]));if(t.target||(t.target=t.srcElement||a.a),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){n.preventDefault&&n.preventDefault(),t.returnValue=!1,n.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),t.cancelBubble=!0,n.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=i,t.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=i,null!==t.clientX&&void 0!==t.clientX){var o=a.a.documentElement,l=a.a.body;t.pageX=t.clientX+(o&&o.scrollLeft||l&&l.scrollLeft||0)-(o&&o.clientLeft||l&&l.clientLeft||0),t.pageY=t.clientY+(o&&o.scrollTop||l&&l.scrollTop||0)-(o&&o.clientTop||l&&l.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t.fixed_=!0,t}var Fe=["touchstart","touchmove"];function We(t,e,i){if(Array.isArray(e))return je(We,t,e,i);Ne.has(t)||Ne.set(t,{});var n=Ne.get(t);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),i.guid||(i.guid=De()),n.handlers[e].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(e,i){if(!n.disabled){e=Ue(e);var r=n.handlers[e.type];if(r)for(var s=r.slice(0),a=0,o=s.length;a<o&&!e.isImmediatePropagationStopped();a++)try{s[a].call(t,e,i)}catch(t){jt.error(t)}}}),1===n.handlers[e].length)if(t.addEventListener){var s=!1;(function(){if("boolean"!=typeof Re){Re=!1;try{var t=Object.defineProperty({},"passive",{get:function(){Re=!0}});r.a.addEventListener("test",null,t),r.a.removeEventListener("test",null,t)}catch(t){}}return Re})()&&Fe.indexOf(e)>-1&&(s={passive:!0}),t.addEventListener(e,n.dispatcher,s)}else t.attachEvent&&t.attachEvent("on"+e,n.dispatcher)}function ze(t,e,i){if(Ne.has(t)){var n=Ne.get(t);if(n.handlers){if(Array.isArray(e))return je(ze,t,e,i);var r=function(t,e){n.handlers[e]=[],Be(t,e)};if(void 0!==e){var s=n.handlers[e];if(s)if(i){if(i.guid)for(var a=0;a<s.length;a++)s[a].guid===i.guid&&s.splice(a--,1);Be(t,e)}else r(t,e)}else for(var o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&r(t,o)}}}function He(t,e,i){var n=Ne.has(t)?Ne.get(t):{},r=t.parentNode||t.ownerDocument;if("string"==typeof e?e={type:e,target:t}:e.target||(e.target=t),e=Ue(e),n.dispatcher&&n.dispatcher.call(t,e,i),r&&!e.isPropagationStopped()&&!0===e.bubbles)He.call(null,r,e,i);else if(!r&&!e.defaultPrevented&&e.target&&e.target[e.type]){Ne.has(e.target)||Ne.set(e.target,{});var s=Ne.get(e.target);e.target[e.type]&&(s.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),s.disabled=!1)}return!e.defaultPrevented}function Ve(t,e,i){if(Array.isArray(e))return je(Ve,t,e,i);var n=function n(){ze(t,e,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||De(),We(t,e,n)}function Ge(t,e,i){var n=function n(){ze(t,e,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||De(),We(t,e,n)}var Xe,qe=Object.freeze({__proto__:null,fixEvent:Ue,on:We,off:ze,trigger:He,one:Ve,any:Ge}),Ye=function(t,e,i){e.guid||(e.guid=De());var n=e.bind(t);return n.guid=i?i+"_"+e.guid:e.guid,n},Ke=function(t,e){var i=r.a.performance.now();return function(){var n=r.a.performance.now();n-i>=e&&(t.apply(void 0,arguments),i=n)}},$e=function(){};$e.prototype.allowedEvents_={},$e.prototype.on=function(t,e){var i=this.addEventListener;this.addEventListener=function(){},We(this,t,e),this.addEventListener=i},$e.prototype.addEventListener=$e.prototype.on,$e.prototype.off=function(t,e){ze(this,t,e)},$e.prototype.removeEventListener=$e.prototype.off,$e.prototype.one=function(t,e){var i=this.addEventListener;this.addEventListener=function(){},Ve(this,t,e),this.addEventListener=i},$e.prototype.any=function(t,e){var i=this.addEventListener;this.addEventListener=function(){},Ge(this,t,e),this.addEventListener=i},$e.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=Ue(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),He(this,t)},$e.prototype.dispatchEvent=$e.prototype.trigger,$e.prototype.queueTrigger=function(t){var e=this;Xe||(Xe=new Map);var i=t.type||t,n=Xe.get(this);n||(n=new Map,Xe.set(this,n));var s=n.get(i);n.delete(i),r.a.clearTimeout(s);var a=r.a.setTimeout((function(){0===n.size&&(n=null,Xe.delete(e)),e.trigger(t)}),0);n.set(i,a)};var Qe=function(t){return t instanceof $e||!!t.eventBusEl_&&["on","one","off","trigger"].every((function(e){return"function"==typeof t[e]}))},Ze=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},Je=function(t){if(!t.nodeName&&!Qe(t))throw new Error("Invalid target; must be a DOM node or evented object.")},ti=function(t){if(!Ze(t))throw new Error("Invalid event type; must be a non-empty string or array.")},ei=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},ii=function(t,e){var i,n,r,s=e.length<3||e[0]===t||e[0]===t.eventBusEl_;return s?(i=t.eventBusEl_,e.length>=3&&e.shift(),n=e[0],r=e[1]):(i=e[0],n=e[1],r=e[2]),Je(i),ti(n),ei(r),{isTargetingSelf:s,target:i,type:n,listener:r=Ye(t,r)}},ni=function(t,e,i,n){Je(t),t.nodeName?qe[e](t,i,n):t[e](i,n)},ri={on:function(){for(var t=this,e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];var r=ii(this,i),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(ni(a,"on",o,l),!s){var h=function(){return t.off(a,o,l)};h.guid=l.guid;var u=function(){return t.off("dispose",h)};u.guid=l.guid,ni(this,"on","dispose",h),ni(a,"on","dispose",u)}},one:function(){for(var t=this,e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];var r=ii(this,i),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(s)ni(a,"one",o,l);else{var h=function e(){t.off(a,o,e);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];l.apply(null,n)};h.guid=l.guid,ni(a,"one",o,h)}},any:function(){for(var t=this,e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];var r=ii(this,i),s=r.isTargetingSelf,a=r.target,o=r.type,l=r.listener;if(s)ni(a,"any",o,l);else{var h=function e(){t.off(a,o,e);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];l.apply(null,n)};h.guid=l.guid,ni(a,"any",o,h)}},off:function(t,e,i){if(!t||Ze(t))ze(this.eventBusEl_,t,e);else{var n=t,r=e;Je(n),ti(r),ei(i),i=Ye(this,i),this.off("dispose",i),n.nodeName?(ze(n,r,i),ze(n,"dispose",i)):Qe(n)&&(n.off(r,i),n.off("dispose",i))}},trigger:function(t,e){return He(this.eventBusEl_,t,e)}};function si(t,e){void 0===e&&(e={});var i=e.eventBusKey;if(i){if(!t[i].nodeName)throw new Error('The eventBusKey "'+i+'" does not refer to an element.');t.eventBusEl_=t[i]}else t.eventBusEl_=Jt("span",{className:"vjs-event-bus"});return Ht(t,ri),t.eventedCallbacks&&t.eventedCallbacks.forEach((function(t){t()})),t.on("dispose",(function(){t.off(),r.a.setTimeout((function(){t.eventBusEl_=null}),0)})),t}var ai={state:{},setState:function(t){var e,i=this;return"function"==typeof t&&(t=t()),zt(t,(function(t,n){i.state[n]!==t&&((e=e||{})[n]={from:i.state[n],to:t}),i.state[n]=t})),e&&Qe(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function oi(t,e){return Ht(t,ai),t.state=Ht({},t.state,e),"function"==typeof t.handleStateChanged&&Qe(t)&&t.on("statechanged",t.handleStateChanged),t}var li=function(t){return"string"!=typeof t?t:t.replace(/./,(function(t){return t.toLowerCase()}))},hi=function(t){return"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))};function ui(){for(var t={},e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return i.forEach((function(e){e&&zt(e,(function(e,i){Gt(e)?(Gt(t[i])||(t[i]={}),t[i]=ui(t[i],e)):t[i]=e}))})),t}var ci=function(){function t(){this.map_={}}var e=t.prototype;return e.has=function(t){return t in this.map_},e.delete=function(t){var e=this.has(t);return delete this.map_[t],e},e.set=function(t,e){return this.map_[t]=e,this},e.forEach=function(t,e){for(var i in this.map_)t.call(e,this.map_[i],i,this)},t}(),di=r.a.Map?r.a.Map:ci,pi=function(){function t(){this.set_={}}var e=t.prototype;return e.has=function(t){return t in this.set_},e.delete=function(t){var e=this.has(t);return delete this.set_[t],e},e.add=function(t){return this.set_[t]=1,this},e.forEach=function(t,e){for(var i in this.set_)t.call(e,i,i,this)},t}(),fi=r.a.Set?r.a.Set:pi,gi=function(){function t(t,e,i){if(!t&&this.play?this.player_=t=this:this.player_=t,this.isDisposed_=!1,this.parentComponent_=null,this.options_=ui({},this.options_),e=this.options_=ui(this.options_,e),this.id_=e.id||e.el&&e.el.id,!this.id_){var n=t&&t.id&&t.id()||"no_player";this.id_=n+"_component_"+De()}this.name_=e.name||null,e.el?this.el_=e.el:!1!==e.createEl&&(this.el_=this.createEl()),!1!==e.evented&&(si(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),oi(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new fi,this.setIntervalIds_=new fi,this.rafIds_=new fi,this.namedRafs_=new di,this.clearingTimersOnDispose_=!1,!1!==e.initChildren&&this.initChildren(),this.ready(i),!1!==e.reportTouchActivity&&this.enableTouchActivity()}var e=t.prototype;return e.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),Ne.has(this.el_)&&Ne.delete(this.el_),this.el_=null),this.player_=null}},e.isDisposed=function(){return Boolean(this.isDisposed_)},e.player=function(){return this.player_},e.options=function(t){return t?(this.options_=ui(this.options_,t),this.options_):this.options_},e.el=function(){return this.el_},e.createEl=function(t,e,i){return Jt(t,e,i)},e.localize=function(t,e,i){void 0===i&&(i=t);var n=this.player_.language&&this.player_.language(),r=this.player_.languages&&this.player_.languages(),s=r&&r[n],a=n&&n.split("-")[0],o=r&&r[a],l=i;return s&&s[t]?l=s[t]:o&&o[t]&&(l=o[t]),e&&(l=l.replace(/\{(\d+)\}/g,(function(t,i){var n=e[i-1],r=n;return void 0===n&&(r=t),r}))),l},e.handleLanguagechange=function(){},e.contentEl=function(){return this.contentEl_||this.el_},e.id=function(){return this.id_},e.name=function(){return this.name_},e.children=function(){return this.children_},e.getChildById=function(t){return this.childIndex_[t]},e.getChild=function(t){if(t)return this.childNameIndex_[t]},e.getDescendant=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e=e.reduce((function(t,e){return t.concat(e)}),[]);for(var n=this,r=0;r<e.length;r++)if(!(n=n.getChild(e[r]))||!n.getChild)return;return n},e.addChild=function(e,i,n){var r,s;if(void 0===i&&(i={}),void 0===n&&(n=this.children_.length),"string"==typeof e){s=hi(e);var a=i.componentClass||s;i.name=s;var o=t.getComponent(a);if(!o)throw new Error("Component "+a+" does not exist");if("function"!=typeof o)return null;r=new o(this.player_||this,i)}else r=e;if(r.parentComponent_&&r.parentComponent_.removeChild(r),this.children_.splice(n,0,r),r.parentComponent_=this,"function"==typeof r.id&&(this.childIndex_[r.id()]=r),(s=s||r.name&&hi(r.name()))&&(this.childNameIndex_[s]=r,this.childNameIndex_[li(s)]=r),"function"==typeof r.el&&r.el()){var l=null;this.children_[n+1]&&(this.children_[n+1].el_?l=this.children_[n+1].el_:$t(this.children_[n+1])&&(l=this.children_[n+1])),this.contentEl().insertBefore(r.el(),l)}return r},e.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===t){e=!0,this.children_.splice(i,1);break}if(e){t.parentComponent_=null,this.childIndex_[t.id()]=null,this.childNameIndex_[hi(t.name())]=null,this.childNameIndex_[li(t.name())]=null;var n=t.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},e.initChildren=function(){var e=this,i=this.options_.children;if(i){var n,r=this.options_,s=t.getComponent("Tech");(n=Array.isArray(i)?i:Object.keys(i)).concat(Object.keys(this.options_).filter((function(t){return!n.some((function(e){return"string"==typeof e?t===e:t===e.name}))}))).map((function(t){var n,r;return"string"==typeof t?r=i[n=t]||e.options_[n]||{}:(n=t.name,r=t),{name:n,opts:r}})).filter((function(e){var i=t.getComponent(e.opts.componentClass||hi(e.name));return i&&!s.isTech(i)})).forEach((function(t){var i=t.name,n=t.opts;if(void 0!==r[i]&&(n=r[i]),!1!==n){!0===n&&(n={}),n.playerOptions=e.options_.playerOptions;var s=e.addChild(i,n);s&&(e[i]=s)}}))}},e.buildCSSClass=function(){return""},e.ready=function(t,e){if(void 0===e&&(e=!1),t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},e.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach((function(t){t.call(this)}),this),this.trigger("ready")}),1)},e.$=function(t,e){return Se(t,e||this.contentEl())},e.$$=function(t,e){return we(t,e||this.contentEl())},e.hasClass=function(t){return ie(this.el_,t)},e.addClass=function(t){ne(this.el_,t)},e.removeClass=function(t){re(this.el_,t)},e.toggleClass=function(t,e){se(this.el_,t,e)},e.show=function(){this.removeClass("vjs-hidden")},e.hide=function(){this.addClass("vjs-hidden")},e.lockShowing=function(){this.addClass("vjs-lock-showing")},e.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.getAttribute=function(t){return le(this.el_,t)},e.setAttribute=function(t,e){he(this.el_,t,e)},e.removeAttribute=function(t){ue(this.el_,t)},e.width=function(t,e){return this.dimension("width",t,e)},e.height=function(t,e){return this.dimension("height",t,e)},e.dimensions=function(t,e){this.width(t,!0),this.height(e)},e.dimension=function(t,e,i){if(void 0!==e)return null!==e&&e==e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(i||this.trigger("componentresize"));if(!this.el_)return 0;var n=this.el_.style[t],r=n.indexOf("px");return-1!==r?parseInt(n.slice(0,r),10):parseInt(this.el_["offset"+hi(t)],10)},e.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if(e=Xt(this.el_,t),0===(e=parseFloat(e))||isNaN(e)){var i="offset"+hi(t);e=this.el_[i]}return e},e.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.currentWidth=function(){return this.currentDimension("width")},e.currentHeight=function(){return this.currentDimension("height")},e.focus=function(){this.el_.focus()},e.blur=function(){this.el_.blur()},e.handleKeyDown=function(t){this.player_&&(t.stopPropagation(),this.player_.handleKeyDown(t))},e.handleKeyPress=function(t){this.handleKeyDown(t)},e.emitTapEvents=function(){var t,e=0,i=null;this.on("touchstart",(function(n){1===n.touches.length&&(i={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},e=r.a.performance.now(),t=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)t=!1;else if(i){var n=e.touches[0].pageX-i.pageX,r=e.touches[0].pageY-i.pageY;Math.sqrt(n*n+r*r)>10&&(t=!1)}}));var n=function(){t=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n){(i=null,!0===t)&&(r.a.performance.now()-e<200&&(n.preventDefault(),this.trigger("tap")))}))},e.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,e=Ye(this.player(),this.player().reportUserActivity);this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));var i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}},e.setTimeout=function(t,e){var i,n=this;return t=Ye(this,t),this.clearTimersOnDispose_(),i=r.a.setTimeout((function(){n.setTimeoutIds_.has(i)&&n.setTimeoutIds_.delete(i),t()}),e),this.setTimeoutIds_.add(i),i},e.clearTimeout=function(t){return this.setTimeoutIds_.has(t)&&(this.setTimeoutIds_.delete(t),r.a.clearTimeout(t)),t},e.setInterval=function(t,e){t=Ye(this,t),this.clearTimersOnDispose_();var i=r.a.setInterval(t,e);return this.setIntervalIds_.add(i),i},e.clearInterval=function(t){return this.setIntervalIds_.has(t)&&(this.setIntervalIds_.delete(t),r.a.clearInterval(t)),t},e.requestAnimationFrame=function(t){var e,i=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),t=Ye(this,t),e=r.a.requestAnimationFrame((function(){i.rafIds_.has(e)&&i.rafIds_.delete(e),t()})),this.rafIds_.add(e),e):this.setTimeout(t,1e3/60)},e.requestNamedAnimationFrame=function(t,e){var i=this;if(!this.namedRafs_.has(t)){this.clearTimersOnDispose_(),e=Ye(this,e);var n=this.requestAnimationFrame((function(){e(),i.namedRafs_.has(t)&&i.namedRafs_.delete(t)}));return this.namedRafs_.set(t,n),t}},e.cancelNamedAnimationFrame=function(t){this.namedRafs_.has(t)&&(this.cancelAnimationFrame(this.namedRafs_.get(t)),this.namedRafs_.delete(t))},e.cancelAnimationFrame=function(t){return this.supportsRaf_?(this.rafIds_.has(t)&&(this.rafIds_.delete(t),r.a.cancelAnimationFrame(t)),t):this.clearTimeout(t)},e.clearTimersOnDispose_=function(){var t=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((function(e){var i=e[0],n=e[1];t[i].forEach((function(e,i){return t[n](i)}))})),t.clearingTimersOnDispose_=!1})))},t.registerComponent=function(e,i){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var n,r=t.getComponent("Tech"),s=r&&r.isTech(i),a=t===i||t.prototype.isPrototypeOf(i.prototype);if(s||!a)throw n=s?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+n+".");e=hi(e),t.components_||(t.components_={});var o=t.getComponent("Player");if("Player"===e&&o&&o.players){var l=o.players,h=Object.keys(l);if(l&&h.length>0&&h.map((function(t){return l[t]})).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=i,t.components_[li(e)]=i,i},t.getComponent=function(e){if(e&&t.components_)return t.components_[e]},t}();gi.prototype.supportsRaf_="function"==typeof r.a.requestAnimationFrame&&"function"==typeof r.a.cancelAnimationFrame,gi.registerComponent("Component",gi);var mi,vi=r.a.navigator&&r.a.navigator.userAgent||"",yi=/AppleWebKit\/([\d.]+)/i.exec(vi),bi=yi?parseFloat(yi.pop()):null,_i=/iPod/i.test(vi),Ti=(mi=vi.match(/OS (\d+)_/i))&&mi[1]?mi[1]:null,xi=/Android/i.test(vi),Si=function(){var t=vi.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),i=t[2]&&parseFloat(t[2]);return e&&i?parseFloat(t[1]+"."+t[2]):e||null}(),wi=xi&&Si<5&&bi<537,ki=/Firefox/i.test(vi),Ci=/Edg/i.test(vi),Ei=!Ci&&(/Chrome/i.test(vi)||/CriOS/i.test(vi)),Ai=function(){var t=vi.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),Pi=function(){var t=/MSIE\s(\d+)\.\d/.exec(vi),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(vi)&&/rv:11.0/.test(vi)&&(e=11),e}(),Oi=/Safari/i.test(vi)&&!Ei&&!xi&&!Ci,Li=/Windows/i.test(vi),Mi=Boolean(Kt()&&("ontouchstart"in r.a||r.a.navigator.maxTouchPoints||r.a.DocumentTouch&&r.a.document instanceof r.a.DocumentTouch)),Ii=/iPad/i.test(vi)||Oi&&Mi&&!/iPhone/i.test(vi),Di=/iPhone/i.test(vi)&&!Ii,Ri=Di||Ii||_i,Ni=(Oi||Ri)&&!Ei,Bi=Object.freeze({__proto__:null,IS_IPOD:_i,IOS_VERSION:Ti,IS_ANDROID:xi,ANDROID_VERSION:Si,IS_NATIVE_ANDROID:wi,IS_FIREFOX:ki,IS_EDGE:Ci,IS_CHROME:Ei,CHROME_VERSION:Ai,IE_VERSION:Pi,IS_SAFARI:Oi,IS_WINDOWS:Li,TOUCH_ENABLED:Mi,IS_IPAD:Ii,IS_IPHONE:Di,IS_IOS:Ri,IS_ANY_SAFARI:Ni});function ji(t,e,i,n){return function(t,e,i){if("number"!=typeof e||e<0||e>i)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+i+").")}(t,n,i.length-1),i[n][e]}function Ui(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:ji.bind(null,"start",0,t),end:ji.bind(null,"end",1,t)}}function Fi(t,e){return Array.isArray(t)?Ui(t):void 0===t||void 0===e?Ui():Ui([[t,e]])}function Wi(t,e){var i,n,r=0;if(!e)return 0;t&&t.length||(t=Fi(0,0));for(var s=0;s<t.length;s++)i=t.start(s),(n=t.end(s))>e&&(n=e),r+=n-i;return r/e}for(var zi,Hi={prefixed:!0},Vi=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],Gi=Vi[0],Xi=0;Xi<Vi.length;Xi++)if(Vi[Xi][1]in a.a){zi=Vi[Xi];break}if(zi){for(var qi=0;qi<zi.length;qi++)Hi[Gi[qi]]=zi[qi];Hi.prefixed=zi[0]!==Gi[0]}function Yi(t){if(t instanceof Yi)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:Vt(t)&&("number"==typeof t.code&&(this.code=t.code),Ht(this,t)),this.message||(this.message=Yi.defaultMessages[this.code]||"")}Yi.prototype.code=0,Yi.prototype.message="",Yi.prototype.status=null,Yi.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Yi.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Ki=0;Ki<Yi.errorTypes.length;Ki++)Yi[Yi.errorTypes[Ki]]=Ki,Yi.prototype[Yi.errorTypes[Ki]]=Ki;function $i(t){return null!=t&&"function"==typeof t.then}function Qi(t){$i(t)&&t.then(null,(function(t){}))}var Zi=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(e,i,n){return t[i]&&(e[i]=t[i]),e}),{cues:t.cues&&Array.prototype.map.call(t.cues,(function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}}))})},Ji=function(t){var e=t.$$("track"),i=Array.prototype.map.call(e,(function(t){return t.track}));return Array.prototype.map.call(e,(function(t){var e=Zi(t.track);return t.src&&(e.src=t.src),e})).concat(Array.prototype.filter.call(t.textTracks(),(function(t){return-1===i.indexOf(t)})).map(Zi))},tn=function(t,e){return t.forEach((function(t){var i=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach((function(t){return i.addCue(t)}))})),e.textTracks()},en=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).opened_=n.hasBeenOpened_=n.hasBeenFilled_=!1,n.closeable(!n.options_.uncloseable),n.content(n.options_.content),n.contentEl_=Jt("div",{className:"vjs-modal-dialog-content"},{role:"document"}),n.descEl_=Jt("p",{className:"vjs-modal-dialog-description vjs-control-text",id:n.el().getAttribute("aria-describedby")}),te(n.descEl_,n.description()),n.el_.appendChild(n.descEl_),n.el_.appendChild(n.contentEl_),n}d()(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},i.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,t.prototype.dispose.call(this)},i.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+t.prototype.buildCSSClass.call(this)},i.label=function(){return this.localize(this.options_.label||"Modal Window")},i.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},i.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},i.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},i.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&t.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},i.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,i=this.getChild("closeButton");if(e&&!i){var n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close)}!e&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())}return this.closeable_},i.fill=function(){this.fillWith(this.content())},i.fillWith=function(t){var e=this.contentEl(),i=e.parentNode,n=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(e),this.empty(),_e(e,t),this.trigger("modalfill"),n?i.insertBefore(e,n):i.appendChild(e);var r=this.getChild("closeButton");r&&i.appendChild(r.el_)},i.empty=function(){this.trigger("beforemodalempty"),ve(this.contentEl()),this.trigger("modalempty")},i.content=function(t){return void 0!==t&&(this.content_=t),this.content_},i.conditionalFocus_=function(){var t=a.a.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus())},i.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},i.handleKeyDown=function(t){if(t.stopPropagation(),m.a.isEventKey(t,"Escape")&&this.closeable())return t.preventDefault(),void this.close();if(m.a.isEventKey(t,"Tab")){for(var e,i=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=0;r<i.length;r++)if(n===i[r]){e=r;break}a.a.activeElement===this.el_&&(e=0),t.shiftKey&&0===e?(i[i.length-1].focus(),t.preventDefault()):t.shiftKey||e!==i.length-1||(i[0].focus(),t.preventDefault())}},i.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,(function(t){return(t instanceof r.a.HTMLAnchorElement||t instanceof r.a.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof r.a.HTMLInputElement||t instanceof r.a.HTMLSelectElement||t instanceof r.a.HTMLTextAreaElement||t instanceof r.a.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof r.a.HTMLIFrameElement||t instanceof r.a.HTMLObjectElement||t instanceof r.a.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")}))},e}(gi);en.prototype.options_={pauseOnOpen:!0,temporary:!0},gi.registerComponent("ModalDialog",en);var nn=function(t){function e(e){var i;void 0===e&&(e=[]),(i=t.call(this)||this).tracks_=[],Object.defineProperty(u()(i),"length",{get:function(){return this.tracks_.length}});for(var n=0;n<e.length;n++)i.addTrack(e[n]);return i}d()(e,t);var i=e.prototype;return i.addTrack=function(t){var e=this,i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get:function(){return this.tracks_[i]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack",target:this})),t.labelchange_=function(){e.trigger({track:t,type:"labelchange",target:e})},Qe(t)&&t.addEventListener("labelchange",t.labelchange_)},i.removeTrack=function(t){for(var e,i=0,n=this.length;i<n;i++)if(this[i]===t){(e=this[i]).off&&e.off(),this.tracks_.splice(i,1);break}e&&this.trigger({track:e,type:"removetrack",target:this})},i.getTrackById=function(t){for(var e=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===t){e=r;break}}return e},e}($e);for(var rn in nn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},nn.prototype.allowedEvents_)nn.prototype["on"+rn]=null;var sn=function(t,e){for(var i=0;i<t.length;i++)Object.keys(t[i]).length&&e.id!==t[i].id&&(t[i].enabled=!1)},an=function(t){function e(e){var i;void 0===e&&(e=[]);for(var n=e.length-1;n>=0;n--)if(e[n].enabled){sn(e,e[n]);break}return(i=t.call(this,e)||this).changing_=!1,i}d()(e,t);var i=e.prototype;return i.addTrack=function(e){var i=this;e.enabled&&sn(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){i.changing_||(i.changing_=!0,sn(i,e),i.changing_=!1,i.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},i.removeTrack=function(e){t.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},e}(nn),on=function(t,e){for(var i=0;i<t.length;i++)Object.keys(t[i]).length&&e.id!==t[i].id&&(t[i].selected=!1)},ln=function(t){function e(e){var i;void 0===e&&(e=[]);for(var n=e.length-1;n>=0;n--)if(e[n].selected){on(e,e[n]);break}return(i=t.call(this,e)||this).changing_=!1,Object.defineProperty(u()(i),"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),i}d()(e,t);var i=e.prototype;return i.addTrack=function(e){var i=this;e.selected&&on(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&(e.selectedChange_=function(){i.changing_||(i.changing_=!0,on(i,e),i.changing_=!1,i.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))},i.removeTrack=function(e){t.prototype.removeTrack.call(this,e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)},e}(nn),hn=function(t){function e(){return t.apply(this,arguments)||this}d()(e,t);var i=e.prototype;return i.addTrack=function(e){var i=this;t.prototype.addTrack.call(this,e),this.queueChange_||(this.queueChange_=function(){return i.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return i.trigger("selectedlanguagechange")}),e.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)},i.removeTrack=function(e){t.prototype.removeTrack.call(this,e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},e}(nn),un=function(){function t(t){void 0===t&&(t=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var e=0,i=t.length;e<i;e++)this.addTrackElement_(t[e])}var e=t.prototype;return e.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},e.getTrackElementByTrack_=function(t){for(var e,i=0,n=this.trackElements_.length;i<n;i++)if(t===this.trackElements_[i].track){e=this.trackElements_[i];break}return e},e.removeTrackElement_=function(t){for(var e=0,i=this.trackElements_.length;e<i;e++)if(t===this.trackElements_[e]){this.trackElements_[e].track&&"function"==typeof this.trackElements_[e].track.off&&this.trackElements_[e].track.off(),"function"==typeof this.trackElements_[e].off&&this.trackElements_[e].off(),this.trackElements_.splice(e,1);break}},t}(),cn=function(){function t(e){t.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var e=t.prototype;return e.setCues_=function(t){var e=this.length||0,i=0,n=t.length;this.cues_=t,this.length_=t.length;var r=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<n)for(i=e;i<n;i++)r.call(this,i)},e.getCueById=function(t){for(var e=null,i=0,n=this.length;i<n;i++){var r=this[i];if(r.id===t){e=r;break}}return e},t}(),dn={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},pn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},fn={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},gn={disabled:"disabled",hidden:"hidden",showing:"showing"},mn=function(t){function e(e){var i;void 0===e&&(e={}),i=t.call(this)||this;var n={id:e.id||"vjs_track_"+De(),kind:e.kind||"",language:e.language||""},r=e.label||"",s=function(t){Object.defineProperty(u()(i),t,{get:function(){return n[t]},set:function(){}})};for(var a in n)s(a);return Object.defineProperty(u()(i),"label",{get:function(){return r},set:function(t){t!==r&&(r=t,this.trigger("labelchange"))}}),i}return d()(e,t),e}($e),vn=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],i=a.a.createElement("a");i.href=t;var n,s=""===i.host&&"file:"!==i.protocol;s&&((n=a.a.createElement("div")).innerHTML='<a href="'+t+'"></a>',i=n.firstChild,n.setAttribute("style","display:none; position:absolute;"),a.a.body.appendChild(n));for(var o={},l=0;l<e.length;l++)o[e[l]]=i[e[l]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=r.a.location.protocol),s&&a.a.body.removeChild(n),o},yn=function(t){if(!t.match(/^https?:\/\//)){var e=a.a.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},bn=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(t);if(e)return e.pop().toLowerCase()}return""},_n=function(t,e){void 0===e&&(e=r.a.location);var i=vn(t);return(":"===i.protocol?e.protocol:i.protocol)+i.host!==e.protocol+e.host},Tn=Object.freeze({__proto__:null,parseUrl:vn,getAbsoluteURL:yn,getFileExtension:bn,isCrossOrigin:_n}),xn=function(t,e){var i=new r.a.WebVTT.Parser(r.a,r.a.vttjs,r.a.WebVTT.StringDecoder()),n=[];i.oncue=function(t){e.addCue(t)},i.onparsingerror=function(t){n.push(t)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(t),n.length>0&&(r.a.console&&r.a.console.groupCollapsed&&r.a.console.groupCollapsed("Text Track parsing errors for "+e.src),n.forEach((function(t){return jt.error(t)})),r.a.console&&r.a.console.groupEnd&&r.a.console.groupEnd()),i.flush()},Sn=function(t,e){var i={uri:t},n=_n(t);n&&(i.cors=n);var s="use-credentials"===e.tech_.crossOrigin();s&&(i.withCredentials=s),y()(i,Ye(this,(function(t,i,n){if(t)return jt.error(t,i);e.loaded_=!0,"function"!=typeof r.a.WebVTT?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],(function(t){if("vttjserror"!==t.type)return xn(n,e);jt.error("vttjs failed to load, stopping trying to process "+e.src)})):xn(n,e)})))},wn=function(t){function e(e){var i;if(void 0===e&&(e={}),!e.tech)throw new Error("A tech was not provided.");var n=ui(e,{kind:fn[e.kind]||"subtitles",language:e.language||e.srclang||""}),r=gn[n.mode]||"disabled",s=n.default;"metadata"!==n.kind&&"chapters"!==n.kind||(r="hidden"),(i=t.call(this,n)||this).tech_=n.tech,i.cues_=[],i.activeCues_=[],i.preload_=!1!==i.tech_.preloadTextTracks;var a=new cn(i.cues_),o=new cn(i.activeCues_),l=!1,h=Ye(u()(i),(function(){this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1)}));return"disabled"!==r&&i.tech_.ready((function(){i.tech_.on("timeupdate",h)}),!0),Object.defineProperties(u()(i),{default:{get:function(){return s},set:function(){}},mode:{get:function(){return r},set:function(t){var e=this;gn[t]&&(r=t,this.preload_||"disabled"===r||0!==this.cues.length||Sn(this.src,this),"disabled"!==r?this.tech_.ready((function(){e.tech_.on("timeupdate",h)}),!0):this.tech_.off("timeupdate",h),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?a:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return o;for(var t=this.tech_.currentTime(),e=[],i=0,n=this.cues.length;i<n;i++){var r=this.cues[i];(r.startTime<=t&&r.endTime>=t||r.startTime===r.endTime&&r.startTime<=t&&r.startTime+.5>=t)&&e.push(r)}if(l=!1,e.length!==this.activeCues_.length)l=!0;else for(var s=0;s<e.length;s++)-1===this.activeCues_.indexOf(e[s])&&(l=!0);return this.activeCues_=e,o.setCues_(this.activeCues_),o},set:function(){}}}),n.src?(i.src=n.src,i.preload_||(i.loaded_=!0),(i.preload_||s||"subtitles"!==n.kind&&"captions"!==n.kind)&&Sn(i.src,u()(i))):i.loaded_=!0,i}d()(e,t);var i=e.prototype;return i.addCue=function(t){var e=t;if(r.a.vttjs&&!(t instanceof r.a.vttjs.VTTCue)){for(var i in e=new r.a.vttjs.VTTCue(t.startTime,t.endTime,t.text),t)i in e||(e[i]=t[i]);e.id=t.id,e.originalCue_=t}for(var n=this.tech_.textTracks(),s=0;s<n.length;s++)n[s]!==this&&n[s].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},i.removeCue=function(t){for(var e=this.cues_.length;e--;){var i=this.cues_[e];if(i===t||i.originalCue_&&i.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},e}(mn);wn.prototype.allowedEvents_={cuechange:"cuechange"};var kn=function(t){function e(e){var i;void 0===e&&(e={});var n=ui(e,{kind:pn[e.kind]||""});i=t.call(this,n)||this;var r=!1;return Object.defineProperty(u()(i),"enabled",{get:function(){return r},set:function(t){"boolean"==typeof t&&t!==r&&(r=t,this.trigger("enabledchange"))}}),n.enabled&&(i.enabled=n.enabled),i.loaded_=!0,i}return d()(e,t),e}(mn),Cn=function(t){function e(e){var i;void 0===e&&(e={});var n=ui(e,{kind:dn[e.kind]||""});i=t.call(this,n)||this;var r=!1;return Object.defineProperty(u()(i),"selected",{get:function(){return r},set:function(t){"boolean"==typeof t&&t!==r&&(r=t,this.trigger("selectedchange"))}}),n.selected&&(i.selected=n.selected),i}return d()(e,t),e}(mn),En=function(t){function e(e){var i,n;void 0===e&&(e={}),i=t.call(this)||this;var r=new wn(e);return i.kind=r.kind,i.src=r.src,i.srclang=r.language,i.label=r.label,i.default=r.default,Object.defineProperties(u()(i),{readyState:{get:function(){return n}},track:{get:function(){return r}}}),n=0,r.addEventListener("loadeddata",(function(){n=2,i.trigger({type:"load",target:u()(i)})})),i}return d()(e,t),e}($e);En.prototype.allowedEvents_={load:"load"},En.NONE=0,En.LOADING=1,En.LOADED=2,En.ERROR=3;var An={audio:{ListClass:an,TrackClass:kn,capitalName:"Audio"},video:{ListClass:ln,TrackClass:Cn,capitalName:"Video"},text:{ListClass:hn,TrackClass:wn,capitalName:"Text"}};Object.keys(An).forEach((function(t){An[t].getterName=t+"Tracks",An[t].privateName=t+"Tracks_"}));var Pn={remoteText:{ListClass:hn,TrackClass:wn,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:un,TrackClass:En,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},On=l()({},An,Pn);Pn.names=Object.keys(Pn),An.names=Object.keys(An),On.names=[].concat(Pn.names).concat(An.names);var Ln=function(t){function e(e,i){var n;return void 0===e&&(e={}),void 0===i&&(i=function(){}),e.reportTouchActivity=!1,(n=t.call(this,null,e,i)||this).hasStarted_=!1,n.on("playing",(function(){this.hasStarted_=!0})),n.on("loadstart",(function(){this.hasStarted_=!1})),On.names.forEach((function(t){var i=On[t];e&&e[i.getterName]&&(n[i.privateName]=e[i.getterName])})),n.featuresProgressEvents||n.manualProgressOn(),n.featuresTimeupdateEvents||n.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(t){!1===e["native"+t+"Tracks"]&&(n["featuresNative"+t+"Tracks"]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?n.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(n.featuresNativeTextTracks=!0),n.featuresNativeTextTracks||n.emulateTextTracks(),n.preloadTextTracks=!1!==e.preloadTextTracks,n.autoRemoteTextTracks_=new On.text.ListClass,n.initTrackListeners(),e.nativeControlsForTouch||n.emitTapEvents(),n.constructor&&(n.name_=n.constructor.name||"Unknown Tech"),n}d()(e,t);var i=e.prototype;return i.triggerSourceset=function(t){var e=this;this.isReady_||this.one("ready",(function(){return e.setTimeout((function(){return e.triggerSourceset(t)}),1)})),this.trigger({src:t,type:"sourceset"})},i.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},i.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},i.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(Ye(this,(function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()})),500)},i.onDurationChange=function(t){this.duration_=this.duration()},i.buffered=function(){return Fi(0,0)},i.bufferedPercent=function(){return Wi(this.buffered(),this.duration_)},i.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},i.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},i.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},i.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},i.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.dispose=function(){this.clearTracks(An.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},i.clearTracks=function(t){var e=this;(t=[].concat(t)).forEach((function(t){for(var i=e[t+"Tracks"]()||[],n=i.length;n--;){var r=i[n];"text"===t&&e.removeRemoteTextTrack(r),i.removeTrack(r)}}))},i.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var i=t[e];this.removeRemoteTextTrack(i)}},i.reset=function(){},i.crossOrigin=function(){},i.setCrossOrigin=function(){},i.error=function(t){return void 0!==t&&(this.error_=new Yi(t),this.trigger("error")),this.error_},i.played=function(){return this.hasStarted_?Fi(0,0):Fi()},i.play=function(){},i.setScrubbing=function(){},i.scrubbing=function(){},i.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.initTrackListeners=function(){var t=this;An.names.forEach((function(e){var i=An[e],n=function(){t.trigger(e+"trackchange")},r=t[i.getterName]();r.addEventListener("removetrack",n),r.addEventListener("addtrack",n),t.on("dispose",(function(){r.removeEventListener("removetrack",n),r.removeEventListener("addtrack",n)}))}))},i.addWebVttScript_=function(){var t=this;if(!r.a.WebVTT)if(a.a.body.contains(this.el())){if(!this.options_["vtt.js"]&&Gt(_.a)&&Object.keys(_.a).length>0)return void this.trigger("vttjsloaded");var e=a.a.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",(function(){e.onload=null,e.onerror=null})),r.a.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},i.emulateTextTracks=function(){var t=this,e=this.textTracks(),i=this.remoteTextTracks(),n=function(t){return e.addTrack(t.track)},r=function(t){return e.removeTrack(t.track)};i.on("addtrack",n),i.on("removetrack",r),this.addWebVttScript_();var s=function(){return t.trigger("texttrackchange")},a=function(){s();for(var t=0;t<e.length;t++){var i=e[t];i.removeEventListener("cuechange",s),"showing"===i.mode&&i.addEventListener("cuechange",s)}};a(),e.addEventListener("change",a),e.addEventListener("addtrack",a),e.addEventListener("removetrack",a),this.on("dispose",(function(){i.off("addtrack",n),i.off("removetrack",r),e.removeEventListener("change",a),e.removeEventListener("addtrack",a),e.removeEventListener("removetrack",a);for(var t=0;t<e.length;t++){e[t].removeEventListener("cuechange",s)}}))},i.addTextTrack=function(t,e,i){if(!t)throw new Error("TextTrack kind is required but was not provided");return function(t,e,i,n,r){void 0===r&&(r={});var s=t.textTracks();r.kind=e,i&&(r.label=i),n&&(r.language=n),r.tech=t;var a=new On.text.TrackClass(r);return s.addTrack(a),a}(this,t,e,i)},i.createRemoteTextTrack=function(t){var e=ui(t,{tech:this});return new Pn.remoteTextEl.TrackClass(e)},i.addRemoteTextTrack=function(t,e){var i=this;void 0===t&&(t={});var n=this.createRemoteTextTrack(t);return!0!==e&&!1!==e&&(jt.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),e=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==e&&this.ready((function(){return i.autoRemoteTextTracks_.addTrack(n.track)})),n},i.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},i.getVideoPlaybackQuality=function(){return{}},i.requestPictureInPicture=function(){var t=this.options_.Promise||r.a.Promise;if(t)return t.reject()},i.disablePictureInPicture=function(){return!0},i.setDisablePictureInPicture=function(){},i.setPoster=function(){},i.playsinline=function(){},i.setPlaysinline=function(){},i.overrideNativeAudioTracks=function(){},i.overrideNativeVideoTracks=function(){},i.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,i){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,i){if(e.techs_||(e.techs_={}),!e.isTech(i))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=hi(t),e.techs_[t]=i,e.techs_[li(t)]=i,"Tech"!==t&&e.defaultTechOrder_.push(t),i},e.getTech=function(t){if(t)return e.techs_&&e.techs_[t]?e.techs_[t]:(t=hi(t),r.a&&r.a.videojs&&r.a.videojs[t]?(jt.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),r.a.videojs[t]):void 0)},e}(gi);On.names.forEach((function(t){var e=On[t];Ln.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}})),Ln.prototype.featuresVolumeControl=!0,Ln.prototype.featuresMuteControl=!0,Ln.prototype.featuresFullscreenResize=!1,Ln.prototype.featuresPlaybackRate=!1,Ln.prototype.featuresProgressEvents=!1,Ln.prototype.featuresSourceset=!1,Ln.prototype.featuresTimeupdateEvents=!1,Ln.prototype.featuresNativeTextTracks=!1,Ln.withSourceHandlers=function(t){t.registerSourceHandler=function(e,i){var n=t.sourceHandlers;n||(n=t.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,e)},t.canPlayType=function(e){for(var i,n=t.sourceHandlers||[],r=0;r<n.length;r++)if(i=n[r].canPlayType(e))return i;return""},t.selectSourceHandler=function(e,i){for(var n=t.sourceHandlers||[],r=0;r<n.length;r++)if(n[r].canHandleSource(e,i))return n[r];return null},t.canPlaySource=function(e,i){var n=t.selectSourceHandler(e,i);return n?n.canHandleSource(e,i):""};["seekable","seeking","duration"].forEach((function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})}),t.prototype),t.prototype.setSource=function(e){var i=t.selectSourceHandler(e,this.options_);i||(t.nativeSourceHandler?i=t.nativeSourceHandler:jt.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),i!==t.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=i.handleSource(e,this,this.options_),this.one("dispose",this.disposeSourceHandler)},t.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},gi.registerComponent("Tech",Ln),Ln.registerTech("Tech",Ln),Ln.defaultTechOrder_=[];var Mn={},In={},Dn={};function Rn(t,e,i){t.setTimeout((function(){return function t(e,i,n,r,s,a){void 0===e&&(e={});void 0===i&&(i=[]);void 0===s&&(s=[]);void 0===a&&(a=!1);var o=i,l=o[0],h=o.slice(1);if("string"==typeof l)t(e,Mn[l],n,r,s,a);else if(l){var u=function(t,e){var i=In[t.id()],n=null;if(null==i)return n=e(t),In[t.id()]=[[e,n]],n;for(var r=0;r<i.length;r++){var s=i[r],a=s[0],o=s[1];a===e&&(n=o)}null===n&&(n=e(t),i.push([e,n]));return n}(r,l);if(!u.setSource)return s.push(u),t(e,h,n,r,s,a);u.setSource(Ht({},e),(function(i,o){if(i)return t(e,h,n,r,s,a);s.push(u),t(o,e.type===o.type?h:Mn[o.type],n,r,s,a)}))}else h.length?t(e,h,n,r,s,a):a?n(e,s):t(e,Mn["*"],n,r,s,!0)}(e,Mn[e.type],i,t)}),1)}function Nn(t,e,i,n){void 0===n&&(n=null);var r="call"+hi(i),s=t.reduce(Fn(r),n),a=s===Dn,o=a?null:e[i](s);return function(t,e,i,n){for(var r=t.length-1;r>=0;r--){var s=t[r];s[e]&&s[e](n,i)}}(t,i,o,a),o}var Bn={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},jn={setCurrentTime:1,setMuted:1,setVolume:1},Un={play:1,pause:1};function Fn(t){return function(e,i){return e===Dn?Dn:i[t]?i[t](e):e}}var Wn={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},zn=function(t){void 0===t&&(t="");var e=bn(t);return Wn[e.toLowerCase()]||""};function Hn(t){if(!t.type){var e=zn(t.src);e&&(t.type=e)}return t}var Vn=function(t){function e(e,i,n){var r,s=ui({createEl:!1},i);if(r=t.call(this,e,s,n)||this,i.playerOptions.sources&&0!==i.playerOptions.sources.length)e.src(i.playerOptions.sources);else for(var a=0,o=i.playerOptions.techOrder;a<o.length;a++){var l=hi(o[a]),h=Ln.getTech(l);if(l||(h=gi.getComponent(l)),h&&h.isSupported()){e.loadTech_(l);break}}return r}return d()(e,t),e}(gi);gi.registerComponent("MediaLoader",Vn);var Gn=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).emitTapEvents(),n.enable(),n}d()(e,t);var i=e.prototype;return i.createEl=function(e,i,n){void 0===e&&(e="div"),void 0===i&&(i={}),void 0===n&&(n={}),i=Ht({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},i),"button"===e&&jt.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),n=Ht({role:"button"},n),this.tabIndex_=i.tabIndex;var r=t.prototype.createEl.call(this,e,i,n);return this.createControlTextEl(r),r},i.dispose=function(){this.controlTextEl_=null,t.prototype.dispose.call(this)},i.createControlTextEl=function(t){return this.controlTextEl_=Jt("span",{className:"vjs-control-text"},{"aria-live":"polite"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},i.controlText=function(t,e){if(void 0===e&&(e=this.el()),void 0===t)return this.controlText_||"Need Text";var i=this.localize(t);this.controlText_=t,te(this.controlTextEl_,i),this.nonIconControl||e.setAttribute("title",i)},i.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},i.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},i.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver),this.off("mouseout",this.handleMouseOut),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},i.handleLanguagechange=function(){this.controlText(this.controlText_)},i.handleClick=function(t){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},i.handleKeyDown=function(e){m.a.isEventKey(e,"Space")||m.a.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):t.prototype.handleKeyDown.call(this,e)},e}(gi);gi.registerComponent("ClickableComponent",Gn);var Xn=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).update(),e.on("posterchange",Ye(u()(n),n.update)),n}d()(e,t);var i=e.prototype;return i.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},i.createEl=function(){return Jt("div",{className:"vjs-poster",tabIndex:-1})},i.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},i.setSrc=function(t){var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e},i.handleClick=function(t){if(this.player_.controls()){var e=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;!this.player_.tech(!0)||(Pi||Ci)&&e||this.player_.tech(!0).focus(),this.player_.paused()?Qi(this.player_.play()):this.player_.pause()}},e}(Gn);gi.registerComponent("PosterImage",Xn);var qn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Yn(t,e){var i;if(4===t.length)i=t[1]+t[1]+t[2]+t[2]+t[3]+t[3];else{if(7!==t.length)throw new Error("Invalid color code provided, "+t+"; must be formatted as e.g. #f0e or #f604e2.");i=t.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")"}function Kn(t,e,i){try{t.style[e]=i}catch(t){return}}var $n=function(t){function e(e,i,n){var s;s=t.call(this,e,i,n)||this;var a=Ye(u()(s),s.updateDisplay);return e.on("loadstart",Ye(u()(s),s.toggleDisplay)),e.on("texttrackchange",a),e.on("loadedmetadata",Ye(u()(s),s.preselectTrack)),e.ready(Ye(u()(s),(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)this.hide();else{e.on("fullscreenchange",a),e.on("playerresize",a),r.a.addEventListener("orientationchange",a),e.on("dispose",(function(){return r.a.removeEventListener("orientationchange",a)}));for(var t=this.options_.playerOptions.tracks||[],i=0;i<t.length;i++)this.player_.addRemoteTextTrack(t[i],!0);this.preselectTrack()}}))),s}d()(e,t);var i=e.prototype;return i.preselectTrack=function(){for(var t,e,i,n={captions:1,subtitles:1},r=this.player_.textTracks(),s=this.player_.cache_.selectedLanguage,a=0;a<r.length;a++){var o=r[a];s&&s.enabled&&s.language&&s.language===o.language&&o.kind in n?o.kind===s.kind?i=o:i||(i=o):s&&!s.enabled?(i=null,t=null,e=null):o.default&&("descriptions"!==o.kind||t?o.kind in n&&!e&&(e=o):t=o)}i?i.mode="showing":e?e.mode="showing":t&&(t.mode="showing")},i.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},i.clearDisplay=function(){"function"==typeof r.a.WebVTT&&r.a.WebVTT.processCues(r.a,[],this.el_)},i.updateDisplay=function(){var t=this.player_.textTracks(),e=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),e){for(var i=[],n=0;n<t.length;++n){var r=t[n];"showing"===r.mode&&i.push(r)}this.updateForTrack(i)}else{for(var s=null,a=null,o=t.length;o--;){var l=t[o];"showing"===l.mode&&("descriptions"===l.kind?s=l:a=l)}a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):s&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(s))}},i.updateDisplayState=function(t){for(var e=this.player_.textTrackSettings.getValues(),i=t.activeCues,n=i.length;n--;){var s=i[n];if(s){var a=s.displayState;if(e.color&&(a.firstChild.style.color=e.color),e.textOpacity&&Kn(a.firstChild,"color",Yn(e.color||"#fff",e.textOpacity)),e.backgroundColor&&(a.firstChild.style.backgroundColor=e.backgroundColor),e.backgroundOpacity&&Kn(a.firstChild,"backgroundColor",Yn(e.backgroundColor||"#000",e.backgroundOpacity)),e.windowColor&&(e.windowOpacity?Kn(a,"backgroundColor",Yn(e.windowColor,e.windowOpacity)):a.style.backgroundColor=e.windowColor),e.edgeStyle&&("dropshadow"===e.edgeStyle?a.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===e.edgeStyle?a.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===e.edgeStyle?a.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===e.edgeStyle&&(a.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),e.fontPercent&&1!==e.fontPercent){var o=r.a.parseFloat(a.style.fontSize);a.style.fontSize=o*e.fontPercent+"px",a.style.height="auto",a.style.top="auto"}e.fontFamily&&"default"!==e.fontFamily&&("small-caps"===e.fontFamily?a.firstChild.style.fontVariant="small-caps":a.firstChild.style.fontFamily=qn[e.fontFamily])}}},i.updateForTrack=function(t){if(Array.isArray(t)||(t=[t]),"function"==typeof r.a.WebVTT&&!t.every((function(t){return!t.activeCues}))){for(var e=[],i=0;i<t.length;++i)for(var n=t[i],s=0;s<n.activeCues.length;++s)e.push(n.activeCues[s]);r.a.WebVTT.processCues(r.a,e,this.el_);for(var a=0;a<t.length;++a){for(var o=t[a],l=0;l<o.activeCues.length;++l){var h=o.activeCues[l].displayState;ne(h,"vjs-text-track-cue"),ne(h,"vjs-text-track-cue-"+(o.language?o.language:a))}this.player_.textTrackSettings&&this.updateDisplayState(o)}}},e}(gi);gi.registerComponent("TextTrackDisplay",$n);var Qn=function(t){function e(){return t.apply(this,arguments)||this}return d()(e,t),e.prototype.createEl=function(){var e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),n=Jt("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[i])}),r=t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return r.appendChild(n),r},e}(gi);gi.registerComponent("LoadingSpinner",Qn);var Zn=function(t){function e(){return t.apply(this,arguments)||this}d()(e,t);var i=e.prototype;return i.createEl=function(t,e,i){void 0===e&&(e={}),void 0===i&&(i={}),e=Ht({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),i=Ht({type:"button"},i);var n=gi.prototype.createEl.call(this,"button",e,i);return this.createControlTextEl(n),n},i.addChild=function(t,e){void 0===e&&(e={});var i=this.constructor.name;return jt.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),gi.prototype.addChild.call(this,t,e)},i.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.handleKeyDown=function(e){m.a.isEventKey(e,"Space")||m.a.isEventKey(e,"Enter")?e.stopPropagation():t.prototype.handleKeyDown.call(this,e)},e}(Gn);gi.registerComponent("Button",Zn);var Jn=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).mouseused_=!1,n.on("mousedown",n.handleMouseDown),n}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-big-play-button"},i.handleClick=function(t){var e=this.player_.play();if(this.mouseused_&&t.clientX&&t.clientY){var i=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;return Qi(e),void(!this.player_.tech(!0)||(Pi||Ci)&&i||this.player_.tech(!0).focus())}var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(r){var s=function(){return r.focus()};$i(e)?e.then(s,(function(){})):this.setTimeout(s,1)}else this.player_.tech(!0).focus()},i.handleKeyDown=function(e){this.mouseused_=!1,t.prototype.handleKeyDown.call(this,e)},i.handleMouseDown=function(t){this.mouseused_=!0},e}(Zn);Jn.prototype.controlText_="Play Video",gi.registerComponent("BigPlayButton",Jn);var tr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).controlText(i&&i.controlText||n.localize("Close")),n}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},i.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},i.handleKeyDown=function(e){m.a.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):t.prototype.handleKeyDown.call(this,e)},e}(Zn);gi.registerComponent("CloseButton",tr);var er=function(t){function e(e,i){var n;return void 0===i&&(i={}),n=t.call(this,e,i)||this,i.replay=void 0===i.replay||i.replay,n.on(e,"play",n.handlePlay),n.on(e,"pause",n.handlePause),i.replay&&n.on(e,"ended",n.handleEnded),n}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},i.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},i.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},i.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},i.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(Zn);er.prototype.controlText_="Play",gi.registerComponent("PlayToggle",er);var ir=function(t,e){t=t<0?0:t;var i=Math.floor(t%60),n=Math.floor(t/60%60),r=Math.floor(t/3600),s=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(r=n=i="-"),(r=r>0||a>0?r+":":"")+(n=((r||s>=10)&&n<10?"0"+n:n)+":")+(i=i<10?"0"+i:i)},nr=ir;function rr(t,e){return void 0===e&&(e=t),nr(t,e)}var sr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).on(e,["timeupdate","ended"],n.updateContent),n.updateTextNode_(),n}d()(e,t);var i=e.prototype;return i.createEl=function(){var e=this.buildCSSClass(),i=t.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=Jt("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),i.appendChild(this.contentEl_),i},i.dispose=function(){this.contentEl_=null,this.textNode_=null,t.prototype.dispose.call(this)},i.updateTextNode_=function(t){var e=this;void 0===t&&(t=0),t=rr(t),this.formattedTime_!==t&&(this.formattedTime_=t,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(function(){if(e.contentEl_){var t=e.textNode_;t&&!e.contentEl_.contains(t)&&(t=null,jt.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),e.textNode_=a.a.createTextNode(e.formattedTime_),e.textNode_&&(t?e.contentEl_.replaceChild(e.textNode_,t):e.contentEl_.appendChild(e.textNode_))}})))},i.updateContent=function(t){},e}(gi);sr.prototype.labelText_="Time",sr.prototype.controlText_="Time",gi.registerComponent("TimeDisplay",sr);var ar=function(t){function e(){return t.apply(this,arguments)||this}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-current-time"},i.updateContent=function(t){var e;e=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(e)},e}(sr);ar.prototype.labelText_="Current Time",ar.prototype.controlText_="Current Time",gi.registerComponent("CurrentTimeDisplay",ar);var or=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).on(e,"durationchange",n.updateContent),n.on(e,"loadstart",n.updateContent),n.on(e,"loadedmetadata",n.updateContent),n}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-duration"},i.updateContent=function(t){var e=this.player_.duration();this.updateTextNode_(e)},e}(sr);or.prototype.labelText_="Duration",or.prototype.controlText_="Duration",gi.registerComponent("DurationDisplay",or);var lr=function(t){function e(){return t.apply(this,arguments)||this}return d()(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},e}(gi);gi.registerComponent("TimeDivider",lr);var hr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).on(e,"durationchange",n.updateContent),n}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-remaining-time"},i.createEl=function(){var e=t.prototype.createEl.call(this);return e.insertBefore(Jt("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},i.updateContent=function(t){var e;"number"==typeof this.player_.duration()&&(e=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(e))},e}(sr);hr.prototype.labelText_="Remaining Time",hr.prototype.controlText_="Remaining Time",gi.registerComponent("RemainingTimeDisplay",hr);var ur=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).updateShowing(),n.on(n.player(),"durationchange",n.updateShowing),n}d()(e,t);var i=e.prototype;return i.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Jt("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},i.dispose=function(){this.contentEl_=null,t.prototype.dispose.call(this)},i.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(gi);gi.registerComponent("LiveDisplay",ur);var cr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).updateLiveEdgeStatus(),n.player_.liveTracker&&n.on(n.player_.liveTracker,"liveedgechange",n.updateLiveEdgeStatus),n}d()(e,t);var i=e.prototype;return i.createEl=function(){var e=t.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=Jt("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},i.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},i.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},i.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,t.prototype.dispose.call(this)},e}(Zn);cr.prototype.controlText_="Seek to live, currently playing live",gi.registerComponent("SeekToLive",cr);var dr=function(t,e,i){return t=Number(t),Math.min(i,Math.max(e,isNaN(t)?e:t))},pr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).bar=n.getChild(n.options_.barName),n.vertical(!!n.options_.vertical),n.enable(),n}d()(e,t);var i=e.prototype;return i.enabled=function(){return this.enabled_},i.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},i.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},i.createEl=function(e,i,n){return void 0===i&&(i={}),void 0===n&&(n={}),i.className=i.className+" vjs-slider",i=Ht({tabIndex:0},i),n=Ht({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),t.prototype.createEl.call(this,e,i,n)},i.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;"mousedown"===t.type&&t.preventDefault(),"touchstart"!==t.type||Ei||t.preventDefault(),ce(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},i.handleMouseMove=function(t){},i.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;de(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},i.update=function(){var t=this;if(this.el_&&this.bar){var e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",(function(){var i=t.vertical()?"height":"width";t.bar.el().style[i]=(100*e).toFixed(2)+"%"}))),e}},i.getProgress=function(){return Number(dr(this.getPercent(),0,1).toFixed(4))},i.calculateDistance=function(t){var e=ge(this.el_,t);return this.vertical()?e.y:e.x},i.handleKeyDown=function(e){m.a.isEventKey(e,"Left")||m.a.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):m.a.isEventKey(e,"Right")||m.a.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):t.prototype.handleKeyDown.call(this,e)},i.handleClick=function(t){t.stopPropagation(),t.preventDefault()},i.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}(gi);gi.registerComponent("Slider",pr);var fr=function(t,e){return dr(t/e*100,0,100).toFixed(2)+"%"},gr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).partEls_=[],n.on(e,"progress",n.update),n}d()(e,t);var i=e.prototype;return i.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),i=Jt("span",{className:"vjs-control-text"}),n=Jt("span",{textContent:this.localize("Loaded")}),r=a.a.createTextNode(": ");return this.percentageEl_=Jt("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(n),i.appendChild(r),i.appendChild(this.percentageEl_),e},i.dispose=function(){this.partEls_=null,this.percentageEl_=null,t.prototype.dispose.call(this)},i.update=function(t){var e=this;this.requestNamedAnimationFrame("LoadProgressBar#update",(function(){var t=e.player_.liveTracker,i=e.player_.buffered(),n=t&&t.isLive()?t.seekableEnd():e.player_.duration(),r=e.player_.bufferedEnd(),s=e.partEls_,a=fr(r,n);e.percent_!==a&&(e.el_.style.width=a,te(e.percentageEl_,a),e.percent_=a);for(var o=0;o<i.length;o++){var l=i.start(o),h=i.end(o),u=s[o];u||(u=e.el_.appendChild(Jt()),s[o]=u),u.dataset.start===l&&u.dataset.end===h||(u.dataset.start=l,u.dataset.end=h,u.style.left=fr(l,r),u.style.width=fr(h-l,r))}for(var c=s.length;c>i.length;c--)e.el_.removeChild(s[c-1]);s.length=i.length}))},e}(gi);gi.registerComponent("LoadProgressBar",gr);var mr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).update=Ke(Ye(u()(n),n.update),30),n}d()(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},i.update=function(t,e,i){var n=fe(this.el_),r=pe(this.player_.el()),s=t.width*e;if(r&&n){var a=t.left-r.left+s,o=t.width-s+(r.right-t.right),l=n.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),l=Math.round(l),this.el_.style.right="-"+l+"px",this.write(i)}},i.write=function(t){te(this.el_,t)},i.updateTime=function(t,e,i,n){var r=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",(function(){var s,a=r.player_.duration();if(r.player_.liveTracker&&r.player_.liveTracker.isLive()){var o=r.player_.liveTracker.liveWindow(),l=o-e*o;s=(l<1?"":"-")+rr(l,o)}else s=rr(i,a);r.update(t,e,s),n&&n()}))},e}(gi);gi.registerComponent("TimeTooltip",mr);var vr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).update=Ke(Ye(u()(n),n.update),30),n}d()(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},i.update=function(t,e){var i=this.getChild("timeTooltip");if(i){var n=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();i.updateTime(t,e,n)}},e}(gi);vr.prototype.options_={children:[]},Ri||xi||vr.prototype.options_.children.push("timeTooltip"),gi.registerComponent("PlayProgressBar",vr);var yr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).update=Ke(Ye(u()(n),n.update),30),n}d()(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(t,e){var i=this,n=e*this.player_.duration();this.getChild("timeTooltip").updateTime(t,e,n,(function(){i.el_.style.left=t.width*e+"px"}))},e}(gi);yr.prototype.options_={children:["timeTooltip"]},gi.registerComponent("MouseTimeDisplay",yr);var br=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).setEventHandlers_(),n}d()(e,t);var i=e.prototype;return i.setEventHandlers_=function(){this.update_=Ye(this,this.update),this.update=Ke(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in a.a&&"visibilityState"in a.a&&this.on(a.a,"visibilitychange",this.toggleVisibility_)},i.toggleVisibility_=function(t){a.a.hidden?this.disableInterval_(t):(this.enableInterval_(),this.update())},i.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},i.disableInterval_=function(t){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&t&&"ended"!==t.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},i.update=function(e){var i=this,n=t.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",(function(){var t=i.player_.ended()?i.player_.duration():i.getCurrentTime_(),e=i.player_.liveTracker,r=i.player_.duration();e&&e.isLive()&&(r=i.player_.liveTracker.liveCurrentTime()),i.percent_!==n&&(i.el_.setAttribute("aria-valuenow",(100*n).toFixed(2)),i.percent_=n),i.currentTime_===t&&i.duration_===r||(i.el_.setAttribute("aria-valuetext",i.localize("progress bar timing: currentTime={1} duration={2}",[rr(t,r),rr(r,r)],"{1} of {2}")),i.currentTime_=t,i.duration_=r),i.bar&&i.bar.update(pe(i.el()),i.getProgress())})),n},i.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},i.getPercent=function(){var t,e=this.getCurrentTime_(),i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t},i.handleMouseDown=function(e){Te(e)&&(e.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e))},i.handleMouseMove=function(t){if(Te(t)){var e,i=this.calculateDistance(t),n=this.player_.liveTracker;if(n&&n.isLive()){if(i>=.99)return void n.seekToLiveEdge();var r=n.seekableStart(),s=n.liveCurrentTime();if((e=r+i*n.liveWindow())>=s&&(e=s),e<=r&&(e=r+.1),e===1/0)return}else(e=i*this.player_.duration())===this.player_.duration()&&(e-=.1);this.player_.currentTime(e)}},i.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},i.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},i.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Qi(this.player_.play()):this.update_()},i.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},i.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},i.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},i.handleKeyDown=function(e){if(m.a.isEventKey(e,"Space")||m.a.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(m.a.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(0);else if(m.a.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(m()(e))){e.preventDefault(),e.stopPropagation();var i=10*(m.a.codes[m()(e)]-m.a.codes[0])/100;this.player_.currentTime(this.player_.duration()*i)}else m.a.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):m.a.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):t.prototype.handleKeyDown.call(this,e)},i.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableInterval_),this.off(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in a.a&&"visibilityState"in a.a&&this.off(a.a,"visibilitychange",this.toggleVisibility_),t.prototype.dispose.call(this)},e}(pr);br.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},Ri||xi||br.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),gi.registerComponent("SeekBar",br);var _r=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).handleMouseMove=Ke(Ye(u()(n),n.handleMouseMove),30),n.throttledHandleMouseSeek=Ke(Ye(u()(n),n.handleMouseSeek),30),n.enable(),n}d()(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i.handleMouseMove=function(t){var e=this.getChild("seekBar");if(e){var i=e.getChild("playProgressBar"),n=e.getChild("mouseTimeDisplay");if(i||n){var r=e.el(),s=fe(r),a=ge(r,t).x;a=dr(a,0,1),n&&n.update(s,a),i&&i.update(s,e.getProgress())}}},i.handleMouseSeek=function(t){var e=this.getChild("seekBar");e&&e.handleMouseMove(t)},i.enabled=function(){return this.enabled_},i.disable=function(){this.children().forEach((function(t){return t.disable&&t.disable()})),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},i.enable=function(){this.children().forEach((function(t){return t.enable&&t.enable()})),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},i.handleMouseDown=function(t){var e=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(t),this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},i.handleMouseUp=function(t){var e=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseUp(t),this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(gi);_r.prototype.options_={children:["seekBar"]},gi.registerComponent("ProgressControl",_r);var Tr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).on(e,["enterpictureinpicture","leavepictureinpicture"],n.handlePictureInPictureChange),n.on(e,["disablepictureinpicturechanged","loadedmetadata"],n.handlePictureInPictureEnabledChange),n.disable(),n}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-picture-in-picture-control "+t.prototype.buildCSSClass.call(this)},i.handlePictureInPictureEnabledChange=function(){a.a.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},i.handlePictureInPictureChange=function(t){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},i.handleClick=function(t){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},e}(Zn);Tr.prototype.controlText_="Picture-in-Picture",gi.registerComponent("PictureInPictureToggle",Tr);var xr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).on(e,"fullscreenchange",n.handleFullscreenChange),!1===a.a[e.fsApi_.fullscreenEnabled]&&n.disable(),n}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},i.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},i.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(Zn);xr.prototype.controlText_="Fullscreen",gi.registerComponent("FullscreenToggle",xr);var Sr=function(t){function e(){return t.apply(this,arguments)||this}return d()(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}(gi);gi.registerComponent("VolumeLevel",Sr);var wr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).on("slideractive",n.updateLastVolume_),n.on(e,"volumechange",n.updateARIAAttributes),e.ready((function(){return n.updateARIAAttributes()})),n}d()(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},i.handleMouseDown=function(e){Te(e)&&t.prototype.handleMouseDown.call(this,e)},i.handleMouseMove=function(t){Te(t)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(t)))},i.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},i.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},i.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},i.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},i.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},i.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},i.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",(function(){0===t.player_.volume()&&t.player_.lastVolume_(e)}))},e}(pr);wr.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},wr.prototype.playerEvent="volumechange",gi.registerComponent("VolumeBar",wr);var kr=function(t){function e(e,i){var n;return void 0===i&&(i={}),i.vertical=i.vertical||!1,(void 0===i.volumeBar||Gt(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),n=t.call(this,e,i)||this,function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))}(u()(n),e),n.throttledHandleMouseMove=Ke(Ye(u()(n),n.handleMouseMove),30),n.on("mousedown",n.handleMouseDown),n.on("touchstart",n.handleMouseDown),n.on(n.volumeBar,["focus","slideractive"],(function(){n.volumeBar.addClass("vjs-slider-active"),n.addClass("vjs-slider-active"),n.trigger("slideractive")})),n.on(n.volumeBar,["blur","sliderinactive"],(function(){n.volumeBar.removeClass("vjs-slider-active"),n.removeClass("vjs-slider-active"),n.trigger("sliderinactive")})),n}d()(e,t);var i=e.prototype;return i.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},i.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},i.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},i.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(gi);kr.prototype.options_={children:["volumeBar"]},gi.registerComponent("VolumeControl",kr);var Cr=function(t){function e(e,i){var n;return n=t.call(this,e,i)||this,function(t,e){e.tech_&&!e.tech_.featuresMuteControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",(function(){e.tech_.featuresMuteControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")}))}(u()(n),e),n.on(e,["loadstart","volumechange"],n.update),n}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},i.handleClick=function(t){var e=this.player_.volume(),i=this.player_.lastVolume_();if(0===e){var n=i<.1?.1:i;this.player_.volume(n),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},i.update=function(t){this.updateIcon_(),this.updateControlText_()},i.updateIcon_=function(){var t=this.player_.volume(),e=3;Ri&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var i=0;i<4;i++)re(this.el_,"vjs-vol-"+i);ne(this.el_,"vjs-vol-"+e)},i.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},e}(Zn);Cr.prototype.controlText_="Mute",gi.registerComponent("MuteToggle",Cr);var Er=function(t){function e(e,i){var n;return void 0===i&&(i={}),void 0!==i.inline?i.inline=i.inline:i.inline=!0,(void 0===i.volumeControl||Gt(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),(n=t.call(this,e,i)||this).on(e,["loadstart"],n.volumePanelState_),n.on(n.muteToggle,"keyup",n.handleKeyPress),n.on(n.volumeControl,"keyup",n.handleVolumeControlKeyUp),n.on("keydown",n.handleKeyPress),n.on("mouseover",n.handleMouseOver),n.on("mouseout",n.handleMouseOut),n.on(n.volumeControl,["slideractive"],n.sliderActive_),n.on(n.volumeControl,["sliderinactive"],n.sliderInactive_),n}d()(e,t);var i=e.prototype;return i.sliderActive_=function(){this.addClass("vjs-slider-active")},i.sliderInactive_=function(){this.removeClass("vjs-slider-active")},i.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},i.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},i.dispose=function(){this.handleMouseOut(),t.prototype.dispose.call(this)},i.handleVolumeControlKeyUp=function(t){m.a.isEventKey(t,"Esc")&&this.muteToggle.focus()},i.handleMouseOver=function(t){this.addClass("vjs-hover"),We(a.a,"keyup",Ye(this,this.handleKeyPress))},i.handleMouseOut=function(t){this.removeClass("vjs-hover"),ze(a.a,"keyup",Ye(this,this.handleKeyPress))},i.handleKeyPress=function(t){m.a.isEventKey(t,"Esc")&&this.handleMouseOut()},e}(gi);Er.prototype.options_={children:["muteToggle","volumeControl"]},gi.registerComponent("VolumePanel",Er);var Ar=function(t){function e(e,i){var n;return n=t.call(this,e,i)||this,i&&(n.menuButton_=i.menuButton),n.focusedChild_=-1,n.on("keydown",n.handleKeyDown),n.boundHandleBlur_=Ye(u()(n),n.handleBlur),n.boundHandleTapClick_=Ye(u()(n),n.handleTapClick),n}d()(e,t);var i=e.prototype;return i.addEventListenerForItem=function(t){t instanceof gi&&(this.on(t,"blur",this.boundHandleBlur_),this.on(t,["tap","click"],this.boundHandleTapClick_))},i.removeEventListenerForItem=function(t){t instanceof gi&&(this.off(t,"blur",this.boundHandleBlur_),this.off(t,["tap","click"],this.boundHandleTapClick_))},i.removeChild=function(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),t.prototype.removeChild.call(this,e)},i.addItem=function(t){var e=this.addChild(t);e&&this.addEventListenerForItem(e)},i.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=Jt(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),We(i,"click",(function(t){t.preventDefault(),t.stopImmediatePropagation()})),i},i.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,t.prototype.dispose.call(this)},i.handleBlur=function(t){var e=t.relatedTarget||a.a.activeElement;if(!this.children().some((function(t){return t.el()===e}))){var i=this.menuButton_;i&&i.buttonPressed_&&e!==i.el().firstChild&&i.unpressButton()}},i.handleTapClick=function(t){if(this.menuButton_){this.menuButton_.unpressButton();var e=this.children();if(!Array.isArray(e))return;var i=e.filter((function(e){return e.el()===t.target}))[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}},i.handleKeyDown=function(t){m.a.isEventKey(t,"Left")||m.a.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):(m.a.isEventKey(t,"Right")||m.a.isEventKey(t,"Up"))&&(t.preventDefault(),t.stopPropagation(),this.stepBack())},i.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},i.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},i.focus=function(t){void 0===t&&(t=0);var e=this.children().slice();e.length&&e[0].hasClass("vjs-menu-title")&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(gi);gi.registerComponent("Menu",Ar);var Pr=function(t){function e(e,i){var n;void 0===i&&(i={}),(n=t.call(this,e,i)||this).menuButton_=new Zn(e,i),n.menuButton_.controlText(n.controlText_),n.menuButton_.el_.setAttribute("aria-haspopup","true");var r=Zn.prototype.buildCSSClass();return n.menuButton_.el_.className=n.buildCSSClass()+" "+r,n.menuButton_.removeClass("vjs-control"),n.addChild(n.menuButton_),n.update(),n.enabled_=!0,n.on(n.menuButton_,"tap",n.handleClick),n.on(n.menuButton_,"click",n.handleClick),n.on(n.menuButton_,"keydown",n.handleKeyDown),n.on(n.menuButton_,"mouseenter",(function(){n.addClass("vjs-hover"),n.menu.show(),We(a.a,"keyup",Ye(u()(n),n.handleMenuKeyUp))})),n.on("mouseleave",n.handleMouseLeave),n.on("keydown",n.handleSubmenuKeyDown),n}d()(e,t);var i=e.prototype;return i.update=function(){var t=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},i.createMenu=function(){var t=new Ar(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=Jt("li",{className:"vjs-menu-title",innerHTML:hi(this.options_.title),tabIndex:-1});this.hideThreshold_+=1;var i=new gi(this.player_,{el:e});t.addItem(i)}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)t.addItem(this.items[n]);return t},i.createItems=function(){},i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},i.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+Zn.prototype.buildCSSClass()+" "+t.prototype.buildCSSClass.call(this)},i.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+t.prototype.buildCSSClass.call(this)},i.controlText=function(t,e){return void 0===e&&(e=this.menuButton_.el()),this.menuButton_.controlText(t,e)},i.dispose=function(){this.handleMouseLeave(),t.prototype.dispose.call(this)},i.handleClick=function(t){this.buttonPressed_?this.unpressButton():this.pressButton()},i.handleMouseLeave=function(t){this.removeClass("vjs-hover"),ze(a.a,"keyup",Ye(this,this.handleMenuKeyUp))},i.focus=function(){this.menuButton_.focus()},i.blur=function(){this.menuButton_.blur()},i.handleKeyDown=function(t){m.a.isEventKey(t,"Esc")||m.a.isEventKey(t,"Tab")?(this.buttonPressed_&&this.unpressButton(),m.a.isEventKey(t,"Tab")||(t.preventDefault(),this.menuButton_.focus())):(m.a.isEventKey(t,"Up")||m.a.isEventKey(t,"Down"))&&(this.buttonPressed_||(t.preventDefault(),this.pressButton()))},i.handleMenuKeyUp=function(t){(m.a.isEventKey(t,"Esc")||m.a.isEventKey(t,"Tab"))&&this.removeClass("vjs-hover")},i.handleSubmenuKeyPress=function(t){this.handleSubmenuKeyDown(t)},i.handleSubmenuKeyDown=function(t){(m.a.isEventKey(t,"Esc")||m.a.isEventKey(t,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),m.a.isEventKey(t,"Tab")||(t.preventDefault(),this.menuButton_.focus()))},i.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Ri&&Qt())return;this.menu.focus()}},i.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},i.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},i.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(gi);gi.registerComponent("MenuButton",Pr);var Or=function(t){function e(e,i){var n,r=i.tracks;if((n=t.call(this,e,i)||this).items.length<=1&&n.hide(),!r)return u()(n);var s=Ye(u()(n),n.update);return r.addEventListener("removetrack",s),r.addEventListener("addtrack",s),r.addEventListener("labelchange",s),n.player_.on("ready",s),n.player_.on("dispose",(function(){r.removeEventListener("removetrack",s),r.removeEventListener("addtrack",s),r.removeEventListener("labelchange",s)})),n}return d()(e,t),e}(Pr);gi.registerComponent("TrackButton",Or);var Lr=["Tab","Esc","Up","Down","Right","Left"],Mr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).selectable=i.selectable,n.isSelected_=i.selected||!1,n.multiSelectable=i.multiSelectable,n.selected(n.isSelected_),n.selectable?n.multiSelectable?n.el_.setAttribute("role","menuitemcheckbox"):n.el_.setAttribute("role","menuitemradio"):n.el_.setAttribute("role","menuitem"),n}d()(e,t);var i=e.prototype;return i.createEl=function(e,i,n){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",Ht({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},i),n)},i.handleKeyDown=function(e){Lr.some((function(t){return m.a.isEventKey(e,t)}))||t.prototype.handleKeyDown.call(this,e)},i.handleClick=function(t){this.selected(!0)},i.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},e}(Gn);gi.registerComponent("MenuItem",Mr);var Ir=function(t){function e(e,i){var n,s=i.track,o=e.textTracks();i.label=s.label||s.language||"Unknown",i.selected="showing"===s.mode,(n=t.call(this,e,i)||this).track=s,n.kinds=(i.kinds||[i.kind||n.track.kind]).filter(Boolean);var l,h=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n.handleTracksChange.apply(u()(n),e)},c=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n.handleSelectedLanguageChange.apply(u()(n),e)};(e.on(["loadstart","texttrackchange"],h),o.addEventListener("change",h),o.addEventListener("selectedlanguagechange",c),n.on("dispose",(function(){e.off(["loadstart","texttrackchange"],h),o.removeEventListener("change",h),o.removeEventListener("selectedlanguagechange",c)})),void 0===o.onchange)&&n.on(["tap","click"],(function(){if("object"!=typeof r.a.Event)try{l=new r.a.Event("change")}catch(t){}l||(l=a.a.createEvent("Event")).initEvent("change",!0,!0),o.dispatchEvent(l)}));return n.handleTracksChange(),n}d()(e,t);var i=e.prototype;return i.handleClick=function(e){var i=this.track,n=this.player_.textTracks();if(t.prototype.handleClick.call(this,e),n)for(var r=0;r<n.length;r++){var s=n[r];-1!==this.kinds.indexOf(s.kind)&&(s===i?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled"))}},i.handleTracksChange=function(t){var e="showing"===this.track.mode;e!==this.isSelected_&&this.selected(e)},i.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},i.dispose=function(){this.track=null,t.prototype.dispose.call(this)},e}(Mr);gi.registerComponent("TextTrackMenuItem",Ir);var Dr=function(t){function e(e,i){return i.track={player:e,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,t.call(this,e,i)||this}d()(e,t);var i=e.prototype;return i.handleTracksChange=function(t){for(var e=this.player().textTracks(),i=!0,n=0,r=e.length;n<r;n++){var s=e[n];if(this.options_.kinds.indexOf(s.kind)>-1&&"showing"===s.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)},i.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),i=!0,n=0,r=e.length;n<r;n++){var s=e[n];if(["captions","descriptions","subtitles"].indexOf(s.kind)>-1&&"showing"===s.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(Ir);gi.registerComponent("OffTextTrackMenuItem",Dr);var Rr=function(t){function e(e,i){return void 0===i&&(i={}),i.tracks=e.textTracks(),t.call(this,e,i)||this}return d()(e,t),e.prototype.createItems=function(t,e){var i;void 0===t&&(t=[]),void 0===e&&(e=Ir),this.label_&&(i=this.label_+" off"),t.push(new Dr(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var r=0;r<n.length;r++){var s=n[r];if(this.kinds_.indexOf(s.kind)>-1){var a=new e(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-"+s.kind+"-menu-item"),t.push(a)}}return t},e}(Or);gi.registerComponent("TextTrackButton",Rr);var Nr=function(t){function e(e,i){var n,r=i.track,s=i.cue,a=e.currentTime();return i.selectable=!0,i.multiSelectable=!1,i.label=s.text,i.selected=s.startTime<=a&&a<s.endTime,(n=t.call(this,e,i)||this).track=r,n.cue=s,r.addEventListener("cuechange",Ye(u()(n),n.update)),n}d()(e,t);var i=e.prototype;return i.handleClick=function(e){t.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},i.update=function(t){var e=this.cue,i=this.player_.currentTime();this.selected(e.startTime<=i&&i<e.endTime)},e}(Mr);gi.registerComponent("ChaptersTrackMenuItem",Nr);var Br=function(t){function e(e,i,n){return t.call(this,e,i,n)||this}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildWrapperCSSClass.call(this)},i.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},i.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}},i.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;e>=0;e--){var i=t[e];if(i.kind===this.kind_)return i}},i.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(hi(this.kind_))},i.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},i.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var i=0,n=e.length;i<n;i++){var r=e[i],s=new Nr(this.player_,{track:this.track_,cue:r});t.push(s)}return t},e}(Rr);Br.prototype.kind_="chapters",Br.prototype.controlText_="Chapters",gi.registerComponent("ChaptersButton",Br);var jr=function(t){function e(e,i,n){var r;r=t.call(this,e,i,n)||this;var s=e.textTracks(),a=Ye(u()(r),r.handleTracksChange);return s.addEventListener("change",a),r.on("dispose",(function(){s.removeEventListener("change",a)})),r}d()(e,t);var i=e.prototype;return i.handleTracksChange=function(t){for(var e=this.player().textTracks(),i=!1,n=0,r=e.length;n<r;n++){var s=e[n];if(s.kind!==this.kind_&&"showing"===s.mode){i=!0;break}}i?this.disable():this.enable()},i.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(Rr);jr.prototype.kind_="descriptions",jr.prototype.controlText_="Descriptions",gi.registerComponent("DescriptionsButton",jr);var Ur=function(t){function e(e,i,n){return t.call(this,e,i,n)||this}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(Rr);Ur.prototype.kind_="subtitles",Ur.prototype.controlText_="Subtitles",gi.registerComponent("SubtitlesButton",Ur);var Fr=function(t){function e(e,i){var n;return i.track={player:e,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",(n=t.call(this,e,i)||this).addClass("vjs-texttrack-settings"),n.controlText(", opens "+i.kind+" settings dialog"),n}return d()(e,t),e.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},e}(Ir);gi.registerComponent("CaptionSettingsMenuItem",Fr);var Wr=function(t){function e(e,i,n){return t.call(this,e,i,n)||this}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-captions-button "+t.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Fr(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),t.prototype.createItems.call(this,e)},e}(Rr);Wr.prototype.kind_="captions",Wr.prototype.controlText_="Captions",gi.registerComponent("CaptionsButton",Wr);var zr=function(t){function e(){return t.apply(this,arguments)||this}return d()(e,t),e.prototype.createEl=function(e,i,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n "),r+="</span>",t.prototype.createEl.call(this,e,Ht({innerHTML:r},i),n)},e}(Ir);gi.registerComponent("SubsCapsMenuItem",zr);var Hr=function(t){function e(e,i){var n;return void 0===i&&(i={}),(n=t.call(this,e,i)||this).label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(n.player_.language_)>-1&&(n.label_="captions"),n.menuButton_.controlText(hi(n.label_)),n}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Fr(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=t.prototype.createItems.call(this,e,zr)},e}(Rr);Hr.prototype.kinds_=["captions","subtitles"],Hr.prototype.controlText_="Subtitles",gi.registerComponent("SubsCapsButton",Hr);var Vr=function(t){function e(e,i){var n,r=i.track,s=e.audioTracks();i.label=r.label||r.language||"Unknown",i.selected=r.enabled,(n=t.call(this,e,i)||this).track=r,n.addClass("vjs-"+r.kind+"-menu-item");var a=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];n.handleTracksChange.apply(u()(n),e)};return s.addEventListener("change",a),n.on("dispose",(function(){s.removeEventListener("change",a)})),n}d()(e,t);var i=e.prototype;return i.createEl=function(e,i,n){var r='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(r+='\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <span class="vjs-control-text"> '+this.localize("Descriptions")+"</span>\n "),r+="</span>",t.prototype.createEl.call(this,e,Ht({innerHTML:r},i),n)},i.handleClick=function(e){var i=this.player_.audioTracks();t.prototype.handleClick.call(this,e);for(var n=0;n<i.length;n++){var r=i[n];r.enabled=r===this.track}},i.handleTracksChange=function(t){this.selected(this.track.enabled)},e}(Mr);gi.registerComponent("AudioTrackMenuItem",Vr);var Gr=function(t){function e(e,i){return void 0===i&&(i={}),i.tracks=e.audioTracks(),t.call(this,e,i)||this}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-audio-button "+t.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(t){void 0===t&&(t=[]),this.hideThreshold_=1;for(var e=this.player_.audioTracks(),i=0;i<e.length;i++){var n=e[i];t.push(new Vr(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return t},e}(Or);Gr.prototype.controlText_="Audio Track",gi.registerComponent("AudioTrackButton",Gr);var Xr=function(t){function e(e,i){var n,r=i.rate,s=parseFloat(r,10);return i.label=r,i.selected=1===s,i.selectable=!0,i.multiSelectable=!1,(n=t.call(this,e,i)||this).label=r,n.rate=s,n.on(e,"ratechange",n.update),n}d()(e,t);var i=e.prototype;return i.handleClick=function(e){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},i.update=function(t){this.selected(this.player().playbackRate()===this.rate)},e}(Mr);Xr.prototype.contentElType="button",gi.registerComponent("PlaybackRateMenuItem",Xr);var qr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).updateVisibility(),n.updateLabel(),n.on(e,"loadstart",n.updateVisibility),n.on(e,"ratechange",n.updateLabel),n}d()(e,t);var i=e.prototype;return i.createEl=function(){var e=t.prototype.createEl.call(this);return this.labelEl_=Jt("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},i.dispose=function(){this.labelEl_=null,t.prototype.dispose.call(this)},i.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildWrapperCSSClass.call(this)},i.createMenu=function(){var t=new Ar(this.player()),e=this.playbackRates();if(e)for(var i=e.length-1;i>=0;i--)t.addChild(new Xr(this.player(),{rate:e[i]+"x"}));return t},i.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},i.handleClick=function(t){for(var e=this.player().playbackRate(),i=this.playbackRates(),n=i[0],r=0;r<i.length;r++)if(i[r]>e){n=i[r];break}this.player().playbackRate(n)},i.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},i.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},i.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},i.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(Pr);qr.prototype.controlText_="Playback Rate",gi.registerComponent("PlaybackRateMenuButton",qr);var Yr=function(t){function e(){return t.apply(this,arguments)||this}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},i.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(gi);gi.registerComponent("Spacer",Yr);var Kr=function(t){function e(){return t.apply(this,arguments)||this}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},i.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML=" ",e},e}(Yr);gi.registerComponent("CustomControlSpacer",Kr);var $r=function(t){function e(){return t.apply(this,arguments)||this}return d()(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},e}(gi);$r.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in a.a&&$r.prototype.options_.children.splice($r.prototype.options_.children.length-1,0,"pictureInPictureToggle"),gi.registerComponent("ControlBar",$r);var Qr=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).on(e,"error",n.open),n}d()(e,t);var i=e.prototype;return i.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},i.content=function(){var t=this.player().error();return t?this.localize(t.message):""},e}(en);Qr.prototype.options_=l()({},en.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),gi.registerComponent("ErrorDisplay",Qr);var Zr=["#000","Black"],Jr=["#00F","Blue"],ts=["#0FF","Cyan"],es=["#0F0","Green"],is=["#F0F","Magenta"],ns=["#F00","Red"],rs=["#FFF","White"],ss=["#FF0","Yellow"],as=["1","Opaque"],os=["0.5","Semi-Transparent"],ls=["0","Transparent"],hs={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Zr,rs,ns,es,Jr,ss,is,ts]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[as,os,ls]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[rs,Zr,ns,es,Jr,ss,is,ts]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[as,os]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[ls,os,as]}};function us(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}hs.windowColor.options=hs.backgroundColor.options;var cs=function(t){function e(e,i){var n;return i.temporary=!1,(n=t.call(this,e,i)||this).updateDisplay=Ye(u()(n),n.updateDisplay),n.fill(),n.hasBeenOpened_=n.hasBeenFilled_=!0,n.endDialog=Jt("p",{className:"vjs-control-text",textContent:n.localize("End of dialog window.")}),n.el().appendChild(n.endDialog),n.setDefaults(),void 0===i.persistTextTrackSettings&&(n.options_.persistTextTrackSettings=n.options_.playerOptions.persistTextTrackSettings),n.on(n.$(".vjs-done-button"),"click",(function(){n.saveSettings(),n.close()})),n.on(n.$(".vjs-default-button"),"click",(function(){n.setDefaults(),n.updateDisplay()})),zt(hs,(function(t){n.on(n.$(t.selector),"change",n.updateDisplay)})),n.options_.persistTextTrackSettings&&n.restoreSettings(),n}d()(e,t);var i=e.prototype;return i.dispose=function(){this.endDialog=null,t.prototype.dispose.call(this)},i.createElSelect_=function(t,e,i){var n=this;void 0===e&&(e=""),void 0===i&&(i="label");var r=hs[t],s=r.id.replace("%s",this.id_),a=[e,s].join(" ").trim();return["<"+i+' id="'+s+'" class="'+("label"===i?"vjs-label":"")+'">',this.localize(r.label),"</"+i+">",'<select aria-labelledby="'+a+'">'].concat(r.options.map((function(t){var e=s+"-"+t[1].replace(/\W+/g,"");return['<option id="'+e+'" value="'+t[0]+'" ','aria-labelledby="'+a+" "+e+'">',n.localize(t[1]),"</option>"].join("")}))).concat("</select>").join("")},i.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},i.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},i.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},i.createElColors_=function(){return Jt("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.createElFont_=function(){return Jt("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},i.createElControls_=function(){var t=this.localize("restore all settings to the default values");return Jt("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},i.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.label=function(){return this.localize("Caption Settings Dialog")},i.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.getValues=function(){var t,e,i,n=this;return e=function(t,e,i){var r,s,a=(r=n.$(e.selector),s=e.parser,us(r.options[r.options.selectedIndex].value,s));return void 0!==a&&(t[i]=a),t},void 0===(i={})&&(i=0),Wt(t=hs).reduce((function(i,n){return e(i,t[n],n)}),i)},i.setValues=function(t){var e=this;zt(hs,(function(i,n){!function(t,e,i){if(e)for(var n=0;n<t.options.length;n++)if(us(t.options[n].value,i)===e){t.selectedIndex=n;break}}(e.$(i.selector),t[n],i.parser)}))},i.setDefaults=function(){var t=this;zt(hs,(function(e){var i=e.hasOwnProperty("default")?e.default:0;t.$(e.selector).selectedIndex=i}))},i.restoreSettings=function(){var t;try{t=JSON.parse(r.a.localStorage.getItem("vjs-text-track-settings"))}catch(t){jt.warn(t)}t&&this.setValues(t)},i.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?r.a.localStorage.setItem("vjs-text-track-settings",JSON.stringify(t)):r.a.localStorage.removeItem("vjs-text-track-settings")}catch(t){jt.warn(t)}}},i.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},i.conditionalBlur_=function(){this.previouslyActiveEl_=null;var t=this.player_.controlBar,e=t&&t.subsCapsButton,i=t&&t.captionsButton;e?e.focus():i&&i.focus()},e}(en);gi.registerComponent("TextTrackSettings",cs);var ds=function(t){function e(e,i){var n,s=i.ResizeObserver||r.a.ResizeObserver;null===i.ResizeObserver&&(s=!1);var a=ui({createEl:!s,reportTouchActivity:!1},i);return(n=t.call(this,e,a)||this).ResizeObserver=i.ResizeObserver||r.a.ResizeObserver,n.loadListener_=null,n.resizeObserver_=null,n.debouncedHandler_=function(t,e,i,n){var s;void 0===n&&(n=r.a);var a=function(){var r=this,a=arguments,o=function(){s=null,o=null,i||t.apply(r,a)};!s&&i&&t.apply(r,a),n.clearTimeout(s),s=n.setTimeout(o,e)};return a.cancel=function(){n.clearTimeout(s),s=null},a}((function(){n.resizeHandler()}),100,!1,u()(n)),s?(n.resizeObserver_=new n.ResizeObserver(n.debouncedHandler_),n.resizeObserver_.observe(e.el())):(n.loadListener_=function(){if(n.el_&&n.el_.contentWindow){var t=n.debouncedHandler_,e=n.unloadListener_=function(){ze(this,"resize",t),ze(this,"unload",e),e=null};We(n.el_.contentWindow,"unload",e),We(n.el_.contentWindow,"resize",t)}},n.one("load",n.loadListener_)),n}d()(e,t);var i=e.prototype;return i.createEl=function(){return t.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},i.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},i.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,t.prototype.dispose.call(this)},e}(gi);gi.registerComponent("ResizeManager",ds);var ps={trackingThreshold:30,liveTolerance:15},fs=function(t){function e(e,i){var n,r=ui(ps,i,{createEl:!1});return(n=t.call(this,e,r)||this).reset_(),n.on(n.player_,"durationchange",n.handleDurationchange),Pi&&"hidden"in a.a&&"visibilityState"in a.a&&n.on(a.a,"visibilitychange",n.handleVisibilityChange),n}d()(e,t);var i=e.prototype;return i.handleVisibilityChange=function(){this.player_.duration()===1/0&&(a.a.hidden?this.stopTracking():this.startTracking())},i.trackLive_=function(){var t=this.player_.seekable();if(t&&t.length){var e=Number(r.a.performance.now().toFixed(4)),i=-1===this.lastTime_?0:(e-this.lastTime_)/1e3;this.lastTime_=e,this.pastSeekEnd_=this.pastSeekEnd()+i;var n=this.liveCurrentTime(),s=this.player_.currentTime(),a=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-s)>this.options_.liveTolerance;this.timeupdateSeen_&&n!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}},i.handleDurationchange=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},i.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLive_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked):(this.one(this.player_,"play",this.handlePlay),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate)))},i.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked)},i.handleSeeked=function(){var t=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&t>2,this.skipNextSeeked_=!1,this.trackLive_()},i.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},i.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLive_),this.off(this.player_,"seeked",this.handleSeeked),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate),this.off(this.player_,"timeupdate",this.seekToLiveEdge)},i.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},i.seekableEnd=function(){for(var t=this.player_.seekable(),e=[],i=t?t.length:0;i--;)e.push(t.end(i));return e.length?e.sort()[e.length-1]:1/0},i.seekableStart=function(){for(var t=this.player_.seekable(),e=[],i=t?t.length:0;i--;)e.push(t.start(i));return e.length?e.sort()[0]:0},i.liveWindow=function(){var t=this.liveCurrentTime();return t===1/0?0:t-this.seekableStart()},i.isLive=function(){return this.isTracking()},i.atLiveEdge=function(){return!this.behindLiveEdge()},i.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},i.pastSeekEnd=function(){var t=this.seekableEnd();return-1!==this.lastSeekEnd_&&t!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=t,this.pastSeekEnd_},i.behindLiveEdge=function(){return this.behindLiveEdge_},i.isTracking=function(){return"number"==typeof this.trackingInterval_},i.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.skipNextSeeked_=!0,this.player_.currentTime(this.liveCurrentTime()))},i.dispose=function(){this.off(a.a,"visibilitychange",this.handleVisibilityChange),this.stopTracking(),t.prototype.dispose.call(this)},e}(gi);gi.registerComponent("LiveTracker",fs);var gs,ms=function(t){var e=t.el();if(e.hasAttribute("src"))return t.triggerSourceset(e.src),!0;var i=t.$$("source"),n=[],r="";if(!i.length)return!1;for(var s=0;s<i.length;s++){var a=i[s].src;a&&-1===n.indexOf(a)&&n.push(a)}return!!n.length&&(1===n.length&&(r=n[0]),t.triggerSourceset(r),!0)},vs=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(t){var e=a.a.createElement(this.nodeName.toLowerCase());e.innerHTML=t;for(var i=a.a.createDocumentFragment();e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",r.a.Element.prototype.appendChild.call(this,i),this.innerHTML}}),ys=function(t,e){for(var i={},n=0;n<t.length&&!((i=Object.getOwnPropertyDescriptor(t[n],e))&&i.set&&i.get);n++);return i.enumerable=!0,i.configurable=!0,i},bs=function(t){var e=t.el();if(!e.resetSourceWatch_){var i={},n=function(t){return ys([t.el(),r.a.HTMLMediaElement.prototype,r.a.Element.prototype,vs],"innerHTML")}(t),s=function(i){return function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];var a=i.apply(e,r);return ms(t),a}};["append","appendChild","insertAdjacentHTML"].forEach((function(t){e[t]&&(i[t]=e[t],e[t]=s(i[t]))})),Object.defineProperty(e,"innerHTML",ui(n,{set:s(n.set)})),e.resetSourceWatch_=function(){e.resetSourceWatch_=null,Object.keys(i).forEach((function(t){e[t]=i[t]})),Object.defineProperty(e,"innerHTML",n)},t.one("sourceset",e.resetSourceWatch_)}},_s=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?yn(r.a.Element.prototype.getAttribute.call(this,"src")):""},set:function(t){return r.a.Element.prototype.setAttribute.call(this,"src",t),t}}),Ts=function(t){if(t.featuresSourceset){var e=t.el();if(!e.resetSourceset_){var i=function(t){return ys([t.el(),r.a.HTMLMediaElement.prototype,_s],"src")}(t),n=e.setAttribute,s=e.load;Object.defineProperty(e,"src",ui(i,{set:function(n){var r=i.set.call(e,n);return t.triggerSourceset(e.src),r}})),e.setAttribute=function(i,r){var s=n.call(e,i,r);return/src/i.test(i)&&t.triggerSourceset(e.src),s},e.load=function(){var i=s.call(e);return ms(t)||(t.triggerSourceset(""),bs(t)),i},e.currentSrc?t.triggerSourceset(e.currentSrc):ms(t)||bs(t),e.resetSourceset_=function(){e.resetSourceset_=null,e.load=s,e.setAttribute=n,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_()}}}},xs=function(t,e,i,n){void 0===n&&(n=!0);var r=function(i){return Object.defineProperty(t,e,{value:i,enumerable:!0,writable:!0})},s={configurable:!0,enumerable:!0,get:function(){var t=i();return r(t),t}};return n&&(s.set=r),Object.defineProperty(t,e,s)},Ss=function(t){function e(e,i){var n;n=t.call(this,e,i)||this;var r=e.source,s=!1;if(r&&(n.el_.currentSrc!==r.src||e.tag&&3===e.tag.initNetworkState_)?n.setSource(r):n.handleLateInit_(n.el_),e.enableSourceset&&n.setupSourcesetHandling_(),n.isScrubbing_=!1,n.el_.hasChildNodes()){for(var a=n.el_.childNodes,o=a.length,l=[];o--;){var h=a[o];"track"===h.nodeName.toLowerCase()&&(n.featuresNativeTextTracks?(n.remoteTextTrackEls().addTrackElement_(h),n.remoteTextTracks().addTrack(h.track),n.textTracks().addTrack(h.track),s||n.el_.hasAttribute("crossorigin")||!_n(h.src)||(s=!0)):l.push(h))}for(var u=0;u<l.length;u++)n.el_.removeChild(l[u])}return n.proxyNativeTracks_(),n.featuresNativeTextTracks&&s&&jt.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),n.restoreMetadataTracksInIOSNativePlayer_(),(Mi||Di||wi)&&!0===e.nativeControlsForTouch&&n.setControls(!0),n.proxyWebkitFullscreen_(),n.triggerReady(),n}d()(e,t);var i=e.prototype;return i.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),e.disposeMediaElement(this.el_),this.options_=null,t.prototype.dispose.call(this)},i.setupSourcesetHandling_=function(){Ts(this)},i.restoreMetadataTracksInIOSNativePlayer_=function(){var t,e=this.textTracks(),i=function(){t=[];for(var i=0;i<e.length;i++){var n=e[i];"metadata"===n.kind&&t.push({track:n,storedMode:n.mode})}};i(),e.addEventListener("change",i),this.on("dispose",(function(){return e.removeEventListener("change",i)}));var n=function i(){for(var n=0;n<t.length;n++){var r=t[n];"disabled"===r.track.mode&&r.track.mode!==r.storedMode&&(r.track.mode=r.storedMode)}e.removeEventListener("change",i)};this.on("webkitbeginfullscreen",(function(){e.removeEventListener("change",i),e.removeEventListener("change",n),e.addEventListener("change",n)})),this.on("webkitendfullscreen",(function(){e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",n)}))},i.overrideNative_=function(t,e){var i=this;if(e===this["featuresNative"+t+"Tracks"]){var n=t.toLowerCase();this[n+"TracksListeners_"]&&Object.keys(this[n+"TracksListeners_"]).forEach((function(t){i.el()[n+"Tracks"].removeEventListener(t,i[n+"TracksListeners_"][t])})),this["featuresNative"+t+"Tracks"]=!e,this[n+"TracksListeners_"]=null,this.proxyNativeTracksForType_(n)}},i.overrideNativeAudioTracks=function(t){this.overrideNative_("Audio",t)},i.overrideNativeVideoTracks=function(t){this.overrideNative_("Video",t)},i.proxyNativeTracksForType_=function(t){var e=this,i=An[t],n=this.el()[i.getterName],r=this[i.getterName]();if(this["featuresNative"+i.capitalName+"Tracks"]&&n&&n.addEventListener){var s={change:function(i){var n={type:"change",target:r,currentTarget:r,srcElement:r};r.trigger(n),"text"===t&&e[Pn.remoteText.getterName]().trigger(n)},addtrack:function(t){r.addTrack(t.track)},removetrack:function(t){r.removeTrack(t.track)}},a=function(){for(var t=[],e=0;e<r.length;e++){for(var i=!1,s=0;s<n.length;s++)if(n[s]===r[e]){i=!0;break}i||t.push(r[e])}for(;t.length;)r.removeTrack(t.shift())};this[i.getterName+"Listeners_"]=s,Object.keys(s).forEach((function(t){var i=s[t];n.addEventListener(t,i),e.on("dispose",(function(e){return n.removeEventListener(t,i)}))})),this.on("loadstart",a),this.on("dispose",(function(t){return e.off("loadstart",a)}))}},i.proxyNativeTracks_=function(){var t=this;An.names.forEach((function(e){t.proxyNativeTracksForType_(e)}))},i.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var i=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(i,t),e.disposeMediaElement(t),t=i}else{t=a.a.createElement("video");var n=ui({},this.options_.tag&&oe(this.options_.tag));Mi&&!0===this.options_.nativeControlsForTouch||delete n.controls,ae(t,Ht(n,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}void 0!==this.options_.preload&&he(t,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(t.disablePictureInPicture=this.options_.disablePictureInPicture);for(var r=["loop","muted","playsinline","autoplay"],s=0;s<r.length;s++){var o=r[s],l=this.options_[o];void 0!==l&&(l?he(t,o,o):ue(t,o),t[o]=l)}return t},i.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,i=function(){e=!0};this.on("loadstart",i);var n=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready((function(){this.off("loadstart",i),this.off("loadedmetadata",n),e||this.trigger("loadstart")}))}var r=["loadstart"];r.push("loadedmetadata"),t.readyState>=2&&r.push("loadeddata"),t.readyState>=3&&r.push("canplay"),t.readyState>=4&&r.push("canplaythrough"),this.ready((function(){r.forEach((function(t){this.trigger(t)}),this)}))}},i.setScrubbing=function(t){this.isScrubbing_=t},i.scrubbing=function(){return this.isScrubbing_},i.setCurrentTime=function(t){try{this.isScrubbing_&&this.el_.fastSeek&&Ni?this.el_.fastSeek(t):this.el_.currentTime=t}catch(t){jt(t,"Video is not ready. (Video.js)")}},i.duration=function(){var t=this;if(this.el_.duration===1/0&&xi&&Ei&&0===this.el_.currentTime){return this.on("timeupdate",(function e(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))})),NaN}return this.el_.duration||NaN},i.width=function(){return this.el_.offsetWidth},i.height=function(){return this.el_.offsetHeight},i.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},i=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",(function(){t.off("webkitbeginfullscreen",i),t.off("webkitendfullscreen",e)}))}},i.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=r.a.navigator&&r.a.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},i.enterFullScreen=function(){var t=this.el_;if(t.paused&&t.networkState<=t.HAVE_METADATA)Qi(this.el_.play()),this.setTimeout((function(){t.pause();try{t.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}}),0);else try{t.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},i.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},i.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},i.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},i.reset=function(){e.resetMediaElement(this.el_)},i.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},i.setControls=function(t){this.el_.controls=!!t},i.addTextTrack=function(e,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,n):t.prototype.addTextTrack.call(this,e,i,n)},i.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var i=a.a.createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i},i.addRemoteTextTrack=function(e,i){var n=t.prototype.addRemoteTextTrack.call(this,e,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},i.removeRemoteTextTrack=function(e){if(t.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var i=this.$$("track"),n=i.length;n--;)e!==i[n]&&e!==i[n].track||this.el().removeChild(i[n])},i.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),r.a.performance&&"function"==typeof r.a.performance.now?t.creationTime=r.a.performance.now():r.a.performance&&r.a.performance.timing&&"number"==typeof r.a.performance.timing.navigationStart&&(t.creationTime=r.a.Date.now()-r.a.performance.timing.navigationStart),t},e}(Ln);xs(Ss,"TEST_VID",(function(){if(Kt()){var t=a.a.createElement("video"),e=a.a.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",t.appendChild(e),t}})),Ss.isSupported=function(){try{Ss.TEST_VID.volume=.5}catch(t){return!1}return!(!Ss.TEST_VID||!Ss.TEST_VID.canPlayType)},Ss.canPlayType=function(t){return Ss.TEST_VID.canPlayType(t)},Ss.canPlaySource=function(t,e){return Ss.canPlayType(t.type)},Ss.canControlVolume=function(){try{var t=Ss.TEST_VID.volume;return Ss.TEST_VID.volume=t/2+.1,t!==Ss.TEST_VID.volume}catch(t){return!1}},Ss.canMuteVolume=function(){try{var t=Ss.TEST_VID.muted;return Ss.TEST_VID.muted=!t,Ss.TEST_VID.muted?he(Ss.TEST_VID,"muted","muted"):ue(Ss.TEST_VID,"muted"),t!==Ss.TEST_VID.muted}catch(t){return!1}},Ss.canControlPlaybackRate=function(){if(xi&&Ei&&Ai<58)return!1;try{var t=Ss.TEST_VID.playbackRate;return Ss.TEST_VID.playbackRate=t/2+.1,t!==Ss.TEST_VID.playbackRate}catch(t){return!1}},Ss.canOverrideAttributes=function(){try{var t=function(){};Object.defineProperty(a.a.createElement("video"),"src",{get:t,set:t}),Object.defineProperty(a.a.createElement("audio"),"src",{get:t,set:t}),Object.defineProperty(a.a.createElement("video"),"innerHTML",{get:t,set:t}),Object.defineProperty(a.a.createElement("audio"),"innerHTML",{get:t,set:t})}catch(t){return!1}return!0},Ss.supportsNativeTextTracks=function(){return Ni||Ri&&Ei},Ss.supportsNativeVideoTracks=function(){return!(!Ss.TEST_VID||!Ss.TEST_VID.videoTracks)},Ss.supportsNativeAudioTracks=function(){return!(!Ss.TEST_VID||!Ss.TEST_VID.audioTracks)},Ss.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function(t){var e=t[0],i=t[1];xs(Ss.prototype,e,(function(){return Ss[i]()}),!0)})),Ss.prototype.movingMediaElementInDOM=!Ri,Ss.prototype.featuresFullscreenResize=!0,Ss.prototype.featuresProgressEvents=!0,Ss.prototype.featuresTimeupdateEvents=!0,Ss.patchCanPlayType=function(){Si>=4&&!ki&&!Ei&&(gs=Ss.TEST_VID&&Ss.TEST_VID.constructor.prototype.canPlayType,Ss.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(t)?"maybe":gs.call(this,t)})},Ss.unpatchCanPlayType=function(){var t=Ss.TEST_VID.constructor.prototype.canPlayType;return gs&&(Ss.TEST_VID.constructor.prototype.canPlayType=gs),t},Ss.patchCanPlayType(),Ss.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},Ss.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),i=e.length;i--;)t.removeChild(e[i]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(t){Ss.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(t){Ss.prototype["set"+hi(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach((function(t){Ss.prototype[t]=function(){return this.el_[t]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(t){Ss.prototype["set"+hi(t)]=function(e){this.el_[t]=e}})),["pause","load","play"].forEach((function(t){Ss.prototype[t]=function(){return this.el_[t]()}})),Ln.withSourceHandlers(Ss),Ss.nativeSourceHandler={},Ss.nativeSourceHandler.canPlayType=function(t){try{return Ss.TEST_VID.canPlayType(t)}catch(t){return""}},Ss.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return Ss.nativeSourceHandler.canPlayType(t.type);if(t.src){var i=bn(t.src);return Ss.nativeSourceHandler.canPlayType("video/"+i)}return""},Ss.nativeSourceHandler.handleSource=function(t,e,i){e.setSrc(t.src)},Ss.nativeSourceHandler.dispose=function(){},Ss.registerSourceHandler(Ss.nativeSourceHandler),Ln.registerTech("Html5",Ss);var ws=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ks={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Cs=["tiny","xsmall","small","medium","large","xlarge","huge"],Es={};Cs.forEach((function(t){var e="x"===t.charAt(0)?"x-"+t.substring(1):t;Es[t]="vjs-layout-"+e}));var As={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Ps=function(t){function e(i,n,r){var s;if(i.id=i.id||n.id||"vjs_video_"+De(),(n=Ht(e.getTagSettings(i),n)).initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language)if("function"==typeof i.closest){var o=i.closest("[lang]");o&&o.getAttribute&&(n.language=o.getAttribute("lang"))}else for(var l=i;l&&1===l.nodeType;){if(oe(l).hasOwnProperty("lang")){n.language=l.getAttribute("lang");break}l=l.parentNode}if((s=t.call(this,null,n,r)||this).boundDocumentFullscreenChange_=Ye(u()(s),s.documentFullscreenChange_),s.boundFullWindowOnEscKey_=Ye(u()(s),s.fullWindowOnEscKey),s.isFullscreen_=!1,s.log=Ut(s.id_),s.fsApi_=Hi,s.isPosterFromTech_=!1,s.queuedCallbacks_=[],s.isReady_=!1,s.hasStarted_=!1,s.userActive_=!1,s.debugEnabled_=!1,!s.options_||!s.options_.techOrder||!s.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(s.tag=i,s.tagAttributes=i&&oe(i),s.language(s.options_.language),n.languages){var h={};Object.getOwnPropertyNames(n.languages).forEach((function(t){h[t.toLowerCase()]=n.languages[t]})),s.languages_=h}else s.languages_=e.prototype.options_.languages;s.resetCache_(),s.poster_=n.poster||"",s.controls_=!!n.controls,i.controls=!1,i.removeAttribute("controls"),s.changingSrc_=!1,s.playCallbacks_=[],s.playTerminatedQueue_=[],i.hasAttribute("autoplay")?s.autoplay(!0):s.autoplay(s.options_.autoplay),n.plugins&&Object.keys(n.plugins).forEach((function(t){if("function"!=typeof s[t])throw new Error('plugin "'+t+'" does not exist')})),s.scrubbing_=!1,s.el_=s.createEl(),si(u()(s),{eventBusKey:"el_"}),s.fsApi_.requestFullscreen&&(We(a.a,s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_),s.on(s.fsApi_.fullscreenchange,s.boundDocumentFullscreenChange_)),s.fluid_&&s.on(["playerreset","resize"],s.updateStyleEl_);var c=ui(s.options_);n.plugins&&Object.keys(n.plugins).forEach((function(t){s[t](n.plugins[t])})),n.debug&&s.debug(!0),s.options_.playerOptions=c,s.middleware_=[],s.initChildren(),s.isAudio("audio"===i.nodeName.toLowerCase()),s.controls()?s.addClass("vjs-controls-enabled"):s.addClass("vjs-controls-disabled"),s.el_.setAttribute("role","region"),s.isAudio()?s.el_.setAttribute("aria-label",s.localize("Audio Player")):s.el_.setAttribute("aria-label",s.localize("Video Player")),s.isAudio()&&s.addClass("vjs-audio"),s.flexNotSupported_()&&s.addClass("vjs-no-flex"),Mi&&s.addClass("vjs-touch-enabled"),Ri||s.addClass("vjs-workinghover"),e.players[s.id_]=u()(s);var d="7.11.2".split(".")[0];return s.addClass("vjs-v"+d),s.userActive(!0),s.reportUserActivity(),s.one("play",s.listenForUserActivity_),s.on("stageclick",s.handleStageClick_),s.on("keydown",s.handleKeyDown),s.on("languagechange",s.handleLanguagechange),s.breakpoints(s.options_.breakpoints),s.responsive(s.options_.responsive),s}d()(e,t);var i=e.prototype;return i.dispose=function(){var i=this;this.trigger("dispose"),this.off("dispose"),ze(a.a,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),ze(a.a,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),e.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),In[this.id()]=null,On.names.forEach((function(t){var e=On[t],n=i[e.getterName]();n&&n.off&&n.off()})),t.prototype.dispose.call(this)},i.createEl=function(){var e,i=this.tag,n=this.playerElIngest_=i.parentNode&&i.parentNode.hasAttribute&&i.parentNode.hasAttribute("data-vjs-player"),s="video-js"===this.tag.tagName.toLowerCase();n?e=this.el_=i.parentNode:s||(e=this.el_=t.prototype.createEl.call(this,"div"));var o=oe(i);if(s){for(e=this.el_=i,i=this.tag=a.a.createElement("video");e.children.length;)i.appendChild(e.firstChild);ie(e,"video-js")||ne(e,"video-js"),e.appendChild(i),n=this.playerElIngest_=e,Object.keys(e).forEach((function(t){try{i[t]=e[t]}catch(t){}}))}if(i.setAttribute("tabindex","-1"),o.tabindex="-1",(Pi||Ei&&Li)&&(i.setAttribute("role","application"),o.role="application"),i.removeAttribute("width"),i.removeAttribute("height"),"width"in o&&delete o.width,"height"in o&&delete o.height,Object.getOwnPropertyNames(o).forEach((function(t){s&&"class"===t||e.setAttribute(t,o[t]),s&&i.setAttribute(t,o[t])})),i.playerId=i.id,i.id+="_html5_api",i.className="vjs-tech",i.player=e.player=this,this.addClass("vjs-paused"),!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Le("vjs-styles-dimensions");var l=Se(".vjs-styles-defaults"),h=Se("head");h.insertBefore(this.styleEl_,l?l.nextSibling:h.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var u=i.getElementsByTagName("a"),c=0;c<u.length;c++){var d=u.item(c);ne(d,"vjs-hidden"),d.setAttribute("hidden","hidden")}return i.initNetworkState_=i.networkState,i.parentNode&&!n&&i.parentNode.insertBefore(e,i),ee(i,e),this.children_.unshift(i),this.el_.setAttribute("lang",this.language_),this.el_=e,e},i.crossOrigin=function(t){if(!t)return this.techGet_("crossOrigin");"anonymous"===t||"use-credentials"===t?this.techCall_("setCrossOrigin",t):jt.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+t+'"')},i.width=function(t){return this.dimension("width",t)},i.height=function(t){return this.dimension("height",t)},i.dimension=function(t,e){var i=t+"_";if(void 0===e)return this[i]||0;if(""===e||"auto"===e)return this[i]=void 0,void this.updateStyleEl_();var n=parseFloat(e);isNaN(n)?jt.error('Improper value "'+e+'" supplied for for '+t):(this[i]=n,this.updateStyleEl_())},i.fluid=function(t){var e,i,n=this;if(void 0===t)return!!this.fluid_;this.fluid_=!!t,Qe(this)&&this.off(["playerreset","resize"],this.updateStyleEl_),t?(this.addClass("vjs-fluid"),this.fill(!1),i=function(){n.on(["playerreset","resize"],n.updateStyleEl_)},Qe(e=this)?i():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(i))):this.removeClass("vjs-fluid"),this.updateStyleEl_()},i.fill=function(t){if(void 0===t)return!!this.fill_;this.fill_=!!t,t?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},i.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},i.updateStyleEl_=function(){if(!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE){var t,e,i,n=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),s=n[1]/n[0];t=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/s:this.videoWidth()||300,e=void 0!==this.height_?this.height_:t*s,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),Me(this.styleEl_,"\n ."+i+" {\n width: "+t+"px;\n height: "+e+"px;\n }\n\n ."+i+".vjs-fluid {\n padding-top: "+100*s+"%;\n }\n ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,o="number"==typeof this.height_?this.height_:this.options_.height,l=this.tech_&&this.tech_.el();l&&(a>=0&&(l.width=a),o>=0&&(l.height=o))}},i.loadTech_=function(t,e){var i=this;this.tech_&&this.unloadTech_();var n=hi(t),r=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==n&&this.tag&&(Ln.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;var s={source:e,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+r+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};On.names.forEach((function(t){var e=On[t];s[e.getterName]=i[e.privateName]})),Ht(s,this.options_[n]),Ht(s,this.options_[r]),Ht(s,this.options_[t.toLowerCase()]),this.tag&&(s.tag=this.tag),e&&e.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);var a=Ln.getTech(t);if(!a)throw new Error("No Tech named '"+n+"' exists! '"+n+"' should be registered using videojs.registerTech()'");this.tech_=new a(s),this.tech_.ready(Ye(this,this.handleTechReady_),!0),tn(this.textTracksJson_||[],this.tech_),ws.forEach((function(t){i.on(i.tech_,t,i["handleTech"+hi(t)+"_"])})),Object.keys(ks).forEach((function(t){i.on(i.tech_,t,(function(e){0===i.tech_.playbackRate()&&i.tech_.seeking()?i.queuedCallbacks_.push({callback:i["handleTech"+ks[t]+"_"].bind(i),event:e}):i["handleTech"+ks[t]+"_"](e)}))})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"fullscreenerror",this.handleTechFullscreenError_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===n&&this.tag||ee(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},i.unloadTech_=function(){var t=this;On.names.forEach((function(e){var i=On[e];t[i.privateName]=t[i.getterName]()})),this.textTracksJson_=Ji(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},i.tech=function(t){return void 0===t&&jt.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_},i.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},i.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},i.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},i.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},i.manualAutoplay_=function(t){var e=this;if(this.tech_&&"string"==typeof t){var i,n=function(){var t=e.muted();e.muted(!0);var i=function(){e.muted(t)};e.playTerminatedQueue_.push(i);var n=e.play();if($i(n))return n.catch(i)};if("any"===t&&!0!==this.muted()?$i(i=this.play())&&(i=i.catch(n)):i="muted"===t&&!0!==this.muted()?n():this.play(),$i(i))return i.then((function(){e.trigger({type:"autoplay-success",autoplay:t})})).catch((function(i){e.trigger({type:"autoplay-failure",autoplay:t})}))}},i.updateSourceCaches_=function(t){void 0===t&&(t="");var e=t,i="";"string"!=typeof e&&(e=t.src,i=t.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],e&&!i&&(i=function(t,e){if(!e)return"";if(t.cache_.source.src===e&&t.cache_.source.type)return t.cache_.source.type;var i=t.cache_.sources.filter((function(t){return t.src===e}));if(i.length)return i[0].type;for(var n=t.$$("source"),r=0;r<n.length;r++){var s=n[r];if(s.type&&s.src&&s.src===e)return s.type}return zn(e)}(this,e)),this.cache_.source=ui({},t,{src:e,type:i});for(var n=this.cache_.sources.filter((function(t){return t.src&&t.src===e})),r=[],s=this.$$("source"),a=[],o=0;o<s.length;o++){var l=oe(s[o]);r.push(l),l.src&&l.src===e&&a.push(l.src)}a.length&&!n.length?this.cache_.sources=r:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=e},i.handleTechSourceset_=function(t){var e=this;if(!this.changingSrc_){var i=function(t){return e.updateSourceCaches_(t)},n=this.currentSource().src,r=t.src;n&&!/^blob:/.test(n)&&/^blob:/.test(r)&&(!this.lastSource_||this.lastSource_.tech!==r&&this.lastSource_.player!==n)&&(i=function(){}),i(r),t.src||this.tech_.any(["sourceset","loadstart"],(function(t){if("sourceset"!==t.type){var i=e.techGet("currentSrc");e.lastSource_.tech=i,e.updateSourceCaches_(i)}}))}this.lastSource_={player:this.currentSource().src,tech:t.src},this.trigger({src:t.src,type:"sourceset"})},i.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},i.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},i.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((function(t){return t.callback(t.event)})),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},i.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting");var e=this.currentTime();this.on("timeupdate",(function i(){e!==t.currentTime()&&(t.removeClass("vjs-waiting"),t.off("timeupdate",i))}))},i.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},i.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},i.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},i.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},i.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},i.handleTechFirstPlay_=function(){this.options_.starttime&&(jt.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},i.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},i.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},i.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},i.handleTechClick_=function(t){Te(t)&&this.controls_&&(this.paused()?Qi(this.play()):this.pause())},i.handleTechDoubleClick_=function(t){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(function(e){return e.contains(t.target)}))||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,t):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},i.handleTechTap_=function(){this.userActive(!this.userActive())},i.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},i.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},i.handleTechTouchEnd_=function(t){t.preventDefault()},i.handleStageClick_=function(){this.reportUserActivity()},i.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},i.documentFullscreenChange_=function(t){var e=t.target.player;if(!e||e===this){var i=this.el(),n=a.a[this.fsApi_.fullscreenElement]===i;!n&&i.matches?n=i.matches(":"+this.fsApi_.fullscreen):!n&&i.msMatchesSelector&&(n=i.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}},i.handleTechFullscreenChange_=function(t,e){e&&(e.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(e.isFullscreen))},i.handleTechFullscreenError_=function(t,e){this.trigger("fullscreenerror",e)},i.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},i.handleTechEnterPictureInPicture_=function(t){this.isInPictureInPicture(!0)},i.handleTechLeavePictureInPicture_=function(t){this.isInPictureInPicture(!1)},i.handleTechError_=function(){var t=this.tech_.error();this.error(t)},i.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},i.getCache=function(){return this.cache_},i.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},i.techCall_=function(t,e){this.ready((function(){if(t in jn)return function(t,e,i,n){return e[i](t.reduce(Fn(i),n))}(this.middleware_,this.tech_,t,e);if(t in Un)return Nn(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(t){throw jt(t),t}}),!0)},i.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in Bn)return function(t,e,i){return t.reduceRight(Fn(i),e[i]())}(this.middleware_,this.tech_,t);if(t in Un)return Nn(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw jt("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw jt("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw jt(e),e}}},i.play=function(){var t=this,e=this.options_.Promise||r.a.Promise;return e?new e((function(e){t.play_(e)})):this.play_()},i.play_=function(t){var e=this;void 0===t&&(t=Qi),this.playCallbacks_.push(t);var i=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc()));if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i)return this.waitToPlay_=function(t){e.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(i||!Ni&&!Ri||this.load());var n=this.techGet_("play");null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)},i.runPlayTerminatedQueue_=function(){var t=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],t.forEach((function(t){t()}))},i.runPlayCallbacks_=function(t){var e=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],e.forEach((function(e){e(t)}))},i.pause=function(){this.techCall_("pause")},i.paused=function(){return!1!==this.techGet_("paused")},i.played=function(){return this.techGet_("played")||Fi(0,0)},i.scrubbing=function(t){if(void 0===t)return this.scrubbing_;this.scrubbing_=!!t,this.techCall_("setScrubbing",this.scrubbing_),t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},i.currentTime=function(t){return void 0!==t?(t<0&&(t=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",t),void(this.cache_.initTime=0)):(this.cache_.initTime=t,this.off("canplay",this.applyInitTime_),void this.one("canplay",this.applyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},i.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},i.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(t=parseFloat(t))<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(t)||this.trigger("durationchange"))},i.remainingTime=function(){return this.duration()-this.currentTime()},i.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},i.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=Fi(0,0)),t},i.bufferedPercent=function(){return Wi(this.buffered(),this.duration())},i.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),i=t.end(t.length-1);return i>e&&(i=e),i},i.volume=function(t){var e;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(e>0&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},i.muted=function(t){if(void 0===t)return this.techGet_("muted")||!1;this.techCall_("setMuted",t)},i.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},i.lastVolume_=function(t){if(void 0===t||0===t)return this.cache_.lastVolume;this.cache_.lastVolume=t},i.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},i.isFullscreen=function(t){if(void 0!==t){var e=this.isFullscreen_;return this.isFullscreen_=Boolean(t),this.isFullscreen_!==e&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_},i.requestFullscreen=function(t){var e=this.options_.Promise||r.a.Promise;if(e){var i=this;return new e((function(e,n){function r(){i.off("fullscreenerror",a),i.off("fullscreenchange",s)}function s(){r(),e()}function a(t,e){r(),n(e)}i.one("fullscreenchange",s),i.one("fullscreenerror",a);var o=i.requestFullscreenHelper_(t);if(o)return o.then(r,r),o}))}return this.requestFullscreenHelper_()},i.requestFullscreenHelper_=function(t){var e,i=this;if(this.fsApi_.prefixed||(e=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==t&&(e=t)),this.fsApi_.requestFullscreen){var n=this.el_[this.fsApi_.requestFullscreen](e);return n&&n.then((function(){return i.isFullscreen(!0)}),(function(){return i.isFullscreen(!1)})),n}this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},i.exitFullscreen=function(){var t=this.options_.Promise||r.a.Promise;if(t){var e=this;return new t((function(t,i){function n(){e.off("fullscreenerror",s),e.off("fullscreenchange",r)}function r(){n(),t()}function s(t,e){n(),i(e)}e.one("fullscreenchange",r),e.one("fullscreenerror",s);var a=e.exitFullscreenHelper_();if(a)return a.then(n,n),a}))}return this.exitFullscreenHelper_()},i.exitFullscreenHelper_=function(){var t=this;if(this.fsApi_.requestFullscreen){var e=a.a[this.fsApi_.exitFullscreen]();return e&&e.then((function(){return t.isFullscreen(!1)})),e}this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},i.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=a.a.documentElement.style.overflow,We(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow="hidden",ne(a.a.body,"vjs-full-window"),this.trigger("enterFullWindow")},i.fullWindowOnEscKey=function(t){m.a.isEventKey(t,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},i.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,ze(a.a,"keydown",this.boundFullWindowOnEscKey_),a.a.documentElement.style.overflow=this.docOrigOverflow,re(a.a.body,"vjs-full-window"),this.trigger("exitFullWindow")},i.disablePictureInPicture=function(t){if(void 0===t)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",t),this.options_.disablePictureInPicture=t,this.trigger("disablepictureinpicturechanged")},i.isInPictureInPicture=function(t){return void 0!==t?(this.isInPictureInPicture_=!!t,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},i.requestPictureInPicture=function(){if("pictureInPictureEnabled"in a.a&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},i.exitPictureInPicture=function(){if("pictureInPictureEnabled"in a.a)return a.a.exitPictureInPicture()},i.handleKeyDown=function(t){var e=this.options_.userActions;if(e&&e.hotkeys){(function(t){var e=t.tagName.toLowerCase();if(t.isContentEditable)return!0;if("input"===e)return-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type);return-1!==["textarea"].indexOf(e)})(this.el_.ownerDocument.activeElement)||("function"==typeof e.hotkeys?e.hotkeys.call(this,t):this.handleHotkeys(t))}},i.handleHotkeys=function(t){var e=this.options_.userActions?this.options_.userActions.hotkeys:{},i=e.fullscreenKey,n=void 0===i?function(t){return m.a.isEventKey(t,"f")}:i,r=e.muteKey,s=void 0===r?function(t){return m.a.isEventKey(t,"m")}:r,o=e.playPauseKey,l=void 0===o?function(t){return m.a.isEventKey(t,"k")||m.a.isEventKey(t,"Space")}:o;if(n.call(this,t)){t.preventDefault(),t.stopPropagation();var h=gi.getComponent("FullscreenToggle");!1!==a.a[this.fsApi_.fullscreenEnabled]&&h.prototype.handleClick.call(this,t)}else if(s.call(this,t)){t.preventDefault(),t.stopPropagation(),gi.getComponent("MuteToggle").prototype.handleClick.call(this,t)}else if(l.call(this,t)){t.preventDefault(),t.stopPropagation(),gi.getComponent("PlayToggle").prototype.handleClick.call(this,t)}},i.canPlayType=function(t){for(var e,i=0,n=this.options_.techOrder;i<n.length;i++){var r=n[i],s=Ln.getTech(r);if(s||(s=gi.getComponent(r)),s){if(s.isSupported()&&(e=s.canPlayType(t)))return e}else jt.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},i.selectSource=function(t){var e,i=this,n=this.options_.techOrder.map((function(t){return[t,Ln.getTech(t)]})).filter((function(t){var e=t[0],i=t[1];return i?i.isSupported():(jt.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),r=function(t,e,i){var n;return t.some((function(t){return e.some((function(e){if(n=i(t,e))return!0}))})),n},s=function(t,e){var n=t[0];if(t[1].canPlaySource(e,i.options_[n.toLowerCase()]))return{source:e,tech:n}};return(this.options_.sourceOrder?r(t,n,(e=s,function(t,i){return e(i,t)})):r(n,t,s))||!1},i.src=function(t){var e=this;if(void 0===t)return this.cache_.src||"";var i=function t(e){if(Array.isArray(e)){var i=[];e.forEach((function(e){e=t(e),Array.isArray(e)?i=i.concat(e):Vt(e)&&i.push(e)})),e=i}else e="string"==typeof e&&e.trim()?[Hn({src:e})]:Vt(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[Hn(e)]:[];return e}(t);i.length?(this.changingSrc_=!0,this.cache_.sources=i,this.updateSourceCaches_(i[0]),Rn(this,i[0],(function(t,n){var r,s;if(e.middleware_=n,e.cache_.sources=i,e.updateSourceCaches_(t),e.src_(t))return i.length>1?e.src(i.slice(1)):(e.changingSrc_=!1,e.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),void e.triggerReady());r=n,s=e.tech_,r.forEach((function(t){return t.setTech&&t.setTech(s)}))}))):this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0)},i.src_=function(t){var e,i,n=this,r=this.selectSource([t]);return!r||(e=r.tech,i=this.techName_,hi(e)!==hi(i)?(this.changingSrc_=!0,this.loadTech_(r.tech,r.source),this.tech_.ready((function(){n.changingSrc_=!1})),!1):(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),this.changingSrc_=!1}),!0),!1))},i.load=function(){this.techCall_("load")},i.reset=function(){var t=this,e=this.options_.Promise||r.a.Promise;this.paused()||!e?this.doReset_():Qi(this.play().then((function(){return t.doReset_()})))},i.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Qe(this)&&this.trigger("playerreset")},i.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},i.resetProgressBar_=function(){this.currentTime(0);var t=this.controlBar,e=t.durationDisplay,i=t.remainingTimeDisplay;e&&e.updateContent(),i&&i.updateContent()},i.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},i.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},i.currentSources=function(){var t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},i.currentSource=function(){return this.cache_.source||{}},i.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},i.currentType=function(){return this.currentSource()&&this.currentSource().type||""},i.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},i.autoplay=function(t){if(void 0===t)return this.options_.autoplay||!1;var e;"string"==typeof t&&/(any|play|muted)/.test(t)?(this.options_.autoplay=t,this.manualAutoplay_(t),e=!1):this.options_.autoplay=!!t,e=void 0===e?this.options_.autoplay:e,this.tech_&&this.techCall_("setAutoplay",e)},i.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},i.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},i.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),t!==this.poster_&&(this.poster_=t,this.techCall_("setPoster",t),this.isPosterFromTech_=!1,this.trigger("posterchange"))},i.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var t=this.tech_.poster()||"";t!==this.poster_&&(this.poster_=t,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},i.controls=function(t){if(void 0===t)return!!this.controls_;t=!!t,this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},i.usingNativeControls=function(t){if(void 0===t)return!!this.usingNativeControls_;t=!!t,this.usingNativeControls_!==t&&(this.usingNativeControls_=t,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},i.error=function(t){if(void 0===t)return this.error_||null;if(this.options_.suppressNotSupportedError&&t&&4===t.code){var e=function(){this.error(t)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],e),void this.one("loadstart",(function(){this.off(["click","touchstart"],e)}))}if(null===t)return this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Yi(t),this.addClass("vjs-error"),jt.error("(CODE:"+this.error_.code+" "+Yi.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},i.reportUserActivity=function(t){this.userActivity_=!0},i.userActive=function(t){if(void 0===t)return this.userActive_;if((t=!!t)!==this.userActive_){if(this.userActive_=t,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",(function(t){t.stopPropagation(),t.preventDefault()})),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},i.listenForUserActivity_=function(){var t,e,i,n=Ye(this,this.reportUserActivity),r=function(e){n(),this.clearInterval(t)};this.on("mousedown",(function(){n(),this.clearInterval(t),t=this.setInterval(n,250)})),this.on("mousemove",(function(t){t.screenX===e&&t.screenY===i||(e=t.screenX,i=t.screenY,n())})),this.on("mouseup",r),this.on("mouseleave",r);var s,a=this.getChild("controlBar");!a||Ri||xi||(a.on("mouseenter",(function(t){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0})),a.on("mouseleave",(function(t){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",n),this.on("keyup",n),this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(s);var t=this.options_.inactivityTimeout;t<=0||(s=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),t))}}),250)},i.playbackRate=function(t){if(void 0===t)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",t)},i.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},i.isAudio=function(t){if(void 0===t)return!!this.isAudio_;this.isAudio_=!!t},i.addTextTrack=function(t,e,i){if(this.tech_)return this.tech_.addTextTrack(t,e,i)},i.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},i.removeRemoteTextTrack=function(t){void 0===t&&(t={});var e=t.track;if(e||(e=t),this.tech_)return this.tech_.removeRemoteTextTrack(e)},i.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},i.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},i.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},i.language=function(t){if(void 0===t)return this.language_;this.language_!==String(t).toLowerCase()&&(this.language_=String(t).toLowerCase(),Qe(this)&&this.trigger("languagechange"))},i.languages=function(){return ui(e.prototype.options_.languages,this.languages_)},i.toJSON=function(){var t=ui(this.options_),e=t.tracks;t.tracks=[];for(var i=0;i<e.length;i++){var n=e[i];(n=ui(n)).player=void 0,t.tracks[i]=n}return t},i.createModal=function(t,e){var i=this;(e=e||{}).content=t||"";var n=new en(this,e);return this.addChild(n),n.on("dispose",(function(){i.removeChild(n)})),n.open(),n},i.updateCurrentBreakpoint_=function(){if(this.responsive())for(var t=this.currentBreakpoint(),e=this.currentWidth(),i=0;i<Cs.length;i++){var n=Cs[i];if(e<=this.breakpoints_[n]){if(t===n)return;t&&this.removeClass(Es[t]),this.addClass(Es[n]),this.breakpoint_=n;break}}},i.removeCurrentBreakpoint_=function(){var t=this.currentBreakpointClass();this.breakpoint_="",t&&this.removeClass(t)},i.breakpoints=function(t){return void 0===t||(this.breakpoint_="",this.breakpoints_=Ht({},As,t),this.updateCurrentBreakpoint_()),Ht(this.breakpoints_)},i.responsive=function(t){return void 0===t?this.responsive_:(t=Boolean(t))!==this.responsive_?(this.responsive_=t,t?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),t):void 0},i.currentBreakpoint=function(){return this.breakpoint_},i.currentBreakpointClass=function(){return Es[this.breakpoint_]||""},i.loadMedia=function(t,e){var i=this;if(t&&"object"==typeof t){this.reset(),this.cache_.media=ui(t);var n=this.cache_.media,r=n.artwork,s=n.poster,a=n.src,o=n.textTracks;!r&&s&&(this.cache_.media.artwork=[{src:s,type:zn(s)}]),a&&this.src(a),s&&this.poster(s),Array.isArray(o)&&o.forEach((function(t){return i.addRemoteTextTrack(t,!1)})),this.ready(e)}},i.getMedia=function(){if(!this.cache_.media){var t=this.poster(),e={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(function(t){return{kind:t.kind,label:t.label,language:t.language,src:t.src}}))};return t&&(e.poster=t,e.artwork=[{src:e.poster,type:zn(e.poster)}]),e}return ui(this.cache_.media)},e.getTagSettings=function(t){var e={sources:[],tracks:[]},i=oe(t),n=i["data-setup"];if(ie(t,"vjs-fill")&&(i.fill=!0),ie(t,"vjs-fluid")&&(i.fluid=!0),null!==n){var r=f()(n||"{}"),s=r[0],a=r[1];s&&jt.error(s),Ht(i,a)}if(Ht(e,i),t.hasChildNodes())for(var o=t.childNodes,l=0,h=o.length;l<h;l++){var u=o[l],c=u.nodeName.toLowerCase();"source"===c?e.sources.push(oe(u)):"track"===c&&e.tracks.push(oe(u))}return e},i.flexNotSupported_=function(){var t=a.a.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)},i.debug=function(t){if(void 0===t)return this.debugEnabled_;t?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},e}(gi);On.names.forEach((function(t){var e=On[t];Ps.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}})),Ps.prototype.crossorigin=Ps.prototype.crossOrigin,Ps.players={};var Os=r.a.navigator;Ps.prototype.options_={techOrder:Ln.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Os&&(Os.languages&&Os.languages[0]||Os.userLanguage||Os.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach((function(t){Ps.prototype[t]=function(){return this.techGet_(t)}})),ws.forEach((function(t){Ps.prototype["handleTech"+hi(t)+"_"]=function(){return this.trigger(t)}})),gi.registerComponent("Player",Ps);var Ls={},Ms=function(t){return Ls.hasOwnProperty(t)},Is=function(t){return Ms(t)?Ls[t]:void 0},Ds=function(t,e){t.activePlugins_=t.activePlugins_||{},t.activePlugins_[e]=!0},Rs=function(t,e,i){var n=(i?"before":"")+"pluginsetup";t.trigger(n,e),t.trigger(n+":"+e.name,e)},Ns=function(t,e){return e.prototype.name=t,function(){Rs(this,{name:t,plugin:e,instance:null},!0);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];var s=x()(e,[this].concat(n));return this[t]=function(){return s},Rs(this,s.getEventHash()),s}},Bs=function(){function t(e){if(this.constructor===t)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),si(this),delete this.trigger,oi(this,this.constructor.defaultState),Ds(e,this.name),this.dispose=Ye(this,this.dispose),e.on("dispose",this.dispose)}var e=t.prototype;return e.version=function(){return this.constructor.VERSION},e.getEventHash=function(t){return void 0===t&&(t={}),t.name=this.name,t.plugin=this.constructor,t.instance=this,t},e.trigger=function(t,e){return void 0===e&&(e={}),He(this.eventBusEl_,t,this.getEventHash(e))},e.handleStateChanged=function(t){},e.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e.activePlugins_[t]=!1,this.player=this.state=null,e[t]=Ns(t,Ls[t])},t.isBasic=function(e){var i="string"==typeof e?Is(e):e;return"function"==typeof i&&!t.prototype.isPrototypeOf(i.prototype)},t.registerPlugin=function(e,i){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+typeof e+".");if(Ms(e))jt.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(Ps.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof i)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+typeof i+".");return Ls[e]=i,"plugin"!==e&&(t.isBasic(i)?Ps.prototype[e]=function(t,e){var i=function(){Rs(this,{name:t,plugin:e,instance:null},!0);var i=e.apply(this,arguments);return Ds(this,t),Rs(this,{name:t,plugin:e,instance:i}),i};return Object.keys(e).forEach((function(t){i[t]=e[t]})),i}(e,i):Ps.prototype[e]=Ns(e,i)),i},t.deregisterPlugin=function(t){if("plugin"===t)throw new Error("Cannot de-register base plugin.");Ms(t)&&(delete Ls[t],delete Ps.prototype[t])},t.getPlugins=function(t){var e;return void 0===t&&(t=Object.keys(Ls)),t.forEach((function(t){var i=Is(t);i&&((e=e||{})[t]=i)})),e},t.getPluginVersion=function(t){var e=Is(t);return e&&e.VERSION||""},t}();Bs.getPlugin=Is,Bs.BASE_PLUGIN_NAME="plugin",Bs.registerPlugin("plugin",Bs),Ps.prototype.usingPlugin=function(t){return!!this.activePlugins_&&!0===this.activePlugins_[t]},Ps.prototype.hasPlugin=function(t){return!!Ms(t)};var js=function(t){return 0===t.indexOf("#")?t.slice(1):t};function Us(t,e,i){var n=Us.getPlayer(t);if(n)return e&&jt.warn('Player "'+t+'" is already initialised. Options will not be applied.'),i&&n.ready(i),n;var r="string"==typeof t?Se("#"+js(t)):t;if(!$t(r))throw new TypeError("The element or ID supplied is not valid. (videojs)");r.ownerDocument.defaultView&&r.ownerDocument.body.contains(r)||jt.warn("The element supplied is not included in the DOM"),e=e||{},Us.hooks("beforesetup").forEach((function(t){var i=t(r,ui(e));Vt(i)&&!Array.isArray(i)?e=ui(e,i):jt.error("please return an object in beforesetup hooks")}));var s=gi.getComponent("Player");return n=new s(r,e,i),Us.hooks("setup").forEach((function(t){return t(n)})),n}if(Us.hooks_={},Us.hooks=function(t,e){return Us.hooks_[t]=Us.hooks_[t]||[],e&&(Us.hooks_[t]=Us.hooks_[t].concat(e)),Us.hooks_[t]},Us.hook=function(t,e){Us.hooks(t,e)},Us.hookOnce=function(t,e){Us.hooks(t,[].concat(e).map((function(e){return function i(){return Us.removeHook(t,i),e.apply(void 0,arguments)}})))},Us.removeHook=function(t,e){var i=Us.hooks(t).indexOf(e);return!(i<=-1)&&(Us.hooks_[t]=Us.hooks_[t].slice(),Us.hooks_[t].splice(i,1),!0)},!0!==r.a.VIDEOJS_NO_DYNAMIC_STYLE&&Kt()){var Fs=Se(".vjs-styles-defaults");if(!Fs){Fs=Le("vjs-styles-defaults");var Ws=Se("head");Ws&&Ws.insertBefore(Fs,Ws.firstChild),Me(Fs,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}Ae(1,Us),Us.VERSION="7.11.2",Us.options=Ps.prototype.options_,Us.getPlayers=function(){return Ps.players},Us.getPlayer=function(t){var e,i=Ps.players;if("string"==typeof t){var n=js(t),r=i[n];if(r)return r;e=Se("#"+n)}else e=t;if($t(e)){var s=e,a=s.player,o=s.playerId;if(a||i[o])return a||i[o]}},Us.getAllPlayers=function(){return Object.keys(Ps.players).map((function(t){return Ps.players[t]})).filter(Boolean)},Us.players=Ps.players,Us.getComponent=gi.getComponent,Us.registerComponent=function(t,e){Ln.isTech(e)&&jt.warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),gi.registerComponent.call(gi,t,e)},Us.getTech=Ln.getTech,Us.registerTech=Ln.registerTech,Us.use=function(t,e){Mn[t]=Mn[t]||[],Mn[t].push(e)},Object.defineProperty(Us,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Us.middleware,"TERMINATOR",{value:Dn,writeable:!1,enumerable:!0}),Us.browser=Bi,Us.TOUCH_ENABLED=Mi,Us.extend=function(t,e){void 0===e&&(e={});var i=function(){t.apply(this,arguments)},n={};for(var r in"object"==typeof e?(e.constructor!==Object.prototype.constructor&&(i=e.constructor),n=e):"function"==typeof e&&(i=e),w()(i,t),t&&(i.super_=t),n)n.hasOwnProperty(r)&&(i.prototype[r]=n[r]);return i},Us.mergeOptions=ui,Us.bind=Ye,Us.registerPlugin=Bs.registerPlugin,Us.deregisterPlugin=Bs.deregisterPlugin,Us.plugin=function(t,e){return jt.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Bs.registerPlugin(t,e)},Us.getPlugins=Bs.getPlugins,Us.getPlugin=Bs.getPlugin,Us.getPluginVersion=Bs.getPluginVersion,Us.addLanguage=function(t,e){var i;return t=(""+t).toLowerCase(),Us.options.languages=ui(Us.options.languages,((i={})[t]=e,i)),Us.options.languages[t]},Us.log=jt,Us.createLogger=Ut,Us.createTimeRange=Us.createTimeRanges=Fi,Us.formatTime=rr,Us.setFormatTime=function(t){nr=t},Us.resetFormatTime=function(){nr=ir},Us.parseUrl=vn,Us.isCrossOrigin=_n,Us.EventTarget=$e,Us.on=We,Us.one=Ve,Us.off=ze,Us.trigger=He,Us.xhr=y.a,Us.TextTrack=wn,Us.AudioTrack=kn,Us.VideoTrack=Cn,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((function(t){Us[t]=function(){return jt.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),ke[t].apply(null,arguments)}})),Us.computedStyle=Xt,Us.dom=ke,Us.url=Tn,Us.defineLazyProperty=xs;
75
- /*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */
76
- var zs,Hs=C.a,Vs=function(t,e,i){return t&&i&&i.responseURL&&e!==i.responseURL?i.responseURL:e},Gs=Us.log,Xs=function(t,e){return t+"-"+e},qs=function(t){var e=t.manifestString,i=t.customTagParsers,n=void 0===i?[]:i,r=t.customTagMappers,s=void 0===r?[]:r,a=new D;return n.forEach((function(t){return a.addParser(t)})),s.forEach((function(t){return a.addTagMapper(t)})),a.push(e),a.end(),a.manifest},Ys=function(t,e){["AUDIO","SUBTITLES"].forEach((function(i){for(var n in t.mediaGroups[i])for(var r in t.mediaGroups[i][n]){var s=t.mediaGroups[i][n][r];e(s,i,n,r)}}))},Ks=function(t){var e=t.playlist,i=t.uri,n=t.id;e.id=n,i&&(e.uri=i),e.attributes=e.attributes||{}},$s=function(t,e){t.uri=e;for(var i=0;i<t.playlists.length;i++)if(!t.playlists[i].uri){var n="placeholder-uri-"+i;t.playlists[i].uri=n}Ys(t,(function(e,i,n,r){if(e.playlists&&e.playlists.length&&!e.playlists[0].uri){var s="placeholder-uri-"+i+"-"+n+"-"+r,a=Xs(0,s);e.playlists[0].uri=s,e.playlists[0].id=a,t.playlists[a]=e.playlists[0],t.playlists[s]=e.playlists[0]}})),function(t){for(var e=t.playlists.length;e--;){var i=t.playlists[e];Ks({playlist:i,id:Xs(e,i.uri)}),i.resolvedUri=Hs(t.uri,i.uri),t.playlists[i.id]=i,t.playlists[i.uri]=i,i.attributes.BANDWIDTH||Gs.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}}(t),function(t){Ys(t,(function(e){e.uri&&(e.resolvedUri=Hs(t.uri,e.uri))}))}(t)},Qs=Us.mergeOptions,Zs=Us.EventTarget,Js=function(t,e){t.resolvedUri||(t.resolvedUri=Hs(e,t.uri)),t.key&&!t.key.resolvedUri&&(t.key.resolvedUri=Hs(e,t.key.uri)),t.map&&!t.map.resolvedUri&&(t.map.resolvedUri=Hs(e,t.map.uri))},ta=function(t,e){var i=Qs(t,{}),n=i.playlists[e.id];if(!n)return null;if(n.segments&&e.segments&&n.segments.length===e.segments.length&&n.endList===e.endList&&n.mediaSequence===e.mediaSequence)return null;var r=Qs(n,e);n.segments&&(r.segments=function(t,e,i){var n=e.slice();i=i||0;for(var r=Math.min(t.length,e.length+i),s=i;s<r;s++)n[s-i]=Qs(t[s],n[s-i]);return n}(n.segments,e.segments,e.mediaSequence-n.mediaSequence)),r.segments.forEach((function(t){Js(t,r.resolvedUri)}));for(var s=0;s<i.playlists.length;s++)i.playlists[s].id===e.id&&(i.playlists[s]=r);return i.playlists[e.id]=r,i.playlists[e.uri]=r,i},ea=function(t,e){var i=t.segments[t.segments.length-1];return e&&i&&i.duration?1e3*i.duration:500*(t.targetDuration||10)},ia=function(t){function e(e,i,n){var r;if(void 0===n&&(n={}),r=t.call(this)||this,!e)throw new Error("A non-empty playlist URL or object is required");var s=n,a=s.withCredentials,o=void 0!==a&&a,l=s.handleManifestRedirects,h=void 0!==l&&l;r.src=e,r.vhs_=i,r.withCredentials=o,r.handleManifestRedirects=h;var u=i.options_;return r.customTagParsers=u&&u.customTagParsers||[],r.customTagMappers=u&&u.customTagMappers||[],r.state="HAVE_NOTHING",r.on("mediaupdatetimeout",(function(){"HAVE_METADATA"===r.state&&(r.state="HAVE_CURRENT_METADATA",r.request=r.vhs_.xhr({uri:Hs(r.master.uri,r.media().uri),withCredentials:r.withCredentials},(function(t,e){if(r.request)return t?r.playlistRequestError(r.request,r.media(),"HAVE_METADATA"):void r.haveMetadata({playlistString:r.request.responseText,url:r.media().uri,id:r.media().id})})))})),r}d()(e,t);var i=e.prototype;return i.playlistRequestError=function(t,e,i){var n=e.uri,r=e.id;this.request=null,i&&(this.state=i),this.error={playlist:this.master.playlists[r],status:t.status,message:"HLS playlist request error at URL: "+n+".",responseText:t.responseText,code:t.status>=500?4:2},this.trigger("error")},i.haveMetadata=function(t){var e=this,i=t.playlistString,n=t.playlistObject,s=t.url,a=t.id;this.request=null,this.state="HAVE_METADATA";var o=n||qs({manifestString:i,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers});o.lastRequest=Date.now(),Ks({playlist:o,uri:s,id:a});var l=ta(this.master,o);this.targetDuration=o.targetDuration,l?(this.master=l,this.media_=this.master.playlists[a]):this.trigger("playlistunchanged"),this.media().endList||(r.a.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=r.a.setTimeout((function(){e.trigger("mediaupdatetimeout")}),ea(this.media(),!!l))),this.trigger("loadedplaylist")},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),r.a.clearTimeout(this.finalRenditionTimeout),this.off()},i.stopRequest=function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}},i.media=function(t,e){var i=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof t){if(!this.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.master.playlists[t]}if(r.a.clearTimeout(this.finalRenditionTimeout),e){var n=t.targetDuration/2*1e3||5e3;this.finalRenditionTimeout=r.a.setTimeout(this.media.bind(this,t,!1),n)}else{var s=this.state,a=!this.media_||t.id!==this.media_.id;if(this.master.playlists[t.id].endList||t.endList&&t.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=t,void(a&&(this.trigger("mediachanging"),"HAVE_MASTER"===s?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(a){if(this.state="SWITCHING_MEDIA",this.request){if(t.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.vhs_.xhr({uri:t.resolvedUri,withCredentials:this.withCredentials},(function(e,n){if(i.request){if(t.lastRequest=Date.now(),t.resolvedUri=Vs(i.handleManifestRedirects,t.resolvedUri,n),e)return i.playlistRequestError(i.request,t,s);i.haveMetadata({playlistString:n.responseText,url:t.uri,id:t.id}),"HAVE_MASTER"===s?i.trigger("loadedmetadata"):i.trigger("mediachange")}}))}}},i.pause=function(){this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},i.load=function(t){var e=this;r.a.clearTimeout(this.mediaUpdateTimeout);var i=this.media();if(t){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=r.a.setTimeout((function(){return e.load()}),n)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},i.start=function(){var t=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=r.a.location.href),this.src.resolvedUri=this.src.uri,void setTimeout((function(){t.setupInitialPlaylist(t.src)}),0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},(function(e,i){if(t.request){if(t.request=null,e)return t.error={status:i.status,message:"HLS playlist request error at URL: "+t.src+".",responseText:i.responseText,code:2},"HAVE_NOTHING"===t.state&&(t.started=!1),t.trigger("error");t.src=Vs(t.handleManifestRedirects,t.src,i);var n=qs({manifestString:i.responseText,customTagParsers:t.customTagParsers,customTagMappers:t.customTagMappers});t.setupInitialPlaylist(n)}}))},i.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},i.setupInitialPlaylist=function(t){if(this.state="HAVE_MASTER",t.playlists)return this.master=t,$s(this.master,this.srcUri()),t.playlists.forEach((function(t){t.segments&&t.segments.forEach((function(e){Js(e,t.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var e=this.srcUri()||r.a.location.href;this.master=function(t,e){var i=Xs(0,e),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:r.a.location.href,resolvedUri:r.a.location.href,playlists:[{uri:e,id:i,resolvedUri:e,attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[e]=n.playlists[0],n}(0,e),this.haveMetadata({playlistObject:t,url:e,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},e}(Zs),na=function(t,e){var i,n=[];if(t&&t.length)for(i=0;i<t.length;i++)e(t.start(i),t.end(i))&&n.push([t.start(i),t.end(i)]);return Us.createTimeRanges(n)},ra=function(t,e){return na(t,(function(t,i){return t-.1<=e&&i+.1>=e}))},sa=function(t,e){return na(t,(function(t){return t-1/30>=e}))},aa=function(t){var e=[];if(!t||!t.length)return"";for(var i=0;i<t.length;i++)e.push(t.start(i)+" => "+t.end(i));return e.join(", ")},oa=function(t){for(var e=[],i=0;i<t.length;i++)e.push({start:t.start(i),end:t.end(i)});return e},la=Us.createTimeRange,ha=function(t,e,i){if(void 0===e&&(e=t.mediaSequence+t.segments.length),e<t.mediaSequence)return 0;var n=function(t,e){var i=0,n=e-t.mediaSequence,r=t.segments[n];if(r){if(void 0!==r.start)return{result:r.start,precise:!0};if(void 0!==r.end)return{result:r.end-r.duration,precise:!0}}for(;n--;){if(void 0!==(r=t.segments[n]).end)return{result:i+r.end,precise:!0};if(i+=r.duration,void 0!==r.start)return{result:i+r.start,precise:!0}}return{result:i,precise:!1}}(t,e);if(n.precise)return n.result;var r=function(t,e){for(var i,n=0,r=e-t.mediaSequence;r<t.segments.length;r++){if(void 0!==(i=t.segments[r]).start)return{result:i.start-n,precise:!0};if(n+=i.duration,void 0!==i.end)return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}}(t,e);return r.precise?r.result:n.result+i},ua=function(t,e,i){if(!t)return 0;if("number"!=typeof i&&(i=0),void 0===e){if(t.totalDuration)return t.totalDuration;if(!t.endList)return r.a.Infinity}return ha(t,e,i)},ca=function(t,e,i){var n=0;if(e>i){var r=[i,e];e=r[0],i=r[1]}if(e<0){for(var s=e;s<Math.min(0,i);s++)n+=t.targetDuration;e=0}for(var a=e;a<i;a++)n+=t.segments[a].duration;return n},da=function(t,e){if(!t.segments.length)return 0;var i=t.segments.length,n=t.segments[i-1].duration||t.targetDuration,r="number"==typeof e?e:n+2*t.targetDuration;if(0===r)return i;for(var s=0;i--&&!((s+=t.segments[i].duration)>=r););return Math.max(0,i)},pa=function(t,e,i,n){if(!t||!t.segments)return null;if(t.endList)return ua(t);if(null===e)return null;e=e||0;var r=i?da(t,n):t.segments.length;return ha(t,t.mediaSequence+r,e)},fa=function(t){return t.excludeUntil&&t.excludeUntil>Date.now()},ga=function(t){return t.excludeUntil&&t.excludeUntil===1/0},ma=function(t){var e=fa(t);return!t.disabled&&!e},va=function(t,e){return e.attributes&&e.attributes[t]},ya=function(t,e){if(1===t.playlists.length)return!0;var i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===t.playlists.filter((function(t){return!!ma(t)&&(t.attributes.BANDWIDTH||0)<i})).length},ba={duration:ua,seekable:function(t,e,i){var n=e||0,r=pa(t,e,!0,i);return null===r?la():la(n,r)},safeLiveIndex:da,getMediaInfoForTime:function(t,e,i,n){var r,s=t.segments.length,a=e-n;if(a<0){if(i>0)for(r=i-1;r>=0;r--)if((a+=t.segments[r].duration+1/30)>0)return{mediaIndex:r,startTime:n-ca(t,i,r)};return{mediaIndex:0,startTime:e}}if(i<0){for(r=i;r<0;r++)if((a-=t.targetDuration)<0)return{mediaIndex:0,startTime:e};i=0}for(r=i;r<s;r++)if((a-=t.segments[r].duration+1/30)<0)return{mediaIndex:r,startTime:n+ca(t,i,r)};return{mediaIndex:s-1,startTime:e}},isEnabled:ma,isDisabled:function(t){return t.disabled},isBlacklisted:fa,isIncompatible:ga,playlistEnd:pa,isAes:function(t){for(var e=0;e<t.segments.length;e++)if(t.segments[e].key)return!0;return!1},hasAttribute:va,estimateSegmentRequestTime:function(t,e,i,n){return void 0===n&&(n=0),va("BANDWIDTH",i)?(t*i.attributes.BANDWIDTH-8*n)/e:NaN},isLowestEnabledRendition:ya},_a=Us.xhr,Ta=Us.mergeOptions,xa=function(t,e,i,n){var r="arraybuffer"===t.responseType?t.response:t.responseText;!e&&r&&(t.responseTime=Date.now(),t.roundTripTime=t.responseTime-t.requestTime,t.bytesReceived=r.byteLength||r.length,t.bandwidth||(t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3))),i.headers&&(t.responseHeaders=i.headers),e&&"ETIMEDOUT"===e.code&&(t.timedout=!0),e||t.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(e=new Error("XHR Failed with a response of: "+(t&&(r||t.responseText)))),n(e,t)},Sa=function(){return function t(e,i){e=Ta({timeout:45e3},e);var n=t.beforeRequest||Us.Vhs.xhr.beforeRequest;if(n&&"function"==typeof n){var r=n(e);r&&(e=r)}var s=_a(e,(function(t,e){return xa(s,t,e,i)})),a=s.abort;return s.abort=function(){return s.aborted=!0,a.apply(s,arguments)},s.uri=e.uri,s.requestTime=Date.now(),s}},wa=function(t){var e,i,n={};return t.byterange&&(n.Range=(e=t.byterange,i=e.offset+e.length-1,"bytes="+e.offset+"-"+i)),n},ka=function(t,e){return t.start(e)+"-"+t.end(e)},Ca=function(t,e){var i=t.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},Ea=function(t){return t>=32&&t<126?String.fromCharCode(t):"."},Aa=function(t){var e={};return Object.keys(t).forEach((function(i){var n=t[i];ArrayBuffer.isView(n)?e[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:e[i]=n})),e},Pa=function(t){var e=t.byterange||{length:1/0,offset:0};return[e.length,e.offset,t.resolvedUri].join(",")},Oa=function(t){return t.resolvedUri},La=function(t){for(var e=Array.prototype.slice.call(t),i="",n=0;n<e.length/16;n++)i+=e.slice(16*n,16*n+16).map(Ca).join("")+" "+e.slice(16*n,16*n+16).map(Ea).join("")+"\n";return i},Ma=Object.freeze({__proto__:null,createTransferableMessage:Aa,initSegmentId:Pa,segmentKeyId:Oa,hexDump:La,tagDump:function(t){var e=t.bytes;return La(e)},textRanges:function(t){var e,i="";for(e=0;e<t.length;e++)i+=ka(t,e)+" ";return i}}),Ia=function(t){var e=t.playlist,i=t.time,n=void 0===i?void 0:i,r=t.callback;if(!r)throw new Error("getProgramTime: callback must be provided");if(!e||void 0===n)return r({message:"getProgramTime: playlist and time must be provided"});var s=function(t,e){if(!e||!e.segments||0===e.segments.length)return null;for(var i,n=0,r=0;r<e.segments.length&&!(t<=(n=(i=e.segments[r]).videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:n+i.duration));r++);var s=e.segments[e.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<t)return null;if(t>n){if(t>n+.25*s.duration)return null;i=s}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}}(n,e);if(!s)return r({message:"valid programTime was not found"});if("estimate"===s.type)return r({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:s.estimatedStart});var a={mediaSeconds:n},o=function(t,e){if(!e.dateTimeObject)return null;var i=e.videoTimingInfo.transmuxerPrependedSeconds,n=t-(e.videoTimingInfo.transmuxedPresentationStart+i);return new Date(e.dateTimeObject.getTime()+1e3*n)}(n,s.segment);return o&&(a.programDateTime=o.toISOString()),r(null,a)},Da=function t(e){var i=e.programTime,n=e.playlist,r=e.retryCount,s=void 0===r?2:r,a=e.seekTo,o=e.pauseAfterSeek,l=void 0===o||o,h=e.tech,u=e.callback;if(!u)throw new Error("seekToProgramTime: callback must be provided");if(void 0===i||!n||!a)return u({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!n.endList&&!h.hasStarted_)return u({message:"player must be playing a live stream to start buffering"});if(!function(t){if(!t.segments||0===t.segments.length)return!1;for(var e=0;e<t.segments.length;e++){if(!t.segments[e].dateTimeObject)return!1}return!0}(n))return u({message:"programDateTime tags must be provided in the manifest "+n.resolvedUri});var c=function(t,e){var i;try{i=new Date(t)}catch(t){return null}if(!e||!e.segments||0===e.segments.length)return null;var n=e.segments[0];if(i<n.dateTimeObject)return null;for(var r=0;r<e.segments.length-1;r++){if(n=e.segments[r],i<e.segments[r+1].dateTimeObject)break}var s,a=e.segments[e.segments.length-1],o=a.dateTimeObject,l=a.videoTimingInfo?(s=a.videoTimingInfo).transmuxedPresentationEnd-s.transmuxedPresentationStart-s.transmuxerPrependedSeconds:a.duration+.25*a.duration;return i>new Date(o.getTime()+1e3*l)?null:(i>o&&(n=a),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:ba.duration(e,e.mediaSequence+e.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})}(i,n);if(!c)return u({message:i+" was not found in the stream"});var d=c.segment,p=function(t,e){var i,n;try{i=new Date(t),n=new Date(e)}catch(t){}var r=i.getTime();return(n.getTime()-r)/1e3}(d.dateTimeObject,i);if("estimate"===c.type)return 0===s?u({message:i+" is not buffered yet. Try again"}):(a(c.estimatedStart+p),void h.one("seeked",(function(){t({programTime:i,playlist:n,retryCount:s-1,seekTo:a,pauseAfterSeek:l,tech:h,callback:u})})));var f=d.start+p;h.one("seeked",(function(){return u(null,h.currentTime())})),l&&h.pause(),a(f)},Ra=function(t,e){if(4===t.readyState)return e()},Na=Us.EventTarget,Ba=Us.mergeOptions,ja=function(t){var e=t.byterange.offset+t.byterange.length-1;return t.uri+"-"+t.byterange.offset+"-"+e},Ua=function(t,e){var i,n,r={};for(var s in t){var a=t[s].sidx;if(a){var o=ja(a);if(!e[o])break;var l=e[o].sidxInfo;i=l,n=a,(Boolean(!i.map&&!n.map)||Boolean(i.map&&n.map&&i.map.byterange.offset===n.map.byterange.offset&&i.map.byterange.length===n.map.byterange.length))&&i.uri===n.uri&&i.byterange.offset===n.byterange.offset&&i.byterange.length===n.byterange.length&&(r[o]=e[o])}}return r},Fa=function(t){function e(e,i,n,r){var s;void 0===n&&(n={}),(s=t.call(this)||this).masterPlaylistLoader_=r||u()(s),r||(s.isMaster_=!0);var a=n,o=a.withCredentials,l=void 0!==o&&o,h=a.handleManifestRedirects,c=void 0!==h&&h;if(s.vhs_=i,s.withCredentials=l,s.handleManifestRedirects=c,!e)throw new Error("A non-empty playlist URL or object is required");return s.on("minimumUpdatePeriod",(function(){s.refreshXml_()})),s.on("mediaupdatetimeout",(function(){s.refreshMedia_(s.media().id)})),s.state="HAVE_NOTHING",s.loadedPlaylists_={},s.isMaster_?(s.masterPlaylistLoader_.srcUrl=e,s.masterPlaylistLoader_.sidxMapping_={}):s.childPlaylist_=e,s}d()(e,t);var i=e.prototype;return i.requestErrored_=function(t,e,i){return!this.request||(this.request=null,t?(this.error="object"!=typeof t||t instanceof Error?{status:e.status,message:"DASH request error at URL: "+e.uri,response:e.response,code:2}:t,i&&(this.state=i),this.trigger("error"),!0):void 0)},i.addSidxSegments_=function(t,e,i){var n=this,s=t.sidx&&ja(t.sidx);if(t.sidx&&s&&!this.masterPlaylistLoader_.sidxMapping_[s]){var a=Vs(this.handleManifestRedirects,t.sidx.resolvedUri),o=this.masterPlaylistLoader_.sidxMapping_;o[s]={sidxInfo:t.sidx};var l=function(r,a){if(!n.requestErrored_(r,a,e)){var l=At()(Object(Ot.toUint8)(a.response).subarray(8));return o[s].sidx=l,Ct(t,l,t.sidx.resolvedUri),i(!0)}};this.request=function(t,e,i){var n,r=[],s=!1,a=function(t,e,n,r){return e.abort(),s=!0,i(t,e,n,r)},o=function(t,e){if(!s){if(t)return a(t,e,"",r);var i=e.responseText.substring(r&&r.byteLength||0,e.responseText.length);if(r=Object(Ot.concatTypedArrays)(r,Object(Ot.stringToBytes)(i,!0)),n=n||Object(Pt.getId3Offset)(r),r.length<10||n&&r.length<n+2)return Ra(e,(function(){return a(t,e,"",r)}));var o=Object(Pt.detectContainerForBytes)(r);return"ts"===o&&r.length<188||!o&&r.length<376?Ra(e,(function(){return a(t,e,"",r)})):a(null,e,o,r)}},l=e({uri:t,beforeSend:function(t){t.overrideMimeType("text/plain; charset=x-user-defined"),t.addEventListener("progress",(function(e){e.total,e.loaded;return xa(t,null,{statusCode:t.status},o)}))}},(function(t,e){return xa(l,t,e,o)}));return l}(a,this.vhs_.xhr,(function(e,i,r,s){if(e)return l(e,i);if(!r||"mp4"!==r)return l({status:i.status,message:"Unsupported "+(r||"unknown")+" container type for sidx segment at URL: "+a,response:"",playlist:t,internal:!0,blacklistDuration:1/0,code:2},i);var o=t.sidx.byterange,h=o.offset,u=o.length;if(s.length>=u+h)return l(e,{response:s.subarray(h,h+u),status:i.status,uri:i.uri});n.request=n.vhs_.xhr({uri:a,responseType:"arraybuffer",headers:wa({byterange:t.sidx.byterange})},l)}))}else this.mediaRequest_=r.a.setTimeout((function(){return i(!1)}),0)},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},r.a.clearTimeout(this.minimumUpdatePeriodTimeout_),r.a.clearTimeout(this.mediaRequest_),r.a.clearTimeout(this.mediaUpdateTimeout),this.off()},i.hasPendingRequest=function(){return this.request||this.mediaRequest_},i.stopRequest=function(){if(this.request){var t=this.request;this.request=null,t.onreadystatechange=null,t.abort()}},i.media=function(t){var e=this;if(!t)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);var i=this.state;if("string"==typeof t){if(!this.masterPlaylistLoader_.master.playlists[t])throw new Error("Unknown playlist URI: "+t);t=this.masterPlaylistLoader_.master.playlists[t]}var n=!this.media_||t.id!==this.media_.id;if(n&&this.loadedPlaylists_[t.id]&&this.loadedPlaylists_[t.id].endList)return this.state="HAVE_METADATA",this.media_=t,void(n&&(this.trigger("mediachanging"),this.trigger("mediachange")));n&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(t,i,(function(n){e.haveMetadata({startingState:i,playlist:t})})))},i.haveMetadata=function(t){var e=t.startingState,i=t.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,this.mediaRequest_=null,this.refreshMedia_(i.id),"HAVE_MASTER"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")},i.pause=function(){this.stopRequest(),r.a.clearTimeout(this.mediaUpdateTimeout),r.a.clearTimeout(this.minimumUpdatePeriodTimeout_),"HAVE_NOTHING"===this.state&&(this.started=!1)},i.load=function(t){var e=this;r.a.clearTimeout(this.mediaUpdateTimeout),r.a.clearTimeout(this.minimumUpdatePeriodTimeout_);var i=this.media();if(t){var n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=r.a.setTimeout((function(){return e.load()}),n)}else this.started?i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},i.start=function(){var t=this;this.started=!0,this.isMaster_?this.requestMaster_((function(e,i){t.haveMaster_(),t.hasPendingRequest()||t.media_||t.media(t.masterPlaylistLoader_.master.playlists[0])})):this.mediaRequest_=r.a.setTimeout((function(){return t.haveMaster_()}),0)},i.requestMaster_=function(t){var e=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},(function(i,n){if(!e.requestErrored_(i,n)){var r=n.responseText!==e.masterPlaylistLoader_.masterXml_;return e.masterPlaylistLoader_.masterXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?e.masterLoaded_=Date.parse(n.responseHeaders.date):e.masterLoaded_=Date.now(),e.masterPlaylistLoader_.srcUrl=Vs(e.handleManifestRedirects,e.masterPlaylistLoader_.srcUrl,n),r?(e.handleMaster_(),void e.syncClientServerClock_((function(){return t(n,r)}))):t(n,r)}"HAVE_NOTHING"===e.state&&(e.started=!1)}))},i.syncClientServerClock_=function(t){var e=this,i=kt(this.masterPlaylistLoader_.masterXml_);return null===i?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),t()):"DIRECT"===i.method?(this.masterPlaylistLoader_.clientOffset_=i.value-Date.now(),t()):void(this.request=this.vhs_.xhr({uri:Hs(this.masterPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials},(function(n,r){if(e.request){if(n)return e.masterPlaylistLoader_.clientOffset_=e.masterLoaded_-Date.now(),t();var s;s="HEAD"===i.method?r.responseHeaders&&r.responseHeaders.date?Date.parse(r.responseHeaders.date):e.masterLoaded_:Date.parse(r.responseText),e.masterPlaylistLoader_.clientOffset_=s-Date.now(),t()}})))},i.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},i.handleMaster_=function(){this.mediaRequest_=null;var t,e,i,n,r,s,a=(t={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},e=t.masterXml,i=t.srcUrl,n=t.clientOffset,r=t.sidxMapping,s=wt(e,{manifestUri:i,clientOffset:n,sidxMapping:r}),$s(s,i),s),o=this.masterPlaylistLoader_.master;o&&(a=function(t,e,i){for(var n=!0,r=Ba(t,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod}),s=0;s<e.playlists.length;s++){var a=e.playlists[s];if(a.sidx){var o=ja(a.sidx);i&&i[o]&&Ct(a,i[o].sidx,a.sidx.resolvedUri)}var l=ta(r,a);l&&(r=l,n=!1)}return Ys(e,(function(t,e,i,s){if(t.playlists&&t.playlists.length){var a=t.playlists[0].id,o=ta(r,t.playlists[0]);o&&((r=o).mediaGroups[e][i][s].playlists[0]=r.playlists[a],n=!1)}})),e.minimumUpdatePeriod!==t.minimumUpdatePeriod&&(n=!1),n?null:r}(o,a,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=a||o;var l=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return l&&l!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=l),(!o||a&&o.minimumUpdatePeriod!==a.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(a)},i.updateMinimumUpdatePeriodTimeout_=function(){var t=this;r.a.clearTimeout(this.minimumUpdatePeriodTimeout_);var e=function e(i){t.minimumUpdatePeriodTimeout_=r.a.setTimeout((function(){t.trigger("minimumUpdatePeriod"),e(i)}),i)},i=this.masterPlaylistLoader_.master&&this.masterPlaylistLoader_.master.minimumUpdatePeriod;i>0?e(i):0===i&&(this.media()?e(1e3*this.media().targetDuration):this.one("loadedplaylist",(function(){e(1e3*t.media().targetDuration)})))},i.refreshXml_=function(){var t=this;this.requestMaster_((function(e,i){var n,r,s;i&&(t.media_&&(t.media_=t.masterPlaylistLoader_.master.playlists[t.media_.id]),t.masterPlaylistLoader_.sidxMapping_=(n=t.masterPlaylistLoader_.master,r=t.masterPlaylistLoader_.sidxMapping_,s=Ua(n.playlists,r),Ys(n,(function(t,e,i,n){if(t.playlists&&t.playlists.length){var a=t.playlists;s=Ba(s,Ua(a,r))}})),s),t.addSidxSegments_(t.media(),t.state,(function(e){t.refreshMedia_(t.media().id)})))}))},i.refreshMedia_=function(t){var e=this;if(!t)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var i=this.masterPlaylistLoader_.master.playlists,n=!this.media_||this.media_!==i[t];n?this.media_=i[t]:this.trigger("playlistunchanged"),this.media().endList||(this.mediaUpdateTimeout=r.a.setTimeout((function(){e.trigger("mediaupdatetimeout")}),ea(this.media(),Boolean(n)))),this.trigger("loadedplaylist")},e}(Na),Wa={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},za=function(t){for(var e=new Uint8Array(new ArrayBuffer(t.length)),i=0;i<t.length;i++)e[i]=t.charCodeAt(i);return e.buffer},Ha=[],Va=function(t){var e=t.transmuxer,i=t.bytes,n=t.audioAppendStart,r=t.gopsToAlignWith,s=t.isPartial,a=t.remux,o=t.onData,l=t.onTrackInfo,h=t.onAudioTimingInfo,u=t.onVideoTimingInfo,c=t.onVideoSegmentTimingInfo,d=t.onAudioSegmentTimingInfo,p=t.onId3,f=t.onCaptions,g=t.onDone,m={isPartial:s,buffer:[]};if(e.onmessage=function(t){zs&&("data"===t.data.action&&function(t,e,i){var n=t.data.segment,r=n.type,s=n.initSegment,a=n.captions,o=n.captionStreams,l=n.metadata,h=n.videoFrameDtsTime,u=n.videoFramePtsTime;e.buffer.push({captions:a,captionStreams:o,metadata:l});var c=t.data.segment.boxes||{data:t.data.segment.data},d={type:r,data:new Uint8Array(c.data,c.data.byteOffset,c.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};void 0!==h&&(d.videoFrameDtsTime=h),void 0!==u&&(d.videoFramePtsTime=u),i(d)}(t,m,o),"trackinfo"===t.data.action&&l(t.data.trackInfo),"gopInfo"===t.data.action&&function(t,e){e.gopInfo=t.data.gopInfo}(t,m),"audioTimingInfo"===t.data.action&&h(t.data.audioTimingInfo),"videoTimingInfo"===t.data.action&&u(t.data.videoTimingInfo),"videoSegmentTimingInfo"===t.data.action&&c(t.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===t.data.action&&d(t.data.audioSegmentTimingInfo),"id3Frame"===t.data.action&&p([t.data.id3Frame],t.data.id3Frame.dispatchType),"caption"===t.data.action&&f(t.data.caption),"transmuxed"===t.data.type&&(e.onmessage=null,function(t){var e=t.transmuxedData,i=t.callback;e.buffer=[],i(e)}({transmuxedData:m,callback:g}),Ga()))},n&&e.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(r)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),void 0!==a&&e.postMessage({action:"setRemux",remux:a}),i.byteLength){var v=i instanceof ArrayBuffer?i:i.buffer,y=i instanceof ArrayBuffer?0:i.byteOffset;e.postMessage({action:"push",data:v,byteOffset:y,byteLength:i.byteLength},[v])}e.postMessage({action:s?"partialFlush":"flush"})},Ga=function(){zs=null,Ha.length&&("function"==typeof(zs=Ha.shift())?zs():Va(zs))},Xa=function(t,e){t.postMessage({action:e}),Ga()},qa=function(t,e){if(!zs)return zs=t,void Xa(e,t);Ha.push(Xa.bind(null,e,t))},Ya=function(t){if(!zs)return zs=t,void Va(t);Ha.push(t)},Ka=function(t){qa("reset",t)},$a=function(){zs=null,Ha.length=0},Qa=function(t){qa("endTimeline",t)},Za=2,Ja=-101,to=-102,eo=function(t){t.forEach((function(t){t.abort()}))},io=function(t,e){return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Ja,xhr:e}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:to,xhr:e}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Za,xhr:e}:null},no=function(t){var e=t.segment,i=t.bytes,n=t.isPartial,r=t.trackInfoFn,s=t.timingInfoFn,a=t.videoSegmentTimingInfoFn,o=t.audioSegmentTimingInfoFn,l=t.id3Fn,h=t.captionsFn,u=t.dataFn,c=t.doneFn,d=e.map&&e.map.tracks||{},p=Boolean(d.audio&&d.video),f=s.bind(null,e,"audio","start"),g=s.bind(null,e,"audio","end"),m=s.bind(null,e,"video","start"),v=s.bind(null,e,"video","end");if(!n&&!e.lastReachedChar){var y=function(t,e){var i=Mt.a.inspect(t,e*It.ONE_SECOND_IN_TS);if(!i)return null;var n={hasVideo:i.video&&2===i.video.length||!1,hasAudio:i.audio&&2===i.audio.length||!1};return n.hasVideo&&(n.videoStart=i.video[0].ptsTime),n.hasAudio&&(n.audioStart=i.audio[0].ptsTime),n}(i,e.baseStartTime);y&&(r(e,{hasAudio:y.hasAudio,hasVideo:y.hasVideo,isMuxed:p}),r=null,y.hasAudio&&!p&&f(y.audioStart),y.hasVideo&&m(y.videoStart),f=null,m=null)}Ya({bytes:i,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,isPartial:n,remux:p,onData:function(t){t.type="combined"===t.type?"video":t.type,u(e,t)},onTrackInfo:function(t){r&&(p&&(t.isMuxed=!0),r(e,t))},onAudioTimingInfo:function(t){f&&void 0!==t.start&&(f(t.start),f=null),g&&void 0!==t.end&&g(t.end)},onVideoTimingInfo:function(t){m&&void 0!==t.start&&(m(t.start),m=null),v&&void 0!==t.end&&v(t.end)},onVideoSegmentTimingInfo:function(t){a(t)},onAudioSegmentTimingInfo:function(t){o(t)},onId3:function(t,i){l(e,t,i)},onCaptions:function(t){h(e,[t])},onDone:function(t){c&&!n&&(t.type="combined"===t.type?"video":t.type,c(null,e,t))}})},ro=function(t){var e=t.segment,i=t.bytes,n=t.isPartial,r=t.trackInfoFn,s=t.timingInfoFn,a=t.videoSegmentTimingInfoFn,o=t.audioSegmentTimingInfoFn,l=t.id3Fn,h=t.captionsFn,u=t.dataFn,c=t.doneFn,d=new Uint8Array(i);if(Object(Pt.isLikelyFmp4MediaSegment)(d)){e.isFmp4=!0;var p=e.map.tracks,f={isFmp4:!0,hasVideo:!!p.video,hasAudio:!!p.audio};p.audio&&p.audio.codec&&"enca"!==p.audio.codec&&(f.audioCodec=p.audio.codec),p.video&&p.video.codec&&"encv"!==p.video.codec&&(f.videoCodec=p.video.codec),p.video&&p.audio&&(f.isMuxed=!0),r(e,f);var g=Rt.a.startTime(e.map.timescales,d);f.hasAudio&&!f.isMuxed&&s(e,"audio","start",g),f.hasVideo&&s(e,"video","start",g);var m=function(t){u(e,{data:i,type:f.hasAudio&&!f.isMuxed?"audio":"video"}),t&&t.length&&h(e,t),c(null,e,{})};if(!p.video||!i.byteLength||!e.transmuxer)return void m();var v=i instanceof ArrayBuffer?i:i.buffer,y=i instanceof ArrayBuffer?0:i.byteOffset;return e.transmuxer.addEventListener("message",(function t(n){if("mp4Captions"===n.data.action){e.transmuxer.removeEventListener("message",t);var r=n.data.data;e.bytes=i=new Uint8Array(r,r.byteOffset||0,r.byteLength),m(n.data.captions)}})),void e.transmuxer.postMessage({action:"pushMp4Captions",timescales:e.map.timescales,trackIds:[p.video.id],data:v,byteOffset:y,byteLength:i.byteLength},[v])}if(e.transmuxer){if(void 0===e.container&&(e.container=Object(Pt.detectContainerForBytes)(d)),"ts"!==e.container&&"aac"!==e.container)return r(e,{hasAudio:!1,hasVideo:!1}),void c(null,e,{});no({segment:e,bytes:i,isPartial:n,trackInfoFn:r,timingInfoFn:s,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:h,dataFn:u,doneFn:c})}else c(null,e,{})},so=function(t){var e=t.activeXhrs,i=t.decryptionWorker,n=t.trackInfoFn,r=t.timingInfoFn,s=t.videoSegmentTimingInfoFn,a=t.audioSegmentTimingInfoFn,o=t.id3Fn,l=t.captionsFn,h=t.dataFn,u=t.doneFn,c=0,d=!1;return function(t,p){if(!d){if(t)return d=!0,eo(e),u(t,p);if((c+=1)===e.length){if(p.endOfAllRequests=Date.now(),p.encryptedBytes)return function(t){var e,i=t.decryptionWorker,n=t.segment,r=t.trackInfoFn,s=t.timingInfoFn,a=t.videoSegmentTimingInfoFn,o=t.audioSegmentTimingInfoFn,l=t.id3Fn,h=t.captionsFn,u=t.dataFn,c=t.doneFn;i.addEventListener("message",(function t(e){if(e.data.source===n.requestId){i.removeEventListener("message",t);var d=e.data.decrypted;n.bytes=new Uint8Array(d.bytes,d.byteOffset,d.byteLength),ro({segment:n,bytes:n.bytes,isPartial:!1,trackInfoFn:r,timingInfoFn:s,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:h,dataFn:u,doneFn:c})}})),e=n.key.bytes.slice?n.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(n.key.bytes)),i.postMessage(Aa({source:n.requestId,encrypted:n.encryptedBytes,key:e,iv:n.key.iv}),[n.encryptedBytes.buffer,e.buffer])}({decryptionWorker:i,segment:p,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,dataFn:h,doneFn:u});ro({segment:p,bytes:p.bytes,isPartial:!1,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,dataFn:h,doneFn:u})}}}},ao=function(t){var e=t.segment,i=t.progressFn,n=t.trackInfoFn,r=t.timingInfoFn,s=t.videoSegmentTimingInfoFn,a=t.audioSegmentTimingInfoFn,o=t.id3Fn,l=t.captionsFn,h=t.dataFn,u=t.handlePartialData;return function(t){var c=t.target;if(!c.aborted){if(u&&!e.key&&c.responseText&&c.responseText.length>=8){var d=za(c.responseText.substring(e.lastReachedChar||0));!e.lastReachedChar&&Object(Pt.isLikelyFmp4MediaSegment)(new Uint8Array(d))||(e.lastReachedChar=c.responseText.length,ro({segment:e,bytes:d,isPartial:!0,trackInfoFn:n,timingInfoFn:r,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,dataFn:h}))}return e.stats=Us.mergeOptions(e.stats,function(t){var e=t.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return i.bytesReceived=t.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i}(t)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),i(t,e)}}},oo=function(t){var e=t.xhr,i=t.xhrOptions,n=t.decryptionWorker,r=t.segment,s=t.abortFn,a=t.progressFn,o=t.trackInfoFn,l=t.timingInfoFn,h=t.videoSegmentTimingInfoFn,u=t.audioSegmentTimingInfoFn,c=t.id3Fn,d=t.captionsFn,p=t.dataFn,f=t.doneFn,g=t.handlePartialData,m=[],v=so({activeXhrs:m,decryptionWorker:n,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:h,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:d,dataFn:p,doneFn:f});if(r.key&&!r.key.bytes){var y=e(Us.mergeOptions(i,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),function(t,e){return function(i,n){var r=n.response,s=io(i,n);if(s)return e(s,t);if(16!==r.byteLength)return e({status:n.status,message:"Invalid HLS key at URL: "+n.uri,code:Za,xhr:n},t);var a=new DataView(r);return t.key.bytes=new Uint32Array([a.getUint32(0),a.getUint32(4),a.getUint32(8),a.getUint32(12)]),e(null,t)}}(r,v));m.push(y)}if(r.map&&!r.map.bytes){var b=e(Us.mergeOptions(i,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:wa(r.map)}),function(t){var e=t.segment,i=t.finishProcessingFn;return function(t,n){var r=n.response,s=io(t,n);if(s)return i(s,e);if(0===r.byteLength)return i({status:n.status,message:"Empty HLS segment content at URL: "+n.uri,code:Za,xhr:n},e);e.map.bytes=new Uint8Array(n.response);var a=Object(Pt.detectContainerForBytes)(e.map.bytes);return"mp4"!==a?i({status:n.status,message:"Found unsupported "+(a||"unknown")+" container for initialization segment at URL: "+n.uri,code:Za,internal:!0,xhr:n},e):(Rt.a.tracks(e.map.bytes).forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale))})),i(null,e))}}({segment:r,finishProcessingFn:v}));m.push(b)}var _=Us.mergeOptions(i,{uri:r.resolvedUri,responseType:"arraybuffer",headers:wa(r)});g&&(_.responseType="text",_.beforeSend=function(t){t.overrideMimeType("text/plain; charset=x-user-defined")});var T=e(_,function(t){var e=t.segment,i=t.finishProcessingFn,n=t.responseType;return function(t,r){var s=r.response,a=io(t,r);if(a)return i(a,e);var o="arraybuffer"!==n&&r.responseText?za(r.responseText.substring(e.lastReachedChar||0)):r.response;return 0===s.byteLength?i({status:r.status,message:"Empty HLS segment content at URL: "+r.uri,code:Za,xhr:r},e):(e.stats=function(t){return{bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0}}(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),i(null,e))}}({segment:r,finishProcessingFn:v,responseType:_.responseType}));T.addEventListener("progress",ao({segment:r,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:h,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:d,dataFn:p,handlePartialData:g})),m.push(T);var x={};return m.forEach((function(t){t.addEventListener("loadend",function(t){var e=t.loadendState,i=t.abortFn;return function(t){t.target.aborted&&i&&!e.calledAbortFn&&(i(),e.calledAbortFn=!0)}}({loadendState:x,abortFn:s}))})),function(){return eo(m)}},lo="undefined"!=typeof window?window:{},ho="undefined"==typeof Symbol?"__target":Symbol(),uo=lo.BlobBuilder||lo.WebKitBlobBuilder||lo.MozBlobBuilder||lo.MSBlobBuilder,co=lo.URL||lo.webkitURL||co&&co.msURL,po=lo.Worker;function fo(t,e){return function(i){var n=this;if(!e)return new po(t);if(po&&!i){var r=yo(e.toString().replace(/^function.+?{/,"").slice(0,-1));return this[ho]=new po(r),function(t,e){if(!t||!e)return;var i=t.terminate;t.objURL=e,t.terminate=function(){t.objURL&&co.revokeObjectURL(t.objURL),i.call(t)}}(this[ho],r),this[ho]}var s={postMessage:function(t){n.onmessage&&setTimeout((function(){n.onmessage({data:t,target:s})}))}};e.call(s),this.postMessage=function(t){setTimeout((function(){s.onmessage({data:t,target:n})}))},this.isThisThread=!0}}if(po){var go,mo=yo("self.onmessage = function () {}"),vo=new Uint8Array(1);try{(go=new po(mo)).postMessage(vo,[vo.buffer])}catch(t){po=null}finally{co.revokeObjectURL(mo),go&&go.terminate()}}function yo(t){try{return co.createObjectURL(new Blob([t],{type:"application/javascript"}))}catch(i){var e=new uo;return e.append(t),co.createObjectURL(e.getBlob(type))}}var bo=new fo("./transmuxer-worker.worker.js",(function(t,e){var i=this;
77
- /*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */!function(){var t=function(){this.init=function(){var t={};this.on=function(e,i){t[e]||(t[e]=[]),t[e]=t[e].concat(i)},this.off=function(e,i){var n;return!!t[e]&&(n=t[e].indexOf(i),t[e]=t[e].slice(),t[e].splice(n,1),n>-1)},this.trigger=function(e){var i,n,r,s;if(i=t[e])if(2===arguments.length)for(r=i.length,n=0;n<r;++n)i[n].call(this,arguments[1]);else{for(s=[],n=arguments.length,n=1;n<arguments.length;++n)s.push(arguments[n]);for(r=i.length,n=0;n<r;++n)i[n].apply(this,s)}},this.dispose=function(){t={}}}};t.prototype.pipe=function(t){return this.on("data",(function(e){t.push(e)})),this.on("done",(function(e){t.flush(e)})),this.on("partialdone",(function(e){t.partialFlush(e)})),this.on("endedtimeline",(function(e){t.endTimeline(e)})),this.on("reset",(function(e){t.reset(e)})),t},t.prototype.push=function(t){this.trigger("data",t)},t.prototype.flush=function(t){this.trigger("done",t)},t.prototype.partialFlush=function(t){this.trigger("partialdone",t)},t.prototype.endTimeline=function(t){this.trigger("endedtimeline",t)},t.prototype.reset=function(t){this.trigger("reset",t)};var e,n,r,s,a,o,l,h,u,c,d,p,f,g,m,v,y,b,_,T,x,S,w,k,C,E,A,P,O,L,M,I,D,R,N,B,j,U,F,W,z=t,H=Math.pow(2,32)-1;!function(){var t;if(S={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(t in S)S.hasOwnProperty(t)&&(S[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);w=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),C=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),k=new Uint8Array([0,0,0,1]),E=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),A=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),P={video:E,audio:A},M=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),L=new Uint8Array([0,0,0,0,0,0,0,0]),I=new Uint8Array([0,0,0,0,0,0,0,0]),D=I,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N=I,O=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),e=function(t){var e,i,n=[],r=0;for(e=1;e<arguments.length;e++)n.push(arguments[e]);for(e=n.length;e--;)r+=n[e].byteLength;for(i=new Uint8Array(r+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(t,4),e=0,r=8;e<n.length;e++)i.set(n[e],r),r+=n[e].byteLength;return i},n=function(){return e(S.dinf,e(S.dref,M))},r=function(t){return e(S.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,t.audioobjecttype<<3|t.samplingfrequencyindex>>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},m=function(t){return e(S.hdlr,P[t])},g=function(t){var i=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(i[12]=t.samplerate>>>24&255,i[13]=t.samplerate>>>16&255,i[14]=t.samplerate>>>8&255,i[15]=255&t.samplerate),e(S.mdhd,i)},f=function(t){return e(S.mdia,g(t),m(t.type),o(t))},a=function(t){return e(S.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},o=function(t){return e(S.minf,"video"===t.type?e(S.vmhd,O):e(S.smhd,L),n(),y(t))},l=function(t,i){for(var n=[],r=i.length;r--;)n[r]=_(i[r]);return e.apply(null,[S.moof,a(t)].concat(n))},h=function(t){for(var i=t.length,n=[];i--;)n[i]=d(t[i]);return e.apply(null,[S.moov,c(4294967295)].concat(n).concat(u(t)))},u=function(t){for(var i=t.length,n=[];i--;)n[i]=T(t[i]);return e.apply(null,[S.mvex].concat(n))},c=function(t){var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e(S.mvhd,i)},v=function(t){var i,n,r=t.samples||[],s=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)i=r[n].flags,s[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return e(S.sdtp,s)},y=function(t){return e(S.stbl,b(t),e(S.stts,N),e(S.stsc,D),e(S.stsz,R),e(S.stco,I))},b=function(t){return e(S.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===t.type?B(t):j(t))},B=function(t){var i,n,r=t.sps||[],s=t.pps||[],a=[],o=[];for(i=0;i<r.length;i++)a.push((65280&r[i].byteLength)>>>8),a.push(255&r[i].byteLength),a=a.concat(Array.prototype.slice.call(r[i]));for(i=0;i<s.length;i++)o.push((65280&s[i].byteLength)>>>8),o.push(255&s[i].byteLength),o=o.concat(Array.prototype.slice.call(s[i]));if(n=[S.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),e(S.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([r.length],a,[s.length],o))),e(S.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],t.sarRatio){var l=t.sarRatio[0],h=t.sarRatio[1];n.push(e(S.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&h)>>24,(16711680&h)>>16,(65280&h)>>8,255&h])))}return e.apply(null,n)},j=function(t){return e(S.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),r(t))},p=function(t){var i=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return e(S.tkhd,i)},_=function(t){var i,n,r,s,a,o;return i=e(S.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(t.baseMediaDecodeTime/(H+1)),o=Math.floor(t.baseMediaDecodeTime%(H+1)),n=e(S.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),92,"audio"===t.type?(r=x(t,92),e(S.traf,i,n,r)):(s=v(t),r=x(t,s.length+92),e(S.traf,i,n,r,s))},d=function(t){return t.duration=t.duration||4294967295,e(S.trak,p(t),f(t))},T=function(t){var i=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(i[i.length-1]=0),e(S.trex,i)},W=function(t,e){var i=0,n=0,r=0,s=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(r=4),void 0!==t[0].compositionTimeOffset&&(s=8)),[0,0,i|n|r|s,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},F=function(t,i){var n,r,s,a,o,l;for(i+=20+16*(a=t.samples||[]).length,s=W(a,i),(r=new Uint8Array(s.length+16*a.length)).set(s),n=s.length,l=0;l<a.length;l++)o=a[l],r[n++]=(4278190080&o.duration)>>>24,r[n++]=(16711680&o.duration)>>>16,r[n++]=(65280&o.duration)>>>8,r[n++]=255&o.duration,r[n++]=(4278190080&o.size)>>>24,r[n++]=(16711680&o.size)>>>16,r[n++]=(65280&o.size)>>>8,r[n++]=255&o.size,r[n++]=o.flags.isLeading<<2|o.flags.dependsOn,r[n++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,r[n++]=61440&o.flags.degradationPriority,r[n++]=15&o.flags.degradationPriority,r[n++]=(4278190080&o.compositionTimeOffset)>>>24,r[n++]=(16711680&o.compositionTimeOffset)>>>16,r[n++]=(65280&o.compositionTimeOffset)>>>8,r[n++]=255&o.compositionTimeOffset;return e(S.trun,r)},U=function(t,i){var n,r,s,a,o,l;for(i+=20+8*(a=t.samples||[]).length,s=W(a,i),(n=new Uint8Array(s.length+8*a.length)).set(s),r=s.length,l=0;l<a.length;l++)o=a[l],n[r++]=(4278190080&o.duration)>>>24,n[r++]=(16711680&o.duration)>>>16,n[r++]=(65280&o.duration)>>>8,n[r++]=255&o.duration,n[r++]=(4278190080&o.size)>>>24,n[r++]=(16711680&o.size)>>>16,n[r++]=(65280&o.size)>>>8,n[r++]=255&o.size;return e(S.trun,n)},x=function(t,e){return"audio"===t.type?U(t,e):F(t,e)};s=function(){return e(S.ftyp,w,k,w,C)};var V,G,X,q,Y,K,$,Q,Z=function(t){return e(S.mdat,t)},J=l,tt=function(t){var e,i=s(),n=h(t);return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e},et=function(t,e){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=e,i.compositionTimeOffset=t.pts-t.dts,i.duration=t.duration,i.size=4*t.length,i.size+=t.byteLength,t.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},it=function(t){var e,i,n=[],r=[];for(r.byteLength=0,r.nalCount=0,r.duration=0,n.byteLength=0,e=0;e<t.length;e++)"access_unit_delimiter_rbsp"===(i=t[e]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return r.length&&(!n.duration||n.duration<=0)&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.length,r.duration+=n.duration,r.push(n),r},nt=function(t){var e,i,n=[],r=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=t[0].pts,n.dts=t[0].dts,r.byteLength=0,r.nalCount=0,r.duration=0,r.pts=t[0].pts,r.dts=t[0].dts,e=0;e<t.length;e++)(i=t[e]).keyFrame?(n.length&&(r.push(n),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return r.length&&n.duration<=0&&(n.duration=r[r.length-1].duration),r.byteLength+=n.byteLength,r.nalCount+=n.nalCount,r.duration+=n.duration,r.push(n),r},rt=function(t){var e;return!t[0][0].keyFrame&&t.length>1&&(e=t.shift(),t.byteLength-=e.byteLength,t.nalCount-=e.nalCount,t[0][0].dts=e.dts,t[0][0].pts=e.pts,t[0][0].duration+=e.duration),t},st=function(t,e){var i,n,r,s,a,o=e||0,l=[];for(i=0;i<t.length;i++)for(s=t[i],n=0;n<s.length;n++)a=s[n],o+=(r=et(a,o)).size,l.push(r);return l},at=function(t){var e,i,n,r,s,a,o=0,l=t.byteLength,h=t.nalCount,u=new Uint8Array(l+4*h),c=new DataView(u.buffer);for(e=0;e<t.length;e++)for(r=t[e],i=0;i<r.length;i++)for(s=r[i],n=0;n<s.length;n++)a=s[n],c.setUint32(o,a.data.byteLength),o+=4,u.set(a.data,o),o+=a.data.byteLength;return u},ot=function(t,e){var i,n=[];return i=et(t,e||0),n.push(i),n},lt=function(t){var e,i,n=0,r=t.byteLength,s=t.length,a=new Uint8Array(r+4*s),o=new DataView(a.buffer);for(e=0;e<t.length;e++)i=t[e],o.setUint32(n,i.data.byteLength),n+=4,a.set(i.data,n),n+=i.data.byteLength;return a},ht=[33,16,5,32,164,27],ut=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ct=function(t){for(var e=[];t--;)e.push(0);return e},dt=function(){if(!V){var t={96e3:[ht,[227,64],ct(154),[56]],88200:[ht,[231],ct(170),[56]],64e3:[ht,[248,192],ct(240),[56]],48e3:[ht,[255,192],ct(268),[55,148,128],ct(54),[112]],44100:[ht,[255,192],ct(268),[55,163,128],ct(84),[112]],32e3:[ht,[255,192],ct(268),[55,234],ct(226),[112]],24e3:[ht,[255,192],ct(268),[55,255,128],ct(268),[111,112],ct(126),[224]],16e3:[ht,[255,192],ct(268),[55,255,128],ct(268),[111,255],ct(269),[223,108],ct(195),[1,192]],12e3:[ut,ct(268),[3,127,248],ct(268),[6,255,240],ct(268),[13,255,224],ct(268),[27,253,128],ct(259),[56]],11025:[ut,ct(268),[3,127,248],ct(268),[6,255,240],ct(268),[13,255,224],ct(268),[27,255,192],ct(268),[55,175,128],ct(108),[112]],8e3:[ut,ct(268),[3,121,16],ct(47),[7]]};e=t,V=Object.keys(e).reduce((function(t,i){return t[i]=new Uint8Array(e[i].reduce((function(t,e){return t.concat(e)}),[])),t}),{})}var e;return V};K=function(t,e){return G(Y(t,e))},$=function(t,e){return X(q(t),e)},Q=function(t,e,i){return q(i?t:t-e)};var pt=9e4,ft=G=function(t){return 9e4*t},gt=(X=function(t,e){return t*e},q=function(t){return t/9e4}),mt=(Y=function(t,e){return t/e},K),vt=$,yt=Q,bt=function(t,e,i,n){var r,s,a,o,l,h=0,u=0,c=0;if(e.length&&(r=mt(t.baseMediaDecodeTime,t.samplerate),s=Math.ceil(pt/(t.samplerate/1024)),i&&n&&(h=r-Math.max(i,n),c=(u=Math.floor(h/s))*s),!(u<1||c>pt/2))){for((a=dt()[t.samplerate])||(a=e[0].data),o=0;o<u;o++)l=e[0],e.splice(0,0,{data:a,dts:l.dts-s,pts:l.pts-s});return t.baseMediaDecodeTime-=Math.floor(vt(c,t.samplerate)),c}},_t=function(t,e,i){return e.minSegmentDts>=i?t:(e.minSegmentDts=1/0,t.filter((function(t){return t.dts>=i&&(e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),e.minSegmentPts=e.minSegmentDts,!0)})))},Tt=function(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n.push({size:i.data.byteLength,duration:1024});return n},xt=function(t){var e,i,n=0,r=new Uint8Array(function(t){var e,i=0;for(e=0;e<t.length;e++)i+=t[e].data.byteLength;return i}(t));for(e=0;e<t.length;e++)i=t[e],r.set(i.data,n),n+=i.data.byteLength;return r},St=pt,wt=function(t){delete t.minSegmentDts,delete t.maxSegmentDts,delete t.minSegmentPts,delete t.maxSegmentPts},kt=function(t,e){var i,n=t.minSegmentDts;return e||(n-=t.timelineStartInfo.dts),i=t.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===t.type&&(i*=t.samplerate/St,i=Math.floor(i)),i},Ct=function(t,e){"number"==typeof e.pts&&(void 0===t.timelineStartInfo.pts&&(t.timelineStartInfo.pts=e.pts),void 0===t.minSegmentPts?t.minSegmentPts=e.pts:t.minSegmentPts=Math.min(t.minSegmentPts,e.pts),void 0===t.maxSegmentPts?t.maxSegmentPts=e.pts:t.maxSegmentPts=Math.max(t.maxSegmentPts,e.pts)),"number"==typeof e.dts&&(void 0===t.timelineStartInfo.dts&&(t.timelineStartInfo.dts=e.dts),void 0===t.minSegmentDts?t.minSegmentDts=e.dts:t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),void 0===t.maxSegmentDts?t.maxSegmentDts=e.dts:t.maxSegmentDts=Math.max(t.maxSegmentDts,e.dts))},Et=function(t){for(var e=0,i={payloadType:-1,payloadSize:0},n=0,r=0;e<t.byteLength&&128!==t[e];){for(;255===t[e];)n+=255,e++;for(n+=t[e++];255===t[e];)r+=255,e++;if(r+=t[e++],!i.payload&&4===n){if("GA94"===String.fromCharCode(t[e+3],t[e+4],t[e+5],t[e+6])){i.payloadType=n,i.payloadSize=r,i.payload=t.subarray(e,e+r);break}i.payload=void 0}e+=r,n=0,r=0}return i},At=function(t){return 181!==t.payload[0]||49!=(t.payload[1]<<8|t.payload[2])||"GA94"!==String.fromCharCode(t.payload[3],t.payload[4],t.payload[5],t.payload[6])||3!==t.payload[7]?null:t.payload.subarray(8,t.payload.length-1)},Pt=function(t,e){var i,n,r,s,a=[];if(!(64&e[0]))return a;for(n=31&e[0],i=0;i<n;i++)s={type:3&e[(r=3*i)+2],pts:t},4&e[r+2]&&(s.ccData=e[r+3]<<8|e[r+4],a.push(s));return a},Ot=function(t){for(var e,i,n=t.byteLength,r=[],s=1;s<n-2;)0===t[s]&&0===t[s+1]&&3===t[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return t;e=n-r.length,i=new Uint8Array(e);var a=0;for(s=0;s<e;a++,s++)a===r[0]&&(a++,r.shift()),i[s]=t[a];return i},Lt=4,Mt=function t(){t.prototype.init.call(this),this.captionPackets_=[],this.ccStreams_=[new zt(0,0),new zt(0,1),new zt(1,0),new zt(1,1)],this.cc708Stream_=new Bt,this.reset(),this.ccStreams_.forEach((function(t){t.on("data",this.trigger.bind(this,"data")),t.on("partialdone",this.trigger.bind(this,"partialdone")),t.on("done",this.trigger.bind(this,"done"))}),this),this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done"))};(Mt.prototype=new z).push=function(t){var e,i,n;if("sei_rbsp"===t.nalUnitType&&(e=Et(t.escapedRBSP)).payload&&e.payloadType===Lt&&(i=At(e)))if(t.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(t.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));n=Pt(t.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==t.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=t.dts}},Mt.prototype.flushCCStreams=function(t){this.ccStreams_.forEach((function(e){return"flush"===t?e.flush():e.partialFlush()}),this)},Mt.prototype.flushStream=function(t){this.captionPackets_.length?(this.captionPackets_.forEach((function(t,e){t.presortIndex=e})),this.captionPackets_.sort((function(t,e){return t.pts===e.pts?t.presortIndex-e.presortIndex:t.pts-e.pts})),this.captionPackets_.forEach((function(t){t.type<2?this.dispatchCea608Packet(t):this.dispatchCea708Packet(t)}),this),this.captionPackets_.length=0,this.flushCCStreams(t)):this.flushCCStreams(t)},Mt.prototype.flush=function(){return this.flushStream("flush")},Mt.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Mt.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(t){t.reset()}))},Mt.prototype.dispatchCea608Packet=function(t){this.setsTextOrXDSActive(t)?this.activeCea608Channel_[t.type]=null:this.setsChannel1Active(t)?this.activeCea608Channel_[t.type]=0:this.setsChannel2Active(t)&&(this.activeCea608Channel_[t.type]=1),null!==this.activeCea608Channel_[t.type]&&this.ccStreams_[(t.type<<1)+this.activeCea608Channel_[t.type]].push(t)},Mt.prototype.setsChannel1Active=function(t){return 4096==(30720&t.ccData)},Mt.prototype.setsChannel2Active=function(t){return 6144==(30720&t.ccData)},Mt.prototype.setsTextOrXDSActive=function(t){return 256==(28928&t.ccData)||4138==(30974&t.ccData)||6186==(30974&t.ccData)},Mt.prototype.dispatchCea708Packet=function(t){this.cc708Stream_.push(t)};var It={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Dt=function(t){return 32<=t&&t<=127||160<=t&&t<=255},Rt=function(t){this.windowNum=t,this.reset()};Rt.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Rt.prototype.getText=function(){return this.rows.join("\n")},Rt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Rt.prototype.newLine=function(t){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(t),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Rt.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},Rt.prototype.addText=function(t){this.rows[this.rowIdx]+=t},Rt.prototype.backspace=function(){if(!this.isEmpty()){var t=this.rows[this.rowIdx];this.rows[this.rowIdx]=t.substr(0,t.length-1)}};var Nt=function(t){this.serviceNum=t,this.text="",this.currentWindow=new Rt(-1),this.windows=[]};Nt.prototype.init=function(t,e){this.startPts=t;for(var i=0;i<8;i++)this.windows[i]=new Rt(i),"function"==typeof e&&(this.windows[i].beforeRowOverflow=e)},Nt.prototype.setCurrentWindow=function(t){this.currentWindow=this.windows[t]};var Bt=function t(){t.prototype.init.call(this);var e=this;this.current708Packet=null,this.services={},this.push=function(t){3===t.type?(e.new708Packet(),e.add708Bytes(t)):(null===e.current708Packet&&e.new708Packet(),e.add708Bytes(t))}};Bt.prototype=new z,Bt.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Bt.prototype.add708Bytes=function(t){var e=t.ccData,i=e>>>8,n=255&e;this.current708Packet.ptsVals.push(t.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},Bt.prototype.push708Packet=function(){var t=this.current708Packet,e=t.data,i=null,n=null,r=0,s=e[r++];for(t.seq=s>>6,t.sizeCode=63&s;r<e.length;r++)n=31&(s=e[r++]),7===(i=s>>5)&&n>0&&(i=s=e[r++]),this.pushServiceBlock(i,r,n),n>0&&(r+=n-1)},Bt.prototype.pushServiceBlock=function(t,e,i){var n,r=e,s=this.current708Packet.data,a=this.services[t];for(a||(a=this.initService(t,r));r<e+i&&r<s.length;r++)n=s[r],Dt(n)?r=this.handleText(r,a):16===n?r=this.extendedCommands(r,a):128<=n&&n<=135?r=this.setCurrentWindow(r,a):152<=n&&n<=159?r=this.defineWindow(r,a):136===n?r=this.clearWindows(r,a):140===n?r=this.deleteWindows(r,a):137===n?r=this.displayWindows(r,a):138===n?r=this.hideWindows(r,a):139===n?r=this.toggleWindows(r,a):151===n?r=this.setWindowAttributes(r,a):144===n?r=this.setPenAttributes(r,a):145===n?r=this.setPenColor(r,a):146===n?r=this.setPenLocation(r,a):143===n?a=this.reset(r,a):8===n?a.currentWindow.backspace():12===n?a.currentWindow.clearText():13===n?a.currentWindow.pendingNewLine=!0:14===n?a.currentWindow.clearText():141===n&&r++},Bt.prototype.extendedCommands=function(t,e){var i=this.current708Packet.data[++t];return Dt(i)&&(t=this.handleText(t,e,!0)),t},Bt.prototype.getPts=function(t){return this.current708Packet.ptsVals[Math.floor(t/2)]},Bt.prototype.initService=function(t,e){var i=this;return this.services[t]=new Nt(t),this.services[t].init(this.getPts(e),(function(e){i.flushDisplayed(e,i.services[t])})),this.services[t]},Bt.prototype.handleText=function(t,e,i){var n,r,s=this.current708Packet.data[t],a=(r=It[n=(i?4096:0)|s]||n,4096&n&&n===r?"":String.fromCharCode(r)),o=e.currentWindow;return o.pendingNewLine&&!o.isEmpty()&&o.newLine(this.getPts(t)),o.pendingNewLine=!1,o.addText(a),t},Bt.prototype.setCurrentWindow=function(t,e){var i=7&this.current708Packet.data[t];return e.setCurrentWindow(i),t},Bt.prototype.defineWindow=function(t,e){var i=this.current708Packet.data,n=i[t],r=7&n;e.setCurrentWindow(r);var s=e.currentWindow;return n=i[++t],s.visible=(32&n)>>5,s.rowLock=(16&n)>>4,s.columnLock=(8&n)>>3,s.priority=7&n,n=i[++t],s.relativePositioning=(128&n)>>7,s.anchorVertical=127&n,n=i[++t],s.anchorHorizontal=n,n=i[++t],s.anchorPoint=(240&n)>>4,s.rowCount=15&n,n=i[++t],s.columnCount=63&n,n=i[++t],s.windowStyle=(56&n)>>3,s.penStyle=7&n,s.virtualRowCount=s.rowCount+1,t},Bt.prototype.setWindowAttributes=function(t,e){var i=this.current708Packet.data,n=i[t],r=e.currentWindow.winAttr;return n=i[++t],r.fillOpacity=(192&n)>>6,r.fillRed=(48&n)>>4,r.fillGreen=(12&n)>>2,r.fillBlue=3&n,n=i[++t],r.borderType=(192&n)>>6,r.borderRed=(48&n)>>4,r.borderGreen=(12&n)>>2,r.borderBlue=3&n,n=i[++t],r.borderType+=(128&n)>>5,r.wordWrap=(64&n)>>6,r.printDirection=(48&n)>>4,r.scrollDirection=(12&n)>>2,r.justify=3&n,n=i[++t],r.effectSpeed=(240&n)>>4,r.effectDirection=(12&n)>>2,r.displayEffect=3&n,t},Bt.prototype.flushDisplayed=function(t,e){for(var i=[],n=0;n<8;n++)e.windows[n].visible&&!e.windows[n].isEmpty()&&i.push(e.windows[n].getText());e.endPts=t,e.text=i.join("\n\n"),this.pushCaption(e),e.startPts=t},Bt.prototype.pushCaption=function(t){""!==t.text&&(this.trigger("data",{startPts:t.startPts,endPts:t.endPts,text:t.text,stream:"cc708_"+t.serviceNum}),t.text="",t.startPts=t.endPts)},Bt.prototype.displayWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var r=0;r<8;r++)i&1<<r&&(e.windows[r].visible=1);return t},Bt.prototype.hideWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var r=0;r<8;r++)i&1<<r&&(e.windows[r].visible=0);return t},Bt.prototype.toggleWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var r=0;r<8;r++)i&1<<r&&(e.windows[r].visible^=1);return t},Bt.prototype.clearWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var r=0;r<8;r++)i&1<<r&&e.windows[r].clearText();return t},Bt.prototype.deleteWindows=function(t,e){var i=this.current708Packet.data[++t],n=this.getPts(t);this.flushDisplayed(n,e);for(var r=0;r<8;r++)i&1<<r&&e.windows[r].reset();return t},Bt.prototype.setPenAttributes=function(t,e){var i=this.current708Packet.data,n=i[t],r=e.currentWindow.penAttr;return n=i[++t],r.textTag=(240&n)>>4,r.offset=(12&n)>>2,r.penSize=3&n,n=i[++t],r.italics=(128&n)>>7,r.underline=(64&n)>>6,r.edgeType=(56&n)>>3,r.fontStyle=7&n,t},Bt.prototype.setPenColor=function(t,e){var i=this.current708Packet.data,n=i[t],r=e.currentWindow.penColor;return n=i[++t],r.fgOpacity=(192&n)>>6,r.fgRed=(48&n)>>4,r.fgGreen=(12&n)>>2,r.fgBlue=3&n,n=i[++t],r.bgOpacity=(192&n)>>6,r.bgRed=(48&n)>>4,r.bgGreen=(12&n)>>2,r.bgBlue=3&n,n=i[++t],r.edgeRed=(48&n)>>4,r.edgeGreen=(12&n)>>2,r.edgeBlue=3&n,t},Bt.prototype.setPenLocation=function(t,e){var i=this.current708Packet.data,n=i[t],r=e.currentWindow.penLoc;return e.currentWindow.pendingNewLine=!0,n=i[++t],r.row=15&n,n=i[++t],r.column=63&n,t},Bt.prototype.reset=function(t,e){var i=this.getPts(t);return this.flushDisplayed(i,e),this.initService(e.serviceNum,t)};var jt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Ut=function(t){return null===t?"":(t=jt[t]||t,String.fromCharCode(t))},Ft=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Wt=function(){for(var t=[],e=15;e--;)t.push("");return t},zt=function t(e,i){t.prototype.init.call(this),this.field_=e||0,this.dataChannel_=i||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(t){var e,i,n,r,s;if((e=32639&t.ccData)!==this.lastControlCode_){if(4096==(61440&e)?this.lastControlCode_=e:e!==this.PADDING_&&(this.lastControlCode_=null),n=e>>>8,r=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=Wt();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Wt();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=Wt()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(n,r))s=Ut((n=(3&n)<<8)|r),this[this.mode_](t.pts,s),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),s=Ut((n=(3&n)<<8)|r),this[this.mode_](t.pts,s),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&r)&&this.addFormatting(t.pts,["i"]),1==(1&r)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var a=Ft.indexOf(7968&e);"rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(t.pts,a)),a!==this.row_&&(this.clearFormatting(t.pts),this.row_=a),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),s=Ut(n),s+=Ut(r),this[this.mode_](t.pts,s),this.column_+=s.length)}else this.lastControlCode_=null}};zt.prototype=new z,zt.prototype.flushDisplayed=function(t){var e=this.displayed_.map((function(t){try{return t.trim()}catch(t){return console.error("Skipping malformed caption."),""}})).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},zt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Wt(),this.nonDisplayed_=Wt(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},zt.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},zt.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&e>=48&&e<=63},zt.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&e>=32&&e<=63},zt.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&e>=32&&e<=47},zt.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&e>=33&&e<=35},zt.prototype.isPAC=function(t,e){return t>=this.BASE_&&t<this.BASE_+8&&e>=64&&e<=127},zt.prototype.isColorPAC=function(t){return t>=64&&t<=79||t>=96&&t<=127},zt.prototype.isNormalChar=function(t){return t>=32&&t<=127},zt.prototype.setRollUp=function(t,e){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(t),this.nonDisplayed_=Wt(),this.displayed_=Wt()),void 0!==e&&e!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[e-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]="";void 0===e&&(e=this.row_),this.topRow_=e-this.rollUpRows_+1},zt.prototype.addFormatting=function(t,e){this.formatting_=this.formatting_.concat(e);var i=e.reduce((function(t,e){return t+"<"+e+">"}),"");this[this.mode_](t,i)},zt.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce((function(t,e){return t+"</"+e+">"}),"");this.formatting_=[],this[this.mode_](t,e)}},zt.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},zt.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},zt.prototype.shiftRowsUp_=function(){var t;for(t=0;t<this.topRow_;t++)this.displayed_[t]="";for(t=this.row_+1;t<15;t++)this.displayed_[t]="";for(t=this.topRow_;t<this.row_;t++)this.displayed_[t]=this.displayed_[t+1];this.displayed_[this.row_]=""},zt.prototype.paintOn=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i};var Ht={CaptionStream:Mt,Cea608Stream:zt,Cea708Stream:Bt},Vt={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Gt=function(t,e){var i=1;for(t>e&&(i=-1);Math.abs(e-t)>4294967296;)t+=8589934592*i;return t},Xt=function t(e){var i,n;t.prototype.init.call(this),this.type_=e||"shared",this.push=function(t){"shared"!==this.type_&&t.type!==this.type_||(void 0===n&&(n=t.dts),t.dts=Gt(t.dts,n),t.pts=Gt(t.pts,n),i=t.dts,this.trigger("data",t))},this.flush=function(){n=i,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,i=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Xt.prototype=new z;var qt,Yt=Xt,Kt=function(t,e,i){var n,r="";for(n=e;n<i;n++)r+="%"+("00"+t[n].toString(16)).slice(-2);return r},$t=function(t,e,i){return decodeURIComponent(Kt(t,e,i))},Qt=function(t){return t[0]<<21|t[1]<<14|t[2]<<7|t[3]},Zt={TXXX:function(t){var e;if(3===t.data[0]){for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=$t(t.data,1,e),t.value=$t(t.data,e+1,t.data.length).replace(/\0*$/,"");break}t.data=t.value}},WXXX:function(t){var e;if(3===t.data[0])for(e=1;e<t.data.length;e++)if(0===t.data[e]){t.description=$t(t.data,1,e),t.url=$t(t.data,e+1,t.data.length);break}},PRIV:function(t){var e,i;for(e=0;e<t.data.length;e++)if(0===t.data[e]){t.owner=(i=t.data,unescape(Kt(i,0,e)));break}t.privateData=t.data.subarray(e+1),t.data=t.privateData}};(qt=function(t){var e,i={debug:!(!t||!t.debug),descriptor:t&&t.descriptor},n=0,r=[],s=0;if(qt.prototype.init.call(this),this.dispatchType=Vt.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(e=0;e<i.descriptor.length;e++)this.dispatchType+=("00"+i.descriptor[e].toString(16)).slice(-2);this.push=function(t){var e,a,o,l,h;if("timed-metadata"===t.type)if(t.dataAlignmentIndicator&&(s=0,r.length=0),0===r.length&&(t.data.length<10||t.data[0]!=="I".charCodeAt(0)||t.data[1]!=="D".charCodeAt(0)||t.data[2]!=="3".charCodeAt(0)))i.debug&&console.log("Skipping unrecognized metadata packet");else if(r.push(t),s+=t.data.byteLength,1===r.length&&(n=Qt(t.data.subarray(6,10)),n+=10),!(s<n)){for(e={data:new Uint8Array(n),frames:[],pts:r[0].pts,dts:r[0].dts},h=0;h<n;)e.data.set(r[0].data.subarray(0,n-h),h),h+=r[0].data.byteLength,s-=r[0].data.byteLength,r.shift();a=10,64&e.data[5]&&(a+=4,a+=Qt(e.data.subarray(10,14)),n-=Qt(e.data.subarray(16,20)));do{if((o=Qt(e.data.subarray(a+4,a+8)))<1)return console.log("Malformed ID3 frame encountered. Skipping metadata parsing.");if((l={id:String.fromCharCode(e.data[a],e.data[a+1],e.data[a+2],e.data[a+3]),data:e.data.subarray(a+10,a+o+10)}).key=l.id,Zt[l.id]&&(Zt[l.id](l),"com.apple.streaming.transportStreamTimestamp"===l.owner)){var u=l.data,c=(1&u[3])<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;c*=4,c+=3&u[7],l.timeStamp=c,void 0===e.pts&&void 0===e.dts&&(e.pts=l.timeStamp,e.dts=l.timeStamp),this.trigger("timestamp",l)}e.frames.push(l),a+=10,a+=o}while(a<n);this.trigger("data",e)}}}).prototype=new z;var Jt,te,ee,ie=qt,ne=Yt;(Jt=function(){var t=new Uint8Array(188),e=0;Jt.prototype.init.call(this),this.push=function(i){var n,r=0,s=188;for(e?((n=new Uint8Array(i.byteLength+e)).set(t.subarray(0,e)),n.set(i,e),e=0):n=i;s<n.byteLength;)71!==n[r]||71!==n[s]?(r++,s++):(this.trigger("data",n.subarray(r,s)),r+=188,s+=188);r<n.byteLength&&(t.set(n.subarray(r),0),e=n.byteLength-r)},this.flush=function(){188===e&&71===t[0]&&(this.trigger("data",t),e=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){e=0,this.trigger("reset")}}).prototype=new z,(te=function(){var t,e,i,n;te.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,t=function(t,n){var r=0;n.payloadUnitStartIndicator&&(r+=t[r]+1),"pat"===n.type?e(t.subarray(r),n):i(t.subarray(r),n)},e=function(t,e){e.section_number=t[7],e.last_section_number=t[8],n.pmtPid=(31&t[10])<<8|t[11],e.pmtPid=n.pmtPid},i=function(t,e){var i,r;if(1&t[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&t[1])<<8|t[2])-4,r=12+((15&t[10])<<8|t[11]);r<i;){var s=t[r],a=(31&t[r+1])<<8|t[r+2];s===Vt.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=a:s===Vt.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=a:s===Vt.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][a]=s),r+=5+((15&t[r+3])<<8|t[r+4])}e.programMapTable=n.programMapTable}},this.push=function(e){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&e[1]),i.pid=31&e[1],i.pid<<=8,i.pid|=e[2],(48&e[3])>>>4>1&&(n+=e[n]+1),0===i.pid)i.type="pat",t(e.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",t(e.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,n,i]):this.processPes_(e,n,i)},this.processPes_=function(t,e,i){i.pid===this.programMapTable.video?i.streamType=Vt.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Vt.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),this.trigger("data",i)}}).prototype=new z,te.STREAM_TYPES={h264:27,adts:15},(ee=function(){var t,e=this,i={data:[],size:0},n={data:[],size:0},r={data:[],size:0},s=function(t,i,n){var r,s,a=new Uint8Array(t.size),o={type:i},l=0,h=0;if(t.data.length&&!(t.size<9)){for(o.trackId=t.data[0].pid,l=0;l<t.data.length;l++)s=t.data[l],a.set(s.data,h),h+=s.data.byteLength;var u,c,d;u=a,(c=o).packetLength=6+(u[4]<<8|u[5]),c.dataAlignmentIndicator=0!=(4&u[6]),192&(d=u[7])&&(c.pts=(14&u[9])<<27|(255&u[10])<<20|(254&u[11])<<12|(255&u[12])<<5|(254&u[13])>>>3,c.pts*=4,c.pts+=(6&u[13])>>>1,c.dts=c.pts,64&d&&(c.dts=(14&u[14])<<27|(255&u[15])<<20|(254&u[16])<<12|(255&u[17])<<5|(254&u[18])>>>3,c.dts*=4,c.dts+=(6&u[18])>>>1)),c.data=u.subarray(9+u[8]),r="video"===i||o.packetLength<=t.size,(n||r)&&(t.size=0,t.data.length=0),r&&e.trigger("data",o)}};ee.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var t,e;switch(a.streamType){case Vt.H264_STREAM_TYPE:t=i,e="video";break;case Vt.ADTS_STREAM_TYPE:t=n,e="audio";break;case Vt.METADATA_STREAM_TYPE:t=r,e="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&s(t,e,!0),t.data.push(a),t.size+=a.data.byteLength},pmt:function(){var i={type:"metadata",tracks:[]};null!==(t=a.programMapTable).video&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&i.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),e.trigger("data",i)}})[a.type]()},this.reset=function(){i.size=0,i.data.length=0,n.size=0,n.data.length=0,this.trigger("reset")},this.flushStreams_=function(){s(i,"video"),s(n,"audio"),s(r,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}}).prototype=new z;var re={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Jt,TransportParseStream:te,ElementaryStream:ee,TimestampRolloverStream:ne,CaptionStream:Ht.CaptionStream,Cea608Stream:Ht.Cea608Stream,Cea708Stream:Ht.Cea708Stream,MetadataStream:ie};for(var se in Vt)Vt.hasOwnProperty(se)&&(re[se]=Vt[se]);var ae,oe=re,le=pt,he=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(ae=function(t){var e,i=0;ae.prototype.init.call(this),this.push=function(n){var r,s,a,o,l,h,u=0;if(t||(i=0),"audio"===n.type)for(e?(o=e,(e=new Uint8Array(o.byteLength+n.data.byteLength)).set(o),e.set(n.data,o.byteLength)):e=n.data;u+5<e.length;)if(255===e[u]&&240==(246&e[u+1])){if(s=2*(1&~e[u+1]),r=(3&e[u+3])<<11|e[u+4]<<3|(224&e[u+5])>>5,h=(l=1024*(1+(3&e[u+6])))*le/he[(60&e[u+2])>>>2],a=u+r,e.byteLength<a)return;if(this.trigger("data",{pts:n.pts+i*h,dts:n.dts+i*h,sampleCount:l,audioobjecttype:1+(e[u+2]>>>6&3),channelcount:(1&e[u+2])<<2|(192&e[u+3])>>>6,samplerate:he[(60&e[u+2])>>>2],samplingfrequencyindex:(60&e[u+2])>>>2,samplesize:16,data:e.subarray(u+7+s,a)}),i++,e.byteLength===a)return void(e=void 0);e=e.subarray(a)}else u++},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){e=void 0,this.trigger("reset")},this.endTimeline=function(){e=void 0,this.trigger("endedtimeline")}}).prototype=new z;var ue,ce,de,pe=ae,fe=function(t){var e=t.byteLength,i=0,n=0;this.length=function(){return 8*e},this.bitsAvailable=function(){return 8*e+n},this.loadWord=function(){var r=t.byteLength-e,s=new Uint8Array(4),a=Math.min(4,e);if(0===a)throw new Error("no bytes available");s.set(t.subarray(r,r+a)),i=new DataView(s.buffer).getUint32(0),n=8*a,e-=a},this.skipBits=function(t){var r;n>t?(i<<=t,n-=t):(t-=n,t-=8*(r=Math.floor(t/8)),e-=r,this.loadWord(),i<<=t,n-=t)},this.readBits=function(t){var r=Math.min(n,t),s=i>>>32-r;return(n-=r)>0?i<<=r:e>0&&this.loadWord(),(r=t-r)>0?s<<r|this.readBits(r):s},this.skipLeadingZeros=function(){var t;for(t=0;t<n;++t)if(0!=(i&2147483648>>>t))return i<<=t,n-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(ce=function(){var t,e,i=0;ce.prototype.init.call(this),this.push=function(n){var r;e?((r=new Uint8Array(e.byteLength+n.data.byteLength)).set(e),r.set(n.data,e.byteLength),e=r):e=n.data;for(var s=e.byteLength;i<s-3;i++)if(1===e[i+2]){t=i+5;break}for(;t<s;)switch(e[t]){case 0:if(0!==e[t-1]){t+=2;break}if(0!==e[t-2]){t++;break}i+3!==t-2&&this.trigger("data",e.subarray(i+3,t-2));do{t++}while(1!==e[t]&&t<s);i=t-2,t+=3;break;case 1:if(0!==e[t-1]||0!==e[t-2]){t+=3;break}this.trigger("data",e.subarray(i+3,t-2)),i=t-2,t+=3;break;default:t+=3}e=e.subarray(i),t-=i,i=0},this.reset=function(){e=null,i=0,this.trigger("reset")},this.flush=function(){e&&e.byteLength>3&&this.trigger("data",e.subarray(i+3)),e=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new z,de={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(ue=function(){var t,e,i,n,r,s,a,o=new ce;ue.prototype.init.call(this),t=this,this.push=function(t){"video"===t.type&&(e=t.trackId,i=t.pts,n=t.dts,o.push(t))},o.on("data",(function(a){var o={trackId:e,pts:i,dts:n,data:a};switch(31&a[0]){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=r(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=r(a.subarray(1)),o.config=s(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",o)})),o.on("done",(function(){t.trigger("done")})),o.on("partialdone",(function(){t.trigger("partialdone")})),o.on("reset",(function(){t.trigger("reset")})),o.on("endedtimeline",(function(){t.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(t,e){var i,n=8,r=8;for(i=0;i<t;i++)0!==r&&(r=(n+e.readExpGolomb()+256)%256),n=0===r?n:r},r=function(t){for(var e,i,n=t.byteLength,r=[],s=1;s<n-2;)0===t[s]&&0===t[s+1]&&3===t[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return t;e=n-r.length,i=new Uint8Array(e);var a=0;for(s=0;s<e;a++,s++)a===r[0]&&(a++,r.shift()),i[s]=t[a];return i},s=function(t){var e,i,n,r,s,o,l,h,u,c,d,p,f,g=0,m=0,v=0,y=0,b=1;if(i=(e=new fe(t)).readUnsignedByte(),r=e.readUnsignedByte(),n=e.readUnsignedByte(),e.skipUnsignedExpGolomb(),de[i]&&(3===(s=e.readUnsignedExpGolomb())&&e.skipBits(1),e.skipUnsignedExpGolomb(),e.skipUnsignedExpGolomb(),e.skipBits(1),e.readBoolean()))for(d=3!==s?8:12,f=0;f<d;f++)e.readBoolean()&&a(f<6?16:64,e);if(e.skipUnsignedExpGolomb(),0===(o=e.readUnsignedExpGolomb()))e.readUnsignedExpGolomb();else if(1===o)for(e.skipBits(1),e.skipExpGolomb(),e.skipExpGolomb(),l=e.readUnsignedExpGolomb(),f=0;f<l;f++)e.skipExpGolomb();if(e.skipUnsignedExpGolomb(),e.skipBits(1),h=e.readUnsignedExpGolomb(),u=e.readUnsignedExpGolomb(),0===(c=e.readBits(1))&&e.skipBits(1),e.skipBits(1),e.readBoolean()&&(g=e.readUnsignedExpGolomb(),m=e.readUnsignedExpGolomb(),v=e.readUnsignedExpGolomb(),y=e.readUnsignedExpGolomb()),e.readBoolean()&&e.readBoolean()){switch(e.readUnsignedByte()){case 1:p=[1,1];break;case 2:p=[12,11];break;case 3:p=[10,11];break;case 4:p=[16,11];break;case 5:p=[40,33];break;case 6:p=[24,11];break;case 7:p=[20,11];break;case 8:p=[32,11];break;case 9:p=[80,33];break;case 10:p=[18,11];break;case 11:p=[15,11];break;case 12:p=[64,33];break;case 13:p=[160,99];break;case 14:p=[4,3];break;case 15:p=[3,2];break;case 16:p=[2,1];break;case 255:p=[e.readUnsignedByte()<<8|e.readUnsignedByte(),e.readUnsignedByte()<<8|e.readUnsignedByte()]}p&&(b=p[0]/p[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:r,width:Math.ceil((16*(h+1)-2*g-2*m)*b),height:(2-c)*(u+1)*16-2*v-2*y,sarRatio:p}}}).prototype=new z;var ge,me={H264Stream:ue,NalByteStream:ce},ve=function(t,e){var i=t[e+6]<<21|t[e+7]<<14|t[e+8]<<7|t[e+9];return i=i>=0?i:0,(16&t[e+5])>>4?i+20:i+10},ye=function(t){var e=function t(e,i){return e.length-i<10||e[i]!=="I".charCodeAt(0)||e[i+1]!=="D".charCodeAt(0)||e[i+2]!=="3".charCodeAt(0)?i:t(e,i+=ve(e,i))}(t,0);return t.length>=e+2&&255==(255&t[e])&&240==(240&t[e+1])&&16==(22&t[e+1])},be=ve,_e=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i};(ge=function(){var t=new Uint8Array,e=0;ge.prototype.init.call(this),this.setTimestamp=function(t){e=t},this.push=function(i){var n,r,s,a,o=0,l=0;for(t.length?(a=t.length,(t=new Uint8Array(i.byteLength+a)).set(t.subarray(0,a)),t.set(i,a)):t=i;t.length-l>=3;)if(t[l]!=="I".charCodeAt(0)||t[l+1]!=="D".charCodeAt(0)||t[l+2]!=="3".charCodeAt(0))if(255!=(255&t[l])||240!=(240&t[l+1]))l++;else{if(t.length-l<7)break;if(l+(o=_e(t,l))>t.length)break;s={type:"audio",data:t.subarray(l,l+o),pts:e,dts:e},this.trigger("data",s),l+=o}else{if(t.length-l<10)break;if(l+(o=be(t,l))>t.length)break;r={type:"timed-metadata",data:t.subarray(l,l+o)},this.trigger("data",r),l+=o}n=t.length-l,t=n>0?t.subarray(l):new Uint8Array},this.reset=function(){t=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){t=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new z;var Te,xe,Se,we,ke=ge,Ce=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Ee=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Ae=me.H264Stream,Pe=ye,Oe=pt,Le=function(t,e){var i;if(t.length!==e.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},Me=function(t,e,i,n,r,s){return{start:{dts:t,pts:t+(i-e)},end:{dts:t+(n-e),pts:t+(r-i)},prependedContentDuration:s,baseMediaDecodeTime:t}};(xe=function(t,e){var i=[],n=0,r=0,s=0,a=1/0;e=e||{},xe.prototype.init.call(this),this.push=function(e){Ct(t,e),t&&Ce.forEach((function(i){t[i]=e[i]})),i.push(e)},this.setEarliestDts=function(t){r=t},this.setVideoBaseMediaDecodeTime=function(t){a=t},this.setAudioAppendStart=function(t){s=t},this.flush=function(){var o,l,h,u,c,d,p;0!==i.length?(o=_t(i,t,r),t.baseMediaDecodeTime=kt(t,e.keepOriginalTimestamps),p=bt(t,o,s,a),t.samples=Tt(o),h=Z(xt(o)),i=[],l=J(n,[t]),u=new Uint8Array(l.byteLength+h.byteLength),n++,u.set(l),u.set(h,l.byteLength),wt(t),c=Math.ceil(1024*Oe/t.samplerate),o.length&&(d=o.length*c,this.trigger("segmentTimingInfo",Me(mt(t.baseMediaDecodeTime,t.samplerate),o[0].dts,o[0].pts,o[0].dts+d,o[0].pts+d,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+d})),this.trigger("data",{track:t,boxes:u}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){wt(t),i=[],this.trigger("reset")}}).prototype=new z,(Te=function(t,e){var i,n,r=0,s=[],a=[];e=e||{},Te.prototype.init.call(this),delete t.minPTS,this.gopCache_=[],this.push=function(e){Ct(t,e),"seq_parameter_set_rbsp"!==e.nalUnitType||i||(i=e.config,t.sps=[e.data],Ee.forEach((function(e){t[e]=i[e]}),this)),"pic_parameter_set_rbsp"!==e.nalUnitType||n||(n=e.data,t.pps=[e.data]),s.push(e)},this.flush=function(){for(var i,n,o,l,h,u,c,d,p=0;s.length&&"access_unit_delimiter_rbsp"!==s[0].nalUnitType;)s.shift();if(0===s.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(i=it(s),(o=nt(i))[0][0].keyFrame||((n=this.getGopForFusion_(s[0],t))?(p=n.duration,o.unshift(n),o.byteLength+=n.byteLength,o.nalCount+=n.nalCount,o.pts=n.pts,o.dts=n.dts,o.duration+=n.duration):o=rt(o)),a.length){var f;if(!(f=e.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");wt(t),o=f}Ct(t,o),t.samples=st(o),h=Z(at(o)),t.baseMediaDecodeTime=kt(t,e.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(t){return{pts:t.pts,dts:t.dts,byteLength:t.byteLength}}))),c=o[0],d=o[o.length-1],this.trigger("segmentTimingInfo",Me(t.baseMediaDecodeTime,c.dts,c.pts,d.dts+d.duration,d.pts+d.duration,p)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:t.pps,sps:t.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),s=[],this.trigger("baseMediaDecodeTime",t.baseMediaDecodeTime),this.trigger("timelineStartInfo",t.timelineStartInfo),l=J(r,[t]),u=new Uint8Array(l.byteLength+h.byteLength),r++,u.set(l),u.set(h,l.byteLength),this.trigger("data",{track:t,boxes:u}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),s=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){wt(t),i=void 0,n=void 0},this.getGopForFusion_=function(e){var i,n,r,s,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)r=(s=this.gopCache_[a]).gop,t.pps&&Le(t.pps[0],s.pps[0])&&t.sps&&Le(t.sps[0],s.sps[0])&&(r.dts<t.timelineStartInfo.dts||(i=e.dts-r.dts-r.duration)>=-1e4&&i<=45e3&&(!n||o>i)&&(n=s,o=i));return n?n.gop:null},this.alignGopsAtStart_=function(t){var e,i,n,r,s,o,l,h;for(s=t.byteLength,o=t.nalCount,l=t.duration,e=i=0;e<a.length&&i<t.length&&(n=a[e],r=t[i],n.pts!==r.pts);)r.pts>n.pts?e++:(i++,s-=r.byteLength,o-=r.nalCount,l-=r.duration);return 0===i?t:i===t.length?null:((h=t.slice(i)).byteLength=s,h.duration=l,h.nalCount=o,h.pts=h[0].pts,h.dts=h[0].dts,h)},this.alignGopsAtEnd_=function(t){var e,i,n,r,s,o,l;for(e=a.length-1,i=t.length-1,s=null,o=!1;e>=0&&i>=0;){if(n=a[e],r=t[i],n.pts===r.pts){o=!0;break}n.pts>r.pts?e--:(e===a.length-1&&(s=i),i--)}if(!o&&null===s)return null;if(0===(l=o?i:s))return t;var h=t.slice(l),u=h.reduce((function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t}),{byteLength:0,duration:0,nalCount:0});return h.byteLength=u.byteLength,h.duration=u.duration,h.nalCount=u.nalCount,h.pts=h[0].pts,h.dts=h[0].dts,h},this.alignGopsWith=function(t){a=t}}).prototype=new z,(we=function(t,e){this.numberOfTracks=0,this.metadataStream=e,void 0!==(t=t||{}).remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,"boolean"==typeof t.keepOriginalTimestamps?this.keepOriginalTimestamps=t.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,we.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track,this.pendingBoxes.push(t.boxes)),void("audio"===t.track.type&&(this.audioTrack=t.track,this.pendingBoxes.unshift(t.boxes))))}}).prototype=new z,we.prototype.flush=function(t){var e,i,n,r,s=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==t&&"AudioSegmentStream"!==t)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,Ee.forEach((function(t){a.info[t]=this.videoTrack[t]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,Ce.forEach((function(t){a.info[t]=this.audioTrack[t]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,n=tt(this.pendingTracks),a.initSegment=new Uint8Array(n.byteLength),a.initSegment.set(n),a.data=new Uint8Array(this.pendingBytes),r=0;r<this.pendingBoxes.length;r++)a.data.set(this.pendingBoxes[r],s),s+=this.pendingBoxes[r].byteLength;for(r=0;r<this.pendingCaptions.length;r++)(e=this.pendingCaptions[r]).startTime=yt(e.startPts,o,this.keepOriginalTimestamps),e.endTime=yt(e.endPts,o,this.keepOriginalTimestamps),a.captionStreams[e.stream]=!0,a.captions.push(e);for(r=0;r<this.pendingMetadata.length;r++)(i=this.pendingMetadata[r]).cueTime=yt(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",a),r=0;r<a.captions.length;r++)e=a.captions[r],this.trigger("caption",e);for(r=0;r<a.metadata.length;r++)i=a.metadata[r],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},we.prototype.setRemux=function(t){this.remuxTracks=t},(Se=function(t){var e,i,n=this,r=!0;Se.prototype.init.call(this),t=t||{},this.baseMediaDecodeTime=t.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="aac",r.metadataStream=new oe.MetadataStream,r.aacStream=new ke,r.audioTimestampRolloverStream=new oe.TimestampRolloverStream("audio"),r.timedMetadataTimestampRolloverStream=new oe.TimestampRolloverStream("timed-metadata"),r.adtsStream=new pe,r.coalesceStream=new we(t,r.metadataStream),r.headOfPipeline=r.aacStream,r.aacStream.pipe(r.audioTimestampRolloverStream).pipe(r.adtsStream),r.aacStream.pipe(r.timedMetadataTimestampRolloverStream).pipe(r.metadataStream).pipe(r.coalesceStream),r.metadataStream.on("timestamp",(function(t){r.aacStream.setTimestamp(t.timeStamp)})),r.aacStream.on("data",(function(s){"timed-metadata"!==s.type&&"audio"!==s.type||r.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio"},r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new xe(i,t),r.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e}))})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var r={};this.transmuxPipeline_=r,r.type="ts",r.metadataStream=new oe.MetadataStream,r.packetStream=new oe.TransportPacketStream,r.parseStream=new oe.TransportParseStream,r.elementaryStream=new oe.ElementaryStream,r.timestampRolloverStream=new oe.TimestampRolloverStream,r.adtsStream=new pe,r.h264Stream=new Ae,r.captionStream=new oe.CaptionStream,r.coalesceStream=new we(t,r.metadataStream),r.headOfPipeline=r.packetStream,r.packetStream.pipe(r.parseStream).pipe(r.elementaryStream).pipe(r.timestampRolloverStream),r.timestampRolloverStream.pipe(r.h264Stream),r.timestampRolloverStream.pipe(r.adtsStream),r.timestampRolloverStream.pipe(r.metadataStream).pipe(r.coalesceStream),r.h264Stream.pipe(r.captionStream).pipe(r.coalesceStream),r.elementaryStream.on("data",(function(s){var a;if("metadata"===s.type){for(a=s.tracks.length;a--;)e||"video"!==s.tracks[a].type?i||"audio"!==s.tracks[a].type||((i=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(e=s.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;e&&!r.videoSegmentStream&&(r.coalesceStream.numberOfTracks++,r.videoSegmentStream=new Te(e,t),r.videoSegmentStream.on("timelineStartInfo",(function(e){i&&!t.keepOriginalTimestamps&&(i.timelineStartInfo=e,r.audioSegmentStream.setEarliestDts(e.dts-n.baseMediaDecodeTime))})),r.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),r.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),r.videoSegmentStream.on("baseMediaDecodeTime",(function(t){i&&r.audioSegmentStream.setVideoBaseMediaDecodeTime(t)})),r.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),r.h264Stream.pipe(r.videoSegmentStream).pipe(r.coalesceStream)),i&&!r.audioSegmentStream&&(r.coalesceStream.numberOfTracks++,r.audioSegmentStream=new xe(i,t),r.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),r.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),r.adtsStream.pipe(r.audioSegmentStream).pipe(r.coalesceStream)),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!e})}})),r.coalesceStream.on("data",this.trigger.bind(this,"data")),r.coalesceStream.on("id3Frame",(function(t){t.dispatchType=r.metadataStream.dispatchType,n.trigger("id3Frame",t)})),r.coalesceStream.on("caption",this.trigger.bind(this,"caption")),r.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(n){var r=this.transmuxPipeline_;t.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,wt(i),r.audioTimestampRolloverStream&&r.audioTimestampRolloverStream.discontinuity()),e&&(r.videoSegmentStream&&(r.videoSegmentStream.gopCache_=[]),e.timelineStartInfo.dts=void 0,e.timelineStartInfo.pts=void 0,wt(e),r.captionStream.reset()),r.timestampRolloverStream&&r.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.setRemux=function(e){var i=this.transmuxPipeline_;t.remux=e,i&&i.coalesceStream&&i.coalesceStream.setRemux(e)},this.alignGopsWith=function(t){e&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(r){var e=Pe(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),r=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){r=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new z;var Ie={Transmuxer:Se,VideoSegmentStream:Te,AudioSegmentStream:xe,AUDIO_PROPERTIES:Ce,VIDEO_PROPERTIES:Ee,generateSegmentTimingInfo:Me},De={Adts:pe,h264:me},Re=pt,Ne=function t(e,i){var n=[],r=0,s=0,a=0,o=1/0,l=null,h=null;i=i||{},t.prototype.init.call(this),this.push=function(t){Ct(e,t),e&&Ce.forEach((function(i){e[i]=t[i]})),n.push(t)},this.setEarliestDts=function(t){s=t},this.setVideoBaseMediaDecodeTime=function(t){o=t},this.setAudioAppendStart=function(t){a=t},this.processFrames_=function(){var t,u,c,d,p;0!==n.length&&0!==(t=_t(n,e,s)).length&&(e.baseMediaDecodeTime=kt(e,i.keepOriginalTimestamps),bt(e,t,a,o),e.samples=Tt(t),c=Z(xt(t)),n=[],u=J(r,[e]),r++,e.initSegment=tt([e]),(d=new Uint8Array(u.byteLength+c.byteLength)).set(u),d.set(c,u.byteLength),wt(e),null===l&&(h=l=t[0].pts),h+=t.length*(1024*Re/e.samplerate),p={start:l},this.trigger("timingInfo",p),this.trigger("data",{track:e,boxes:d}))},this.flush=function(){this.processFrames_(),this.trigger("timingInfo",{start:l,end:h}),this.resetTiming_(),this.trigger("done","AudioSegmentStream")},this.partialFlush=function(){this.processFrames_(),this.trigger("partialdone","AudioSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","AudioSegmentStream")},this.resetTiming_=function(){wt(e),l=null,h=null},this.reset=function(){this.resetTiming_(),n=[],this.trigger("reset")}};Ne.prototype=new z;var Be=Ne,je=function t(e,i){var n,r,s,a=0,o=[],l=[],h=null,u=null,c=!0;i=i||{},t.prototype.init.call(this),this.push=function(t){Ct(e,t),void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],Ee.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||r||(r=t.data,e.pps=[t.data]),o.push(t)},this.processNals_=function(t){var n;for(o=l.concat(o);o.length&&"access_unit_delimiter_rbsp"!==o[0].nalUnitType;)o.shift();if(0!==o.length){var r=it(o);if(r.length)if(l=r[r.length-1],t&&(r.pop(),r.duration-=l.duration,r.nalCount-=l.length,r.byteLength-=l.byteLength),r.length){if(this.trigger("timelineStartInfo",e.timelineStartInfo),c){if(!(s=nt(r))[0][0].keyFrame){if(!(s=rt(s))[0][0].keyFrame)return o=[].concat.apply([],r).concat(l),void(l=[]);(r=[].concat.apply([],s)).duration=s.duration}c=!1}for(null===h&&(h=r[0].pts,u=h),u+=r.duration,this.trigger("timingInfo",{start:h,end:u}),n=0;n<r.length;n++){var d=r[n];e.samples=ot(d);var p=Z(lt(d));wt(e),Ct(e,d),e.baseMediaDecodeTime=kt(e,i.keepOriginalTimestamps);var f=J(a,[e]);a++,e.initSegment=tt([e]);var g=new Uint8Array(f.byteLength+p.byteLength);g.set(f),g.set(p,f.byteLength),this.trigger("data",{track:e,boxes:g,sequence:a,videoFrameDts:d.dts,videoFramePts:d.pts})}o=[]}else o=[]}},this.resetTimingAndConfig_=function(){n=void 0,r=void 0,h=null,u=null},this.partialFlush=function(){this.processNals_(!0),this.trigger("partialdone","VideoSegmentStream")},this.flush=function(){this.processNals_(!1),this.resetTimingAndConfig_(),this.trigger("done","VideoSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","VideoSegmentStream")},this.reset=function(){this.resetTimingAndConfig_(),l=[],o=[],c=!0,this.trigger("reset")}};je.prototype=new z;var Ue=je,Fe=ye,We=function(t){return t.prototype=new z,t.prototype.init.call(t),t},ze=function(t,e){t.on("data",e.trigger.bind(e,"data")),t.on("done",e.trigger.bind(e,"done")),t.on("partialdone",e.trigger.bind(e,"partialdone")),t.on("endedtimeline",e.trigger.bind(e,"endedtimeline")),t.on("audioTimingInfo",e.trigger.bind(e,"audioTimingInfo")),t.on("videoTimingInfo",e.trigger.bind(e,"videoTimingInfo")),t.on("trackinfo",e.trigger.bind(e,"trackinfo")),t.on("id3Frame",(function(i){i.dispatchType=t.metadataStream.dispatchType,i.cueTime=gt(i.pts),e.trigger("id3Frame",i)})),t.on("caption",(function(t){e.trigger("caption",t)}))},He=function t(e){var i=null,n=!0;e=e||{},t.prototype.init.call(this),e.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.push=function(t){if(n){var r=Fe(t);!r||i&&"aac"===i.type?r||i&&"ts"===i.type||(i=function(t){var e={type:"ts",tracks:{audio:null,video:null},packet:new oe.TransportPacketStream,parse:new oe.TransportParseStream,elementary:new oe.ElementaryStream,timestampRollover:new oe.TimestampRolloverStream,adts:new De.Adts,h264:new De.h264.H264Stream,captionStream:new oe.CaptionStream,metadataStream:new oe.MetadataStream};return e.headOfPipeline=e.packet,e.packet.pipe(e.parse).pipe(e.elementary).pipe(e.timestampRollover),e.timestampRollover.pipe(e.h264),e.h264.pipe(e.captionStream),e.timestampRollover.pipe(e.metadataStream),e.timestampRollover.pipe(e.adts),e.elementary.on("data",(function(i){if("metadata"===i.type){for(var n=0;n<i.tracks.length;n++)e.tracks[i.tracks[n].type]||(e.tracks[i.tracks[n].type]=i.tracks[n],e.tracks[i.tracks[n].type].timelineStartInfo.baseMediaDecodeTime=t.baseMediaDecodeTime);e.tracks.video&&!e.videoSegmentStream&&(e.videoSegmentStream=new Ue(e.tracks.video,t),e.videoSegmentStream.on("timelineStartInfo",(function(i){e.tracks.audio&&!t.keepOriginalTimestamps&&e.audioSegmentStream.setEarliestDts(i.dts-t.baseMediaDecodeTime)})),e.videoSegmentStream.on("timingInfo",e.trigger.bind(e,"videoTimingInfo")),e.videoSegmentStream.on("data",(function(t){e.trigger("data",{type:"video",data:t})})),e.videoSegmentStream.on("done",e.trigger.bind(e,"done")),e.videoSegmentStream.on("partialdone",e.trigger.bind(e,"partialdone")),e.videoSegmentStream.on("endedtimeline",e.trigger.bind(e,"endedtimeline")),e.h264.pipe(e.videoSegmentStream)),e.tracks.audio&&!e.audioSegmentStream&&(e.audioSegmentStream=new Be(e.tracks.audio,t),e.audioSegmentStream.on("data",(function(t){e.trigger("data",{type:"audio",data:t})})),e.audioSegmentStream.on("done",e.trigger.bind(e,"done")),e.audioSegmentStream.on("partialdone",e.trigger.bind(e,"partialdone")),e.audioSegmentStream.on("endedtimeline",e.trigger.bind(e,"endedtimeline")),e.audioSegmentStream.on("timingInfo",e.trigger.bind(e,"audioTimingInfo")),e.adts.pipe(e.audioSegmentStream)),e.trigger("trackinfo",{hasAudio:!!e.tracks.audio,hasVideo:!!e.tracks.video})}})),e.captionStream.on("data",(function(i){var n;n=e.tracks.video&&e.tracks.video.timelineStartInfo.pts||0,i.startTime=yt(i.startPts,n,t.keepOriginalTimestamps),i.endTime=yt(i.endPts,n,t.keepOriginalTimestamps),e.trigger("caption",i)})),(e=We(e)).metadataStream.on("data",e.trigger.bind(e,"id3Frame")),e}(e),ze(i,this)):(i=function(t){var e={type:"aac",tracks:{audio:null},metadataStream:new oe.MetadataStream,aacStream:new ke,audioRollover:new oe.TimestampRolloverStream("audio"),timedMetadataRollover:new oe.TimestampRolloverStream("timed-metadata"),adtsStream:new pe(!0)};return e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioRollover).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataRollover).pipe(e.metadataStream),e.metadataStream.on("timestamp",(function(t){e.aacStream.setTimestamp(t.timeStamp)})),e.aacStream.on("data",(function(i){"timed-metadata"!==i.type&&"audio"!==i.type||e.audioSegmentStream||(e.tracks.audio=e.tracks.audio||{timelineStartInfo:{baseMediaDecodeTime:t.baseMediaDecodeTime},codec:"adts",type:"audio"},e.audioSegmentStream=new Be(e.tracks.audio,t),e.audioSegmentStream.on("data",(function(t){e.trigger("data",{type:"audio",data:t})})),e.audioSegmentStream.on("partialdone",e.trigger.bind(e,"partialdone")),e.audioSegmentStream.on("done",e.trigger.bind(e,"done")),e.audioSegmentStream.on("endedtimeline",e.trigger.bind(e,"endedtimeline")),e.audioSegmentStream.on("timingInfo",e.trigger.bind(e,"audioTimingInfo")),e.adtsStream.pipe(e.audioSegmentStream),e.trigger("trackinfo",{hasAudio:!!e.tracks.audio,hasVideo:!!e.tracks.video}))})),(e=We(e)).metadataStream.on("data",e.trigger.bind(e,"id3Frame")),e}(e),ze(i,this)),n=!1}i.headOfPipeline.push(t)},this.flush=function(){i&&(n=!0,i.headOfPipeline.flush())},this.partialFlush=function(){i&&i.headOfPipeline.partialFlush()},this.endTimeline=function(){i&&i.headOfPipeline.endTimeline()},this.reset=function(){i&&i.headOfPipeline.reset()},this.setBaseMediaDecodeTime=function(t){e.keepOriginalTimestamps||(e.baseMediaDecodeTime=t),i&&(i.tracks.audio&&(i.tracks.audio.timelineStartInfo.dts=void 0,i.tracks.audio.timelineStartInfo.pts=void 0,wt(i.tracks.audio),i.audioRollover&&i.audioRollover.discontinuity()),i.tracks.video&&(i.videoSegmentStream&&(i.videoSegmentStream.gopCache_=[]),i.tracks.video.timelineStartInfo.dts=void 0,i.tracks.video.timelineStartInfo.pts=void 0,wt(i.tracks.video)),i.timestampRollover&&i.timestampRollover.discontinuity())},this.setRemux=function(t){e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.setAudioAppendStart=function(t){i&&i.tracks.audio&&i.audioSegmentStream&&i.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){}};He.prototype=new z;var Ve=He,Ge=function(t){return t>>>0},Xe=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])},qe=Ge,Ye=function t(e,i){var n,r,s,a,o,l=[];if(!i.length)return null;for(n=0;n<e.byteLength;)r=qe(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),s=Xe(e.subarray(n+4,n+8)),a=r>1?n+r:e.byteLength,s===i[0]&&(1===i.length?l.push(e.subarray(n+8,a)):(o=t(e.subarray(n+8,a),i.slice(1))).length&&(l=l.concat(o))),n=a;return l},Ke=Ge,$e=function(t){var e={version:t[0],flags:new Uint8Array(t.subarray(1,4)),baseMediaDecodeTime:Ke(t[4]<<24|t[5]<<16|t[6]<<8|t[7])};return 1===e.version&&(e.baseMediaDecodeTime*=Math.pow(2,32),e.baseMediaDecodeTime+=Ke(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),e},Qe=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}},Ze=function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=1&i.flags[2],s=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],h=8&i.flags[1],u=n.getUint32(4),c=8;for(r&&(i.dataOffset=n.getInt32(c),c+=4),s&&u&&(e={flags:Qe(t.subarray(c,c+4))},c+=4,a&&(e.duration=n.getUint32(c),c+=4),o&&(e.size=n.getUint32(c),c+=4),h&&(1===i.version?e.compositionTimeOffset=n.getInt32(c):e.compositionTimeOffset=n.getUint32(c),c+=4),i.samples.push(e),u--);u--;)e={},a&&(e.duration=n.getUint32(c),c+=4),o&&(e.size=n.getUint32(c),c+=4),l&&(e.flags=Qe(t.subarray(c,c+4)),c+=4),h&&(1===i.version?e.compositionTimeOffset=n.getInt32(c):e.compositionTimeOffset=n.getUint32(c),c+=4),i.samples.push(e);return i},Je=function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),trackId:i.getUint32(4)},r=1&n.flags[2],s=2&n.flags[2],a=8&n.flags[2],o=16&n.flags[2],l=32&n.flags[2],h=65536&n.flags[0],u=131072&n.flags[0];return e=8,r&&(e+=4,n.baseDataOffset=i.getUint32(12),e+=4),s&&(n.sampleDescriptionIndex=i.getUint32(e),e+=4),a&&(n.defaultSampleDuration=i.getUint32(e),e+=4),o&&(n.defaultSampleSize=i.getUint32(e),e+=4),l&&(n.defaultSampleFlags=i.getUint32(e)),h&&(n.durationIsEmpty=!0),!r&&u&&(n.baseDataOffsetIsMoof=!0),n},ti=Ot,ei=Ht.CaptionStream,ii=function(t,e){for(var i=t,n=0;n<e.length;n++){var r=e[n];if(i<r.size)return r;i-=r.size}return null},ni=function(t,e){var i=Ye(t,["moof","traf"]),n=Ye(t,["mdat"]),r={},s=[];return n.forEach((function(t,e){var n=i[e];s.push({mdat:t,traf:n})})),s.forEach((function(t){var i,n=t.mdat,s=t.traf,a=Ye(s,["tfhd"]),o=Je(a[0]),l=o.trackId,h=Ye(s,["tfdt"]),u=h.length>0?$e(h[0]).baseMediaDecodeTime:0,c=Ye(s,["trun"]);e===l&&c.length>0&&(i=function(t,e,i){var n,r,s,a,o=new DataView(t.buffer,t.byteOffset,t.byteLength),l=[];for(r=0;r+4<t.length;r+=s)if(s=o.getUint32(r),r+=4,!(s<=0))switch(31&t[r]){case 6:var h=t.subarray(r+1,r+1+s),u=ii(r,e);if(n={nalUnitType:"sei_rbsp",size:s,data:h,escapedRBSP:ti(h),trackId:i},u)n.pts=u.pts,n.dts=u.dts,a=u;else{if(!a){console.log("We've encountered a nal unit without data. See mux.js#233.");break}n.pts=a.pts,n.dts=a.dts}l.push(n)}return l}(n,function(t,e,i){var n=e,r=i.defaultSampleDuration||0,s=i.defaultSampleSize||0,a=i.trackId,o=[];return t.forEach((function(t){var e=Ze(t).samples;e.forEach((function(t){void 0===t.duration&&(t.duration=r),void 0===t.size&&(t.size=s),t.trackId=a,t.dts=n,void 0===t.compositionTimeOffset&&(t.compositionTimeOffset=0),t.pts=n+t.compositionTimeOffset,n+=t.duration})),o=o.concat(e)})),o}(c,u,o),l),r[l]||(r[l]=[]),r[l]=r[l].concat(i))})),r},ri=function(){var t,e,i,n,r,s,a=!1;this.isInitialized=function(){return a},this.init=function(e){t=new ei,a=!0,s=!!e&&e.isPartial,t.on("data",(function(t){t.startTime=t.startPts/n,t.endTime=t.endPts/n,r.captions.push(t),r.captionStreams[t.stream]=!0}))},this.isNewInit=function(t,e){return!(t&&0===t.length||e&&"object"==typeof e&&0===Object.keys(e).length)&&(i!==t[0]||n!==e[i])},this.parse=function(t,s,a){var o;if(!this.isInitialized())return null;if(!s||!a)return null;if(this.isNewInit(s,a))i=s[0],n=a[i];else if(null===i||!n)return e.push(t),null;for(;e.length>0;){var l=e.shift();this.parse(l,s,a)}return null!==(o=function(t,e,i){return null===e?null:{seiNals:ni(t,e)[e],timescale:i}}(t,i,n))&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),r):null},this.pushNals=function(e){if(!this.isInitialized()||!e||0===e.length)return null;e.forEach((function(e){t.push(e)}))},this.flushStream=function(){if(!this.isInitialized())return null;s?t.partialFlush():t.flush()},this.clearParsedCaptions=function(){r.captions=[],r.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;t.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){e=[],i=null,n=null,r?this.clearParsedCaptions():r={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},si=function(t){return"AudioSegmentStream"===t?"audio":"VideoSegmentStream"===t?"video":""},ai=function(){function t(t,e){this.options=e||{},this.self=t,this.init()}var e=t.prototype;return e.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=this.options.handlePartialData?new Ve(this.options):new Ie.Transmuxer(this.options),this.options.handlePartialData?function(t,e){e.on("data",(function(e){var i={data:e.data.track.initSegment.buffer,byteOffset:e.data.track.initSegment.byteOffset,byteLength:e.data.track.initSegment.byteLength},n={boxes:{data:e.data.boxes.buffer,byteOffset:e.data.boxes.byteOffset,byteLength:e.data.boxes.byteLength},initSegment:i,type:e.type,sequence:e.data.sequence};void 0!==e.data.videoFrameDts&&(n.videoFrameDtsTime=gt(e.data.videoFrameDts)),void 0!==e.data.videoFramePts&&(n.videoFramePtsTime=gt(e.data.videoFramePts)),t.postMessage({action:"data",segment:n},[n.boxes.data,n.initSegment.data])})),e.on("id3Frame",(function(e){t.postMessage({action:"id3Frame",id3Frame:e})})),e.on("caption",(function(e){t.postMessage({action:"caption",caption:e})})),e.on("done",(function(e){t.postMessage({action:"done",type:si(e)})})),e.on("partialdone",(function(e){t.postMessage({action:"partialdone",type:si(e)})})),e.on("endedsegment",(function(e){t.postMessage({action:"endedSegment",type:si(e)})})),e.on("trackinfo",(function(e){t.postMessage({action:"trackinfo",trackInfo:e})})),e.on("audioTimingInfo",(function(e){if(null!==e.start){var i={start:gt(e.start)};e.end&&(i.end=gt(e.end)),t.postMessage({action:"audioTimingInfo",audioTimingInfo:i})}else t.postMessage({action:"audioTimingInfo",audioTimingInfo:e})})),e.on("videoTimingInfo",(function(e){var i={start:gt(e.start)};e.end&&(i.end=gt(e.end)),t.postMessage({action:"videoTimingInfo",videoTimingInfo:i})}))}(this.self,this.transmuxer):function(t,e){e.on("data",(function(e){var i=e.initSegment;e.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};var n=e.data;e.data=n.buffer,t.postMessage({action:"data",segment:e,byteOffset:n.byteOffset,byteLength:n.byteLength},[e.data])})),e.on("done",(function(e){t.postMessage({action:"done"})})),e.on("gopInfo",(function(e){t.postMessage({action:"gopInfo",gopInfo:e})})),e.on("videoSegmentTimingInfo",(function(e){var i={start:{decode:gt(e.start.dts),presentation:gt(e.start.pts)},end:{decode:gt(e.end.dts),presentation:gt(e.end.pts)},baseMediaDecodeTime:gt(e.baseMediaDecodeTime)};e.prependedContentDuration&&(i.prependedContentDuration=gt(e.prependedContentDuration)),t.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})})),e.on("audioSegmentTimingInfo",(function(e){var i={start:{decode:gt(e.start.dts),presentation:gt(e.start.pts)},end:{decode:gt(e.end.dts),presentation:gt(e.end.pts)},baseMediaDecodeTime:gt(e.baseMediaDecodeTime)};e.prependedContentDuration&&(i.prependedContentDuration=gt(e.prependedContentDuration)),t.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})})),e.on("id3Frame",(function(e){t.postMessage({action:"id3Frame",id3Frame:e})})),e.on("caption",(function(e){t.postMessage({action:"caption",caption:e})})),e.on("trackinfo",(function(e){t.postMessage({action:"trackinfo",trackInfo:e})})),e.on("audioTimingInfo",(function(e){t.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:gt(e.start),end:gt(e.end)}})})),e.on("videoTimingInfo",(function(e){t.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:gt(e.start),end:gt(e.end)}})}))}(this.self,this.transmuxer)},e.pushMp4Captions=function(t){this.captionParser||(this.captionParser=new ri,this.captionParser.init());var e=new Uint8Array(t.data,t.byteOffset,t.byteLength),i=this.captionParser.parse(e,t.trackIds,t.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],data:e.buffer},[e.buffer])},e.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},e.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},e.push=function(t){var e=new Uint8Array(t.data,t.byteOffset,t.byteLength);this.transmuxer.push(e)},e.reset=function(){this.transmuxer.reset()},e.setTimestampOffset=function(t){var e=t.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(ft(e)))},e.setAudioAppendStart=function(t){this.transmuxer.setAudioAppendStart(Math.ceil(ft(t.appendStart)))},e.setRemux=function(t){this.transmuxer.setRemux(t.remux)},e.flush=function(t){this.transmuxer.flush(),i.postMessage({action:"done",type:"transmuxed"})},e.partialFlush=function(t){this.transmuxer.partialFlush(),i.postMessage({action:"partialdone",type:"transmuxed"})},e.endTimeline=function(){this.transmuxer.endTimeline(),i.postMessage({action:"endedtimeline",type:"transmuxed"})},e.alignGopsWith=function(t){this.transmuxer.alignGopsWith(t.gopsToAlignWith.slice())},t}();new function(t){t.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new ai(t,e.data.options):(this.messageHandlers||(this.messageHandlers=new ai(t)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}(i)}()})),_o=function(t,e){var i=e.attributes||{};return t&&t.mediaGroups&&t.mediaGroups.AUDIO&&i.AUDIO&&t.mediaGroups.AUDIO[i.AUDIO]},To=function(t,e){var i=e.attributes||{},n=function(t){var e=t.attributes||{};if(e.CODECS)return Object(Nt.parseCodecs)(e.CODECS)}(e)||{};if(_o(t,e)&&!n.audio&&!function(t,e){if(!_o(t,e))return!0;var i=e.attributes||{},n=t.mediaGroups.AUDIO[i.AUDIO];for(var r in n)if(!n[r].uri&&!n[r].playlists)return!0;return!1}(t,e)){var r=Object(Nt.codecsFromDefault)(t,i.AUDIO);r&&(n.audio=r.audio)}var s={};return n.video&&(s.video=Object(Nt.translateLegacyCodec)(""+n.video.type+n.video.details)),n.audio&&(s.audio=Object(Nt.translateLegacyCodec)(""+n.audio.type+n.audio.details)),n.text&&(s.text=n.text.type),n.unknown&&(s.unknown=n.unknown),s},xo=function(t){return Us.log.debug?Us.log.debug.bind(Us,"VHS:",t+" >"):function(){}},So=xo("PlaylistSelector"),wo=function(t){if(t&&t.playlist){var e=t.playlist;return JSON.stringify({id:e.id,bandwidth:t.bandwidth,width:t.width,height:t.height,codecs:e.attributes&&e.attributes.CODECS||""})}},ko=function(t,e){if(!t)return"";var i=r.a.getComputedStyle(t);return i?i[e]:""},Co=function(t,e){var i=t.slice();t.sort((function(t,n){var r=e(t,n);return 0===r?i.indexOf(t)-i.indexOf(n):r}))},Eo=function(t,e){var i,n;return t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),i=i||r.a.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),i-(n=n||r.a.Number.MAX_VALUE)},Ao=function(t,e,i,n,s){if(t){var a={bandwidth:e,width:i,height:n,limitRenditionByPlayerDimensions:s},o=t.playlists.map((function(t){var e=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width,i=t.attributes.RESOLUTION&&t.attributes.RESOLUTION.height;return{bandwidth:t.attributes.BANDWIDTH||r.a.Number.MAX_VALUE,width:e,height:i,playlist:t}}));Co(o,(function(t,e){return t.bandwidth-e.bandwidth}));var l=(o=o.filter((function(t){return!ba.isIncompatible(t.playlist)}))).filter((function(t){return ba.isEnabled(t.playlist)}));l.length||(l=o.filter((function(t){return!ba.isDisabled(t.playlist)})));var h=l.filter((function(t){return t.bandwidth*Wa.BANDWIDTH_VARIANCE<e})),u=h[h.length-1],c=h.filter((function(t){return t.bandwidth===u.bandwidth}))[0];if(!1===s){var d=c||l[0]||o[0];if(d&&d.playlist){var p="sortedPlaylistReps";return c&&(p="bandwidthBestRep"),l[0]&&(p="enabledPlaylistReps"),So("choosing "+wo(d)+" using "+p+" with options",a),d.playlist}return So("could not choose a playlist with options",a),null}var f=h.filter((function(t){return t.width&&t.height}));Co(f,(function(t,e){return t.width-e.width}));var g=f.filter((function(t){return t.width===i&&t.height===n}));u=g[g.length-1];var m,v,y,b=g.filter((function(t){return t.bandwidth===u.bandwidth}))[0];b||(v=(m=f.filter((function(t){return t.width>i||t.height>n}))).filter((function(t){return t.width===m[0].width&&t.height===m[0].height})),u=v[v.length-1],y=v.filter((function(t){return t.bandwidth===u.bandwidth}))[0]);var _=y||b||c||l[0]||o[0];if(_&&_.playlist){var T="sortedPlaylistReps";return y?T="resolutionPlusOneRep":b?T="resolutionBestRep":c?T="bandwidthBestRep":l[0]&&(T="enabledPlaylistReps"),So("choosing "+wo(_)+" using "+T+" with options",a),_.playlist}return So("could not choose a playlist with options",a),null}},Po=function(){var t=this.useDevicePixelRatio&&r.a.devicePixelRatio||1;return Ao(this.playlists.master,this.systemBandwidth,parseInt(ko(this.tech_.el(),"width"),10)*t,parseInt(ko(this.tech_.el(),"height"),10)*t,this.limitRenditionByPlayerDimensions)},Oo=function(t){var e=t.inbandTextTracks,i=t.metadataArray,n=t.timestampOffset,s=t.videoDuration;if(i){var a=r.a.WebKitDataCue||r.a.VTTCue,o=e.metadataTrack_;if(o&&(i.forEach((function(t){var e=t.cueTime+n;!("number"!=typeof e||r.a.isNaN(e)||e<0)&&e<1/0&&t.frames.forEach((function(t){var i=new a(e,e,t.value||t.url||t.data||"");i.frame=t,i.value=t,function(t){Object.defineProperties(t.frame,{id:{get:function(){return Us.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return Us.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return Us.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}})}(i),o.addCue(i)}))})),o.cues&&o.cues.length)){for(var l=o.cues,h=[],u=0;u<l.length;u++)l[u]&&h.push(l[u]);var c=h.reduce((function(t,e){var i=t[e.startTime]||[];return i.push(e),t[e.startTime]=i,t}),{}),d=Object.keys(c).sort((function(t,e){return Number(t)-Number(e)}));d.forEach((function(t,e){var i=c[t],n=Number(d[e+1])||s;i.forEach((function(t){t.endTime=n}))}))}}},Lo=function(t,e,i){var n,r;if(i&&i.cues)for(n=i.cues.length;n--;)(r=i.cues[n]).startTime>=t&&r.endTime<=e&&i.removeCue(r)},Mo=function(t){return"number"==typeof t&&isFinite(t)},Io=function(t){return t+"TimingInfo"},Do=function(t){var e=t.segmentTimeline,i=t.currentTimeline,n=t.startOfSegment,r=t.buffered;return t.overrideCheck||e!==i?e<i?n:r.length?r.end(r.length-1):n:null},Ro=function(t){var e=t.timelineChangeController,i=t.currentTimeline,n=t.segmentTimeline,r=t.loaderType,s=t.audioDisabled;if(i===n)return!1;if("audio"===r){var a=e.lastTimelineChange({type:"main"});return!a||a.to!==n}if("main"===r&&s){var o=e.pendingTimelineChange({type:"audio"});return!o||o.to!==n}return!1},No=function(t){var e=t.segmentDuration,i=t.maxDuration;return!!e&&Math.round(e)>i+1/30},Bo=function(t,e){if("hls"!==e)return null;var i,n,r,s,a=(i=t.audioTimingInfo,n=t.videoTimingInfo,r=i&&"number"==typeof i.start&&"number"==typeof i.end?i.end-i.start:0,s=n&&"number"==typeof n.start&&"number"==typeof n.end?n.end-n.start:0,Math.max(r,s));if(!a)return null;var o=t.playlist.targetDuration,l=No({segmentDuration:a,maxDuration:2*o}),h=No({segmentDuration:a,maxDuration:o}),u="Segment with index "+t.mediaIndex+" from playlist "+t.playlist.id+" has a duration of "+a+" when the reported duration is "+t.duration+" and the target duration is "+o+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return l||h?{severity:l?"warn":"info",message:u}:null},jo=function(t){function e(e,i){var n;if(n=t.call(this)||this,!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");return n.bandwidth=e.bandwidth,n.throughput={rate:0,count:0},n.roundTrip=NaN,n.resetStats_(),n.mediaIndex=null,n.hasPlayed_=e.hasPlayed,n.currentTime_=e.currentTime,n.seekable_=e.seekable,n.seeking_=e.seeking,n.duration_=e.duration,n.mediaSource_=e.mediaSource,n.vhs_=e.vhs,n.loaderType_=e.loaderType,n.currentMediaInfo_=void 0,n.startingMediaInfo_=void 0,n.segmentMetadataTrack_=e.segmentMetadataTrack,n.goalBufferLength_=e.goalBufferLength,n.sourceType_=e.sourceType,n.sourceUpdater_=e.sourceUpdater,n.inbandTextTracks_=e.inbandTextTracks,n.state_="INIT",n.handlePartialData_=e.handlePartialData,n.timelineChangeController_=e.timelineChangeController,n.shouldSaveSegmentTimingInfo_=!0,n.checkBufferTimeout_=null,n.error_=void 0,n.currentTimeline_=-1,n.pendingSegment_=null,n.xhrOptions_=null,n.pendingSegments_=[],n.audioDisabled_=!1,n.isPendingTimestampOffset_=!1,n.gopBuffer_=[],n.timeMapping_=0,n.safeAppend_=Us.browser.IE_VERSION>=11,n.appendInitSegment_={audio:!0,video:!0},n.playlistOfLastInitSegment_={audio:null,video:null},n.callQueue_=[],n.loadQueue_=[],n.metadataQueue_={id3:[],caption:[]},n.activeInitSegmentId_=null,n.initSegments_={},n.cacheEncryptionKeys_=e.cacheEncryptionKeys,n.keyCache_={},n.decrypter_=e.decrypter,n.syncController_=e.syncController,n.syncPoint_={segmentIndex:0,time:0},n.transmuxer_=n.createTransmuxer_(),n.triggerSyncInfoUpdate_=function(){return n.trigger("syncinfoupdate")},n.syncController_.on("syncinfoupdate",n.triggerSyncInfoUpdate_),n.mediaSource_.addEventListener("sourceopen",(function(){n.isEndOfStream_()||(n.ended_=!1)})),n.fetchAtBuffer_=!1,n.logger_=xo("SegmentLoader["+n.loaderType_+"]"),Object.defineProperty(u()(n),"state",{get:function(){return this.state_},set:function(t){t!==this.state_&&(this.logger_(this.state_+" -> "+t),this.state_=t,this.trigger("statechange"))}}),n.sourceUpdater_.on("ready",(function(){n.hasEnoughInfoToAppend_()&&n.processCallQueue_()})),"main"===n.loaderType_&&n.timelineChangeController_.on("pendingtimelinechange",(function(){n.hasEnoughInfoToAppend_()&&n.processCallQueue_()})),"audio"===n.loaderType_&&n.timelineChangeController_.on("timelinechange",(function(){n.hasEnoughInfoToLoad_()&&n.processLoadQueue_(),n.hasEnoughInfoToAppend_()&&n.processCallQueue_()})),n}d()(e,t);var i=e.prototype;return i.createTransmuxer_=function(){var t=new bo;return t.postMessage({action:"init",options:{remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,handlePartialData:this.handlePartialData_}}),t},i.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},i.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&(this.transmuxer_.terminate(),$a()),this.resetStats_(),this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},i.setAudio=function(t){this.audioDisabled_=!t,t?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},i.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},i.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_)},i.checkForAbort_=function(t){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==t:(this.state="READY",!0)},i.error=function(t){return void 0!==t&&(this.logger_("error occurred:",t),this.error_=t),this.pendingSegment_=null,this.error_},i.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Ka(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},i.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return Us.createTimeRanges();if("main"===this.loaderType_){var t=this.startingMediaInfo_,e=t.hasAudio,i=t.hasVideo,n=t.isMuxed;if(i&&e&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},i.initSegmentForMap=function(t,e){if(void 0===e&&(e=!1),!t)return null;var i=Pa(t),n=this.initSegments_[i];return e&&!n&&t.bytes&&(this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:t.bytes,tracks:t.tracks,timescales:t.timescales}),n||t},i.segmentKey=function(t,e){if(void 0===e&&(e=!1),!t)return null;var i=Oa(t),n=this.keyCache_[i];this.cacheEncryptionKeys_&&e&&!n&&t.bytes&&(this.keyCache_[i]=n={resolvedUri:t.resolvedUri,bytes:t.bytes});var r={resolvedUri:(n||t).resolvedUri};return n&&(r.bytes=n.bytes),r},i.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},i.load=function(){if(this.monitorBuffer_(),this.playlist_){if(this.syncController_.setDateTimeMapping(this.playlist_),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.playlist=function(t,e){if(void 0===e&&(e={}),t){var i=this.playlist_,n=this.pendingSegment_;this.playlist_=t,this.xhrOptions_=e,"INIT"===this.state&&(t.syncInfo={mediaSequence:t.mediaSequence,time:0});var r=null;if(i&&(i.id?r=i.id:i.uri&&(r=i.uri)),this.logger_("playlist update ["+r+" => "+(t.id||t.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==t.uri)return(null!==this.mediaIndex||this.handlePartialData_)&&this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");var s=t.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+s+"]"),null!==this.mediaIndex&&(this.mediaIndex-=s),n&&(n.mediaIndex-=s,n.mediaIndex>=0&&(n.segment=t.segments[n.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,t)}},i.pause=function(){this.checkBufferTimeout_&&(r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},i.paused=function(){return null===this.checkBufferTimeout_},i.resetEverything=function(t){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,t),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"})},i.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},i.resyncLoader=function(){this.transmuxer_&&Ka(this.transmuxer_),this.mediaIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},i.remove=function(t,e,i){if(void 0===i&&(i=function(){}),e===1/0&&(e=this.duration_()),this.sourceUpdater_&&this.currentMediaInfo_){var n=1,r=function(){0===--n&&i()};for(var s in this.audioDisabled_||(n++,this.sourceUpdater_.removeAudio(t,e,r)),"main"===this.loaderType_&&this.currentMediaInfo_&&this.currentMediaInfo_.hasVideo&&(this.gopBuffer_=function(t,e,i,n){for(var r=Math.ceil((e-n)*It.ONE_SECOND_IN_TS),s=Math.ceil((i-n)*It.ONE_SECOND_IN_TS),a=t.slice(),o=t.length;o--&&!(t[o].pts<=s););if(-1===o)return a;for(var l=o+1;l--&&!(t[l].pts<=r););return l=Math.max(l,0),a.splice(l,o-l+1),a}(this.gopBuffer_,t,e,this.timeMapping_),n++,this.sourceUpdater_.removeVideo(t,e,r)),this.inbandTextTracks_)Lo(t,e,this.inbandTextTracks_[s]);Lo(t,e,this.segmentMetadataTrack_),r()}},i.monitorBuffer_=function(){this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r.a.setTimeout(this.monitorBufferTick_.bind(this),1)},i.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&r.a.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=r.a.setTimeout(this.monitorBufferTick_.bind(this),500)},i.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.buffered_(),e=this.checkBuffer_(t,this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);e&&(e.timestampOffset=Do({segmentTimeline:e.timeline,currentTimeline:this.currentTimeline_,startOfSegment:e.startOfSegment,buffered:t,overrideCheck:this.isPendingTimestampOffset_}),this.isPendingTimestampOffset_=!1,"number"==typeof e.timestampOffset&&this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loadSegment_(e))}},i.isEndOfStream_=function(t,e){if(void 0===t&&(t=this.mediaIndex),void 0===e&&(e=this.playlist_),!e||!this.mediaSource_)return!1;var i=t+1===e.segments.length;return e.endList&&"open"===this.mediaSource_.readyState&&i},i.checkBuffer_=function(t,e,i,n,r,s){var a=0;t.length&&(a=t.end(t.length-1));var o=Math.max(0,a-r);if(!e.segments.length)return null;if(o>=this.goalBufferLength_())return null;if(!n&&o>=1)return null;var l,h=null,u=!1;if(null===s)h=this.getSyncSegmentCandidate_(e),u=!0;else if(null!==i){var c=e.segments[i];l=c&&c.end?c.end:a,h=i+1}else if(this.fetchAtBuffer_){var d=ba.getMediaInfoForTime(e,a,s.segmentIndex,s.time);h=d.mediaIndex,l=d.startTime}else{var p=ba.getMediaInfoForTime(e,r,s.segmentIndex,s.time);h=p.mediaIndex,l=p.startTime}var f=this.generateSegmentInfo_(e,h,l,u);return!f||this.mediaSource_&&this.playlist_&&f.mediaIndex===this.playlist_.segments.length-1&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?void 0:(this.logger_("checkBuffer_ returning "+f.uri,{segmentInfo:f,playlist:e,currentMediaIndex:i,nextMediaIndex:h,startOfSegment:l,isSyncRequest:u}),f)},i.getSyncSegmentCandidate_=function(t){var e=this;if(-1===this.currentTimeline_)return 0;var i=t.segments.map((function(t,e){return{timeline:t.timeline,segmentIndex:e}})).filter((function(t){return t.timeline===e.currentTimeline_}));return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(t.segments.length-1,0)},i.generateSegmentInfo_=function(t,e,i,n){if(e<0||e>=t.segments.length)return null;var r,s,a=t.segments[e],o=this.sourceUpdater_.audioBuffered(),l=this.sourceUpdater_.videoBuffered();return o.length&&(r=o.end(o.length-1)-this.sourceUpdater_.audioTimestampOffset()),l.length&&(s=function(t,e,i){if(null==e||!t.length)return[];var n,r=Math.ceil((e-i+3)*It.ONE_SECOND_IN_TS);for(n=0;n<t.length&&!(t[n].pts>r);n++);return t.slice(n)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),{requestId:"segment-loader-"+Math.random(),uri:a.resolvedUri,mediaIndex:e,isSyncRequest:n,startOfSegment:i,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:a.timeline,duration:a.duration,segment:a,byteLength:0,transmuxer:this.transmuxer_,audioAppendStart:r,gopsToAlignWith:s}},i.earlyAbortWhenNeeded_=function(t){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)){var e=this.currentTime_(),i=t.bandwidth,n=this.pendingSegment_.duration,r=ba.estimateSegmentRequestTime(n,i,this.playlist_,t.bytesReceived),s=function(t,e,i){return void 0===i&&(i=1),((t.length?t.end(t.length-1):0)-e)/i}(this.buffered_(),e,this.vhs_.tech_.playbackRate())-1;if(!(r<=s)){var a=function(t){var e=t.master,i=t.currentTime,n=t.bandwidth,r=t.duration,s=t.segmentDuration,a=t.timeUntilRebuffer,o=t.currentTimeline,l=t.syncController,h=e.playlists.filter((function(t){return!ba.isIncompatible(t)})),u=h.filter(ba.isEnabled);u.length||(u=h.filter((function(t){return!ba.isDisabled(t)})));var c=u.filter(ba.hasAttribute.bind(null,"BANDWIDTH")).map((function(t){var e=l.getSyncPoint(t,r,o,i)?1:2;return{playlist:t,rebufferingImpact:ba.estimateSegmentRequestTime(s,n,t)*e-a}})),d=c.filter((function(t){return t.rebufferingImpact<=0}));return Co(d,(function(t,e){return Eo(e.playlist,t.playlist)})),d.length?d[0]:(Co(c,(function(t,e){return t.rebufferingImpact-e.rebufferingImpact})),c[0]||null)}({master:this.vhs_.playlists.master,currentTime:e,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:s,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(a){var o=r-s-a.rebufferingImpact,l=.5;s<=1/30&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*Wa.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},i.handleAbort_=function(){this.mediaRequestsAborted+=1},i.handleProgress_=function(t,e){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.trigger("progress")},i.handleTrackInfo_=function(t,e){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.checkForIllegalMediaSwitch(e)||(e=e||{},function(t,e){if(!t&&!e||!t&&e||t&&!e)return!1;if(t===e)return!0;var i=Object.keys(t).sort(),n=Object.keys(e).sort();if(i.length!==n.length)return!1;for(var r=0;r<i.length;r++){var s=i[r];if(s!==n[r])return!1;if(t[s]!==e[s])return!1}return!0}(this.currentMediaInfo_,e)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=e,this.currentMediaInfo_=e,this.logger_("trackinfo update",e),this.trigger("trackinfo")),this.checkForAbort_(t.requestId)||(this.pendingSegment_.trackInfo=e,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},i.handleTimingInfo_=function(t,e,i,n){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)){var r=this.pendingSegment_,s=Io(e);r[s]=r[s]||{},r[s][i]=n,this.logger_("timinginfo: "+e+" - "+i+" - "+n),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},i.handleCaptions_=function(t,e){var i=this;if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId))if(0!==e.length)if(this.pendingSegment_.hasAppendedData_){var n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),s={};e.forEach((function(t){s[t.stream]=s[t.stream]||{startTime:1/0,captions:[],endTime:0};var e=s[t.stream];e.startTime=Math.min(e.startTime,t.startTime+n),e.endTime=Math.max(e.endTime,t.endTime+n),e.captions.push(t)})),Object.keys(s).forEach((function(t){var e=s[t],a=e.startTime,o=e.endTime,l=e.captions,h=i.inbandTextTracks_;i.logger_("adding cues from "+a+" -> "+o+" for "+t),function(t,e,i){if(!t[i]){e.trigger({type:"usage",name:"vhs-608"}),e.trigger({type:"usage",name:"hls-608"});var n=e.textTracks().getTrackById(i);t[i]=n||e.addRemoteTextTrack({kind:"captions",id:i,label:i},!1).track}}(h,i.vhs_.tech_,t),Lo(a,o,h[t]),function(t){var e=t.inbandTextTracks,i=t.captionArray,n=t.timestampOffset;if(i){var s=r.a.WebKitDataCue||r.a.VTTCue;i.forEach((function(t){var i=t.stream;e[i].addCue(new s(t.startTime+n,t.endTime+n,t.text))}))}}({captionArray:l,inbandTextTracks:h,timestampOffset:n})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,t,e));else this.logger_("SegmentLoader received no captions from a caption event")},i.handleId3_=function(t,e,i){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId))if(this.pendingSegment_.hasAppendedData_){var n=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(t,e,i){t.metadataTrack_||(t.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,t.metadataTrack_.inBandMetadataTrackDispatchType=e)}(this.inbandTextTracks_,i,this.vhs_.tech_),Oo({inbandTextTracks:this.inbandTextTracks_,metadataArray:e,timestampOffset:n,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,t,e,i))},i.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach((function(t){return t()})),this.metadataQueue_.caption.forEach((function(t){return t()})),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},i.processCallQueue_=function(){var t=this.callQueue_;this.callQueue_=[],t.forEach((function(t){return t()}))},i.processLoadQueue_=function(){var t=this.loadQueue_;this.loadQueue_=[],t.forEach((function(t){return t()}))},i.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var t=this.pendingSegment_;return!!t&&(!this.currentMediaInfo_||!Ro({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},i.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;var t=this.pendingSegment_;if(!t||!t.trackInfo)return!1;if(!this.handlePartialData_){var e=this.currentMediaInfo_,i=e.hasAudio,n=e.hasVideo,r=e.isMuxed;if(n&&!t.videoTimingInfo)return!1;if(i&&!this.audioDisabled_&&!r&&!t.audioTimingInfo)return!1}return!Ro({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:t.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})},i.handleData_=function(t,e){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.segment),"closed"!==this.mediaSource_.readyState){if(t.map&&(t.map=this.initSegmentForMap(t.map,!0),i.segment.map=t.map),t.key&&this.segmentKey(t.key,!0),i.isFmp4=t.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Io(e.type)].start;else{var n,r="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo;r&&(n=this.handlePartialData_?e.videoFramePtsTime:i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:r,firstVideoFrameTimeForData:n,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}this.updateAppendInitSegmentStatus(i,e.type),this.updateSourceBufferTimestampOffset_(i),i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,e)}}else this.callQueue_.push(this.handleData_.bind(this,t,e))},i.updateAppendInitSegmentStatus=function(t,e){"main"!==this.loaderType_||"number"!=typeof t.timestampOffset||t.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[e]!==t.playlist&&(this.appendInitSegment_[e]=!0)},i.getInitSegmentAndUpdateState_=function(t){var e=t.type,i=t.initSegment,n=t.map,r=t.playlist;if(n){var s=Pa(n);if(this.activeInitSegmentId_===s)return null;i=this.initSegmentForMap(n,!0).bytes,this.activeInitSegmentId_=s}return i&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=r,this.appendInitSegment_[e]=!!n,this.activeInitSegmentId_=null,i):null},i.appendToSourceBuffer_=function(t){var e=this,i=t.segmentInfo,n=t.type,r=t.initSegment,s=t.data,a=[s],o=s.byteLength;r&&(a.unshift(r),o+=r.byteLength);var l,h,u,c=(u=0,(l={bytes:o,segments:a}).bytes&&(h=new Uint8Array(l.bytes),l.segments.forEach((function(t){h.set(t,u),u+=t.byteLength}))),h);this.sourceUpdater_.appendBuffer({segmentInfo:i,type:n,bytes:c},(function(t){t&&(e.error(n+" append of "+c.length+"b failed for segment #"+i.mediaIndex+" in playlist "+i.playlist.id),e.trigger("appenderror"))}))},i.handleSegmentTimingInfo_=function(t,e,i){if(this.pendingSegment_&&e===this.pendingSegment_.requestId){var n=this.pendingSegment_.segment,r=t+"TimingInfo";n[r]||(n[r]={}),n[r].transmuxerPrependedSeconds=i.prependedContentDuration||0,n[r].transmuxedPresentationStart=i.start.presentation,n[r].transmuxedDecodeStart=i.start.decode,n[r].transmuxedPresentationEnd=i.end.presentation,n[r].transmuxedDecodeEnd=i.end.decode,n[r].baseMediaDecodeTime=i.baseMediaDecodeTime}},i.appendData_=function(t,e){var i=e.type,n=e.data;if(n&&n.byteLength&&("audio"!==i||!this.audioDisabled_)){var r=this.getInitSegmentAndUpdateState_({type:i,initSegment:e.initSegment,playlist:t.playlist,map:t.isFmp4?t.segment.map:null});this.appendToSourceBuffer_({segmentInfo:t,type:i,initSegment:r,data:n})}},i.loadSegment_=function(t){var e=this;this.state="WAITING",this.pendingSegment_=t,this.trimBackBuffer_(t),"number"==typeof t.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(t):this.loadQueue_.push((function(){var i=e.buffered_();"number"==typeof t.timestampOffset&&(t.timestampOffset=Do({segmentTimeline:t.timeline,currentTimeline:e.currentTimeline_,startOfSegment:t.startOfSegment,buffered:i,overrideCheck:!0})),delete t.audioAppendStart;var n=e.sourceUpdater_.audioBuffered();n.length&&(t.audioAppendStart=n.end(n.length-1)-e.sourceUpdater_.audioTimestampOffset()),e.updateTransmuxerAndRequestSegment_(t)}))},i.updateTransmuxerAndRequestSegment_=function(t){this.shouldUpdateTransmuxerTimestampOffset_(t.timestampOffset)&&(this.gopBuffer_.length=0,t.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:t.timestampOffset}));var e=this.createSimplifiedSegmentObj_(t);t.abortRequests=oo({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:e,handlePartialData:this.handlePartialData_,abortFn:this.handleAbort_.bind(this),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",t.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",t.requestId),captionsFn:this.handleCaptions_.bind(this),id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},i.trimBackBuffer_=function(t){var e=function(t,e,i){var n=e-Wa.BACK_BUFFER_LENGTH;t.length&&(n=Math.max(n,t.start(0)));var r=e-i;return Math.min(r,n)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);e>0&&this.remove(0,e)},i.createSimplifiedSegmentObj_=function(t){var e=t.segment,i={resolvedUri:e.resolvedUri,byterange:e.byterange,requestId:t.requestId,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith},n=t.playlist.segments[t.mediaIndex-1];if(n&&n.timeline===e.timeline&&(n.videoTimingInfo?i.baseStartTime=n.videoTimingInfo.transmuxedDecodeEnd:n.audioTimingInfo&&(i.baseStartTime=n.audioTimingInfo.transmuxedDecodeEnd)),e.key){var r=e.key.iv||new Uint32Array([0,0,0,t.mediaIndex+t.playlist.mediaSequence]);i.key=this.segmentKey(e.key),i.key.iv=r}return e.map&&(i.map=this.initSegmentForMap(e.map)),i},i.saveTransferStats_=function(t){this.mediaRequests+=1,t&&(this.mediaBytesTransferred+=t.bytesReceived,this.mediaTransferDuration+=t.roundTripTime)},i.saveBandwidthRelatedStats_=function(t,e){this.pendingSegment_.byteLength=e.bytesReceived,t<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+t+" is less than the min to record "+1/60):(this.bandwidth=e.bandwidth,this.roundTrip=e.roundTripTime)},i.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},i.segmentRequestFinished_=function(t,e,i){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,t,e,i));else if(this.saveTransferStats_(e.stats),this.pendingSegment_&&e.requestId===this.pendingSegment_.requestId){if(t){if(this.pendingSegment_=null,this.state="READY",t.code===to)return;return this.pause(),t.code===Ja?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(t),void this.trigger("error"))}var n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,e.stats),n.endOfAllRequests=e.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=function(t,e,i){if(!e.length)return t;if(i)return e.slice();for(var n=e[0].pts,r=0;r<t.length&&!(t[r].pts>=n);r++);return t.slice(0,r).concat(e)}(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING";var r=this.isEndOfStream_(n.mediaIndex,n.playlist),s=null!==this.mediaIndex,a=n.timeline!==this.currentTimeline_&&n.timeline>0;!n.isFmp4&&(r||s&&a)&&Qa(this.transmuxer_),this.trigger("appending"),this.waitForAppendsToComplete_(n)}},i.setTimeMapping_=function(t){var e=this.syncController_.mappingForTimeline(t);null!==e&&(this.timeMapping_=e)},i.updateMediaSecondsLoaded_=function(t){"number"==typeof t.start&&"number"==typeof t.end?this.mediaSecondsLoaded+=t.end-t.start:this.mediaSecondsLoaded+=t.duration},i.shouldUpdateTransmuxerTimestampOffset_=function(t){return null!==t&&("main"===this.loaderType_&&t!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&t!==this.sourceUpdater_.audioTimestampOffset())},i.trueSegmentStart_=function(t){var e=t.currentStart,i=t.playlist,n=t.mediaIndex,r=t.firstVideoFrameTimeForData,s=t.currentVideoTimestampOffset,a=t.useVideoTimingInfo,o=t.videoTimingInfo,l=t.audioTimingInfo;if(void 0!==e)return e;if(!a)return l.start;var h=i.segments[n-1];return 0!==n&&h&&void 0!==h.start&&h.end===r+s?o.start:r},i.waitForAppendsToComplete_=function(t){if(!this.currentMediaInfo_)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var e=this.currentMediaInfo_,i=e.hasAudio,n=e.hasVideo,r=e.isMuxed,s="main"===this.loaderType_&&n,a=!this.audioDisabled_&&i&&!r;if(t.waitingOnAppends=0,!t.hasAppendedData_)return t.timingInfo||"number"!=typeof t.timestampOffset||(this.isPendingTimestampOffset_=!0),t.timingInfo={start:0},t.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(t),this.processMetadataQueue_()),void this.checkAppendsDone_(t);s&&t.waitingOnAppends++,a&&t.waitingOnAppends++,s&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,t)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,t))},i.checkAppendsDone_=function(t){this.checkForAbort_(t.requestId)||(t.waitingOnAppends--,0===t.waitingOnAppends&&this.handleAppendsDone_())},i.checkForIllegalMediaSwitch=function(t){var e=function(t,e,i){return"main"===t&&e&&i?i.hasAudio||i.hasVideo?e.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.currentMediaInfo_,t);return!!e&&(this.error({message:e,blacklistDuration:1/0}),this.trigger("error"),!0)},i.updateSourceBufferTimestampOffset_=function(t){if(null!==t.timestampOffset&&"number"==typeof t.timingInfo.start&&!t.changedTimestampOffset&&"main"===this.loaderType_){var e=!1;t.timestampOffset-=t.timingInfo.start,t.changedTimestampOffset=!0,t.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(t.timestampOffset),e=!0),t.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(t.timestampOffset),e=!0),e&&this.trigger("timestampoffset")}},i.updateTimingInfoEnd_=function(t){t.timingInfo=t.timingInfo||{};var e="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&t.videoTimingInfo?t.videoTimingInfo:t.audioTimingInfo;e&&(t.timingInfo.end="number"==typeof e.end?e.end:e.start+t.duration)},i.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var t=this.pendingSegment_;this.updateTimingInfoEnd_(t),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:"main"===this.loaderType_}),this.logger_(function(t){var e=t.segment,i=e.start,n=e.end,r=t.playlist,s=r.mediaSequence,a=r.id,o=r.segments,l=void 0===o?[]:o,h=t.mediaIndex,u=t.timeline;return["appending ["+h+"] of ["+s+", "+(s+l.length)+"] from playlist ["+a+"]","["+i+" => "+n+"] in timeline ["+u+"]"].join(" ")}(t));var e=Bo(t,this.sourceType_);if(e&&("warn"===e.severity?Us.log.warn(e.message):this.logger_(e.message)),this.recordThroughput_(t),this.pendingSegment_=null,this.state="READY",t.isSyncRequest)this.trigger("syncinfoupdate");else{this.addSegmentMetadataCue_(t),this.fetchAtBuffer_=!0,this.currentTimeline_!==t.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:t.timeline})),this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate");var i=t.segment;if(i.end&&this.currentTime_()-i.end>3*t.playlist.targetDuration)this.resetEverything();else null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=t.mediaIndex,this.isEndOfStream_(t.mediaIndex,t.playlist)&&this.endOfStream(),this.trigger("appended"),this.paused()||this.monitorBuffer_()}},i.recordThroughput_=function(t){if(t.duration<1/60)this.logger_("Ignoring segment's throughput because its duration of "+t.duration+" is less than the min to record "+1/60);else{var e=this.throughput.rate,i=Date.now()-t.endOfAllRequests+1,n=Math.floor(t.byteLength/i*8*1e3);this.throughput.rate+=(n-e)/++this.throughput.count}},i.addSegmentMetadataCue_=function(t){if(this.segmentMetadataTrack_){var e=t.segment,i=e.start,n=e.end;if(Mo(i)&&Mo(n)){Lo(i,n,this.segmentMetadataTrack_);var s=r.a.WebKitDataCue||r.a.VTTCue,a={custom:e.custom,dateTimeObject:e.dateTimeObject,dateTimeString:e.dateTimeString,bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.id,start:i,end:n},o=new s(i,n,JSON.stringify(a));o.value=a,this.segmentMetadataTrack_.addCue(o)}}},e}(Us.EventTarget);function Uo(){}var Fo,Wo=function(t){return"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))},zo=["video","audio"],Ho=function(t,e){var i=e[t+"Buffer"];return i&&i.updating||e.queuePending[t]},Vo=function t(e,i){if(0!==i.queue.length){var n=0,r=i.queue[n];if("mediaSource"!==r.type){if("mediaSource"!==e&&i.ready()&&"closed"!==i.mediaSource.readyState&&!Ho(e,i)){if(r.type!==e){if(null===(n=function(t,e){for(var i=0;i<e.length;i++){var n=e[i];if("mediaSource"===n.type)return null;if(n.type===t)return i}return null}(e,i.queue)))return;r=i.queue[n]}i.queue.splice(n,1),r.action(e,i),r.doneFn?i.queuePending[e]=r:t(e,i)}}else i.updating()||"closed"===i.mediaSource.readyState||(i.queue.shift(),r.action(i),r.doneFn&&r.doneFn(),t("audio",i),t("video",i))}},Go=function(t,e){var i=e[t+"Buffer"],n=Wo(t);i&&(i.removeEventListener("updateend",e["on"+n+"UpdateEnd_"]),i.removeEventListener("error",e["on"+n+"Error_"]),e.codecs[t]=null,e[t+"Buffer"]=null)},Xo=function(t,e){return t&&e&&-1!==Array.prototype.indexOf.call(t.sourceBuffers,e)},qo=function(t,e){return function(i,n){var r=n[i+"Buffer"];Xo(n.mediaSource,r)&&(n.logger_("Appending segment "+e.mediaIndex+"'s "+t.length+" bytes to "+i+"Buffer"),r.appendBuffer(t))}},Yo=function(t,e){return function(i,n){var r=n[i+"Buffer"];Xo(n.mediaSource,r)&&(n.logger_("Removing "+t+" to "+e+" from "+i+"Buffer"),r.remove(t,e))}},Ko=function(t){return function(e,i){var n=i[e+"Buffer"];Xo(i.mediaSource,n)&&(i.logger_("Setting "+e+"timestampOffset to "+t),n.timestampOffset=t)}},$o=function(t){return function(e,i){t()}},Qo=function(t){return function(e){if("open"===e.mediaSource.readyState){e.logger_("Calling mediaSource endOfStream("+(t||"")+")");try{e.mediaSource.endOfStream(t)}catch(t){Us.log.warn("Failed to call media source endOfStream",t)}}}},Zo=function(t){return function(e){e.logger_("Setting mediaSource duration to "+t);try{e.mediaSource.duration=t}catch(t){Us.log.warn("Failed to set media source duration",t)}}},Jo=function(){return function(t,e){if("open"===e.mediaSource.readyState){var i=e[t+"Buffer"];if(Xo(e.mediaSource,i)){e.logger_("calling abort on "+t+"Buffer");try{i.abort()}catch(e){Us.log.warn("Failed to abort on "+t+"Buffer",e)}}}}},tl=function(t,e){return function(i){var n=Wo(t),r=Object(Nt.getMimeForCodec)(e);i.logger_("Adding "+t+"Buffer with codec "+e+" to mediaSource");var s=i.mediaSource.addSourceBuffer(r);s.addEventListener("updateend",i["on"+n+"UpdateEnd_"]),s.addEventListener("error",i["on"+n+"Error_"]),i.codecs[t]=e,i[t+"Buffer"]=s}},el=function(t){return function(e){var i=e[t+"Buffer"];if(Go(t,e),Xo(e.mediaSource,i)){e.logger_("Removing "+t+"Buffer with codec "+e.codecs[t]+" from mediaSource");try{e.mediaSource.removeSourceBuffer(i)}catch(e){Us.log.warn("Failed to removeSourceBuffer "+t+"Buffer",e)}}}},il=function(t){return function(e,i){var n=i[e+"Buffer"],r=Object(Nt.getMimeForCodec)(t);Xo(i.mediaSource,n)&&i.codecs[e]!==t&&(i.logger_("changing "+e+"Buffer codec from "+i.codecs[e]+" to "+t),n.changeType(r),i.codecs[e]=t)}},nl=function(t){var e=t.type,i=t.sourceUpdater,n=t.action,r=t.doneFn,s=t.name;i.queue.push({type:e,action:n,doneFn:r,name:s}),Vo(e,i)},rl=function(t,e){return function(i){if(e.queuePending[t]){var n=e.queuePending[t].doneFn;e.queuePending[t]=null,n&&n(e[t+"Error_"])}Vo(t,e)}},sl=function(t){function e(e){var i;return(i=t.call(this)||this).mediaSource=e,i.sourceopenListener_=function(){return Vo("mediaSource",u()(i))},i.mediaSource.addEventListener("sourceopen",i.sourceopenListener_),i.logger_=xo("SourceUpdater"),i.audioTimestampOffset_=0,i.videoTimestampOffset_=0,i.queue=[],i.queuePending={audio:null,video:null},i.delayedAudioAppendQueue_=[],i.videoAppendQueued_=!1,i.codecs={},i.onVideoUpdateEnd_=rl("video",u()(i)),i.onAudioUpdateEnd_=rl("audio",u()(i)),i.onVideoError_=function(t){i.videoError_=t},i.onAudioError_=function(t){i.audioError_=t},i.createdSourceBuffers_=!1,i.initializedEme_=!1,i.triggeredReady_=!1,i}d()(e,t);var i=e.prototype;return i.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},i.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},i.hasInitializedAnyEme=function(){return this.initializedEme_},i.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},i.createSourceBuffers=function(t){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(t),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},i.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},i.addSourceBuffer=function(t,e){nl({type:"mediaSource",sourceUpdater:this,action:tl(t,e),name:"addSourceBuffer"})},i.abort=function(t){nl({type:t,sourceUpdater:this,action:Jo(t),name:"abort"})},i.removeSourceBuffer=function(t){this.canRemoveSourceBuffer()?nl({type:"mediaSource",sourceUpdater:this,action:el(t),name:"removeSourceBuffer"}):Us.log.error("removeSourceBuffer is not supported!")},i.canRemoveSourceBuffer=function(){return!Us.browser.IE_VERSION&&!Us.browser.IS_FIREFOX&&r.a.MediaSource&&r.a.MediaSource.prototype&&"function"==typeof r.a.MediaSource.prototype.removeSourceBuffer},e.canChangeType=function(){return r.a.SourceBuffer&&r.a.SourceBuffer.prototype&&"function"==typeof r.a.SourceBuffer.prototype.changeType},i.canChangeType=function(){return this.constructor.canChangeType()},i.changeType=function(t,e){this.canChangeType()?nl({type:t,sourceUpdater:this,action:il(e),name:"changeType"}):Us.log.error("changeType is not supported!")},i.addOrChangeSourceBuffers=function(t){var e=this;if(!t||"object"!=typeof t||0===Object.keys(t).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(t).forEach((function(i){var n=t[i];if(!e.hasCreatedSourceBuffers())return e.addSourceBuffer(i,n);e.canChangeType()&&e.changeType(i,n)}))},i.appendBuffer=function(t,e){var i=this,n=t.segmentInfo,r=t.type,s=t.bytes;if(this.processedAppend_=!0,"audio"===r&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([t,e]),void this.logger_("delayed audio append of "+s.length+" until video append");if(nl({type:r,sourceUpdater:this,action:qo(s,n||{mediaIndex:-1}),doneFn:e,name:"appendBuffer"}),"video"===r){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var a=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+a.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,a.forEach((function(t){i.appendBuffer.apply(i,t)}))}},i.audioBuffered=function(){return Xo(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Us.createTimeRange()},i.videoBuffered=function(){return Xo(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Us.createTimeRange()},i.buffered=function(){var t=Xo(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,e=Xo(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return e&&!t?this.audioBuffered():t&&!e?this.videoBuffered():function(t,e){var i=null,n=null,r=0,s=[],a=[];if(!(t&&t.length&&e&&e.length))return Us.createTimeRange();for(var o=t.length;o--;)s.push({time:t.start(o),type:"start"}),s.push({time:t.end(o),type:"end"});for(o=e.length;o--;)s.push({time:e.start(o),type:"start"}),s.push({time:e.end(o),type:"end"});for(s.sort((function(t,e){return t.time-e.time})),o=0;o<s.length;o++)"start"===s[o].type?2===++r&&(i=s[o].time):"end"===s[o].type&&1===--r&&(n=s[o].time),null!==i&&null!==n&&(a.push([i,n]),i=null,n=null);return Us.createTimeRanges(a)}(this.audioBuffered(),this.videoBuffered())},i.setDuration=function(t,e){void 0===e&&(e=Uo),nl({type:"mediaSource",sourceUpdater:this,action:Zo(t),name:"duration",doneFn:e})},i.endOfStream=function(t,e){void 0===t&&(t=null),void 0===e&&(e=Uo),"string"!=typeof t&&(t=void 0),nl({type:"mediaSource",sourceUpdater:this,action:Qo(t),name:"endOfStream",doneFn:e})},i.removeAudio=function(t,e,i){void 0===i&&(i=Uo),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?nl({type:"audio",sourceUpdater:this,action:Yo(t,e),doneFn:i,name:"remove"}):i()},i.removeVideo=function(t,e,i){void 0===i&&(i=Uo),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?nl({type:"video",sourceUpdater:this,action:Yo(t,e),doneFn:i,name:"remove"}):i()},i.updating=function(){return!(!Ho("audio",this)&&!Ho("video",this))},i.audioTimestampOffset=function(t){return void 0!==t&&this.audioBuffer&&this.audioTimestampOffset_!==t&&(nl({type:"audio",sourceUpdater:this,action:Ko(t),name:"timestampOffset"}),this.audioTimestampOffset_=t),this.audioTimestampOffset_},i.videoTimestampOffset=function(t){return void 0!==t&&this.videoBuffer&&this.videoTimestampOffset!==t&&(nl({type:"video",sourceUpdater:this,action:Ko(t),name:"timestampOffset"}),this.videoTimestampOffset_=t),this.videoTimestampOffset_},i.audioQueueCallback=function(t){this.audioBuffer&&nl({type:"audio",sourceUpdater:this,action:$o(t),name:"callback"})},i.videoQueueCallback=function(t){this.videoBuffer&&nl({type:"video",sourceUpdater:this,action:$o(t),name:"callback"})},i.dispose=function(){var t=this;this.trigger("dispose"),zo.forEach((function(e){t.abort(e),t.canRemoveSourceBuffer()?t.removeSourceBuffer(e):t[e+"QueueCallback"]((function(){return Go(e,t)}))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},e}(Us.EventTarget),al=function(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))},ol=new Uint8Array("\n\n".split("").map((function(t){return t.charCodeAt(0)}))),ll=function(t){function e(e,i){var n;return void 0===i&&(i={}),(n=t.call(this,e,i)||this).handlePartialData_=!1,n.mediaSource_=null,n.subtitlesTrack_=null,n.loaderType_="subtitle",n.featuresNativeTextTracks_=e.featuresNativeTextTracks,n.shouldSaveSegmentTimingInfo_=!1,n}d()(e,t);var i=e.prototype;return i.createTransmuxer_=function(){return null},i.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues.length)return Us.createTimeRanges();var t=this.subtitlesTrack_.cues,e=t[0].startTime,i=t[t.length-1].startTime;return Us.createTimeRanges([[e,i]])},i.initSegmentForMap=function(t,e){if(void 0===e&&(e=!1),!t)return null;var i=Pa(t),n=this.initSegments_[i];if(e&&!n&&t.bytes){var r=ol.byteLength+t.bytes.byteLength,s=new Uint8Array(r);s.set(t.bytes),s.set(ol,t.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:t.resolvedUri,byterange:t.byterange,bytes:s}}return n||t},i.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.track=function(t){return void 0===t||(this.subtitlesTrack_=t,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},i.remove=function(t,e){Lo(t,e,this.subtitlesTrack_)},i.fillBuffer_=function(){var t=this;this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(e=this.skipEmptySegments_(e)){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){return this.syncController_.one("timestampoffset",(function(){t.state="READY",t.paused()||t.monitorBuffer_()})),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}},i.skipEmptySegments_=function(t){for(;t&&t.segment.empty;)t=this.generateSegmentInfo_(t.playlist,t.mediaIndex+1,t.startOfSegment+t.duration,t.isSyncRequest);return t},i.stopForError=function(t){this.error(t),this.state="READY",this.pause(),this.trigger("error")},i.segmentRequestFinished_=function(t,e,i){var n=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(e.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(t)return t.code===Ja&&this.handleTimeout_(),t.code===to?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(t);var s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,e.stats),this.state="APPENDING",this.trigger("appending");var a=s.segment;if(a.map&&(a.map.bytes=e.map.bytes),s.bytes=e.bytes,"function"!=typeof r.a.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_){var o,l=function(){n.subtitlesTrack_.tech_.off("vttjsloaded",o),n.stopForError({message:"Error loading vtt.js"})};return o=function(){n.subtitlesTrack_.tech_.off("vttjserror",l),n.segmentRequestFinished_(t,e,i)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",o),void this.subtitlesTrack_.tech_.one("vttjserror",l)}a.requested=!0;try{this.parseVTTCues_(s)}catch(t){return void this.stopForError({message:t.message})}if(this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,s.cues.forEach((function(t){n.subtitlesTrack_.addCue(n.featuresNativeTextTracks_?new r.a.VTTCue(t.startTime,t.endTime,t.text):t)})),function(t){var e=t.cues;if(e)for(var i=0;i<e.length;i++){for(var n=[],r=0,s=0;s<e.length;s++)e[i].startTime===e[s].startTime&&e[i].endTime===e[s].endTime&&e[i].text===e[s].text&&++r>1&&n.push(e[s]);n.length&&n.forEach((function(e){return t.removeCue(e)}))}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},i.handleData_=function(){},i.updateTimingInfoEnd_=function(){},i.parseVTTCues_=function(t){var e,i=!1;"function"==typeof r.a.TextDecoder?e=new r.a.TextDecoder("utf8"):(e=r.a.WebVTT.StringDecoder(),i=!0);var n=new r.a.WebVTT.Parser(r.a,r.a.vttjs,e);if(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=t.cues.push.bind(t.cues),n.ontimestampmap=function(e){t.timestampmap=e},n.onparsingerror=function(t){Us.log.warn("Error encountered when parsing cues: "+t.message)},t.segment.map){var s=t.segment.map.bytes;i&&(s=al(s)),n.parse(s)}var a=t.bytes;i&&(a=al(a)),n.parse(a),n.flush()},i.updateTimeMapping_=function(t,e,i){var n=t.segment;if(e)if(t.cues.length){var r=t.timestampmap,s=r.MPEGTS/It.ONE_SECOND_IN_TS-r.LOCAL+e.mapping;if(t.cues.forEach((function(t){t.startTime+=s,t.endTime+=s})),!i.syncInfo){var a=t.cues[0].startTime,o=t.cues[t.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+t.mediaIndex,time:Math.min(a,o-n.duration)}}}else n.empty=!0},e}(jo),hl=function(t,e){for(var i=t.cues,n=0;n<i.length;n++){var r=i[n];if(e>=r.adStartTime&&e<=r.adEndTime)return r}return null},ul=[{name:"VOD",run:function(t,e,i,n,r){if(i!==1/0){return{time:0,segmentIndex:0}}return null}},{name:"ProgramDateTime",run:function(t,e,i,n,r){if(!t.datetimeToDisplayTime)return null;var s=e.segments||[],a=null,o=null;r=r||0;for(var l=0;l<s.length;l++){var h=s[l];if(h.dateTimeObject){var u=h.dateTimeObject.getTime()/1e3+t.datetimeToDisplayTime,c=Math.abs(r-u);if(null!==o&&(0===c||o<c))break;o=c,a={time:u,segmentIndex:l}}}return a}},{name:"Segment",run:function(t,e,i,n,r){var s=e.segments||[],a=null,o=null;r=r||0;for(var l=0;l<s.length;l++){var h=s[l];if(h.timeline===n&&void 0!==h.start){var u=Math.abs(r-h.start);if(null!==o&&o<u)break;(!a||null===o||o>=u)&&(o=u,a={time:h.start,segmentIndex:l})}}return a}},{name:"Discontinuity",run:function(t,e,i,n,r){var s=null;if(r=r||0,e.discontinuityStarts&&e.discontinuityStarts.length)for(var a=null,o=0;o<e.discontinuityStarts.length;o++){var l=e.discontinuityStarts[o],h=e.discontinuitySequence+o+1,u=t.discontinuities[h];if(u){var c=Math.abs(r-u.time);if(null!==a&&a<c)break;(!s||null===a||a>=c)&&(a=c,s={time:u.time,segmentIndex:l})}}return s}},{name:"Playlist",run:function(t,e,i,n,r){return e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence}:null}}],cl=function(t){function e(e){var i;return(i=t.call(this)||this).timelines=[],i.discontinuities=[],i.datetimeToDisplayTime=null,i.logger_=xo("SyncController"),i}d()(e,t);var i=e.prototype;return i.getSyncPoint=function(t,e,i,n){var r=this.runStrategies_(t,e,i,n);return r.length?this.selectSyncPoint_(r,{key:"time",value:n}):null},i.getExpiredTime=function(t,e){if(!t||!t.segments)return null;var i=this.runStrategies_(t,e,t.discontinuitySequence,0);if(!i.length)return null;var n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+ca(t,n.segmentIndex,0))},i.runStrategies_=function(t,e,i,n){for(var r=[],s=0;s<ul.length;s++){var a=ul[s],o=a.run(this,t,e,i,n);o&&(o.strategy=a.name,r.push({strategy:a.name,syncPoint:o}))}return r},i.selectSyncPoint_=function(t,e){for(var i=t[0].syncPoint,n=Math.abs(t[0].syncPoint[e.key]-e.value),r=t[0].strategy,s=1;s<t.length;s++){var a=Math.abs(t[s].syncPoint[e.key]-e.value);a<n&&(n=a,i=t[s].syncPoint,r=t[s].strategy)}return this.logger_("syncPoint for ["+e.key+": "+e.value+"] chosen with strategy ["+r+"]: [time:"+i.time+", segmentIndex:"+i.segmentIndex+"]"),i},i.saveExpiredSegmentInfo=function(t,e){for(var i=e.mediaSequence-t.mediaSequence-1;i>=0;i--){var n=t.segments[i];if(n&&void 0!==n.start){e.syncInfo={mediaSequence:t.mediaSequence+i,time:n.start},this.logger_("playlist refresh sync: [time:"+e.syncInfo.time+", mediaSequence: "+e.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}}},i.setDateTimeMapping=function(t){if(!this.datetimeToDisplayTime&&t.segments&&t.segments.length&&t.segments[0].dateTimeObject){var e=t.segments[0].dateTimeObject.getTime()/1e3;this.datetimeToDisplayTime=-e}},i.saveSegmentTimingInfo=function(t){var e=t.segmentInfo,i=t.shouldSaveTimelineMapping;this.calculateSegmentTimeMapping_(e,e.timingInfo,i)&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:e.segment.start}))},i.timestampOffsetForTimeline=function(t){return void 0===this.timelines[t]?null:this.timelines[t].time},i.mappingForTimeline=function(t){return void 0===this.timelines[t]?null:this.timelines[t].mapping},i.calculateSegmentTimeMapping_=function(t,e,i){var n=t.segment,r=this.timelines[t.timeline];if(null!==t.timestampOffset)r={time:t.startOfSegment,mapping:t.startOfSegment-e.start},i&&(this.timelines[t.timeline]=r,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+t.timeline+": [time: "+r.time+"] [mapping: "+r.mapping+"]")),n.start=t.startOfSegment,n.end=e.end+r.mapping;else{if(!r)return!1;n.start=e.start+r.mapping,n.end=e.end+r.mapping}return!0},i.saveDiscontinuitySyncInfo_=function(t){var e=t.playlist,i=t.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(e.discontinuityStarts&&e.discontinuityStarts.length)for(var n=0;n<e.discontinuityStarts.length;n++){var r=e.discontinuityStarts[n],s=e.discontinuitySequence+n+1,a=r-t.mediaIndex,o=Math.abs(a);if(!this.discontinuities[s]||this.discontinuities[s].accuracy>o){var l=void 0;l=a<0?i.start-ca(e,t.mediaIndex,r):i.end+ca(e,t.mediaIndex+1,r),this.discontinuities[s]={time:l,accuracy:o}}}},i.dispose=function(){this.trigger("dispose"),this.off()},e}(Us.EventTarget),dl=function(t){function e(){var e;return(e=t.call(this)||this).pendingTimelineChanges_={},e.lastTimelineChanges_={},e}d()(e,t);var i=e.prototype;return i.clearPendingTimelineChange=function(t){this.pendingTimelineChanges_[t]=null,this.trigger("pendingtimelinechange")},i.pendingTimelineChange=function(t){var e=t.type,i=t.from,n=t.to;return"number"==typeof i&&"number"==typeof n&&(this.pendingTimelineChanges_[e]={type:e,from:i,to:n},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]},i.lastTimelineChange=function(t){var e=t.type,i=t.from,n=t.to;return"number"==typeof i&&"number"==typeof n&&(this.lastTimelineChanges_[e]={type:e,from:i,to:n},delete this.pendingTimelineChanges_[e],this.trigger("timelinechange")),this.lastTimelineChanges_[e]},i.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},e}(Us.EventTarget),pl=new fo("./decrypter-worker.worker.js",(function(t,e){var i=this;
78
- /*! @name @videojs/http-streaming @version 2.4.2 @license Apache-2.0 */!function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var e=function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e};var n=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e},r=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},e.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t]=this.listeners[t].slice(0),this.listeners[t].splice(i,1),i>-1},e.trigger=function(t){var e=this.listeners[t];if(e)if(2===arguments.length)for(var i=e.length,n=0;n<i;++n)e[n].call(this,arguments[1]);else for(var r=Array.prototype.slice.call(arguments,1),s=e.length,a=0;a<s;++a)e[a].apply(this,r)},e.dispose=function(){this.listeners={}},e.pipe=function(t){this.on("data",(function(e){t.push(e)}))},t}();
79
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */
80
- /*! @name aes-decrypter @version 3.1.0 @license Apache-2.0 */
81
- var s=null,a=function(){function t(t){var e,i,n;s||(s=function(){var t,e,i,n,r,s,a,o,l=[[[],[],[],[],[]],[[],[],[],[],[]]],h=l[0],u=l[1],c=h[4],d=u[4],p=[],f=[];for(t=0;t<256;t++)f[(p[t]=t<<1^283*(t>>7))^t]=t;for(e=i=0;!c[e];e^=n||1,i=f[i]||1)for(s=(s=i^i<<1^i<<2^i<<3^i<<4)>>8^255&s^99,c[e]=s,d[s]=e,o=16843009*p[r=p[n=p[e]]]^65537*r^257*n^16843008*e,a=257*p[s]^16843008*s,t=0;t<4;t++)h[t][e]=a=a<<24^a>>>8,u[t][s]=o=o<<24^o>>>8;for(t=0;t<5;t++)h[t]=h[t].slice(0),u[t]=u[t].slice(0);return l}()),this._tables=[[s[0][0].slice(),s[0][1].slice(),s[0][2].slice(),s[0][3].slice(),s[0][4].slice()],[s[1][0].slice(),s[1][1].slice(),s[1][2].slice(),s[1][3].slice(),s[1][4].slice()]];var r=this._tables[0][4],a=this._tables[1],o=t.length,l=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");var h=t.slice(0),u=[];for(this._key=[h,u],e=o;e<4*o+28;e++)n=h[e-1],(e%o==0||8===o&&e%o==4)&&(n=r[n>>>24]<<24^r[n>>16&255]<<16^r[n>>8&255]<<8^r[255&n],e%o==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),h[e]=h[e-o]^n;for(i=0;e;i++,e--)n=h[3&i?e:e-4],u[i]=e<=4||i<4?n:a[0][r[n>>>24]]^a[1][r[n>>16&255]]^a[2][r[n>>8&255]]^a[3][r[255&n]]}return t.prototype.decrypt=function(t,e,i,n,r,s){var a,o,l,h,u=this._key[1],c=t^u[0],d=n^u[1],p=i^u[2],f=e^u[3],g=u.length/4-2,m=4,v=this._tables[1],y=v[0],b=v[1],_=v[2],T=v[3],x=v[4];for(h=0;h<g;h++)a=y[c>>>24]^b[d>>16&255]^_[p>>8&255]^T[255&f]^u[m],o=y[d>>>24]^b[p>>16&255]^_[f>>8&255]^T[255&c]^u[m+1],l=y[p>>>24]^b[f>>16&255]^_[c>>8&255]^T[255&d]^u[m+2],f=y[f>>>24]^b[c>>16&255]^_[d>>8&255]^T[255&p]^u[m+3],m+=4,c=a,d=o,p=l;for(h=0;h<4;h++)r[(3&-h)+s]=x[c>>>24]<<24^x[d>>16&255]<<16^x[p>>8&255]<<8^x[255&f]^u[m++],a=c,c=d,d=p,p=f,f=a},t}(),o=function(t){function e(){var e;return(e=t.call(this,r)||this).jobs=[],e.delay=1,e.timeout_=null,e}n(e,t);var i=e.prototype;return i.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},i.push=function(t){this.jobs.push(t),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},e}(r),l=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},h=function(){function t(e,i,n,r){var s=t.STEP,a=new Int32Array(e.buffer),h=new Uint8Array(e.byteLength),u=0;for(this.asyncStream_=new o,this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+s),i,n,h)),u=s;u<a.length;u+=s)n=new Uint32Array([l(a[u-4]),l(a[u-3]),l(a[u-2]),l(a[u-1])]),this.asyncStream_.push(this.decryptChunk_(a.subarray(u,u+s),i,n,h));this.asyncStream_.push((function(){
82
- /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */
83
- var t;r(null,(t=h).subarray(0,t.byteLength-t[t.byteLength-1]))}))}return t.prototype.decryptChunk_=function(t,e,i,n){return function(){var r=function(t,e,i){var n,r,s,o,h,u,c,d,p,f=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),g=new a(Array.prototype.slice.call(e)),m=new Uint8Array(t.byteLength),v=new Int32Array(m.buffer);for(n=i[0],r=i[1],s=i[2],o=i[3],p=0;p<f.length;p+=4)h=l(f[p]),u=l(f[p+1]),c=l(f[p+2]),d=l(f[p+3]),g.decrypt(h,u,c,d,v,p),v[p]=l(v[p]^n),v[p+1]=l(v[p+1]^r),v[p+2]=l(v[p+2]^s),v[p+3]=l(v[p+3]^o),n=h,r=u,s=c,o=d;return m}(t,e,i);n.set(r,t.byteOffset)}},e(t,null,[{key:"STEP",get:function(){return 32e3}}]),t}();new function(t){t.onmessage=function(e){var i=e.data,n=new Uint8Array(i.encrypted.bytes,i.encrypted.byteOffset,i.encrypted.byteLength),r=new Uint32Array(i.key.bytes,i.key.byteOffset,i.key.byteLength/4),s=new Uint32Array(i.iv.bytes,i.iv.byteOffset,i.iv.byteLength/4);new h(n,r,s,(function(e,n){var r,s;t.postMessage((r={source:i.source,decrypted:n},s={},Object.keys(r).forEach((function(t){var e=r[t];ArrayBuffer.isView(e)?s[t]={bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:s[t]=e})),s),[n.buffer])}))}}(i)}()})),fl=function(t){var e=t.default?"main":"alternative";return t.characteristics&&t.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},gl=function(t,e){t.abort(),t.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},ml=function(t,e){e.activePlaylistLoader=t,t.load()},vl={AUDIO:function(t,e){return function(){var i=e.segmentLoaders[t],n=e.mediaTypes[t],r=e.blacklistCurrentPlaylist;gl(i,n);var s=n.activeTrack(),a=n.activeGroup(),o=(a.filter((function(t){return t.default}))[0]||a[0]).id,l=n.tracks[o];if(s!==l){for(var h in Us.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),n.tracks)n.tracks[h].enabled=n.tracks[h]===l;n.onTrackChanged()}else r({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(t,e){return function(){var i=e.segmentLoaders[t],n=e.mediaTypes[t];Us.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),gl(i,n);var r=n.activeTrack();r&&(r.mode="disabled"),n.onTrackChanged()}}},yl={AUDIO:function(t,e,i){if(e){var n=i.tech,r=i.requestOptions,s=i.segmentLoaders[t];e.on("loadedmetadata",(function(){var t=e.media();s.playlist(t,r),(!n.paused()||t.endList&&"none"!==n.preload())&&s.load()})),e.on("loadedplaylist",(function(){s.playlist(e.media(),r),n.paused()||s.load()})),e.on("error",vl[t](t,i))}},SUBTITLES:function(t,e,i){var n=i.tech,r=i.requestOptions,s=i.segmentLoaders[t],a=i.mediaTypes[t];e.on("loadedmetadata",(function(){var t=e.media();s.playlist(t,r),s.track(a.activeTrack()),(!n.paused()||t.endList&&"none"!==n.preload())&&s.load()})),e.on("loadedplaylist",(function(){s.playlist(e.media(),r),n.paused()||s.load()})),e.on("error",vl[t](t,i))}},bl={AUDIO:function(t,e){var i=e.vhs,n=e.sourceType,r=e.segmentLoaders[t],s=e.requestOptions,a=e.master,o=a.mediaGroups,l=a.playlists,h=e.mediaTypes[t],u=h.groups,c=h.tracks,d=e.masterPlaylistLoader;o[t]&&0!==Object.keys(o[t]).length||(o[t]={main:{default:{default:!0}}});var p=function(r){u[r]||(u[r]=[]);var a=l.filter((function(e){return e.attributes[t]===r})),h=function(l){var h=o[t][r][l];!a.filter((function(t){return t.resolvedUri!==h.resolvedUri})).length&&a.length&&delete h.resolvedUri;var p=void 0;if(p="vhs-json"===n&&h.playlists?new ia(h.playlists[0],i,s):h.resolvedUri?new ia(h.resolvedUri,i,s):h.playlists&&"dash"===n?new Fa(h.playlists[0],i,s,d):null,h=Us.mergeOptions({id:l,playlistLoader:p},h),yl[t](t,h.playlistLoader,e),u[r].push(h),void 0===c[l]){var f=new Us.AudioTrack({id:l,kind:fl(h),enabled:!1,language:h.language,default:h.default,label:l});c[l]=f}};for(var p in o[t][r])h(p)};for(var f in o[t])p(f);r.on("error",vl[t](t,e))},SUBTITLES:function(t,e){var i=e.tech,n=e.vhs,r=e.sourceType,s=e.segmentLoaders[t],a=e.requestOptions,o=e.master.mediaGroups,l=e.mediaTypes[t],h=l.groups,u=l.tracks,c=e.masterPlaylistLoader;for(var d in o[t])for(var p in h[d]||(h[d]=[]),o[t][d])if(!o[t][d][p].forced){var f=o[t][d][p],g=void 0;if("hls"===r)g=new ia(f.resolvedUri,n,a);else if("dash"===r){if(!f.playlists.filter((function(t){return t.excludeUntil!==1/0})).length)return;g=new Fa(f.playlists[0],n,a,c)}else"vhs-json"===r&&(g=new ia(f.playlists?f.playlists[0]:f.resolvedUri,n,a));if(f=Us.mergeOptions({id:p,playlistLoader:g},f),yl[t](t,f.playlistLoader,e),h[d].push(f),void 0===u[p]){var m=i.addRemoteTextTrack({id:p,kind:"subtitles",default:f.default&&f.autoselect,language:f.language,label:p},!1).track;u[p]=m}}s.on("error",vl[t](t,e))},"CLOSED-CAPTIONS":function(t,e){var i=e.tech,n=e.master.mediaGroups,r=e.mediaTypes[t],s=r.groups,a=r.tracks;for(var o in n[t])for(var l in s[o]||(s[o]=[]),n[t][o]){var h=n[t][o][l];if(h.instreamId.match(/CC\d/)&&(s[o].push(Us.mergeOptions({id:l},h)),void 0===a[l])){var u=i.addRemoteTextTrack({id:h.instreamId,kind:"captions",default:h.default&&h.autoselect,language:h.language,label:l},!1).track;a[l]=u}}}},_l={AUDIO:function(t,e){return function(){var i=e.mediaTypes[t].tracks;for(var n in i)if(i[n].enabled)return i[n];return null}},SUBTITLES:function(t,e){return function(){var i=e.mediaTypes[t].tracks;for(var n in i)if("showing"===i[n].mode||"hidden"===i[n].mode)return i[n];return null}}},Tl=function(t){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){bl[e](e,t)}));var e=t.mediaTypes,i=t.masterPlaylistLoader,n=t.tech,r=t.vhs;["AUDIO","SUBTITLES"].forEach((function(i){e[i].activeGroup=function(t,e){return function(i){var n=e.masterPlaylistLoader,r=e.mediaTypes[t].groups,s=n.media();if(!s)return null;var a=null;return s.attributes[t]&&(a=r[s.attributes[t]]),a=a||r.main,void 0===i?a:null===i?null:a.filter((function(t){return t.id===i.id}))[0]||null}}(i,t),e[i].activeTrack=_l[i](i,t),e[i].onGroupChanged=function(t,e){return function(){var i=e.segmentLoaders,n=i[t],r=i.main,s=e.mediaTypes[t],a=s.activeTrack(),o=s.activeGroup(a),l=s.activePlaylistLoader;gl(n,s),o&&(o.playlistLoader?(n.resyncLoader(),ml(o.playlistLoader,s)):l&&r.resetEverything())}}(i,t),e[i].onGroupChanging=function(t,e){return function(){var i=e.segmentLoaders[t];i.abort(),i.pause()}}(i,t),e[i].onTrackChanged=function(t,e){return function(){var i=e.segmentLoaders,n=i[t],r=i.main,s=e.mediaTypes[t],a=s.activeTrack(),o=s.activeGroup(a),l=s.activePlaylistLoader;if(gl(n,s),o){if("AUDIO"===t){if(!o.playlistLoader)return r.setAudio(!0),void r.resetEverything();n.setAudio(!0),r.setAudio(!1)}l!==o.playlistLoader?(n.track&&n.track(a),n.resetEverything(),ml(o.playlistLoader,s)):ml(o.playlistLoader,s)}}}(i,t)}));var s=e.AUDIO.activeGroup();if(s){var a=(s.filter((function(t){return t.default}))[0]||s[0]).id;e.AUDIO.tracks[a].enabled=!0,e.AUDIO.onTrackChanged()}i.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(t){return e[t].onGroupChanged()}))})),i.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(t){return e[t].onGroupChanging()}))}));var o=function(){e.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"}),n.trigger({type:"usage",name:"hls-audio-change"})};for(var l in n.audioTracks().addEventListener("change",o),n.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),r.on("dispose",(function(){n.audioTracks().removeEventListener("change",o),n.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)})),n.clearTracks("audio"),e.AUDIO.tracks)n.audioTracks().addTrack(e.AUDIO.tracks[l])},xl=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],Sl=function(t){return this.audioSegmentLoader_[t]+this.mainSegmentLoader_[t]},wl=function(t){function e(e){var i;i=t.call(this)||this;var n,s=e.src,a=e.handleManifestRedirects,o=e.withCredentials,l=e.tech,h=e.bandwidth,c=e.externVhs,d=e.useCueTags,p=e.blacklistDuration,f=e.enableLowInitialPlaylist,g=e.sourceType,m=e.cacheEncryptionKeys,v=e.handlePartialData,y=e.experimentalBufferBasedABR;if(!s)throw new Error("A non-empty playlist URL or JSON manifest string is required");Fo=c,i.experimentalBufferBasedABR=Boolean(y),i.withCredentials=o,i.tech_=l,i.vhs_=l.vhs,i.sourceType_=g,i.useCueTags_=d,i.blacklistDuration=p,i.enableLowInitialPlaylist=f,i.useCueTags_&&(i.cueTagsTrack_=i.tech_.addTextTrack("metadata","ad-cues"),i.cueTagsTrack_.inBandMetadataTrackDispatchType=""),i.requestOptions_={withCredentials:o,handleManifestRedirects:a,timeout:null},i.on("error",i.pauseLoading),i.mediaTypes_=(n={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){n[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Uo,activeTrack:Uo,onGroupChanged:Uo,onTrackChanged:Uo}})),n),i.mediaSource=new r.a.MediaSource,i.handleDurationChange_=i.handleDurationChange_.bind(u()(i)),i.handleSourceOpen_=i.handleSourceOpen_.bind(u()(i)),i.handleSourceEnded_=i.handleSourceEnded_.bind(u()(i)),i.mediaSource.addEventListener("durationchange",i.handleDurationChange_),i.mediaSource.addEventListener("sourceopen",i.handleSourceOpen_),i.mediaSource.addEventListener("sourceended",i.handleSourceEnded_),i.seekable_=Us.createTimeRanges(),i.hasPlayed_=!1,i.syncController_=new cl(e),i.segmentMetadataTrack_=l.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,i.decrypter_=new pl,i.sourceUpdater_=new sl(i.mediaSource),i.inbandTextTracks_={},i.timelineChangeController_=new dl;var b={vhs:i.vhs_,mediaSource:i.mediaSource,currentTime:i.tech_.currentTime.bind(i.tech_),seekable:function(){return i.seekable()},seeking:function(){return i.tech_.seeking()},duration:function(){return i.duration()},hasPlayed:function(){return i.hasPlayed_},goalBufferLength:function(){return i.goalBufferLength()},bandwidth:h,syncController:i.syncController_,decrypter:i.decrypter_,sourceType:i.sourceType_,inbandTextTracks:i.inbandTextTracks_,cacheEncryptionKeys:m,handlePartialData:v,sourceUpdater:i.sourceUpdater_,timelineChangeController:i.timelineChangeController_};return i.masterPlaylistLoader_="dash"===i.sourceType_?new Fa(s,i.vhs_,i.requestOptions_):new ia(s,i.vhs_,i.requestOptions_),i.setupMasterPlaylistLoaderListeners_(),i.mainSegmentLoader_=new jo(Us.mergeOptions(b,{segmentMetadataTrack:i.segmentMetadataTrack_,loaderType:"main"}),e),i.audioSegmentLoader_=new jo(Us.mergeOptions(b,{loaderType:"audio"}),e),i.subtitleSegmentLoader_=new ll(Us.mergeOptions(b,{loaderType:"vtt",featuresNativeTextTracks:i.tech_.featuresNativeTextTracks}),e),i.setupSegmentLoaderListeners_(),i.experimentalBufferBasedABR&&(i.masterPlaylistLoader_.one("loadedplaylist",(function(){return i.startABRTimer_()})),i.tech_.on("pause",(function(){return i.stopABRTimer_()})),i.tech_.on("play",(function(){return i.startABRTimer_()}))),xl.forEach((function(t){i[t+"_"]=Sl.bind(u()(i),t)})),i.logger_=xo("MPC"),i.triggeredFmp4Usage=!1,i.masterPlaylistLoader_.load(),i}d()(e,t);var i=e.prototype;return i.checkABR_=function(){var t=this.selectPlaylist();this.shouldSwitchToMedia_(t)&&this.masterPlaylistLoader_.media(t)},i.startABRTimer_=function(){var t=this;this.stopABRTimer_(),this.abrTimer_=r.a.setInterval((function(){return t.checkABR_()}),250)},i.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(r.a.clearInterval(this.abrTimer_),this.abrTimer_=null)},i.setupMasterPlaylistLoaderListeners_=function(){var t=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var e=t.masterPlaylistLoader_.media(),i=1.5*e.targetDuration*1e3;ya(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())?t.requestOptions_.timeout=0:t.requestOptions_.timeout=i,e.endList&&"none"!==t.tech_.preload()&&(t.mainSegmentLoader_.playlist(e,t.requestOptions_),t.mainSegmentLoader_.load()),Tl({sourceType:t.sourceType_,segmentLoaders:{AUDIO:t.audioSegmentLoader_,SUBTITLES:t.subtitleSegmentLoader_,main:t.mainSegmentLoader_},tech:t.tech_,requestOptions:t.requestOptions_,masterPlaylistLoader:t.masterPlaylistLoader_,vhs:t.vhs_,master:t.master(),mediaTypes:t.mediaTypes_,blacklistCurrentPlaylist:t.blacklistCurrentPlaylist.bind(t)}),t.triggerPresenceUsage_(t.master(),e),t.setupFirstPlay(),!t.mediaTypes_.AUDIO.activePlaylistLoader||t.mediaTypes_.AUDIO.activePlaylistLoader.media()?t.trigger("selectedinitialmedia"):t.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){t.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){var e=t.masterPlaylistLoader_.media();if(!e){var i;if(t.excludeUnsupportedVariants_(),t.enableLowInitialPlaylist&&(i=t.selectInitialPlaylist()),i||(i=t.selectPlaylist()),!i||!t.shouldSwitchToMedia_(i))return;if(t.initialMedia_=i,t.masterPlaylistLoader_.media(t.initialMedia_),!("vhs-json"===t.sourceType_&&t.initialMedia_.segments))return;e=t.initialMedia_}t.handleUpdatedMediaPlaylist(e)})),this.masterPlaylistLoader_.on("error",(function(){t.blacklistCurrentPlaylist(t.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){t.mainSegmentLoader_.abort(),t.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var e=t.masterPlaylistLoader_.media(),i=1.5*e.targetDuration*1e3;ya(t.masterPlaylistLoader_.master,t.masterPlaylistLoader_.media())?t.requestOptions_.timeout=0:t.requestOptions_.timeout=i,t.mainSegmentLoader_.playlist(e,t.requestOptions_),t.mainSegmentLoader_.load(),t.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var e=t.masterPlaylistLoader_.media();t.stuckAtPlaylistEnd_(e)&&(t.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),t.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){t.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),t.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){t.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),t.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},i.handleUpdatedMediaPlaylist=function(t){this.useCueTags_&&this.updateAdCues_(t),this.mainSegmentLoader_.playlist(t,this.requestOptions_),this.updateDuration(!t.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},i.triggerPresenceUsage_=function(t,e){var i=t.mediaGroups||{},n=!0,r=Object.keys(i.AUDIO);for(var s in i.AUDIO)for(var a in i.AUDIO[s]){i.AUDIO[s][a].uri||(n=!1)}n&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(i.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Fo.Playlist.isAes(e)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),r.length&&Object.keys(i.AUDIO[r[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},i.shouldSwitchToMedia_=function(t){var e=this.masterPlaylistLoader_.media(),i=this.tech_.buffered();return function(t){var e=t.currentPlaylist,i=t.nextPlaylist,n=t.forwardBuffer,r=t.bufferLowWaterLine,s=t.bufferHighWaterLine,a=t.duration,o=t.experimentalBufferBasedABR,l=t.log;if(!i)return Us.log.warn("We received no playlist to switch to. Please check your stream."),!1;var h="allowing switch "+(e&&e.id||"null")+" -> "+i.id;if(!e||!e.endList)return l(h+" as current playlist "+(e?"is live":"is not set")),!0;if(i.id===e.id)return!1;var u=o?Wa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Wa.MAX_BUFFER_LOW_WATER_LINE;if(a<u)return l(h+" as duration < max low water line ("+a+" < "+u+")"),!0;var c=i.attributes.BANDWIDTH,d=e.attributes.BANDWIDTH;if(c<d&&(!o||n<s)){var p=h+" as next bandwidth < current bandwidth ("+c+" < "+d+")";return o&&(p+=" and forwardBuffer < bufferHighWaterLine ("+n+" < "+s+")"),l(p),!0}if((!o||c>d)&&n>=r){var f=h+" as forwardBuffer >= bufferLowWaterLine ("+n+" >= "+r+")";return o&&(f+=" and next bandwidth > current bandwidth ("+c+" > "+d+")"),l(f),!0}return l("not "+h+" as no switching criteria met"),!1}({currentPlaylist:e,nextPlaylist:t,forwardBuffer:i.length?i.end(i.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},i.setupSegmentLoaderListeners_=function(){var t=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var e=t.selectPlaylist();t.shouldSwitchToMedia_(e)&&t.masterPlaylistLoader_.media(e),t.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){t.trigger("progress")}))),this.mainSegmentLoader_.on("error",(function(){t.blacklistCurrentPlaylist(t.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){t.error=t.mainSegmentLoader_.error_,t.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){t.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){t.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),t.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){t.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){t.error=t.audioSegmentLoader_.error_,t.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){t.logger_("main segment loader ended"),t.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(e){t.experimentalBufferBasedABR||(t.delegateLoaders_("all",["abort"]),t.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var e=function(){if(!t.sourceUpdater_.hasCreatedSourceBuffers())return t.tryToCreateSourceBuffers_();var e=t.getCodecsOrExclude_();e&&t.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",(function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:"usage",name:"vhs-fmp4"}),t.tech_.trigger({type:"usage",name:"hls-fmp4"}),t.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){t.triggeredFmp4Usage||(t.tech_.trigger({type:"usage",name:"vhs-fmp4"}),t.tech_.trigger({type:"usage",name:"hls-fmp4"}),t.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){t.logger_("audioSegmentLoader ended"),t.onEndOfStream()}))},i.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},i.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},i.smoothQualityChange_=function(t){void 0===t&&(t=this.selectPlaylist()),t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetLoader())},i.fastQualityChange_=function(t){var e=this;void 0===t&&(t=this.selectPlaylist()),t!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetEverything((function(){Us.browser.IE_VERSION||Us.browser.IS_EDGE?e.tech_.setCurrentTime(e.tech_.currentTime()+.04):e.tech_.setCurrentTime(e.tech_.currentTime())})))},i.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var t=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<t.start(0)?this.tech_.setCurrentTime(t.end(t.length-1)):void 0}},i.setupFirstPlay=function(){var t=this,e=this.masterPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList){var i=this.seekable();if(!i.length)return!1;if(Us.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){t.trigger("firstplay"),t.tech_.setCurrentTime(i.end(0)),t.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(i.end(0))}return this.hasPlayed_=!0,this.load(),!0},i.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var t=this.tech_.play();void 0!==t&&"function"==typeof t.then&&t.then(null,(function(t){}))}this.trigger("sourceopen")},i.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var t=this.inbandTextTracks_.metadataTrack_.cues;if(t&&t.length){var e=this.duration();t[t.length-1].endTime=isNaN(e)||Math.abs(e)===1/0?Number.MAX_VALUE:e}}},i.handleDurationChange_=function(){this.tech_.trigger("durationchange")},i.onEndOfStream=function(){var t=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?t&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),t&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},i.stuckAtPlaylistEnd_=function(t){if(!this.seekable().length)return!1;var e=this.syncController_.getExpiredTime(t,this.duration());if(null===e)return!1;var i=Fo.Playlist.playlistEnd(t,e),n=this.tech_.currentTime(),r=this.tech_.buffered();if(!r.length)return i-n<=.1;var s=r.end(r.length-1);return s-n<=.1&&i-s<=.1},i.blacklistCurrentPlaylist=function(t,e){void 0===t&&(t={});var i=t.playlist||this.masterPlaylistLoader_.media();if(e=e||t.blacklistDuration||this.blacklistDuration,!i)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));var n=this.masterPlaylistLoader_.master.playlists,r=n.filter(ma),s=1===r.length&&r[0]===i;if(1===n.length&&e!==1/0)return Us.log.warn("Problem encountered with playlist "+i.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(s);if(s){var a=!1;n.forEach((function(t){if(t!==i){var e=t.excludeUntil;void 0!==e&&e!==1/0&&(a=!0,delete t.excludeUntil)}})),a&&(Us.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}i.excludeUntil=Date.now()+1e3*e,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var l=t.internal?this.logger_:Us.log.warn,h=t.message?" "+t.message:"";l((t.internal?"Internal problem":"Problem")+" encountered with playlist "+i.id+"."+h+" Switching to playlist "+o.id+"."),o.attributes.AUDIO!==i.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==i.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var u=o.targetDuration/2*1e3||5e3,c="number"==typeof o.lastRequest&&Date.now()-o.lastRequest<=u;return this.masterPlaylistLoader_.media(o,s||c)},i.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},i.delegateLoaders_=function(t,e){var i=this,n=[],r="all"===t;(r||"main"===t)&&n.push(this.masterPlaylistLoader_);var s=[];(r||"audio"===t)&&s.push("AUDIO"),(r||"subtitle"===t)&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach((function(t){var e=i.mediaTypes_[t]&&i.mediaTypes_[t].activePlaylistLoader;e&&n.push(e)})),["main","audio","subtitle"].forEach((function(e){var r=i[e+"SegmentLoader_"];!r||t!==e&&"all"!==t||n.push(r)})),n.forEach((function(t){return e.forEach((function(e){"function"==typeof t[e]&&t[e]()}))}))},i.setCurrentTime=function(t){var e=ra(this.tech_.buffered(),t);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?e&&e.length?t:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},i.duration=function(){if(!this.masterPlaylistLoader_)return 0;var t=this.masterPlaylistLoader_.media();return t?t.endList?this.mediaSource?this.mediaSource.duration:Fo.Playlist.duration(t):1/0:0},i.seekable=function(){return this.seekable_},i.onSyncInfoUpdate_=function(){var t;if(this.masterPlaylistLoader_){var e=this.masterPlaylistLoader_.media();if(e){var i=this.syncController_.getExpiredTime(e,this.duration());if(null!==i){var n=this.masterPlaylistLoader_.master.suggestedPresentationDelay,r=Fo.Playlist.seekable(e,i,n);if(0!==r.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(e=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(i=this.syncController_.getExpiredTime(e,this.duration())))return;if(0===(t=Fo.Playlist.seekable(e,i,n)).length)return}var s,a;this.seekable_&&this.seekable_.length&&(s=this.seekable_.end(0),a=this.seekable_.start(0)),t?t.start(0)>r.end(0)||r.start(0)>t.end(0)?this.seekable_=r:this.seekable_=Us.createTimeRanges([[t.start(0)>r.start(0)?t.start(0):r.start(0),t.end(0)<r.end(0)?t.end(0):r.end(0)]]):this.seekable_=r,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===s&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+aa(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},i.updateDuration=function(t){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,t),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(t){var e=this.seekable();if(!e.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1))}else{var i=this.tech_.buffered(),n=Fo.Playlist.duration(this.masterPlaylistLoader_.media());i.length>0&&(n=Math.max(n,i.end(i.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n)}},i.dispose=function(){var t=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach((function(e){var i=t.mediaTypes_[e].groups;for(var n in i)i[n].forEach((function(t){t.playlistLoader&&t.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},i.master=function(){return this.masterPlaylistLoader_.master},i.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},i.areMediaTypesKnown_=function(){var t=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||t&&!this.audioSegmentLoader_.currentMediaInfo_)},i.getCodecsOrExclude_=function(){var t=this,e={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};e.video=e.main;var i=To(this.master(),this.media()),n={},r=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(n.video=i.video||e.main.videoCodec||Nt.DEFAULT_VIDEO_CODEC),e.main.isMuxed&&(n.video+=","+(i.audio||e.main.audioCodec||Nt.DEFAULT_AUDIO_CODEC)),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||r)&&(n.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||Nt.DEFAULT_AUDIO_CODEC,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),n.audio||n.video){var s,a={};if(["video","audio"].forEach((function(t){if(n.hasOwnProperty(t)&&(r=e[t].isFmp4,o=n[t],!(r?Object(Nt.browserSupportsCodec)(o):Object(Nt.muxerSupportsCodec)(o)))){var i=e[t].isFmp4?"browser":"muxer";a[i]=a[i]||[],a[i].push(n[t]),"audio"===t&&(s=i)}var r,o})),r&&s&&this.media().attributes.AUDIO){var o=this.media().attributes.AUDIO;this.master().playlists.forEach((function(e){(e.attributes&&e.attributes.AUDIO)===o&&e!==t.media()&&(e.excludeUntil=1/0)})),this.logger_("excluding audio group "+o+" as "+s+' does not support codec(s): "'+n.audio+'"')}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var l=[];if(["video","audio"].forEach((function(e){var i=(Object(Nt.parseCodecs)(t.sourceUpdater_.codecs[e]||"")[e]||{}).type,r=(Object(Nt.parseCodecs)(n[e]||"")[e]||{}).type;i&&r&&i.toLowerCase()!==r.toLowerCase()&&l.push('"'+t.sourceUpdater_.codecs[e]+'" -> "'+n[e]+'"')})),l.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+l.join(", ")+".",blacklistDuration:1/0,internal:!0})}return n}var h=Object.keys(a).reduce((function(t,e){return t&&(t+=", "),t+=e+' does not support codec(s): "'+a[e].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:h,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},i.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var t=this.getCodecsOrExclude_();if(t){this.sourceUpdater_.createSourceBuffers(t);var e=[t.video,t.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(e)}}},i.excludeUnsupportedVariants_=function(){var t=this,e=this.master().playlists,i=[];Object.keys(e).forEach((function(n){var r=e[n];if(-1===i.indexOf(r.id)){i.push(r.id);var s=To(t.master,r),a=[];!s.audio||Object(Nt.muxerSupportsCodec)(s.audio)||Object(Nt.browserSupportsCodec)(s.audio)||(r.excludeUntil=1/0,a.push("audio codec "+s.audio)),!s.video||Object(Nt.muxerSupportsCodec)(s.video)||Object(Nt.browserSupportsCodec)(s.video)||(r.excludeUntil=1/0,a.push("video codec "+s.video)),s.text&&"stpp.ttml.im1t"===s.text&&(r.excludeUntil=1/0,a.push("text codec "+s.text)),a.length&&t.logger_("excluding "+r.id+" as codecs "+a.join(", ")+" are unsupported")}}))},i.excludeIncompatibleVariants_=function(t){var e=this,i=Object(Nt.parseCodecs)(t),n=Object.keys(i).length;this.master().playlists.forEach((function(t){if(t.excludeUntil!==1/0){var r={},s=2,a=[],o=To(e.masterPlaylistLoader_.master,t);if(o.audio||o.video){var l=[o.video,o.audio].filter(Boolean).join(",");r=Object(Nt.parseCodecs)(l),s=Object.keys(r).length}s!==n&&(a.push('codec count "'+s+'" !== "'+n+'"'),t.excludeUntil=1/0),e.sourceUpdater_.canChangeType()||(r.video&&i.video&&r.video.type.toLowerCase()!==i.video.type.toLowerCase()&&(a.push('video codec "'+r.video.type+'" !== "'+i.video.type+'"'),t.excludeUntil=1/0),r.audio&&i.audio&&r.audio.type.toLowerCase()!==i.audio.type.toLowerCase()&&(t.excludeUntil=1/0,a.push('audio codec "'+r.audio.type+'" !== "'+i.audio.type+'"'))),a.length&&e.logger_("blacklisting "+t.id+": "+a.join(" && "))}}))},i.updateAdCues_=function(t){var e=0,i=this.seekable();i.length&&(e=i.start(0)),function(t,e,i){if(void 0===i&&(i=0),t.segments)for(var n,s=i,a=0;a<t.segments.length;a++){var o=t.segments[a];if(n||(n=hl(e,s+o.duration/2)),n){if("cueIn"in o){n.endTime=s,n.adEndTime=s,s+=o.duration,n=null;continue}if(s<n.endTime){s+=o.duration;continue}n.endTime+=o.duration}else if("cueOut"in o&&((n=new r.a.VTTCue(s,s+o.duration,o.cueOut)).adStartTime=s,n.adEndTime=s+parseFloat(o.cueOut),e.addCue(n)),"cueOutCont"in o){var l=o.cueOutCont.split("/").map(parseFloat),h=l[0],u=l[1];(n=new r.a.VTTCue(s,s+o.duration,"")).adStartTime=s-h,n.adEndTime=n.adStartTime+u,e.addCue(n)}s+=o.duration}}(t,this.cueTagsTrack_,e)},i.goalBufferLength=function(){var t=this.tech_.currentTime(),e=Wa.GOAL_BUFFER_LENGTH,i=Wa.GOAL_BUFFER_LENGTH_RATE,n=Math.max(e,Wa.MAX_GOAL_BUFFER_LENGTH);return Math.min(e+t*i,n)},i.bufferLowWaterLine=function(){var t=this.tech_.currentTime(),e=Wa.BUFFER_LOW_WATER_LINE,i=Wa.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(e,Wa.MAX_BUFFER_LOW_WATER_LINE),r=Math.max(e,Wa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(e+t*i,this.experimentalBufferBasedABR?r:n)},i.bufferHighWaterLine=function(){return Wa.BUFFER_HIGH_WATER_LINE},e}(Us.EventTarget),kl=function(t,e,i){var n,r,s,a=t.masterPlaylistController_,o=a[(t.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(a);if(e.attributes.RESOLUTION){var l=e.attributes.RESOLUTION;this.width=l.width,this.height=l.height}this.bandwidth=e.attributes.BANDWIDTH,this.codecs=To(a.master(),e),this.playlist=e,this.id=i,this.enabled=(n=t.playlists,r=e.id,s=o,function(t){var e=n.master.playlists[r],i=ga(e),a=ma(e);return void 0===t?a:(t?delete e.disabled:e.disabled=!0,t===a||i||(s(),t?n.trigger("renditionenabled"):n.trigger("renditiondisabled")),t)})},Cl=["seeking","seeked","pause","playing","error"],El=function(){function t(t){var e=this;this.masterPlaylistController_=t.masterPlaylistController,this.tech_=t.tech,this.seekable=t.seekable,this.allowSeeksWithinUnsafeLiveWindow=t.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=t.liveRangeSafeTimeDelta,this.media=t.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=xo("PlaybackWatcher"),this.logger_("initialize");var i=function(){return e.monitorCurrentTime_()},n=function(){return e.techWaiting_()},s=function(){return e.cancelTimer_()},a=function(){return e.fixesBadSeeks_()},o=this.masterPlaylistController_,l=["main","subtitle","audio"],h={};l.forEach((function(t){h[t]={reset:function(){return e.resetSegmentDownloads_(t)},updateend:function(){return e.checkSegmentDownloads_(t)}},o[t+"SegmentLoader_"].on("appendsdone",h[t].updateend),o[t+"SegmentLoader_"].on("playlistupdate",h[t].reset),e.tech_.on(["seeked","seeking"],h[t].reset)})),this.tech_.on("seekablechanged",a),this.tech_.on("waiting",n),this.tech_.on(Cl,s),this.tech_.on("canplay",i),this.dispose=function(){e.logger_("dispose"),e.tech_.off("seekablechanged",a),e.tech_.off("waiting",n),e.tech_.off(Cl,s),e.tech_.off("canplay",i),l.forEach((function(t){o[t+"SegmentLoader_"].off("appendsdone",h[t].updateend),o[t+"SegmentLoader_"].off("playlistupdate",h[t].reset),e.tech_.off(["seeked","seeking"],h[t].reset)})),e.checkCurrentTimeTimeout_&&r.a.clearTimeout(e.checkCurrentTimeTimeout_),e.cancelTimer_()}}var e=t.prototype;return e.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&r.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=r.a.setTimeout(this.monitorCurrentTime_.bind(this),250)},e.resetSegmentDownloads_=function(t){var e=this.masterPlaylistController_[t+"SegmentLoader_"];this[t+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+t+" loader"),this[t+"StalledDownloads_"]=0,this[t+"Buffered_"]=e.buffered_()},e.checkSegmentDownloads_=function(t){var e=this.masterPlaylistController_,i=e[t+"SegmentLoader_"],n=i.buffered_(),r=function(t,e){if(t===e)return!1;if(!t&&e||!e&&t)return!0;if(t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t.start(i)!==e.start(i)||t.end(i)!==e.end(i))return!0;return!1}(this[t+"Buffered_"],n);this[t+"Buffered_"]=n,r?this.resetSegmentDownloads_(t):(this[t+"StalledDownloads_"]++,this.logger_("found #"+this[t+"StalledDownloads_"]+" "+t+" appends that did not increase buffer (possible stalled download)",{playlistId:i.playlist_&&i.playlist_.id,buffered:oa(n)}),this[t+"StalledDownloads_"]<10||(this.logger_(t+" loader stalled download exclusion"),this.resetSegmentDownloads_(t),this.tech_.trigger({type:"usage",name:"vhs-"+t+"-download-exclusion"}),"subtitle"!==t&&e.blacklistCurrentPlaylist({message:"Excessive "+t+" segment downloading detected."},1/0)))},e.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var t=this.tech_.currentTime(),e=this.tech_.buffered();if(this.lastRecordedTime===t&&(!e.length||t+.1>=e.end(e.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&t===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):t===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=t)}},e.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},e.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var t,e=this.seekable(),i=this.tech_.currentTime();this.afterSeekableWindow_(e,i,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(t=e.end(e.length-1));if(this.beforeSeekableWindow_(e,i)){var n=e.start(0);t=n+(n===e.end(0)?0:.1)}if(void 0!==t)return this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+aa(e)+". Seeking to "+t+"."),this.tech_.setCurrentTime(t),!0;var r=this.tech_.buffered();return!!function(t){var e=t.buffered,i=t.targetDuration,n=t.currentTime;return!!e.length&&(!(e.end(0)-e.start(0)<2*i)&&(!(n>e.start(0))&&e.start(0)-n<i))}({buffered:r,targetDuration:this.media().targetDuration,currentTime:i})&&(t=r.start(0)+.1,this.logger_("Buffered region starts ("+r.start(0)+") just beyond seek point ("+i+"). Seeking to "+t+"."),this.tech_.setCurrentTime(t),!0)},e.waiting_=function(){if(!this.techWaiting_()){var t=this.tech_.currentTime(),e=this.tech_.buffered(),i=ra(e,t);return i.length&&t+3<=i.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(t),this.logger_("Stopped at "+t+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},e.techWaiting_=function(){var t=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(t,e)){var i=t.end(t.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,r=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.videoBuffered(),currentTime:e}))return this.cancelTimer_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var s=sa(r,e);if(s.length>0){var a=s.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+a+", seeking to "+s.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,e),!0}return!1},e.afterSeekableWindow_=function(t,e,i,n){if(void 0===n&&(n=!1),!t.length)return!1;var r=t.end(t.length-1)+.1;return!i.endList&&n&&(r=t.end(t.length-1)+3*i.targetDuration),e>r},e.beforeSeekableWindow_=function(t,e){return!!(t.length&&t.start(0)>0&&e<t.start(0)-this.liveRangeSafeTimeDelta)},e.videoUnderflow_=function(t){var e=t.videoBuffered,i=t.audioBuffered,n=t.currentTime;if(e){var r;if(e.length&&i.length){var s=ra(e,n-3),a=ra(e,n),o=ra(i,n);o.length&&!a.length&&s.length&&(r={start:s.end(0),end:o.end(0)})}else{sa(e,n).length||(r=this.gapFromVideoUnderflow_(e,n))}return!!r&&(this.logger_("Encountered a gap in video from "+r.start+" to "+r.end+". Seeking to current time "+n),!0)}},e.skipTheGap_=function(t){var e=this.tech_.buffered(),i=this.tech_.currentTime(),n=sa(e,i);this.cancelTimer_(),0!==n.length&&i===t&&(this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",t,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+1/30),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},e.gapFromVideoUnderflow_=function(t,e){for(var i=function(t){if(t.length<2)return Us.createTimeRanges();for(var e=[],i=1;i<t.length;i++){var n=t.end(i-1),r=t.start(i);e.push([n,r])}return Us.createTimeRanges(e)}(t),n=0;n<i.length;n++){var r=i.start(n),s=i.end(n);if(e-r<4&&e-r>2)return{start:r,end:s}}return null},t}(),Al={errorInterval:30,getSource:function(t){return t(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Pl=function(t){!function t(e,i){var n=0,r=0,s=Us.mergeOptions(Al,i);e.ready((function(){e.trigger({type:"usage",name:"vhs-error-reload-initialized"}),e.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){r&&e.currentTime(r)},o=function(t){null!=t&&(r=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",a),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.trigger({type:"usage",name:"hls-error-reload"}),e.play())},l=function(){return Date.now()-n<1e3*s.errorInterval?(e.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void e.trigger({type:"usage",name:"hls-error-reload-canceled"})):s.getSource&&"function"==typeof s.getSource?(n=Date.now(),s.getSource.call(e,o)):void Us.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},h=function t(){e.off("loadedmetadata",a),e.off("error",l),e.off("dispose",t)};e.on("error",l),e.on("dispose",h),e.reloadSourceOnError=function(i){h(),t(e,i)}}(this,t)},Ol={PlaylistLoader:ia,Playlist:ba,utils:Ma,STANDARD_PLAYLIST_SELECTOR:Po,INITIAL_PLAYLIST_SELECTOR:function(){var t=this,e=this.playlists.master.playlists.filter(ba.isEnabled);return Co(e,(function(t,e){return Eo(t,e)})),e.filter((function(e){return!!To(t.playlists.master,e).video}))[0]||null},lastBandwidthSelector:Po,movingAverageBandwidthSelector:function(t){var e=-1;if(t<0||t>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var i=this.useDevicePixelRatio&&r.a.devicePixelRatio||1;return e<0&&(e=this.systemBandwidth),e=t*this.systemBandwidth+(1-t)*e,Ao(this.playlists.master,e,parseInt(ko(this.tech_.el(),"width"),10)*i,parseInt(ko(this.tech_.el(),"height"),10)*i,this.limitRenditionByPlayerDimensions)}},comparePlaylistBandwidth:Eo,comparePlaylistResolution:function(t,e){var i,n;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),i=i||r.a.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),i===(n=n||r.a.Number.MAX_VALUE)&&t.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?t.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-n},xhr:Sa()};Object.keys(Wa).forEach((function(t){Object.defineProperty(Ol,t,{get:function(){return Us.log.warn("using Vhs."+t+" is UNSAFE be sure you know what you are doing"),Wa[t]},set:function(e){Us.log.warn("using Vhs."+t+" is UNSAFE be sure you know what you are doing"),"number"!=typeof e||e<0?Us.log.warn("value of Vhs."+t+" must be greater than or equal to 0"):Wa[t]=e}})}));var Ll=function(t,e){for(var i=e.media(),n=-1,r=0;r<t.length;r++)if(t[r].id===i.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})};Ol.canPlaySource=function(){return Us.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Ml=function(t){var e=t.player,i=t.sourceKeySystems,n=t.audioMedia,r=t.mainPlaylists;if(!e.eme.initializeMediaKeys)return Promise.resolve();var s=function(t,e){return t.reduce((function(t,i){if(!i.contentProtection)return t;var n=e.reduce((function(t,e){var n=i.contentProtection[e];return n&&n.pssh&&(t[e]={pssh:n.pssh}),t}),{});return Object.keys(n).length&&t.push(n),t}),[])}(n?r.concat([n]):r,Object.keys(i)),a=[],o=[];return s.forEach((function(t){o.push(new Promise((function(t,i){e.tech_.one("keysessioncreated",t)}))),a.push(new Promise((function(i,n){e.eme.initializeMediaKeys({keySystems:t},(function(t){t?n(t):i()}))})))})),Promise.race([Promise.all(a),Promise.race(o)])},Il=function(t){var e=t.player,i=function(t,e,i){if(!t)return t;var n={video:e&&e.attributes&&e.attributes.CODECS,audio:i&&i.attributes&&i.attributes.CODECS};!n.audio&&n.video&&n.video.split(",").length>1&&n.video.split(",").forEach((function(t){t=t.trim(),Object(Nt.isAudioCodec)(t)?n.audio=t:Object(Nt.isVideoCodec)(t)&&(n.video=t)}));var r=n.video?'video/mp4;codecs="'+n.video+'"':null,s=n.audio?'audio/mp4;codecs="'+n.audio+'"':null,a={};for(var o in t)a[o]={audioContentType:s,videoContentType:r},e.contentProtection&&e.contentProtection[o]&&e.contentProtection[o].pssh&&(a[o].pssh=e.contentProtection[o].pssh),"string"==typeof t[o]&&(a[o].url=t[o]);return Us.mergeOptions(t,a)}(t.sourceKeySystems,t.media,t.audioMedia);return!!i&&(e.currentSource().keySystems=i,!(i&&!e.eme)||(Us.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},Dl=function(){if(!r.a.localStorage)return null;var t=r.a.localStorage.getItem("videojs-vhs");if(!t)return null;try{return JSON.parse(t)}catch(t){return null}};Ol.supportsNativeHls=function(){if(!a.a||!a.a.createElement)return!1;var t=a.a.createElement("video");if(!Us.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(e){return/maybe|probably/i.test(t.canPlayType(e))}))}(),Ol.supportsNativeDash=!!(a.a&&a.a.createElement&&Us.getTech("Html5").isSupported())&&/maybe|probably/i.test(a.a.createElement("video").canPlayType("application/dash+xml")),Ol.supportsTypeNatively=function(t){return"hls"===t?Ol.supportsNativeHls:"dash"===t&&Ol.supportsNativeDash},Ol.isSupported=function(){return Us.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Rl=function(t){function e(e,i,n){var r;if(r=t.call(this,i,Us.mergeOptions(n.hls,n.vhs))||this,n.hls&&Object.keys(n.hls).length&&Us.log.warn("Using hls options is deprecated. Use vhs instead."),r.logger_=xo("VhsHandler"),i.options_&&i.options_.playerId){var s=Us(i.options_.playerId);s.hasOwnProperty("hls")||Object.defineProperty(s,"hls",{get:function(){return Us.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),i.trigger({type:"usage",name:"hls-player-access"}),u()(r)},configurable:!0}),s.hasOwnProperty("vhs")||Object.defineProperty(s,"vhs",{get:function(){return Us.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),i.trigger({type:"usage",name:"vhs-player-access"}),u()(r)},configurable:!0}),s.hasOwnProperty("dash")||Object.defineProperty(s,"dash",{get:function(){return Us.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),u()(r)},configurable:!0}),r.player_=s}if(r.tech_=i,r.source_=e,r.stats={},r.ignoreNextSeekingEvent_=!1,r.setOptions_(),r.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks)i.overrideNativeAudioTracks(!0),i.overrideNativeVideoTracks(!0);else if(r.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return r.on(a.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(t){var e=a.a.fullscreenElement||a.a.webkitFullscreenElement||a.a.mozFullScreenElement||a.a.msFullscreenElement;e&&e.contains(r.tech_.el())&&r.masterPlaylistController_.smoothQualityChange_()})),r.on(r.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),r.on(r.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),r.on(r.tech_,"play",r.play),r}d()(e,t);var i=e.prototype;return i.setOptions_=function(){var t=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.handlePartialData=this.options_.handlePartialData||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var e=Dl();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Wa.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Wa.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","handlePartialData","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta"].forEach((function(e){void 0!==t.source_[e]&&(t.options_[e]=t.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},i.src=function(t,e){var i=this;if(t){var n;this.setOptions_(),this.options_.src=0===(n=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(n.substring(n.indexOf(",")+1)):n,this.options_.tech=this.tech_,this.options_.externVhs=Ol,this.options_.sourceType=Object(R.simpleTypeFromSourceType)(e),this.options_.seekTo=function(t){i.tech_.setCurrentTime(t)},this.masterPlaylistController_=new wl(this.options_);var s=Us.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return i.seekable()},media:function(){return i.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new El(s),this.masterPlaylistController_.on("error",(function(){var t=Us.players[i.tech_.options_.playerId],e=i.masterPlaylistController_.error;"object"!=typeof e||e.code?"string"==typeof e&&(e={message:e,code:3}):e.code=3,t.error(e)}));var a=this.options_.experimentalBufferBasedABR?Ol.movingAverageBandwidthSelector(.55):Ol.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):a.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Ol.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(t){this.masterPlaylistController_.selectPlaylist=t.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(t){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=t,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(t){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=t,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var t,e=1/(this.bandwidth||1);return t=this.throughput>0?1/this.throughput:0,Math.floor(1/(e+t))},set:function(){Us.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return i.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return i.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return i.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return i.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return i.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return i.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return i.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return i.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return oa(i.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return i.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return i.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return i.tech_.name_},enumerable:!0},duration:{get:function(){return i.tech_.duration()},enumerable:!0},master:{get:function(){return i.playlists.master},enumerable:!0},playerDimensions:{get:function(){return i.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return oa(i.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return i.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){i.options_.useBandwidthFromLocalStorage&&function(t){if(!r.a.localStorage)return!1;var e=Dl();e=e?Us.mergeOptions(e,t):t;try{r.a.localStorage.setItem("videojs-vhs",JSON.stringify(e))}catch(t){return!1}}({bandwidth:i.bandwidth,throughput:Math.round(i.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,e;e=(t=i).playlists,t.representations=function(){return e&&e.master&&e.master.playlists?e.master.playlists.filter((function(t){return!ga(t)})).map((function(e,i){return new kl(t,e,e.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){i.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=r.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},i.setupEme_=function(){var t=this,e=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=Il({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});11!==Us.browser.IE_VERSION&&i?(this.logger_("waiting for EME key session creation"),Ml({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){t.logger_("created EME key session"),t.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(e){t.logger_("error while creating EME key session",e),t.player_.error({message:"Failed to initialize media keys for EME",code:3})}))):this.masterPlaylistController_.sourceUpdater_.initializedEme()},i.setupQualityLevels_=function(){var t=this,e=Us.players[this.tech_.options_.playerId];e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e,i;e=t.qualityLevels_,(i=t).representations().forEach((function(t){e.addQualityLevel(t)})),Ll(e,i.playlists)})),this.playlists.on("mediachange",(function(){Ll(t.qualityLevels_,t.playlists)})))},e.version=function(){return{"@videojs/http-streaming":"2.4.2","mux.js":"5.8.0","mpd-parser":"0.15.0","m3u8-parser":"4.5.0","aes-decrypter":"3.1.0"}},i.version=function(){return this.constructor.version()},i.canChangeType=function(){return sl.canChangeType()},i.play=function(){this.masterPlaylistController_.play()},i.setCurrentTime=function(t){this.masterPlaylistController_.setCurrentTime(t)},i.duration=function(){return this.masterPlaylistController_.duration()},i.seekable=function(){return this.masterPlaylistController_.seekable()},i.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&r.a.URL.revokeObjectURL&&(r.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),t.prototype.dispose.call(this)},i.convertToProgramTime=function(t,e){return Ia({playlist:this.masterPlaylistController_.media(),time:t,callback:e})},i.seekToProgramTime=function(t,e,i,n){return void 0===i&&(i=!0),void 0===n&&(n=2),Da({programTime:t,playlist:this.masterPlaylistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:e})},e}(Us.getComponent("Component")),Nl={name:"videojs-http-streaming",VERSION:"2.4.2",canHandleSource:function(t,e){void 0===e&&(e={});var i=Us.mergeOptions(Us.options,e);return Nl.canPlayType(t.type,i)},handleSource:function(t,e,i){void 0===i&&(i={});var n=Us.mergeOptions(Us.options,i);return e.vhs=new Rl(t,e,n),Us.hasOwnProperty("hls")||Object.defineProperty(e,"hls",{get:function(){return Us.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),e.vhs},configurable:!0}),e.vhs.xhr=Sa(),e.vhs.src(t.src,t.type),e.vhs},canPlayType:function(t,e){void 0===e&&(e={});var i=Us.mergeOptions(Us.options,e).vhs.overrideNative,n=void 0===i?!Us.browser.IS_ANY_SAFARI:i,r=Object(R.simpleTypeFromSourceType)(t);return r&&(!Ol.supportsTypeNatively(r)||n)?"maybe":""}};Object(Nt.browserSupportsCodec)("avc1.4d400d,mp4a.40.2")&&Us.getTech("Html5").registerSourceHandler(Nl,0),Us.VhsHandler=Rl,Object.defineProperty(Us,"HlsHandler",{get:function(){return Us.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Rl},configurable:!0}),Us.VhsSourceHandler=Nl,Object.defineProperty(Us,"HlsSourceHandler",{get:function(){return Us.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Nl},configurable:!0}),Us.Vhs=Ol,Object.defineProperty(Us,"Hls",{get:function(){return Us.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Ol},configurable:!0}),Us.use||(Us.registerComponent("Hls",Ol),Us.registerComponent("Vhs",Ol)),Us.options.vhs=Us.options.vhs||{},Us.options.hls=Us.options.hls||{},Us.registerPlugin?Us.registerPlugin("reloadSourceOnError",Pl):Us.plugin("reloadSourceOnError",Pl);e.a=Us},743:function(t,e,i){(function(e){var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||Function("return this")()}).call(this,i(59))},745:function(t,e,i){var n=i(743),r=i(788),s=i(801),a=i(1050),o=n.Symbol,l=r("wks");t.exports=function(t){return l[t]||(l[t]=a&&o[t]||(a?o:s)("Symbol."+t))}},746:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},747:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},748:function(t,e,i){var n=i(747);t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},750:function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},751:function(t,e,i){var n=i(760),r=i(766),s=i(797);t.exports=n?function(t,e,i){return r.f(t,e,s(1,i))}:function(t,e,i){return t[e]=i,t}},757:function(t,e,i){var n=i(743),r=i(948).f,s=i(751),a=i(767),o=i(799),l=i(1042),h=i(957);t.exports=function(t,e){var i,u,c,d,p,f=t.target,g=t.global,m=t.stat;if(i=g?n:m?n[f]||o(f,{}):(n[f]||{}).prototype)for(u in e){if(d=e[u],c=t.noTargetGet?(p=r(i,u))&&p.value:i[u],!h(g?u:f+(m?".":"#")+u,t.forced)&&void 0!==c){if(typeof d==typeof c)continue;l(d,c)}(t.sham||c&&c.sham)&&s(d,"sham",!0),a(i,u,d,t)}}},760:function(t,e,i){var n=i(746);t.exports=!n((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},764:function(t,e,i){(function(e){var i;i="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=i}).call(this,i(59))},765:function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},766:function(t,e,i){var n=i(760),r=i(951),s=i(748),a=i(950),o=Object.defineProperty;e.f=n?o:function(t,e,i){if(s(t),e=a(e,!0),s(i),r)try{return o(t,e,i)}catch(t){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},767:function(t,e,i){var n=i(743),r=i(788),s=i(751),a=i(750),o=i(799),l=i(953),h=i(773),u=h.get,c=h.enforce,d=String(l).split("toString");r("inspectSource",(function(t){return l.call(t)})),(t.exports=function(t,e,i,r){var l=!!r&&!!r.unsafe,h=!!r&&!!r.enumerable,u=!!r&&!!r.noTargetGet;"function"==typeof i&&("string"!=typeof e||a(i,"name")||s(i,"name",e),c(i).source=d.join("string"==typeof e?e:"")),t!==n?(l?!u&&t[e]&&(h=!0):delete t[e],h?t[e]=i:s(t,e,i)):h?t[e]=i:o(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||l.call(this)}))},768:function(t,e,i){var n=i(790),r=Math.min;t.exports=function(t){return t>0?r(n(t),9007199254740991):0}},773:function(t,e,i){var n,r,s,a=i(954),o=i(743),l=i(747),h=i(751),u=i(750),c=i(800),d=i(789),p=o.WeakMap;if(a){var f=new p,g=f.get,m=f.has,v=f.set;n=function(t,e){return v.call(f,t,e),e},r=function(t){return g.call(f,t)||{}},s=function(t){return m.call(f,t)}}else{var y=c("state");d[y]=!0,n=function(t,e){return h(t,y,e),e},r=function(t){return u(t,y)?t[y]:{}},s=function(t){return u(t,y)}}t.exports={set:n,get:r,has:s,enforce:function(t){return s(t)?r(t):n(t,{})},getterFor:function(t){return function(e){var i;if(!l(e)||(i=r(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}}}},774:function(t,e,i){var n=i(765);t.exports=function(t){return Object(n(t))}},775:function(t,e){t.exports={}},784:function(t,e){t.exports={toUnsigned:function(t){return t>>>0},toHexString:function(t){return("00"+t.toString(16)).slice(-2)}}},785:function(t,e,i){var n=i(786),r=i(765);t.exports=function(t){return n(r(t))}},786:function(t,e,i){var n=i(746),r=i(787),s="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?s.call(t,""):Object(t)}:Object},787:function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},788:function(t,e,i){var n=i(798),r=i(1041);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.4.0",mode:n?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},789:function(t,e){t.exports={}},790:function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:i)(t)}},797:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},798:function(t,e){t.exports=!1},799:function(t,e,i){var n=i(743),r=i(751);t.exports=function(t,e){try{r(n,t,e)}catch(i){n[t]=e}return e}},800:function(t,e,i){var n=i(788),r=i(801),s=n("keys");t.exports=function(t){return s[t]||(s[t]=r(t))}},801:function(t,e){var i=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++i+n).toString(36)}},802:function(t,e,i){var n=i(1044),r=i(743),s=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?s(n[t])||s(r[t]):n[t]&&n[t][e]||r[t]&&r[t][e]}},803:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},804:function(t,e,i){var n=i(959),r=i(786),s=i(774),a=i(768),o=i(1048),l=[].push,h=function(t){var e=1==t,i=2==t,h=3==t,u=4==t,c=6==t,d=5==t||c;return function(p,f,g,m){for(var v,y,b=s(p),_=r(b),T=n(f,g,3),x=a(_.length),S=0,w=m||o,k=e?w(p,x):i?w(p,0):void 0;x>S;S++)if((d||S in _)&&(y=T(v=_[S],S,b),t))if(e)k[S]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return S;case 2:l.call(k,v)}else if(u)return!1;return c?-1:h||u?u:k}};t.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6)}},805:function(t,e,i){var n=i(766).f,r=i(750),s=i(745)("toStringTag");t.exports=function(t,e,i){t&&!r(t=i?t:t.prototype,s)&&n(t,s,{configurable:!0,value:e})}},806:function(t,e,i){var n=i(789),r=i(747),s=i(750),a=i(766).f,o=i(801),l=i(1072),h=o("meta"),u=0,c=Object.isExtensible||function(){return!0},d=function(t){a(t,h,{value:{objectID:"O"+ ++u,weakData:{}}})},p=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,h)){if(!c(t))return"F";if(!e)return"E";d(t)}return t[h].objectID},getWeakData:function(t,e){if(!s(t,h)){if(!c(t))return!0;if(!e)return!1;d(t)}return t[h].weakData},onFreeze:function(t){return l&&p.REQUIRED&&c(t)&&!s(t,h)&&d(t),t}};n[h]=!0},807:function(t,e,i){"use strict";var n,r,s=i(1089),a=RegExp.prototype.exec,o=String.prototype.replace,l=a,h=(n=/a/,r=/b*/g,a.call(n,"a"),a.call(r,"a"),0!==n.lastIndex||0!==r.lastIndex),u=void 0!==/()??/.exec("")[1];(h||u)&&(l=function(t){var e,i,n,r,l=this;return u&&(i=new RegExp("^"+l.source+"$(?!\\s)",s.call(l))),h&&(e=l.lastIndex),n=a.call(l,t),h&&n&&(l.lastIndex=l.global?n.index+n[0].length:e),u&&n&&n.length>1&&o.call(n[0],i,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(n[r]=void 0)})),n}),t.exports=l},940:function(t,e){function i(t){if(t&&"object"==typeof t){var e=t.which||t.keyCode||t.charCode;e&&(t=e)}if("number"==typeof t)return a[t];var i,s=String(t);return(i=n[s.toLowerCase()])?i:(i=r[s.toLowerCase()])||(1===s.length?s.charCodeAt(0):void 0)}i.isEventKey=function(t,e){if(t&&"object"==typeof t){var i=t.which||t.keyCode||t.charCode;if(null==i)return!1;if("string"==typeof e){var s;if(s=n[e.toLowerCase()])return s===i;if(s=r[e.toLowerCase()])return s===i}else if("number"==typeof e)return e===i;return!1}};var n=(e=t.exports=i).code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},r=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};
84
- /*!
85
- * Programatically add the following
86
- */
87
- for(s=97;s<123;s++)n[String.fromCharCode(s)]=s-32;for(var s=48;s<58;s++)n[s-48]=s;for(s=1;s<13;s++)n["f"+s]=s+111;for(s=0;s<10;s++)n["numpad "+s]=s+96;var a=e.names=e.title={};for(s in n)a[n[s]]=s;for(var o in r)n[o]=r[o]},941:function(t,e,i){(function(e){var n,r=void 0!==e?e:"undefined"!=typeof window?window:{},s=i(999);"undefined"!=typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"])||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),t.exports=n}).call(this,i(59))},942:function(t,e,i){"use strict";
88
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var r=n(i(1005)),s=n(i(764));t.exports=function(t,e){return/^[a-z]+:/i.test(e)?e:(/\/\//i.test(t)||(t=r.buildAbsoluteURL(s.location&&s.location.href||"",t)),r.buildAbsoluteURL(t,e))}},943:function(t,e,i){"use strict";(function(e){var n,r=(n=i(764))&&"object"==typeof n&&"default"in n?n.default:n;t.exports=function(t){for(var i,n=(i=t,r.atob?r.atob(i):e.from(i,"base64").toString("binary")),s=new Uint8Array(n.length),a=0;a<n.length;a++)s[a]=n.charCodeAt(a);return s}}).call(this,i(1007).Buffer)},944:function(t,e){function i(t,e){for(var i in t)e[i]=t[i]}function n(t,e){var n=t.prototype;if(Object.create){var r=Object.create(e.prototype);n.__proto__=r}if(!(n instanceof e)){function s(){}s.prototype=e.prototype,i(n,s=new s),t.prototype=n=s}n.constructor!=t&&("function"!=typeof t&&console.error("unknow Class:"+t),n.constructor=t)}var r={},s=r.ELEMENT_NODE=1,a=r.ATTRIBUTE_NODE=2,o=r.TEXT_NODE=3,l=r.CDATA_SECTION_NODE=4,h=r.ENTITY_REFERENCE_NODE=5,u=r.ENTITY_NODE=6,c=r.PROCESSING_INSTRUCTION_NODE=7,d=r.COMMENT_NODE=8,p=r.DOCUMENT_NODE=9,f=r.DOCUMENT_TYPE_NODE=10,g=r.DOCUMENT_FRAGMENT_NODE=11,m=r.NOTATION_NODE=12,v={},y={},b=(v.INDEX_SIZE_ERR=(y[1]="Index size error",1),v.DOMSTRING_SIZE_ERR=(y[2]="DOMString size error",2),v.HIERARCHY_REQUEST_ERR=(y[3]="Hierarchy request error",3)),_=(v.WRONG_DOCUMENT_ERR=(y[4]="Wrong document",4),v.INVALID_CHARACTER_ERR=(y[5]="Invalid character",5),v.NO_DATA_ALLOWED_ERR=(y[6]="No data allowed",6),v.NO_MODIFICATION_ALLOWED_ERR=(y[7]="No modification allowed",7),v.NOT_FOUND_ERR=(y[8]="Not found",8)),T=(v.NOT_SUPPORTED_ERR=(y[9]="Not supported",9),v.INUSE_ATTRIBUTE_ERR=(y[10]="Attribute in use",10));v.INVALID_STATE_ERR=(y[11]="Invalid state",11),v.SYNTAX_ERR=(y[12]="Syntax error",12),v.INVALID_MODIFICATION_ERR=(y[13]="Invalid modification",13),v.NAMESPACE_ERR=(y[14]="Invalid namespace",14),v.INVALID_ACCESS_ERR=(y[15]="Invalid access",15);function x(t,e){if(e instanceof Error)var i=e;else i=this,Error.call(this,y[t]),this.message=y[t],Error.captureStackTrace&&Error.captureStackTrace(this,x);return i.code=t,e&&(this.message=this.message+": "+e),i}function S(){}function w(t,e){this._node=t,this._refresh=e,k(this)}function k(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var n=t._refresh(t._node);et(t,"length",n.length),i(n,t),t._inc=e}}function C(){}function E(t,e){for(var i=t.length;i--;)if(t[i]===e)return i}function A(t,e,i,n){if(n?e[E(e,n)]=i:e[e.length++]=i,t){i.ownerElement=t;var r=t.ownerDocument;r&&(n&&R(r,t,n),function(t,e,i){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==i.namespaceURI&&(e._nsMap[i.prefix?i.localName:""]=i.value)}(r,t,i))}}function P(t,e,i){var n=E(e,i);if(!(n>=0))throw x(_,new Error(t.tagName+"@"+i));for(var r=e.length-1;n<r;)e[n]=e[++n];if(e.length=r,t){var s=t.ownerDocument;s&&(R(s,t,i),i.ownerElement=null)}}function O(t){if(this._features={},t)for(var e in t)this._features=t[e]}function L(){}function M(t){return("<"==t?"&lt;":">"==t&&"&gt;")||"&"==t&&"&amp;"||'"'==t&&"&quot;"||"&#"+t.charCodeAt()+";"}function I(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(I(t,e))return!0}while(t=t.nextSibling)}function D(){}function R(t,e,i,n){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==i.namespaceURI&&delete e._nsMap[i.prefix?i.localName:""]}function N(t,e,i){if(t&&t._inc){t._inc++;var n=e.childNodes;if(i)n[n.length++]=i;else{for(var r=e.firstChild,s=0;r;)n[s++]=r,r=r.nextSibling;n.length=s}}}function B(t,e){var i=e.previousSibling,n=e.nextSibling;return i?i.nextSibling=n:t.firstChild=n,n?n.previousSibling=i:t.lastChild=i,N(t.ownerDocument,t),e}function j(t,e,i){var n=e.parentNode;if(n&&n.removeChild(e),e.nodeType===g){var r=e.firstChild;if(null==r)return e;var s=e.lastChild}else r=s=e;var a=i?i.previousSibling:t.lastChild;r.previousSibling=a,s.nextSibling=i,a?a.nextSibling=r:t.firstChild=r,null==i?t.lastChild=s:i.previousSibling=s;do{r.parentNode=t}while(r!==s&&(r=r.nextSibling));return N(t.ownerDocument||t,t),e.nodeType==g&&(e.firstChild=e.lastChild=null),e}function U(){this._nsMap={}}function F(){}function W(){}function z(){}function H(){}function V(){}function G(){}function X(){}function q(){}function Y(){}function K(){}function $(){}function Q(){}function Z(t,e){var i=[],n=9==this.nodeType?this.documentElement:this,r=n.prefix,s=n.namespaceURI;if(s&&null==r&&null==(r=n.lookupPrefix(s)))var a=[{namespace:s,prefix:null}];return tt(this,i,t,e,a),i.join("")}function J(t,e,i){var n=t.prefix||"",r=t.namespaceURI;if(!n&&!r)return!1;if("xml"===n&&"http://www.w3.org/XML/1998/namespace"===r||"http://www.w3.org/2000/xmlns/"==r)return!1;for(var s=i.length;s--;){var a=i[s];if(a.prefix==n)return a.namespace!=r}return!0}function tt(t,e,i,n,r){if(n){if(!(t=n(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case s:r||(r=[]);r.length;var u=t.attributes,m=u.length,v=t.firstChild,y=t.tagName;i="http://www.w3.org/1999/xhtml"===t.namespaceURI||i,e.push("<",y);for(var b=0;b<m;b++){"xmlns"==(_=u.item(b)).prefix?r.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&r.push({prefix:"",namespace:_.value})}for(b=0;b<m;b++){var _;if(J(_=u.item(b),0,r)){var T=_.prefix||"",x=_.namespaceURI,S=T?" xmlns:"+T:" xmlns";e.push(S,'="',x,'"'),r.push({prefix:T,namespace:x})}tt(_,e,i,n,r)}if(J(t,0,r)){T=t.prefix||"",x=t.namespaceURI,S=T?" xmlns:"+T:" xmlns";e.push(S,'="',x,'"'),r.push({prefix:T,namespace:x})}if(v||i&&!/^(?:meta|link|img|br|hr|input)$/i.test(y)){if(e.push(">"),i&&/^script$/i.test(y))for(;v;)v.data?e.push(v.data):tt(v,e,i,n,r),v=v.nextSibling;else for(;v;)tt(v,e,i,n,r),v=v.nextSibling;e.push("</",y,">")}else e.push("/>");return;case p:case g:for(v=t.firstChild;v;)tt(v,e,i,n,r),v=v.nextSibling;return;case a:return e.push(" ",t.name,'="',t.value.replace(/[<&"]/g,M),'"');case o:return e.push(t.data.replace(/[<&]/g,M));case l:return e.push("<![CDATA[",t.data,"]]>");case d:return e.push("\x3c!--",t.data,"--\x3e");case f:var w=t.publicId,k=t.systemId;if(e.push("<!DOCTYPE ",t.name),w)e.push(' PUBLIC "',w),k&&"."!=k&&e.push('" "',k),e.push('">');else if(k&&"."!=k)e.push(' SYSTEM "',k,'">');else{var C=t.internalSubset;C&&e.push(" [",C,"]"),e.push(">")}return;case c:return e.push("<?",t.target," ",t.data,"?>");case h:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function et(t,e,i){t[e]=i}x.prototype=Error.prototype,i(v,x),S.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var i=[],n=0;n<this.length;n++)tt(this[n],i,t,e);return i.join("")}},w.prototype.item=function(t){return k(this),this[t]},n(w,S),C.prototype={length:0,item:S.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var i=this[e];if(i.nodeName==t)return i}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new x(T);var i=this.getNamedItem(t.nodeName);return A(this._ownerElement,this,t,i),i},setNamedItemNS:function(t){var e,i=t.ownerElement;if(i&&i!=this._ownerElement)throw new x(T);return e=this.getNamedItemNS(t.namespaceURI,t.localName),A(this._ownerElement,this,t,e),e},removeNamedItem:function(t){var e=this.getNamedItem(t);return P(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var i=this.getNamedItemNS(t,e);return P(this._ownerElement,this,i),i},getNamedItemNS:function(t,e){for(var i=this.length;i--;){var n=this[i];if(n.localName==e&&n.namespaceURI==t)return n}return null}},O.prototype={hasFeature:function(t,e){var i=this._features[t.toLowerCase()];return!(!i||e&&!(e in i))},createDocument:function(t,e,i){var n=new D;if(n.implementation=this,n.childNodes=new S,n.doctype=i,i&&n.appendChild(i),e){var r=n.createElementNS(t,e);n.appendChild(r)}return n},createDocumentType:function(t,e,i){var n=new G;return n.name=t,n.nodeName=t,n.publicId=e,n.systemId=i,n}},L.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(t,e){return j(this,t,e)},replaceChild:function(t,e){this.insertBefore(t,e),e&&this.removeChild(e)},removeChild:function(t){return B(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return function t(e,i,n){var r=new i.constructor;for(var o in i){var l=i[o];"object"!=typeof l&&l!=r[o]&&(r[o]=l)}i.childNodes&&(r.childNodes=new S);switch(r.ownerDocument=e,r.nodeType){case s:var h=i.attributes,u=r.attributes=new C,c=h.length;u._ownerElement=r;for(var d=0;d<c;d++)r.setAttributeNode(t(e,h.item(d),!0));break;case a:n=!0}if(n)for(var p=i.firstChild;p;)r.appendChild(t(e,p,n)),p=p.nextSibling;return r}(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==o&&t.nodeType==o?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var i=e._nsMap;if(i)for(var n in i)if(i[n]==t)return n;e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var i=e._nsMap;if(i&&t in i)return i[t];e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},i(r,L),i(r,L.prototype),D.prototype={nodeName:"#document",nodeType:p,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==g){for(var i=t.firstChild;i;){var n=i.nextSibling;this.insertBefore(i,e),i=n}return t}return null==this.documentElement&&t.nodeType==s&&(this.documentElement=t),j(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),B(this,t)},importNode:function(t,e){return function t(e,i,n){var r;switch(i.nodeType){case s:(r=i.cloneNode(!1)).ownerDocument=e;case g:break;case a:n=!0}r||(r=i.cloneNode(!1));if(r.ownerDocument=e,r.parentNode=null,n)for(var o=i.firstChild;o;)r.appendChild(t(e,o,n)),o=o.nextSibling;return r}(this,t,e)},getElementById:function(t){var e=null;return I(this.documentElement,(function(i){if(i.nodeType==s&&i.getAttribute("id")==t)return e=i,!0})),e},createElement:function(t){var e=new U;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new S,(e.attributes=new C)._ownerElement=e,e},createDocumentFragment:function(){var t=new K;return t.ownerDocument=this,t.childNodes=new S,t},createTextNode:function(t){var e=new z;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new H;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new V;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var i=new $;return i.ownerDocument=this,i.tagName=i.target=t,i.nodeValue=i.data=e,i},createAttribute:function(t){var e=new F;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new Y;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var i=new U,n=e.split(":"),r=i.attributes=new C;return i.childNodes=new S,i.ownerDocument=this,i.nodeName=e,i.tagName=e,i.namespaceURI=t,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=e,r._ownerElement=i,i},createAttributeNS:function(t,e){var i=new F,n=e.split(":");return i.ownerDocument=this,i.nodeName=e,i.name=e,i.namespaceURI=t,i.specified=!0,2==n.length?(i.prefix=n[0],i.localName=n[1]):i.localName=e,i}},n(D,L),U.prototype={nodeType:s,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var i=this.ownerDocument.createAttribute(t);i.value=i.nodeValue=""+e,this.setAttributeNode(i)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===g?this.insertBefore(t,null):function(t,e){var i=e.parentNode;if(i){var n=t.lastChild;i.removeChild(e);n=t.lastChild}return n=t.lastChild,e.parentNode=t,e.previousSibling=n,e.nextSibling=null,n?n.nextSibling=e:t.firstChild=e,t.lastChild=e,N(t.ownerDocument,t,e),e}(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);i&&this.removeAttributeNode(i)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var i=this.getAttributeNodeNS(t,e);return i&&i.value||""},setAttributeNS:function(t,e,i){var n=this.ownerDocument.createAttributeNS(t,e);n.value=n.nodeValue=""+i,this.setAttributeNode(n)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new w(this,(function(e){var i=[];return I(e,(function(n){n===e||n.nodeType!=s||"*"!==t&&n.tagName!=t||i.push(n)})),i}))},getElementsByTagNameNS:function(t,e){return new w(this,(function(i){var n=[];return I(i,(function(r){r===i||r.nodeType!==s||"*"!==t&&r.namespaceURI!==t||"*"!==e&&r.localName!=e||n.push(r)})),n}))}},D.prototype.getElementsByTagName=U.prototype.getElementsByTagName,D.prototype.getElementsByTagNameNS=U.prototype.getElementsByTagNameNS,n(U,L),F.prototype.nodeType=a,n(F,L),W.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(y[b])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,i){i=this.data.substring(0,t)+i+this.data.substring(t+e),this.nodeValue=this.data=i,this.length=i.length}},n(W,L),z.prototype={nodeName:"#text",nodeType:o,splitText:function(t){var e=this.data,i=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(i);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},n(z,W),H.prototype={nodeName:"#comment",nodeType:d},n(H,W),V.prototype={nodeName:"#cdata-section",nodeType:l},n(V,W),G.prototype.nodeType=f,n(G,L),X.prototype.nodeType=m,n(X,L),q.prototype.nodeType=u,n(q,L),Y.prototype.nodeType=h,n(Y,L),K.prototype.nodeName="#document-fragment",K.prototype.nodeType=g,n(K,L),$.prototype.nodeType=c,n($,L),Q.prototype.serializeToString=function(t,e,i){return Z.call(t,e,i)},L.prototype.toString=Z;try{if(Object.defineProperty){Object.defineProperty(w.prototype,"length",{get:function(){return k(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case s:case g:var i=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&i.push(t(e)),e=e.nextSibling;return i.join("");default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case s:case g:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),et=function(t,e,i){t["$$"+e]=i}}}catch(t){}e.DOMImplementation=O,e.XMLSerializer=Q},945:function(t,e,i){"use strict";t.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},946:function(t,e){var i,n,r,s,a,o,l;i=function(t){return 9e4*t},n=function(t,e){return t*e},r=function(t){return t/9e4},s=function(t,e){return t/e},a=function(t,e){return i(s(t,e))},o=function(t,e){return n(r(t),e)},l=function(t,e,i){return r(i?t:t-e)},t.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:i,secondsToAudioTs:n,videoTsToSeconds:r,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l}},947:function(t,e){t.exports=function(t){var e="";return e+=String.fromCharCode(t[0]),e+=String.fromCharCode(t[1]),e+=String.fromCharCode(t[2]),e+=String.fromCharCode(t[3])}},948:function(t,e,i){var n=i(760),r=i(949),s=i(797),a=i(785),o=i(950),l=i(750),h=i(951),u=Object.getOwnPropertyDescriptor;e.f=n?u:function(t,e){if(t=a(t),e=o(e,!0),h)try{return u(t,e)}catch(t){}if(l(t,e))return s(!r.f.call(t,e),t[e])}},949:function(t,e,i){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,s=r&&!n.call({1:2},1);e.f=s?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},950:function(t,e,i){var n=i(747);t.exports=function(t,e){if(!n(t))return t;var i,r;if(e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;if("function"==typeof(i=t.valueOf)&&!n(r=i.call(t)))return r;if(!e&&"function"==typeof(i=t.toString)&&!n(r=i.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},951:function(t,e,i){var n=i(760),r=i(746),s=i(952);t.exports=!n&&!r((function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},952:function(t,e,i){var n=i(743),r=i(747),s=n.document,a=r(s)&&r(s.createElement);t.exports=function(t){return a?s.createElement(t):{}}},953:function(t,e,i){var n=i(788);t.exports=n("native-function-to-string",Function.toString)},954:function(t,e,i){var n=i(743),r=i(953),s=n.WeakMap;t.exports="function"==typeof s&&/native code/.test(r.call(s))},955:function(t,e,i){var n=i(750),r=i(785),s=i(1046).indexOf,a=i(789);t.exports=function(t,e){var i,o=r(t),l=0,h=[];for(i in o)!n(a,i)&&n(o,i)&&h.push(i);for(;e.length>l;)n(o,i=e[l++])&&(~s(h,i)||h.push(i));return h}},956:function(t,e){e.f=Object.getOwnPropertySymbols},957:function(t,e,i){var n=i(746),r=/#|\.prototype\./,s=function(t,e){var i=o[a(t)];return i==h||i!=l&&("function"==typeof e?n(e):!!e)},a=s.normalize=function(t){return String(t).replace(r,".").toLowerCase()},o=s.data={},l=s.NATIVE="N",h=s.POLYFILL="P";t.exports=s},958:function(t,e,i){"use strict";var n=i(804).forEach,r=i(961);t.exports=r("forEach")?function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach},959:function(t,e,i){var n=i(960);t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,r){return t.call(e,i,n,r)}}return function(){return t.apply(e,arguments)}}},960:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},961:function(t,e,i){"use strict";var n=i(746);t.exports=function(t,e){var i=[][t];return!i||!n((function(){i.call(null,e||function(){throw 1},1)}))}},962:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},963:function(t,e,i){"use strict";var n=i(785),r=i(1057),s=i(775),a=i(773),o=i(966),l=a.set,h=a.getterFor("Array Iterator");t.exports=o(Array,"Array",(function(t,e){l(this,{type:"Array Iterator",target:n(t),index:0,kind:e})}),(function(){var t=h(this),e=t.target,i=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==i?{value:n,done:!1}:"values"==i?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),s.Arguments=s.Array,r("keys"),r("values"),r("entries")},964:function(t,e,i){var n=i(748),r=i(1058),s=i(803),a=i(789),o=i(1059),l=i(952),h=i(800)("IE_PROTO"),u=function(){},c=function(){var t,e=l("iframe"),i=s.length;for(e.style.display="none",o.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;i--;)delete c.prototype[s[i]];return c()};t.exports=Object.create||function(t,e){var i;return null!==t?(u.prototype=n(t),i=new u,u.prototype=null,i[h]=t):i=c(),void 0===e?i:r(i,e)},a[h]=!0},965:function(t,e,i){var n=i(955),r=i(803);t.exports=Object.keys||function(t){return n(t,r)}},966:function(t,e,i){"use strict";var n=i(757),r=i(1060),s=i(968),a=i(969),o=i(805),l=i(751),h=i(767),u=i(745),c=i(798),d=i(775),p=i(967),f=p.IteratorPrototype,g=p.BUGGY_SAFARI_ITERATORS,m=u("iterator"),v=function(){return this};t.exports=function(t,e,i,u,p,y,b){r(i,e,u);var _,T,x,S=function(t){if(t===p&&A)return A;if(!g&&t in C)return C[t];switch(t){case"keys":case"values":case"entries":return function(){return new i(this,t)}}return function(){return new i(this)}},w=e+" Iterator",k=!1,C=t.prototype,E=C[m]||C["@@iterator"]||p&&C[p],A=!g&&E||S(p),P="Array"==e&&C.entries||E;if(P&&(_=s(P.call(new t)),f!==Object.prototype&&_.next&&(c||s(_)===f||(a?a(_,f):"function"!=typeof _[m]&&l(_,m,v)),o(_,w,!0,!0),c&&(d[w]=v))),"values"==p&&E&&"values"!==E.name&&(k=!0,A=function(){return E.call(this)}),c&&!b||C[m]===A||l(C,m,A),d[e]=A,p)if(T={values:S("values"),keys:y?A:S("keys"),entries:S("entries")},b)for(x in T)(g||k||!(x in C))&&h(C,x,T[x]);else n({target:e,proto:!0,forced:g||k},T);return T}},967:function(t,e,i){"use strict";var n,r,s,a=i(968),o=i(751),l=i(750),h=i(745),u=i(798),c=h("iterator"),d=!1;[].keys&&("next"in(s=[].keys())?(r=a(a(s)))!==Object.prototype&&(n=r):d=!0),null==n&&(n={}),u||l(n,c)||o(n,c,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d}},968:function(t,e,i){var n=i(750),r=i(774),s=i(800),a=i(1061),o=s("IE_PROTO"),l=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=r(t),n(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},969:function(t,e,i){var n=i(748),r=i(1062);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(i,[]),e=i instanceof Array}catch(t){}return function(i,s){return n(i),r(s),e?t.call(i,s):i.__proto__=s,i}}():void 0)},970:function(t,e,i){var n=i(787),r=i(745)("toStringTag"),s="Arguments"==n(function(){return arguments}());t.exports=function(t){var e,i,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?i:s?n(e):"Object"==(a=n(e))&&"function"==typeof e.callee?"Arguments":a}},971:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},972:function(t,e,i){var n=i(790),r=i(765),s=function(t){return function(e,i){var s,a,o=String(r(e)),l=n(i),h=o.length;return l<0||l>=h?t?"":void 0:(s=o.charCodeAt(l))<55296||s>56319||l+1===h||(a=o.charCodeAt(l+1))<56320||a>57343?t?o.charAt(l):s:t?o.slice(l,l+2):a-56320+(s-55296<<10)+65536}};t.exports={codeAt:s(!1),charAt:s(!0)}},973:function(t,e,i){var n=i(767);t.exports=function(t,e,i){for(var r in e)n(t,r,e[r],i);return t}},974:function(t,e,i){var n=i(748),r=i(1074),s=i(768),a=i(959),o=i(1075),l=i(1076),h=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,i,u,c){var d,p,f,g,m,v,y,b=a(e,i,u?2:1);if(c)d=t;else{if("function"!=typeof(p=o(t)))throw TypeError("Target is not iterable");if(r(p)){for(f=0,g=s(t.length);g>f;f++)if((m=u?b(n(y=t[f])[0],y[1]):b(t[f]))&&m instanceof h)return m;return new h(!1)}d=p.call(t)}for(v=d.next;!(y=v.call(d)).done;)if("object"==typeof(m=l(d,b,y.value,u))&&m&&m instanceof h)return m;return new h(!1)}).stop=function(t){return new h(!0,t)}},975:function(t,e){t.exports=function(t,e,i){if(!(t instanceof e))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return t}},976:function(t,e,i){"use strict";var n=i(751),r=i(767),s=i(746),a=i(745),o=i(807),l=a("species"),h=!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),u=!s((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]}));t.exports=function(t,e,i,c){var d=a(t),p=!s((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),f=p&&!s((function(){var e=!1,i=/a/;return"split"===t&&((i={}).constructor={},i.constructor[l]=function(){return i},i.flags="",i[d]=/./[d]),i.exec=function(){return e=!0,null},i[d](""),!e}));if(!p||!f||"replace"===t&&!h||"split"===t&&!u){var g=/./[d],m=i(d,""[t],(function(t,e,i,n,r){return e.exec===o?p&&!r?{done:!0,value:g.call(e,i,n)}:{done:!0,value:t.call(i,e,n)}:{done:!1}})),v=m[0],y=m[1];r(String.prototype,t,v),r(RegExp.prototype,d,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)}),c&&n(RegExp.prototype[d],"sham",!0)}}},977:function(t,e,i){"use strict";var n=i(972).charAt;t.exports=function(t,e,i){return e+(i?n(t,e).length:1)}},978:function(t,e,i){var n=i(787),r=i(807);t.exports=function(t,e){var i=t.exec;if("function"==typeof i){var s=i.call(t,e);if("object"!=typeof s)throw TypeError("RegExp exec method returned something other than an Object or null");return s}if("RegExp"!==n(t))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},989:function(t,e,i){(function(e){var i;i="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=i}).call(this,i(59))},990:function(t,e,i){(function(e){var n,r=void 0!==e?e:"undefined"!=typeof window?window:{},s=i(991);"undefined"!=typeof document?n=document:(n=r["__GLOBAL_DOCUMENT_CACHE@4"])||(n=r["__GLOBAL_DOCUMENT_CACHE@4"]=s),t.exports=n}).call(this,i(59))},992:function(t,e,i){var n=i(563).default,r=i(11);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?r(t):e},t.exports.default=t.exports,t.exports.__esModule=!0},993:function(t,e){function i(e){return t.exports=i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},994:function(t,e){t.exports=function(t,e){var i,n=null;try{i=JSON.parse(t,e)}catch(t){n=t}return[n,i]}},995:function(t,e,i){"use strict";var n=i(764),r=i(30),s=i(996);function a(t,e,i){var n=t;return s(e)?(i=e,"string"==typeof t&&(n={uri:t})):n=r({},e,{uri:t}),n.callback=i,n}function o(t,e,i){return l(e=a(t,e,i))}function l(t){if(void 0===t.callback)throw new Error("callback argument missing");var e=!1,i=function(i,n,r){e||(e=!0,t.callback(i,n,r))};function n(){var t=void 0;if(t=h.response?h.response:h.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!e)return t.responseXML}catch(t){}return null}(h),m)try{t=JSON.parse(t)}catch(t){}return t}function r(t){return clearTimeout(u),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,i(t,v)}function s(){if(!l){var e;clearTimeout(u),e=t.useXDR&&void 0===h.status?200:1223===h.status?204:h.status;var r=v,s=null;return 0!==e?(r={body:n(),statusCode:e,method:d,headers:{},url:c,rawRequest:h},h.getAllResponseHeaders&&(r.headers=function(t){var e={};return t?(t.trim().split("\n").forEach((function(t){var i=t.indexOf(":"),n=t.slice(0,i).trim().toLowerCase(),r=t.slice(i+1).trim();void 0===e[n]?e[n]=r:Array.isArray(e[n])?e[n].push(r):e[n]=[e[n],r]})),e):e}(h.getAllResponseHeaders()))):s=new Error("Internal XMLHttpRequest Error"),i(s,r,r.body)}}var a,l,h=t.xhr||null;h||(h=t.cors||t.useXDR?new o.XDomainRequest:new o.XMLHttpRequest);var u,c=h.url=t.uri||t.url,d=h.method=t.method||"GET",p=t.body||t.data,f=h.headers=t.headers||{},g=!!t.sync,m=!1,v={body:void 0,headers:{},statusCode:0,method:d,url:c,rawRequest:h};if("json"in t&&!1!==t.json&&(m=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==d&&"HEAD"!==d&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),p=JSON.stringify(!0===t.json?p:t.json))),h.onreadystatechange=function(){4===h.readyState&&setTimeout(s,0)},h.onload=s,h.onerror=r,h.onprogress=function(){},h.onabort=function(){l=!0},h.ontimeout=r,h.open(d,c,!g,t.username,t.password),g||(h.withCredentials=!!t.withCredentials),!g&&t.timeout>0&&(u=setTimeout((function(){if(!l){l=!0,h.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}}),t.timeout)),h.setRequestHeader)for(a in f)f.hasOwnProperty(a)&&h.setRequestHeader(a,f[a]);else if(t.headers&&!function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(h.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(h),h.send(p||null),h}t.exports=o,t.exports.default=o,o.XMLHttpRequest=n.XMLHttpRequest||function(){},o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:n.XDomainRequest,function(t,e){for(var i=0;i<t.length;i++)e(t[i])}(["get","put","post","patch","head","delete"],(function(t){o["delete"===t?"del":t]=function(e,i,n){return(i=a(e,i,n)).method=t.toUpperCase(),l(i)}}))},996:function(t,e){t.exports=function(t){if(!t)return!1;var e=i.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var i=Object.prototype.toString},997:function(t,e,i){var n=i(764),r=t.exports={WebVTT:i(998),VTTCue:i(1e3),VTTRegion:i(1001)};n.vttjs=r,n.WebVTT=r.WebVTT;var s=r.VTTCue,a=r.VTTRegion,o=n.VTTCue,l=n.VTTRegion;r.shim=function(){n.VTTCue=s,n.VTTRegion=a},r.restore=function(){n.VTTCue=o,n.VTTRegion=l},n.VTTCue||r.shim()},998:function(t,e,i){var n=i(941),r=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();function s(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function a(t){function e(t,e,i,n){return 3600*(0|t)+60*(0|e)+(0|i)+(0|n)/1e3}var i=t.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?e(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null}function o(){this.values=r(null)}function l(t,e,i,n){var r=n?t.split(n):[t];for(var s in r)if("string"==typeof r[s]){var a=r[s].split(i);if(2===a.length)e(a[0],a[1])}}function h(t,e,i){var n=t;function r(){var e=a(t);if(null===e)throw new s(s.Errors.BadTimeStamp,"Malformed timestamp: "+n);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function h(){t=t.replace(/^\s+/,"")}if(h(),e.startTime=r(),h(),"--\x3e"!==t.substr(0,3))throw new s(s.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);t=t.substr(3),h(),e.endTime=r(),h(),function(t,e){var n=new o;l(t,(function(t,e){switch(t){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===e){n.set(t,i[r].region);break}break;case"vertical":n.alt(t,e,["rl","lr"]);break;case"line":var s=e.split(","),a=s[0];n.integer(t,a),n.percent(t,a)&&n.set("snapToLines",!1),n.alt(t,a,["auto"]),2===s.length&&n.alt("lineAlign",s[1],["start","center","end"]);break;case"position":s=e.split(","),n.percent(t,s[0]),2===s.length&&n.alt("positionAlign",s[1],["start","center","end"]);break;case"size":n.percent(t,e);break;case"align":n.alt(t,e,["start","center","end","left","right"])}}),/:/,/\s/),e.region=n.get("region",null),e.vertical=n.get("vertical","");try{e.line=n.get("line","auto")}catch(t){}e.lineAlign=n.get("lineAlign","start"),e.snapToLines=n.get("snapToLines",!0),e.size=n.get("size",100);try{e.align=n.get("align","center")}catch(t){e.align=n.get("align","middle")}try{e.position=n.get("position","auto")}catch(t){e.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},e.align)}e.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},e.align)}(t,e)}s.prototype=r(Error.prototype),s.prototype.constructor=s,s.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,i){for(var n=0;n<i.length;++n)if(e===i[n]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var u=n.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},p={v:"title",lang:"lang"},f={rt:"ruby"};function g(t,e){function i(){if(!e)return null;var t,i=e.match(/^([^<]*)(<[^>]*>?)?/);return t=i[1]?i[1]:i[2],e=e.substr(t.length),t}function n(t,e){return!f[e.localName]||f[e.localName]===t.localName}function r(e,i){var n=c[e];if(!n)return null;var r=t.document.createElement(n),s=p[e];return s&&i&&(r[s]=i.trim()),r}for(var s,o,l=t.document.createElement("div"),h=l,g=[];null!==(s=i());)if("<"!==s[0])h.appendChild(t.document.createTextNode((o=s,u.innerHTML=o,o=u.textContent,u.textContent="",o)));else{if("/"===s[1]){g.length&&g[g.length-1]===s.substr(2).replace(">","")&&(g.pop(),h=h.parentNode);continue}var m,v=a(s.substr(1,s.length-2));if(v){m=t.document.createProcessingInstruction("timestamp",v),h.appendChild(m);continue}var y=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!y)continue;if(!(m=r(y[1],y[3])))continue;if(!n(h,m))continue;if(y[2]){var b=y[2].split(".");b.forEach((function(t){var e=/^bg_/.test(t),i=e?t.slice(3):t;if(d.hasOwnProperty(i)){var n=e?"background-color":"color",r=d[i];m.style[n]=r}})),m.className=b.join(" ")}g.push(y[1]),h.appendChild(m),h=m}return l}var m=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function v(t){for(var e=0;e<m.length;e++){var i=m[e];if(t>=i[0]&&t<=i[1])return!0}return!1}function y(t){var e=[],i="";if(!t||!t.childNodes)return"ltr";function n(t,e){for(var i=e.childNodes.length-1;i>=0;i--)t.push(e.childNodes[i])}function r(t){if(!t||!t.length)return null;var e=t.pop(),i=e.textContent||e.innerText;if(i){var s=i.match(/^.*(\n|\r)/);return s?(t.length=0,s[0]):i}return"ruby"===e.tagName?r(t):e.childNodes?(n(t,e),r(t)):void 0}for(n(e,t);i=r(e);)for(var s=0;s<i.length;s++)if(v(i.charCodeAt(s)))return"rtl";return"ltr"}function b(){}function _(t,e,i){b.call(this),this.cue=e,this.cueDiv=g(t,e.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=t.document.createElement("div"),n={direction:y(this.cueDiv),writingMode:""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===e.align?"center":e.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var r=0;switch(e.positionAlign){case"start":r=e.position;break;case"center":r=e.position-e.size/2;break;case"end":r=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(r,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(r,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function T(t){var e,i,n,r;if(t.div){i=t.div.offsetHeight,n=t.div.offsetWidth,r=t.div.offsetTop;var s=(s=t.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();t=t.div.getBoundingClientRect(),e=s?Math.max(s[0]&&s[0].height||0,t.height/s.length):0}this.left=t.left,this.right=t.right,this.top=t.top||r,this.height=t.height||i,this.bottom=t.bottom||r+(t.height||i),this.width=t.width||n,this.lineHeight=void 0!==e?e:t.lineHeight}function x(t,e,i,n){var r=new T(e),s=e.cue,a=function(t){if("number"==typeof t.line&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,i=e.textTrackList,n=0,r=0;r<i.length&&i[r]!==e;r++)"showing"===i[r].mode&&n++;return-1*++n}(s),o=[];if(s.snapToLines){var l;switch(s.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var h=r.lineHeight,u=h*Math.round(a),c=i[l]+h,d=o[0];Math.abs(u)>c&&(u=u<0?-1:1,u*=Math.ceil(c/h)*h),a<0&&(u+=""===s.vertical?i.height:i.width,o=o.reverse()),r.move(d,u)}else{var p=r.lineHeight/i.height*100;switch(s.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(s.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],r=new T(e)}var f=function(t,e){for(var r,s=new T(t),a=1,o=0;o<e.length;o++){for(;t.overlapsOppositeAxis(i,e[o])||t.within(i)&&t.overlapsAny(n);)t.move(e[o]);if(t.within(i))return t;var l=t.intersectPercentage(i);a>l&&(r=new T(t),a=l),t=new T(s)}return r||s}(r,o);e.move(f.toCSSCompatValues(i))}function S(){}b.prototype.applyStyles=function(t,e){for(var i in e=e||this.div,t)t.hasOwnProperty(i)&&(e.style[i]=t[i])},b.prototype.formatStyle=function(t,e){return 0===t?0:t+e},_.prototype=r(b.prototype),_.prototype.constructor=_,T.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},T.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},T.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},T.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},T.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},T.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},T.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},T.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,i=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,n=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return{left:(t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t).left,right:t.right,top:t.top||n,height:t.height||e,bottom:t.bottom||n+(t.height||e),width:t.width||i}},S.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},S.convertCueToDOMTree=function(t,e){return t&&e?g(t,e):null};S.processCues=function(t,e,i){if(!t||!e||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=t.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",i.appendChild(n),function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(e)){var r=[],s=T.getSimpleBoxPosition(n),a={font:Math.round(.05*s.height*100)/100+"px sans-serif"};!function(){for(var i,o,l=0;l<e.length;l++)o=e[l],i=new _(t,o,a),n.appendChild(i.div),x(0,i,s,r),o.displayState=i.div,r.push(T.getSimpleBoxPosition(i))}()}else for(var o=0;o<e.length;o++)n.appendChild(e[o].displayState)},S.Parser=function(t,e,i){i||(i=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},S.Parser.prototype={reportOrThrowError:function(t){if(!(t instanceof s))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(t){var e=this;function i(){for(var t=e.buffer,i=0;i<t.length&&"\r"!==t[i]&&"\n"!==t[i];)++i;var n=t.substr(0,i);return"\r"===t[i]&&++i,"\n"===t[i]&&++i,e.buffer=t.substr(i),n}function n(t){t.match(/X-TIMESTAMP-MAP/)?l(t,(function(t,i){switch(t){case"X-TIMESTAMP-MAP":!function(t){var i=new o;l(t,(function(t,e){switch(t){case"MPEGT":i.integer(t+"S",e);break;case"LOCA":i.set(t+"L",a(e))}}),/[^\d]:/,/,/),e.ontimestampmap&&e.ontimestampmap({MPEGTS:i.get("MPEGTS"),LOCAL:i.get("LOCAL")})}(i)}}),/=/):l(t,(function(t,i){switch(t){case"Region":!function(t){var i=new o;if(l(t,(function(t,e){switch(t){case"id":i.set(t,e);break;case"width":i.percent(t,e);break;case"lines":i.integer(t,e);break;case"regionanchor":case"viewportanchor":var n=e.split(",");if(2!==n.length)break;var r=new o;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;i.set(t+"X",r.get("x")),i.set(t+"Y",r.get("y"));break;case"scroll":i.alt(t,e,["up"])}}),/=/,/\s/),i.has("id")){var n=new(e.vttjs.VTTRegion||e.window.VTTRegion);n.width=i.get("width",100),n.lines=i.get("lines",3),n.regionAnchorX=i.get("regionanchorX",0),n.regionAnchorY=i.get("regionanchorY",100),n.viewportAnchorX=i.get("viewportanchorX",0),n.viewportAnchorY=i.get("viewportanchorY",100),n.scroll=i.get("scroll",""),e.onregion&&e.onregion(n),e.regionList.push({id:i.get("id"),region:n})}}(i)}}),/:/)}t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));try{var r;if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var u=(r=i()).match(/^WEBVTT([ \t].*)?$/);if(!u||!u[0])throw new s(s.Errors.BadSignature);e.state="HEADER"}for(var c=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(c?c=!1:r=i(),e.state){case"HEADER":/:/.test(r)?n(r):r||(e.state="ID");continue;case"NOTE":r||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){e.state="NOTE";break}if(!r)continue;e.cue=new(e.vttjs.VTTCue||e.window.VTTCue)(0,0,"");try{e.cue.align="center"}catch(t){e.cue.align="middle"}if(e.state="CUE",-1===r.indexOf("--\x3e")){e.cue.id=r;continue}case"CUE":try{h(r,e.cue,e.regionList)}catch(t){e.reportOrThrowError(t),e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var d=-1!==r.indexOf("--\x3e");if(!r||d&&(c=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+="\n"),e.cue.text+=r.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":r||(e.state="ID");continue}}}catch(t){e.reportOrThrowError(t),"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new s(s.Errors.BadSignature)}catch(t){this.reportOrThrowError(t)}return this.onflush&&this.onflush(),this}},t.exports=S}}]);