shaka-player 4.0.4 → 4.0.5

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 (45) hide show
  1. package/.github/workflows/build-and-test.yaml +67 -15
  2. package/.github/workflows/compute-incremental-coverage.py +251 -0
  3. package/.github/workflows/report-incremental-coverage.yaml +39 -0
  4. package/.github/workflows/selenium-lab-tests.yaml +44 -1
  5. package/AUTHORS +1 -0
  6. package/CHANGELOG.md +17 -0
  7. package/CONTRIBUTORS +1 -0
  8. package/demo/index.html +1 -1
  9. package/dist/controls.css +1 -1
  10. package/dist/locales.js +30 -30
  11. package/dist/shaka-player.compiled.d.ts +1 -1
  12. package/dist/shaka-player.compiled.debug.d.ts +1 -1
  13. package/dist/shaka-player.compiled.debug.externs.js +1 -1
  14. package/dist/shaka-player.compiled.debug.js +80 -77
  15. package/dist/shaka-player.compiled.debug.map +3 -3
  16. package/dist/shaka-player.compiled.externs.js +1 -1
  17. package/dist/shaka-player.compiled.js +763 -761
  18. package/dist/shaka-player.compiled.map +3 -3
  19. package/dist/shaka-player.ui.d.ts +1 -1
  20. package/dist/shaka-player.ui.debug.d.ts +1 -1
  21. package/dist/shaka-player.ui.debug.externs.js +1 -1
  22. package/dist/shaka-player.ui.debug.js +93 -90
  23. package/dist/shaka-player.ui.debug.map +3 -3
  24. package/dist/shaka-player.ui.externs.js +1 -1
  25. package/dist/shaka-player.ui.js +910 -908
  26. package/dist/shaka-player.ui.map +3 -3
  27. package/docs/tutorials/ui.md +5 -5
  28. package/karma.conf.js +3 -11
  29. package/lib/ads/client_side_ad_manager.js +1 -1
  30. package/lib/media/drm_engine.js +1 -1
  31. package/lib/media/streaming_engine.js +1 -0
  32. package/lib/player.js +1 -6
  33. package/lib/polyfill/media_capabilities.js +6 -0
  34. package/lib/text/cue.js +0 -5
  35. package/lib/text/simple_text_displayer.js +21 -9
  36. package/lib/text/ui_text_displayer.js +83 -19
  37. package/lib/util/buffer_utils.js +3 -0
  38. package/lib/util/object_utils.js +1 -0
  39. package/lib/util/stream_utils.js +23 -3
  40. package/lib/util/string_utils.js +63 -16
  41. package/package.json +2 -2
  42. package/test/text/simple_text_displayer_unit.js +27 -0
  43. package/test/text/ui_text_displayer_unit.js +65 -0
  44. package/test/util/string_utils_unit.js +46 -8
  45. package/ui/text_selection.js +2 -2
@@ -15,19 +15,19 @@ fa("Symbol",function(a){function b(f){if(this instanceof b)throw new TypeError("
15
15
  fa("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=ea[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return ha(aa(this))}})}return a});function ha(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
16
16
  function t(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ia(a){if(!(a instanceof Array)){a=t(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var ja="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ka;
17
17
  if("function"==typeof Object.setPrototypeOf)ka=Object.setPrototypeOf;else{var la;a:{var ma={a:!0},na={};try{na.__proto__=ma;la=na.a;break a}catch(a){}la=!1}ka=la?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var oa=ka;
18
- function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Tg=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
19
- function ta(a,b){a.i={me:b,te:!0};a.g=a.m||a.j}qa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function z(a){a.g=0}function B(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.me;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
20
- function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.te?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function Aa(a,b){sa(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Da(a)}
18
+ function pa(a,b){a.prototype=ja(b.prototype);a.prototype.constructor=a;if(oa)oa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ug=b.prototype}function qa(){this.o=!1;this.l=null;this.h=void 0;this.g=1;this.j=this.m=0;this.u=this.i=null}function sa(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
19
+ function ta(a,b){a.i={ne:b,ue:!0};a.g=a.m||a.j}qa.prototype["return"]=function(a){this.i={"return":a};this.g=this.j};function u(a,b,c){a.g=c;return{value:b}}qa.prototype.A=function(a){this.g=a};function z(a){a.g=0}function B(a,b,c){a.m=b;void 0!=c&&(a.j=c)}function ua(a){a.m=0;a.j=2}function va(a,b){a.g=b;a.m=0}function F(a){a.m=0;var b=a.i.ne;a.i=null;return b}function wa(a){a.u=[a.i];a.m=0;a.j=0}
20
+ function xa(a,b){var c=a.u.splice(0)[0];(c=a.i=a.i||c)?c.ue?a.g=a.m||a.j:void 0!=c.A&&a.j<c.A?(a.g=c.A,a.i=null):a.g=a.j:a.g=b}function ya(a){this.g=new qa;this.h=a}function Ba(a,b){sa(a.g);var c=a.g.l;if(c)return Ca(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Da(a)}
21
21
  function Ca(a,b,c,d){try{var e=b.call(a.g.l,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.o=!1,e;var f=e.value}catch(g){return a.g.l=null,ta(a.g,g),Da(a)}a.g.l=null;d.call(a.g,f);return Da(a)}
22
- function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.te)throw b.me;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
- function Fa(a){this.next=function(b){sa(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Da(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.s):(ta(a.g,b),b=Da(a));return b};this["return"]=function(b){return Aa(a,b)};this[Symbol.iterator]=function(){return this}}
24
- function Ga(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function K(a){return Ga(new Fa(new ya(a)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
22
+ function Da(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.o=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,ta(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.ue)throw b.ne;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
+ function Ea(a){this.next=function(b){sa(a.g);a.g.l?b=Ca(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Da(a));return b};this["throw"]=function(b){sa(a.g);a.g.l?b=Ca(a,a.g.l["throw"],b,a.g.s):(ta(a.g,b),b=Da(a));return b};this["return"]=function(b){return Ba(a,b)};this[Symbol.iterator]=function(){return this}}
24
+ function Ga(a){function b(d){return a.next(d)}function c(d){return a["throw"](d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})}function K(a){return Ga(new Ea(new ya(a)))}function Ha(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b}
25
25
  fa("Promise",function(a){function b(g){this.h=0;this.i=void 0;this.g=[];this.o=!1;var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.g=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.h=function(g){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l()})}this.g.push(g)};var e=ea.setTimeout;c.prototype.i=function(g){e(g,0)};c.prototype.l=function(){for(;this.g&&this.g.length;){var g=this.g;this.g=[];for(var h=0;h<g.length;++h){var k=
26
26
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.g=null};c.prototype.j=function(g){this.i(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.F),reject:g(this.l)}};b.prototype.F=function(g){if(g===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.I(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?this.D(g):this.m(g)}};
27
27
  b.prototype.D=function(g){var h=void 0;try{h=g.then}catch(k){this.l(k);return}"function"==typeof h?this.L(h,g):this.m(g)};b.prototype.l=function(g){this.s(2,g)};b.prototype.m=function(g){this.s(1,g)};b.prototype.s=function(g,h){if(0!=this.h)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.h);this.h=g;this.i=h;2===this.h&&this.G();this.u()};b.prototype.G=function(){var g=this;e(function(){if(g.C()){var h=ea.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
28
28
  function(){if(this.o)return!1;var g=ea.CustomEvent,h=ea.Event,k=ea.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof g?g=new g("unhandledrejection",{cancelable:!0}):"function"===typeof h?g=new h("unhandledrejection",{cancelable:!0}):(g=ea.document.createEvent("CustomEvent"),g.initCustomEvent("unhandledrejection",!1,!0,g));g.promise=this;g.reason=this.i;return k(g)};b.prototype.u=function(){if(null!=this.g){for(var g=0;g<this.g.length;++g)f.h(this.g[g]);this.g=null}};var f=new c;
29
- b.prototype.I=function(g){var h=this.j();g.Bc(h.resolve,h.reject)};b.prototype.L=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(n,q){return"function"==typeof n?function(v){try{l(n(v))}catch(y){m(y)}}:q}var l,m,p=new b(function(n,q){l=n;m=q});this.Bc(k(g,l),k(h,m));return p};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Bc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
- break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Bc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(v){return function(y){n[v]=y;q--;0==q&&l(n)}}var n=[],q=0;do n.push(void 0),q++,d(k.value).Bc(p(n.length-1),m),k=h.next();
29
+ b.prototype.I=function(g){var h=this.j();g.Cc(h.resolve,h.reject)};b.prototype.L=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(n,q){return"function"==typeof n?function(v){try{l(n(v))}catch(y){m(y)}}:q}var l,m,p=new b(function(n,q){l=n;m=q});this.Cc(k(g,l),k(h,m));return p};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Cc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
+ break;default:throw Error("Unexpected state: "+l.h);}}var l=this;null==this.g?f.h(k):this.g.push(k);this.o=!0};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=t(g),m=l.next();!m.done;m=l.next())d(m.value).Cc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function p(v){return function(y){n[v]=y;q--;0==q&&l(n)}}var n=[],q=0;do n.push(void 0),q++,d(k.value).Cc(p(n.length-1),m),k=h.next();
31
31
  while(!k.done)})};return b});function Ia(a,b){return Object.prototype.hasOwnProperty.call(a,b)}
32
32
  fa("WeakMap",function(a){function b(k){this.g=(h+=Math.random()+1).toString();if(k){k=t(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}}function c(){}function d(k){var l=typeof k;return"object"===l&&null!==k||"function"===l}function e(k){if(!Ia(k,g)){var l=new c;ba(k,g,{value:l})}}function f(k){var l=Object[k];l&&(Object[k]=function(m){if(m instanceof c)return m;Object.isExtensible(m)&&e(m);return l(m)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),l=Object.seal({}),
33
33
  m=new a([[k,2],[l,3]]);if(2!=m.get(k)||3!=m.get(l))return!1;m["delete"](k);m.set(l,4);return!m.has(k)&&4==m.get(l)}catch(p){return!1}}())return a;var g="$jscomp_hidden_"+Math.random();f("freeze");f("preventExtensions");f("seal");var h=0;b.prototype.set=function(k,l){if(!d(k))throw Error("Invalid WeakMap key");e(k);if(!Ia(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ia(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
@@ -39,7 +39,7 @@ h.fa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g
39
39
  m;!(m=l.next()).done;)m=m.value,h.call(k,m[1],m[0],this)};e.prototype[Symbol.iterator]=e.prototype.entries;var g=0;return e});
40
40
  fa("Set",function(a){function b(c){this.g=new Map;if(c){c=t(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.g.size}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(t([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||
41
41
  f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;b.prototype.add=function(c){c=0===c?0:c;this.g.set(c,c);this.size=this.g.size;return this};b.prototype["delete"]=function(c){c=this.g["delete"](c);this.size=this.g.size;return c};b.prototype.clear=function(){this.g.clear();this.size=0};b.prototype.has=function(c){return this.g.has(c)};b.prototype.entries=function(){return this.g.entries()};b.prototype.values=function(){return this.g.values()};b.prototype.keys=b.prototype.values;
42
- b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ja(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{re:e,v:f}}return{re:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).re}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
42
+ b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.g.forEach(function(f){return c.call(d,f,f,e)})};return b});function Ja(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{se:e,v:f}}return{se:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ja(this,b,c).se}});fa("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
43
43
  fa("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length,f=c||0;for(0>f&&(f=Math.max(f+e,0));f<e;f++){var g=d[f];if(g===b||Object.is(g,b))return!0}return!1}});function La(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""}
44
44
  fa("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==La(this,b,"includes").indexOf(b,c||0)}});fa("Array.prototype.find",function(a){return a?a:function(b,c){return Ja(this,b,c).v}});fa("String.prototype.startsWith",function(a){return a?a:function(b,c){for(var d=La(this,b,"startsWith"),e=d.length,f=b.length,g=Math.max(0,Math.min(c|0,d.length)),h=0;h<f&&g<e;)if(d[g++]!=b[h++])return!1;return h>=f}});
45
45
  function Ma(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var f=c++;return{value:b(f,a[f]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}fa("Array.prototype.keys",function(a){return a?a:function(){return Ma(this,function(b){return b})}});var Na="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Ia(d,e)&&(a[e]=d[e])}return a};
@@ -53,7 +53,7 @@ function M(a,b){var c=a.split("."),d=Oa;c[0]in d||"undefined"==typeof d.execScri
53
53
  Copyright 2016 Google LLC
54
54
  SPDX-License-Identifier: Apache-2.0
55
55
  */
56
- function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ha.apply(1,arguments);Xa.has(a)||(Xa.add(a),Va.apply(Ta,ia(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Va=cb[2];Ua=cb[1]};function db(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function eb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fb(a,b,c){c||(c=db);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={dd:d.dd},e=a.next()){d.dd=e.value;e=b.findIndex(function(f){return function(g){return c(f.dd,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
56
+ function Pa(a){this.g=Math.exp(Math.log(.5)/a);this.i=this.h=0}Pa.prototype.sample=function(a,b){var c=Math.pow(this.g,a);c=b*(1-c)+c*this.h;isNaN(c)||(this.h=c,this.i+=a)};function Qa(a){return a.h/(1-Math.pow(a.g,a.i))};function Sa(){this.h=new Pa(2);this.j=new Pa(5);this.g=0;this.i=128E3;this.l=16E3}Sa.prototype.configure=function(a){this.i=a.minTotalBytes;this.l=a.minBytes;this.h.g=Math.exp(Math.log(.5)/a.fastHalfLife);this.j.g=Math.exp(Math.log(.5)/a.slowHalfLife)};Sa.prototype.sample=function(a,b){if(!(b<this.l)){var c=8E3*b/a,d=a/1E3;this.g+=b;this.h.sample(d,c);this.j.sample(d,c)}};Sa.prototype.getBandwidthEstimate=function(a){return this.g<this.i?a:Math.min(Qa(this.h),Qa(this.j))};function Ta(){}function Ua(){}function Va(){}function Wa(a){var b=Ha.apply(1,arguments);Xa.has(a)||(Xa.add(a),Va.apply(Ta,ia(b)))}function Ya(){}function Za(){}function $a(){}function ab(){}var Xa=new Set;if(window.console&&window.console.log.bind){var bb={},cb=(bb[1]=console.error.bind(console),bb[2]=console.warn.bind(console),bb[3]=console.info.bind(console),bb[4]=console.log.bind(console),bb[5]=console.debug.bind(console),bb[6]=console.debug.bind(console),bb);Va=cb[2];Ua=cb[1]};function db(a,b){return"number"===typeof a&&"number"===typeof b&&isNaN(a)&&isNaN(b)?!0:a===b}function eb(a,b){var c=a.indexOf(b);-1<c&&a.splice(c,1)}function fb(a,b,c){c||(c=db);if(a.length!=b.length)return!1;b=b.slice();var d={};a=t(a);for(var e=a.next();!e.done;d={ed:d.ed},e=a.next()){d.ed=e.value;e=b.findIndex(function(f){return function(g){return c(f.ed,g)}}(d));if(-1==e)return!1;b[e]=b[b.length-1];b.pop()}return 0==b.length}
57
57
  function gb(a,b,c){c||(c=db);if(a.length!=b.length)return!1;for(var d=0;d<a.length;d++)if(!c(a[d],b[d]))return!1;return!0};function ib(a,b,c){this.startTime=a;this.direction=jb;this.endTime=b;this.payload=c;this.region=new kb;this.position=null;this.positionAlign=lb;this.size=0;this.textAlign=mb;this.writingMode=nb;this.lineInterpretation=ob;this.line=null;this.lineHeight="";this.lineAlign=pb;this.displayAlign=qb;this.fontSize=this.textStrokeWidth=this.textStrokeColor=this.border=this.backgroundImage=this.backgroundColor=this.color="";this.fontWeight=rb;this.fontStyle=sb;this.linePadding=this.letterSpacing=this.fontFamily=
58
58
  "";this.opacity=1;this.textDecoration=[];this.wrapLine=!0;this.id="";this.nestedCues=[];this.lineBreak=this.isContainer=!1;this.cellResolution={columns:32,rows:15}}ib.prototype.clone=function(){var a=new ib(0,0,""),b;for(b in this)a[b]=this[b],a[b]&&a[b].constructor==Array&&(a[b]=a[b].slice());return a};
59
59
  function tb(a,b){if(a.startTime!=b.startTime||a.endTime!=b.endTime||a.payload!=b.payload)return!1;for(var c in a)if("startTime"!=c&&"endTime"!=c&&"payload"!=c)if("nestedCues"==c){if(!gb(a.nestedCues,b.nestedCues,tb))return!1}else if("region"==c||"cellResolution"==c)for(var d in a[c]){if(a[c][d]!=b[c][d])return!1}else if(Array.isArray(a[c])){if(!gb(a[c],b[c]))return!1}else if(a[c]!=b[c])return!1;return!0}M("shaka.text.Cue",ib);var lb="auto";
@@ -83,817 +83,819 @@ r.toString=function(){var a=[],b=this.Ea;b&&a.push(Tb(b,Ub,!0),":");if(b=this.Fa
83
83
  r.resolve=function(a){var b=this.clone();"data"===b.Ea&&(b=new Nb);var c=!!a.Ea;c?Ob(b,a.Ea):c=!!a.nb;c?b.nb=a.nb:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.Gb;var d=a.ta;if(c)Pb(b,a.Gb);else if(c=!!a.ta){if("/"!=d.charAt(0))if(this.Fa&&!this.ta)d="/"+d;else{var e=b.ta.lastIndexOf("/");-1!=e&&(d=b.ta.substr(0,e+1)+d)}if(".."==d||"."==d)d="";else if(-1!=d.indexOf("./")||-1!=d.indexOf("/.")){e=0==d.lastIndexOf("/",0);d=d.split("/");for(var f=[],g=0;g<d.length;){var h=d[g++];"."==h?e&&g==d.length&&f.push(""):".."==
84
84
  h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),e&&g==d.length&&f.push("")):(f.push(h),e=!0)}d=f.join("/")}}c?b.ta=d:c=""!==a.g.toString();c?Qb(b,a.g.clone()):c=!!a.eb;c&&(b.eb=a.eb);return b};r.clone=function(){return new Nb(this)};function Ob(a,b,c){a.Ea=c?Rb(b,!0):b;a.Ea&&(a.Ea=a.Ea.replace(/:$/,""))}function Pb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Gb=b}else a.Gb=null}function Qb(a,b,c){b instanceof Sb?a.g=b:(c||(b=Tb(b,Yb)),a.g=new Sb(b))}
85
85
  function Rb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Tb(a,b,c){return null!=a?(a=encodeURI(a).replace(b,Zb),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Zb(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Ub=/[#\/\?@]/g,Wb=/[#\?:]/g,Vb=/[#\?]/g,Yb=/[#\?@]/g,Xb=/#/g;function Sb(a){this.g=a||null}
86
- function $b(a){if(!a.na&&(a.na={},a.Dc=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=Sb.prototype;r.na=null;r.Dc=null;r.add=function(a,b){$b(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.Dc++;return this};
87
- r.set=function(a,b){$b(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new Sb;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Dc=this.Dc}return a};function ac(a,b){return a.concat(b)}function bc(){}function cc(a){return null!=a};function dc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Nb(d)});return a.map(function(d){return new Nb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(ac,[]).map(function(d){return d.toString()})}function hc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
88
- function ic(a,b){if(1==b.length)return b[0];var c=jc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function jc(a,b){for(var c=t(kc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==lc?"":null}var lc="text",mc={va:"video",bb:"audio",X:lc,Sb:"image",hg:"application"},kc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function nc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}nc.prototype.resolve=function(){};nc.prototype.reject=function(){};function oc(a){this.h=a;this.g=void 0}oc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function pc(a){this.h=a;this.g=null}pc.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};pc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Jb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new pc(function(){b.h()})).S(a);return this};O.prototype.Ca=function(a){var b=this;this.stop();this.g=(new pc(function(){b.g.S(a);b.h()})).S(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Ca;O.prototype.tickAfter=O.prototype.S;
86
+ function $b(a){if(!a.na&&(a.na={},a.Ec=0,a.g))for(var b=a.g.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null;if(0<=d){var f=b[c].substring(0,d);e=b[c].substring(d+1)}else f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));e=e||"";a.add(f,decodeURIComponent(e.replace(/\+/g," ")))}}r=Sb.prototype;r.na=null;r.Ec=null;r.add=function(a,b){$b(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.Ec++;return this};
87
+ r.set=function(a,b){$b(this);this.g=null;this.na.hasOwnProperty(a)?this.na[a]=[b]:this.add(a,b);return this};r.toString=function(){if(this.g)return this.g;if(!this.na)return"";var a=[],b;for(b in this.na)for(var c=encodeURIComponent(b),d=this.na[b],e=0;e<d.length;e++){var f=c;""!==d[e]&&(f+="="+encodeURIComponent(d[e]));a.push(f)}return this.g=a.join("&")};r.clone=function(){var a=new Sb;a.g=this.g;if(this.na){var b={},c;for(c in this.na)b[c]=this.na[c].concat();a.na=b;a.Ec=this.Ec}return a};function ac(a,b){return a.concat(b)}function bc(){}function cc(a){return null!=a};function dc(a,b){if(0==b.length)return a;var c=b.map(function(d){return new Nb(d)});return a.map(function(d){return new Nb(d)}).map(function(d){return c.map(function(e){return d.resolve(e)})}).reduce(ac,[]).map(function(d){return d.toString()})}function hc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
88
+ function ic(a,b){if(1==b.length)return b[0];var c=jc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function jc(a,b){for(var c=t(kc[a]),d=c.next();!d.done;d=c.next()){d=d.value;for(var e=t(b),f=e.next();!f.done;f=e.next())if(f=f.value,d.test(f.trim()))return f.trim()}return a==lc?"":null}var lc="text",mc={va:"video",bb:"audio",X:lc,Sb:"image",ig:"application"},kc={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function nc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}nc.prototype.resolve=function(){};nc.prototype.reject=function(){};function oc(a){this.h=a;this.g=void 0}oc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function pc(a){this.h=a;this.g=null}pc.prototype.S=function(a){var b=this;this.stop();var c=!0,d=null;this.g=function(){window.clearTimeout(d);c=!1};d=window.setTimeout(function(){c&&b.h()},1E3*a);return this};pc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Jb=function(){this.stop();this.h();return this};O.prototype.S=function(a){var b=this;this.stop();this.g=(new pc(function(){b.h()})).S(a);return this};O.prototype.Ca=function(a){var b=this;this.stop();this.g=(new pc(function(){b.g.S(a);b.h()})).S(a);return this};O.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)};M("shaka.util.Timer",O);O.prototype.stop=O.prototype.stop;O.prototype.tickEvery=O.prototype.Ca;O.prototype.tickAfter=O.prototype.S;
89
89
  O.prototype.tickNow=O.prototype.Jb;function qc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function rc(a){return""!=sc().canPlayType(a)}function tc(){return uc("Xbox One")}function vc(){return uc("Tizen")}function wc(){return uc("Web0S")&&uc("Chrome/38.0.2125.122 Safari/537.36")}function xc(){return uc("CrKey")}function yc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!vc()&&!uc("PC=EOS")&&!zc()}function zc(){return uc("PlayStation 4")}
90
- function Ac(){if(!yc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function uc(a){return(navigator.userAgent||"").includes(a)}function sc(){if(Bc)return Bc;Cc||(Cc=new O(function(){Bc=null}));(Bc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Bc=document.createElement("video"));Cc.S(1);return Bc}var Cc=null,Bc=null;function Ec(){}function Fc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!zc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;a=Gc(a);a=escape(a);try{return decodeURIComponent(a)}catch(b){throw new N(2,2,2004);}}
91
- function Hc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ib(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Gc(d)}
92
- function Ic(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Fc(c);if(254==c[0]&&255==c[1])return Hc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Hc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Hc(a,!1);if(0==c[1]&&0==c[3])return Hc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Fc(a);throw new N(2,2,2003);}
93
- function Jc(a){if(window.TextEncoder&&!zc()){var b=new TextEncoder;return Gb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gb(b)}function Kc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}function Gc(a){return Lc.value()(a)}M("shaka.util.StringUtils",Ec);Ec.resetFromCharCode=function(){Lc.g=void 0};Ec.toUTF16=Kc;Ec.toUTF8=Jc;
94
- Ec.fromBytesAutoDetect=Ic;Ec.fromUTF16=Hc;Ec.fromUTF8=Fc;var Lc=new oc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Mc(){}function Nc(a){a=Gc(Fb(a));return btoa(a)}function Oc(a,b){b=void 0==b?!0:b;var c=Nc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Pc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Qc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
95
- function Rc(a){var b=Fb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Sc(){for(var a=Ha.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Mc);Mc.concat=Sc;Mc.toHex=Rc;Mc.fromHex=Qc;Mc.fromBase64=Pc;Mc.toBase64=Oc;Mc.toStandardBase64=Nc;function Tc(){var a=this;this.o=Kb.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Sc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Sc.apply(Mc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Tc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
96
- function Uc(a,b){if(!Kb.get("muxjs")()||!Vc(a))return!1;if(b)return MediaSource.isTypeSupported(Wc(b,a));var c=Wc("audio",a),d=Wc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Vc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
97
- function Wc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Xc(a,b){a.l=!0;a.h=new nc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Yc(){}function Zc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function $c(a,b,c){a=Zc(a,b);if(Vc(a)){if(Kb.get("muxjs")())return Wc(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
98
- function ad(a){var b=bd(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
99
- case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function cd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function bd(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}M("shaka.util.MimeUtils",Yc);Yc.getFullType=Zc;
100
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function dd(a){this.j=null;this.i=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.o=new Map}function ed(a){return fd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}dd.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
101
- function gd(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.j||!a.i)return k["return"]();if(null==c||null==d)return a.j.parseInit(Fb(b)),k["return"]();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Fb(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);z(k)})}
102
- dd.prototype.remove=function(a,b){var c=this;return K(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function hd(a,b,c){a.l=b;a.m=c}function id(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
103
- function jd(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new ib(c.startTime,c.endTime,c.text)});return b}function kd(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())kd(a,d.value,c)}
104
- function od(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);kd(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
105
- a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",dd);dd.prototype.destroy=dd.prototype.destroy;dd.findParser=function(a){return fd[a]};dd.unregisterParser=function(a){delete fd[a]};dd.registerParser=function(a,b){fd[a]=b};var fd={};function pd(){}function qd(a,b){a=R(a);b=R(b);return a.split("-")[0]==b.split("-")[0]}function rd(a,b){a=R(a);b=R(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function sd(a,b){a=R(a);b=R(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function R(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=td.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
106
- function ud(a,b){a=R(a);b=R(b);return b==a?4:rd(b,a)?3:sd(b,a)?2:rd(a,b)?1:0}function vd(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=td.get(a)||a}function wd(a){return a.language?R(a.language):a.audio&&a.audio.language?R(a.audio.language):a.video&&a.video.language?R(a.video.language):"und"}
107
- function xd(a,b){for(var c=R(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(R(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,rd(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,sd(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,rd(c,f))return f;return null}M("shaka.util.LanguageUtils",pd);pd.findClosestLocale=xd;pd.getLocaleForVariant=wd;
108
- pd.getLocaleForText=function(a){return R(a.language||"und")};pd.getBase=vd;pd.relatedness=ud;pd.areSiblings=function(a,b){var c=vd(a),d=vd(b);return a!=c&&b!=d&&c==d};pd.normalize=R;pd.isSiblingOf=sd;pd.isParentOf=rd;pd.areLanguageCompatible=qd;pd.areLocaleCompatible=function(a,b){a=R(a);b=R(b);return a==b};
109
- var td=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
90
+ function Ac(){if(!yc())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null}function uc(a){return(navigator.userAgent||"").includes(a)}function sc(){if(Bc)return Bc;Cc||(Cc=new O(function(){Bc=null}));(Bc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Bc=document.createElement("video"));Cc.S(1);return Bc}var Cc=null,Bc=null;function Dc(){}
91
+ function Fc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!zc())return a=(new TextDecoder).decode(a),a.includes("\ufffd")&&Ua('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),a;for(var b="",c=0;c<a.length;++c){var d=65533;0==(a[c]&128)?d=a[c]:a.length>=c+2&&192==(a[c]&224)&&128==(a[c+1]&192)?(d=(a[c]&31)<<6|a[c+1]&63,c+=1):a.length>=c+3&&224==(a[c]&240)&&128==(a[c+1]&192)&&128==
92
+ (a[c+2]&192)?(d=(a[c]&15)<<12|(a[c+1]&63)<<6|a[c+2]&63,c+=2):a.length>=c+4&&240==(a[c]&241)&&128==(a[c+1]&192)&&128==(a[c+2]&192)&&128==(a[c+3]&192)&&(d=(a[c]&7)<<18|(a[c+1]&63)<<12|(a[c+2]&63)<<6|a[c+3]&63,c+=3);if(65535>=d)b+=String.fromCharCode(d);else{d-=65536;var e=d&1023;b+=String.fromCharCode(55296+(d>>10));b+=String.fromCharCode(56320+e)}}return b}
93
+ function Gc(a,b,c){if(!a)return"";if(!c&&0!=a.byteLength%2)throw new N(2,2,2004);c=Math.floor(a.byteLength/2);var d=new Uint16Array(c);a=Ib(a);for(var e=0;e<c;e++)d[e]=a.getUint16(2*e,b);return Hc.value()(d)}
94
+ function Ic(a){function b(d){return c.byteLength<=d||32<=c[d]&&126>=c[d]}if(!a)return"";var c=Fb(a);if(239==c[0]&&187==c[1]&&191==c[2])return Fc(c);if(254==c[0]&&255==c[1])return Gc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Gc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Gc(a,!1);if(0==c[1]&&0==c[3])return Gc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Fc(a);throw new N(2,2,2003);}
95
+ function Jc(a){if(window.TextEncoder&&!zc()){var b=new TextEncoder;return Gb(b.encode(a))}a=encodeURIComponent(a);a=unescape(a);b=new Uint8Array(a.length);for(var c=0;c<a.length;c++)b[c]=a[c].charCodeAt(0);return Gb(b)}function Kc(a,b){for(var c=new ArrayBuffer(2*a.length),d=new DataView(c),e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c}M("shaka.util.StringUtils",Dc);Dc.resetFromCharCode=function(){Hc.g=void 0};Dc.toUTF16=Kc;Dc.toUTF8=Jc;Dc.fromBytesAutoDetect=Ic;Dc.fromUTF16=Gc;
96
+ Dc.fromUTF8=Fc;var Hc=new oc(function(){function a(c){try{var d=new Uint8Array(c);return 0<String.fromCharCode.apply(null,d).length}catch(e){return!1}}for(var b={Ua:65536};0<b.Ua;b={Ua:b.Ua},b.Ua/=2)if(a(b.Ua))return function(c){return function(d){for(var e="",f=0;f<d.length;f+=c.Ua)e+=String.fromCharCode.apply(null,d.subarray(f,f+c.Ua));return e}}(b);return null});function Lc(){}function Mc(a){a=Fb(a);a=Hc.value()(a);return btoa(a)}function Nc(a,b){b=void 0==b?!0:b;var c=Mc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Oc(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}function Pc(a){for(var b=a.length/2,c=new Uint8Array(b),d=0;d<b;d++)c[d]=window.parseInt(a.substr(2*d,2),16);return c}
97
+ function Qc(a){var b=Fb(a);a="";b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,c=c.toString(16),1==c.length&&(c="0"+c),a+=c;return a}function Rc(){for(var a=Ha.apply(0,arguments),b=0,c=t(a),d=c.next();!d.done;d=c.next())b+=d.value.byteLength;b=new Uint8Array(b);c=0;a=t(a);for(d=a.next();!d.done;d=a.next())d=d.value,b.set(Fb(d),c),c+=d.byteLength;return b}M("shaka.util.Uint8ArrayUtils",Lc);Lc.concat=Rc;Lc.toHex=Qc;Lc.fromHex=Pc;Lc.fromBase64=Oc;Lc.toBase64=Nc;Lc.toStandardBase64=Mc;function Sc(){var a=this;this.o=Kb.get("muxjs")();this.g=new this.o.mp4.Transmuxer({keepOriginalTimestamps:!0});this.h=null;this.m=[];this.j=[];this.i=[];this.l=!1;this.g.on("data",function(b){a.j=b.captions;a.i=b.metadata;a.m.push(Rc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Rc.apply(Lc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Sc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
98
+ function Tc(a,b){if(!Kb.get("muxjs")()||!Uc(a))return!1;if(b)return MediaSource.isTypeSupported(Vc(b,a));var c=Vc("audio",a),d=Vc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Uc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
99
+ function Vc(a,b){var c=b.replace(/mp2t/i,"mp4");"audio"==a&&(c=c.replace("video","audio"));var d=/avc1\.(66|77|100)\.(\d+)/.exec(c);if(d){var e="avc1.",f=d[1],g=Number(d[2]);e=("66"==f?e+"4200":"77"==f?e+"4d00":e+"6400")+(g>>4).toString(16);e+=(g&15).toString(16);c=c.replace(d[0],e)}return c}function Wc(a,b){a.l=!0;a.h=new nc;a.m=[];a.j=[];a.i=[];var c=Fb(b);a.g.push(c);a.g.flush();a.l&&a.h.reject(new N(2,3,3018));return a.h};function Xc(){}function Yc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Zc(a,b,c){a=Yc(a,b);if(Uc(a)){if(Kb.get("muxjs")())return Vc(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
100
+ function $c(a){var b=ad(a);a=b[0];b=b[1].toLowerCase();switch(!0){case "mp4a"===a&&"69"===b:case "mp4a"===a&&"6b"===b:return"mp3";case "mp4a"===a&&"66"===b:case "mp4a"===a&&"67"===b:case "mp4a"===a&&"68"===b:case "mp4a"===a&&"40.2"===b:case "mp4a"===a&&"40.02"===b:case "mp4a"===a&&"40.5"===b:case "mp4a"===a&&"40.05"===b:case "mp4a"===a&&"40.29"===b:case "mp4a"===a&&"40.42"===b:return"aac";case "mp4a"===a&&"a5"===b:return"ac-3";case "mp4a"===a&&"a6"===b:return"ec-3";case "mp4a"===a&&"b2"===b:return"dtsx";
101
+ case "mp4a"===a&&"a9"===b:return"dtsc";case "avc1"===a:case "avc3"===a:return"avc";case "hvc1"===a:case "hev1"===a:return"hevc";case "dvh1"===a:case "dvhe"===a:return"dovi"}return a}function bd(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function ad(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}M("shaka.util.MimeUtils",Xc);Xc.getFullType=Yc;
102
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function cd(a){this.j=null;this.i=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.C="";this.o=new Map}function dd(a){return ed[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}cd.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
103
+ function fd(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g)return u(k,Promise.resolve(),2);if(!a.j||!a.i)return k["return"]();if(null==c||null==d)return a.j.parseInit(Fb(b)),k["return"]();e=a.u?c:a.s;f={periodStart:a.s,segmentStart:c,segmentEnd:d,vttOffset:e};g=a.j.parseMedia(Fb(b),f);h=g.filter(function(l){return l.startTime>=a.l&&l.startTime<a.m});a.i.append(h);null==a.g&&(a.g=Math.max(c,a.l));a.h=Math.min(d,a.m);z(k)})}
104
+ cd.prototype.remove=function(a,b){var c=this;return K(function(d){if(1==d.g)return u(d,Promise.resolve(),2);!c.i||!c.i.remove(a,b)||null==c.g||b<=c.g||a>=c.h||(a<=c.g&&b>=c.h?c.g=c.h=null:a<=c.g&&b<c.h?c.g=b:a>c.g&&b>=c.h&&(c.h=a));z(d)})};function gd(a,b,c){a.l=b;a.m=c}function hd(a,b,c){a.C=b;if(b=a.o.get(b))for(var d=t(b.keys()),e=d.next();!e.done;e=d.next())(e=b.get(e.value).filter(function(f){return f.endTime<=c}))&&a.i.append(e)}
105
+ function id(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,b.push({stream:c.stream,cue:new ib(c.startTime,c.endTime,c.text)});return b}function jd(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())jd(a,d.value,c)}
106
+ function kd(a,b,c,d,e){var f=c+" "+d,g=new Map;b=t(b);for(var h=b.next();!h.done;h=b.next()){var k=h.value;h=k.stream;k=k.cue;g.has(h)||g.set(h,new Map);g.get(h).has(f)||g.get(h).set(f,[]);jd(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.C&&a.i.append([k]))}e=t(g.keys());for(f=e.next();!f.done;f=e.next())for(f=f.value,a.o.has(f)||a.o.set(f,new Map),b=t(g.get(f).keys()),h=b.next();!h.done;h=b.next())h=h.value,k=g.get(f).get(h),a.o.get(f).set(h,k);a.g=null==a.g?Math.max(c,
107
+ a.l):Math.min(a.g,Math.max(c,a.l));a.h=Math.max(a.h,Math.min(d,a.m))}M("shaka.text.TextEngine",cd);cd.prototype.destroy=cd.prototype.destroy;cd.findParser=function(a){return ed[a]};cd.unregisterParser=function(a){delete ed[a]};cd.registerParser=function(a,b){ed[a]=b};var ed={};function od(){}function pd(a,b){a=R(a);b=R(b);return a.split("-")[0]==b.split("-")[0]}function qd(a,b){a=R(a);b=R(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function rd(a,b){a=R(a);b=R(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function R(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=sd.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
108
+ function td(a,b){a=R(a);b=R(b);return b==a?4:qd(b,a)?3:rd(b,a)?2:qd(a,b)?1:0}function ud(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=sd.get(a)||a}function vd(a){return a.language?R(a.language):a.audio&&a.audio.language?R(a.audio.language):a.video&&a.video.language?R(a.video.language):"und"}
109
+ function wd(a,b){for(var c=R(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(R(f.value));e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,f==c)return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,qd(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,rd(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,qd(c,f))return f;return null}M("shaka.util.LanguageUtils",od);od.findClosestLocale=wd;od.getLocaleForVariant=vd;
110
+ od.getLocaleForText=function(a){return R(a.language||"und")};od.getBase=ud;od.relatedness=td;od.areSiblings=function(a,b){var c=ud(a),d=ud(b);return a!=c&&b!=d&&c==d};od.normalize=R;od.isSiblingOf=rd;od.isParentOf=qd;od.areLanguageCompatible=pd;od.areLocaleCompatible=function(a,b){a=R(a);b=R(b);return a==b};
111
+ var sd=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
110
112
  "cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
111
113
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
112
114
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
113
115
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
114
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function yd(){this.g={}}r=yd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function zd(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function Ad(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Bd(f,b,c);f=Cd(f,d);b=Dd(f);b=Ed(b);var g=Fd(b,e);a.variants=a.variants.filter(function(h){return Gd(h)==g?!0:!1})}function Dd(a){var b=new yd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Gd(c);b.push(d,c)}return b}
115
- function Ed(a){var b=0,c=new Map,d=a.size();zd(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new yd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
116
- function Bd(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={pd:d.pd},e=b.next())if(d.pd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.pd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={ad:d.ad},b=c.next())if(d.ad=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.ad)}}(d)),b.length){a=b;break}return a}
117
- function Fd(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Hd||d==Id){if(a=Jd(a,d),1==a.size())return a.keys()[0]}else if(d==Kd)break;return Ld(a)}function Jd(a,b){var c=0,d=new yd;zd(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
118
- function Ld(a){var b="",c=Infinity;zd(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Gd(a){var b="";a.video&&(b=ad(a.video.codecs));var c="";a.audio&&(c=ad(a.audio.codecs));return b+"-"+c}function Md(a,b,c){a.variants=a.variants.filter(function(d){return Nd(d,b,c)})}
119
- function Nd(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
120
- function Od(a,b){return K(function(c){if(1==c.g)return u(c,Pd(b,0<b.offlineSessionIds.length),2);Qd(a,b);Rd(b);return u(c,Sd(b),0)})}
121
- function Pd(a,b){return K(function(c){if(1==c.g)return u(c,Td(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Ud(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ic("video",g);g=ic("audio",g);g=$c(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=$c(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Vd(f.codecs),f=$c(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(tc()&&e&&(e.width&&
122
- 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Za(Wd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Wd(d));return e});z(c)})}
123
- function Td(a,b,c){var d,e,f,g,h,k,l,m,p,n,q;return K(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return K(function(D){if(1==D.g)return B(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return w=D.h,y.decodingInfos.push(w),va(D,0);F(D);JSON.stringify(x);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Xd(l,b,c),p=t(m),n=p.next();!n.done;n=p.next())q=n.value,f.push(g(l,q));return u(v,Promise.all(f),
116
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function xd(){this.g={}}r=xd.prototype;r.push=function(a,b){this.g.hasOwnProperty(a)?this.g[a].push(b):this.g[a]=[b]};r.get=function(a){return(a=this.g[a])?a.slice():null};r.remove=function(a,b){a in this.g&&(this.g[a]=this.g[a].filter(function(c){return c!=b}),0==this.g[a].length&&delete this.g[a])};function yd(a,b){for(var c in a.g)b(c,a.g[c])}r.size=function(){return Object.keys(this.g).length};r.keys=function(){return Object.keys(this.g)};function zd(a,b,c,d,e){var f=a.variants;if(b.length||c.length)f=Ad(f,b,c);f=Bd(f,d);b=Cd(f);b=Dd(b);var g=Ed(b,e);a.variants=a.variants.filter(function(h){return Fd(h)==g?!0:!1})}function Cd(a){var b=new xd;a=t(a);for(var c=a.next();!c.done;c=a.next()){c=c.value;var d=Fd(c);b.push(d,c)}return b}
117
+ function Dd(a){var b=0,c=new Map,d=a.size();yd(a,function(e,f){for(var g=t(f),h=g.next();!h.done;h=g.next()){h=h.value;var k=h.video;if(k&&k.width&&k.height){k=k.width*k.height*(k.frameRate||1);c.has(k)||c.set(k,new xd);var l=c.get(k);l.push(e,h);l.size()===d&&(b=Math.max(b,k))}}});return b?c.get(b):a}
118
+ function Ad(a,b,c){var d={};b=t(b);for(var e=b.next();!e.done;d={qd:d.qd},e=b.next())if(d.qd=e.value,e=a.filter(function(f){return function(g){return g.video&&g.video.codecs.startsWith(f.qd)}}(d)),e.length){a=e;break}d={};c=t(c);for(b=c.next();!b.done;d={bd:d.bd},b=c.next())if(d.bd=b.value,b=a.filter(function(f){return function(g){return g.audio&&g.audio.codecs.startsWith(f.bd)}}(d)),b.length){a=b;break}return a}
119
+ function Ed(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next())if(d=d.value,d==Gd||d==Hd){if(a=Id(a,d),1==a.size())return a.keys()[0]}else if(d==Jd)break;return Kd(a)}function Id(a,b){var c=0,d=new xd;yd(a,function(e,f){for(var g=0,h=0,k=t(f),l=k.next();!l.done;l=k.next())l=l.value,l.decodingInfos.length&&(g+=l.decodingInfos[0][b]?1:0,h++);g/=h;g>c?(d.g={},d.push(e,f),c=g):g==c&&d.push(e,f)});return d}
120
+ function Kd(a){var b="",c=Infinity;yd(a,function(d,e){for(var f=0,g=0,h=t(e),k=h.next();!k.done;k=h.next())f+=k.value.bandwidth||0,++g;f/=g;f<c&&(b=d,c=f)});return b}function Fd(a){var b="";a.video&&(b=$c(a.video.codecs));var c="";a.audio&&(c=$c(a.audio.codecs));return b+"-"+c}function Ld(a,b,c){a.variants=a.variants.filter(function(d){return Md(d,b,c)})}
121
+ function Md(a,b,c){function d(f,g,h){return f>=g&&f<=h}var e=a.video;return e&&e.width&&e.height&&(!d(e.width,b.minWidth,Math.min(b.maxWidth,c.width))||!d(e.height,b.minHeight,Math.min(b.maxHeight,c.height))||!d(e.width*e.height,b.minPixels,b.maxPixels))||a&&a.video&&a.video.frameRate&&!d(a.video.frameRate,b.minFrameRate,b.maxFrameRate)||!d(a.bandwidth,b.minBandwidth,b.maxBandwidth)?!1:!0}
122
+ function Nd(a,b){return K(function(c){if(1==c.g)return u(c,Od(b,0<b.offlineSessionIds.length),2);Pd(a,b);Qd(b);return u(c,Rd(b),0)})}
123
+ function Od(a,b){return K(function(c){if(1==c.g)return u(c,Sd(a.variants,b,!1),2);a.variants=a.variants.filter(function(d){var e=d.video;if(e){var f=Td(e.codecs);if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ic("video",g);g=ic("audio",g);g=Zc(e.mimeType,g,"audio");if(!MediaSource.isTypeSupported(g))return!1}f=Zc(e.mimeType,f,"video");if(!MediaSource.isTypeSupported(f))return!1}if(f=d.audio)if(g=Ud(f.codecs),f=Zc(f.mimeType,g,"audio"),!MediaSource.isTypeSupported(f))return!1;if(tc()&&e&&(e.width&&
124
+ 1920<e.width||e.height&&1080<e.height)&&e.codecs.includes("avc1."))return Za(Vd(d)),!1;(e=d.decodingInfos.some(function(h){return h.supported}))||Za(Vd(d));return e});z(c)})}
125
+ function Sd(a,b,c){var d,e,f,g,h,k,l,m,p,n,q;return K(function(v){if(d=a.some(function(y){return y.decodingInfos.length}))return v["return"]();e=navigator.mediaCapabilities;f=[];g=function(y,x){var w;return K(function(D){if(1==D.g)return B(D,2),u(D,e.decodingInfo(x),4);if(2!=D.g)return w=D.h,y.decodingInfos.push(w),va(D,0);F(D);JSON.stringify(x);z(D)})};h=t(a);for(k=h.next();!k.done;k=h.next())for(l=k.value,m=Wd(l,b,c),p=t(m),n=p.next();!n.done;n=p.next())q=n.value,f.push(g(l,q));return u(v,Promise.all(f),
124
126
  0)})}
125
- function Xd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ic("video",g);f=Ud(f);g=ic("audio",g);g=$c(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Ud(f);f=$c(e.mimeType,f,"video");c.video={contentType:f,width:e.width||1,height:e.height||1,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
126
- break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Vd(d.codecs),f=$c(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
127
+ function Wd(a,b,c){var d=a.audio,e=a.video;c={type:c?"file":"media-source"};if(e){var f=e.codecs;if(e.codecs.includes(",")){var g=e.codecs.split(",");f=ic("video",g);f=Td(f);g=ic("audio",g);g=Zc(e.mimeType,g,"audio");c.audio={contentType:g,channels:2,bitrate:a.bandwidth||1,samplerate:1,spatialRendering:!1}}f=Td(f);f=Zc(e.mimeType,f,"video");c.video={contentType:f,width:e.width||64,height:e.height||64,bitrate:e.bandwidth||a.bandwidth||1,framerate:e.frameRate||1};if(e.hdr)switch(e.hdr){case "SDR":c.video.transferFunction="srgb";
128
+ break;case "PQ":c.video.transferFunction="pq";break;case "HLG":c.video.transferFunction="hlg"}}d&&(f=Ud(d.codecs),f=Zc(d.mimeType,f,"audio"),c.audio={contentType:f,channels:d.channelsCount||2,bitrate:d.bandwidth||a.bandwidth||1,samplerate:d.audioSamplingRate||1,spatialRendering:d.spatialAudio});g=(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[]);if(!g.length)return[c];a=[];f=new Map;g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;f.get(k.keySystem)||f.set(k.keySystem,[]);
127
129
  f.get(k.keySystem).push(k)}g=b?"required":"optional";b=b?["persistent-license"]:["temporary"];k=t(f.keys());for(var l=k.next();!l.done;l=k.next()){var m=l.value;l=Object.assign({},c);var p=f.get(m);m={keySystem:m,initDataType:"cenc",persistentState:g,distinctiveIdentifier:"optional",sessionTypes:b};p=t(p);for(h=p.next();!h.done;h=p.next()){h=h.value;if(h.initData&&h.initData.length){for(var n=new Set,q=t(h.initData),v=q.next();!v.done;v=q.next())n.add(v.value.initDataType);m.initDataType=h.initData[0].initDataType}h.distinctiveIdentifierRequired&&
128
- (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function Vd(a){return vc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
129
- function Ud(a){return"vp9"==a?"vp09.00.10.08":a}function Qd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Yd(d,a.audio)||c&&a&&a.video&&!Yd(c,a.video)?!1:!0})}function Rd(a){a.textStreams=a.textStreams.filter(function(b){return ed(Zc(b.mimeType,b.codecs))})}
130
- function Sd(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Zd.has(f)){l.A(5);break}g=$d.get(f);if(!g){Zd.set(f,!1);l.A(5);break}return u(l,ae(g),7);case 7:h=l.h,Zd.set(f,h);case 5:(k=Zd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,z(l)}})}
131
- function ae(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)})["catch"](function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Yd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
132
- function be(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=t(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=t(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
130
+ (m.distinctiveIdentifier="required");h.persistentStateRequired&&(m.persistentState="required");h.sessionType&&(m.sessionTypes=[h.sessionType]);d&&(m.audio?m.audio.robustness=m.audio.robustness||h.audioRobustness:m.audio={robustness:h.audioRobustness});e&&(m.video?m.video.robustness=m.video.robustness||h.videoRobustness:m.video={robustness:h.videoRobustness})}l.keySystemConfiguration=m;a.push(l)}return a}function Ud(a){return vc()?"ac-3"==a.toLowerCase()?"ec-3":a:a}
131
+ function Td(a){return"vp9"==a?"vp09.00.41.08":a}function Pd(a,b){b.variants=b.variants.filter(function(c){var d=c.audio;c=c.video;return d&&a&&a.audio&&!Xd(d,a.audio)||c&&a&&a.video&&!Xd(c,a.video)?!1:!0})}function Qd(a){a.textStreams=a.textStreams.filter(function(b){return dd(Yc(b.mimeType,b.codecs))})}
132
+ function Rd(a){var b,c,d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:b=[],c=t(a.imageStreams),d=c.next();case 2:if(d.done){l.A(4);break}e=d.value;f=e.mimeType;if(Yd.has(f)){l.A(5);break}g=Zd.get(f);if(!g){Yd.set(f,!1);l.A(5);break}return u(l,$d(g),7);case 7:h=l.h,Yd.set(f,h);case 5:(k=Yd.get(f))&&b.push(e);d=c.next();l.A(2);break;case 4:a.imageStreams=b,z(l)}})}
133
+ function $d(a){return new Promise(function(b){var c=new Image;c.src=a;"decode"in c?c.decode().then(function(){b(!0)})["catch"](function(){b(!1)}):c.onload=c.onerror=function(){b(2===c.height)}})}function Xd(a,b){return a.mimeType!=b.mimeType||a.codecs.split(".")[0]!=b.codecs.split(".")[0]?!1:!0}
134
+ function ae(a){var b=a.audio,c=a.video,d=b?b.mimeType:null,e=c?c.mimeType:null,f=b?b.codecs:null,g=c?c.codecs:null,h=[];g&&h.push(g);f&&h.push(f);var k=[];c&&k.push(c.mimeType);b&&k.push(b.mimeType);k=k[0]||null;var l=[];b&&l.push(b.kind);c&&l.push(c.kind);l=l[0]||null;var m=new Set;if(b)for(var p=t(b.roles),n=p.next();!n.done;n=p.next())m.add(n.value);if(c)for(p=t(c.roles),n=p.next();!n.done;n=p.next())m.add(n.value);a={id:a.id,active:!1,type:"variant",bandwidth:a.bandwidth,language:a.language,label:null,
133
135
  kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:k,audioMimeType:d,videoMimeType:e,codecs:h.join(", "),audioCodec:f,videoCodec:g,primary:a.primary,roles:Array.from(m),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null};c&&(a.videoId=c.id,a.originalVideoId=c.originalId,
134
136
  a.width=c.width||null,a.height=c.height||null,a.frameRate=c.frameRate||null,a.pixelAspectRatio=c.pixelAspectRatio||null,a.videoBandwidth=c.bandwidth||null);b&&(a.audioId=b.id,a.originalAudioId=b.originalId,a.channelsCount=b.channelsCount,a.audioSamplingRate=b.audioSamplingRate,a.audioBandwidth=b.bandwidth||null,a.spatialAudio=b.spatialAudio,a.label=b.label,a.audioRoles=b.roles);return a}
135
- function ce(a){return{id:a.id,active:!1,type:lc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
137
+ function be(a){return{id:a.id,active:!1,type:lc,bandwidth:0,language:a.language,label:a.label,kind:a.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:a.codecs||null,audioCodec:null,videoCodec:null,primary:a.primary,roles:a.roles,audioRoles:null,forced:a.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
136
138
  originalAudioId:null,originalTextId:a.originalId,originalImageId:null}}
137
- function de(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
138
- audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function ee(a){a.__shaka_id||(a.__shaka_id=fe++);return a.__shaka_id}
139
- function ge(a){var b=ie(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function je(a){var b=ie(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
140
- function ie(a){return{id:ee(a),active:!1,type:"",bandwidth:0,language:R(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
141
- originalTextId:null,originalImageId:null}}function ke(a){return a.allowedByApplication&&a.allowedByKeySystem}function le(a){return a.filter(function(b){return ke(b)})}
142
- function Cd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
143
- function me(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=xd(R(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return R(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=ne(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(ac,[]);return a.length?
144
- ne(e,a[0]):e}function ne(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Wd(a){var b=[];a.audio&&b.push(oe(a.audio));a.video&&b.push(oe(a.video));return b.join(", ")}
145
- function oe(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
146
- var fe=0,Hd="smooth",Id="powerEfficient",Kd="bandwidth",Zd=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),$d=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function pe(){var a=this;this.l=null;this.j=!1;this.h=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Sa;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}r=pe.prototype;r.stop=function(){this.l=null;this.j=!1;this.i=[];this.o=1;this.m=null};r.init=function(a){this.l=a};
147
- r.chooseVariant=function(){var a=qe(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(re(this));this.i.length&&!a.length&&(a=qe(null,this.i),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.o)?1:Math.abs(this.o),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
148
- r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};r.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.j)a:{if(!this.s){var c=this.h;if(!(c.g>=c.i))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(re(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(re(this))};r.setVariants=function(a){this.i=a};r.playbackRateChanged=function(a){this.o=a};
149
- r.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function re(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function qe(a,b){a&&(b=b.filter(function(c){return Nd(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",pe);pe.prototype.configure=pe.prototype.configure;
150
- pe.prototype.playbackRateChanged=pe.prototype.playbackRateChanged;pe.prototype.setVariants=pe.prototype.setVariants;pe.prototype.getBandwidthEstimate=pe.prototype.getBandwidthEstimate;pe.prototype.segmentDownloaded=pe.prototype.segmentDownloaded;pe.prototype.disable=pe.prototype.disable;pe.prototype.enable=pe.prototype.enable;pe.prototype.chooseVariant=pe.prototype.chooseVariant;pe.prototype.init=pe.prototype.init;pe.prototype.stop=pe.prototype.stop;function se(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}se.prototype.add=function(a){return te(this.h,a)?(this.g.add(a),!0):!1};
151
- function te(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&ue(c,d)&&ve(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(ue(c,d)&&ve(c.roles,d.roles)));return c?!1:!0}se.prototype.values=function(){return this.g.values()};
152
- function ue(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return bd(f)[0]}),d=b.codecs.split(",").map(function(f){return bd(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function ve(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function we(a){this.g=a;this.h=new xe(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}we.prototype.create=function(a){var b=this,c=a.filter(function(d){return te(b.g,d)});return c.length?new se(c[0],c):this.h.create(a)};function xe(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
153
- xe.prototype.create=function(a){var b=[];b=ye(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ze(b,this.j);a.length&&(b=a);this.g&&(a=Cd(b,this.g),a.length&&(b=a));this.h&&(a=Ae(b,this.h),a.length&&(b=a));a=new se(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,te(a.h,c)&&a.add(c);return a};function ye(a,b){var c=R(b),d=xd(c,a.map(function(e){return wd(e)}));return d?a.filter(function(e){return d==wd(e)}):[]}
154
- function ze(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function Ae(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Be(){this.g=Ce;this.h=(new Map).set(Ce,2).set(De,1)}function Ee(a,b,c){a.h.set(Ce,c).set(De,b)}var De=0,Ce=1;function Fe(a,b){var c=Ge();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
155
- function He(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new O(e)).S(c/1E3)}),2)}a.h*=a.m;z(d)})}function Ge(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function Ie(a,b){this.promise=a;this.i=b;this.g=!1}function Je(a){return new Ie(Promise.reject(a),function(){return Promise.resolve()})}function Ke(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new Ie(a,function(){return Promise.resolve()})}function Le(a){return new Ie(Promise.resolve(a),function(){return Promise.resolve()})}function Me(a){return new Ie(a,function(){return a["catch"](function(){})})}Ie.prototype.abort=function(){this.g=!0;return this.i()};
156
- function Ne(a){return new Ie(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}Ie.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
157
- Ie.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Oe(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new nc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ie(f,function(){return d()})};
158
- function Oe(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",Ie);Ie.prototype.chain=Ie.prototype.Z;Ie.prototype["finally"]=Ie.prototype["finally"];Ie.all=Ne;Ie.prototype.abort=Ie.prototype.abort;Ie.notAbortable=Me;Ie.completed=Le;Ie.aborted=Ke;Ie.failed=Je;function S(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
159
- function Pe(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",S);function Qe(){this.da=new yd;this.Gc=this}Qe.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};Qe.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};Qe.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Gc;a.currentTarget=this.Gc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
160
- Qe.prototype.release=function(){this.da=null};function Re(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Se(a){var b={},c;for(c in a)b[c]=a[c];return b};function Te(){this.g=[]}function Ue(a,b){a.g.push(b["finally"](function(){eb(a.g,b)}))}Te.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Ve(a,b,c){Qe.call(this);this.i=!1;this.m=new Te;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa(Ve,Qe);r=Ve.prototype;r.Wd=function(a){this.o=a};function We(a,b,c,d){c=c||Xe;var e=Ye[a];if(!e||c>=e.priority)Ye[a]={priority:c,Kf:b,Lf:void 0===d?!1:d}}r.Mf=function(a){this.g.add(a)};r.cg=function(a){this.g["delete"](a)};r.Ue=function(){this.g.clear()};r.Nf=function(a){this.h.add(a)};r.dg=function(a){this.h["delete"](a)};r.Ve=function(){this.h.clear()};
161
- function Ze(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Qe.prototype.release.call(this);return this.m.destroy()};
162
- r.request=function(a,b){var c=this,d=new $e;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new af(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Re(b.retryParameters):Ge();b.uris=Re(b.uris);e=bf(this,a,b);var f=e.Z(function(){return cf(c,a,b,new Fe(b.retryParameters,!1),0,null,d)}),g=f.Z(function(p){return df(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
163
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(p){var n=Date.now()-l,q=p.response;q.timeMs+=k;q.timeMs+=n;p.zf||!c.l||q.fromCache||a!=ef||c.l(q.timeMs,q.data.byteLength);return q},function(p){p&&(p.severity=2);throw p;});e=new af(m.promise,function(){return m.abort()},d);Ue(this.m,e);return e};
164
- function bf(a,b,c){var d=Le(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={kd:e.kd},f=a.next())e.kd=f.value,d=d.Z(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.kd(b,c)}}(e));return d.Z(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
165
- function cf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Nb(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Ob(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Ye[k])?k.Kf:null;if(!m)return Je(new N(2,1,1E3,h));var p=k.Lf,n=null,q=null,v=!1,y=!1,x;return Me(He(d)).Z(function(){if(a.i)return Ke();x=Date.now();var w=m(c.uris[e],c,b,function(A,G,E){n&&n.stop();q&&q.S(C/1E3);a.l&&b==ef&&(a.l(A,G),l=!0,g.g=E)},function(A){a.j&&a.j(A,c,b);y=!0});
166
- if(!p)return w;var D=c.retryParameters.connectionTimeout;D&&(n=new O(function(){v=!0;w.abort()}),n.S(D/1E3));var C=c.retryParameters.stallTimeout;C&&(q=new O(function(){v=!0;w.abort()}));return w}).Z(function(w){n&&n.stop();q&&q.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var D={response:w,zf:l};!y&&a.j&&a.j(w.headers,c,b);return D},function(w){n&&n.stop();q&&q.stop();if(a.s){var D=null,C=0;w instanceof N&&(D=w,1001==w.code&&(C=w.data[1]));a.s(c,D,C,v)}if(a.i)return Ke();v&&(w=new N(1,1,1003,
167
- c.uris[e],b));if(w instanceof N){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new S("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,cf(a,b,c,d,e,w,g)}throw w;})}
168
- function df(a,b,c){var d=Le(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={ld:e.ld},f=a.next())e.ld=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.ld(b,h)}}(e));return d.Z(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Ve);Ve.prototype.request=Ve.prototype.request;Ve.prototype.destroy=Ve.prototype.destroy;Ve.makeRequest=Ze;
169
- Ve.defaultRetryParameters=function(){return Ge()};Ve.prototype.clearAllResponseFilters=Ve.prototype.Ve;Ve.prototype.unregisterResponseFilter=Ve.prototype.dg;Ve.prototype.registerResponseFilter=Ve.prototype.Nf;Ve.prototype.clearAllRequestFilters=Ve.prototype.Ue;Ve.prototype.unregisterRequestFilter=Ve.prototype.cg;Ve.prototype.registerRequestFilter=Ve.prototype.Mf;Ve.unregisterScheme=function(a){delete Ye[a]};Ve.registerScheme=We;Ve.prototype.setForceHTTPS=Ve.prototype.Wd;function $e(){this.g=0}
170
- Ve.NumBytesRemainingClass=$e;function af(a,b,c){Ie.call(this,a,b);this.h=c}pa(af,Ie);Ve.PendingRequest=af;var ef=1;Ve.RequestType={MANIFEST:0,SEGMENT:ef,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var Xe=3;Ve.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Xe};var Ye={};function ff(a){this.g=!1;this.h=new nc;this.i=a}ff.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function gf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function hf(){this.g=new yd}r=hf.prototype;r.release=function(){this.nc();this.g=null};r.B=function(a,b,c,d){this.g&&(a=new jf(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.tc(a,b,e);c(g)}var f=this;this.B(a,b,e,d)};r.tc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.tc(),this.g.remove(b,e))}};
171
- r.nc=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.tc();this.g.g={}}};M("shaka.util.EventManager",hf);hf.prototype.removeAll=hf.prototype.nc;hf.prototype.unlisten=hf.prototype.tc;hf.prototype.listenOnce=hf.prototype.oa;hf.prototype.listen=hf.prototype.B;hf.prototype.release=hf.prototype.release;function jf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=kf(a,d);this.target.addEventListener(b,c,this.g)}
172
- jf.prototype.tc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function kf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return lf(a)?b:b.capture||!1}
173
- function lf(a){var b=mf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}mf=b}return b||!1}var mf=void 0;function nf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function of(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function pf(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function qf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function rf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function sf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.s=null;this.ha=this.ca=!1;this.I=0;this.g=null;this.o=new hf;this.i=new Map;this.C=[];this.u=new nc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ia=new Map;this.da=new Map;this.W=new O(function(){return tf(c)});this.M=!1;this.L=[];this.R=!1;this.ea=(new O(function(){uf(c)})).Ca(b);this.u["catch"](function(){});this.j=new ff(function(){return vf(c)});this.Y=!1;this.F=null}r=sf.prototype;r.destroy=function(){return this.j.destroy()};
174
- function vf(a){return K(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.W.stop(),a.W=null,u(b,wf(a),2);case 2:if(!a.l){b.A(3);break}B(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.Y=!1,a.F=null,z(b)}})}r.configure=function(a){this.h=a};function xf(a,b,c){a.ha=!0;a.C=[];a.M=c;return yf(a,b)}
175
- function zf(a,b,c){a.C=c;a.M=0<c.length;return yf(a,b)}function Af(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Bf(a,g,[])}
176
- function yf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y;return K(function(x){if(1==x.g){if(c=Cf(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=pf(a.h.servers),Df(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Ef(l),p=t(m),n=p.next();!n.done;n=p.next())q=n.value,Hf(q,pf(a.h.servers),pf(a.h.advanced||{}));return u(x,
177
- Td(b,a.M,a.Y),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.ca=!0,x["return"](Promise.resolve());y=Bf(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}function If(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c["return"]();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return c["return"]();case 2:return B(c,4),a.F=a.l.setMediaKeys(a.s),u(c,a.F,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new N(2,6,6003,b.message));case 5:gf(a.j),z(c)}})}
178
- function Jf(a,b){return K(function(c){if(1==c.g)return u(c,If(a),2);Kf(a,b.initDataType,Fb(b.initData));z(c)})}
179
- r.Wb=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.s)return b.o.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d["return"]();b.l=a;b.o.oa(b.l,"play",function(){for(var e=t(b.L),f=e.next();!f.done;f=e.next())Lf(b,f.value);b.R=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.B(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return wf(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||window.shakaMediaKeysPolyfill||b.C.length?u(d,
180
- If(b),2):d.A(2)}Mf(b);c||b.C.length||b.o.B(b.l,"encrypted",function(e){return Jf(b,e)});z(d)})};
181
- function Nf(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=Ze([a.g.serverCertificateUri],a.h.retryParameters);B(g,3);c=a.D.kb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=F(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
182
- B(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function Of(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Pf(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ja=new nc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
183
- function Mf(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Kf(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Pf(a,d.value);b.length||a.C.length||a.u.resolve();return a.u}function Kf(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!uc("Tizen 2"))return;Qf(a,b,c,a.g.sessionType)}}function Rf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
184
- function Sf(a){a=a.i.keys();a=nf(a,function(b){return b.sessionId});return Array.from(a)}r.bc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Jc=function(){return qf(this.da)};
185
- function Bf(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y;return K(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Tf(a,c,d);x.A(2);break}return u(x,Uf(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);gf(a.j);B(x,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.G.add(p.contentType.toLowerCase());n=t(k);for(m=n.next();!m.done;m=n.next())q=m.value,a.G.add(q.contentType.toLowerCase());if(c.length){var w=
186
- f.keySystem;var D=d.get(f.keySystem);var C=[],A=[],G=[],E=[],H=new Set;Vf(D,C,G,A,E,H);var L=a.M?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:C[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||L,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};D=t(D);for(C=D.next();!C.done;C=
187
- D.next())C=C.value,C.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(w.persistentStateRequired=C.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),C=[],A=[],G=[],E=[],H=new Set,Vf(w.drmInfos,C,G,A,E,H),D={keySystem:D,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
188
- w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,gf(a.j),a.s=v,a.ca=!0,u(x,Nf(a),7);case 7:gf(a.j);va(x,0);break;case 4:y=F(x);gf(a.j,y);a.g=null;a.G.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
189
- function Tf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Ef(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={hd:d.hd},e=a.next())for(d.hd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
190
- l.hd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
191
- function Uf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y,x;return K(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.A(4);break}k=h.value;if(!b.has(k)){w.A(3);break}l=b.get(k);B(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
192
- w.h,w["return"](c);case 6:F(w);case 7:gf(a.j);case 3:h=g.next();w.A(2);break;case 4:m=t([!0,!1]),p=m.next();case 9:if(p.done){w.A(11);break}n=p.value;q=t(b.keys());h=q.next();case 12:if(h.done){p=m.next();w.A(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=n){w.A(13);break}B(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:F(w);case 16:gf(a.j);case 13:h=q.next();w.A(12);break;case 11:return w["return"](c)}})}
193
- function Cf(a){a=pf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Qc(f),h=Qc(e);g={kty:"oct",kid:Oc(g,!1),k:Oc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Jc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
139
+ function ce(a){var b=a.width||null,c=a.height||null,d=null;a.segmentIndex&&(d=a.segmentIndex.get(0));var e=a.tilesLayout;d&&(e=d.tilesLayout||e);e&&null!=b&&(b/=Number(e.split("x")[0]));e&&null!=c&&(c/=Number(e.split("x")[1]));return{id:a.id,active:!1,type:"image",bandwidth:a.bandwidth||0,language:"",label:null,kind:null,width:b,height:c,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:a.mimeType,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],
140
+ audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:a.originalId}}function de(a){a.__shaka_id||(a.__shaka_id=ee++);return a.__shaka_id}
141
+ function fe(a){var b=ge(a);b.active="disabled"!=a.mode;b.type="text";b.originalTextId=a.id;"captions"==a.kind&&(b.mimeType="application/cea-608");a.kind&&(b.roles=[a.kind]);"forced"==a.kind&&(b.forced=!0);return b}function he(a){var b=ge(a);b.active=a.enabled;b.type="variant";b.originalAudioId=a.id;"main"==a.kind&&(b.primary=!0);a.kind&&(b.roles=[a.kind],b.audioRoles=[a.kind],b.label=a.label);return b}
142
+ function ge(a){return{id:de(a),active:!1,type:"",bandwidth:0,language:R(a.language),label:a.label,kind:a.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,
143
+ originalTextId:null,originalImageId:null}}function je(a){return a.allowedByApplication&&a.allowedByKeySystem}function ke(a){return a.filter(function(b){return je(b)})}
144
+ function Bd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCount}),d=new Map;c=t(c);for(var e=c.next();!e.done;e=c.next()){e=e.value;var f=e.audio.channelsCount;d.has(f)||d.set(f,[]);d.get(f).push(e)}c=Array.from(d.keys());if(0==c.length)return a;e=c.filter(function(g){return g<=b});return e.length?d.get(Math.max.apply(Math,ia(e))):d.get(Math.min.apply(Math,ia(c)))}
145
+ function le(a,b,c,d){var e=a,f=a.filter(function(k){return k.primary});f.length&&(e=f);var g=e.length?e[0].language:"";e=e.filter(function(k){return k.language==g});if(b){var h=wd(R(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return R(k.language)==h}))}e=e.filter(function(k){return k.forced==d});if(c){if(a=me(e,c),a.length)return a}else if(a=e.filter(function(k){return 0==k.roles.length}),a.length)return a;a=e.map(function(k){return k.roles}).reduce(ac,[]);return a.length?
146
+ me(e,a[0]):e}function me(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Vd(a){var b=[];a.audio&&b.push(ne(a.audio));a.video&&b.push(ne(a.video));return b.join(", ")}
147
+ function ne(a){return"audio"==a.type?"type=audio codecs="+a.codecs+" bandwidth="+a.bandwidth+" channelsCount="+a.channelsCount+" audioSamplingRate="+a.audioSamplingRate:"video"==a.type?"type=video codecs="+a.codecs+" bandwidth="+a.bandwidth+" frameRate="+a.frameRate+" width="+a.width+" height="+a.height:"unexpected stream type"}
148
+ var ee=0,Gd="smooth",Hd="powerEfficient",Jd="bandwidth",Yd=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Zd=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function oe(){var a=this;this.l=null;this.j=!1;this.h=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.j){a.h=new Sa;a.g&&a.h.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.i=[];this.o=1;this.s=!1;this.g=this.m=null}r=oe.prototype;r.stop=function(){this.l=null;this.j=!1;this.i=[];this.o=1;this.m=null};r.init=function(a){this.l=a};
149
+ r.chooseVariant=function(){var a=pe(this.g.restrictions,this.i),b=this.h.getBandwidthEstimate(qe(this));this.i.length&&!a.length&&(a=pe(null,this.i),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.o)?1:Math.abs(this.o),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},k=d+1;k<a.length;k++)if(e.bandwidth!=a[k].bandwidth){h=a[k];break}f=f*h.bandwidth/this.g.bandwidthUpgradeTarget;b>=g&&b<=f&&c.bandwidth!=e.bandwidth&&(c=e)}this.m=Date.now();return c};
150
+ r.enable=function(){this.j=!0};r.disable=function(){this.j=!1};r.segmentDownloaded=function(a,b){this.h.sample(a,b);if(null!=this.m&&this.j)a:{if(!this.s){var c=this.h;if(!(c.g>=c.i))break a;this.s=!0}else if(Date.now()-this.m<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.h.getBandwidthEstimate(qe(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.h.getBandwidthEstimate(qe(this))};r.setVariants=function(a){this.i=a};r.playbackRateChanged=function(a){this.o=a};
151
+ r.configure=function(a){this.g=a;this.h&&this.g&&this.h.configure(this.g.advanced)};function qe(a){var b=a.g.defaultBandwidthEstimate;navigator.connection&&navigator.connection.downlink&&a.g.useNetworkInformation&&(b=1E6*navigator.connection.downlink);return b}function pe(a,b){a&&(b=b.filter(function(c){return Md(c,a,{width:Infinity,height:Infinity})}));return b.sort(function(c,d){return c.bandwidth-d.bandwidth})}M("shaka.abr.SimpleAbrManager",oe);oe.prototype.configure=oe.prototype.configure;
152
+ oe.prototype.playbackRateChanged=oe.prototype.playbackRateChanged;oe.prototype.setVariants=oe.prototype.setVariants;oe.prototype.getBandwidthEstimate=oe.prototype.getBandwidthEstimate;oe.prototype.segmentDownloaded=oe.prototype.segmentDownloaded;oe.prototype.disable=oe.prototype.disable;oe.prototype.enable=oe.prototype.enable;oe.prototype.chooseVariant=oe.prototype.chooseVariant;oe.prototype.init=oe.prototype.init;oe.prototype.stop=oe.prototype.stop;function re(a,b){this.h=a;this.g=new Set([a]);b=b||[];for(var c=t(b),d=c.next();!d.done;d=c.next())this.add(d.value)}re.prototype.add=function(a){return se(this.h,a)?(this.g.add(a),!0):!1};
153
+ function se(a,b){var c;if(!(c=!!a.audio!=!!b.audio||!!a.video!=!!b.video||a.language!=b.language)&&(c=a.audio&&b.audio)){c=a.audio;var d=b.audio;c=!((!(!c.channelsCount||!d.channelsCount||2<c.channelsCount||2<d.channelsCount)||c.channelsCount==d.channelsCount)&&te(c,d)&&ue(c.roles,d.roles))}!c&&(c=a.video&&b.video)&&(c=a.video,d=b.video,c=!(te(c,d)&&ue(c.roles,d.roles)));return c?!1:!0}re.prototype.values=function(){return this.g.values()};
154
+ function te(a,b){if(a.mimeType!=b.mimeType)return!1;var c=a.codecs.split(",").map(function(f){return ad(f)[0]}),d=b.codecs.split(",").map(function(f){return ad(f)[0]});if(c.length!=d.length)return!1;c.sort();d.sort();for(var e=0;e<c.length;e++)if(c[e]!=d[e])return!1;return!0}function ue(a,b){var c=new Set(a),d=new Set(b);c["delete"]("main");d["delete"]("main");if(c.size!=d.size)return!1;c=t(c);for(var e=c.next();!e.done;e=c.next())if(!d.has(e.value))return!1;return!0};function ve(a){this.g=a;this.h=new we(a.language,"",a.audio&&a.audio.channelsCount?a.audio.channelsCount:0,"")}ve.prototype.create=function(a){var b=this,c=a.filter(function(d){return se(b.g,d)});return c.length?new re(c[0],c):this.h.create(a)};function we(a,b,c,d){this.i=a;this.j=b;this.g=c;this.h=void 0===d?"":d}
155
+ we.prototype.create=function(a){var b=[];b=xe(a,this.i);var c=a.filter(function(d){return d.primary});b=b.length?b:c.length?c:a;a=ye(b,this.j);a.length&&(b=a);this.g&&(a=Bd(b,this.g),a.length&&(b=a));this.h&&(a=ze(b,this.h),a.length&&(b=a));a=new re(b[0]);b=t(b);for(c=b.next();!c.done;c=b.next())c=c.value,se(a.h,c)&&a.add(c);return a};function xe(a,b){var c=R(b),d=wd(c,a.map(function(e){return vd(e)}));return d?a.filter(function(e){return d==vd(e)}):[]}
156
+ function ye(a,b){return a.filter(function(c){return c.audio?b?c.audio.roles.includes(b):0==c.audio.roles.length:!1})}function ze(a,b){return a.filter(function(c){return c.audio?c.audio.label.toLowerCase()==b.toLowerCase():!1})};function Ae(){this.g=Be;this.h=(new Map).set(Be,2).set(Ce,1)}function De(a,b,c){a.h.set(Be,c).set(Ce,b)}var Ce=0,Be=1;function Ee(a,b){var c=Fe();this.l=null==a.maxAttempts?c.maxAttempts:a.maxAttempts;this.j=null==a.baseDelay?c.baseDelay:a.baseDelay;this.o=null==a.fuzzFactor?c.fuzzFactor:a.fuzzFactor;this.m=null==a.backoffFactor?c.backoffFactor:a.backoffFactor;this.g=0;this.h=this.j;if(this.i=void 0===b?!1:b)this.g=1}
157
+ function Ge(a){var b,c;return K(function(d){if(1==d.g){if(a.g>=a.l)if(a.i)a.g=1,a.h=a.j;else throw new N(2,7,1010);b=a.g;a.g++;if(0==b)return d["return"]();c=a.h*(1+(2*Math.random()-1)*a.o);return u(d,new Promise(function(e){(new O(e)).S(c/1E3)}),2)}a.h*=a.m;z(d)})}function Fe(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:3E4,stallTimeout:5E3,connectionTimeout:1E4}};function He(a,b){this.promise=a;this.i=b;this.g=!1}function Ie(a){return new He(Promise.reject(a),function(){return Promise.resolve()})}function Je(){var a=Promise.reject(new N(2,7,7001));a["catch"](function(){});return new He(a,function(){return Promise.resolve()})}function Ke(a){return new He(Promise.resolve(a),function(){return Promise.resolve()})}function Le(a){return new He(a,function(){return a["catch"](function(){})})}He.prototype.abort=function(){this.g=!0;return this.i()};
158
+ function Me(a){return new He(Promise.all(a.map(function(b){return b.promise})),function(){return Promise.all(a.map(function(b){return b.abort()}))})}He.prototype["finally"]=function(a){this.promise.then(function(){return a(!0)},function(){return a(!1)});return this};
159
+ He.prototype.Z=function(a,b){function c(h){return function(k){if(e.g&&h)f.reject(g);else{var l=h?a:b;l?d=Ne(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new nc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new He(f,function(){return d()})};
160
+ function Ne(a,b,c){try{var d=a(b);if(d&&d.promise&&d.abort)return c.resolve(d.promise),function(){return d.abort()};c.resolve(d);return function(){return Promise.resolve(d).then(function(){},function(){})}}catch(e){return c.reject(e),function(){return Promise.resolve()}}}M("shaka.util.AbortableOperation",He);He.prototype.chain=He.prototype.Z;He.prototype["finally"]=He.prototype["finally"];He.all=Me;He.prototype.abort=He.prototype.abort;He.notAbortable=Le;He.completed=Ke;He.aborted=Je;He.failed=Ie;function S(a,b){if(b)if(b instanceof Map)for(var c=t(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,Object.defineProperty(this,d,{value:b.get(d),writable:!0,enumerable:!0});else for(c in b)Object.defineProperty(this,c,{value:b[c],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.g=!1}
161
+ function Oe(a){var b=new S(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}S.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};S.prototype.stopImmediatePropagation=function(){this.g=!0};S.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",S);function Pe(){this.da=new xd;this.Hc=this}Pe.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};Pe.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};Pe.prototype.dispatchEvent=function(a){if(!this.da)return!0;var b=this.da.get(a.type)||[],c=this.da.get("All");c&&(b=b.concat(c));b=t(b);for(c=b.next();!c.done;c=b.next()){c=c.value;a.target=this.Hc;a.currentTarget=this.Hc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
162
+ Pe.prototype.release=function(){this.da=null};function Qe(a){function b(d){switch(typeof d){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return d;default:if(!d||d.buffer&&d.buffer.constructor==ArrayBuffer)return d;if(c.has(d))return null;var e=d.constructor==Array;if(d.constructor!=Object&&!e)return null;c.add(d);var f=e?[]:{},g;for(g in d)f[g]=b(d[g]);e&&(f.length=d.length);return f}}var c=new Set;return b(a)}function Re(a){var b={},c;for(c in a)b[c]=a[c];return b};function Se(){this.g=[]}function Te(a,b){a.g.push(b["finally"](function(){eb(a.g,b)}))}Se.prototype.destroy=function(){for(var a=[],b=t(this.g),c=b.next();!c.done;c=b.next())c=c.value,c.promise["catch"](function(){}),a.push(c.abort());this.g=[];return Promise.all(a)};function Ue(a,b,c){Pe.call(this);this.i=!1;this.m=new Se;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa(Ue,Pe);r=Ue.prototype;r.Yd=function(a){this.o=a};function Ve(a,b,c,d){c=c||We;var e=Xe[a];if(!e||c>=e.priority)Xe[a]={priority:c,Lf:b,Mf:void 0===d?!1:d}}r.Nf=function(a){this.g.add(a)};r.dg=function(a){this.g["delete"](a)};r.Ve=function(){this.g.clear()};r.Of=function(a){this.h.add(a)};r.eg=function(a){this.h["delete"](a)};r.We=function(){this.h.clear()};
163
+ function Ye(a,b,c){return{uris:a,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:b,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===c?null:c}}r.destroy=function(){this.i=!0;this.g.clear();this.h.clear();Pe.prototype.release.call(this);return this.m.destroy()};
164
+ r.request=function(a,b){var c=this,d=new Ze;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new $e(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Qe(b.retryParameters):Fe();b.uris=Qe(b.uris);e=af(this,a,b);var f=e.Z(function(){return bf(c,a,b,new Ee(b.retryParameters,!1),0,null,d)}),g=f.Z(function(p){return cf(c,a,p)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
165
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(p){var n=Date.now()-l,q=p.response;q.timeMs+=k;q.timeMs+=n;p.Af||!c.l||q.fromCache||a!=df||c.l(q.timeMs,q.data.byteLength);return q},function(p){p&&(p.severity=2);throw p;});e=new $e(m.promise,function(){return m.abort()},d);Te(this.m,e);return e};
166
+ function af(a,b,c){var d=Ke(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={ld:e.ld},f=a.next())e.ld=f.value,d=d.Z(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.ld(b,c)}}(e));return d.Z(void 0,function(g){if(g instanceof N&&7001==g.code)throw g;throw new N(2,1,1006,g);})}
167
+ function bf(a,b,c,d,e,f,g){a.o&&(c.uris[e]=c.uris[e].replace("http://","https://"));var h=new Nb(c.uris[e]),k=h.Ea,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Ob(h,k),c.uris[e]=h.toString());k=k.toLowerCase();var m=(k=Xe[k])?k.Lf:null;if(!m)return Ie(new N(2,1,1E3,h));var p=k.Mf,n=null,q=null,v=!1,y=!1,x;return Le(Ge(d)).Z(function(){if(a.i)return Je();x=Date.now();var w=m(c.uris[e],c,b,function(A,G,E){n&&n.stop();q&&q.S(C/1E3);a.l&&b==df&&(a.l(A,G),l=!0,g.g=E)},function(A){a.j&&a.j(A,c,b);y=!0});
168
+ if(!p)return w;var D=c.retryParameters.connectionTimeout;D&&(n=new O(function(){v=!0;w.abort()}),n.S(D/1E3));var C=c.retryParameters.stallTimeout;C&&(q=new O(function(){v=!0;w.abort()}));return w}).Z(function(w){n&&n.stop();q&&q.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var D={response:w,Af:l};!y&&a.j&&a.j(w.headers,c,b);return D},function(w){n&&n.stop();q&&q.stop();if(a.s){var D=null,C=0;w instanceof N&&(D=w,1001==w.code&&(C=w.data[1]));a.s(c,D,C,v)}if(a.i)return Je();v&&(w=new N(1,1,1003,
169
+ c.uris[e],b));if(w instanceof N){if(7001==w.code)throw w;if(1010==w.code)throw f;if(1==w.severity)return D=(new Map).set("error",w),D=new S("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,bf(a,b,c,d,e,w,g)}throw w;})}
170
+ function cf(a,b,c){var d=Ke(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={md:e.md},f=a.next())e.md=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.md(b,h)}}(e));return d.Z(function(){return c},function(g){var h=2;if(g instanceof N){if(7001==g.code)throw g;h=g.severity}throw new N(h,1,1007,g);})}M("shaka.net.NetworkingEngine",Ue);Ue.prototype.request=Ue.prototype.request;Ue.prototype.destroy=Ue.prototype.destroy;Ue.makeRequest=Ye;
171
+ Ue.defaultRetryParameters=function(){return Fe()};Ue.prototype.clearAllResponseFilters=Ue.prototype.We;Ue.prototype.unregisterResponseFilter=Ue.prototype.eg;Ue.prototype.registerResponseFilter=Ue.prototype.Of;Ue.prototype.clearAllRequestFilters=Ue.prototype.Ve;Ue.prototype.unregisterRequestFilter=Ue.prototype.dg;Ue.prototype.registerRequestFilter=Ue.prototype.Nf;Ue.unregisterScheme=function(a){delete Xe[a]};Ue.registerScheme=Ve;Ue.prototype.setForceHTTPS=Ue.prototype.Yd;function Ze(){this.g=0}
172
+ Ue.NumBytesRemainingClass=Ze;function $e(a,b,c){He.call(this,a,b);this.h=c}pa($e,He);Ue.PendingRequest=$e;var df=1;Ue.RequestType={MANIFEST:0,SEGMENT:df,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var We=3;Ue.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:We};var Xe={};function ef(a){this.g=!1;this.h=new nc;this.i=a}ef.prototype.destroy=function(){var a=this;if(this.g)return this.h;this.g=!0;return this.i().then(function(){a.h.resolve()},function(){a.h.resolve()})};function ff(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function gf(){this.g=new xd}r=gf.prototype;r.release=function(){this.oc();this.g=null};r.B=function(a,b,c,d){this.g&&(a=new hf(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.uc(a,b,e);c(g)}var f=this;this.B(a,b,e,d)};r.uc=function(a,b,c){if(this.g){var d=this.g.get(b)||[];d=t(d);for(var e=d.next();!e.done;e=d.next())e=e.value,e.target!=a||c!=e.listener&&c||(e.uc(),this.g.remove(b,e))}};
173
+ r.oc=function(){if(this.g){var a=this.g,b=[],c;for(c in a.g)b.push.apply(b,ia(a.g[c]));a=t(b);for(b=a.next();!b.done;b=a.next())b.value.uc();this.g.g={}}};M("shaka.util.EventManager",gf);gf.prototype.removeAll=gf.prototype.oc;gf.prototype.unlisten=gf.prototype.uc;gf.prototype.listenOnce=gf.prototype.oa;gf.prototype.listen=gf.prototype.B;gf.prototype.release=gf.prototype.release;function hf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=jf(a,d);this.target.addEventListener(b,c,this.g)}
174
+ hf.prototype.uc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function jf(a,b){if(void 0==b)return!1;if("boolean"==typeof b)return b;var c=new Set(["passive","capture"]);Object.keys(b).filter(function(d){return!c.has(d)});return kf(a)?b:b.capture||!1}
175
+ function kf(a){var b=lf;if(void 0==b){b=!1;try{var c={},d={get:function(){b=!0;return!1}};Object.defineProperty(c,"passive",d);Object.defineProperty(c,"capture",d);d=function(){};a.addEventListener("test",d,c);a.removeEventListener("test",d,c)}catch(e){b=!1}lf=b}return b||!1}var lf=void 0;function mf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function nf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function of(a){for(var b=new Map,c=t(Object.keys(a)),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,a[d]);return b}function pf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function qf(a,b){if(a||b){if(a&&!b||b&&!a)return!1}else return!0;if(a.size!=b.size)return!1;for(var c=t(a),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;if(!b.has(d))return!1;d=b.get(d);if(d!=e||void 0==d)return!1}return!0};function rf(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.s=null;this.ha=this.ca=!1;this.I=0;this.g=null;this.o=new gf;this.i=new Map;this.C=[];this.u=new nc;this.h=null;this.m=function(d){c.u.reject(d);a.onError(d)};this.ia=new Map;this.da=new Map;this.W=new O(function(){return sf(c)});this.M=!1;this.L=[];this.R=!1;this.ea=(new O(function(){tf(c)})).Ca(b);this.u["catch"](function(){});this.j=new ef(function(){return uf(c)});this.Y=!1;this.F=null}r=rf.prototype;r.destroy=function(){return this.j.destroy()};
176
+ function uf(a){return K(function(b){switch(b.g){case 1:return a.o.release(),a.o=null,a.u.reject(),a.ea.stop(),a.ea=null,a.W.stop(),a.W=null,u(b,vf(a),2);case 2:if(!a.l){b.A(3);break}B(b,4);return u(b,a.l.setMediaKeys(null),6);case 6:va(b,5);break;case 4:F(b);case 5:a.l=null;case 3:a.g=null,a.G.clear(),a.s=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.Y=!1,a.F=null,z(b)}})}r.configure=function(a){this.h=a};function wf(a,b,c){a.ha=!0;a.C=[];a.M=c;return xf(a,b)}
177
+ function yf(a,b,c){a.C=c;a.M=0<c.length;return xf(a,b)}function zf(a,b,c,d,e,f){var g=new Map;e={audioCapabilities:e,videoCapabilities:f,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:b};e.drmInfos=[{keySystem:b,licenseServerUri:c,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:d,serverCertificateUri:"",initData:null,keyIds:null}];g.set(b,e);return Af(a,g,[])}
178
+ function xf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y;return K(function(x){if(1==x.g){if(c=Bf(a))for(d=t(b),e=d.next();!e.done;e=d.next())f=e.value,f.video&&(f.video.drmInfos=[c]),f.audio&&(f.audio.drmInfos=[c]);g=b.some(function(w){return w.video&&w.video.drmInfos.length||w.audio&&w.audio.drmInfos.length?!0:!1});g||(h=of(a.h.servers),Cf(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=Df(l),p=t(m),n=p.next();!n.done;n=p.next())q=n.value,Ef(q,of(a.h.servers),of(a.h.advanced||{}));return u(x,
179
+ Sd(b,a.M,a.Y),2)}v=g||Object.keys(a.h.servers).length;if(!v)return a.ca=!0,x["return"](Promise.resolve());y=Af(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}function Ff(a){var b;return K(function(c){switch(c.g){case 1:if(a.l.mediaKeys)return c["return"]();if(!a.F){c.A(2);break}return u(c,a.F,3);case 3:return c["return"]();case 2:return B(c,4),a.F=a.l.setMediaKeys(a.s),u(c,a.F,6);case 6:va(c,5);break;case 4:b=F(c),a.m(new N(2,6,6003,b.message));case 5:ff(a.j),z(c)}})}
180
+ function If(a,b){return K(function(c){if(1==c.g)return u(c,Ff(a),2);Jf(a,b.initDataType,Fb(b.initData));z(c)})}
181
+ r.Wb=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.s)return b.o.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d["return"]();b.l=a;b.o.oa(b.l,"play",function(){for(var e=t(b.L),f=e.next();!f.done;f=e.next())Kf(b,f.value);b.R=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.o.B(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return vf(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||window.shakaMediaKeysPolyfill||b.C.length?u(d,
182
+ Ff(b),2):d.A(2)}Lf(b);c||b.C.length||b.o.B(b.l,"encrypted",function(e){return If(b,e)});z(d)})};
183
+ function Mf(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.s||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=Ye([a.g.serverCertificateUri],a.h.retryParameters);B(g,3);c=a.D.kb.request(5,b);return u(g,c.promise,5);case 5:d=g.h;a.g.serverCertificate=Fb(d.data);va(g,4);break;case 3:throw e=F(g),new N(2,6,6017,e);case 4:if(a.j.g)return g["return"]();case 2:if(!a.g.serverCertificate||!a.g.serverCertificate.length)return g["return"]();
184
+ B(g,6);return u(g,a.s.setServerCertificate(a.g.serverCertificate),8);case 8:va(g,0);break;case 6:throw f=F(g),new N(2,6,6004,f.message);}})}function Nf(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Of(a,b),2);if(3!=f.g){c=f.h;if(!c)return f["return"]();d=[];if(e=a.i.get(c))e.Ja=new nc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);z(f)})}
185
+ function Lf(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,Jf(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Of(a,d.value);b.length||a.C.length||a.u.resolve();return a.u}function Jf(a,b,c){if(c.length){var d=a.i.values();d=t(d);for(var e=d.next();!e.done;e=d.next())if(Db(c,e.value.initData)&&!uc("Tizen 2"))return;Pf(a,b,c,a.g.sessionType)}}function Qf(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}
186
+ function Rf(a){a=a.i.keys();a=mf(a,function(b){return b.sessionId});return Array.from(a)}r.bc=function(){var a=Infinity,b=this.i.keys();b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,isNaN(c.expiration)||(a=Math.min(a,c.expiration));return a};r.Kc=function(){return pf(this.da)};
187
+ function Af(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y;return K(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Sf(a,c,d);x.A(2);break}return u(x,Tf(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);ff(a.j);B(x,4);a.G.clear();g=f.getConfiguration();h=g.audioCapabilities||[];k=g.videoCapabilities||[];l=t(h);for(m=l.next();!m.done;m=l.next())p=m.value,a.G.add(p.contentType.toLowerCase());n=t(k);for(m=n.next();!m.done;m=n.next())q=m.value,a.G.add(q.contentType.toLowerCase());if(c.length){var w=
188
+ f.keySystem;var D=d.get(f.keySystem);var C=[],A=[],G=[],E=[],H=new Set;Uf(D,C,G,A,E,H);var L=a.M?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:C[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||L,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};D=t(D);for(C=D.next();!C.done;C=
189
+ D.next())C=C.value,C.distinctiveIdentifierRequired&&(w.distinctiveIdentifierRequired=C.distinctiveIdentifierRequired),C.persistentStateRequired&&(w.persistentStateRequired=C.persistentStateRequired);D=w}else D=f.keySystem,w=b.get(f.keySystem),C=[],A=[],G=[],E=[],H=new Set,Uf(w.drmInfos,C,G,A,E,H),D={keySystem:D,licenseServerUri:C[0],distinctiveIdentifierRequired:"required"==w.distinctiveIdentifier,persistentStateRequired:"required"==w.persistentState,sessionType:w.sessionTypes[0]||"temporary",audioRobustness:(w.audioCapabilities?
190
+ w.audioCapabilities[0].robustness:"")||"",videoRobustness:(w.videoCapabilities?w.videoCapabilities[0].robustness:"")||"",serverCertificate:G[0],serverCertificateUri:A[0],initData:E,keyIds:H};a.g=D;if(!a.g.licenseServerUri)throw new N(2,6,6012,a.g.keySystem);return u(x,f.createMediaKeys(),6);case 6:return v=x.h,ff(a.j),a.s=v,a.ca=!0,u(x,Mf(a),7);case 7:ff(a.j);va(x,0);break;case 4:y=F(x);ff(a.j,y);a.g=null;a.G.clear();if(y instanceof N)throw y;throw new N(2,6,6002,y.message);}})}
191
+ function Sf(a,b,c){for(var d=t(b),e=d.next();!e.done;e=d.next()){var f=t(Df(e.value));for(e=f.next();!e.done;e=f.next())e=e.value,c.has(e.keySystem)||c.set(e.keySystem,[]),c.get(e.keySystem).push(e)}if(1==c.size&&c.has(""))throw new N(2,6,6E3);d={};a=t(a.h.preferredKeySystems);for(e=a.next();!e.done;d={jd:d.jd},e=a.next())for(d.jd=e.value,f=t(b),e=f.next();!e.done;e=f.next())if(e=e.value.decodingInfos.find(function(l){return function(m){return m.supported&&null!=m.keySystemAccess&&m.keySystemAccess.keySystem==
192
+ l.jd}}(d)))return e.keySystemAccess;a=t([!0,!1]);for(e=a.next();!e.done;e=a.next())for(d=e.value,f=t(b),e=f.next();!e.done;e=f.next()){var g=t(e.value.decodingInfos);for(e=g.next();!e.done;e=g.next()){var h=e.value;if(h.supported&&h.keySystemAccess){e=c.get(h.keySystemAccess.keySystem);var k=t(e);for(e=k.next();!e.done;e=k.next())if(!!e.value.licenseServerUri==d)return h.keySystemAccess}}}return null}
193
+ function Tf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y,x;return K(function(w){switch(w.g){case 1:if(1==b.size&&b.has(""))throw new N(2,6,6E3);d=t(b.values());for(e=d.next();!e.done;e=d.next())f=e.value,0==f.audioCapabilities.length&&delete f.audioCapabilities,0==f.videoCapabilities.length&&delete f.videoCapabilities;g=t(a.h.preferredKeySystems);h=g.next();case 2:if(h.done){w.A(4);break}k=h.value;if(!b.has(k)){w.A(3);break}l=b.get(k);B(w,6);return u(w,navigator.requestMediaKeySystemAccess(k,[l]),8);case 8:return c=
194
+ w.h,w["return"](c);case 6:F(w);case 7:ff(a.j);case 3:h=g.next();w.A(2);break;case 4:m=t([!0,!1]),p=m.next();case 9:if(p.done){w.A(11);break}n=p.value;q=t(b.keys());h=q.next();case 12:if(h.done){p=m.next();w.A(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=n){w.A(13);break}B(w,15);return u(w,navigator.requestMediaKeySystemAccess(v,[y]),17);case 17:return c=w.h,w["return"](c);case 15:F(w);case 16:ff(a.j);case 13:h=q.next();w.A(12);break;case 11:return w["return"](c)}})}
195
+ function Bf(a){a=of(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Pc(f),h=Pc(e);g={kty:"oct",kid:Nc(g,!1),k:Nc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Jc(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
194
196
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
195
- function Pf(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.B(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.R?a.L.push(k):Lf(a,k)});a.o.B(c,"keystatuseschange",function(k){return Wf(a,k)});e={initData:null,initDataType:null,loaded:!1,Kd:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);B(h,2);return u(h,c.load(b),4);
196
- case 4:f=h.h;gf(a.j);if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Xf(a)&&a.u.resolve();return h["return"](c);case 2:g=F(h),gf(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
197
- function Qf(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.B(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.R?a.L.push(f):Lf(a,f)});a.o.B(e,"keystatuseschange",function(f){return Wf(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Kd:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Oc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
197
+ function Of(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.s.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.o.B(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.R?a.L.push(k):Kf(a,k)});a.o.B(c,"keystatuseschange",function(k){return Vf(a,k)});e={initData:null,initDataType:null,loaded:!1,Md:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);B(h,2);return u(h,c.load(b),4);
198
+ case 4:f=h.h;ff(a.j);if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Wf(a)&&a.u.resolve();return h["return"](c);case 2:g=F(h),ff(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
199
+ function Pf(a,b,c,d){try{var e=a.s.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.o.B(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.R?a.L.push(f):Kf(a,f)});a.o.B(e,"keystatuseschange",function(f){return Vf(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Md:Infinity,Ja:null,type:d});try{c=a.h.initDataTransform(c,b,a.g)}catch(f){b=f;f instanceof N||(b=new N(2,6,6016,f));a.m(b);return}a.h.logLicenseExchange&&Nc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
198
200
  var g=f.errorCode;if(g&&g.systemCode){var h=g.systemCode;0>h&&(h+=Math.pow(2,32));h="0x"+h.toString(16)}a.m(new N(2,6,6006,f.message,f,h))}})}
199
- function Lf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y;K(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Oc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=Ze([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
200
- Rf(a.g.keySystem)&&Yf(g),h=Date.now(),B(x,2),l=a.D.kb.request(2,g),u(x,l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=F(x),p=new N(2,6,6007,m),a.m(p),d&&d.Ja&&d.Ja.reject(p),x["return"]();case 3:if(a.j.g)return x["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Oc(k.data);B(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return n=F(x),q=new N(2,6,6008,n.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),x["return"]();case 6:if(a.j.g)return x["return"]();v=new S("drmsessionupdate");
201
- a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new O(function(){d.loaded=!0;Xf(a)&&a.u.resolve()}),y.S(Zf));z(x)}})}
202
- function Yf(a){var b=Hc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Pc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
203
- function Wf(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Rf(a.g.keySystem)&&16==h.byteLength&&navigator.userAgent.match(/Edge?\//)){k=Ib(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),p=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,p,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Rc(h);a.ia.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ja&&(a.i["delete"](c),c.close()["catch"](function(){}));
204
- Xf(a)&&(a.u.resolve(),a.W.S($f))}function tf(a){var b=a.ia,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Sc(qf(c))}
205
- function ag(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
206
- c],f=new Map,g=function(l){var m,p,n;return K(function(q){switch(q.g){case 1:B(q,2);if("org.w3.clearkey"===l&&Ac())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,uc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:F(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](qf(f))})}
207
- function bg(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).S(cg)}),B(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);z(c)})}
208
- function wf(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return B(g,2),a.ha||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,bg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
209
- function dg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Da:f.Da},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Da=[];f.Da=f.Da.concat(e.initData||[]);f.Da=f.Da.concat(h.initData||[]);f.Da=f.Da.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Da.findIndex(function(p){return p.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
201
+ function Kf(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y;K(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Nc(b.message),d=a.i.get(c),e=a.g.licenseServerUri,f=a.h.advanced[a.g.keySystem],"individualization-request"==b.messageType&&f&&f.individualizationServer&&(e=f.individualizationServer),g=Ye([e],a.h.retryParameters),g.body=b.message,g.method="POST",g.licenseRequestType=b.messageType,g.sessionId=c.sessionId,g.drmInfo=a.g,d&&(g.initData=d.initData,g.initDataType=d.initDataType),
202
+ Qf(a.g.keySystem)&&Xf(g),h=Date.now(),B(x,2),l=a.D.kb.request(2,g),u(x,l.promise,4);case 4:k=x.h;va(x,3);break;case 2:return m=F(x),p=new N(2,6,6007,m),a.m(p),d&&d.Ja&&d.Ja.reject(p),x["return"]();case 3:if(a.j.g)return x["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Nc(k.data);B(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return n=F(x),q=new N(2,6,6008,n.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),x["return"]();case 6:if(a.j.g)return x["return"]();v=new S("drmsessionupdate");
203
+ a.D.onEvent(v);d&&(d.Ja&&d.Ja.resolve(),y=new O(function(){d.loaded=!0;Wf(a)&&a.u.resolve()}),y.S(Yf));z(x)}})}
204
+ function Xf(a){var b=Gc(a.body,!0,!0);if(b.includes("PlayReadyKeyMessage")){b=(new DOMParser).parseFromString(b,"application/xml");for(var c=t(b.getElementsByTagName("HttpHeader")),d=c.next();!d.done;d=c.next())d=d.value,a.headers[d.getElementsByTagName("name")[0].textContent]=d.getElementsByTagName("value")[0].textContent;a.body=Oc(b.getElementsByTagName("Challenge")[0].textContent)}else a.headers["Content-Type"]="text/xml; charset=utf-8"}
205
+ function Vf(a,b){var c=b.target,d=a.i.get(c),e=!1;c.keyStatuses.forEach(function(g,h){if("string"==typeof h){var k=h;h=g;g=k}if(Qf(a.g.keySystem)&&16==h.byteLength&&(navigator.userAgent.match(/Edge?\//)||zc())){k=Ib(h);var l=k.getUint32(0,!0),m=k.getUint16(4,!0),p=k.getUint16(6,!0);k.setUint32(0,l,!1);k.setUint16(4,m,!1);k.setUint16(6,p,!1)}"status-pending"!=g&&(d.loaded=!0);"expired"==g&&(e=!0);k=Qc(h);a.ia.set(k,g)});var f=c.expiration-Date.now();(0>f||e&&1E3>f)&&d&&!d.Ja&&(a.i["delete"](c),c.close()["catch"](function(){}));
206
+ Wf(a)&&(a.u.resolve(),a.W.S(Zf))}function sf(a){var b=a.ia,c=a.da;c.clear();b.forEach(function(d,e){return c.set(e,d)});b=Array.from(c.values());b.length&&b.every(function(d){return"expired"==d})&&a.m(new N(2,6,6014));a.D.Tc(pf(c))}
207
+ function $f(){var a,b,c,d,e,f,g,h;return K(function(k){return 1==k.g?(a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),b=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],c={initDataTypes:["cenc"],videoCapabilities:b},d={videoCapabilities:b,persistentState:"required",sessionTypes:["persistent-license"]},e=[d,
208
+ c],f=new Map,g=function(l){var m,p,n;return K(function(q){switch(q.g){case 1:B(q,2);if("org.w3.clearkey"===l&&Ac())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,n=(p=m.getConfiguration().sessionTypes)?p.includes("persistent-license"):!1,uc("Tizen 3")&&(n=!1),f.set(l,{persistentState:n}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:F(q),f.set(l,null),z(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](pf(f))})}
209
+ function ag(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).S(bg)}),B(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);z(c)})}
210
+ function vf(a){var b;return K(function(c){b=Array.from(a.i.entries());a.i.clear();return u(c,Promise.all(b.map(function(d){d=t(d);var e=d.next().value,f=d.next().value;return K(function(g){if(1==g.g)return B(g,2),a.ha||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,ag(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);z(g)})})),0)})}
211
+ function cg(a,b){if(!a.length)return b;if(!b.length)return a;for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){e=e.value;for(var f={},g=t(b),h=g.next();!h.done;f={Da:f.Da},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Da=[];f.Da=f.Da.concat(e.initData||[]);f.Da=f.Da.concat(h.initData||[]);f.Da=f.Da.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Da.findIndex(function(p){return p.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
210
212
  e.keyIds||h.keyIds;c.push({keySystem:e.keySystem,licenseServerUri:e.licenseServerUri||h.licenseServerUri,distinctiveIdentifierRequired:e.distinctiveIdentifierRequired||h.distinctiveIdentifierRequired,persistentStateRequired:e.persistentStateRequired||h.persistentStateRequired,videoRobustness:e.videoRobustness||h.videoRobustness,audioRobustness:e.audioRobustness||h.audioRobustness,serverCertificate:e.serverCertificate||h.serverCertificate,serverCertificateUri:e.serverCertificateUri||h.serverCertificateUri,
211
- initData:f.Da,keyIds:g});break}}return c}function Ef(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function uf(a){a.i.forEach(function(b,c){var d=b.Kd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Kd=e)})}function Xf(a){a=a.i.values();return of(a,function(b){return b.loaded})}
212
- function Df(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
213
- function Vf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(p){return Db(p,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=t(g.qa.initData),l=k.next();!l.done;h={wc:h.wc},l=k.next())h.wc=l.value,e.some(function(m){return function(p){var n=
214
- m.wc;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Db(p.initData,n.initData)}}(h))||e.push(h.wc)}if(g.qa.keyIds)for(h=t(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
215
- function Hf(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
216
- (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var cg=1,Zf=5,$f=.5,eg=new oc(function(){return Gb(new Uint8Array([0]))});function fg(){}function gg(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=hg[d.toLowerCase()]))return k["return"](e);if(f=ig(a))if(g=jg[f])return k["return"](g);return d?k.A(2):u(k,kg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=hg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
217
- function kg(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=Ze([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function ig(a){a=(new Nb(a)).ta.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",fg);fg.unregisterParserByMime=function(a){delete hg[a]};fg.registerParserByMime=function(a,b){hg[a]=b};
218
- fg.registerParserByExtension=function(a,b){jg[a]=b};var hg={},jg={};function lg(a,b){this.P=Ib(a);this.h=b==mg;this.g=0}r=lg.prototype;r.ma=function(){return this.g<this.P.byteLength};r.$=function(){return this.g};r.ff=function(){return this.P.byteLength};r.Ra=function(){try{var a=this.P.getUint8(this.g);this.g+=1;return a}catch(b){throw ng();}};r.Nd=function(){try{var a=this.P.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw ng();}};r.N=function(){try{var a=this.P.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw ng();}};
219
- r.ye=function(){try{var a=this.P.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw ng();}};r.Hb=function(){try{if(this.h){var a=this.P.getUint32(this.g,!0);var b=this.P.getUint32(this.g+4,!0)}else b=this.P.getUint32(this.g,!1),a=this.P.getUint32(this.g+4,!1)}catch(c){throw ng();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.P.byteLength)throw ng();var b=Fb(this.P,this.g,a);this.g+=a;return b};
220
- r.skip=function(a){if(this.g+a>this.P.byteLength)throw ng();this.g+=a};r.Tf=function(a){if(this.g<a)throw ng();this.g-=a};r.seek=function(a){if(0>a||a>this.P.byteLength)throw ng();this.g=a};r.mc=function(){for(var a=this.g;this.ma()&&0!=this.P.getUint8(this.g);)this.g+=1;a=Fb(this.P,a,this.g-a);this.g+=1;return Fc(a)};function ng(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",lg);lg.prototype.readTerminatedString=lg.prototype.mc;lg.prototype.seek=lg.prototype.seek;lg.prototype.rewind=lg.prototype.Tf;
221
- lg.prototype.skip=lg.prototype.skip;lg.prototype.readBytes=lg.prototype.Za;lg.prototype.readUint64=lg.prototype.Hb;lg.prototype.readInt32=lg.prototype.ye;lg.prototype.readUint32=lg.prototype.N;lg.prototype.readUint16=lg.prototype.Nd;lg.prototype.readUint8=lg.prototype.Ra;lg.prototype.getLength=lg.prototype.ff;lg.prototype.getPosition=lg.prototype.$;lg.prototype.hasMoreData=lg.prototype.ma;var mg=1;lg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:mg};function og(){this.i=[];this.h=[];this.g=!1}r=og.prototype;r.box=function(a,b){var c=pg(a);this.i[c]=qg;this.h[c]=b;return this};r.T=function(a,b){var c=pg(a);this.i[c]=rg;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new lg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Uc(0,a,b,c)};
222
- r.Uc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.P.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.P.byteLength-e;break;case 1:if(d&&b.$()+8>b.P.byteLength){this.g=!0;return}f=b.Hb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==rg){if(d&&b.$()+4>b.P.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.P.byteLength&&(g=b.P.byteLength);d&&g>b.P.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.Za(d):new Uint8Array(0),b=new lg(b,0),k({parser:this,partialOkay:c||
223
- !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.P.byteLength-b.$()))}};function sg(a){for(var b=tg(a);a.reader.ma()&&!a.parser.g;)a.parser.Uc(a.start+b,a.reader,a.partialOkay)}function ug(a){for(var b=tg(a),c=a.reader.N(),d=0;d<c&&(a.parser.Uc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function vg(a){return function(b){a(b.reader.Za(b.reader.P.byteLength-b.reader.$()))}}
224
- function pg(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function wg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function tg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",og);og.headerSize=tg;og.typeToString=wg;og.allData=vg;og.sampleDescription=ug;og.children=sg;og.prototype.parseNext=og.prototype.Uc;og.prototype.parse=og.prototype.parse;og.prototype.stop=og.prototype.stop;
225
- og.prototype.fullBox=og.prototype.T;og.prototype.box=og.prototype.box;var qg=0,rg=1;function xg(a){function b(){d=!0}function c(l){f.push(l);sg(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new og).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);ug(l)}).T("encv",b).T("enca",b).T("avc1",function(l){g.push({box:l,kc:1701733238})}).T("avc3",function(l){g.push({box:l,kc:1701733238})}).T("ac-3",function(l){g.push({box:l,kc:1701733217})}).T("ec-3",function(l){g.push({box:l,kc:1701733217})}).T("mp4a",function(l){g.push({box:l,kc:1701733217})}).parse(a);
226
- if(d)return a;if(0==g.length||!e)throw ab(Rc(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=yg(a,e,k.box,f,k.kc);return a}
227
- function yg(a,b,c,d,e){var f=zg.value(),g=a.subarray(c.start,c.start+c.size),h=Ib(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ib(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);Ag(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=tc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,Ag(e,d.start,d.size+k.byteLength);k=Ib(e,b.start);b=tg(b);a=k.getUint32(b);
228
- k.setUint32(b,a+1);return e}function Ag(a,b,c){a=Ib(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var zg=new oc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Bg(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=Cg(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],q=-1,v=-1,y=0;y<n.length;y++)if(null!=n[y]&&""!==n[y].g.trim()){q=y;break}for(y=n.length-1;0<=y;y--)if(null!=n[y]&&""!==n[y].g.trim()){v=y;break}if(-1===
229
- q||-1===v)n=Dg(d,e),a.nestedCues.push(n);else{for(;q<=v;q++)if(y=n[q]){var x=y.l,w=y.i,D=y.j,C=y.h;if(x!=h||w!=k||D!=l||C!=m)p.payload&&a.nestedCues.push(p),p=Cg(d,e,x,w,D,C),h=x,k=w,l=D,m=C;p.payload+=y.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=Dg(d,e),a.nestedCues.push(p));p=Cg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
230
- function Cg(a,b,c,d,e,f){a=new ib(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Dg(a,b){var c=new ib(a,b,"");c.lineBreak=!0;return c}function Eg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Fg(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Gg(this)}function Hg(a,b,c){return Bg(new ib(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function Gg(a){Ig(a,0,15);a.g=1}function Jg(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Kg:d=Lg.has(c)?Lg.get(c):String.fromCharCode(c);break;case Mg:d=Ng.get(c);break;case Og:a.i[a.g].pop();d=Pg.get(c);break;case Qg:a.i[a.g].pop(),d=Rg.get(c)}d&&a.i[a.g].push(new Eg(d,a.m,a.j,a.o,a.l))}}
231
- function Sg(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Ig(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
232
- var Kg=0,Mg=1,Og=2,Qg=3,Lg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Ng=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Pg=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
233
- [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Rg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
234
- [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Tg(a,b){this.h=Ug;this.o=new Fg(a,b);this.i=new Fg(a,b);this.l=new Fg(a,b);this.g=this.i;this.j=0;this.m=null}function Vg(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Wg&&a.h!==Xg&&(e=Hg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Ig(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Ig(c,0,15),d.g=15);a.h=Wg;d.h=b;return e}function Yg(a){a.h=Zg;a.g=a.l;a.g.h=0}function $g(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Xg}
235
- var Ug=0,Zg=1,Wg=3,Xg=4,ah="black green blue cyan red yellow magenta black".split(" "),bh="white green blue cyan red yellow magenta white_italics".split(" ");function ch(){this.l=!1;this.C=this.F=0;this.D=dh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";eh(this)}function eh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(fh())}function fh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function gh(a,b){hh(a)&&(a.i[a.h][a.g]=new Eg(b,a.u,a.o,a.m,a.s),a.g++)}function hh(a){var b=a.g<a.C&&0<=a.g;return a.h<a.F&&0<=a.h&&b}ch.prototype.isVisible=function(){return this.l};
236
- function ih(a,b,c){var d=new ib(a.j,b,"");d.textAlign=a.D===jh?"left":a.D===kh?"right":mb;if(c=Bg(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var jh=0,kh=1,dh=2;function lh(){this.i=[];this.h=null;this.g=0}function mh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new nh(a.h)),a.h=null,a.g=0))}function nh(a){this.g=0;this.h=a}nh.prototype.ma=function(){return this.g<this.h.length};nh.prototype.$=function(){return this.g};function oh(a){if(!a.ma())throw new N(2,2,3E3);return a.h[a.g++]}nh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function ph(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
237
- function qh(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=oh(b).value;b=null;c=t(rh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ih(e,d,a.i)),eh(e);return b}if(137===c)for(b=oh(b).value,b=t(rh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=oh(b).value;b=null;c=t(rh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=ih(e,d,a.i)),e.l=!1;return b}if(139===c){c=oh(b).value;
238
- b=null;c=t(rh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=ih(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=oh(b).value,sh(a,b,d);if(143===c)return d=sh(a,255,d),th(a),d;if(144===c)b.skip(1),d=oh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=oh(b).value,c=oh(b).value,b.skip(1),a.g&&(b=uh((c&48)>>4,(c&12)>>2,c&3),a.g.s=uh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=oh(b).value,b=oh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
239
- b.skip(1),d=oh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new ch;f.j=d;a.h[c]=f}d=oh(b).value;oh(b);oh(b);f=oh(b).value;var g=oh(b).value;b=oh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.C=(g&63)+1;a.g=a.h[c]}}}return null}function rh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
240
- function sh(a,b,c){var d=null;b=t(rh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=ih(f,c,a.i));a.h[e]=null}return d}function th(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function uh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return vh[a<<2|b<<1|c]}
241
- var wh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),vh="black blue green cyan red magenta yellow white".split(" ");function xh(){this.h=[];this.g=[];this.i=new lh;this.l=0;this.s=new Map([["CC1",new Tg(0,0)],["CC2",new Tg(0,1)],["CC3",new Tg(1,0)],["CC4",new Tg(1,1)]]);this.o=this.m=0;this.j=new Map;yh(this)}function yh(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Gg(b.i),Gg(b.l),Gg(b.o)}
242
- function zh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=Ah(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())mh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Bh(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
243
- function Ah(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.xa&&255===b.Na||!b.xa&&!b.Na||!Ch(b.xa)||!Ch(b.Na))return 45<=++a.l&&yh(a),null;a.l=0;b.xa&=127;b.Na&=127;if(!b.xa&&!b.Na)return null;d=null;if(16===(b.xa&112))a:{var e=b.xa;d=b.Na;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=bh[f]:7===f&&(h=!0);
244
- d=1===(d&1);if(c.h!==Xg){f=c.g;if(c.h===Wg&&e!==f.g){var k=1+e-f.h;Sg(f,k,1+f.g-f.h,f.h);Ig(f,0,k-1);Ig(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Jg(c.g,Kg,32),g=!1,e=bh[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=ah[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))Jg(c.g,Mg,d);else if(18===
245
- (e&246)&&32===(d&224))Jg(c.g,e&1?Qg:Og,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Na){case 32:Yg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Vg(c,2,d);break;case 38:e=Vg(c,3,d);break;case 39:e=Vg(c,4,d);break;case 40:Jg(c.g,Kg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Gg(c.o);$g(c);break;case 43:$g(c);break;case 44:e=c.i;g=null;c.h!==Xg&&(g=Hg(e,c.j,d));Ig(e,0,15);e=g;break;case 45:e=c.g;c.h!==Wg?e=null:(g=Hg(e,c.j,d),h=e.g-e.h+1,Sg(e,h-1,h,e.h),Ig(e,
246
- 0,h-1),Ig(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Ig(c.l,0,15);break;case 47:e=null,c.h!==Xg&&(e=Hg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Yg(c),c.j=d}d=e;break a}d=null}else e=b.Na,Jg(c.g,Kg,b.xa),Jg(c.g,Kg,e);return d}
247
- function Bh(a,b){var c=[];try{for(;b.ma();){var d=oh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=oh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new ph(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=oh(e),l=k.value,m=k.pts;if(16===l){var p=oh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!hh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.C-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=ih(q,n,g.i));if(q.h+1>=q.F){n=q;for(var v=0,y=1;15>y;y++,
248
- v++)n.i[v]=n.i[y];for(y=0;1>y;y++,v++)n.i[v]=fh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=ih(q,n,g.i));q.i[q.h]=fh();q.g=0;break;case 12:q.isVisible()&&(e=ih(q,n,g.i)),eh(q),n=q,n.h=0,n.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=qh(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?gh(g.g,"\u266a"):gh(g.g,
249
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&gh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(wh.has(e)){var w=wh.get(e);gh(g.g,w)}else gh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?gh(g.g,"_"):gh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Ch(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Dh(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,ke:c,Xe:d}}function Eh(a,b){return{ee:1==b?a.Hb():a.N()}}function Fh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
250
- function Gh(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Rd:null,sampleSize:null,Wc:null};c&256&&(g.Rd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.Wc=0==b?a.N():a.ye());e.push(g)}return{Sg:d,Ae:e}};function Hh(){this.i=new Map;this.h=this.g=0}
251
- Hh.prototype.init=function(a){var b=this,c=[],d=[];(new og).box("moov",sg).box("mvex",sg).T("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",sg).T("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",sg).T("mdhd",function(e){e=Fh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
252
- Hh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new og).box("moof",sg).box("traf",sg).T("trun",function(k){f=Gh(k.reader,k.version,k.flags).Ae}).T("tfhd",function(k){k=Dh(k.reader,k.flags);d=k.ke||b.g;e=k.Xe||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).T("tfdt",function(k){g=Eh(k.reader,k.version).ee}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,p=d,n=e,q=f,v=0,y=n;for(q.length&&(y=q[0].sampleSize||n);k.ma();){var x=k.N();if(6==
253
- (k.Ra()&31)){var w=0;q.length>v&&(w=q[v].Wc||0);w=(l+w)/m;for(var D=[],C,A=k.Za(x-1),G=C=0;G<A.length;)2==C&&3==A[G]?(C=0,A=[].concat(ia(A)),A.splice(G,1),A=new Uint8Array(A)):0==A[G]?C++:C=0,G++;C=A;for(G=0;G<C.length;){for(A=0;255==C[G];)A+=255,G++;A+=C[G++];for(var E=0;255==C[G];)E+=255,G++;E+=C[G++];4==A&&D.push(C.subarray(G,G+E));G+=E}D=t(D);for(C=D.next();!C.done;C=D.next())c.push({Jf:C.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=q.length>v?l+(q[v].Rd||p):l+p,v++,y=q.length>
254
- v?q[v].sampleSize||n:n)}}).parse(a,!1);return c};function Ih(){this.h=new Hh;this.g=new xh}Ih.prototype.init=function(a){this.h.init(a)};
255
- function Jh(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Jf);if(0<f.length&&(d=a.g,e=e.pts,f=new lg(f,0),181===f.Ra()&&49===f.Nd()&&1195456820===f.N()&&3===f.Ra())){var g=f.Ra();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Ra(),l=(k&4)>>2,m=f.Ra(),p=f.Ra();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,xa:m,Na:p,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:p,order:d.g.length})))}}}}return zh(a.g)}
256
- ;function Kh(a,b,c,d){this.ya=a;this.Ba=b;this.la=c;this.Ed=void 0===d?null:d}Kh.prototype.ec=function(){return this.Ba};Kh.prototype.ac=function(){return this.la};function Lh(a,b){return a&&b?a.ec()==b.ec()&&a.ac()==b.ac()&&gb(a.ya(),b.ya()):a==b}M("shaka.media.InitSegmentReference",Kh);Kh.prototype.getEndByte=Kh.prototype.ac;Kh.prototype.getStartByte=Kh.prototype.ec;
257
- function Mh(a,b,c,d,e,f,g,h,k,l,m,p,n,q){l=void 0===l?[]:l;q=void 0===q?Nh:q;this.startTime=a;this.j=this.endTime=b;this.m=c;this.Ba=d;this.la=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.l=void 0===p?null:p;this.g=void 0===n?null:n;this.status=q}r=Mh.prototype;r.ya=function(){return this.m()};r.getStartTime=function(){return this.startTime};r.df=function(){return this.endTime};r.ec=function(){return this.Ba};
258
- r.ac=function(){return this.la};r.wf=function(){return this.tilesLayout};r.vf=function(){return this.l};r.rd=function(){return this.status};r.Df=function(){this.status=Oh};M("shaka.media.SegmentReference",Mh);Mh.prototype.markAsUnavailable=Mh.prototype.Df;Mh.prototype.getStatus=Mh.prototype.rd;Mh.prototype.getTileDuration=Mh.prototype.vf;Mh.prototype.getTilesLayout=Mh.prototype.wf;Mh.prototype.getEndByte=Mh.prototype.ac;Mh.prototype.getStartByte=Mh.prototype.ec;Mh.prototype.getEndTime=Mh.prototype.df;
259
- Mh.prototype.getStartTime=Mh.prototype.getStartTime;Mh.prototype.getUris=Mh.prototype.ya;var Nh=0,Oh=1;Mh.Status={ig:Nh,Mg:Oh,wg:2};function Ph(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Qh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Rh(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
260
- function Sh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Th(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function Uh(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Th(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Th(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Vh(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.L={};this.g=null;this.F=!1;this.W=d||function(){};this.i={};this.o=new hf;this.u={};this.C=b;this.G=new nc;this.l=Wh(this,this.G);this.D=new ff(function(){return Xh(e)});this.I="";this.s=!1;this.R=new nc}function Wh(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Yh(c);a.j.src=a.I;return c}r=Vh.prototype;r.destroy=function(){return this.D.destroy()};
261
- function Xh(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](bc)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.u)b.push(a.u[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.u={};a.C=null;a.i=
213
+ initData:f.Da,keyIds:g});break}}return c}function Df(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function tf(a){a.i.forEach(function(b,c){var d=b.Md,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Md=e)})}function Wf(a){a=a.i.values();return nf(a,function(b){return b.loaded})}
214
+ function Cf(a,b){var c=[];b.forEach(function(f,g){c.push({keySystem:g,licenseServerUri:f,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})});for(var d=t(a),e=d.next();!e.done;e=d.next())e=e.value,e.video&&(e.video.drmInfos=c),e.audio&&(e.audio.drmInfos=c)}
215
+ function Uf(a,b,c,d,e,f){var g={};a=t(a);for(var h=a.next();!h.done;g={qa:g.qa},h=a.next()){g.qa=h.value;b.includes(g.qa.licenseServerUri)||b.push(g.qa.licenseServerUri);d.includes(g.qa.serverCertificateUri)||d.push(g.qa.serverCertificateUri);g.qa.serverCertificate&&(c.some(function(m){return function(p){return Db(p,m.qa.serverCertificate)}}(g))||c.push(g.qa.serverCertificate));if(g.qa.initData){h={};for(var k=t(g.qa.initData),l=k.next();!l.done;h={xc:h.xc},l=k.next())h.xc=l.value,e.some(function(m){return function(p){var n=
216
+ m.xc;return p.keyId&&p.keyId==n.keyId?!0:p.initDataType==n.initDataType&&Db(p.initData,n.initData)}}(h))||e.push(h.xc)}if(g.qa.keyIds)for(h=t(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
217
+ function Ef(a,b,c){if(a.keySystem&&("org.w3.clearkey"!=a.keySystem||!a.licenseServerUri)){b.size&&(b=b.get(a.keySystem)||"",a.licenseServerUri=b);a.keyIds||(a.keyIds=new Set);if(c=c.get(a.keySystem))a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=c.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=c.persistentStateRequired),a.videoRobustness||(a.videoRobustness=c.videoRobustness),a.audioRobustness||(a.audioRobustness=c.audioRobustness),a.serverCertificate||
218
+ (a.serverCertificate=c.serverCertificate),c.sessionType&&(a.sessionType=c.sessionType),a.serverCertificateUri||(a.serverCertificateUri=c.serverCertificateUri);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==a.keySystem&&(a.keySystem="com.chromecast.playready")}}var bg=1,Yf=5,Zf=.5,dg=new oc(function(){return Gb(new Uint8Array([0]))});function eg(){}function fg(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){if(d&&(e=gg[d.toLowerCase()]))return k["return"](e);if(f=hg(a))if(g=ig[f])return k["return"](g);return d?k.A(2):u(k,jg(a,b,c),3)}if(2!=k.g&&(d=k.h)&&(h=gg[d]))return k["return"](h);throw new N(2,4,4E3,a);})}
219
+ function jg(a,b,c){var d,e,f;return K(function(g){if(1==g.g)return d=Ye([a],c),d.method="HEAD",u(g,b.request(0,d).promise,2);e=g.h;f=e.headers["content-type"];return g["return"](f?f.toLowerCase().split(";").shift():"")})}function hg(a){a=(new Nb(a)).ta.split("/").pop().split(".");return 1==a.length?"":a.pop().toLowerCase()}M("shaka.media.ManifestParser",eg);eg.unregisterParserByMime=function(a){delete gg[a]};eg.registerParserByMime=function(a,b){gg[a]=b};
220
+ eg.registerParserByExtension=function(a,b){ig[a]=b};var gg={},ig={};function kg(a,b){this.P=Ib(a);this.h=b==lg;this.g=0}r=kg.prototype;r.ma=function(){return this.g<this.P.byteLength};r.$=function(){return this.g};r.gf=function(){return this.P.byteLength};r.Ra=function(){try{var a=this.P.getUint8(this.g);this.g+=1;return a}catch(b){throw mg();}};r.Pd=function(){try{var a=this.P.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw mg();}};r.N=function(){try{var a=this.P.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw mg();}};
221
+ r.ze=function(){try{var a=this.P.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw mg();}};r.Hb=function(){try{if(this.h){var a=this.P.getUint32(this.g,!0);var b=this.P.getUint32(this.g+4,!0)}else b=this.P.getUint32(this.g,!1),a=this.P.getUint32(this.g+4,!1)}catch(c){throw mg();}if(2097151<b)throw new N(2,3,3001);this.g+=8;return b*Math.pow(2,32)+a};r.Za=function(a){if(this.g+a>this.P.byteLength)throw mg();var b=Fb(this.P,this.g,a);this.g+=a;return b};
222
+ r.skip=function(a){if(this.g+a>this.P.byteLength)throw mg();this.g+=a};r.Uf=function(a){if(this.g<a)throw mg();this.g-=a};r.seek=function(a){if(0>a||a>this.P.byteLength)throw mg();this.g=a};r.mc=function(){for(var a=this.g;this.ma()&&0!=this.P.getUint8(this.g);)this.g+=1;a=Fb(this.P,a,this.g-a);this.g+=1;return Fc(a)};function mg(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",kg);kg.prototype.readTerminatedString=kg.prototype.mc;kg.prototype.seek=kg.prototype.seek;kg.prototype.rewind=kg.prototype.Uf;
223
+ kg.prototype.skip=kg.prototype.skip;kg.prototype.readBytes=kg.prototype.Za;kg.prototype.readUint64=kg.prototype.Hb;kg.prototype.readInt32=kg.prototype.ze;kg.prototype.readUint32=kg.prototype.N;kg.prototype.readUint16=kg.prototype.Pd;kg.prototype.readUint8=kg.prototype.Ra;kg.prototype.getLength=kg.prototype.gf;kg.prototype.getPosition=kg.prototype.$;kg.prototype.hasMoreData=kg.prototype.ma;var lg=1;kg.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:lg};function ng(){this.i=[];this.h=[];this.g=!1}r=ng.prototype;r.box=function(a,b){var c=og(a);this.i[c]=pg;this.h[c]=b;return this};r.T=function(a,b){var c=og(a);this.i[c]=qg;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new kg(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Vc(0,a,b,c)};
224
+ r.Vc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.P.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.P.byteLength-e;break;case 1:if(d&&b.$()+8>b.P.byteLength){this.g=!0;return}f=b.Hb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==qg){if(d&&b.$()+4>b.P.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.P.byteLength&&(g=b.P.byteLength);d&&g>b.P.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.Za(d):new Uint8Array(0),b=new kg(b,0),k({parser:this,partialOkay:c||
225
+ !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.P.byteLength-b.$()))}};function rg(a){for(var b=sg(a);a.reader.ma()&&!a.parser.g;)a.parser.Vc(a.start+b,a.reader,a.partialOkay)}function tg(a){for(var b=sg(a),c=a.reader.N(),d=0;d<c&&(a.parser.Vc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function ug(a){return function(b){a(b.reader.Za(b.reader.P.byteLength-b.reader.$()))}}
226
+ function og(a){var b=0;a=t(a);for(var c=a.next();!c.done;c=a.next())b=b<<8|c.value.charCodeAt(0);return b}function vg(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function sg(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",ng);ng.headerSize=sg;ng.typeToString=vg;ng.allData=ug;ng.sampleDescription=tg;ng.children=rg;ng.prototype.parseNext=ng.prototype.Vc;ng.prototype.parse=ng.prototype.parse;ng.prototype.stop=ng.prototype.stop;
227
+ ng.prototype.fullBox=ng.prototype.T;ng.prototype.box=ng.prototype.box;var pg=0,qg=1;function wg(a){function b(){d=!0}function c(l){f.push(l);rg(l)}a=Fb(a);var d=!1,e,f=[],g=[];(new ng).box("moov",c).box("trak",c).box("mdia",c).box("minf",c).box("stbl",c).T("stsd",function(l){e=l;f.push(l);tg(l)}).T("encv",b).T("enca",b).T("avc1",function(l){g.push({box:l,kc:1701733238})}).T("avc3",function(l){g.push({box:l,kc:1701733238})}).T("ac-3",function(l){g.push({box:l,kc:1701733217})}).T("ec-3",function(l){g.push({box:l,kc:1701733217})}).T("mp4a",function(l){g.push({box:l,kc:1701733217})}).parse(a);
228
+ if(d)return a;if(0==g.length||!e)throw ab(Qc(a)),new N(2,3,3019);g.reverse();for(var h=t(g),k=h.next();!k.done;k=h.next())k=k.value,a=xg(a,e,k.box,f,k.kc);return a}
229
+ function xg(a,b,c,d,e){var f=yg.value(),g=a.subarray(c.start,c.start+c.size),h=Ib(g),k=new Uint8Array(c.size+f.byteLength);k.set(g,0);g=Ib(k);g.setUint32(4,e);k.set(f,c.size);e=h.getUint32(4);g.setUint32(c.size+16,e);zg(k,0,k.byteLength);e=new Uint8Array(a.byteLength+k.byteLength);c=tc()?c.start:c.start+c.size;f=a.subarray(c);e.set(a.subarray(0,c));e.set(k,c);e.set(f,c+k.byteLength);a=t(d);for(d=a.next();!d.done;d=a.next())d=d.value,zg(e,d.start,d.size+k.byteLength);k=Ib(e,b.start);b=sg(b);a=k.getUint32(b);
230
+ k.setUint32(b,a+1);return e}function zg(a,b,c){a=Ib(a,b);b=a.getUint32(0);0!=b&&(1==b?(a.setUint32(8,c>>32),a.setUint32(12,c&4294967295)):a.setUint32(0,c))}var yg=new oc(function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])});function Ag(a,b,c,d,e){if(d>=e)return null;for(var f=-1,g=-1,h=0;h<c.length;h++)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){f=h;break}for(h=c.length-1;0<=h;h--)if(c[h].some(function(A){return null!=A&&""!=A.g.trim()})){g=h;break}if(-1===f||-1===g)return null;for(var k=h=!1,l="white",m="black",p=Bg(d,e,h,k,l,m);f<=g;f++){for(var n=c[f],q=-1,v=-1,y=0;y<n.length;y++)if(null!=n[y]&&""!==n[y].g.trim()){q=y;break}for(y=n.length-1;0<=y;y--)if(null!=n[y]&&""!==n[y].g.trim()){v=y;break}if(-1===
231
+ q||-1===v)n=Cg(d,e),a.nestedCues.push(n);else{for(;q<=v;q++)if(y=n[q]){var x=y.l,w=y.i,D=y.j,C=y.h;if(x!=h||w!=k||D!=l||C!=m)p.payload&&a.nestedCues.push(p),p=Bg(d,e,x,w,D,C),h=x,k=w,l=D,m=C;p.payload+=y.g}else p.payload+=" ";p.payload&&a.nestedCues.push(p);f!==g&&(p=Cg(d,e),a.nestedCues.push(p));p=Bg(d,e,h,k,l,m)}}return a.nestedCues.length?{cue:a,stream:b}:null}
232
+ function Bg(a,b,c,d,e,f){a=new ib(a,b,"");c&&a.textDecoration.push("underline");d&&(a.fontStyle="italic");a.color=e;a.backgroundColor=f;return a}function Cg(a,b){var c=new ib(a,b,"");c.lineBreak=!0;return c}function Dg(a,b,c,d,e){this.g=a;this.l=b;this.i=c;this.h=d;this.j=e};function Eg(a,b){this.i=[];this.g=1;this.h=0;this.u=a;this.s=b;this.j=this.m=!1;this.l="white";this.o="black";Fg(this)}function Gg(a,b,c){return Ag(new ib(b,c,""),"CC"+(a.u<<1|a.s+1),a.i,b,c)}function Fg(a){Hg(a,0,15);a.g=1}function Ig(a,b,c){if(!(32>c||127<c)){var d="";switch(b){case Jg:d=Kg.has(c)?Kg.get(c):String.fromCharCode(c);break;case Lg:d=Mg.get(c);break;case Ng:a.i[a.g].pop();d=Og.get(c);break;case Pg:a.i[a.g].pop(),d=Qg.get(c)}d&&a.i[a.g].push(new Dg(d,a.m,a.j,a.o,a.l))}}
233
+ function Rg(a,b,c,d){if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].map(function(f){return f});else for(var e=0;e<d;e++)a.i[b+e]=a.i[c+e].map(function(f){return f})}function Hg(a,b,c){for(var d=0;d<=c;d++)a.i[b+d]=[]}
234
+ var Jg=0,Lg=1,Ng=2,Pg=3,Kg=new Map([[39,"\u2019"],[42,"\u00e1"],[92,"\u00e9"],[92,"\u00e9"],[94,"\u00ed"],[95,"\u00f3"],[96,"\u00fa"],[123,"\u00e7"],[124,"\u00f7"],[125,"\u00d1"],[126,"\u00f1"],[127,"\u2588"]]),Mg=new Map([[48,"\u00ae"],[49,"\u00b0"],[50,"\u00bd"],[51,"\u00bf"],[52,"\u2122"],[53,"\u00a2"],[54,"\u00a3"],[55,"\u266a"],[56,"\u00e0"],[57,"\u2800"],[58,"\u00e8"],[59,"\u00e2"],[60,"\u00ea"],[61,"\u00ee"],[62,"\u00f4"],[63,"\u00fb"]]),Og=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
235
+ [35,"\u00da"],[36,"\u00dc"],[37,"\u00fc"],[38,"\u2018"],[39,"\u00a1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\u00a9"],[44,"\u2120"],[45,"\u00b7"],[46,"\u201c"],[47,"\u201d"],[48,"\u00c0"],[49,"\u00c2"],[50,"\u00c7"],[51,"\u00c8"],[52,"\u00ca"],[53,"\u00cb"],[54,"\u00eb"],[55,"\u00ce"],[56,"\u00cf"],[57,"\u00ef"],[58,"\u00d4"],[59,"\u00d9"],[60,"\u00f9"],[61,"\u00db"],[62,"\u00ab"],[63,"\u00bb"]]),Qg=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
236
+ [39,"\u00d5"],[40,"\u00f5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\u00c4"],[49,"\u00e4"],[50,"\u00d6"],[51,"\u00f6"],[52,"\u00df"],[53,"\u00a5"],[54,"\u00a4"],[55,"\u2502"],[56,"\u00c5"],[57,"\u00e5"],[58,"\u00d8"],[59,"\u00f8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]);function Sg(a,b){this.h=Tg;this.o=new Eg(a,b);this.i=new Eg(a,b);this.l=new Eg(a,b);this.g=this.i;this.j=0;this.m=null}function Ug(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==Vg&&a.h!==Wg&&(e=Gg(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,Hg(c,0,15),c=a.l,c.g=0<c.h?c.h:0,Hg(c,0,15),d.g=15);a.h=Vg;d.h=b;return e}function Xg(a){a.h=Yg;a.g=a.l;a.g.h=0}function Zg(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=Wg}
237
+ var Tg=0,Yg=1,Vg=3,Wg=4,$g="black green blue cyan red yellow magenta black".split(" "),ah="white green blue cyan red yellow magenta white_italics".split(" ");function bh(){this.l=!1;this.C=this.F=0;this.D=ch;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";dh(this)}function dh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(eh())}function eh(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function fh(a,b){gh(a)&&(a.i[a.h][a.g]=new Dg(b,a.u,a.o,a.m,a.s),a.g++)}function gh(a){var b=a.g<a.C&&0<=a.g;return a.h<a.F&&0<=a.h&&b}bh.prototype.isVisible=function(){return this.l};
238
+ function hh(a,b,c){var d=new ib(a.j,b,"");d.textAlign=a.D===ih?"left":a.D===jh?"right":mb;if(c=Ag(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var ih=0,jh=1,ch=2;function kh(){this.i=[];this.h=null;this.g=0}function lh(a,b){3===b.type?(a.g=2*(b.value&63)-1,a.h=[]):a.h&&(0<a.g&&(a.h.push(b),a.g--),0===a.g&&(a.i.push(new mh(a.h)),a.h=null,a.g=0))}function mh(a){this.g=0;this.h=a}mh.prototype.ma=function(){return this.g<this.h.length};mh.prototype.$=function(){return this.g};function nh(a){if(!a.ma())throw new N(2,2,3E3);return a.h[a.g++]}mh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function oh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
239
+ function ph(a,b,c,d){if(128<=c&&135>=c)d=c&7,a.h[d]&&(a.g=a.h[d]);else{if(136===c){c=nh(b).value;b=null;c=t(qh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=hh(e,d,a.i)),dh(e);return b}if(137===c)for(b=nh(b).value,b=t(qh(a,b)),c=b.next();!c.done;c=b.next())c=a.h[c.value],c.isVisible()||(c.j=d),c.l=!0;else{if(138===c){c=nh(b).value;b=null;c=t(qh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=hh(e,d,a.i)),e.l=!1;return b}if(139===c){c=nh(b).value;
240
+ b=null;c=t(qh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=hh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=nh(b).value,rh(a,b,d);if(143===c)return d=rh(a,255,d),sh(a),d;if(144===c)b.skip(1),d=nh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=nh(b).value,c=nh(b).value,b.skip(1),a.g&&(b=th((c&48)>>4,(c&12)>>2,c&3),a.g.s=th((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=nh(b).value,b=nh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
241
+ b.skip(1),d=nh(b).value,b.skip(1),a.g&&(a.g.D=d&3);else if(152<=c&&159>=c){c=(c&15)-8;e=null!==a.h[c];if(!e){var f=new bh;f.j=d;a.h[c]=f}d=nh(b).value;nh(b);nh(b);f=nh(b).value;var g=nh(b).value;b=nh(b).value;e&&0===(b&7)||(b=a.h[c],b.h=0,b.g=0,b.u=!1,b.o=!1,b.s="white",b.m="black");b=a.h[c];b.l=0<(d&32);b.F=(f&15)+1;b.C=(g&63)+1;a.g=a.h[c]}}}return null}function qh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
242
+ function rh(a,b,c){var d=null;b=t(qh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=hh(f,c,a.i));a.h[e]=null}return d}function sh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function th(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return uh[a<<2|b<<1|c]}
243
+ var vh=new Map([[32," "],[33,"\u00a0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),uh="black blue green cyan red magenta yellow white".split(" ");function wh(){this.h=[];this.g=[];this.i=new kh;this.l=0;this.s=new Map([["CC1",new Sg(0,0)],["CC2",new Sg(0,1)],["CC3",new Sg(1,0)],["CC4",new Sg(1,1)]]);this.o=this.m=0;this.j=new Map;xh(this)}function xh(a){a.m=0;a.o=0;a=t(a.s.values());for(var b=a.next();!b.done;b=a.next())b=b.value,b.h=2,b.g=b.i,b.m=null,Fg(b.i),Fg(b.l),Fg(b.o)}
244
+ function yh(a){function b(f,g){return f.pts-g.pts||f.order-g.order}var c=[];a.h.sort(b);a.g.sort(b);for(var d=t(a.h),e=d.next();!e.done;e=d.next())(e=zh(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())lh(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=Ah(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
245
+ function zh(a,b){var c=b.type;if(16===(b.xa&112)){var d=b.xa>>3&1;0===c?a.m=d:a.o=d}c=a.s.get("CC"+(c<<1|(c?a.o:a.m)+1));if(255===b.xa&&255===b.Na||!b.xa&&!b.Na||!Bh(b.xa)||!Bh(b.Na))return 45<=++a.l&&xh(a),null;a.l=0;b.xa&=127;b.Na&=127;if(!b.xa&&!b.Na)return null;d=null;if(16===(b.xa&112))a:{var e=b.xa;d=b.Na;if(c.m===(e<<8|d))c.m=null;else if(c.m=e<<8|d,16===(e&240)&&64===(d&192)){e=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(e&7)<<1|d>>5&1];var f=(d&30)>>1,g="white",h=!1;7>f?g=ah[f]:7===f&&(h=!0);
246
+ d=1===(d&1);if(c.h!==Wg){f=c.g;if(c.h===Vg&&e!==f.g){var k=1+e-f.h;Rg(f,k,1+f.g-f.h,f.h);Hg(f,0,k-1);Hg(f,e+1,15-e)}f.g=e;c.g.m=d;c.g.j=h;c.g.l=g;c.g.o="black"}}else if(17===(e&247)&&32===(d&240))c.g.m=!1,c.g.j=!1,c.g.l="white",Ig(c.g,Jg,32),g=!1,e=ah[(d&14)>>1],"white_italics"===e&&(e="white",g=!0),c.g.m=1===(d&1),c.g.j=g,c.g.l=e;else if(16===(e&247)&&32===(d&240)||23===(e&247)&&45===(d&255))g="black",0===(e&7)&&(g=$g[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))Ig(c.g,Lg,d);else if(18===
247
+ (e&246)&&32===(d&224))Ig(c.g,e&1?Pg:Ng,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Na){case 32:Xg(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=Ug(c,2,d);break;case 38:e=Ug(c,3,d);break;case 39:e=Ug(c,4,d);break;case 40:Ig(c.g,Jg,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:Fg(c.o);Zg(c);break;case 43:Zg(c);break;case 44:e=c.i;g=null;c.h!==Wg&&(g=Gg(e,c.j,d));Hg(e,0,15);e=g;break;case 45:e=c.g;c.h!==Vg?e=null:(g=Gg(e,c.j,d),h=e.g-e.h+1,Rg(e,h-1,h,e.h),Hg(e,
248
+ 0,h-1),Hg(e,e.g,15-e.g),c.j=d,e=g);break;case 46:Hg(c.l,0,15);break;case 47:e=null,c.h!==Wg&&(e=Gg(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Xg(c),c.j=d}d=e;break a}d=null}else e=b.Na,Ig(c.g,Jg,b.xa),Ig(c.g,Jg,e);return d}
249
+ function Ah(a,b){var c=[];try{for(;b.ma();){var d=nh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=nh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new oh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=nh(e),l=k.value,m=k.pts;if(16===l){var p=nh(e);l=l<<16|p.value}if(0<=l&&31>=l){var n=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!gh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.C-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=hh(q,n,g.i));if(q.h+1>=q.F){n=q;for(var v=0,y=1;15>y;y++,
250
+ v++)n.i[v]=n.i[y];for(y=0;1>y;y++,v++)n.i[v]=eh()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=hh(q,n,g.i));q.i[q.h]=eh();q.g=0;break;case 12:q.isVisible()&&(e=hh(q,n,g.i)),dh(q),n=q,n.h=0,n.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=ph(g,e,l,m);else{if(4096<=l&&4127>=l)n=l&255,8<=n&&15>=n?e.skip(1):16<=n&&23>=n?e.skip(2):24<=n&&31>=n&&e.skip(3);else if(4224<=l&&4255>=l)n=l&255,128<=n&&135>=n?e.skip(4):136<=n&&143>=n&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?fh(g.g,"\u266a"):fh(g.g,
251
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&fh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(vh.has(e)){var w=vh.get(e);fh(g.g,w)}else fh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?fh(g.g,"_"):fh(g.g,"[CC]"));x=null}(e=x)&&c.push(e)}}}}catch(D){if(D instanceof N&&3E3===D.code)Wa("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw D;}return c}function Bh(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function Ch(a,b){var c=null,d=null,e=a.N();b&1&&a.skip(8);b&2&&a.skip(4);b&8&&(c=a.N());b&16&&(d=a.N());return{trackId:e,le:c,Ye:d}}function Dh(a,b){return{ge:1==b?a.Hb():a.N()}}function Eh(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
252
+ function Fh(a,b,c){var d=a.N(),e=[];c&1&&a.skip(4);c&4&&a.skip(4);for(var f=0;f<d;f++){var g={Td:null,sampleSize:null,Xc:null};c&256&&(g.Td=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.Xc=0==b?a.N():a.ze());e.push(g)}return{Tg:d,Be:e}};function Gh(){this.i=new Map;this.h=this.g=0}
253
+ Gh.prototype.init=function(a){var b=this,c=[],d=[];(new ng).box("moov",rg).box("mvex",rg).T("trex",function(e){var f=e.reader;f.skip(4);f.skip(4);e=f.N();f=f.N();b.g=e;b.h=f}).box("trak",rg).T("tkhd",function(e){var f=e.reader;1==e.version?(f.skip(8),f.skip(8)):(f.skip(4),f.skip(4));e=f.N();c.push(e)}).box("mdia",rg).T("mdhd",function(e){e=Eh(e.reader,e.version);d.push(e.timescale)}).parse(a,!0);if(!c.length||!d.length||c.length!=d.length)throw new N(2,2,2010);c.forEach(function(e,f){b.i.set(e,d[f])})};
254
+ Gh.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new ng).box("moof",rg).box("traf",rg).T("trun",function(k){f=Fh(k.reader,k.version,k.flags).Be}).T("tfhd",function(k){k=Ch(k.reader,k.flags);d=k.le||b.g;e=k.Ye||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).T("tfdt",function(k){g=Dh(k.reader,k.version).ge}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,p=d,n=e,q=f,v=0,y=n;for(q.length&&(y=q[0].sampleSize||n);k.ma();){var x=k.N();if(6==
255
+ (k.Ra()&31)){var w=0;q.length>v&&(w=q[v].Xc||0);w=(l+w)/m;for(var D=[],C,A=k.Za(x-1),G=C=0;G<A.length;)2==C&&3==A[G]?(C=0,A=[].concat(ia(A)),A.splice(G,1),A=new Uint8Array(A)):0==A[G]?C++:C=0,G++;C=A;for(G=0;G<C.length;){for(A=0;255==C[G];)A+=255,G++;A+=C[G++];for(var E=0;255==C[G];)E+=255,G++;E+=C[G++];4==A&&D.push(C.subarray(G,G+E));G+=E}D=t(D);for(C=D.next();!C.done;C=D.next())c.push({Kf:C.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=q.length>v?l+(q[v].Td||p):l+p,v++,y=q.length>
256
+ v?q[v].sampleSize||n:n)}}).parse(a,!1);return c};function Hh(){this.h=new Gh;this.g=new wh}Hh.prototype.init=function(a){this.h.init(a)};
257
+ function Ih(a,b){var c=a.h.parse(b);c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value,f=Fb(e.Kf);if(0<f.length&&(d=a.g,e=e.pts,f=new kg(f,0),181===f.Ra()&&49===f.Pd()&&1195456820===f.N()&&3===f.Ra())){var g=f.Ra();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Ra(),l=(k&4)>>2,m=f.Ra(),p=f.Ra();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,xa:m,Na:p,order:d.h.length}):(d.g.push({pts:e,type:k,value:m,order:d.g.length}),d.g.push({pts:e,type:2,value:p,order:d.g.length})))}}}}return yh(a.g)}
258
+ ;function Jh(a,b,c,d){this.ya=a;this.Ba=b;this.la=c;this.Gd=void 0===d?null:d}Jh.prototype.ec=function(){return this.Ba};Jh.prototype.ac=function(){return this.la};function Kh(a,b){return a&&b?a.ec()==b.ec()&&a.ac()==b.ac()&&gb(a.ya(),b.ya()):a==b}M("shaka.media.InitSegmentReference",Jh);Jh.prototype.getEndByte=Jh.prototype.ac;Jh.prototype.getStartByte=Jh.prototype.ec;
259
+ function Lh(a,b,c,d,e,f,g,h,k,l,m,p,n,q){l=void 0===l?[]:l;q=void 0===q?Mh:q;this.startTime=a;this.j=this.endTime=b;this.m=c;this.Ba=d;this.la=e;this.i=f;this.timestampOffset=g;this.appendWindowStart=h;this.appendWindowEnd=k;this.h=l;this.tilesLayout=void 0===m?"":m;this.l=void 0===p?null:p;this.g=void 0===n?null:n;this.status=q}r=Lh.prototype;r.ya=function(){return this.m()};r.getStartTime=function(){return this.startTime};r.ef=function(){return this.endTime};r.ec=function(){return this.Ba};
260
+ r.ac=function(){return this.la};r.xf=function(){return this.tilesLayout};r.wf=function(){return this.l};r.td=function(){return this.status};r.Ef=function(){this.status=Nh};M("shaka.media.SegmentReference",Lh);Lh.prototype.markAsUnavailable=Lh.prototype.Ef;Lh.prototype.getStatus=Lh.prototype.td;Lh.prototype.getTileDuration=Lh.prototype.wf;Lh.prototype.getTilesLayout=Lh.prototype.xf;Lh.prototype.getEndByte=Lh.prototype.ac;Lh.prototype.getStartByte=Lh.prototype.ec;Lh.prototype.getEndTime=Lh.prototype.ef;
261
+ Lh.prototype.getStartTime=Lh.prototype.getStartTime;Lh.prototype.getUris=Lh.prototype.ya;var Mh=0,Nh=1;Lh.Status={jg:Mh,Ng:Nh,xg:2};function Oh(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:1==a.length&&0>a.start(0)?0:a.length?a.start(0):null}function Ph(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function Qh(a,b){return!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0)||b>a.end(a.length-1)?!1:b>=a.start(0)}
262
+ function Rh(a,b){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return 0;for(var c=0,d=t(Sh(a)),e=d.next();!e.done;e=d.next()){var f=e.value;e=f.start;f=f.end;f>b&&(c+=f-Math.max(e,b))}return c}function Th(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=Sh(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function Sh(a){if(!a)return[];for(var b=[],c=0;c<a.length;c++)b.push({start:a.start(c),end:a.end(c)});return b};function Uh(a,b,c,d){var e=this;this.j=a;this.m=c;this.h={};this.M={};this.L={};this.g=null;this.F=!1;this.W=d||function(){};this.i={};this.o=new gf;this.u={};this.C=b;this.G=new nc;this.l=Vh(this,this.G);this.D=new ef(function(){return Wh(e)});this.I="";this.s=!1;this.R=new nc}function Vh(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Xh(c);a.j.src=a.I;return c}r=Uh.prototype;r.destroy=function(){return this.D.destroy()};
263
+ function Wh(a){var b,c,d,e,f,g,h,k;return K(function(l){if(1==l.g){b=[];for(c in a.i)for(d=a.i[c],e=d[0],a.i[c]=d.slice(0,1),e&&b.push(e.p["catch"](bc)),f=t(d.slice(1)),g=f.next();!g.done;g=f.next())h=g.value,h.p.reject(new N(2,7,7003,void 0));a.g&&b.push(a.g.destroy());a.m&&b.push(a.m.destroy());for(k in a.u)b.push(a.u[k].destroy());return u(l,Promise.all(b),2)}a.o&&(a.o.release(),a.o=null);a.j&&(a.j.removeAttribute("src"),a.j.load(),a.j=null);a.l=null;a.g=null;a.m=null;a.h={};a.u={};a.C=null;a.i=
262
264
  {};z(l)})}
263
- r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(p){if(1==p.g)return e=mc,u(p,d.G,2);d.s=c;f={};g=t(a.keys());for(h=g.next();!h.done;f={pa:f.pa},h=g.next())f.pa=h.value,k=a.get(f.pa),l=Zc(k.mimeType,k.codecs),f.pa==e.X?Zh(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Uc(l,f.pa)||(d.u[f.pa]=new Tc,l=Wc(f.pa,l)),m=d.l.addSourceBuffer(l),d.o.B(m,"error",function(n){return function(){d.i[n.pa][0].p.reject(new N(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.o.B(m,"updateend",
264
- function(n){return function(){return $h(d,n.pa)}}(f)),d.h[f.pa]=m,d.M[f.pa]=l,d.i[f.pa]=[],d.L[f.pa]=!!k.drmInfos.length);z(p)})};function Zh(a,b,c){a.g||(a.g=new dd(a.m));var d=a.g;a=a.F;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,fd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function ai(a){return a.l?"ended"==a.l.readyState:!0}function bi(a,b){return b==lc?a.g.g:Ph(ci(a,b))}
265
- function di(a,b){return b==lc?a.g.h:Qh(ci(a,b))}function ei(a,b,c){if(b==lc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=ci(a,b);return Sh(a,c)}r.Ya=function(){var a={total:Th(this.j.buffered),audio:Th(ci(this,"audio")),video:Th(ci(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function ci(a,b){try{return a.h[b].buffered}catch(c){return null}}
266
- function fi(a,b,c,d,e,f){var g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G;return K(function(E){switch(E.g){case 1:g=mc;if(b!=g.X){E.A(2);break}if(!a.s){E.A(3);break}return u(E,a.R,4);case 4:h=E.h,a.g.s=h;case 3:return u(E,gd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return E["return"]();case 2:if(!a.u[b]){e&&(a.g||Zh(a,"text/vtt",a.s),d?(k=Jh(a.C,c),k.length&&(l=a.h[g.va].timestampOffset,od(a.g,k,d.startTime,d.endTime,l))):a.C.init(c));E.A(6);break}return u(E,Xc(a.u[b],c),7);case 7:m=E.h,a.g||Zh(a,
267
- "text/vtt",a.s),m.metadata&&(p=a.h[b].timestampOffset,a.W(m.metadata,p,d?d.endTime:null)),m.captions&&m.captions.length&&(n=a.h[g.va].timestampOffset,q=jd(m.captions),od(a.g,q,d?d.startTime:null,d?d.endTime:null,n)),c=m.data;case 6:c=gi(a,c,d?d.startTime:null,b);v=a.h[b];y=hi;if(!a.s||v.mode==y||!d){E.A(8);break}x=b==g.va||!(g.va in a.h);if(!x){E.A(9);break}w=[v.appendWindowStart,v.appendWindowEnd];v.appendWindowStart=0;v.appendWindowEnd=Infinity;D=v.timestampOffset;v.timestampOffset=0;return u(E,
268
- ii(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return v.timestampOffset=D,v.appendWindowStart=w[0],v.appendWindowEnd=w[1],C=Ph(ci(a,b)),A=(d.startTime||0)-(C||0),a.R.resolve(A),u(E,ii(a,b,function(){return ji(a,b,0,a.l.duration)}),9);case 9:v.mode=y;case 8:return d&&a.s&&b!=g.X&&f&&(G=d.startTime,ii(a,b,function(){var H=G;0>H&&(H+=.001);a.h[b].timestampOffset=H;$h(a,b)})),u(E,ii(a,b,function(){a.h[b].appendBuffer(c)}),12);case 12:z(E)}})}
269
- function ki(a,b){var c=di(a,"video")||0;id(a.g,b,c)}function li(a){a.g&&id(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return K(function(f){e=mc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,ii(d,a,function(){return ji(d,a,b,c)}),0)})};function mi(a,b){var c;return K(function(d){c=mc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,ii(a,b,function(){return ji(a,b,0,a.l.duration)}),0)})}
270
- r.flush=function(a){var b=this,c;return K(function(d){c=mc;return a==c.X?d["return"]():u(d,ii(b,a,function(){b.j.currentTime-=.001;$h(b,a)}),0)})};
271
- function ni(a,b,c,d,e,f){var g;return K(function(h){g=mc;return b==g.X?(f||(a.g.s=c),hd(a.g,d,e),h["return"]()):u(h,Promise.all([ii(a,b,function(){var k=a.h[b].appendWindowStart,l=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=k;a.h[b].appendWindowEnd=l;$h(a,b)}),f?Promise.resolve():ii(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;$h(a,b)}),ii(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;$h(a,b)})]),0)})}
272
- r.endOfStream=function(a){var b=this;return K(function(c){return u(c,oi(b,function(){ai(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Ia=function(a){var b=this;return K(function(c){return u(c,oi(b,function(){b.l.duration=a}),0)})};r.getDuration=function(){return this.l.duration};function ji(a,b,c,d){d<=c?$h(a,b):a.h[b].remove(c,d)}function $h(a,b){var c=a.i[b][0];c&&(c.p.resolve(),pi(a,b))}
273
- function ii(a,b,c){gf(a.D);c={start:c,p:new nc};a.i[b].push(c);1==a.i[b].length&&qi(a,b);return c.p}
274
- function oi(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:gf(a.D);c=[];d={};for(e in a.h)d.Qb=new nc,f={start:function(l){return function(){return l.Qb.resolve()}}(d),p:d.Qb},a.i[e].push(f),c.push(d.Qb),1==a.i[e].length&&f.start(),d={Qb:d.Qb};B(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)pi(a,h)}z(k)}})}function pi(a,b){a.i[b].shift();qi(a,b)}
275
- function qi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),pi(a,b)}}function gi(a,b,c,d){var e=a.L[d];null==c&&e&&(vc()||tc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=xg(b));return b}var Yh=window.URL.createObjectURL,hi="sequence",ri=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.l=a;this.Vc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0;this.F=!1}r=T.prototype;r.getDuration=function(){return this.i};r.kf=function(){return this.g};r.Ia=function(a){this.i=a};r.qf=function(){return this.l};r.Ee=function(a){this.o=a};r.sc=function(a){this.s=a};r.Zd=function(a){this.m=a};r.Zf=function(a){this.Vc=a};r.cf=function(){return this.Vc};
276
- r.Eb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Id(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.C&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Bd=function(){this.F=!0};r.Id=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Hd=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
277
- r.U=function(){return Infinity==this.i&&!this.s};r.jb=function(){return Infinity!=this.i&&!this.s};r.Pa=function(){return Math.max(this.u,this.fb()-this.m)};r.Fe=function(a){this.u=a};r.fb=function(){return this.U()||this.jb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.dc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.fb()-this.m+a,this.Oa()))};r.Ab=function(){return this.dc(0)};
278
- r.Oa=function(){return Math.max(0,this.fb()-(this.U()||this.jb()?this.Vc:0))};r.Ie=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.De=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.De;T.prototype.usingPresentationStartTime=T.prototype.Ie;T.prototype.getSeekRangeEnd=T.prototype.Oa;T.prototype.getSeekRangeStart=T.prototype.Ab;T.prototype.getSafeSeekRangeStart=T.prototype.dc;T.prototype.getSegmentAvailabilityEnd=T.prototype.fb;
279
- T.prototype.setUserSeekStart=T.prototype.Fe;T.prototype.getSegmentAvailabilityStart=T.prototype.Pa;T.prototype.isInProgress=T.prototype.jb;T.prototype.isLive=T.prototype.U;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Hd;T.prototype.notifyMinSegmentStartTime=T.prototype.Id;T.prototype.lockStartTime=T.prototype.Bd;T.prototype.notifySegments=T.prototype.Eb;T.prototype.getDelay=T.prototype.cf;T.prototype.setDelay=T.prototype.Zf;
280
- T.prototype.setSegmentAvailabilityDuration=T.prototype.Zd;T.prototype.setStatic=T.prototype.sc;T.prototype.setClockOffset=T.prototype.Ee;T.prototype.getPresentationStartTime=T.prototype.qf;T.prototype.setDuration=T.prototype.Ia;T.prototype.getMaxSegmentDuration=T.prototype.kf;T.prototype.getDuration=T.prototype.getDuration;function si(a,b){this.j=a;this.m=ti(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}si.prototype.release=function(){this.j=null;this.i=function(){}};function ui(a,b){a.i=b}function vi(a){this.g=a}function ti(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Th(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function wi(a,b,c,d){var e=this;this.g=a;this.o=b;this.u=c;this.i=new hf;this.m=!1;this.s=a.readyState;this.h=d;this.l=!1;this.i.B(a,"waiting",function(){return xi(e)});this.j=(new O(function(){xi(e)})).Ca(.25)}wi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.o=null};wi.prototype.Ld=function(){this.l=!0;xi(this)};
281
- function xi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.s&&(a.s=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=ti(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Uh(c,b,a.u.gapDetectionThreshold),null==d||0==d&&!a.l||(e=c.start(d),e>=a.o.Oa()||
282
- .001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e)))}}};function yi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=zi.value().get(b),c.oa(a,b,d))}var zi=new oc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function Ai(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new hf;this.i=new Bi(a);yi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Ci(d,d.j)})}Ai.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Di(a){return a.m?a.g.currentTime:a.j}function Ei(a,b){0<a.g.readyState?Fi(a.i,b):yi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Ci(a,a.j)})}
283
- function Ci(a,b){.001>Math.abs(a.g.currentTime-b)?Gi(a):(a.h.oa(a.g,"seeking",function(){Gi(a)}),Fi(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Gi(a){a.m=!0;a.h.B(a.g,"seeking",function(){return a.l()})}function Bi(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Bi.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
284
- function Fi(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Hi(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.oa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new hf;yi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Hi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Hi.prototype.o=function(a){this.h=this.j?this.h:a};Hi.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Hi.prototype.D=function(){};
285
- function Ii(a,b,c,d,e){var f=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.u=null;this.j=new wi(a,b.presentationTimeline,c,Ji(a,c));this.h=new Ai(a,function(){a:{var g=f.j;g.m=!0;g.l=!1;var h=Di(f.h);g=Ki(f,h);if(.001<Math.abs(g-h)&&(h=Date.now()/1E3,!f.u||f.u<h-1)){f.u=h;Ei(f.h,g);g=void 0;break a}f.C();g=void 0}return g},Li(this,d));this.s=(new O(function(){if(0!=f.i.readyState&&!f.i.paused){var g=Di(f.h),h=f.g.Ab(),k=f.g.Oa();3>k-h&&(h=k-3);g<h&&(g=
286
- Ki(f,g),f.i.currentTime=g)}})).Ca(.25)}Ii.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};Ii.prototype.o=function(a){Ei(this.h,a)};Ii.prototype.m=function(){var a=Di(this.h);return 0<this.i.readyState&&!this.i.paused?Mi(this,a):a};function Li(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Ab():a.g.Oa():0>b&&(b=a.g.Oa()+b);return Ni(a,Mi(a,b))}
287
- Ii.prototype.D=function(){this.j.Ld()};function Ni(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ki(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Ab(),f=a.g.Oa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.dc(c),k=a.g.dc(d);c=a.g.dc(c+d);return b>=g?Ni(a,b):b>f?f:b<e?Rh(a.i.buffered,k)?k:c:b>=h||Rh(a.i.buffered,b)?b:c}function Mi(a,b){var c=a.g.Ab();if(b<c)return c;c=a.g.Oa();return b>c?c:b}
288
- function Ji(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new si(new vi(a),b.stallThreshold);ui(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Oi(a){this.J=a;this.g=null;this.h=0;this.i=!1}r=Oi.prototype;r.release=function(){this.i||(this.J=[],this.g&&this.g.stop(),this.g=null)};r.Ef=function(){this.i=!0};r.find=function(a){for(var b=this.J.length-1,c=b;0<=c;--c){var d=this.J[c],e=c<b?this.J[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.J.length&&a<this.J[0].startTime?this.h:null};r.get=function(a){if(0==this.J.length)return null;a-=this.h;return 0>a||a>=this.J.length?null:this.J[a]};
265
+ r.init=function(a,b,c){c=void 0===c?!1:c;var d=this,e,f,g,h,k,l,m;return K(function(p){if(1==p.g)return e=mc,u(p,d.G,2);d.s=c;f={};g=t(a.keys());for(h=g.next();!h.done;f={pa:f.pa},h=g.next())f.pa=h.value,k=a.get(f.pa),l=Yc(k.mimeType,k.codecs),f.pa==e.X?Yh(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Tc(l,f.pa)||(d.u[f.pa]=new Sc,l=Vc(f.pa,l)),m=d.l.addSourceBuffer(l),d.o.B(m,"error",function(n){return function(){d.i[n.pa][0].p.reject(new N(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.o.B(m,"updateend",
266
+ function(n){return function(){return Zh(d,n.pa)}}(f)),d.h[f.pa]=m,d.M[f.pa]=l,d.i[f.pa]=[],d.L[f.pa]=!!k.drmInfos.length);z(p)})};function Yh(a,b,c){a.g||(a.g=new cd(a.m));var d=a.g;a=a.F;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,ed[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function $h(a){return a.l?"ended"==a.l.readyState:!0}function ai(a,b){return b==lc?a.g.g:Oh(bi(a,b))}
267
+ function ci(a,b){return b==lc?a.g.h:Ph(bi(a,b))}function di(a,b,c){if(b==lc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=bi(a,b);return Rh(a,c)}r.Ya=function(){var a={total:Sh(this.j.buffered),audio:Sh(bi(this,"audio")),video:Sh(bi(this,"video")),text:[]};if(this.g){var b=this.g.g,c=this.g.h;null!=b&&null!=c&&a.text.push({start:b,end:c})}return a};function bi(a,b){try{return a.h[b].buffered}catch(c){return null}}
268
+ function ei(a,b,c,d,e,f){var g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G;return K(function(E){switch(E.g){case 1:g=mc;if(b!=g.X){E.A(2);break}if(!a.s){E.A(3);break}return u(E,a.R,4);case 4:h=E.h,a.g.s=h;case 3:return u(E,fd(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return E["return"]();case 2:if(!a.u[b]){e&&(a.g||Yh(a,"text/vtt",a.s),d?(k=Ih(a.C,c),k.length&&(l=a.h[g.va].timestampOffset,kd(a.g,k,d.startTime,d.endTime,l))):a.C.init(c));E.A(6);break}return u(E,Wc(a.u[b],c),7);case 7:m=E.h,a.g||Yh(a,
269
+ "text/vtt",a.s),m.metadata&&(p=a.h[b].timestampOffset,a.W(m.metadata,p,d?d.endTime:null)),m.captions&&m.captions.length&&(n=a.h[g.va].timestampOffset,q=id(m.captions),kd(a.g,q,d?d.startTime:null,d?d.endTime:null,n)),c=m.data;case 6:c=fi(a,c,d?d.startTime:null,b);v=a.h[b];y=gi;if(!a.s||v.mode==y||!d){E.A(8);break}x=b==g.va||!(g.va in a.h);if(!x){E.A(9);break}w=[v.appendWindowStart,v.appendWindowEnd];v.appendWindowStart=0;v.appendWindowEnd=Infinity;D=v.timestampOffset;v.timestampOffset=0;return u(E,
270
+ hi(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return v.timestampOffset=D,v.appendWindowStart=w[0],v.appendWindowEnd=w[1],C=Oh(bi(a,b)),A=(d.startTime||0)-(C||0),a.R.resolve(A),u(E,hi(a,b,function(){return ii(a,b,0,a.l.duration)}),9);case 9:v.mode=y;case 8:return d&&a.s&&b!=g.X&&f&&(G=d.startTime,hi(a,b,function(){var H=G;0>H&&(H+=.001);a.h[b].timestampOffset=H;Zh(a,b)})),u(E,hi(a,b,function(){a.h[b].appendBuffer(c)}),12);case 12:z(E)}})}
271
+ function ji(a,b){var c=ci(a,"video")||0;hd(a.g,b,c)}function ki(a){a.g&&hd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return K(function(f){e=mc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,hi(d,a,function(){return ii(d,a,b,c)}),0)})};function li(a,b){var c;return K(function(d){c=mc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,hi(a,b,function(){return ii(a,b,0,a.l.duration)}),0)})}
272
+ r.flush=function(a){var b=this,c;return K(function(d){c=mc;return a==c.X?d["return"]():u(d,hi(b,a,function(){b.j.currentTime-=.001;Zh(b,a)}),0)})};
273
+ function mi(a,b,c,d,e,f){var g;return K(function(h){g=mc;return b==g.X?(f||(a.g.s=c),gd(a.g,d,e),h["return"]()):u(h,Promise.all([hi(a,b,function(){var k=a.h[b].appendWindowStart,l=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=k;a.h[b].appendWindowEnd=l;Zh(a,b)}),f?Promise.resolve():hi(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;Zh(a,b)}),hi(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Zh(a,b)})]),0)})}
274
+ r.endOfStream=function(a){var b=this;return K(function(c){return u(c,ni(b,function(){$h(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Ia=function(a){var b=this;return K(function(c){return u(c,ni(b,function(){b.l.duration=a}),0)})};r.getDuration=function(){return this.l.duration};function ii(a,b,c,d){d<=c?Zh(a,b):a.h[b].remove(c,d)}function Zh(a,b){var c=a.i[b][0];c&&(c.p.resolve(),oi(a,b))}
275
+ function hi(a,b,c){ff(a.D);c={start:c,p:new nc};a.i[b].push(c);1==a.i[b].length&&pi(a,b);return c.p}
276
+ function ni(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:ff(a.D);c=[];d={};for(e in a.h)d.Qb=new nc,f={start:function(l){return function(){return l.Qb.resolve()}}(d),p:d.Qb},a.i[e].push(f),c.push(d.Qb),1==a.i[e].length&&f.start(),d={Qb:d.Qb};B(k,2);return u(k,Promise.all(c),4);case 4:va(k,3);break;case 2:throw g=F(k),g;case 3:try{b()}catch(l){throw new N(2,3,3015,l);}finally{for(h in a.h)oi(a,h)}z(k)}})}function oi(a,b){a.i[b].shift();pi(a,b)}
277
+ function pi(a,b){var c=a.i[b][0];if(c)try{c.start()}catch(d){"QuotaExceededError"==d.name?c.p.reject(new N(2,3,3017,b)):c.p.reject(new N(2,3,3015,d)),oi(a,b)}}function fi(a,b,c,d){var e=a.L[d];null==c&&e&&(vc()||tc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=wg(b));return b}var Xh=window.URL.createObjectURL,gi="sequence",qi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.l=a;this.Wc=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.C=void 0===c?!0:c;this.D=0;this.F=!1}r=T.prototype;r.getDuration=function(){return this.i};r.lf=function(){return this.g};r.Ia=function(a){this.i=a};r.rf=function(){return this.l};r.Fe=function(a){this.o=a};r.tc=function(a){this.s=a};r.ae=function(a){this.m=a};r.$f=function(a){this.Wc=a};r.df=function(){return this.Wc};
278
+ r.Eb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Kd(a[0].startTime);this.g=a.reduce(function(c,d){return Math.max(c,d.endTime-d.startTime)},this.g);this.h=Math.max(this.h,b);null!=this.l&&this.C&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Dd=function(){this.F=!0};r.Kd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Jd=function(a){this.g=Math.max(this.g,a)};r.offset=function(a){null!=this.j&&(this.j+=a);null!=this.h&&(this.h+=a)};
279
+ r.U=function(){return Infinity==this.i&&!this.s};r.jb=function(){return Infinity!=this.i&&!this.s};r.Pa=function(){return Math.max(this.u,this.fb()-this.m)};r.Ge=function(a){this.u=a};r.fb=function(){return this.U()||this.jb()?Math.min(Math.max(0,(Date.now()+this.o)/1E3-this.g-this.l)+this.D,this.i):this.h?Math.min(this.h,this.i):this.i};r.dc=function(a){var b=Math.max(this.j,this.u);return Infinity==this.m?Math.ceil(1E3*b)/1E3:Math.max(b,Math.min(this.fb()-this.m+a,this.Oa()))};r.Ab=function(){return this.dc(0)};
280
+ r.Oa=function(){return Math.max(0,this.fb()-(this.U()||this.jb()?this.Wc:0))};r.Je=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.Ee=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Ee;T.prototype.usingPresentationStartTime=T.prototype.Je;T.prototype.getSeekRangeEnd=T.prototype.Oa;T.prototype.getSeekRangeStart=T.prototype.Ab;T.prototype.getSafeSeekRangeStart=T.prototype.dc;T.prototype.getSegmentAvailabilityEnd=T.prototype.fb;
281
+ T.prototype.setUserSeekStart=T.prototype.Ge;T.prototype.getSegmentAvailabilityStart=T.prototype.Pa;T.prototype.isInProgress=T.prototype.jb;T.prototype.isLive=T.prototype.U;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Jd;T.prototype.notifyMinSegmentStartTime=T.prototype.Kd;T.prototype.lockStartTime=T.prototype.Dd;T.prototype.notifySegments=T.prototype.Eb;T.prototype.getDelay=T.prototype.df;T.prototype.setDelay=T.prototype.$f;
282
+ T.prototype.setSegmentAvailabilityDuration=T.prototype.ae;T.prototype.setStatic=T.prototype.tc;T.prototype.setClockOffset=T.prototype.Fe;T.prototype.getPresentationStartTime=T.prototype.rf;T.prototype.setDuration=T.prototype.Ia;T.prototype.getMaxSegmentDuration=T.prototype.lf;T.prototype.getDuration=T.prototype.getDuration;function ri(a,b){this.j=a;this.m=si(a);this.g=a.g.currentTime;this.l=Date.now()/1E3;this.h=!1;this.o=b;this.i=function(){}}ri.prototype.release=function(){this.j=null;this.i=function(){}};function ti(a,b){a.i=b}function ui(a){this.g=a}function si(a){if(a.g.paused||0==a.g.playbackRate||0==a.g.buffered.length)var b=!1;else a:{b=a.g.currentTime;a=t(Sh(a.g.buffered));for(var c=a.next();!c.done;c=a.next())if(c=c.value,!(b<c.start-.1||b>c.end-.5)){b=!0;break a}b=!1}return b};function vi(a,b,c,d){var e=this;this.g=a;this.o=b;this.u=c;this.i=new gf;this.m=!1;this.s=a.readyState;this.h=d;this.l=!1;this.i.B(a,"waiting",function(){return wi(e)});this.j=(new O(function(){wi(e)})).Ca(.25)}vi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);null!=this.j&&(this.j.stop(),this.j=null);this.h&&(this.h.release(),this.h=null);this.g=this.o=null};vi.prototype.Nd=function(){this.l=!0;wi(this)};
283
+ function wi(a){if(0!=a.g.readyState){if(a.g.seeking){if(!a.m)return}else a.m=!1;if(!a.g.paused||0==a.g.currentTime&&(a.g.autoplay||0!=a.g.currentTime)){a.g.readyState!=a.s&&(a.s=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=si(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.m!=d)b.l=f,b.g=e,b.m=d,b.h=!1;e=f-b.l;if(d=e>=b.o&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime;b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=Th(c,b,a.u.gapDetectionThreshold),null==d||0==d&&!a.l||(e=c.start(d),e>=a.o.Oa()||
284
+ .001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e)))}}};function xi(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=yi.value().get(b),c.oa(a,b,d))}var yi=new oc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function zi(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new gf;this.i=new Ai(a);xi(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Bi(d,d.j)})}zi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);null!=this.i&&(this.i.release(),this.i=null);this.l=function(){};this.g=null};function Ci(a){return a.m?a.g.currentTime:a.j}function Di(a,b){0<a.g.readyState?Ei(a.i,b):xi(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){Bi(a,a.j)})}
285
+ function Bi(a,b){.001>Math.abs(a.g.currentTime-b)?Fi(a):(a.h.oa(a.g,"seeking",function(){Fi(a)}),Ei(a.i,0==a.g.currentTime?b:a.g.currentTime))}function Fi(a){a.m=!0;a.h.B(a.g,"seeking",function(){return a.l()})}function Ai(a){var b=this;this.h=a;this.m=10;this.l=this.j=this.i=0;this.g=new O(function(){0>=b.i?b.g.stop():b.h.currentTime!=b.j?b.g.stop():(b.h.currentTime=b.l,b.i--)})}Ai.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
286
+ function Ei(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function Gi(a){function b(){null==c.h||0==c.h?c.j=!0:(c.i.oa(c.g,"seeking",function(){c.j=!0}),c.g.currentTime=Math.max(0,c.g.currentTime+c.h))}var c=this;this.g=a;this.j=!1;this.h=null;this.i=new gf;xi(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}Gi.prototype.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};Gi.prototype.o=function(a){this.h=this.j?this.h:a};Gi.prototype.m=function(){return(this.j?this.g.currentTime:this.h)||0};Gi.prototype.D=function(){};
287
+ function Hi(a,b,c,d,e){var f=this;this.i=a;this.g=b.presentationTimeline;this.F=b.minBufferTime||0;this.l=c;this.C=e;this.u=null;this.j=new vi(a,b.presentationTimeline,c,Ii(a,c));this.h=new zi(a,function(){a:{var g=f.j;g.m=!0;g.l=!1;var h=Ci(f.h);g=Ji(f,h);if(.001<Math.abs(g-h)&&(h=Date.now()/1E3,!f.u||f.u<h-1)){f.u=h;Di(f.h,g);g=void 0;break a}f.C();g=void 0}return g},Ki(this,d));this.s=(new O(function(){if(0!=f.i.readyState&&!f.i.paused){var g=Ci(f.h),h=f.g.Ab(),k=f.g.Oa();3>k-h&&(h=k-3);g<h&&(g=
288
+ Ji(f,g),f.i.currentTime=g)}})).Ca(.25)}Hi.prototype.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.s&&(this.s.stop(),this.s=null);this.i=this.h=this.g=this.l=null;this.C=function(){}};Hi.prototype.o=function(a){Di(this.h,a)};Hi.prototype.m=function(){var a=Ci(this.h);return 0<this.i.readyState&&!this.i.paused?Li(this,a):a};function Ki(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Ab():a.g.Oa():0>b&&(b=a.g.Oa()+b);return Mi(a,Li(a,b))}
289
+ Hi.prototype.D=function(){this.j.Nd()};function Mi(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function Ji(a,b){var c=Math.max(a.F,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Ab(),f=a.g.Oa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.dc(c),k=a.g.dc(d);c=a.g.dc(c+d);return b>=g?Mi(a,b):b>f?f:b<e?Qh(a.i.buffered,k)?k:c:b>=h||Qh(a.i.buffered,b)?b:c}function Li(a,b){var c=a.g.Ab();if(b<c)return c;c=a.g.Oa();return b>c?c:b}
290
+ function Ii(a,b){if(!b.stallEnabled)return null;var c=b.stallSkip,d=new ri(new ui(a),b.stallThreshold);ti(d,function(){c?a.currentTime+=c:(a.pause(),a.play())});return d};function Ni(a){this.J=a;this.g=null;this.h=0;this.i=!1}r=Ni.prototype;r.release=function(){this.i||(this.J=[],this.g&&this.g.stop(),this.g=null)};r.Ff=function(){this.i=!0};r.find=function(a){for(var b=this.J.length-1,c=b;0<=c;--c){var d=this.J[c],e=c<b?this.J[c+1].startTime:d.endTime;if(a>=d.startTime&&a<e)return c+this.h}return this.J.length&&a<this.J[0].startTime?this.h:null};r.get=function(a){if(0==this.J.length)return null;a-=this.h;return 0>a||a>=this.J.length?null:this.J[a]};
289
291
  r.offset=function(a){if(!this.i)for(var b=t(this.J),c=b.next();!c.done;c=b.next()){c=c.value;c.startTime+=a;c.endTime+=a;c.j+=a;c=t(c.h);for(var d=c.next();!d.done;d=c.next())d=d.value,d.startTime+=a,d.endTime+=a,d.j+=a}};r.jc=function(a){!this.i&&a.length&&(this.J=this.J.filter(function(b){return b.startTime<a[0].startTime}),this.J.push.apply(this.J,ia(a)))};r.Db=function(a,b){var c=this;a=a.filter(function(d){return d.endTime>b&&(0==c.J.length||d.endTime>c.J[0].startTime)});this.jc(a);this.cb(b)};
290
292
  r.cb=function(a){if(!this.i){var b=this.J.length;this.J=this.J.filter(function(c){return c.endTime>a});this.h+=b-this.J.length}};
291
- r.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.J.length;)if(this.J[this.J.length-1].startTime>=b)this.J.pop();else break;for(;this.J.length;)if(this.J[0].endTime<=a)this.J.shift(),c||this.h++;else break;0!=this.J.length&&(a=this.J[this.J.length-1],this.J[this.J.length-1]=new Mh(a.startTime,b,a.m,a.Ba,a.la,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.l,a.g))}};
292
- r.Xc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.J.push.apply(c.J,ia(d)):(c.g.stop(),c.g=null)}),this.g.Ca(a))};Oi.prototype[Symbol.iterator]=function(){return this.zb(0)};Oi.prototype.zb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Pi(this,b,d)};
293
- function Qi(a,b,c){return new Oi([new Mh(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",Oi);Oi.forSingleSegment=Qi;Oi.prototype.getIteratorForTime=Oi.prototype.zb;Oi.prototype.updateEvery=Oi.prototype.Xc;Oi.prototype.fit=Oi.prototype.Xa;Oi.prototype.evict=Oi.prototype.cb;Oi.prototype.mergeAndEvict=Oi.prototype.Db;Oi.prototype.offset=Oi.prototype.offset;Oi.prototype.get=Oi.prototype.get;Oi.prototype.find=Oi.prototype.find;Oi.prototype.markImmutable=Oi.prototype.Ef;
294
- Oi.prototype.release=Oi.prototype.release;function Pi(a,b,c){this.i=a;this.h=b;this.g=c}Pi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.ya().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Pi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.ya().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};
295
- M("shaka.media.SegmentIterator",Pi);Pi.prototype.next=Pi.prototype.next;Pi.prototype.current=Pi.prototype.current;function Ri(){Oi.call(this,[]);this.j=[]}pa(Ri,Oi);r=Ri.prototype;r.clone=function(){var a=new Ri;a.j=this.j.slice();return a};r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.J.length}return null};
296
- r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.J.length}return null};r.offset=function(){};r.jc=function(){};r.cb=function(){};r.Db=function(){};r.Xa=function(){};r.Xc=function(){};M("shaka.media.MetaSegmentIndex",Ri);Ri.prototype.updateEvery=Ri.prototype.Xc;Ri.prototype.fit=Ri.prototype.Xa;Ri.prototype.mergeAndEvict=Ri.prototype.Db;Ri.prototype.evict=Ri.prototype.cb;Ri.prototype.merge=Ri.prototype.jc;
297
- Ri.prototype.offset=Ri.prototype.offset;Ri.prototype.get=Ri.prototype.get;Ri.prototype.find=Ri.prototype.find;Ri.prototype.release=Ri.prototype.release;function Si(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Mc();this.h=new O(function(){b.g.ve(.25*b.i)})}Si.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Si.prototype.set=function(a){this.i=a;Ti(this)};Si.prototype.Ic=function(){return this.g.Ic()};function Ti(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Mc()!=b&&a.g.Yd(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Mc()&&a.g.Yd(0)};function Ui(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Vi(b,!1)})).Ca(.25)}Ui.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Vi(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Wi(a){Qe.call(this);this.g=new Map;this.h=a}pa(Wi,Qe);Wi.prototype.release=function(){this.g.clear();Qe.prototype.release.call(this)};function Xi(a,b){var c=a.g.get(b);c||(c={lc:[],ie:null,contentType:b},a.g.set(b,c));return c}function Yi(a,b,c){var d=Xi(a,b.contentType);Zi(a,d);a={Ed:b,position:c};d=d.lc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
298
- Wi.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.lc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Ed;break a}}d=null}if(e=d)e=c.ie,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
299
- if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.ie=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Zi(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.lc;b.lc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.lc=[]};function $i(a){Qe.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}pa($i,Qe);$i.prototype.release=function(){this.g.clear();this.h.stop();Qe.prototype.release.call(this)};function aj(a){Qe.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{qb:null,pb:bj,ib:function(c,d){return cj(b,"enter",c,d)}},{qb:dj,pb:bj,ib:function(c,d){return cj(b,"enter",c,d)}},{qb:ej,pb:bj,ib:function(c,d){return cj(b,"enter",c,d)}},{qb:bj,pb:dj,ib:function(c,d){return cj(b,"exit",c,d)}},{qb:bj,pb:ej,ib:function(c,d){return cj(b,"exit",c,d)}},{qb:dj,pb:ej,ib:function(c,d){return cj(b,"skip",c,d)}},{qb:ej,pb:dj,ib:function(c,d){return cj(b,"skip",c,d)}}];this.h=new hf;this.h.B(this.i,"regionremove",
300
- function(c){b.g["delete"](c.region)})}pa(aj,Qe);aj.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Qe.prototype.release.call(this)};aj.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?dj:a>d.endTime?ej:bj;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.qb==e&&h.pb==f&&h.ib(d,b)}};
301
- function cj(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var dj=1,bj=2,ej=3;function fj(a,b,c,d,e){a=Ze(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function gj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.u=1;this.o=this.l=null;this.h=new Map;this.C=!1;this.D=null;this.s=!1;this.j=new ff(function(){return hj(c)})}gj.prototype.destroy=function(){return this.j.destroy()};function hj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,ij(e),b.push(jj(e));return u(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;z(f)})}
302
- gj.prototype.configure=function(a){this.i=a;this.D=new Fe({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};gj.prototype.start=function(){var a=this;return K(function(b){if(1==b.g)return u(b,kj(a),2);gf(a.j);a.C=!0;z(b)})};
303
- function lj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=mc,B(k,2),u(k,mi(a.g.O,c.X),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Zc(b.mimeType,b.codecs);Zh(a.g.O,e,a.m.sequenceMode);f=a.g.O.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=mj(b),a.h.set(c.X,h),nj(a,h,0);z(k)}})}function oj(a){var b=a.h.get(lc);b&&(ij(b),jj(b)["catch"](function(){}),a.h["delete"](lc));a.o=null}
304
- function pj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.mb&&(qj(a,e,!1,0,!1),c.mb=d)}else if(d=c.mb)c.mb=null,qj(a,d,!0,0,!1)}}function rj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.C&&(b.video&&qj(a,b.video,c,d,e),b.audio&&qj(a,b.audio,c,d,e))}function sj(a,b){a.o=b;a.C&&qj(a,b,!0,0,!1)}
305
- function qj(a,b,c,d,e){var f=a.h.get(b.type);f||b.type!=lc?f&&(f.mb&&(b.trickModeVideo?(f.mb=b,b=b.trickModeVideo):f.mb=null),f.stream!=b||e)&&(b.type==lc&&Zh(a.g.O,Zc(b.mimeType,b.codecs),a.m.sequenceMode),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ba=null,c&&(f.Zb?f.$c=!0:f.Ha?(f.ob=!0,f.Cc=d,f.$c=!0):(ij(f),tj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),uj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):lj(a,b)}
306
- function uj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.sa)return e["return"]();c=b.stream;d=b.sa;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.sa!=d||b.stream!=c)return e["return"]();var f=a.g.Lc();var g=di(a.g.O,b.type),h=b.stream.segmentIndex.find(b.za?b.za.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.la?k.la-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.la?k.la-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),
293
+ r.Xa=function(a,b,c){c=void 0===c?!1:c;if(!this.i){for(;this.J.length;)if(this.J[this.J.length-1].startTime>=b)this.J.pop();else break;for(;this.J.length;)if(this.J[0].endTime<=a)this.J.shift(),c||this.h++;else break;0!=this.J.length&&(a=this.J[this.J.length-1],this.J[this.J.length-1]=new Lh(a.startTime,b,a.m,a.Ba,a.la,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.l,a.g))}};
294
+ r.Yc=function(a,b){var c=this;this.i||(this.g&&this.g.stop(),this.g=new O(function(){var d=b();d?c.J.push.apply(c.J,ia(d)):(c.g.stop(),c.g=null)}),this.g.Ca(a))};Ni.prototype[Symbol.iterator]=function(){return this.zb(0)};Ni.prototype.zb=function(a){var b=this.find(a);if(null==b)return null;b--;var c=this.get(b+1),d=-1;if(c&&0<c.h.length)for(var e=c.h.length-1;0<=e;--e){var f=c.h[e];if(a>=f.startTime&&a<f.endTime){b++;d=e-1;break}}return new Oi(this,b,d)};
295
+ function Pi(a,b,c){return new Ni([new Lh(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",Ni);Ni.forSingleSegment=Pi;Ni.prototype.getIteratorForTime=Ni.prototype.zb;Ni.prototype.updateEvery=Ni.prototype.Yc;Ni.prototype.fit=Ni.prototype.Xa;Ni.prototype.evict=Ni.prototype.cb;Ni.prototype.mergeAndEvict=Ni.prototype.Db;Ni.prototype.offset=Ni.prototype.offset;Ni.prototype.get=Ni.prototype.get;Ni.prototype.find=Ni.prototype.find;Ni.prototype.markImmutable=Ni.prototype.Ff;
296
+ Ni.prototype.release=Ni.prototype.release;function Oi(a,b,c){this.i=a;this.h=b;this.g=c}Oi.prototype.current=function(){var a=this.i.get(this.h);a&&0<a.h.length&&a.ya().length&&this.g>=a.h.length&&(this.h++,this.g=0,a=this.i.get(this.h));return a&&0<a.h.length?a.h[this.g]:a};Oi.prototype.next=function(){var a=this.i.get(this.h);a&&0<a.h.length?(this.g++,a.ya().length&&this.g==a.h.length&&(this.h++,this.g=0)):(this.h++,this.g=0);a=this.current();return{value:a,done:!a}};
297
+ M("shaka.media.SegmentIterator",Oi);Oi.prototype.next=Oi.prototype.next;Oi.prototype.current=Oi.prototype.current;function Qi(){Ni.call(this,[]);this.j=[]}pa(Qi,Ni);r=Qi.prototype;r.clone=function(){var a=new Qi;a.j=this.j.slice();return a};r.release=function(){for(var a=t(this.j),b=a.next();!b.done;b=a.next())b.value.release();this.j=[]};r.find=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.find(a);if(null!=e)return e+b;b+=d.h+d.J.length}return null};
298
+ r.get=function(a){for(var b=0,c=t(this.j),d=c.next();!d.done;d=c.next()){d=d.value;var e=d.get(a-b);if(e)return e;b+=d.h+d.J.length}return null};r.offset=function(){};r.jc=function(){};r.cb=function(){};r.Db=function(){};r.Xa=function(){};r.Yc=function(){};M("shaka.media.MetaSegmentIndex",Qi);Qi.prototype.updateEvery=Qi.prototype.Yc;Qi.prototype.fit=Qi.prototype.Xa;Qi.prototype.mergeAndEvict=Qi.prototype.Db;Qi.prototype.evict=Qi.prototype.cb;Qi.prototype.merge=Qi.prototype.jc;
299
+ Qi.prototype.offset=Qi.prototype.offset;Qi.prototype.get=Qi.prototype.get;Qi.prototype.find=Qi.prototype.find;Qi.prototype.release=Qi.prototype.release;function Ri(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Nc();this.h=new O(function(){b.g.we(.25*b.i)})}Ri.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};Ri.prototype.set=function(a){this.i=a;Si(this)};Ri.prototype.Jc=function(){return this.g.Jc()};function Si(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Nc()!=b&&a.g.$d(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Nc()&&a.g.$d(0)};function Ti(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){Ui(b,!1)})).Ca(.25)}Ti.prototype.release=function(){this.i.stop();for(var a=t(this.g),b=a.next();!b.done;b=a.next())b.value.release();this.g.clear()};function Ui(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function Vi(a){Pe.call(this);this.g=new Map;this.h=a}pa(Vi,Pe);Vi.prototype.release=function(){this.g.clear();Pe.prototype.release.call(this)};function Wi(a,b){var c=a.g.get(b);c||(c={lc:[],je:null,contentType:b},a.g.set(b,c));return c}function Xi(a,b,c){var d=Wi(a,b.contentType);Yi(a,d);a={Gd:b,position:c};d=d.lc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
300
+ Vi.prototype.j=function(a){for(var b=t(this.g.values()),c=b.next();!c.done;c=b.next()){c=c.value;a:{var d=c.lc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Gd;break a}}d=null}if(e=d)e=c.je,e=!(e===d||e&&d&&e.bandwidth==d.bandwidth&&e.audioSamplingRate==d.audioSamplingRate&&e.codecs==d.codecs&&e.contentType==d.contentType&&e.frameRate==d.frameRate&&e.height==d.height&&e.mimeType==d.mimeType&&e.channelsCount==d.channelsCount&&e.pixelAspectRatio==d.pixelAspectRatio&&e.width==d.width);
301
+ if(e)a:{e=a;f=d.contentType;if((f=this.h()[f])&&0<f.length){var g=f[f.length-1].end;if(e>=f[0].start&&e<g){e=!0;break a}}e=!1}e&&(c.je=d,JSON.stringify(d),c=new S("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Yi(a,b){var c=a.h()[b.contentType];if(c&&0<c.length){var d=c[0].start,e=c[c.length-1].end,f=b.lc;b.lc=f.filter(function(g,h){return g.position<=d&&h+1<f.length&&f[h+1].position<=d||g.position>=e?!1:!0})}else b.lc=[]};function Zi(a){Pe.call(this);var b=this;this.g=new Set;this.i=a;this.h=(new O(function(){for(var c=b.i(),d=t(b.g),e=d.next();!e.done;e=d.next())e=e.value,e.endTime<c.start&&(b.g["delete"](e),e=new S("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}pa(Zi,Pe);Zi.prototype.release=function(){this.g.clear();this.h.stop();Pe.prototype.release.call(this)};function $i(a){Pe.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{qb:null,pb:aj,ib:function(c,d){return bj(b,"enter",c,d)}},{qb:cj,pb:aj,ib:function(c,d){return bj(b,"enter",c,d)}},{qb:dj,pb:aj,ib:function(c,d){return bj(b,"enter",c,d)}},{qb:aj,pb:cj,ib:function(c,d){return bj(b,"exit",c,d)}},{qb:aj,pb:dj,ib:function(c,d){return bj(b,"exit",c,d)}},{qb:cj,pb:dj,ib:function(c,d){return bj(b,"skip",c,d)}},{qb:dj,pb:cj,ib:function(c,d){return bj(b,"skip",c,d)}}];this.h=new gf;this.h.B(this.i,"regionremove",
302
+ function(c){b.g["delete"](c.region)})}pa($i,Pe);$i.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;Pe.prototype.release.call(this)};$i.prototype.j=function(a,b){for(var c=t(this.i.g),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.g.get(d),f=a<d.startTime?cj:a>d.endTime?dj:aj;this.g.set(d,f);for(var g=t(this.l),h=g.next();!h.done;h=g.next())h=h.value,h.qb==e&&h.pb==f&&h.ib(d,b)}};
303
+ function bj(a,b,c,d){b=new S(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var cj=1,aj=2,dj=3;function ej(a,b,c,d,e){a=Ye(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function fj(a,b){var c=this;this.g=b;this.m=a;this.i=null;this.u=1;this.o=this.l=null;this.h=new Map;this.C=!1;this.D=null;this.s=!1;this.j=new ef(function(){return gj(c)})}fj.prototype.destroy=function(){return this.j.destroy()};function gj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.h.values());for(d=c.next();!d.done;d=c.next())e=d.value,hj(e),b.push(ij(e));return u(f,Promise.all(b),2)}a.h.clear();a.g=null;a.m=null;a.i=null;z(f)})}
304
+ fj.prototype.configure=function(a){this.i=a;this.D=new Ee({maxAttempts:Math.max(a.retryParameters.maxAttempts,2),baseDelay:a.retryParameters.baseDelay,backoffFactor:a.retryParameters.backoffFactor,fuzzFactor:a.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)};fj.prototype.start=function(){var a=this;return K(function(b){if(1==b.g)return u(b,jj(a),2);ff(a.j);a.C=!0;z(b)})};
305
+ function kj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=mc,B(k,2),u(k,li(a.g.O,c.X),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Yc(b.mimeType,b.codecs);Yh(a.g.O,e,a.m.sequenceMode);f=a.g.O.m;if(g=f.isTextVisible()||a.i.alwaysStreamText)h=lj(b),a.h.set(c.X,h),mj(a,h,0);z(k)}})}function nj(a){var b=a.h.get(lc);b&&(hj(b),ij(b)["catch"](function(){}),a.h["delete"](lc));a.o=null}
306
+ function oj(a,b){var c=a.h.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.mb&&(pj(a,e,!1,0,!1),c.mb=d)}else if(d=c.mb)c.mb=null,pj(a,d,!0,0,!1)}}function qj(a,b,c,d,e){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;a.l=b;a.C&&(b.video&&pj(a,b.video,c,d,e),b.audio&&pj(a,b.audio,c,d,e))}function rj(a,b){a.o=b;a.C&&pj(a,b,!0,0,!1)}
307
+ function pj(a,b,c,d,e){var f=a.h.get(b.type);f||b.type!=lc?f&&(f.mb&&(b.trickModeVideo?(f.mb=b,b=b.trickModeVideo):f.mb=null),f.stream!=b||e)&&(b.type==lc&&Yh(a.g.O,Yc(b.mimeType,b.codecs),a.m.sequenceMode),f.stream.closeSegmentIndex&&f.stream.closeSegmentIndex(),f.stream=b,f.ba=null,c&&(f.Zb?f.ad=!0:f.Ha?(f.ob=!0,f.Dc=d,f.ad=!0):(hj(f),sj(a,f,!0,d)["catch"](function(g){if(a.g)a.g.onError(g)}))),tj(a,f)["catch"](function(g){if(a.g)a.g.onError(g)})):kj(a,b)}
308
+ function tj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.sa)return e["return"]();c=b.stream;d=b.sa;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.sa!=d||b.stream!=c)return e["return"]();var f=a.g.Mc();var g=ci(a.g.O,b.type),h=b.stream.segmentIndex.find(b.za?b.za.endTime:f),k=null==h?null:b.stream.segmentIndex.get(h);h=k?k.la?k.la-k.Ba:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.la?k.la-k.Ba:null)||0),k=a.g.getBandwidthEstimate(),
307
309
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal)||b.sa.h.g>h?!0:!1):f=!1;f&&b.sa.abort();z(e)})}
308
- gj.prototype.pc=function(){for(var a=this.g.Lc(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);c.ba=null;var e=this.g.O;d==lc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=ci(e,d),e=Rh(e,a));if(!e){(null!=di(this.g.O,d)||c.Ha)&&vj(this,c);c.sa&&(c.sa.abort(),c.sa=null);if(d===lc)for(d=this.g.O.C.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,yh(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())th(e.value);c.pc=!0}}};
309
- function vj(a,b){b.Zb||b.ob||(b.Ha?(b.ob=!0,b.Cc=0):null==bi(a.g.O,b.type)?null==b.Ka&&nj(a,b,0):(ij(b),tj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
310
- function kj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){if(1==p.g){b=mc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.bb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.va,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.O;f=a.i.forceTransmuxTS;return u(p,e.init(c,f,a.m.sequenceMode),2)}gf(a.j);var n=a.m.presentationTimeline.getDuration();Infinity>n?a.g.O.Ia(n):a.g.O.Ia(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),
311
- a.h.has(k)||(m=mj(l),a.h.set(k,m),nj(a,m,0));z(p)})}function mj(a){return{stream:a,type:a.type,ba:null,za:null,Pc:null,zd:null,yd:null,xd:null,mb:null,endOfStream:!1,Ha:!1,Ka:null,ob:!1,Cc:0,$c:!1,Zb:!1,pc:!0,Pd:!1,fc:!1,sa:null}}
312
- function wj(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:gf(a.j);if(b.Ha||null==b.Ka||b.Zb)return h["return"]();b.Ka=null;if(!b.ob){h.A(2);break}return u(h,tj(a,b,b.$c,b.Cc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Ka&&nj(a,b,0),h["return"]();case 4:B(h,6);d=xj(a,b);null!=d&&(nj(a,b,d),b.fc=!1);va(h,7);break;case 6:return e=
313
- F(h),u(h,yj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.h.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.O.endOfStream(),10);case 10:gf(a.j),g=a.g.O.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),z(h)}})}
314
- function xj(a,b){if(zj(b))return ki(a.g.O,b.stream.originalId||""),null;b.type==lc&&li(a.g.O);var c=a.g.Lc(),d=b.za?b.za.endTime:c,e=ei(a.g.O,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(lc))&&zj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=di(a.g.O,b.type);e=Aj(a,b,c,e);if(!e)return a.i.updateIntervalSeconds;f=Infinity;
315
- var g=Array.from(a.h.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,zj(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.za?h.za.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;Bj(a,b,c,e)["catch"](function(){});return null}
316
- function Aj(a,b,c,d){if(b.ba)return b.ba.current();if(b.za||d)return b.ba=b.stream.segmentIndex.zb(b.za?b.za.endTime:d),b.ba&&b.ba.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.zb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.zb(c),e=b.ba&&b.ba.next().value);return e}
317
- function Bj(a,b,c,d){var e,f,g,h,k,l,m,p,n,q,v,y;return K(function(x){switch(x.g){case 1:return e=mc,f=b.stream,g=b.ba,b.Ha=!0,B(x,2),u(x,Cj(a,b,d),4);case 4:gf(a.j);if(a.s)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h)return p=new Uint8Array(0),n=function(w){var D,C,A;return K(function(G){gf(a.j);if(a.s)return G["return"]();p=Dj(p,w);D=!1;C=0;(new og).box("mdat",function(E){C=E.size+E.start;D=!0}).parse(p,!1,!0);if(!D)return G.A(0);
318
- A=p.subarray(0,C);p=p.subarray(C);return u(G,Ej(a,b,c,f,d,A),0)})},u(x,Fj(a,b,d,n),6);l=Fj(a,b,d);return u(x,l,7);case 7:return m=x.h,gf(a.j),a.s?x["return"]():b.ob?(b.Ha=!1,nj(a,b,0),x["return"]()):u(x,Ej(a,b,c,f,d,m),6);case 6:gf(a.j);if(a.s)return x["return"]();b.za=d;g.next();b.Ha=!1;b.Pd=!1;q=a.g.O.Ya();v=q[b.type];$a(JSON.stringify(v));b.ob||a.g.Ld();nj(a,b,0);va(x,0);break;case 2:y=F(x);gf(a.j,y);if(a.s)return x["return"]();b.Ha=!1;if(7001==y.code)b.Ha=!1,b.Ka=null,nj(a,b,0),x.A(0);else if(b.type==
319
- e.X&&a.i.ignoreTextStreamFailures)a.h["delete"](e.X),x.A(0);else if(3017==y.code)Gj(a,b,y),x.A(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Ha=!1,b.Ka=null,nj(a,b,1),x.A(0);else return b.fc=!0,y.severity=2,u(x,yj(a,y),0)}})}function Dj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
320
- function Gj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Pd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.fc=!0;a.s=!0;a.g.onError(c);return}b.Pd=!0}nj(a,b,4)}
321
- function Cj(a,b,c){var d,e,f,g,h,k,l;return K(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.zd||e!=b.yd||f!=b.xd)h=function(){var p;return K(function(n){if(1==n.g)return B(n,2),b.yd=e,b.xd=f,b.zd=g,u(n,ni(a.g.O,b.type,g,e,f,a.m.sequenceMode),4);if(2!=n.g)return va(n,0);p=F(n);b.yd=null;b.xd=null;b.zd=null;throw p;})},d.push(h());!Lh(c.i,b.Pc)&&(b.Pc=c.i)&&(k=Fj(a,b,c.i),l=function(){var p,n,q;return K(function(v){switch(v.g){case 1:return B(v,
322
- 2),u(v,k,4);case 4:return p=v.h,gf(a.j),n=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,fi(a.g.O,b.type,p,null,n),5);case 5:va(v,0);break;case 2:throw q=F(v),b.Pc=null,q;}})},a.g.Hf(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
323
- function Ej(a,b,c,d,e,f){var g,h;return K(function(k){if(1==k.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes)&&(new og).T("emsg",function(l){var m=d.emsgSchemeIdUris;if(0===l.version){var p=l.reader.mc();var n=l.reader.mc();var q=l.reader.N();var v=l.reader.N();var y=l.reader.N();var x=l.reader.N();var w=e.startTime+v/q}else q=l.reader.N(),w=l.reader.Hb()/q+e.timestampOffset,v=w-e.startTime,y=l.reader.N(),x=l.reader.N(),
324
- p=l.reader.mc(),n=l.reader.mc();l=l.reader.Za(l.reader.P.byteLength-l.reader.$());if(m&&m.includes(p)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g.If():(m=(new Map).set("detail",{startTime:w,endTime:w+y/q,schemeIdUri:p,value:n,timescale:q,presentationTimeDelta:v,eventDuration:y,id:x,messageData:l}),m=new S(Hj,m),a.g.onEvent(m))}).parse(f),u(k,Ij(a,b,c),2);if(3!=k.g)return gf(a.j),h=b.pc,b.pc=!1,u(k,fi(a.g.O,b.type,f,e,g,h),3);gf(a.j);z(k)})}
325
- function Ij(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=bi(a.g.O,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.O.remove(b.type,e,e+g),2)}gf(a.j);z(h)})}function zj(a){return a&&a.type==lc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
326
- function Fj(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=ef,f=fj(c.ya(),c.Ba,c.la,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Kh,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.kb.request(e,f),b.sa=h,u(l,h.promise,2);k=l.h;b.sa=null;return l["return"](k.data)})}
327
- function tj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.ob=!1,b.$c=!1,b.Cc=0,b.Zb=!0,b.za=null,b.Pc=null,b.ba=null,d?(e=a.g.Lc(),f=a.g.O.getDuration(),u(g,a.g.O.remove(b.type,e+d,f),3)):u(g,mi(a.g.O,b.type),4);if(3!=g.g)return gf(a.j),c?u(g,a.g.O.flush(b.type),3):g.A(3);gf(a.j);b.Zb=!1;b.endOfStream=!1;nj(a,b,0);z(g)})}
328
- function nj(a,b,c){var d=b.type;if(d!=lc||a.h.has(d))b.Ka=(new pc(function(){var e;return K(function(f){if(1==f.g)return B(f,2),u(f,wj(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).S(c)}function ij(a){null!=a.Ka&&(a.Ka.stop(),a.Ka=null)}function jj(a){return K(function(b){return a.sa?u(b,a.sa.abort(),0):b.A(0)})}function yj(a,b){return K(function(c){if(1==c.g)return u(c,He(a.D),2);gf(a.j);a.g.onError(b);b.handled||a.i.failureCallback(b);z(c)})};function Jj(a,b){var c=Kj(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Lj(d)});this.s=new ff(function(){return Mj(d)})}Jj.prototype.destroy=function(){return this.s.destroy()};function Mj(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Nj(a),u(e,a.u,2);a.g&&a.g.Ga.lb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ga.lb();a.g=null;a.m=[];a.j=null;z(e)})}
329
- function Oj(a,b){var c={Fb:function(){},Rc:function(){},lb:function(){},onError:function(){},Tc:function(){},Rg:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();Nj(a);return c}
330
- function Lj(a){return K(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.hb)var c=!1;else{a.g&&(a.g.Ga.lb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Fb(),a.g={node:d.node,payload:d.payload,hb:d.hb,Ga:c.Ga}):c.Ga.Tc();c=!0}c?c=Promise.resolve():a.g?c=Pj(a):(a.j.Gf(a.i),a.o=new nc,c=a.o);b=u(b,c,1)}return b})}
331
- function Pj(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.mf(a.i,a.l,a.g.node,a.g.payload),B(d,2),a.h=a.j.Ye(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ga.Rc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ga.lb();else a.g.Ga.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Nj(a){a.o&&(a.o.resolve(),a.o=null)};function Qj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=Qj.prototype;r.remove=function(a,b){if(!this.g)return!1;Rj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
332
- r.append=function(a){function b(g){var h=[],k=700<=g.fontWeight,l="italic"==g.fontStyle,m=g.textDecoration.includes("underline");k&&h.push("b");l&&h.push("i");m&&h.push("u");k=h.reduce(function(p,n){return p+"<"+n+">"},"");h=h.reduceRight(function(p,n){return p+"</"+n+">"},"");return g.lineBreak?"\n":g.nestedCues.length?g.nestedCues.map(b).join(""):k+g.payload+h}var c=a.map(function(g){if(g.nestedCues.length){var h=g.clone();h.nestedCues=[];h.payload=b(g);return h}return g}),d=[];a=this.g.cues?Array.from(this.g.cues):
333
- [];var e={};c=t(c);for(var f=c.next();!f.done;e={rb:e.rb},f=c.next())e.rb=f.value,a.some(function(g){return function(h){return h.startTime==g.rb.startTime&&h.endTime==g.rb.endTime&&h.text==g.rb.payload?!0:!1}}(e))||(f=Sj(e.rb))&&d.push(f);a=d.slice().sort(function(g,h){return g.startTime!=h.startTime?g.startTime-h.startTime:g.endTime!=h.endTime?g.endTime-h.startTime:"line"in VTTCue.prototype?d.indexOf(h)-d.indexOf(g):d.indexOf(g)-d.indexOf(h)});a=t(a);for(e=a.next();!e.done;e=a.next())this.g.addCue(e.value)};
334
- r.destroy=function(){this.g&&(Rj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
335
- function Sj(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
336
- function Rj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Qj);Qj.prototype.setTextVisibility=Qj.prototype.setTextVisibility;Qj.prototype.isTextVisible=Qj.prototype.isTextVisible;Qj.prototype.destroy=Qj.prototype.destroy;Qj.prototype.append=Qj.prototype.append;Qj.prototype.remove=Qj.prototype.remove;function Tj(){}function Uj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Tj);Tj.removeAllChildren=Uj;function Vj(a,b){var c=this;this.j=!1;this.i=[];this.u=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.s=(new O(function(){Wj(c)})).Ca(.25);this.h=new Map;this.o=new hf;this.o.B(document,"fullscreenchange",function(){Wj(c,!0)});this.l=null;"ResizeObserver"in
337
- window&&(this.l=new ResizeObserver(function(){Wj(c,!0)}),this.l.observe(this.g))}r=Vj.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={vc:c.vc},d=a.next())c.vc=d.value,b.some(function(e){return function(f){return tb(f,e.vc)}}(c))||this.i.push(c.vc);Wj(this)};
338
- r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.s&&this.s.stop();this.h.clear();this.o&&(this.o.release(),this.o=null);this.l&&(this.l.disconnect(),this.l=null)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Wj(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
339
- function Xj(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,p=l?l.Je:null;l&&(g.push(l.he),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Yj(a,k,e),l=a.h.get(k),p=l.Je,f=!0));0<k.nestedCues.length&&p&&Xj(a,k.nestedCues,p,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())c.removeChild(e.value);h.sort(function(n,q){return n.startTime!=q.startTime?n.startTime-q.startTime:n.endTime-q.endTime});
340
- h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),c.appendChild(d.he)}}function Wj(a,b){if(a.g){var c=a.u.currentTime;(!a.j||(void 0===b?0:b))&&0<a.h.size&&(Uj(a.g),a.h.clear());if(a.j){for(var d=new Map,e=t(a.h.keys()),f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Xj(a,a.i,a.g,c,[])}}}
341
- function Yj(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Zj(a,f,b,c,d);c=f;d&&(c=document.createElement("span"),c.classList.add("shaka-text-wrapper"),c.style.backgroundColor=b.backgroundColor,f.appendChild(c));a.h.set(b,{he:f,Je:c})}
342
- function Zj(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=ak(c.linePadding,c,a.m);f.paddingRight=ak(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
343
- "contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=bk(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?
344
- "center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=ak(c.fontSize,c,a.m);c.line?1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height=
345
- "100%",c.lineAlign==pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%"))):c.region&&c.region.id&&(a=c.region.widthUnits==Ab?"%":"px",d=c.region.viewportAnchorUnits==Ab?"%":"px",f.height=c.region.height+(c.region.heightUnits==Ab?"%":"px"),f.width=c.region.width+a,f.position="absolute",f.top=c.region.viewportAnchorY+d,f.left=c.region.viewportAnchorX+d);f.lineHeight=c.lineHeight;c.position&&(c.writingMode==nb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat=
346
- "left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&(c.writingMode==nb?f.width=c.size+"%":f.height=c.size+"%")}
347
- function ak(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function bk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Vj);Vj.prototype.setTextVisibility=Vj.prototype.setTextVisibility;
348
- Vj.prototype.isTextVisible=Vj.prototype.isTextVisible;Vj.prototype.remove=Vj.prototype.remove;Vj.prototype.destroy=Vj.prototype.destroy;Vj.prototype.append=Vj.prototype.append;function ck(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,p=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");p&&k.push("u");l=k.reduce(function(n,q){return n+"<"+q+">"},
310
+ fj.prototype.qc=function(){for(var a=this.g.Mc(),b=t(this.h.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.h.get(d);c.ba=null;var e=this.g.O;d==lc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=bi(e,d),e=Qh(e,a));if(!e){(null!=ci(this.g.O,d)||c.Ha)&&uj(this,c);c.sa&&(c.sa.abort(),c.sa=null);if(d===lc)for(d=this.g.O.C.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,xh(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())sh(e.value);c.qc=!0}}};
311
+ function uj(a,b){b.Zb||b.ob||(b.Ha?(b.ob=!0,b.Dc=0):null==ai(a.g.O,b.type)?null==b.Ka&&mj(a,b,0):(hj(b),sj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
312
+ function jj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){if(1==p.g){b=mc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.bb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.va,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.O;f=a.i.forceTransmuxTS;return u(p,e.init(c,f,a.m.sequenceMode),2)}ff(a.j);var n=a.m.presentationTimeline.getDuration();Infinity>n?a.g.O.Ia(n):a.g.O.Ia(Math.pow(2,32));g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),
313
+ a.h.has(k)||(m=lj(l),a.h.set(k,m),mj(a,m,0));z(p)})}function lj(a){return{stream:a,type:a.type,ba:null,za:null,Qc:null,Cd:null,Bd:null,zd:null,mb:null,endOfStream:!1,Ha:!1,Ka:null,ob:!1,Dc:0,ad:!1,Zb:!1,qc:!0,Rd:!1,fc:!1,sa:null}}
314
+ function vj(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:ff(a.j);if(b.Ha||null==b.Ka||b.Zb)return h["return"]();b.Ka=null;if(!b.ob){h.A(2);break}return u(h,sj(a,b,b.ad,b.Dc),3);case 3:return h["return"]();case 2:if(b.stream.segmentIndex){h.A(4);break}c=b.stream;return u(h,b.stream.createSegmentIndex(),5);case 5:if(c!=b.stream)return c.closeSegmentIndex&&c.closeSegmentIndex(),null==b.Ka&&mj(a,b,0),h["return"]();case 4:B(h,6);d=wj(a,b);null!=d&&(mj(a,b,d),b.fc=!1);va(h,7);break;case 6:return e=
315
+ F(h),u(h,xj(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.h.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.O.endOfStream(),10);case 10:ff(a.j),g=a.g.O.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),z(h)}})}
316
+ function wj(a,b){if(yj(b))return ji(a.g.O,b.stream.originalId||""),null;b.type==lc&&ki(a.g.O);var c=a.g.Mc(),d=b.za?b.za.endTime:c,e=di(a.g.O,b.type,c),f=Math.max(a.m.minBufferTime||0,a.i.rebufferingGoal,a.i.bufferingGoal)*a.u;if(1E-6>a.m.presentationTimeline.getDuration()-d)return b.endOfStream=!0,"video"==b.type&&(c=a.h.get(lc))&&yj(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.i.updateIntervalSeconds/2;e=ci(a.g.O,b.type);e=zj(a,b,c,e);if(!e)return a.i.updateIntervalSeconds;f=Infinity;
317
+ var g=Array.from(a.h.values());g=t(g);for(var h=g.next();!h.done;h=g.next())h=h.value,yj(h)||h.ba&&!h.ba.current()||(f=Math.min(f,h.za?h.za.endTime:c));if(d>=f+a.m.presentationTimeline.g)return a.i.updateIntervalSeconds;Aj(a,b,c,e)["catch"](function(){});return null}
318
+ function zj(a,b,c,d){if(b.ba)return b.ba.current();if(b.za||d)return b.ba=b.stream.segmentIndex.zb(b.za?b.za.endTime:d),b.ba&&b.ba.next().value;a=a.i.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.zb(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.zb(c),e=b.ba&&b.ba.next().value);return e}
319
+ function Aj(a,b,c,d){var e,f,g,h,k,l,m,p,n,q,v,y;return K(function(x){switch(x.g){case 1:return e=mc,f=b.stream,g=b.ba,b.Ha=!0,B(x,2),u(x,Bj(a,b,d),4);case 4:ff(a.j);if(a.s)return x["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.i.lowLatencyMode&&k&&h)return p=new Uint8Array(0),n=function(w){var D,C,A;return K(function(G){ff(a.j);if(a.s)return G["return"]();p=Cj(p,w);D=!1;C=0;(new ng).box("mdat",function(E){C=E.size+E.start;D=!0}).parse(p,!1,!0);if(!D)return G.A(0);
320
+ A=p.subarray(0,C);p=p.subarray(C);return u(G,Dj(a,b,c,f,d,A),0)})},u(x,Ej(a,b,d,n),6);l=Ej(a,b,d);return u(x,l,7);case 7:return m=x.h,ff(a.j),a.s?x["return"]():b.ob?(b.Ha=!1,mj(a,b,0),x["return"]()):u(x,Dj(a,b,c,f,d,m),6);case 6:ff(a.j);if(a.s)return x["return"]();b.za=d;g.next();b.Ha=!1;b.Rd=!1;q=a.g.O.Ya();v=q[b.type];$a(JSON.stringify(v));b.ob||a.g.Nd();mj(a,b,0);va(x,0);break;case 2:y=F(x);ff(a.j,y);if(a.s)return x["return"]();b.Ha=!1;if(7001==y.code)b.Ha=!1,b.Ka=null,mj(a,b,0),x.A(0);else if(b.type==
321
+ e.X&&a.i.ignoreTextStreamFailures)a.h["delete"](e.X),x.A(0);else if(3017==y.code)Fj(a,b,y),x.A(0);else if(1001==y.code&&y.data&&404==y.data[1])b.Ha=!1,b.Ka=null,mj(a,b,1),x.A(0);else return b.fc=!0,y.severity=2,u(x,xj(a,y),0)}})}function Cj(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
322
+ function Fj(a,b,c){if(!Array.from(a.h.values()).some(function(e){return e!=b&&e.Rd})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.fc=!0;a.s=!0;a.g.onError(c);return}b.Rd=!0}mj(a,b,4)}
323
+ function Bj(a,b,c){var d,e,f,g,h,k,l;return K(function(m){d=[];e=Math.max(0,c.appendWindowStart-.1);f=c.appendWindowEnd+.01;g=c.timestampOffset;if(g!=b.Cd||e!=b.Bd||f!=b.zd)h=function(){var p;return K(function(n){if(1==n.g)return B(n,2),b.Bd=e,b.zd=f,b.Cd=g,u(n,mi(a.g.O,b.type,g,e,f,a.m.sequenceMode),4);if(2!=n.g)return va(n,0);p=F(n);b.Bd=null;b.zd=null;b.Cd=null;throw p;})},d.push(h());!Kh(c.i,b.Qc)&&(b.Qc=c.i)&&(k=Ej(a,b,c.i),l=function(){var p,n,q;return K(function(v){switch(v.g){case 1:return B(v,
324
+ 2),u(v,k,4);case 4:return p=v.h,ff(a.j),n=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,ei(a.g.O,b.type,p,null,n),5);case 5:va(v,0);break;case 2:throw q=F(v),b.Qc=null,q;}})},a.g.If(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
325
+ function Dj(a,b,c,d,e,f){var g,h;return K(function(k){if(1==k.g)return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.i.dispatchAllEmsgBoxes)&&(new ng).T("emsg",function(l){var m=d.emsgSchemeIdUris;if(0===l.version){var p=l.reader.mc();var n=l.reader.mc();var q=l.reader.N();var v=l.reader.N();var y=l.reader.N();var x=l.reader.N();var w=e.startTime+v/q}else q=l.reader.N(),w=l.reader.Hb()/q+e.timestampOffset,v=w-e.startTime,y=l.reader.N(),x=l.reader.N(),
326
+ p=l.reader.mc(),n=l.reader.mc();l=l.reader.Za(l.reader.P.byteLength-l.reader.$());if(m&&m.includes(p)||a.i.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g.Jf():(m=(new Map).set("detail",{startTime:w,endTime:w+y/q,schemeIdUri:p,value:n,timescale:q,presentationTimeDelta:v,eventDuration:y,id:x,messageData:l}),m=new S(Gj,m),a.g.onEvent(m))}).parse(f),u(k,Hj(a,b,c),2);if(3!=k.g)return ff(a.j),h=b.qc,b.qc=!1,u(k,ei(a.g.O,b.type,f,e,g,h),3);ff(a.j);z(k)})}
327
+ function Hj(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.i.bufferBehind,a.m.presentationTimeline.g);e=ai(a.g.O,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.O.remove(b.type,e,e+g),2)}ff(a.j);z(h)})}function yj(a){return a&&a.type==lc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
328
+ function Ej(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=df,f=ej(c.ya(),c.Ba,c.la,a.i.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof Jh,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.kb.request(e,f),b.sa=h,u(l,h.promise,2);k=l.h;b.sa=null;return l["return"](k.data)})}
329
+ function sj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.ob=!1,b.ad=!1,b.Dc=0,b.Zb=!0,b.za=null,b.Qc=null,b.ba=null,d?(e=a.g.Mc(),f=a.g.O.getDuration(),u(g,a.g.O.remove(b.type,e+d,f),3)):u(g,li(a.g.O,b.type),4);if(3!=g.g)return ff(a.j),c?u(g,a.g.O.flush(b.type),3):g.A(3);ff(a.j);b.Zb=!1;b.endOfStream=!1;mj(a,b,0);z(g)})}
330
+ function mj(a,b,c){var d=b.type;if(d!=lc||a.h.has(d))b.Ka=(new pc(function(){var e;return K(function(f){if(1==f.g)return B(f,2),u(f,vj(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);z(f)})})).S(c)}function hj(a){null!=a.Ka&&(a.Ka.stop(),a.Ka=null)}function ij(a){return K(function(b){return a.sa?u(b,a.sa.abort(),0):b.A(0)})}function xj(a,b){return K(function(c){if(1==c.g)return u(c,Ge(a.D),2);ff(a.j);a.g.onError(b);b.handled||a.i.failureCallback(b);z(c)})};function Ij(a,b){var c=Jj(),d=this;this.j=b;this.i=a;this.l=c;this.o=null;this.m=[];this.h=this.g=null;this.u=Promise.resolve().then(function(){return Kj(d)});this.s=new ef(function(){return Lj(d)})}Ij.prototype.destroy=function(){return this.s.destroy()};function Lj(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),Mj(a),u(e,a.u,2);a.g&&a.g.Ga.lb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ga.lb();a.g=null;a.m=[];a.j=null;z(e)})}
331
+ function Nj(a,b){var c={Fb:function(){},Sc:function(){},lb:function(){},onError:function(){},Uc:function(){},Sg:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();Mj(a);return c}
332
+ function Kj(a){return K(function(b){if(a.s.g)b=b.A(0);else{if(0==a.m.length||a.g&&!a.g.hb)var c=!1;else{a.g&&(a.g.Ga.lb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ga.Fb(),a.g={node:d.node,payload:d.payload,hb:d.hb,Ga:c.Ga}):c.Ga.Uc();c=!0}c?c=Promise.resolve():a.g?c=Oj(a):(a.j.Hf(a.i),a.o=new nc,c=a.o);b=u(b,c,1)}return b})}
333
+ function Oj(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.nf(a.i,a.l,a.g.node,a.g.payload),B(d,2),a.h=a.j.Ze(a.i,a.l,a.g.payload),u(d,a.h.promise,4);case 4:a.h=null;a.i==a.g.node&&(a.g.Ga.Sc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ga.lb();else a.g.Ga.onError(b);a.g=null;a.h=null;c=a;return u(d,a.j.handleError(a.l,b),5);case 5:c.i=d.h,z(d)}})}function Mj(a){a.o&&(a.o.resolve(),a.o=null)};function Pj(a){this.g=null;for(var b=t(Array.from(a.textTracks)),c=b.next();!c.done;c=b.next())c=c.value,c.mode="disabled","Shaka Player TextTrack"==c.label&&(this.g=c);this.g||(this.g=a.addTextTrack("subtitles","Shaka Player TextTrack"));this.g.mode="hidden"}r=Pj.prototype;r.remove=function(a,b){if(!this.g)return!1;Qj(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
334
+ r.append=function(a){function b(h,k){for(var l=t(h),m=l.next();!m.done;m=l.next())if(m=m.value,m.isContainer)b(m.nestedCues,k);else{var p=m.clone();p.nestedCues=[];p.payload=c(m);k.push(p)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,p=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");p&&k.push("u");l=k.reduce(function(n,q){return n+"<"+q+">"},"");k=k.reduceRight(function(n,q){return n+"</"+q+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(c).join(""):
335
+ l+h.payload+k}var d=b(a,[]),e=[];a=this.g.cues?Array.from(this.g.cues):[];var f={};d=t(d);for(var g=d.next();!g.done;f={rb:f.rb},g=d.next())f.rb=g.value,a.some(function(h){return function(k){return k.startTime==h.rb.startTime&&k.endTime==h.rb.endTime&&k.text==h.rb.payload?!0:!1}}(f))||(g=Rj(f.rb))&&e.push(g);a=e.slice().sort(function(h,k){return h.startTime!=k.startTime?h.startTime-k.startTime:h.endTime!=k.endTime?h.endTime-k.startTime:"line"in VTTCue.prototype?e.indexOf(k)-e.indexOf(h):e.indexOf(h)-
336
+ e.indexOf(k)});a=t(a);for(f=a.next();!f.done;f=a.next())this.g.addCue(f.value)};r.destroy=function(){this.g&&(Qj(this.g,function(){return!0}),this.g.mode="disabled");this.g=null;return Promise.resolve()};r.isTextVisible=function(){return"showing"==this.g.mode};r.setTextVisibility=function(a){this.g.mode=a?"showing":"hidden"};
337
+ function Rj(a){if(a.startTime>=a.endTime)return null;var b=new VTTCue(a.startTime,a.endTime,a.payload);b.lineAlign=a.lineAlign;b.positionAlign=a.positionAlign;a.size&&(b.size=a.size);try{b.align=a.textAlign}catch(c){}"center"==a.textAlign&&"center"!=b.align&&(b.align="middle");"vertical-lr"==a.writingMode?b.vertical="lr":"vertical-rl"==a.writingMode&&(b.vertical="rl");1==a.lineInterpretation&&(b.snapToLines=!1);null!=a.line&&(b.line=a.line);null!=a.position&&(b.position=a.position);return b}
338
+ function Qj(a,b){var c=a.mode;a.mode="showing"==c?"showing":"hidden";for(var d=t(Array.from(a.cues)),e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c}M("shaka.text.SimpleTextDisplayer",Pj);Pj.prototype.setTextVisibility=Pj.prototype.setTextVisibility;Pj.prototype.isTextVisible=Pj.prototype.isTextVisible;Pj.prototype.destroy=Pj.prototype.destroy;Pj.prototype.append=Pj.prototype.append;Pj.prototype.remove=Pj.prototype.remove;function Sj(){}function Tj(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",Sj);Sj.removeAllChildren=Tj;function Uj(a,b){var c=this;this.j=!1;this.i=[];this.C=a;this.m=b;this.g=document.createElement("div");this.g.classList.add("shaka-text-container");this.g.style.textAlign="center";this.g.style.display="flex";this.g.style.flexDirection="column";this.g.style.alignItems="center";this.g.style.justifyContent="flex-end";this.m.appendChild(this.g);this.u=(new O(function(){Vj(c)})).Ca(.25);this.h=new Map;this.s=new gf;this.s.B(document,"fullscreenchange",function(){Vj(c,!0)});this.l=null;"ResizeObserver"in
339
+ window&&(this.l=new ResizeObserver(function(){Vj(c,!0)}),this.l.observe(this.g));this.o=new Map}r=Uj.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={wc:c.wc},d=a.next())c.wc=d.value,b.some(function(e){return function(f){return tb(f,e.wc)}}(c))||this.i.push(c.wc);Vj(this)};
340
+ r.destroy=function(){this.m.removeChild(this.g);this.g=null;this.j=!1;this.i=[];this.u&&this.u.stop();this.h.clear();this.s&&(this.s.release(),this.s=null);this.l&&(this.l.disconnect(),this.l=null)};r.remove=function(a,b){if(!this.g)return!1;var c=this.i.length;this.i=this.i.filter(function(d){return d.startTime<a||d.endTime>=b});Vj(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
341
+ function Wj(a,b,c,d,e){var f=!1,g=[],h=[];b=t(b);for(var k=b.next();!k.done;k=b.next()){k=k.value;e.push(k);var l=a.h.get(k),m=k.startTime<=d&&k.endTime>d,p=l?l.Ke:null;l&&(g.push(l.rd),l.nc&&g.push(l.nc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Xj(a,k,e),l=a.h.get(k),p=l.Ke,f=!0));0<k.nestedCues.length&&p&&Wj(a,k.nestedCues,p,d,e);e.pop()}if(f){d=t(g);for(e=d.next();!e.done;e=d.next())e=e.value,e.parentElement&&e.parentElement.removeChild(e);h.sort(function(n,q){return n.startTime!=q.startTime?
342
+ n.startTime-q.startTime:n.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.nc?(c.appendChild(d.nc),d.nc.appendChild(d.rd)):c.appendChild(d.rd)}}function Vj(a,b){if(a.g){var c=a.C.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.o.values()),e=d.next();!e.done;e=d.next())Tj(e.value);Tj(a.g);a.h.clear();a.o.clear()}if(a.j){d=new Map;e=t(a.h.keys());for(var f=e.next();!f.done;f=e.next())f=f.value,d.set(f,a.h.get(f));Wj(a,a.i,a.g,c,[])}}}
343
+ function Xj(a,b,c){var d=1<c.length,e=d?"span":"div";b.lineBreak&&(e="br");d=!d&&0<b.nestedCues.length;var f=document.createElement(e);"br"!=e&&Yj(a,f,b,c,d);c=null;if(b.region&&b.region.id)if(c=b.region,a.o.has(c.id))c=a.o.get(c.id);else{e=document.createElement("span");var g=c.heightUnits==Ab?"%":"px",h=c.widthUnits==Ab?"%":"px",k=c.viewportAnchorUnits==Ab?"%":"px";e.id="shaka-text-region---"+c.id;e.classList.add("shaka-text-region");e.style.height=c.height+g;e.style.width=c.width+h;e.style.position=
344
+ "absolute";e.style.top=c.viewportAnchorY+k;e.style.left=c.viewportAnchorX+k;e.style.display="flex";e.style.flexDirection="column";e.style.alignItems="center";e.style.justifyContent="before"==b.displayAlign?"flex-start":"center"==b.displayAlign?"center":"flex-end";a.o.set(c.id,e);c=e}e=f;d&&(e=document.createElement("span"),e.classList.add("shaka-text-wrapper"),e.style.backgroundColor=b.backgroundColor,f.appendChild(e));a.h.set(b,{rd:f,Ke:e,nc:c})}
345
+ function Yj(a,b,c,d,e){var f=b.style,g=0==c.nestedCues.length,h=1<d.length;f.whiteSpace="pre-wrap";var k=c.payload.replace(/\s+$/g,function(m){return"\u00a0".repeat(m.length)});f.webkitTextStrokeColor=c.textStrokeColor;f.webkitTextStrokeWidth=c.textStrokeWidth;f.color=c.color;f.direction=c.direction;f.opacity=c.opacity;f.paddingLeft=Zj(c.linePadding,c,a.m);f.paddingRight=Zj(c.linePadding,c,a.m);if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat="no-repeat",f.backgroundSize=
346
+ "contain",f.backgroundPosition="center";else{if(c.nestedCues.length)var l=b;else l=document.createElement("span"),b.appendChild(l);c.border&&(l.style.border=c.border);e||((b=ak(d,function(m){return m.backgroundColor}))?l.style.backgroundColor=b:k&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)"));k&&(l.textContent=k)}h&&!d[d.length-1].isContainer?f.display="inline":(f.display="flex",f.flexDirection="column",f.alignItems="center",f.justifyContent="before"==c.displayAlign?"flex-start":"center"==c.displayAlign?
347
+ "center":"flex-end");g||(f.margin="0");f.fontFamily=c.fontFamily;f.fontWeight=c.fontWeight.toString();f.fontStyle=c.fontStyle;f.letterSpacing=c.letterSpacing;f.fontSize=Zj(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==nb?(f.width="100%",c.lineAlign==pb?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==pb?f.left=c.line+"%":"end"==c.lineAlign&&(f.right=c.line+"%")):(f.height=
348
+ "100%",c.lineAlign==pb?f.right=c.line+"%":"end"==c.lineAlign&&(f.left=c.line+"%")));f.lineHeight=c.lineHeight;c.position&&(c.writingMode==nb?f.paddingLeft=c.position:f.paddingTop=c.position);"line-left"==c.positionAlign?f.cssFloat="left":"line-right"==c.positionAlign&&(f.cssFloat="right");f.textAlign=c.textAlign;f.textDecoration=c.textDecoration.join(" ");f.writingMode=c.writingMode;"writingMode"in document.documentElement.style&&f.writingMode==c.writingMode||(f.webkitWritingMode=c.writingMode);c.size&&
349
+ (c.writingMode==nb?f.width=c.size+"%":f.height=c.size+"%")}function Zj(a,b,c){var d=(d=(new RegExp(/(\d*\.?\d+)([a-z]+|%+)/)).exec(a))?{value:Number(d[1]),unit:d[2]}:null;if(!d)return a;var e=d.value;switch(d.unit){case "%":return e/100*c.clientHeight/b.cellResolution.rows+"px";case "c":return c.clientHeight*e/b.cellResolution.rows+"px";default:return a}}function ak(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return d}return null}M("shaka.text.UITextDisplayer",Uj);
350
+ Uj.prototype.setTextVisibility=Uj.prototype.setTextVisibility;Uj.prototype.isTextVisible=Uj.prototype.isTextVisible;Uj.prototype.remove=Uj.prototype.remove;Uj.prototype.destroy=Uj.prototype.destroy;Uj.prototype.append=Uj.prototype.append;function bk(a,b){function c(h){for(var k=h,l=t(b),m=l.next();!m.done;m=l.next())m=m.value,m.end&&m.start<h&&(k+=m.end-m.start);h=Math.floor(k/3600);l=Math.floor(k/60%60);m=Math.floor(k%60);k=Math.floor(1E3*k%1E3);return(10>h?"0":"")+h+":"+(10>l?"0":"")+l+":"+(10>m?"0":"")+m+"."+(100>k?10>k?"00":"0":"")+k}function d(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,p=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");p&&k.push("u");l=k.reduce(function(n,q){return n+"<"+q+">"},
349
351
  "");k=k.reduceRight(function(n,q){return n+"</"+q+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(d).join(""):l+h.payload+k}var e=a.map(function(h){if(h.nestedCues.length){var k=h.clone();k.nestedCues=[];k.payload=d(h);return k}return h}),f="WEBVTT\n\n";e=t(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f+=c(g.startTime)+" --\x3e "+c(g.endTime)+function(h){var k=[];switch(h.textAlign){case "left":k.push("align:left");break;case "right":k.push("align:right");break;case mb:k.push("align:middle");
350
- break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function dk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function ek(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?fk:gk};d.ot=hk(c);var e=d.ot===ik||d.ot===jk||d.ot===kk||d.ot===lk;e&&(d.bl=mk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==lk&&(d.tb=nk(a,d.ot)/1E3);ok(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
351
- function pk(a,b,c){try{if(!a.g.enabled)return b;var d=qk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=kk;break a;case "application/x-mpegurl":e=rk;break a}e=void 0}d.ot=e;d.su=!0;var f=sk(d);return tk(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function qk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
352
- function ok(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,qk(a));c.pr=a.h.Kc();var e=c.ot===ik||c.ot===kk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=uk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=sk(c);f&&(b.uris=b.uris.map(function(g){return tk(g,f)}))}}}
353
- function hk(a){var b=a.type;if(a.init)return vk;if("video"==b)return a.codecs.includes(",")?kk:ik;if("audio"==b)return jk;if("text"==b)return"application/mp4"===a.mimeType?lk:wk}function mk(a,b){var c=a.h.Ya()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
354
- function nk(a,b){var c=a.h.gb();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case ik:return d.videoBandwidth||NaN;case jk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
355
- function sk(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
356
- l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function uk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=sk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
357
- function tk(a,b){if(!b||a.includes("offline:"))return a;var c=new Nb(a);c.g.set("CMCD",b);return c.toString()}var rk="m",jk="a",ik="v",kk="av",vk="i",wk="c",lk="tt",gk="v",fk="l";M("shaka.util.CmcdManager.StreamingFormat",{mg:"d",tg:"h",Dg:"s",zg:"o"});function xk(){}
358
- function yk(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Re(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Re(l)),k=yk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
359
- k),g=!1)}return g}function zk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function Ak(a,b){return a&&b}M("shaka.util.ConfigUtils",xk);xk.convertToConfigObject=zk;xk.mergeConfigObjects=yk;function Bk(){}
360
- function Ck(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Ge(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return Ak([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Ge(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",
352
+ break;case "start":k.push("align:start");break;case "end":k.push("align:end")}switch(h.writingMode){case "vertical-lr":k.push("vertical:lr");break;case "vertical-rl":k.push("vertical:rl")}return k.length?" "+k.join(" "):""}(g)+"\n",f+=g.payload+"\n\n";return f}M("shaka.text.WebVttGenerator",function(){});function ck(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function dk(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.U()?ek:fk};d.ot=gk(c);var e=d.ot===hk||d.ot===ik||d.ot===jk||d.ot===kk;e&&(d.bl=lk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==kk&&(d.tb=mk(a,d.ot)/1E3);nk(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
353
+ function ok(a,b,c){try{if(!a.g.enabled)return b;var d=pk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=jk;break a;case "application/x-mpegurl":e=qk;break a}e=void 0}d.ot=e;d.su=!0;var f=rk(d);return sk(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function pk(a){a.j||(a.j=a.g.sessionId||window.crypto.randomUUID());return{v:1,sf:a.o,sid:a.j,cid:a.g.contentId,mtp:a.h.getBandwidthEstimate()/1E3}}
354
+ function nk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,pk(a));c.pr=a.h.Lc();var e=c.ot===hk||c.ot===jk;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=tk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=rk(c);f&&(b.uris=b.uris.map(function(g){return sk(g,f)}))}}}
355
+ function gk(a){var b=a.type;if(a.init)return uk;if("video"==b)return a.codecs.includes(",")?jk:hk;if("audio"==b)return ik;if("text"==b)return"application/mp4"===a.mimeType?kk:vk}function lk(a,b){var c=a.h.Ya()[b];if(!c.length)return NaN;var d=a.h.getCurrentTime();return(c=c.find(function(e){return e.start<=d&&e.end>=d}))?1E3*(c.end-d):NaN}
356
+ function mk(a,b){var c=a.h.gb();if(!c.length)return NaN;var d=c[0];c=t(c);for(var e=c.next();!e.done;e=c.next())e=e.value,"variant"===e.type&&e.bandwidth>d.bandwidth&&(d=e);switch(b){case hk:return d.videoBandwidth||NaN;case ik:return d.audioBandwidth||NaN;default:return d.bandwidth}}
357
+ function rk(a){function b(p){return 100*c(p/100)}function c(p){return Math.round(p)}function d(p){return!Number.isNaN(p)&&null!=p&&""!==p&&!1!==p}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(p){return encodeURIComponent(p)},rtp:b,tb:c},g=Object.keys(a||{}).sort();g=t(g);for(var h=g.next();!h.done;h=g.next()){h=h.value;var k=a[h];if(d(k)&&("v"!==h||1!==k)&&("pr"!=h||1!==k)){var l=f[h];l&&(k=l(k));l=typeof k;var m=void 0;m="string"===l&&"ot"!==h&&"sf"!==h&&"st"!==h?h+"="+JSON.stringify(k):"boolean"===
358
+ l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function tk(a){var b=Object.keys(a),c={},d=["Object","Request","Session","Status"],e=[{},{},{},{}],f={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};b=t(b);for(var g=b.next();!g.done;g=b.next())g=g.value,e[null!=f[g]?f[g]:1][g]=a[g];for(a=0;a<e.length;a++)(f=rk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
359
+ function sk(a,b){if(!b||a.includes("offline:"))return a;var c=new Nb(a);c.g.set("CMCD",b);return c.toString()}var qk="m",ik="a",hk="v",jk="av",uk="i",vk="c",kk="tt",fk="v",ek="l";M("shaka.util.CmcdManager.StreamingFormat",{ng:"d",ug:"h",Eg:"s",Ag:"o"});function wk(){}
360
+ function xk(a,b,c,d,e){var f=e in d,g=!0,h;for(h in b){var k=e+"."+h,l=f?d[e]:c[h];f||h in c?void 0===b[h]?void 0===l||f?delete a[h]:a[h]=Qe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Qe(l)),k=xk(a[h],b[h],l,d,k),g=g&&k):typeof b[h]!=typeof l||null==b[h]||"function"!=typeof b[h]&&b[h].constructor!=l.constructor?(Ua("Invalid config, wrong type for "+k),g=!1):("function"==typeof c[h]&&c[h].length!=b[h].length&&Va("Unexpected number of arguments for "+k),a[h]=b[h]):(Ua("Invalid config, unrecognized key "+
361
+ k),g=!1)}return g}function yk(a,b){for(var c={},d=c,e=0,f=0;;){e=a.indexOf(".",e);if(0>e)break;if(0==e||"\\"!=a[e-1])f=a.substring(f,e).replace(/\\\./g,"."),d[f]={},d=d[f],f=e+1;e+=1}d[a.substring(f).replace(/\\\./g,".")]=b;return c}function zk(a,b){return a&&b}M("shaka.util.ConfigUtils",wk);wk.convertToConfigObject=yk;wk.mergeConfigObjects=xk;function Ak(){}
362
+ function Bk(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Fe(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return zk([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},c={retryParameters:Fe(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,dash:{clockSyncUri:"",
361
363
  ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1E3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready",
362
- "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return Ak([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},d={retryParameters:Ge(),failureCallback:function(g){return Ak([g],void 0)},
364
+ "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(g){return zk([g],g)}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'}},d={retryParameters:Fe(),failureCallback:function(g){return zk([g],void 0)},
363
365
  rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};if(navigator.userAgent.match(/Edge\//)||vc()||xc())d.gapDetectionThreshold=
364
- .5;if(uc("Web0S")||vc()||xc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return K(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return Ak([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,offline:e,
365
- abrFactory:function(){return new pe},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",
366
- preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h["return"](Dk(g,
367
- f.preferredAudioLanguage))})};return f}function Ek(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return yk(a,b,c||Ck(),d,"")}
368
- function Dk(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=xd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return R(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
369
- 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=lc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Bk);Bk.mergeConfigObjects=Ek;Bk.createDefault=Ck;function Fk(){this.g=null;this.h=[]}function Gk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Hk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
370
- function Ik(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Jk(){this.i=this.h=null;this.g=[]}function Kk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Lk(){this.o=this.s=this.F=this.C=this.m=this.j=this.D=this.l=this.i=this.G=this.I=this.L=this.u=this.M=NaN;this.g=new Fk;this.h=new Jk};function U(a,b){Qe.call(this);var c=this;this.l=Mk;this.Ec=this.g=null;this.ha=!1;this.Hc=new hf;this.Ub=new hf;this.o=new hf;this.ud=this.u=this.Tb=this.i=this.Nc=this.I=this.j=this.ia=this.W=this.Oc=this.M=this.Fc=this.G=this.ub=this.D=this.L=this.m=this.F=null;this.xe=1E9;this.h=Nk(this);this.Gd={width:Infinity,height:Infinity};this.s=null;this.La=new xe(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ma=this.h.preferredTextLanguage;this.Xb=this.h.preferredTextRole;
371
- this.Vb=this.h.preferForcedSubs;this.Kb=[];this.Yb=null;b&&b(this);this.F=Ok(this);this.F.Wd(this.h.streaming.forceHTTPS);this.C=null;Pk&&(this.C=Pk());this.Hc.B(window,"online",function(){c.Qd()});this.R={name:"detach"};this.Y={name:"attach"};this.ea={name:"unload"};this.Jd={name:"manifest-parser"};this.Cd={name:"manifest"};this.sb={name:"media-source"};this.vd={name:"drm-engine"};this.ca={name:"load"};this.Md={name:"src-equals-drm-engine"};this.vb={name:"src-equals"};var d=new Map;d.set(this.Y,
372
- function(e,f){return Me(Qk(c,e,f))});d.set(this.R,function(e){e.K&&(c.Ub.nc(),e.K=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return Me(e)});d.set(this.ea,function(e){return Me(Rk(c,e))});d.set(this.sb,function(e){e=Sk(c,e);return Me(e)});d.set(this.Jd,function(e,f){var g=Tk(c,e,f);return Me(g)});d.set(this.Cd,function(e){return Uk(c,e)});d.set(this.vd,function(e){e=Vk(c,e);return Me(e)});d.set(this.ca,function(e,f){return Me(Wk(c,e,f))});d.set(this.Md,function(e,f){var g=Xk(c,e,f);return Me(g)});
373
- d.set(this.vb,function(e,f){return Yk(c,e,f)});this.ua=new Jj(this.R,{mf:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.Y);e==c.Y&&(k=g==c.R||f.K!=h.K?c.R:g==c.Y?c.Y:g==c.sb||g==c.ca?c.sb:g==c.vb?c.Md:null);e==c.sb&&(k=g==c.ca&&f.K==h.K?c.Jd:c.ea);e==c.Jd&&(k=Zk(c.ca,c.Cd,c.ea,g,f,h));e==c.Cd&&(k=Zk(c.ca,c.vd,c.ea,g,f,h));e==c.vd&&(k=Zk(c.ca,c.ca,c.ea,g,f,h));e==c.Md&&(k=g==c.vb&&f.K==h.K?c.vb:c.ea);if(e==c.ca||e==c.vb)k=c.ea;e==c.ea&&(k=h.K&&f.K==h.K?c.Y:c.R);return k},Ye:function(e,f,g){c.dispatchEvent($k(al,
374
- (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,Rk(c,e),2):f["return"](e.K?c.Y:c.R)})},Gf:function(e){c.dispatchEvent($k(bl,(new Map).set("state",e.name)))}});a&&this.Wb(a,!0)}pa(U,Qe);function $k(a,b){return new S(a,b)}r=U.prototype;
375
- r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==cl)return c["return"]();a.l=cl;b=Oj(a.ua,function(){return{node:a.R,payload:Kj(),hb:!1}});return u(c,new Promise(function(d){b.Fb=function(){};b.Rc=function(){d()};b.lb=function(){d()};b.onError=function(){d()};b.Tc=function(){d()}}),2);case 2:return u(c,a.ua.destroy(),3);case 3:a.Hc&&(a.Hc.release(),a.Hc=null);a.Ub&&(a.Ub.release(),a.Ub=null);a.o&&(a.o.release(),a.o=null);a.ud=null;a.u=null;a.h=null;a.s=null;a.Ec=null;
376
- a.W=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:Qe.prototype.release.call(a),z(c)}})};r.Wb=function(a,b){b=void 0===b?!0:b;if(this.l==cl)return Promise.reject(dl());var c=Kj();c.K=a;qc()||(b=!1);var d=b?this.sb:this.Y,e=Oj(this.ua,function(){return{node:d,payload:c,hb:!1}});e.Fb=function(){};return el(e)};r.detach=function(){var a=this;if(this.l==cl)return Promise.reject(dl());var b=Oj(this.ua,function(){return{node:a.R,payload:Kj(),hb:!1}});b.Fb=function(){};return el(b)};
377
- r.ce=function(a){var b=this;a=void 0===a?!0:a;if(this.l==cl)return Promise.reject(dl());qc()||(a=!1);var c=Kj(),d=Oj(this.ua,function(e){var f=e.K&&a?b.sb:e.K?b.Y:b.R;c.K=e.K;return{node:f,payload:c,hb:!1}});d.Fb=function(){};return el(d)};r.gg=function(a){this.Yb=a};
378
- r.load=function(a,b,c){var d=this;this.Yb=null;if(this.l==cl)return Promise.reject(dl());this.dispatchEvent($k(fl));var e=Kj();e.uri=a;e.$d=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=gl(this,e)?this.vb:this.ca,g=Oj(this.ua,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,hb:!0}});this.s=new Lk;this.W=hl(this);g.Fb=function(){};return new Promise(function(h,k){g.Tc=function(){return k(new N(2,7,7002))};g.Rc=function(){h();d.dispatchEvent($k(il))};g.lb=function(){return k(dl())};
379
- g.onError=function(l){return k(l)}})};function gl(a,b){if(!qc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=ig(d),c=jl[c]);if(c){if(""==(b.K||sc()).canPlayType(c))return!1;if(!qc()||!(c in hg||ig(d)in jg)||a.h.streaming.preferNativeHls)return!0;if(yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Qk(a,b,c){null==b.K&&(b.K=c.K,a.Ub.B(b.K,"error",function(){var d=kl(a);d&&ll(a,d)}));a.g=b.K;return Promise.resolve()}
380
- function Rk(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return a.l!=cl&&(a.l=Mk),c=a.Kb.map(function(n){return n()}),a.Kb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent($k(ml));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.o.nc();a.ub&&(a.ub.release(),a.ub=null);a.Fc&&(a.Fc.stop(),a.Fc=null);if(!a.I){p.A(3);break}return u(p,a.I.stop(),4);case 4:a.I=null,a.Nc=null;case 3:if(!a.u){p.A(5);break}return u(p,a.u.stop(),5);case 5:if(!a.j){p.A(7);break}return u(p,a.j.destroy(),
366
+ .5;if(uc("Web0S")||vc()||xc())d.stallSkip=0;var e={trackSelectionCallback:function(g){return K(function(h){return h["return"](g)})},downloadSizeCallback:function(g){var h;return K(function(k){if(1==k.g)return navigator.storage&&navigator.storage.estimate?u(k,navigator.storage.estimate(),3):k["return"](!0);h=k.h;return k["return"](h.usage+g<.95*h.quota)})},progressCallback:function(g,h){return zk([g,h],void 0)},usePersistentLicense:!0,numberOfParallelDownloads:5},f={drm:b,manifest:c,streaming:d,offline:e,
367
+ abrFactory:function(){return new oe},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1E6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},advanced:{minTotalBytes:128E3,minBytes:16E3,fastHalfLife:2,slowHalfLife:5}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",
368
+ preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minFrameRate:0,maxFrameRate:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};e.trackSelectionCallback=function(g){return K(function(h){return h["return"](Ck(g,
369
+ f.preferredAudioLanguage))})};return f}function Dk(a,b,c){var d={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return xk(a,b,c||Bk(),d,"")}
370
+ function Ck(a,b){var c=a.filter(function(h){return"variant"==h.type}),d=[],e=wd(b,c.map(function(h){return h.language}));e&&(d=c.filter(function(h){return R(h.language)==e}));0==d.length&&(d=c.filter(function(h){return h.primary}));0==d.length&&(c.map(function(h){return h.language}),d=c);var f=d.filter(function(h){return h.height&&480>=h.height});f.length&&(f.sort(function(h,k){return k.height-h.height}),d=f.filter(function(h){return h.height==f[0].height}));c=[];if(d.length){var g=Math.floor(d.length/
371
+ 2);d.sort(function(h,k){return h.bandwidth-k.bandwidth});c.push(d[g])}d=t(a);for(g=d.next();!g.done;g=d.next())g=g.value,g.type!=lc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",Ak);Ak.mergeConfigObjects=Dk;Ak.createDefault=Bk;function Ek(){this.g=null;this.h=[]}function Fk(a,b){if(null==a.g)a.g={timestamp:Date.now()/1E3,state:b,duration:0};else{var c=Date.now()/1E3;a.g.duration=c-a.g.timestamp;a.g.state!=b&&(a.h.push(a.g),a.g={timestamp:c,state:b,duration:0})}}function Gk(a,b){var c=0;a.g&&a.g.state==b&&(c+=a.g.duration);for(var d=t(a.h),e=d.next();!e.done;e=d.next())e=e.value,c+=e.state==b?e.duration:0;return c}
372
+ function Hk(a){function b(f){return{timestamp:f.timestamp,state:f.state,duration:f.duration}}for(var c=[],d=t(a.h),e=d.next();!e.done;e=d.next())c.push(b(e.value));a.g&&c.push(b(a.g));return c};function Ik(){this.i=this.h=null;this.g=[]}function Jk(a,b,c){a.i!=b&&(a.i=b,a.g.push({timestamp:Date.now()/1E3,id:b.id,type:"text",fromAdaptation:c,bandwidth:null}))};function Kk(){this.o=this.s=this.F=this.C=this.m=this.j=this.D=this.l=this.i=this.G=this.I=this.L=this.u=this.M=NaN;this.g=new Ek;this.h=new Ik};function U(a,b){Pe.call(this);var c=this;this.l=Lk;this.Fc=this.g=null;this.ha=!1;this.Ic=new gf;this.Ub=new gf;this.o=new gf;this.wd=this.u=this.Tb=this.i=this.Oc=this.I=this.j=this.ia=this.W=this.Pc=this.M=this.Gc=this.G=this.ub=this.D=this.L=this.m=this.F=null;this.ye=1E9;this.h=Mk(this);this.Id={width:Infinity,height:Infinity};this.s=null;this.La=new we(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.Ma=this.h.preferredTextLanguage;this.Xb=this.h.preferredTextRole;
373
+ this.Vb=this.h.preferForcedSubs;this.Kb=[];this.Yb=null;b&&b(this);this.F=Nk(this);this.F.Yd(this.h.streaming.forceHTTPS);this.C=null;Ok&&(this.C=Ok());this.Ic.B(window,"online",function(){c.Sd()});this.R={name:"detach"};this.Y={name:"attach"};this.ea={name:"unload"};this.Ld={name:"manifest-parser"};this.Ed={name:"manifest"};this.sb={name:"media-source"};this.xd={name:"drm-engine"};this.ca={name:"load"};this.Od={name:"src-equals-drm-engine"};this.vb={name:"src-equals"};var d=new Map;d.set(this.Y,
374
+ function(e,f){return Le(Pk(c,e,f))});d.set(this.R,function(e){e.K&&(c.Ub.oc(),e.K=null);c.C&&c.C.release();c.g=null;e=Promise.resolve();return Le(e)});d.set(this.ea,function(e){return Le(Qk(c,e))});d.set(this.sb,function(e){e=Rk(c,e);return Le(e)});d.set(this.Ld,function(e,f){var g=Sk(c,e,f);return Le(g)});d.set(this.Ed,function(e){return Tk(c,e)});d.set(this.xd,function(e){e=Uk(c,e);return Le(e)});d.set(this.ca,function(e,f){return Le(Vk(c,e,f))});d.set(this.Od,function(e,f){var g=Wk(c,e,f);return Le(g)});
375
+ d.set(this.vb,function(e,f){return Xk(c,e,f)});this.ua=new Ij(this.R,{nf:function(e,f,g,h){var k=null;e==c.R&&(k=g==c.R?c.R:c.Y);e==c.Y&&(k=g==c.R||f.K!=h.K?c.R:g==c.Y?c.Y:g==c.sb||g==c.ca?c.sb:g==c.vb?c.Od:null);e==c.sb&&(k=g==c.ca&&f.K==h.K?c.Ld:c.ea);e==c.Ld&&(k=Yk(c.ca,c.Ed,c.ea,g,f,h));e==c.Ed&&(k=Yk(c.ca,c.xd,c.ea,g,f,h));e==c.xd&&(k=Yk(c.ca,c.ca,c.ea,g,f,h));e==c.Od&&(k=g==c.vb&&f.K==h.K?c.vb:c.ea);if(e==c.ca||e==c.vb)k=c.ea;e==c.ea&&(k=h.K&&f.K==h.K?c.Y:c.R);return k},Ze:function(e,f,g){c.dispatchEvent(Zk($k,
376
+ (new Map).set("state",e.name)));return d.get(e)(f,g)},handleError:function(e){return K(function(f){return 1==f.g?u(f,Qk(c,e),2):f["return"](e.K?c.Y:c.R)})},Hf:function(e){c.dispatchEvent(Zk(al,(new Map).set("state",e.name)))}});a&&this.Wb(a,!0)}pa(U,Pe);function Zk(a,b){return new S(a,b)}r=U.prototype;
377
+ r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==bl)return c["return"]();a.l=bl;b=Nj(a.ua,function(){return{node:a.R,payload:Jj(),hb:!1}});return u(c,new Promise(function(d){b.Fb=function(){};b.Sc=function(){d()};b.lb=function(){d()};b.onError=function(){d()};b.Uc=function(){d()}}),2);case 2:return u(c,a.ua.destroy(),3);case 3:a.Ic&&(a.Ic.release(),a.Ic=null);a.Ub&&(a.Ub.release(),a.Ub=null);a.o&&(a.o.release(),a.o=null);a.wd=null;a.u=null;a.h=null;a.s=null;a.Fc=null;
378
+ a.W=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:Pe.prototype.release.call(a),z(c)}})};r.Wb=function(a,b){b=void 0===b?!0:b;if(this.l==bl)return Promise.reject(cl());var c=Jj();c.K=a;qc()||(b=!1);var d=b?this.sb:this.Y,e=Nj(this.ua,function(){return{node:d,payload:c,hb:!1}});e.Fb=function(){};return dl(e)};r.detach=function(){var a=this;if(this.l==bl)return Promise.reject(cl());var b=Nj(this.ua,function(){return{node:a.R,payload:Jj(),hb:!1}});b.Fb=function(){};return dl(b)};
379
+ r.ee=function(a){var b=this;a=void 0===a?!0:a;if(this.l==bl)return Promise.reject(cl());qc()||(a=!1);var c=Jj(),d=Nj(this.ua,function(e){var f=e.K&&a?b.sb:e.K?b.Y:b.R;c.K=e.K;return{node:f,payload:c,hb:!1}});d.Fb=function(){};return dl(d)};r.hg=function(a){this.Yb=a};
380
+ r.load=function(a,b,c){var d=this;this.Yb=null;if(this.l==bl)return Promise.reject(cl());this.dispatchEvent(Zk(el));var e=Jj();e.uri=a;e.be=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=fl(this,e)?this.vb:this.ca,g=Nj(this.ua,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,hb:!0}});this.s=new Kk;this.W=gl(this);g.Fb=function(){};return new Promise(function(h,k){g.Uc=function(){return k(new N(2,7,7002))};g.Sc=function(){h();d.dispatchEvent(Zk(hl))};g.lb=function(){return k(cl())};
381
+ g.onError=function(l){return k(l)}})};function fl(a,b){if(!qc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=hg(d),c=il[c]);if(c){if(""==(b.K||sc()).canPlayType(c))return!1;if(!qc()||!(c in gg||hg(d)in ig)||a.h.streaming.preferNativeHls)return!0;if(yc())return a.h.streaming.useNativeHlsOnSafari}return!1}function Pk(a,b,c){null==b.K&&(b.K=c.K,a.Ub.B(b.K,"error",function(){var d=jl(a);d&&kl(a,d)}));a.g=b.K;return Promise.resolve()}
382
+ function Qk(a,b){var c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return a.l!=bl&&(a.l=Lk),c=a.Kb.map(function(n){return n()}),a.Kb=[],u(p,Promise.all(c),2);case 2:a.dispatchEvent(Zk(ll));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.o.oc();a.ub&&(a.ub.release(),a.ub=null);a.Gc&&(a.Gc.stop(),a.Gc=null);if(!a.I){p.A(3);break}return u(p,a.I.stop(),4);case 4:a.I=null,a.Oc=null;case 3:if(!a.u){p.A(5);break}return u(p,a.u.stop(),5);case 5:if(!a.j){p.A(7);break}return u(p,a.j.destroy(),
381
383
  8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.D&&(a.D.release(),a.D=null);if(!a.L){p.A(9);break}return u(p,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.C)a.C.onAssetUnload();if(!b.K||!b.K.src){p.A(11);break}return u(p,new Promise(function(n){return(new O(n)).S(.1)}),12);case 12:for(b.K.removeAttribute("src"),b.K.load();b.K.lastChild;)b.K.removeChild(b.K.firstChild);case 11:if(!a.m){p.A(13);break}return u(p,a.m.destroy(),14);case 14:a.m=null;case 13:a.Tb=null;a.M=null;if(a.i){d=t(a.i.variants);
382
- for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new Lk;a.wd=null;nl(a);z(p)}})}
383
- function Sk(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new Ih,d=a.h.textDisplayFactory,e=d(),a.wd=d,f=ol(b.K,c,e,function(l,m,p){l=t(l);for(var n=l.next();!n.done;n=l.next())if(n=n.value,n.data&&n.cueTime&&n.frames){for(var q=n.cueTime+m,v=p,y=t(n.frames),x=y.next();!x.done;x=y.next())pl(a,q,v,"ID3",x.value);if(a.C)a.C.onHlsTimedMetadata(n,q)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.F=h,u(k,f.G,2);a.L=f;z(k)})}
384
- function Tk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Tb=d,f=a,u(h,gg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Nc=h.h;a.I=a.Nc();g=Re(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
385
- function Uk(a,b){var c=b.uri,d=a.F;a.Oc=new $i(function(){return a.oc()});a.Oc.addEventListener("regionadd",function(g){g=g.region;ql(a,rl,g);if(a.C)a.C.onDashTimedMetadata(g)});a.ia=null;a.h.streaming.observeQualityChanges&&(a.ia=new Wi(function(){return a.Ya()}),a.ia.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
386
- mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent($k(sl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.o=h.format,ok(k,g,{ot:rk,su:!k.i}))}catch(l){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){ek(a.W,g,h)},filter:function(g){return tl(a,g)},makeTextStreamsForClosedCaptions:function(g){return ul(a,g)},
387
- onTimelineRegionAdded:function(g){var h=a.Oc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new S("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return ll(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
388
- enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new Ie(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,u(m,a.I.start(c,e),2);g.i=m.h;h=$k(vl);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);wl(a.i);k=Date.now()/1E3;l=k-f;a.s.D=l;z(m)})}(),function(){return a.I.stop()})}
389
- function Vk(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=xl(a,{kb:a.F,onError:function(f){ll(a,f)},Sc:function(f){yl(a,f)},onExpirationUpdated:function(f,g){zl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==Al&&d&&(d=!1,a.s.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,zf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Wb(b.K),3):u(e,tl(a,a.i),0)})}
390
- function Wk(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Yb&&(b.startTime=a.Yb,a.Yb=null);d=b.K;e=b.uri;a.Tb=e;a.G=new Si({Mc:function(){return d.playbackRate},Ic:function(){return d.defaultPlaybackRate},Yd:function(x){d.playbackRate=x},ve:function(x){d.currentTime+=x}});f=function(){return Bl(a)};g=function(){return Cl(a)};a.o.B(d,"playing",f);a.o.B(d,"pause",f);a.o.B(d,"ended",f);a.o.B(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.ud==h||
391
- (a.ud=h,a.u=h(),a.u.configure(a.h.abr));a.La=new xe(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ma=a.h.preferredTextLanguage;a.Xb=a.h.preferredTextRole;a.Vb=a.h.preferForcedSubs;Dl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(x,w,D){a.j&&x!=a.j.l&&El(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.D=Fl(a,b.startTime);a.ub=Gl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Hl(a,k);Ad(a.i,a.h.preferredVideoCodecs,
392
- a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Il(a);a.j.configure(a.h.streaming);a.l=Jl;d.textTracks&&a.o.B(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":Kl(a,x)}});a.dispatchEvent($k(Ll));l=null;if(m=a.gb().find(function(x){return x.active})){y.A(2);break}l=Ml(a)?a.u.chooseVariant():null;El(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.A(3);break}p=a.D.m();return u(y,Nl(l,p),4);case 4:n=y.h,a.D.o(n);
393
- case 3:Ol(a,null,be(l));case 2:return q=a.Bb().find(function(x){return x.active}),q||((v=me(a.i.textStreams,a.Ma,a.Xb,a.Vb)[0]||null)&&Kk(a.s.h,v,!0),l&&(v?(l.audio&&Pl(a,l.audio,v)&&(a.ha=!0),a.ha&&a.L.m.setTextVisibility(!0),Ql(a)):a.ha=!1),v&&(a.h.streaming.alwaysStreamText||a.td())&&sj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),Rl(a)),Qd(a.j?a.j.l:null,a.i),Sl(a.i),Tl(a),Ml(a),a.i.variants.some(function(x){return x.primary}),a.o.oa(d,"loadedmetadata",function(){a.s.l=Date.now()/
394
- 1E3-c.$d}),z(y)}})}
395
- function Xk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=mc,e=Date.now()/1E3,f=!0,a.m=xl(a,{kb:a.F,onError:function(p){ll(a,p)},Sc:function(p){yl(a,p)},onExpirationUpdated:function(p,n){zl(a,p,n)},onEvent:function(p){a.dispatchEvent(p);p.type==Al&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=ig(g),k=jl[h],"application/x-mpegurl"==k&&yc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
396
- createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?cd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Y=!0,u(m,zf(a.m,[l],[]),2)):u(m,a.m.Wb(b.K),
384
+ for(e=d.next();!e.done;e=d.next())for(f=e.value,g=t([f.audio,f.video]),h=g.next();!h.done;h=g.next())(k=h.value)&&k.segmentIndex&&k.segmentIndex.release();l=t(a.i.textStreams);for(h=l.next();!h.done;h=l.next())m=h.value,m.segmentIndex&&m.segmentIndex.release()}a.i=null;a.s=new Kk;a.yd=null;ml(a);z(p)}})}
385
+ function Rk(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new Hh,d=a.h.textDisplayFactory,e=d(),a.yd=d,f=nl(b.K,c,e,function(l,m,p){l=t(l);for(var n=l.next();!n.done;n=l.next())if(n=n.value,n.data&&n.cueTime&&n.frames){for(var q=n.cueTime+m,v=p,y=t(n.frames),x=y.next();!x.done;x=y.next())ol(a,q,v,"ID3",x.value);if(a.C)a.C.onHlsTimedMetadata(n,q)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.F=h,u(k,f.G,2);a.L=f;z(k)})}
386
+ function Sk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return b.mimeType=c.mimeType,b.uri=c.uri,d=b.uri,e=a.F,a.Tb=d,f=a,u(h,fg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Oc=h.h;a.I=a.Oc();g=Qe(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);z(h)})}
387
+ function Tk(a,b){var c=b.uri,d=a.F;a.Pc=new Zi(function(){return a.pc()});a.Pc.addEventListener("regionadd",function(g){g=g.region;pl(a,ql,g);if(a.C)a.C.onDashTimedMetadata(g)});a.ia=null;a.h.streaming.observeQualityChanges&&(a.ia=new Vi(function(){return a.Ya()}),a.ia.addEventListener("qualitychange",function(g){var h=g.quality;g=g.position;h=(new Map).set("mediaQuality",{bandwidth:h.bandwidth,audioSamplingRate:h.audioSamplingRate,codecs:h.codecs,contentType:h.contentType,frameRate:h.frameRate,height:h.height,
388
+ mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Zk(rl,h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.W;try{k.g.enabled&&(k.o=h.format,nk(k,g,{ot:qk,su:!k.i}))}catch(l){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){dk(a.W,g,h)},filter:function(g){return sl(a,g)},makeTextStreamsForClosedCaptions:function(g){return tl(a,g)},
389
+ onTimelineRegionAdded:function(g){var h=a.Pc;a:{var k=t(h.g);for(var l=k.next();!l.done;l=k.next())if(l=l.value,l.schemeIdUri==g.schemeIdUri&&l.id==g.id&&l.startTime==g.startTime&&l.endTime==g.endTime){k=l;break a}k=null}null==k&&(h.g.add(g),g=new S("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return kl(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
390
+ enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)}},f=Date.now()/1E3;return new He(function(){var g,h,k,l;return K(function(m){if(1==m.g)return g=a,u(m,a.I.start(c,e),2);g.i=m.h;h=Zk(ul);a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);vl(a.i);k=Date.now()/1E3;l=k-f;a.s.D=l;z(m)})}(),function(){return a.I.stop()})}
391
+ function Uk(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=wl(a,{kb:a.F,onError:function(f){kl(a,f)},Tc:function(f){xl(a,f)},onExpirationUpdated:function(f,g){yl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);f.type==zl&&d&&(d=!1,a.s.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,yf(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Wb(b.K),3):u(e,sl(a,a.i),0)})}
392
+ function Vk(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.Yb&&(b.startTime=a.Yb,a.Yb=null);d=b.K;e=b.uri;a.Tb=e;a.G=new Ri({Nc:function(){return d.playbackRate},Jc:function(){return d.defaultPlaybackRate},$d:function(x){d.playbackRate=x},we:function(x){d.currentTime+=x}});f=function(){return Al(a)};g=function(){return Bl(a)};a.o.B(d,"playing",f);a.o.B(d,"pause",f);a.o.B(d,"ended",f);a.o.B(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.wd==h||
393
+ (a.wd=h,a.u=h(),a.u.configure(a.h.abr));a.La=new we(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.Ma=a.h.preferredTextLanguage;a.Xb=a.h.preferredTextRole;a.Vb=a.h.preferForcedSubs;Cl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(x,w,D){a.j&&x!=a.j.l&&Dl(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.D=El(a,b.startTime);a.ub=Fl(a);k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);Gl(a,k);zd(a.i,a.h.preferredVideoCodecs,
394
+ a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=Hl(a);a.j.configure(a.h.streaming);a.l=Il;d.textTracks&&a.o.B(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":Jl(a,x)}});a.dispatchEvent(Zk(Kl));l=null;if(m=a.gb().find(function(x){return x.active})){y.A(2);break}l=Ll(a)?a.u.chooseVariant():null;Dl(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.A(3);break}p=a.D.m();return u(y,Ml(l,p),4);case 4:n=y.h,a.D.o(n);
395
+ case 3:Nl(a,null,ae(l));case 2:return q=a.Bb().find(function(x){return x.active}),q||((v=le(a.i.textStreams,a.Ma,a.Xb,a.Vb)[0]||null)&&Jk(a.s.h,v,!0),l&&(v?(l.audio&&Ol(a,l.audio,v)&&(a.ha=!0),a.ha&&a.L.m.setTextVisibility(!0),Pl(a)):a.ha=!1),v&&(a.h.streaming.alwaysStreamText||a.vd())&&rj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),Ql(a)),Pd(a.j?a.j.l:null,a.i),Rl(a.i),Sl(a),Ll(a),a.i.variants.some(function(x){return x.primary}),a.o.oa(d,"loadedmetadata",function(){a.s.l=Date.now()/
396
+ 1E3-c.be}),z(y)}})}
397
+ function Wk(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=mc,e=Date.now()/1E3,f=!0,a.m=wl(a,{kb:a.F,onError:function(p){kl(a,p)},Tc:function(p){xl(a,p)},onExpirationUpdated:function(p,n){yl(a,p,n)},onEvent:function(p){a.dispatchEvent(p);p.type==zl&&f&&(f=!1,a.s.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=hg(g),k=il[h],"application/x-mpegurl"==k&&yc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,
398
+ createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?bd(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.va,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},a.m.Y=!0,u(m,yf(a.m,[l],[]),2)):u(m,a.m.Wb(b.K),
397
399
  0)})}
398
- function Yk(a,b,c){function d(){return Bl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Tb=b.uri;var e=b.K;a.D=new Hi(e);var f=!1;a.Kb.push(function(){f=!0});null!=b.startTime&&a.D.o(b.startTime);a.G=new Si({Mc:function(){return e.playbackRate},Ic:function(){return e.defaultPlaybackRate},Yd:function(k){e.playbackRate=k},ve:function(k){e.currentTime+=k}});Hl(a,a.h.streaming.rebufferingGoal);a.o.B(e,"playing",d);a.o.B(e,"pause",d);a.o.B(e,"ended",d);a.o.B(e,"ratechange",function(){return Cl(a)});"none"!=e.preload&&
399
- a.o.oa(e,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.$d});e.audioTracks&&(a.o.B(e.audioTracks,"addtrack",function(){return Tl(a)}),a.o.B(e.audioTracks,"removetrack",function(){return Tl(a)}),a.o.B(e.audioTracks,"change",function(){return Tl(a)}));e.textTracks&&(a.o.B(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Ul(a,k);break;case "chapters":Kl(a,k);break;default:Tl(a)}}),a.o.B(e.textTracks,"removetrack",function(){return Tl(a)}),a.o.B(e.textTracks,
400
- "change",function(){return Tl(a)}));var g=ig(b.uri);e.src=pk(a.W,b.uri,jl[g]);(vc()||uc("Web0S"))&&e.load();a.l=Vl;a.dispatchEvent($k(Ll));var h=new nc;yi(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){h.resolve()});yi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return K(function(l){if(1==l.g)return Wl(a),k=Xl(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.o.oa(e.textTracks,"change",m);(new O(m)).S(1)}),2);if(f)return l["return"]();Yl(a);z(l)})});
401
- e.error?h.reject(kl(a)):"none"==e.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.o.oa(e,"error",function(){h.reject(kl(a))});return new Ie(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
402
- function Wl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Td(b);var c=a.h.preferredVariantRole;""!=c&&a.Td(b,c)}}function Yl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Ud(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Ud(b,d,c)}}
403
- function Ul(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.B(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,pl(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Zl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Jb().S(.5);a.Kb.push(function(){c.stop()})}}
404
- function pl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent($k($l,b))}function Kl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Jb().S(.5);a.Kb.push(function(){c.stop()})}}function wl(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function xl(a,b){return new sf(b,a.h.drm.updateExpirationTime)}
405
- function Ok(a){return new Ve(function(b,c){a.u&&a.u.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent($k(am,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent($k(bm,b))})}function Fl(a,b){return new Ii(a.g,a.i,a.h.streaming,b,function(){a.ub&&Vi(a.ub,!0);a.j&&a.j.pc();a.M&&cm(a)})}
406
- function Gl(a){var b=new aj(a.Oc);b.addEventListener("enter",function(d){ql(a,dm,d.region)});b.addEventListener("exit",function(d){ql(a,em,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(ql(a,dm,e),ql(a,em,e))});var c=new Ui(a.g);c.g.add(b);a.ia&&c.g.add(a.ia);return c}function Hl(a,b){a.M=new Be;a.M.g=De;Ee(a.M,b,Math.min(.5,b/2));nl(a);a.Fc=(new O(function(){cm(a)})).Ca(.25)}
407
- function cm(a){switch(a.l){case Vl:if(a.g.ended)var b=!0;else{var c=Qh(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Jl:a:if(a.g.ended||ai(a.L))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.fb();var d=Qh(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Sh(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Ce:De;c.g=d;b!=d&&nl(a)}function ol(a,b,c,d){return new Vh(a,b,c,d)}
408
- function hl(a){return new dk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Ya:function(){return a.Ya()},getCurrentTime:function(){return a.g?a.g.currentTime:0},gb:function(){return a.gb()},Kc:function(){return a.Kc()},U:function(){return a.U()}},a.h.cmcd)}
409
- function Il(a){return new gj(a.i,{Lc:function(){return a.D.m()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){ek(a.W,b,c)},O:a.L,kb:a.F,onError:function(b){return ll(a,b)},onEvent:function(b){return a.dispatchEvent(b)},If:function(){a.I&&a.I.update&&a.I.update()},Ld:function(){a.D&&a.D.D();cm(a)},Hf:function(b,c){var d=c.Ed;d&&a.ia&&Yi(a.ia,d,b)}})}
410
- r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zk(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Ek(this.h,a,Nk(this));fm(this);return c};
411
- function fm(a){if(a.I){var b=Re(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{gm(a,a.i)}catch(f){ll(a,f)}a.u&&Ml(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||hm(a)}a.F&&a.F.Wd(a.h.streaming.forceHTTPS);if(a.L&&(a.L.F=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.wd!=b)){var c=b(),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
412
- c);a.wd=b;a.j&&(b=a.j,(c=b.h.get(lc))&&qj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Rl(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Ee(a.M,b,Math.min(.5,b/2)));a.i&&Dl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Nk(this);Ek(a,this.h,Nk(this));return a};
413
- r.af=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.oc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Sf=function(){for(var a in this.h)delete this.h[a];Ek(this.h,Nk(this),Nk(this));fm(this)};r.gf=function(){return this.l};r.lf=function(){return this.g};r.cc=function(){return this.F};r.qd=function(){return this.Tb};
414
- r.oe=function(){return this.C?this.C:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};r.jb=function(){return this.i?this.i.presentationTimeline.jb():!1};r.Af=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
415
- r.oc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Ab(),end:a.Oa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.yf=function(){this.U()&&(this.g.currentTime=this.oc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.bc=function(){return this.m?this.m.bc():Infinity};r.Jc=function(){return this.m?this.m.Jc():{}};
416
- r.sd=function(){return this.M?this.M.g==De:!1};r.Kc=function(){return this.g?this.G?this.G.i:1:0};r.bg=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==Jl&&(this.u.playbackRateChanged(a),pj(this.j,1<Math.abs(a))))};r.Se=function(){var a=this.G.Ic();this.l==Vl&&this.G.set(a);this.l==Jl&&(this.G.set(a),this.u.playbackRateChanged(a),pj(this.j,!1))};
417
- r.gb=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,ke(e)){var f=be(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return je(g)}):[]};
418
- r.Bb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=ce(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Xl(this).map(function(f){return ge(f)}):[]};r.ef=function(){return this.i?this.i.imageStreams.map(function(a){return de(a)}):[]};
419
- r.uf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.A(3):u(G,d.createSegmentIndex(),3):G["return"](null):G.A(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;q=l/p;
400
+ function Xk(a,b,c){function d(){return Al(a)}b.uri=c.uri;b.startTime=c.startTime;a.Tb=b.uri;var e=b.K;a.D=new Gi(e);var f=!1;a.Kb.push(function(){f=!0});null!=b.startTime&&a.D.o(b.startTime);a.G=new Ri({Nc:function(){return e.playbackRate},Jc:function(){return e.defaultPlaybackRate},$d:function(k){e.playbackRate=k},we:function(k){e.currentTime+=k}});Gl(a,a.h.streaming.rebufferingGoal);a.o.B(e,"playing",d);a.o.B(e,"pause",d);a.o.B(e,"ended",d);a.o.B(e,"ratechange",function(){return Bl(a)});"none"!=e.preload&&
401
+ a.o.oa(e,"loadedmetadata",function(){a.s.l=Date.now()/1E3-c.be});e.audioTracks&&(a.o.B(e.audioTracks,"addtrack",function(){return Sl(a)}),a.o.B(e.audioTracks,"removetrack",function(){return Sl(a)}),a.o.B(e.audioTracks,"change",function(){return Sl(a)}));e.textTracks&&(a.o.B(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":Tl(a,k);break;case "chapters":Jl(a,k);break;default:Sl(a)}}),a.o.B(e.textTracks,"removetrack",function(){return Sl(a)}),a.o.B(e.textTracks,
402
+ "change",function(){return Sl(a)}));var g=hg(b.uri);e.src=ok(a.W,b.uri,il[g]);(vc()||uc("Web0S"))&&e.load();a.l=Ul;a.dispatchEvent(Zk(Kl));var h=new nc;xi(e,HTMLMediaElement.HAVE_METADATA,a.o,function(){h.resolve()});xi(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.o,function(){var k;return K(function(l){if(1==l.g)return Vl(a),k=Wl(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.o.oa(e.textTracks,"change",m);(new O(m)).S(1)}),2);if(f)return l["return"]();Xl(a);z(l)})});
403
+ e.error?h.reject(jl(a)):"none"==e.preload&&(Va('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve());a.o.oa(e,"error",function(){h.reject(jl(a))});return new He(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
404
+ function Vl(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Vd(b);var c=a.h.preferredVariantRole;""!=c&&a.Vd(b,c)}}function Xl(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Wd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Wd(b,d,c)}}
405
+ function Tl(a,b){if("metadata"==b.kind){b.mode="hidden";a.o.B(b,"cuechange",function(){if(b.activeCues)for(var d=t(b.activeCues),e=d.next();!e.done;e=d.next())if(e=e.value,ol(a,e.startTime,e.endTime,e.type,e.value),a.C)a.C.onCueMetadataChange(e.value)});var c=(new O(function(){var d=Yl(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Jb().S(.5);a.Kb.push(function(){c.stop()})}}
406
+ function ol(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Zk(Zl,b))}function Jl(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Jb().S(.5);a.Kb.push(function(){c.stop()})}}function vl(a){function b(c){return c.video&&c.audio||c.video&&c.video.codecs.includes(",")}a.variants.some(b)&&(a.variants=a.variants.filter(b))}function wl(a,b){return new rf(b,a.h.drm.updateExpirationTime)}
407
+ function Nk(a){return new Ue(function(b,c){a.u&&a.u.segmentDownloaded(b,c)},function(b,c,d){b=(new Map).set("headers",b).set("request",c).set("requestType",d);a.dispatchEvent(Zk($l,b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Zk(am,b))})}function El(a,b){return new Hi(a.g,a.i,a.h.streaming,b,function(){a.ub&&Ui(a.ub,!0);a.j&&a.j.qc();a.M&&bm(a)})}
408
+ function Fl(a){var b=new $i(a.Pc);b.addEventListener("enter",function(d){pl(a,cm,d.region)});b.addEventListener("exit",function(d){pl(a,dm,d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(pl(a,cm,e),pl(a,dm,e))});var c=new Ti(a.g);c.g.add(b);a.ia&&c.g.add(a.ia);return c}function Gl(a,b){a.M=new Ae;a.M.g=Ce;De(a.M,b,Math.min(.5,b/2));ml(a);a.Gc=(new O(function(){bm(a)})).Ca(.25)}
409
+ function bm(a){switch(a.l){case Ul:if(a.g.ended)var b=!0;else{var c=Ph(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case Il:a:if(a.g.ended||$h(a.L))b=!0;else{if(a.i.presentationTimeline.U()){c=a.i.presentationTimeline.fb();var d=Ph(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=Rh(a.g.buffered,a.g.currentTime);c=a.M;var e=b,f=c.h.get(c.g);b=c.g;d=e||d>=f?Be:Ce;c.g=d;b!=d&&ml(a)}function nl(a,b,c,d){return new Uh(a,b,c,d)}
410
+ function gl(a){return new ck({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Ya:function(){return a.Ya()},getCurrentTime:function(){return a.g?a.g.currentTime:0},gb:function(){return a.gb()},Lc:function(){return a.Lc()},U:function(){return a.U()}},a.h.cmcd)}
411
+ function Hl(a){return new fj(a.i,{Mc:function(){return a.D.m()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){dk(a.W,b,c)},O:a.L,kb:a.F,onError:function(b){return kl(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Jf:function(){a.I&&a.I.update&&a.I.update()},Nd:function(){a.D&&a.D.D();bm(a)},If:function(b,c){var d=c.Gd;d&&a.ia&&Xi(a.ia,d,b)}})}
412
+ r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=yk(a,b));a.streaming&&a.streaming.lowLatencyMode&&(void 0==a.streaming.inaccurateManifestTolerance&&(a.streaming.inaccurateManifestTolerance=0),void 0==a.streaming.rebufferingGoal&&(a.streaming.rebufferingGoal=.01));var c=Dk(this.h,a,Mk(this));em(this);return c};
413
+ function em(a){if(a.I){var b=Qe(a.h.manifest);a.g&&"AUDIO"===a.g.nodeName&&(b.disableVideo=!0);a.I.configure(b)}a.m&&a.m.configure(a.h.drm);if(a.j){a.j.configure(a.h.streaming);try{fm(a,a.i)}catch(f){kl(a,f)}a.u&&Ll(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||gm(a)}a.F&&a.F.Yd(a.h.streaming.forceHTTPS);if(a.L&&(a.L.F=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.yd!=b)){var c=b(),d=a.L,e=d.m;d.m=c;e&&(c.setTextVisibility(e.isTextVisible()),e.destroy());d.g&&(d.g.i=
414
+ c);a.yd=b;a.j&&(b=a.j,(c=b.h.get(lc))&&pj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),Ql(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),De(a.M,b,Math.min(.5,b/2)));a.i&&Cl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=Mk(this);Dk(a,this.h,Mk(this));return a};
415
+ r.bf=function(){if(this.g){var a=this.g.buffered.length;a=a?this.g.buffered.end(a-1):0;var b=this.getConfiguration().streaming.bufferingGoal;b=Math.min(this.g.currentTime+b,this.pc().end);if(a>=b)return 1;if(!(a<=this.g.currentTime)&&a<b)return(a-this.g.currentTime)/(b-this.g.currentTime)}return 0};r.Tf=function(){for(var a in this.h)delete this.h[a];Dk(this.h,Mk(this),Mk(this));em(this)};r.hf=function(){return this.l};r.mf=function(){return this.g};r.cc=function(){return this.F};r.sd=function(){return this.Tb};
416
+ r.pe=function(){return this.C?this.C:null};r.U=function(){return this.i?this.i.presentationTimeline.U():this.g&&this.g.src?Infinity==this.g.duration:!1};r.jb=function(){return this.i?this.i.presentationTimeline.jb():!1};r.Bf=function(){if(this.i){var a=this.i.variants;return a.length?!a[0].video:!1}return this.g&&this.g.src?this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight:!1};
417
+ r.pc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Ab(),end:a.Oa()}}return this.g&&this.g.src&&(a=this.g.seekable,a.length)?{start:a.start(0),end:a.end(a.length-1)}:{start:0,end:0}};r.zf=function(){this.U()&&(this.g.currentTime=this.pc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.bc=function(){return this.m?this.m.bc():Infinity};r.Kc=function(){return this.m?this.m.Kc():{}};
418
+ r.ud=function(){return this.M?this.M.g==Ce:!1};r.Lc=function(){return this.g?this.G?this.G.i:1:0};r.cg=function(a){0==a?Va("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.G.set(a),this.l==Il&&(this.u.playbackRateChanged(a),oj(this.j,1<Math.abs(a))))};r.Te=function(){var a=this.G.Jc();this.l==Ul&&this.G.set(a);this.l==Il&&(this.G.set(a),this.u.playbackRateChanged(a),oj(this.j,!1))};
419
+ r.gb=function(){if(this.i){for(var a=this.j?this.j.l:null,b=[],c=0,d=t(this.i.variants),e=d.next();!e.done;e=d.next())if(e=e.value,je(e)){var f=ae(e);f.active=e==a;f.active||1==c||null==a||e.video!=a.video||e.audio!=a.audio||(f.active=!0);f.active&&c++;b.push(f)}return b}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map(function(g){return he(g)}):[]};
420
+ r.Bb=function(){if(this.i){for(var a=this.j?this.j.o:null,b=[],c=t(this.i.textStreams),d=c.next();!d.done;d=c.next()){d=d.value;var e=be(d);e.active=d==a;b.push(e)}return b}return this.g&&this.g.src&&this.g.textTracks?Wl(this).map(function(f){return fe(f)}):[]};r.ff=function(){return this.i?this.i.imageStreams.map(function(a){return ce(a)}):[]};
421
+ r.vf=function(a,b){var c=this,d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A;return K(function(G){if(1==G.g)return c.i?(d=c.i.imageStreams.find(function(E){return E.id==a}))?d.segmentIndex?G.A(3):u(G,d.createSegmentIndex(),3):G["return"](null):G.A(2);if(2!=G.g){e=d.segmentIndex.find(b);if(null==e)return G["return"](null);f=d.segmentIndex.get(e);g=f.tilesLayout||d.tilesLayout;h=/(\d+)x(\d+)/.exec(g);if(!h)return G["return"](null);k=d.width||0;l=d.height||0;m=parseInt(h[1],10);p=parseInt(h[2],10);n=k/m;q=l/p;
420
422
  v=m*p;y=f.j-f.startTime;x=f.l||y/v;w=f.startTime;C=D=0;1<v&&(A=Math.floor((b-f.startTime)/x),w=f.startTime+A*x,D=A%m*n,C=Math.floor(A/m)*q);return G["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:C,startTime:w,duration:x,uris:f.ya(),width:n})}return G["return"](null)})};
421
- r.Be=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Kk(this.s.h,b,!1),sj(this.j,b),im(this),this.Ma=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Xl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,ee(c)==a.id?c.mode=this.ha?"showing":"hidden":c.mode="disabled";im(this)}};
422
- r.Ce=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&ke(d)&&(El(this,d,!1,b,c),this.La=new we(d),Ml(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
423
- ee(c)==a.id){jm(this,c);break}};r.$e=function(){return km(this.gb())};r.tf=function(){return km(this.Bb())};r.Ze=function(){return Array.from(lm(this.gb()))};r.rf=function(){return Array.from(lm(this.Bb()))};
424
- r.Td=function(a,b){if(this.i&&this.D){this.La=new xe(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.La.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=be(f),this.Ce(c,!0)):hm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=R(a);f=d=null;e=
425
- t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=je(g);R(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?jm(this,f):d&&jm(this,d)}};
426
- r.Ud=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.Ma=a,this.Xb=b||"",this.Vb=c,(a=me(this.i.textStreams,this.Ma,this.Xb,this.Vb)[0]||null)&&a!=this.j.o&&(Kk(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.td()))sj(this.j,a),im(this)}else{var d=R(a);(a=this.Bb().find(function(e){return R(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Be(a)}};
427
- r.Uf=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.La=new xe(b.language,"",0,a),hm(this))}};r.td=function(){var a=this.ha;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Xl(this).some(function(b){return"showing"==b.mode}):a};r.pe=function(){return this.g&&this.g.src&&this.g.textTracks?mm(this).map(function(a){return ge(a)}):[]};
428
- r.bf=function(a){var b=R(a),c=mm(this).filter(function(f){return R(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Xl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
429
- function Zl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function mm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
430
- r.$f=function(a){a=!!a;if(this.ha!=a){this.ha=a;if(this.l==Jl)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=me(this.i.textStreams,this.Ma,this.Xb,this.Vb),0<a.length&&(sj(this.j,a[0]),im(this))):oj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Xl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Ql(this)}};
431
- r.pf=function(){if(!this.U())return null;var a=this.ua.l,b=0;if(this.D)b=this.D.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
432
- r.qe=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Ya=function(){if(this.l==Jl)return this.L.Ya();var a={total:[],audio:[],video:[],text:[]};this.l==Vl&&(a.total=Th(this.g.buffered));return a};
433
- r.getStats=function(){if(this.l!=Jl&&this.l!=Vl)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Bl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?
434
- b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.s,b=Number(a.totalVideoFrames),c.L=Number(a.droppedVideoFrames),c.I=b,this.s.G=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.I?a.I:NaN):a=NaN;this.s.m=a;if(this.l==Jl){if(a=this.j.l)this.s.s=(this.G?this.G.i:1)*a.bandwidth;a&&a.video&&(c=this.s,b=a.video.height||NaN,c.M=a.video.width||NaN,c.u=b);this.U()&&(a=this.qe().valueOf()+1E3*this.oc().end,this.s.C=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
435
- (this.s.F=this.i.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.s.o=a}var d=this.s;a=d.M;c=d.u;b=d.s;var e=d.I,f=d.L,g=d.G,h=d.o,k=d.i,l=d.l,m=d.D,p=d.j,n=Hk(d.g,"playing"),q=Hk(d.g,"paused"),v=Hk(d.g,"buffering"),y=d.m,x=d.C,w=d.F,D=Ik(d.g),C=[];d=t(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,C.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
423
+ r.Ce=function(a){if(this.i&&this.j){var b=this.i.textStreams.find(function(d){return d.id==a.id});b&&b!=this.j.o&&(Jk(this.s.h,b,!1),rj(this.j,b),hm(this),this.Ma=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=Wl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,de(c)==a.id?c.mode=this.ha?"showing":"hidden":c.mode="disabled";hm(this)}};
424
+ r.De=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;if(this.i&&this.j){this.h.abr.enabled&&Va("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=this.i.variants.find(function(e){return e.id==a.id});d&&je(d)&&(Dl(this,d,!1,b,c),this.La=new ve(d),Ll(this))}else if(this.g&&this.g.audioTracks)for(b=Array.from(this.g.audioTracks),b=t(b),c=b.next();!c.done;c=b.next())if(c=c.value,
425
+ de(c)==a.id){im(this,c);break}};r.af=function(){return jm(this.gb())};r.uf=function(){return jm(this.Bb())};r.$e=function(){return Array.from(km(this.gb()))};r.tf=function(){return Array.from(km(this.Bb()))};
426
+ r.Vd=function(a,b){if(this.i&&this.D){this.La=new we(a,b||"",0,"");var c=function(k,l){return k.video||l.video?k.video&&l.video?Math.abs((k.video.height||0)-(l.video.height||0))+Math.abs((k.video.width||0)-(l.video.width||0)):Infinity:0},d=this.j.l,e=this.La.create(this.i.variants),f=null;e=t(e.values());for(var g=e.next();!g.done;g=e.next())if(g=g.value,!f||c(f,d)>c(g,d))f=g;f?(c=ae(f),this.De(c,!0)):gm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=R(a);f=d=null;e=
427
+ t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=he(g);R(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?im(this,f):d&&im(this,d)}};
428
+ r.Wd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.D){if(this.Ma=a,this.Xb=b||"",this.Vb=c,(a=le(this.i.textStreams,this.Ma,this.Xb,this.Vb)[0]||null)&&a!=this.j.o&&(Jk(this.s.h,a,!1),this.h.streaming.alwaysStreamText||this.vd()))rj(this.j,a),hm(this)}else{var d=R(a);(a=this.Bb().find(function(e){return R(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Ce(a)}};
429
+ r.Vf=function(a){if(this.i&&this.D){for(var b=null,c=t(this.i.variants),d=c.next();!d.done;d=c.next())if(d=d.value,d.audio.label==a){b=d;break}null!=b&&(this.La=new we(b.language,"",0,a),gm(this))}};r.vd=function(){var a=this.ha;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Wl(this).some(function(b){return"showing"==b.mode}):a};r.qe=function(){return this.g&&this.g.src&&this.g.textTracks?lm(this).map(function(a){return fe(a)}):[]};
430
+ r.cf=function(a){var b=R(a),c=lm(this).filter(function(f){return R(f.language)==b});if(!c||!c.length)return[];a=[];c=t(c);for(var d=c.next();!d.done;d=c.next())if((d=d.value)&&d.cues){d=t(d.cues);for(var e=d.next();!e.done;e=d.next())e=e.value,a.push({title:e.text,startTime:e.startTime,endTime:e.endTime})}return a};function Wl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}
431
+ function Yl(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function lm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
432
+ r.ag=function(a){a=!!a;if(this.ha!=a){this.ha=a;if(this.l==Il)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=le(this.i.textStreams,this.Ma,this.Xb,this.Vb),0<a.length&&(rj(this.j,a[0]),hm(this))):nj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=Wl(this);b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"disabled"!=c.mode&&(c.mode=a?"showing":"hidden")}Pl(this)}};
433
+ r.qf=function(){if(!this.U())return null;var a=this.ua.l,b=0;if(this.D)b=this.D.m();else if(a){if(null==a.startTime)return new Date;b=a.startTime}return this.i?new Date(1E3*(this.i.presentationTimeline.l+b)):this.g&&this.g.getStartDate?(a=this.g.getStartDate(),isNaN(a.getTime())?null:new Date(a.getTime()+1E3*b)):null};
434
+ r.re=function(){if(!this.U())return null;if(this.i)return new Date(1E3*this.i.presentationTimeline.l);if(this.g&&this.g.getStartDate){var a=this.g.getStartDate();return isNaN(a.getTime())?null:a}return null};r.Ya=function(){if(this.l==Il)return this.L.Ya();var a={total:[],audio:[],video:[],text:[]};this.l==Ul&&(a.total=Sh(this.g.buffered));return a};
435
+ r.getStats=function(){if(this.l!=Il&&this.l!=Ul)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Al(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.s;b=Math.round(100*b);c.i=isNaN(c.i)?
436
+ b:Math.max(c.i,b)}a.getVideoPlaybackQuality&&(a=a.getVideoPlaybackQuality(),c=this.s,b=Number(a.totalVideoFrames),c.L=Number(a.droppedVideoFrames),c.I=b,this.s.G=Number(a.corruptedVideoFrames));this.m?(a=this.m,a=a.I?a.I:NaN):a=NaN;this.s.m=a;if(this.l==Il){if(a=this.j.l)this.s.s=(this.G?this.G.i:1)*a.bandwidth;a&&a.video&&(c=this.s,b=a.video.height||NaN,c.M=a.video.width||NaN,c.u=b);this.U()&&(a=this.re().valueOf()+1E3*this.pc().end,this.s.C=(Date.now()-a)/1E3);this.i&&this.i.presentationTimeline&&
437
+ (this.s.F=this.i.presentationTimeline.g);a=this.u.getBandwidthEstimate();this.s.o=a}var d=this.s;a=d.M;c=d.u;b=d.s;var e=d.I,f=d.L,g=d.G,h=d.o,k=d.i,l=d.l,m=d.D,p=d.j,n=Gk(d.g,"playing"),q=Gk(d.g,"paused"),v=Gk(d.g,"buffering"),y=d.m,x=d.C,w=d.F,D=Hk(d.g),C=[];d=t(d.h.g);for(var A=d.next();!A.done;A=d.next())A=A.value,C.push({timestamp:A.timestamp,id:A.id,type:A.type,fromAdaptation:A.fromAdaptation,bandwidth:A.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:e,droppedFrames:f,corruptedFrames:g,
436
438
  estimatedBandwidth:h,completionPercent:k,loadLatency:l,manifestTimeSeconds:m,drmTimeSeconds:p,playTime:n,pauseTime:q,bufferingTime:v,licenseTime:y,liveLatency:x,maxSegmentDuration:w,stateHistory:D,switchHistory:C}};
437
- r.Oe=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,q,v,y,x,w,D;return K(function(C){switch(C.g){case 1:if(h.l!=Jl&&h.l!=Vl)throw new N(1,7,7004);if(d){C.A(2);break}return u(C,nm(h,a),3);case 3:d=C.h;case 2:k=[];if(h.C)try{k=h.C.getServerSideCuePoints()}catch(A){}if(h.l!=Vl){C.A(4);break}g&&(c="forced");return u(C,om(h,a,b,c,d,f||"",k),5);case 5:l=h.Bb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Tl(h),C["return"](m);throw new N(1,2,2012);case 4:p=
438
- mc;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new N(1,4,4033);if(!k.length){C.A(6);break}return u(C,pm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=C.h,v=qm(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Yh(y),d="text/vtt";case 6:x={id:h.xe++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Qi(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.X,primary:!1,trickModeVideo:null,
439
- emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Zc(x.mimeType,x.codecs);D=ed(w);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(x);Tl(h);return C["return"](ce(x))}})};
440
- r.Ne=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Jl&&d.l!=Vl)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,nm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.C)try{e=d.C.getServerSideCuePoints()}catch(l){}return u(k,om(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.pe();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.o.oa(f,"load",l);d.o.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
441
- case 5:throw new N(1,2,2012);}})};function nm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=ig(b);if(d=rm[c])return e["return"](d);B(e,2);return u(e,kg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
442
- function om(a,b,c,d,e,f,g){var h,k,l,m;return K(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,pm(a,b,a.F,a.h.streaming.retryParameters),3):p.A(2);2!=p.g&&(h=p.h,k=qm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Yh(l),e="text/vtt");m=document.createElement("track");var n=a.W,q=b;try{if(n.g.enabled){var v=qk(n);v.ot=wk;v.su=!0;var y=sk(v);var x=tk(q,y)}else x=q}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),x=q}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
443
- a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p["return"](m)})}function pm(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=ef;f=Ze([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&ok(k,f,{ot:wk,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
444
- function qm(a,b,c,d){var e=fd[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fb(b),b=c.parseMedia(b,a),ck(b,d);throw new N(2,2,2014,c);}r.Xd=function(a,b){this.Gd.width=a;this.Gd.height=b};r.Qd=function(){if(this.l==Jl){var a=this.j;if(a.j.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,c.fc&&(c.fc=!1,nj(a,c,.1));a=!0}}else a=!1;return a};
445
- r.hf=function(){Va("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.jf=function(){return this.Nc};
446
- function Nk(a){var b=Ck();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.U()&&d.includes(c.code)&&(c.severity=1,a.Qd())};b.textDisplayFactory=function(){return a.Ec?new Vj(a.g,a.Ec):new Qj(a.g)};return b}r.Ge=function(a){this.Ec=a};
447
- function ul(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Ri;h={id:a.xe++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
448
- segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:lc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function tl(a,b){return K(function(c){if(1==c.g)return u(c,sm(a,b),2);gm(a,b);z(c)})}
449
- function sm(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Od(c,b),2);Sl(b);z(d)})}
450
- function gm(a,b){if(a.l!=cl){for(var c=a.h.restrictions,d=a.Gd,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Nd(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Tl(a);if((c=a.m?a.m.g:null)&&a.m.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
451
- f.next())g=g.value,Kf(a.m,g.initDataType,g.initData);tm(a,b)}}
452
- function Nl(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return K(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);p=(m=k.segmentIndex.zb(l))?m.next().value:null;if(!p)return q["return"](null);n=p.startTime;return q["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
453
- function nl(a){var b=a.sd();if(a.s&&a.M&&a.D){var c=a.G;c.j=b;Ti(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Bl(a)}b=(new Map).set("buffering",b);a.dispatchEvent($k(um,b))}function Cl(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=$k(vm),a.dispatchEvent(b))}function Bl(a){if(a.s&&a.M){var b=a.s.g;a.M.g==De?Gk(b,"buffering"):a.g.paused?Gk(b,"paused"):a.g.ended?Gk(b,"ended"):Gk(b,"playing")}}
454
- function Ml(a){try{tm(a,a.i)}catch(c){return ll(a,c),!1}var b=a.i.variants.filter(function(c){return ke(c)});b=a.La.create(b);a.u.setVariants(Array.from(b.values()));return!0}function hm(a){var b;(b=Ml(a)?a.u.chooseVariant():null)&&El(a,b,!0,!0,0)}
455
- function El(a,b,c,d,e){var f=a.j.l;if(b==f)d&&rj(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));rj(a.j,b,d,e);d=null;f&&(d=be(f));b=be(b);c?Ol(a,d,b):wm(a,d,b)}}function jm(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=je(c);var d=je(b);wm(a,c,d)}
456
- function Pl(a,b,c){a=R(a.h.preferredTextLanguage);b=R(b.language);c=R(c.language);return qd(c,a)&&!qd(b,c)}function Ol(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=$k(xm,b);ym(a,b)}function Tl(a){var b=$k(zm);ym(a,b)}function wm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=$k(Am,b);ym(a,b)}function im(a){var b=$k(Bm);ym(a,b)}function Ql(a){var b=$k(Cm);ym(a,b)}function Rl(a){var b=(new Map).set("newStatus",a.h.abr.enabled);ym(a,$k(Dm,b))}
457
- function ll(a,b){if(a.l!=cl){var c=$k(Em,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function ql(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent($k(b,c))}
458
- function kl(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
459
- function yl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Fm.includes(l)}h!=f.allowedByKeySystem&&
460
- (e=!0)}}}if(!e||Ml(a))(d=a.j.l)&&!d.allowedByKeySystem&&hm(a),e&&Tl(a)}}function zl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=$k(Gm);a.dispatchEvent(b)}function Dl(a,b,c){0<b&&(a.U()||a.Fe(b));b=a.getDuration();c<b&&(a.U()||a.Ia(c))}
461
- function tm(a,b){var c=a.m?a.m.Jc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var p=m.next();!p.done;p=m.next())if(p=p.value,p.keyIds.size){p=t(p.keyIds);for(var n=p.next();!n.done;n=p.next()){n=n.value;var q=c[d?"00":n];q?Fm.includes(q)&&h.add(q):g.add(n)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
462
- missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Sl(a){if(!a.variants.some(ke))throw new N(2,4,4032);}function ym(a,b){K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=cl&&a.dispatchEvent(b);z(c)})}function lm(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(R(c.language)):b.add("und");return b}
463
- function km(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=R(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),p=m.next();!p.done;p=m.next()){p=p.value;var n=null;c.has(l)&&c.get(l).has(p)&&(n=c.get(l).get(p));
464
- h.push({language:l,role:p,label:n})}});return h}function dl(){return new N(2,7,7E3)}function Zk(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Kj(){return{K:null,mimeType:null,startTime:null,$d:NaN,uri:null}}function el(a){return new Promise(function(b,c){a.lb=function(){return c(dl())};a.Rc=function(){return b()};a.onError=function(d){return c(d)};a.Tc=function(){return c(dl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Ge;
465
- U.prototype.getManifestParserFactory=U.prototype.jf;U.prototype.getManifest=U.prototype.hf;U.prototype.retryStreaming=U.prototype.Qd;U.prototype.setMaxHardwareResolution=U.prototype.Xd;U.prototype.addChaptersTrack=U.prototype.Ne;U.prototype.addTextTrackAsync=U.prototype.Oe;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ya;U.prototype.getPresentationStartTimeAsDate=U.prototype.qe;U.prototype.getPlayheadTimeAsDate=U.prototype.pf;
466
- U.prototype.setTextTrackVisibility=U.prototype.$f;U.prototype.getChapters=U.prototype.bf;U.prototype.getChaptersTracks=U.prototype.pe;U.prototype.isTextTrackVisible=U.prototype.td;U.prototype.selectVariantsByLabel=U.prototype.Uf;U.prototype.selectTextLanguage=U.prototype.Ud;U.prototype.selectAudioLanguage=U.prototype.Td;U.prototype.getTextLanguages=U.prototype.rf;U.prototype.getAudioLanguages=U.prototype.Ze;U.prototype.getTextLanguagesAndRoles=U.prototype.tf;
467
- U.prototype.getAudioLanguagesAndRoles=U.prototype.$e;U.prototype.selectVariantTrack=U.prototype.Ce;U.prototype.selectTextTrack=U.prototype.Be;U.prototype.getThumbnails=U.prototype.uf;U.prototype.getImageTracks=U.prototype.ef;U.prototype.getTextTracks=U.prototype.Bb;U.prototype.getVariantTracks=U.prototype.gb;U.prototype.cancelTrickPlay=U.prototype.Se;U.prototype.trickPlay=U.prototype.bg;U.prototype.getPlaybackRate=U.prototype.Kc;U.prototype.isBuffering=U.prototype.sd;U.prototype.getKeyStatuses=U.prototype.Jc;
468
- U.prototype.getExpiration=U.prototype.bc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.yf;U.prototype.seekRange=U.prototype.oc;U.prototype.isAudioOnly=U.prototype.Af;U.prototype.isInProgress=U.prototype.jb;U.prototype.isLive=U.prototype.U;U.prototype.getAdManager=U.prototype.oe;U.prototype.getAssetUri=U.prototype.qd;U.prototype.getNetworkingEngine=U.prototype.cc;U.prototype.getMediaElement=U.prototype.lf;
469
- U.prototype.getLoadMode=U.prototype.gf;U.prototype.resetConfiguration=U.prototype.Sf;U.prototype.getBufferFullness=U.prototype.af;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.gg;U.prototype.unload=U.prototype.ce;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Wb;
470
- U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?u(h,ag(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(qc()){for(var l in hg)k[l]=!0;for(var m in jg)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=qc()?!!hg[p]:rc(p);for(var n in l)k[n]=
471
- qc()?!!jg[n]:rc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ia(ri));
472
- k={};n=t(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=qc()?ed(l)?!0:MediaSource.isTypeSupported(l)||Uc(l):rc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Hm;for(g in f)e[g]=f[g]();return h["return"](e)})};
473
- U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");window.TextDecoder&&window.TextEncoder||Va("A TextDecoder/TextEncoder implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&window.TextDecoder&&window.TextEncoder&&Array.prototype.forEach)||uc("Trident/"))return!1;var a=Ac();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?
474
- !1:qc()?!0:rc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Pk=a};U.registerSupportPlugin=function(a,b){Hm[a]=b};U.prototype.destroy=U.prototype.destroy;
475
- var Dm="abrstatuschanged",xm="adaptation",um="buffering",bm="downloadfailed",am="downloadheadersreceived",Al="drmsessionupdate",Hj="emsg",Em="error",Gm="expirationupdated",il="loaded",fl="loading",vl="manifestparsed",sl="mediaqualitychanged",$l="metadata",al="onstatechange",bl="onstateidle",vm="ratechange",Ll="streaming",Bm="textchanged",Cm="texttrackvisibility",rl="timelineregionadded",dm="timelineregionenter",em="timelineregionexit",zm="trackschanged",ml="unloading",Am="variantchanged",Im={jg:Dm,
476
- kg:xm,lg:um,ng:bm,og:am,pg:Al,rg:Hj,Error:Em,sg:Gm,ug:il,vg:fl,xg:vl,yg:sl,Metadata:$l,Ag:al,Bg:bl,Cg:vm,Eg:"sessiondata",Fg:Ll,Gg:Bm,Hg:Cm,Ig:rl,Jg:dm,Kg:em,Lg:zm,Ng:ml,Og:Am},cl=0,Mk=1,Jl=2,Vl=3;U.LoadMode={DESTROYED:cl,NOT_LOADED:Mk,MEDIA_SOURCE:Jl,SRC_EQUALS:Vl};U.version="v4.0.4";
477
- var Fm=["output-restricted","internal-error"],Hm={},Pk=null,jl={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},rm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
478
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Jm(){this.h=[];this.j=this.i=this.g=0};function V(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new hf;this.j.B(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.B(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
439
+ r.Pe=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,p,n,q,v,y,x,w,D;return K(function(C){switch(C.g){case 1:if(h.l!=Il&&h.l!=Ul)throw new N(1,7,7004);if(d){C.A(2);break}return u(C,mm(h,a),3);case 3:d=C.h;case 2:k=[];if(h.C)try{k=h.C.getServerSideCuePoints()}catch(A){}if(h.l!=Ul){C.A(4);break}g&&(c="forced");return u(C,nm(h,a,b,c,d,f||"",k),5);case 5:l=h.Bb();if(m=l.find(function(A){return A.language==b&&A.label==(f||"")&&A.kind==c}))return Sl(h),C["return"](m);throw new N(1,2,2012);case 4:p=
440
+ mc;n=h.i.presentationTimeline.getDuration();if(Infinity==n)throw new N(1,4,4033);if(!k.length){C.A(6);break}return u(C,om(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=C.h,v=pm(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Xh(y),d="text/vtt";case 6:x={id:h.ye++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Pi(0,n,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:p.X,primary:!1,trickModeVideo:null,
441
+ emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Yc(x.mimeType,x.codecs);D=dd(w);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(x);Sl(h);return C["return"](be(x))}})};
442
+ r.Oe=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=Il&&d.l!=Ul)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,mm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.C)try{e=d.C.getServerSideCuePoints()}catch(l){}return u(k,nm(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.qe();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.o.oa(f,"load",l);d.o.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
443
+ case 5:throw new N(1,2,2012);}})};function mm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=hg(b);if(d=qm[c])return e["return"](d);B(e,2);return u(e,jg(b,a.F,a.h.streaming.retryParameters),4);case 4:d=e.h;va(e,3);break;case 2:F(e);case 3:if(d)return e["return"](d);throw new N(1,2,2011,c);}})}
444
+ function nm(a,b,c,d,e,f,g){var h,k,l,m;return K(function(p){if(1==p.g)return"text/vtt"!=e||g.length?u(p,om(a,b,a.F,a.h.streaming.retryParameters),3):p.A(2);2!=p.g&&(h=p.h,k=pm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Xh(l),e="text/vtt");m=document.createElement("track");var n=a.W,q=b;try{if(n.g.enabled){var v=pk(n);v.ot=vk;v.su=!0;var y=rk(v);var x=sk(q,y)}else x=q}catch(w){Wa("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",w),x=q}m.src=x;m.label=f;m.kind=d;m.srclang=c;a.g.getAttribute("crossorigin")||
445
+ a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return p["return"](m)})}function om(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=df;f=Ye([b],d);f.method="GET";var k=a.W;try{k.g.enabled&&nk(k,f,{ot:vk,su:!0})}catch(l){Wa("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return u(h,c.request(e,f).promise,2)}g=h.h;return h["return"](g.data)})}
446
+ function pm(a,b,c,d){var e=ed[c];if(e)return c=e(),a={periodStart:0,segmentStart:0,segmentEnd:a.g.duration,vttOffset:0},b=Fb(b),b=c.parseMedia(b,a),bk(b,d);throw new N(2,2,2014,c);}r.Zd=function(a,b){this.Id.width=a;this.Id.height=b};r.Sd=function(){if(this.l==Il){var a=this.j;if(a.j.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.h.values()),c=b.next();!c.done;c=b.next())c=c.value,c.fc&&(c.fc=!1,mj(a,c,.1));a=!0}}else a=!1;return a};
447
+ r.jf=function(){Va("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for.");return this.i};r.kf=function(){return this.Oc};
448
+ function Mk(a){var b=Bk();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.U()&&d.includes(c.code)&&(c.severity=1,a.Sd())};b.textDisplayFactory=function(){return a.Fc?new Uj(a.g,a.Fc):new Pj(a.g)};return b}r.He=function(a){this.Fc=a};
449
+ function tl(a,b){for(var c=new Set,d=t(b.textStreams),e=d.next();!e.done;e=d.next())e=e.value,"application/cea-608"!=e.mimeType&&"application/cea-708"!=e.mimeType||c.add(e.originalId);d=t(b.variants);for(e=d.next();!e.done;e=d.next())if((e=e.value.video)&&e.closedCaptions)for(var f=t(e.closedCaptions.keys()),g=f.next();!g.done;g=f.next())if(g=g.value,!c.has(g)){var h=g.startsWith("CC")?"application/cea-608":"application/cea-708",k=new Qi;h={id:a.ye++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
450
+ segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:lc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:e.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};b.textStreams.push(h);c.add(g)}}function sl(a,b){return K(function(c){if(1==c.g)return u(c,rm(a,b),2);fm(a,b);z(c)})}
451
+ function rm(a,b){var c;return K(function(d){if(1==d.g)return c=a.j?a.j.l:null,u(d,Nd(c,b),2);Rl(b);z(d)})}
452
+ function fm(a,b){if(a.l!=bl){for(var c=a.h.restrictions,d=a.Id,e=!1,f=t(b.variants),g=f.next();!g.done;g=f.next()){g=g.value;var h=g.allowedByApplication;g.allowedByApplication=Md(g,c,d);h!=g.allowedByApplication&&(e=!0)}e&&a.j&&Sl(a);if((c=a.m?a.m.g:null)&&a.m.s)for(d=t(b.variants),e=d.next();!e.done;e=d.next())for(e=e.value,e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])),f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem)for(f=t(f.initData||[]),g=f.next();!g.done;g=
453
+ f.next())g=g.value,Jf(a.m,g.initDataType,g.initData);sm(a,b)}}
454
+ function Ml(a,b){var c,d,e,f,g;return K(function(h){if(1==h.g)return c=a.audio,d=a.video,e=function(k,l){var m,p,n;return K(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);p=(m=k.segmentIndex.zb(l))?m.next().value:null;if(!p)return q["return"](null);n=p.startTime;return q["return"](n)})},u(h,e(c,b),2);if(3!=h.g)return f=h.h,u(h,e(d,b),3);g=h.h;return null!=g&&null!=f?h["return"](Math.max(g,f)):null!=g?h["return"](g):null!=f?h["return"](f):h["return"](b)})}
455
+ function ml(a){var b=a.ud();if(a.s&&a.M&&a.D){var c=a.G;c.j=b;Si(c);a.W&&(c=a.W,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Al(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Zk(tm,b))}function Bl(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Zk(um),a.dispatchEvent(b))}function Al(a){if(a.s&&a.M){var b=a.s.g;a.M.g==Ce?Fk(b,"buffering"):a.g.paused?Fk(b,"paused"):a.g.ended?Fk(b,"ended"):Fk(b,"playing")}}
456
+ function Ll(a){try{sm(a,a.i)}catch(c){return kl(a,c),!1}var b=a.i.variants.filter(function(c){return je(c)});b=a.La.create(b);a.u.setVariants(Array.from(b.values()));return!0}function gm(a){var b;(b=Ll(a)?a.u.chooseVariant():null)&&Dl(a,b,!0,!0,0)}
457
+ function Dl(a,b,c,d,e){var f=a.j.l;if(b==f)d&&qj(a.j,b,d,e,!0);else{var g=a.s.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));qj(a.j,b,d,e);d=null;f&&(d=ae(f));b=ae(b);c?Nl(a,d,b):vm(a,d,b)}}function im(a,b){var c=Array.from(a.g.audioTracks).find(function(e){return e.enabled});b.enabled=!0;b.id!==c.id&&(c.enabled=!1);c=he(c);var d=he(b);vm(a,c,d)}
458
+ function Ol(a,b,c){a=R(a.h.preferredTextLanguage);b=R(b.language);c=R(c.language);return pd(c,a)&&!pd(b,c)}function Nl(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Zk(wm,b);xm(a,b)}function Sl(a){var b=Zk(ym);xm(a,b)}function vm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Zk(zm,b);xm(a,b)}function hm(a){var b=Zk(Am);xm(a,b)}function Pl(a){var b=Zk(Bm);xm(a,b)}function Ql(a){var b=(new Map).set("newStatus",a.h.abr.enabled);xm(a,Zk(Cm,b))}
459
+ function kl(a,b){if(a.l!=bl){var c=Zk(Dm,(new Map).set("detail",b));a.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}}function pl(a,b,c){c=(new Map).set("detail",{schemeIdUri:c.schemeIdUri,value:c.value,startTime:c.startTime,endTime:c.endTime,id:c.id,eventElement:c.eventElement});a.dispatchEvent(Zk(b,c))}
460
+ function jl(a){if(!a.g.error)return null;var b=a.g.error.code;if(1==b)return null;var c=a.g.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new N(2,3,3016,b,c,a.g.error.message)}
461
+ function xl(a,b){if(a.j){var c=Object.keys(b),d=1==c.length&&"00"==c[0],e=!1;if(c.length){c=t(a.i.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=[];f.audio&&g.push(f.audio);f.video&&g.push(f.video);g=t(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=t(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,l=b[d?"00":l],f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!Em.includes(l)}h!=f.allowedByKeySystem&&
462
+ (e=!0)}}}if(!e||Ll(a))(d=a.j.l)&&!d.allowedByKeySystem&&gm(a),e&&Sl(a)}}function yl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Zk(Fm);a.dispatchEvent(b)}function Cl(a,b,c){0<b&&(a.U()||a.Ge(b));b=a.getDuration();c<b&&(a.U()||a.Ia(c))}
463
+ function sm(a,b){var c=a.m?a.m.Kc():{},d=Object.keys(c);d=d.length&&"00"==d[0];for(var e=!1,f=!1,g=new Set,h=new Set,k=t(b.variants),l=k.next();!l.done;l=k.next()){l=l.value;var m=[];l.audio&&m.push(l.audio);l.video&&m.push(l.video);m=t(m);for(var p=m.next();!p.done;p=m.next())if(p=p.value,p.keyIds.size){p=t(p.keyIds);for(var n=p.next();!n.done;n=p.next()){n=n.value;var q=c[d?"00":n];q?Em.includes(q)&&h.add(q):g.add(n)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
464
+ missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function Rl(a){if(!a.variants.some(je))throw new N(2,4,4032);}function xm(a,b){K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=bl&&a.dispatchEvent(b);z(c)})}function km(a){var b=new Set;a=t(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.language?b.add(R(c.language)):b.add("und");return b}
465
+ function jm(a){var b=new Map,c=new Map;a=t(a);for(var d=a.next();!d.done;d=a.next()){d=d.value;var e="und",f=[];d.language&&(e=R(d.language));"variant"==d.type?f=d.audioRoles:f=d.roles;f&&f.length||(f=[""]);b.has(e)||b.set(e,new Set);f=t(f);for(var g=f.next();!g.done;g=f.next())g=g.value,b.get(e).add(g),d.label&&(c.has(e)||c.set(e,new Map),c.get(e).set(g,d.label))}var h=[];b.forEach(function(k,l){for(var m=t(k),p=m.next();!p.done;p=m.next()){p=p.value;var n=null;c.has(l)&&c.get(l).has(p)&&(n=c.get(l).get(p));
466
+ h.push({language:l,role:p,label:n})}});return h}function cl(){return new N(2,7,7E3)}function Yk(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function Jj(){return{K:null,mimeType:null,startTime:null,be:NaN,uri:null}}function dl(a){return new Promise(function(b,c){a.lb=function(){return c(cl())};a.Sc=function(){return b()};a.onError=function(d){return c(d)};a.Uc=function(){return c(cl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.He;
467
+ U.prototype.getManifestParserFactory=U.prototype.kf;U.prototype.getManifest=U.prototype.jf;U.prototype.retryStreaming=U.prototype.Sd;U.prototype.setMaxHardwareResolution=U.prototype.Zd;U.prototype.addChaptersTrack=U.prototype.Oe;U.prototype.addTextTrackAsync=U.prototype.Pe;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ya;U.prototype.getPresentationStartTimeAsDate=U.prototype.re;U.prototype.getPlayheadTimeAsDate=U.prototype.qf;
468
+ U.prototype.setTextTrackVisibility=U.prototype.ag;U.prototype.getChapters=U.prototype.cf;U.prototype.getChaptersTracks=U.prototype.qe;U.prototype.isTextTrackVisible=U.prototype.vd;U.prototype.selectVariantsByLabel=U.prototype.Vf;U.prototype.selectTextLanguage=U.prototype.Wd;U.prototype.selectAudioLanguage=U.prototype.Vd;U.prototype.getTextLanguages=U.prototype.tf;U.prototype.getAudioLanguages=U.prototype.$e;U.prototype.getTextLanguagesAndRoles=U.prototype.uf;
469
+ U.prototype.getAudioLanguagesAndRoles=U.prototype.af;U.prototype.selectVariantTrack=U.prototype.De;U.prototype.selectTextTrack=U.prototype.Ce;U.prototype.getThumbnails=U.prototype.vf;U.prototype.getImageTracks=U.prototype.ff;U.prototype.getTextTracks=U.prototype.Bb;U.prototype.getVariantTracks=U.prototype.gb;U.prototype.cancelTrickPlay=U.prototype.Te;U.prototype.trickPlay=U.prototype.cg;U.prototype.getPlaybackRate=U.prototype.Lc;U.prototype.isBuffering=U.prototype.ud;U.prototype.getKeyStatuses=U.prototype.Kc;
470
+ U.prototype.getExpiration=U.prototype.bc;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.zf;U.prototype.seekRange=U.prototype.pc;U.prototype.isAudioOnly=U.prototype.Bf;U.prototype.isInProgress=U.prototype.jb;U.prototype.isLive=U.prototype.U;U.prototype.getAdManager=U.prototype.pe;U.prototype.getAssetUri=U.prototype.sd;U.prototype.getNetworkingEngine=U.prototype.cc;U.prototype.getMediaElement=U.prototype.mf;
471
+ U.prototype.getLoadMode=U.prototype.hf;U.prototype.resetConfiguration=U.prototype.Tf;U.prototype.getBufferFullness=U.prototype.bf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.hg;U.prototype.unload=U.prototype.ee;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Wb;
472
+ U.probeSupport=function(a){a=void 0===a?!0:a;var b,c,d,e,f,g;return K(function(h){if(1==h.g)return b={},a?u(h,$f(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(qc()){for(var l in gg)k[l]=!0;for(var m in ig)k[m]=!0}l={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};m=t(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]);for(var p=m.next();!p.done;p=m.next())p=p.value,k[p]=qc()?!!gg[p]:rc(p);for(var n in l)k[n]=
473
+ qc()?!!ig[n]:rc(l[n]);c=k;n='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(ia(qi));
474
+ k={};n=t(n);for(l=n.next();!l.done;l=n.next())l=l.value,k[l]=qc()?dd(l)?!0:MediaSource.isTypeSupported(l)||Tc(l):rc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Gm;for(g in f)e[g]=f[g]();return h["return"](e)})};
475
+ U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||uc("Trident/"))return!1;var a=Ac();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:qc()?!0:rc("application/x-mpegurl")};U.setAdManagerFactory=function(a){Ok=a};
476
+ U.registerSupportPlugin=function(a,b){Gm[a]=b};U.prototype.destroy=U.prototype.destroy;
477
+ var Cm="abrstatuschanged",wm="adaptation",tm="buffering",am="downloadfailed",$l="downloadheadersreceived",zl="drmsessionupdate",Gj="emsg",Dm="error",Fm="expirationupdated",hl="loaded",el="loading",ul="manifestparsed",rl="mediaqualitychanged",Zl="metadata",$k="onstatechange",al="onstateidle",um="ratechange",Kl="streaming",Am="textchanged",Bm="texttrackvisibility",ql="timelineregionadded",cm="timelineregionenter",dm="timelineregionexit",ym="trackschanged",ll="unloading",zm="variantchanged",Hm={kg:Cm,
478
+ lg:wm,mg:tm,og:am,pg:$l,qg:zl,sg:Gj,Error:Dm,tg:Fm,vg:hl,wg:el,yg:ul,zg:rl,Metadata:Zl,Bg:$k,Cg:al,Dg:um,Fg:"sessiondata",Gg:Kl,Hg:Am,Ig:Bm,Jg:ql,Kg:cm,Lg:dm,Mg:ym,Og:ll,Pg:zm},bl=0,Lk=1,Il=2,Ul=3;U.LoadMode={DESTROYED:bl,NOT_LOADED:Lk,MEDIA_SOURCE:Il,SRC_EQUALS:Ul};U.version="v4.0.5";
479
+ var Em=["output-restricted","internal-error"],Gm={},Ok=null,il={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},qm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
480
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function Im(){this.h=[];this.j=this.i=this.g=0};function V(a,b,c){var d=this;this.h=a;this.g=b;this.m=c;this.i=!1;this.l=this.g.getVolume();this.j=new gf;this.j.B(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.B(this.g,google.ima.AdEvent.Type.RESUMED,function(){d.i=!1})}r=V.prototype;r.getDuration=function(){return this.h.getDuration()};r.getMinSuggestedDuration=function(){return this.h.getMinSuggestedDuration()};r.getRemainingTime=function(){return this.g.getRemainingTime()};r.isPaused=function(){return this.i};
479
481
  r.isSkippable=function(){return 0<=this.h.getSkipTimeOffset()};r.getTimeUntilSkippable=function(){var a=this.h.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};r.canSkipNow=function(){return this.g.getAdSkippableState()};r.skip=function(){return this.g.skip()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.resume()};r.getVolume=function(){return this.g.getVolume()};r.setVolume=function(a){return this.g.setVolume(a)};r.isMuted=function(){return 0==this.g.getVolume()};
480
482
  r.isLinear=function(){return this.h.isLinear()};r.resize=function(a,b){var c=!1,d=this.m;document.fullscreenEnabled?c=!!document.fullscreenElement:d.webkitSupportsFullscreen&&(c=d.webkitDisplayingFullscreen);this.g.resize(a,b,c?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)};r.setMuted=function(a){a?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)};r.getSequenceLength=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getTotalAds()};
481
483
  r.getPositionInSequence=function(){var a=this.h.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=null};M("shaka.ads.ClientSideAd",V);V.prototype.release=V.prototype.release;V.prototype.getPositionInSequence=V.prototype.getPositionInSequence;V.prototype.getSequenceLength=V.prototype.getSequenceLength;V.prototype.setMuted=V.prototype.setMuted;V.prototype.resize=V.prototype.resize;V.prototype.isLinear=V.prototype.isLinear;V.prototype.isMuted=V.prototype.isMuted;
482
484
  V.prototype.setVolume=V.prototype.setVolume;V.prototype.getVolume=V.prototype.getVolume;V.prototype.play=V.prototype.play;V.prototype.pause=V.prototype.pause;V.prototype.skip=V.prototype.skip;V.prototype.canSkipNow=V.prototype.canSkipNow;V.prototype.getTimeUntilSkippable=V.prototype.getTimeUntilSkippable;V.prototype.isSkippable=V.prototype.isSkippable;V.prototype.isPaused=V.prototype.isPaused;V.prototype.getRemainingTime=V.prototype.getRemainingTime;V.prototype.getMinSuggestedDuration=V.prototype.getMinSuggestedDuration;
483
- V.prototype.getDuration=V.prototype.getDuration;function Km(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.j=d;this.m=null;this.h=new hf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.l=new google.ima.AdsLoader(a);this.l.getSettings().setPlayerType("shaka-player");this.l.getSettings().setPlayerVersion("v4.0.4");this.g=null;this.h.oa(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Lm(e,f)});this.h.B(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,
484
- function(f){Mm(e,f)});this.i.onended=function(){e.l.contentComplete()}}Km.prototype.stop=function(){this.g&&this.g.stop();this.o&&Uj(this.o)};Km.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.l.destroy()};function Mm(a,b){b.getError();Nm(a,null);a.j(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
485
- function Lm(a,b){a.j(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.j(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.j(new S("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Om(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Pm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.B(a.i,"loadeddata",
486
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Pm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Pm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){Nm(a,null)}}function Pm(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
487
- function Om(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.j(new S(d,e))}a.h.B(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Mm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Qm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.STARTED,function(c){Qm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.B(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.B(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
488
- function(c){b(c,"ad-third-quartile")});a.h.B(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.B(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Nm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Nm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.B(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.B(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
489
- a.h.B(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.m.i=!0;b(c,"ad-paused")});a.h.B(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.m.i=!1;b(c,"ad-resumed")});a.h.B(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.B(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.B(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.B(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.B(a.g,
485
+ V.prototype.getDuration=V.prototype.getDuration;function Jm(a,b,c,d){var e=this;this.o=a;this.i=b;this.s=null;this.u=NaN;this.l=d;this.j=null;this.h=new gf;google.ima.settings.setLocale(c);a=new google.ima.AdDisplayContainer(this.o,this.i);a.initialize();this.m=new google.ima.AdsLoader(a);this.m.getSettings().setPlayerType("shaka-player");this.m.getSettings().setPlayerVersion("v4.0.5");this.g=null;this.h.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Km(e,f)});this.h.B(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
486
+ function(f){Lm(e,f)});this.i.onended=function(){e.m.contentComplete()}}Jm.prototype.stop=function(){this.g&&this.g.stop();this.o&&Tj(this.o)};Jm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Lm(a,b){b.getError();Mm(a,null);a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
487
+ function Km(a,b){a.l(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new S("ima-ad-manager-loaded",(new Map).set("imaAdManager",a.g)));var c=a.g.getCuePoints();if(c.length){var d=[];c=t(c);for(var e=c.next();!e.done;e=c.next())d.push({start:e.value,end:null});a.l(new S("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Nm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Om(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.B(a.i,"loadeddata",
488
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Om(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),"ResizeObserver"in window&&(a.s=new ResizeObserver(function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Om(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)),a.g.start()}catch(f){Mm(a,null)}}function Om(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
489
+ function Nm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new S(d,e))}a.h.B(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Lm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Pm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.STARTED,function(c){Pm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.B(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.B(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
490
+ function(c){b(c,"ad-third-quartile")});a.h.B(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.B(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Mm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Mm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.B(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.B(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
491
+ a.h.B(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.B(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.B(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.B(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.B(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.B(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.B(a.g,
490
492
  google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.B(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.B(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.B(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.B(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.B(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.B(a.g,google.ima.AdEvent.Type.AD_METADATA,
491
- function(c){b(c,"ad-metadata")});a.h.B(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.B(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.B(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Qm(a,b){var c=b.getAd();a.m=new V(c,a.g,a.i);c=(new Map).set("ad",a.m).set("sdkAdObject",c).set("originalEvent",b);a.j(new S("ad-started",c));a.m.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
492
- function Nm(a,b){a.j(new S("ad-stopped",(new Map).set("originalEvent",b)));a.m.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
493
+ function(c){b(c,"ad-metadata")});a.h.B(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.B(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.B(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Pm(a,b){var c=b.getAd();a.j=new V(c,a.g,a.i);c=(new Map).set("ad",a.j).set("sdkAdObject",c).set("originalEvent",b);a.l(new S("ad-started",c));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
494
+ function Mm(a,b){a.l(new S("ad-stopped",(new Map).set("originalEvent",b)));a.j&&a.j.isLinear()&&(a.o.removeAttribute("ad-active"),a.i.play())};function W(a,b){this.i=a;this.h=null;this.g=b}r=W.prototype;r.getDuration=function(){return this.h?this.h.duration:-1};r.getMinSuggestedDuration=function(){return this.getDuration()};r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1};r.isPaused=function(){return this.g.paused};r.isSkippable=function(){return this.i.isSkippable()};r.getTimeUntilSkippable=function(){var a=this.i.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};
493
495
  r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()};r.skip=function(){this.g.currentTime+=this.getRemainingTime()};r.pause=function(){return this.g.pause()};r.play=function(){return this.g.play()};r.getVolume=function(){return this.g.volume};r.setVolume=function(a){this.g.volume=a};r.isMuted=function(){return this.g.muted};r.isLinear=function(){return!0};r.resize=function(){};r.setMuted=function(a){this.g.muted=a};
494
496
  r.getSequenceLength=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getTotalAds()};r.getPositionInSequence=function(){var a=this.i.getAdPodInfo();return null==a?1:a.getAdPosition()};r.release=function(){this.g=this.h=this.i=null};M("shaka.ads.ServerSideAd",W);W.prototype.release=W.prototype.release;W.prototype.getPositionInSequence=W.prototype.getPositionInSequence;W.prototype.getSequenceLength=W.prototype.getSequenceLength;W.prototype.setMuted=W.prototype.setMuted;W.prototype.resize=W.prototype.resize;
495
497
  W.prototype.isLinear=W.prototype.isLinear;W.prototype.isMuted=W.prototype.isMuted;W.prototype.setVolume=W.prototype.setVolume;W.prototype.getVolume=W.prototype.getVolume;W.prototype.play=W.prototype.play;W.prototype.pause=W.prototype.pause;W.prototype.skip=W.prototype.skip;W.prototype.canSkipNow=W.prototype.canSkipNow;W.prototype.getTimeUntilSkippable=W.prototype.getTimeUntilSkippable;W.prototype.isSkippable=W.prototype.isSkippable;W.prototype.isPaused=W.prototype.isPaused;
496
- W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Rm(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.C="";this.D=[];this.h=new hf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Sm(e,f)});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
498
+ W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Qm(a,b,c,d){var e=this;this.s=a;this.l=b;this.j=null;this.G=NaN;this.i=d;this.F=!1;this.u=this.m=this.o=null;this.C="";this.D=[];this.h=new gf;a=new google.ima.dai.api.UiSettings;a.setLocale(c);this.g=new google.ima.dai.api.StreamManager(this.l,this.s,a);this.i(new S("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Rm(e,f)});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
497
499
  e.j.resolve(e.C):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(f){f=f.getAd();e.m=new W(f,e.l);e.u&&(e.m.h=e.u);e.i(new S("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
498
500
  var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(f){e.u=f.getStreamData().adProgressData;e.m&&(e.m.h=e.u)});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new S("ad-first-quartile"))});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new S("ad-midpoint"))});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new S("ad-third-quartile"))});
499
501
  this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new S("ad-complete"));e.i(new S("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new S("ad-skipped"));e.i(new S("ad-stopped"))});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(f){var g=f.getStreamData();f=[];g=t(g.cuepoints);for(var h=g.next();!h.done;h=g.next())h=h.value,f.push({start:h.start,end:h.end});e.D=
500
- f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Rm.prototype.stop=function(){this.C="";this.o=null;this.D=[]};Rm.prototype.release=function(){this.stop();this.h&&this.h.release()};Rm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
501
- function Sm(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.B(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){Qe.call(this);this.g=this.i=null;this.h=new Jm;this.j=navigator.language}pa(X,Qe);r=X.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new Km(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
502
- r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Qe.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.h=new Jm};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.l.requestAds(a)};
503
- r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Rm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
504
- r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.0.4";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
505
- (c.F=!0),c.j=new nc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.0.4";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
502
+ f;e.i(new S("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Qm.prototype.stop=function(){this.C="";this.o=null;this.D=[]};Qm.prototype.release=function(){this.stop();this.h&&this.h.release()};Qm.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
503
+ function Rm(a,b){a.i(new S("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.G)));var c=b.getStreamData().url;a.j.resolve(c);a.j=null;a.F||a.h.B(a.l,"seeked",function(){var d=a.l.currentTime;if(0!=d){a.g.streamTimeForContentTime(d);var e=a.g.previousCuePointForStreamTime(d);e&&!e.played&&(a.o=d,a.l.currentTime=e.start)}})};function X(){Pe.call(this);this.g=this.i=null;this.h=new Im;this.j=navigator.language}pa(X,Pe);r=X.prototype;r.setLocale=function(a){this.j=a};r.initClientSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.AdsLoader)throw new N(2,10,1E4);this.i&&this.i.release();this.i=new Jm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
504
+ r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);Pe.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new S("ad-stopped"));this.h=new Im};r.requestClientSideAds=function(a){if(!this.i)throw new N(1,10,10001);var b=this.i;b.u=Date.now()/1E3;b.m.requestAds(a)};
505
+ r.initServerSide=function(a,b){var c=this;if(!window.google||!google.ima||!google.ima.dai)throw new N(2,10,10002);this.g&&this.g.release();this.g=new Qm(a,b,this.j,function(d){if(d&&d.type)switch(d.type){case "ads-loaded":c.h.h.push(d.loadTime);break;case "ad-started":c.h.g++;break;case "ad-complete":c.h.i++;break;case "ad-skipped":c.h.j++}c.dispatchEvent(d)})};
506
+ r.requestServerSideStream=function(a,b){b=void 0===b?"":b;if(!this.g)throw new N(1,10,10003);a.adTagParameters||(a.adTagParameters={});var c=a.adTagParameters;(c.mpt||c.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.adTagParameters.mpt="shaka-player";a.adTagParameters.mpv="v4.0.5";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
507
+ (c.F=!0),c.j=new nc,c.g.requestStream(a),c.C=d||"",c.G=Date.now()/1E3,c=c.j);return c};r.replaceServerSideAdTagParameters=function(a){if(!this.g)throw new N(1,10,10003);(a.mpt||a.mpv)&&Va('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.');a.mpt="Shaka Player";a.mpv="v4.0.5";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
506
508
  r.getStats=function(){var a=this.h;return{loadTimes:a.h,started:a.g,playedCompletely:a.i,skipped:a.j}};r.onDashTimedMetadata=function(a){if(this.g&&"urn:google:dai:2018"==a.schemeIdUri){var b=a.schemeIdUri,c=a.eventElement?a.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(b,c,a.startTime)}};r.onHlsTimedMetadata=function(a,b){this.g&&this.g.g.processMetadata("ID3",a.data,b)};r.onCueMetadataChange=function(a){if(this.g)this.g.onCueMetadataChange(a)};M("shaka.ads.AdManager",X);
507
509
  X.prototype.onCueMetadataChange=X.prototype.onCueMetadataChange;X.prototype.onHlsTimedMetadata=X.prototype.onHlsTimedMetadata;X.prototype.onDashTimedMetadata=X.prototype.onDashTimedMetadata;X.prototype.getStats=X.prototype.getStats;X.prototype.getServerSideCuePoints=X.prototype.getServerSideCuePoints;X.prototype.replaceServerSideAdTagParameters=X.prototype.replaceServerSideAdTagParameters;X.prototype.requestServerSideStream=X.prototype.requestServerSideStream;X.prototype.initServerSide=X.prototype.initServerSide;
508
510
  X.prototype.requestClientSideAds=X.prototype.requestClientSideAds;X.prototype.onAssetUnload=X.prototype.onAssetUnload;X.prototype.release=X.prototype.release;X.prototype.initClientSide=X.prototype.initClientSide;X.prototype.setLocale=X.prototype.setLocale;X.ADS_LOADED="ads-loaded";X.AD_STARTED="ad-started";X.AD_FIRST_QUARTILE="ad-first-quartile";X.AD_MIDPOINT="ad-midpoint";X.AD_THIRD_QUARTILE="ad-third-quartile";X.AD_COMPLETE="ad-complete";X.AD_STOPPED="ad-stopped";X.AD_SKIPPED="ad-skipped";
509
511
  X.AD_VOLUME_CHANGED="ad-volume-changed";X.AD_MUTED="ad-muted";X.AD_PAUSED="ad-paused";X.AD_RESUMED="ad-resumed";X.AD_SKIP_STATE_CHANGED="ad-skip-state-changed";X.CUEPOINTS_CHANGED="ad-cue-points-changed";X.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded";X.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded";X.AD_CLICKED="ad-clicked";X.AD_PROGRESS="ad-progress";X.AD_BUFFERING="ad-buffering";X.AD_IMPRESSION="ad-impression";X.AD_DURATION_CHANGED="ad-duration-changed";X.AD_CLOSED="ad-closed";
510
- X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";Pk=function(){return new X};function Tm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
511
- TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Th(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
512
- function Um(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Vm(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
513
- function Vm(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
514
- var Wm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Xm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Ym=["loop","playbackRate"],Zm=["pause","play"],$m={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
515
- getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},an={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},bn=[["getConfiguration","configure"]],cn=[["isTextTrackVisible","setTextTrackVisibility"]],dn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
516
- en=["attach","detach","load","unload"];function fn(a,b,c,d,e,f){var g=this;this.G=a;this.j=new O(b);this.R=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.M="";this.o=null;this.C=function(){return gn(g)};this.D=function(h,k){var l=Um(k);switch(l.type){case "event":var m=l.targetName;l=Pe(l.event);g.s(m,l);break;case "update":m=l.update;for(var p in m){l=g.g[p]||{};for(var n in m[p])l[n]=m[p][n]}g.u&&(g.R(),g.u=!1);break;case "asyncComplete":if(p=l.id,l=l.error,n=g.i[p],delete g.i[p],n)if(l){p=new N(l.severity,l.category,l.code);
517
- for(m in l)p[m]=l[m];n.reject(p)}else n.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;hn.add(this)}r=fn.prototype;r.destroy=function(){hn["delete"](this);jn(this);kn&&ln(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.C=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.ra=function(){return this.h};r.Od=function(){return this.M};
518
- r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Jb();var a=new chrome.cast.SessionRequest(this.G);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(hn),d=c.next();!d.done;d=c.next())mn(d.value,b)},function(b){for(var c=t(hn),d=c.next();!d.done;d=c.next())d=d.value,nn="available"==b,d.j.Jb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});nn&&this.j.S(on);(a=kn)&&a.status!=chrome.cast.SessionStatus.STOPPED?mn(this,
519
- a):kn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=pn),window.__onGCastApiAvailable!=pn&&Va("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};r.Vd=function(a){this.o=a;this.h&&qn(this,{type:"appData",appData:this.o})};
520
- r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!nn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new nc;chrome.cast.requestSession(function(d){return rn(b,a,d)},function(d){return sn(b,d)});return u(c,b.l,0)})};function tn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return rn(a,b,c)},function(c){return sn(a,c)})}}r.xb=function(){if(this.h){jn(this);if(kn){ln(this);try{kn.stop(function(){},function(){})}catch(a){}kn=null}gn(this)}};
521
- r.get=function(a,b){var c=this;if("video"==a){if(Zm.includes(b))return function(){return c.ze.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))}}else if("player"==a){if(an[b]&&!this.get("player","isLive")())return function(){};if(dn.includes(b))return function(){return c.ze.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))};if(en.includes(b))return function(){return c.Pf.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))};if($m[b])return function(){return c.g[a][b]}}return this.g[a][b]};
522
- r.set=function(a,b,c){this.g[a][b]=c;qn(this,{type:"set",targetName:a,property:b,value:c})};function rn(a,b,c){kn=c;c.addUpdateListener(a.C);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);gn(a);qn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function sn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
523
- r.ze=function(a,b){qn(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.Pf=function(a,b){var c=Ha.apply(2,arguments),d=new nc,e=this.I.toString();this.I++;this.i[e]=d;try{qn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function mn(a,b){var c=a.L();a.l=new nc;a.u=!0;rn(a,c,b)}function ln(a){var b=kn;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
524
- function gn(a){var b=kn?"connected"==kn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};jn(a)}a.h=b;a.M=b?kn.receiver.friendlyName:"";a.j.Jb()}function jn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function qn(a,b){var c=Tm(b),d=kn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ya)}catch(e){throw c=new N(2,8,8005,e),d=new S("error",(new Map).set("detail",c)),a.s("player",d),a.xb(),c;}}var on=.02,nn=!1,kn=null,hn=new Set;
525
- function pn(a){if(a){a=t(hn);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function un(a,b,c){Qe.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.u=new Map;this.g=new fn(c,function(){return vn(d)},function(){return xn(d)},function(e,f){return yn(d,e,f)},function(){return zn(d)},function(){return An(d)});Bn(this)}pa(un,Qe);r=un.prototype;
526
- r.destroy=function(a){a&&this.g.xb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Qe.prototype.release.call(this);return Promise.all(a)};r.xf=function(){return this.l};r.nf=function(){return this.s};r.Qe=function(){return this.g.m&&nn};r.ra=function(){return this.g.ra()};r.Od=function(){return this.g.Od()};
527
- r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=An(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.ce(),0):c["return"]()})};r.Vd=function(a){this.g.Vd(a)};r.ag=function(){tn(this.g)};r.xb=function(){this.g.xb()};
528
- r.Te=function(a){var b=this;return K(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.xb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new fn(a,function(){return vn(b)},function(){return xn(b)},function(d,e){return yn(b,d,e)},function(){return zn(b)},function(){return An(b)});b.g.init();z(c)})};
529
- function Bn(a){a.g.init();a.m=new hf;for(var b=t(Wm),c=b.next();!c.done;c=b.next())a.m.B(a.i,c.value,function(f){a.g.ra()||(f=Pe(f),a.j.dispatchEvent(f))});for(var d in Im)a.m.B(a.h,Im[d],function(f){a.g.ra()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Ob=e,Object.defineProperty(a.l,b.Ob,{configurable:!1,enumerable:!0,get:function(f){return function(){return Cn(a,f.Ob)}}(b),set:function(f){return function(g){var h=f.Ob;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Ob:b.Ob};a.s={};Dn(a,
530
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return En(a,f)}})});Fn(a);a.j=new Qe;a.j.Gc=a.l;a.o=new Qe;a.o.Gc=a.s}function Fn(a){var b=new Map;Dn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
531
- function Dn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
532
- function An(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.qd(),startTime:null};a.i.pause();for(var c=t(Ym),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(bn);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(cn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function vn(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
533
- function xn(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
534
- function zn(a){for(var b=t(bn),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(Ym);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(Ym),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(cn);for(k=
535
- h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new S(Em,h);a.h.dispatchEvent(h)})}
536
- function Cn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
537
- function En(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.cc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.oe()};
538
- if("setVideoContainer"==b)return function(c){return a.h.Ge(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&$m[b]||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}function yn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
539
- M("shaka.cast.CastProxy",un);un.prototype.changeReceiverId=un.prototype.Te;un.prototype.forceDisconnect=un.prototype.xb;un.prototype.suggestDisconnect=un.prototype.ag;un.prototype.setAppData=un.prototype.Vd;un.prototype.cast=un.prototype.cast;un.prototype.receiverName=un.prototype.Od;un.prototype.isCasting=un.prototype.ra;un.prototype.canCast=un.prototype.Qe;un.prototype.getPlayer=un.prototype.nf;un.prototype.getVideo=un.prototype.xf;un.prototype.destroy=un.prototype.destroy;function Gn(a,b,c,d){Qe.call(this);var e=this;this.g=a;this.h=b;this.j=new hf;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){Hn(e)});In(this)}pa(Gn,Qe);r=Gn.prototype;r.isConnected=function(){return this.F};r.Bf=function(){return this.o};r.Xf=function(a){this.i=a};r.We=function(){this.i=null};
540
- r.Yf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Wf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Vf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
541
- r.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.I=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Qe.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
542
- function In(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Jn(a)};b.onSenderDisconnected=function(){return Jn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Kn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Kn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Ln(a,
543
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Mn(a,e)};b.start();b=t(Wm);for(var c=b.next();!c.done;c=b.next())a.j.B(a.g,c.value,function(e){return Nn(a,"video",e)});for(var d in Im)a.j.B(a.h,Im[d],function(e){return Nn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Xd(3840,2160):a.h.Xd(1920,1080);a.j.B(a.g,"loadeddata",function(){a.C=!0});a.j.B(a.h,"loading",function(){a.o=
544
- !1;On(a)});a.j.B(a.g,"playing",function(){a.o=!1;On(a)});a.j.B(a.g,"pause",function(){On(a)});a.j.B(a.h,"unloading",function(){a.o=!0;On(a)});a.j.B(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,On(a))})).S(Pn)})}function Jn(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;On(a)}
545
- function On(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new S("caststatuschanged");a.dispatchEvent(b);Qn(a)||Rn(a);z(c)})}
546
- function Sn(a,b,c){var d,e,f,g,h,k,l,m,p,n,q;K(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,B(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=F(v),h=Em,k=(new Map).set("detail",g),l=new S(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)p=b.video[m],a.g[m]=p;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],
547
- a.h[n](q);a.g.autoplay=f;b.manifest&&(a.g.play(),Rn(a));z(v)}})}function Nn(a,b,c){a.h&&(Hn(a),Kn(a,{type:"event",targetName:b,event:c},a.l))}
548
- function Hn(a){a.G.S(Tn);for(var b={video:{},player:{}},c=t(Xm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in an)0==a.m%an[e]&&(b.player[e]=a.h[e]());for(var f in $m)0==a.m%$m[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.C&&(a.m+=1);Kn(a,{type:"update",update:b},a.l);Qn(a)}function Qn(a){return a.u&&(a.g.duration||a.h.U())?(Un(a),a.u=!1,!0):!1}
549
- function Un(a,b){var c={contentId:a.h.qd(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Rn(a,void 0===b?0:b,c)}
550
- function Mn(a,b){var c=Um(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.u=!0;Sn(a,c.initState,c.appData);Hn(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
551
- c.methodName;"player"==d&&"load"==e&&(a.m=0,a.C=!1);var g=c.id,h=b.senderId;f=a.I[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return Vn(a,h,g,null)},function(k){return Vn(a,h,g,k)})}}
552
- function Ln(a,b){var c=Um(b.data);switch(c.type){case "PLAY":a.g.play();Rn(a);break;case "PAUSE":a.g.pause();Rn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),Rn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Rn(a));break;case "STOP":a.h.ce().then(function(){a.h&&Rn(a)});break;case "GET_STATUS":Un(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
553
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Rn(a);break;case "LOAD":a.m=0;a.C=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.L(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&Un(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Kn(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:Kn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
554
- function Vn(a,b,c,d){a.h&&Kn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Kn(a,b,c,d){a.F&&(a=Tm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Rn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Wn:a.h.sd()?Xn:a.g.paused?Yn:Zn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Kn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
555
- M("shaka.cast.CastReceiver",Gn);Gn.prototype.destroy=Gn.prototype.destroy;Gn.prototype.setContentArtist=Gn.prototype.Vf;Gn.prototype.setContentImage=Gn.prototype.Wf;Gn.prototype.setContentTitle=Gn.prototype.Yf;Gn.prototype.clearContentMetadata=Gn.prototype.We;Gn.prototype.setContentMetadata=Gn.prototype.Xf;Gn.prototype.isIdle=Gn.prototype.Bf;Gn.prototype.isConnected=Gn.prototype.isConnected;var Tn=.5,Pn=5,Wn="IDLE",Zn="PLAYING",Xn="BUFFERING",Yn="PAUSED";function $n(a){var b=this;this.g=[];this.h=[];this.data=[];(new og).box("moov",sg).T("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.P,-12,c.size);b.data.push(d);b.g.push(Rc(c.reader.Za(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=Rc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
556
- function ao(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Ib(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Qc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function bo(a,b){var c=co(a,b);return 1!=c.length?null:c[0]}function eo(a,b,c){a=fo(a,b,c);return 1!=a.length?null:a[0]}function co(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function go(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
557
- function fo(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function ho(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function io(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function jo(a){return Array.from(a.childNodes).every(ko)?a.textContent.trim():null}
558
- function ko(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function lo(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function mo(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
559
- function no(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
560
- function oo(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function po(a){a=Number(a);return 0===a%1?a:null}function qo(a){a=Number(a);return 0===a%1&&0<a?a:null}function ro(a){a=Number(a);return 0===a%1&&0<=a?a:null}function so(a){a=Number(a);return isNaN(a)?null:a}function to(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
561
- function uo(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function vo(a,b){try{var c=Fc(a);return uo(c,b)}catch(d){return null}};function wo(a,b,c){var d=xo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Sd?(e=h.init||e,!1):!0}),f.length&&(a=yo(e,f,c,g),0==a.length&&(a=[hc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(hc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
562
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{je:g,Pg:e,drmInfos:a,ne:!0}}function zo(a,b,c,d){var e=wo(a,c,d);if(b.ne){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.ne=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.je||b.je}
563
- function Ao(a){var b=0,c=Ib(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
564
- function Bo(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Co(a){a=eo(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Pc(a.textContent);a=Ao(a).filter(function(b){return b.type===Do})[0];if(!a)return"";a=Hc(a.value,!0);return(a=uo(a,"WRMHEADER"))?Bo(a):""}
565
- function yo(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Sd];if(g){var h;if(h=eo(f.node,"urn:microsoft:playready","pro")){h=Pc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:ao(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Sd)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
566
- 226,251,75]),m=new Uint8Array([]);k=[{initData:ao(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=hc(g,f.init||a||h||k);if(g=Eo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function xo(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Fo(c.value))&&b.push(c);return b}
567
- function Fo(a){var b=a.getAttribute("schemeIdUri"),c=ho(a,"urn:mpeg:cenc:2013","default_KID"),d=fo(a,"urn:mpeg:cenc:2013","pssh").map(jo);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Pc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Sd:b,keyId:c,init:0<e.length?e:null}}
568
- var Do=1,Eo=(new Map).set("com.widevine.alpha",function(a){return(a=eo(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Co).set("com.microsoft.playready.recommendation",Co).set("com.microsoft.playready.software",Co).set("com.microsoft.playready.hardware",Co).set("org.w3.clearkey",function(a){return(a=eo(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Go(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
512
+ X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHANGED="ad-linear-changed";X.AD_METADATA="ad-metadata";X.AD_RECOVERABLE_ERROR="ad-recoverable-error";X.AD_BREAK_READY="ad-break-ready";X.AD_INTERACTION="ad-interaction";Ok=function(){return new X};function Sm(a){return JSON.stringify(a,function(b,c){if("function"!=typeof c){if(c instanceof Event||c instanceof S){var d={};for(f in c){var e=c[f];e&&"object"==typeof e?"detail"==f&&(d[f]=e):f in Event||(d[f]=e)}return d}if(c instanceof Error){var f=new Set(["name","message","stack"]);for(d in c)f.add(d);e=t(Object.getOwnPropertyNames(c));for(d=e.next();!d.done;d=e.next())f.add(d.value);e={};f=t(f);for(d=f.next();!d.done;d=f.next())d=d.value,e[d]=c[d];f={__type__:"Error",contents:e}}else if(c instanceof
513
+ TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(Sh(c)),e=d.next();!e.done;e=d.next()){e=e.value;var g=e.end;f.start.push(e.start);f.end.push(g)}else f=c instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(c)}:"number"==typeof c?isNaN(c)?"NaN":isFinite(c)?c:0>c?"-Infinity":"Infinity":c;return f}})}
514
+ function Tm(a){return JSON.parse(a,function(b,c){if("NaN"==c)var d=NaN;else if("-Infinity"==c)d=-Infinity;else if("Infinity"==c)d=Infinity;else if(c&&"object"==typeof c&&"TimeRanges"==c.__type__)d=Um(c);else if(c&&"object"==typeof c&&"Uint8Array"==c.__type__)d=new Uint8Array(c.entries);else if(c&&"object"==typeof c&&"Error"==c.__type__){d=c.contents;var e=Error(d.message),f;for(f in d)e[f]=d[f];d=e}else d=c;return d})}
515
+ function Um(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
516
+ var Vm="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Wm="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Xm=["loop","playbackRate"],Ym=["pause","play"],Zm={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
517
+ getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},$m={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},an=[["getConfiguration","configure"]],bn=[["isTextTrackVisible","setTextTrackVisibility"]],cn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
518
+ dn=["attach","detach","load","unload"];function en(a,b,c,d,e,f){var g=this;this.G=a;this.j=new O(b);this.R=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.M="";this.o=null;this.C=function(){return fn(g)};this.D=function(h,k){var l=Tm(k);switch(l.type){case "event":var m=l.targetName;l=Oe(l.event);g.s(m,l);break;case "update":m=l.update;for(var p in m){l=g.g[p]||{};for(var n in m[p])l[n]=m[p][n]}g.u&&(g.R(),g.u=!1);break;case "asyncComplete":if(p=l.id,l=l.error,n=g.i[p],delete g.i[p],n)if(l){p=new N(l.severity,l.category,l.code);
519
+ for(m in l)p[m]=l[m];n.reject(p)}else n.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;gn.add(this)}r=en.prototype;r.destroy=function(){gn["delete"](this);hn(this);jn&&kn(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.C=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.ra=function(){return this.h};r.Qd=function(){return this.M};
520
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Jb();var a=new chrome.cast.SessionRequest(this.G);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(gn),d=c.next();!d.done;d=c.next())ln(d.value,b)},function(b){for(var c=t(gn),d=c.next();!d.done;d=c.next())d=d.value,mn="available"==b,d.j.Jb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});mn&&this.j.S(nn);(a=jn)&&a.status!=chrome.cast.SessionStatus.STOPPED?ln(this,
521
+ a):jn=null}else window.__onGCastApiAvailable||(window.__onGCastApiAvailable=on),window.__onGCastApiAvailable!=on&&Va("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")};r.Xd=function(a){this.o=a;this.h&&pn(this,{type:"appData",appData:this.o})};
522
+ r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!mn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new nc;chrome.cast.requestSession(function(d){return qn(b,a,d)},function(d){return rn(b,d)});return u(c,b.l,0)})};function sn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return qn(a,b,c)},function(c){return rn(a,c)})}}r.xb=function(){if(this.h){hn(this);if(jn){kn(this);try{jn.stop(function(){},function(){})}catch(a){}jn=null}fn(this)}};
523
+ r.get=function(a,b){var c=this;if("video"==a){if(Ym.includes(b))return function(){return c.Ae.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))}}else if("player"==a){if($m[b]&&!this.get("player","isLive")())return function(){};if(cn.includes(b))return function(){return c.Ae.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))};if(dn.includes(b))return function(){return c.Qf.apply(c,[a,b].concat(ia(Ha.apply(0,arguments))))};if(Zm[b])return function(){return c.g[a][b]}}return this.g[a][b]};
524
+ r.set=function(a,b,c){this.g[a][b]=c;pn(this,{type:"set",targetName:a,property:b,value:c})};function qn(a,b,c){jn=c;c.addUpdateListener(a.C);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);fn(a);pn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function rn(a,b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}a.l.reject(new N(2,8,c,b))}
525
+ r.Ae=function(a,b){pn(this,{type:"call",targetName:a,methodName:b,args:Ha.apply(2,arguments)})};r.Qf=function(a,b){var c=Ha.apply(2,arguments),d=new nc,e=this.I.toString();this.I++;this.i[e]=d;try{pn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function ln(a,b){var c=a.L();a.l=new nc;a.u=!0;qn(a,c,b)}function kn(a){var b=jn;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
526
+ function fn(a){var b=jn?"connected"==jn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};hn(a)}a.h=b;a.M=b?jn.receiver.friendlyName:"";a.j.Jb()}function hn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function pn(a,b){var c=Sm(b),d=jn;try{d.sendMessage("urn:x-cast:com.google.shaka.v2",c,function(){},Ya)}catch(e){throw c=new N(2,8,8005,e),d=new S("error",(new Map).set("detail",c)),a.s("player",d),a.xb(),c;}}var nn=.02,mn=!1,jn=null,gn=new Set;
527
+ function on(a){if(a){a=t(gn);for(var b=a.next();!b.done;b=a.next())b.value.init()}};function tn(a,b,c){Pe.call(this);var d=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.C=c;this.u=new Map;this.g=new en(c,function(){return un(d)},function(){return wn(d)},function(e,f){return xn(d,e,f)},function(){return yn(d)},function(){return zn(d)});An(this)}pa(tn,Pe);r=tn.prototype;
528
+ r.destroy=function(a){a&&this.g.xb();this.m&&(this.m.release(),this.m=null);a=[];this.h&&(a.push(this.h.destroy()),this.h=null);this.g&&(a.push(this.g.destroy()),this.g=null);this.s=this.l=this.i=null;Pe.prototype.release.call(this);return Promise.all(a)};r.yf=function(){return this.l};r.pf=function(){return this.s};r.Re=function(){return this.g.m&&mn};r.ra=function(){return this.g.ra()};r.Qd=function(){return this.g.Qd()};
529
+ r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=zn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.ee(),0):c["return"]()})};r.Xd=function(a){this.g.Xd(a)};r.bg=function(){sn(this.g)};r.xb=function(){this.g.xb()};
530
+ r.Ue=function(a){var b=this;return K(function(c){if(1==c.g){if(a==b.C)return c["return"]();b.C=a;b.g.xb();return u(c,b.g.destroy(),2)}b.g=null;b.g=new en(a,function(){return un(b)},function(){return wn(b)},function(d,e){return xn(b,d,e)},function(){return yn(b)},function(){return zn(b)});b.g.init();z(c)})};
531
+ function An(a){a.g.init();a.m=new gf;for(var b=t(Vm),c=b.next();!c.done;c=b.next())a.m.B(a.i,c.value,function(f){a.g.ra()||(f=Oe(f),a.j.dispatchEvent(f))});for(var d in Hm)a.m.B(a.h,Hm[d],function(f){a.g.ra()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Ob=e,Object.defineProperty(a.l,b.Ob,{configurable:!1,enumerable:!0,get:function(f){return function(){return Bn(a,f.Ob)}}(b),set:function(f){return function(g){var h=f.Ob;a.g.ra()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Ob:b.Ob};a.s={};Cn(a,
532
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Dn(a,f)}})});En(a);a.j=new Pe;a.j.Hc=a.l;a.o=new Pe;a.o.Hc=a.s}function En(a){var b=new Map;Cn(a,function(c,d){if(b.has(d)){var e=b.get(d);c.length<e.length?a.u.set(c,e):a.u.set(e,c)}else b.set(d,c)})}
533
+ function Cn(a,b){function c(l){return"constructor"==l||"function"!=typeof d[l]?!1:!e.has(l)}var d=a.h,e=new Set;for(f in d)c(f)&&(e.add(f),b(f,d[f]));var f=Object.getPrototypeOf(d);for(var g=Object.getPrototypeOf({});f&&f!=g;){for(var h=t(Object.getOwnPropertyNames(f)),k=h.next();!k.done;k=h.next())k=k.value,c(k)&&(e.add(k),b(k,d[k]));f=Object.getPrototypeOf(f)}}
534
+ function zn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.sd(),startTime:null};a.i.pause();for(var c=t(Xm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.i[d];a.i.ended||(b.startTime=a.i.currentTime);c=t(an);for(d=c.next();!d.done;d=c.next()){var e=d.value;d=e[1];e=a.h[e[0]]();b.player[d]=e}c=t(bn);for(d=c.next();!d.done;d=c.next())e=d.value,d=e[1],e=a.h[e[0]](),b.playerAfterLoad[d]=e;return b}function un(a){var b=new S("caststatuschanged");a.dispatchEvent(b)}
535
+ function wn(a){var b=new S(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
536
+ function yn(a){for(var b=t(an),c=b.next();!c.done;c=b.next()){var d=c.value;c=d[1];d=a.g.get("player",d[0])();a.h[c](d)}var e=a.g.get("player","getAssetUri")();c=a.g.get("video","ended");b=Promise.resolve();var f=a.i.autoplay;d=null;c||(d=a.g.get("video","currentTime"));e&&(a.i.autoplay=!1,b=a.h.load(e,d));var g={};c=t(Xm);for(d=c.next();!d.done;d=c.next())d=d.value,g[d]=a.g.get("video",d);b.then(function(){if(a.i){for(var h=t(Xm),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(bn);for(k=
537
+ h.next();!k.done;k=h.next()){var l=k.value;k=l[1];l=a.g.get("player",l[0])();a.h[k](l)}a.i.autoplay=f;e&&a.i.play()}},function(h){h=(new Map).set("detail",h);h=new S(Dm,h);a.h.dispatchEvent(h)})}
538
+ function Bn(a,b){if("addEventListener"==b)return function(d,e,f){return a.j.addEventListener(d,e,f)};if("removeEventListener"==b)return function(d,e,f){return a.j.removeEventListener(d,e,f)};if(a.g.ra()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.ra()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
539
+ function Dn(a,b){a.u.has(b)&&(b=a.u.get(b));if("addEventListener"==b)return function(c,d,e){return a.o.addEventListener(c,d,e)};if("removeEventListener"==b)return function(c,d,e){return a.o.removeEventListener(c,d,e)};if("getMediaElement"==b)return function(){return a.l};if("getSharedConfiguration"==b)return a.g.get("player","getConfiguration");if("getNetworkingEngine"==b)return function(){return a.h.cc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.pe()};
540
+ if("setVideoContainer"==b)return function(c){return a.h.He(c)};if(a.g.ra()){if("getManifest"==b||"drmInfo"==b)return function(){Va(b+"() does not work while casting!");return null};if("attach"==b||"detach"==b)return function(){Va(b+"() does not work while casting!");return Promise.resolve()}}return a.g.ra()&&0==Object.keys(a.g.g.video).length&&Zm[b]||!a.g.ra()?a.h[b].bind(a.h):a.g.get("player",b)}function xn(a,b,c){a.g.ra()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
541
+ M("shaka.cast.CastProxy",tn);tn.prototype.changeReceiverId=tn.prototype.Ue;tn.prototype.forceDisconnect=tn.prototype.xb;tn.prototype.suggestDisconnect=tn.prototype.bg;tn.prototype.setAppData=tn.prototype.Xd;tn.prototype.cast=tn.prototype.cast;tn.prototype.receiverName=tn.prototype.Qd;tn.prototype.isCasting=tn.prototype.ra;tn.prototype.canCast=tn.prototype.Re;tn.prototype.getPlayer=tn.prototype.pf;tn.prototype.getVideo=tn.prototype.yf;tn.prototype.destroy=tn.prototype.destroy;function Fn(a,b,c,d){Pe.call(this);var e=this;this.g=a;this.h=b;this.j=new gf;this.I={video:a,player:b};this.D=c||function(){};this.L=d||function(f){return f};this.i=null;this.F=!1;this.o=!0;this.m=0;this.C=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){Gn(e)});Hn(this)}pa(Fn,Pe);r=Fn.prototype;r.isConnected=function(){return this.F};r.Cf=function(){return this.o};r.Yf=function(a){this.i=a};r.Xe=function(){this.i=null};
542
+ r.Zf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.Xf=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.Wf=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
543
+ r.destroy=function(){var a=this,b,c;return K(function(d){if(1==d.g)return a.j&&(a.j.release(),a.j=null),b=[],a.h&&(b.push(a.h.destroy()),a.h=null),a.G&&(a.G.stop(),a.G=null),a.g=null,a.I=null,a.D=null,a.F=!1,a.o=!0,a.l=null,a.s=null,Pe.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();z(d)})};
544
+ function Hn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return In(a)};b.onSenderDisconnected=function(){return In(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Jn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Jn(a,{type:"event",targetName:"video",event:{type:"volumechange"}},a.l)};a.s=b.getCastMessageBus("urn:x-cast:com.google.cast.media");a.s.onMessage=function(e){return Kn(a,
545
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Ln(a,e)};b.start();b=t(Vm);for(var c=b.next();!c.done;c=b.next())a.j.B(a.g,c.value,function(e){return Mn(a,"video",e)});for(var d in Hm)a.j.B(a.h,Hm[d],function(e){return Mn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.Zd(3840,2160):a.h.Zd(1920,1080);a.j.B(a.g,"loadeddata",function(){a.C=!0});a.j.B(a.h,"loading",function(){a.o=
546
+ !1;Nn(a)});a.j.B(a.g,"playing",function(){a.o=!1;Nn(a)});a.j.B(a.g,"pause",function(){Nn(a)});a.j.B(a.h,"unloading",function(){a.o=!0;Nn(a)});a.j.B(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,Nn(a))})).S(On)})}function In(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Nn(a)}
547
+ function Nn(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new S("caststatuschanged");a.dispatchEvent(b);Pn(a)||Qn(a);z(c)})}
548
+ function Rn(a,b,c){var d,e,f,g,h,k,l,m,p,n,q;K(function(v){switch(v.g){case 1:for(d in b.player)e=b.player[d],a.h[d](e);a.D(c);f=a.g.autoplay;return b.manifest?(a.g.autoplay=!1,B(v,5),u(v,a.h.load(b.manifest,b.startTime),7)):u(v,Promise.resolve(),3);case 7:va(v,3);break;case 5:return g=F(v),h=Dm,k=(new Map).set("detail",g),l=new S(h,k),a.h&&a.h.dispatchEvent(l),v["return"]();case 3:if(!a.h)return v["return"]();for(m in b.video)p=b.video[m],a.g[m]=p;for(n in b.playerAfterLoad)q=b.playerAfterLoad[n],
549
+ a.h[n](q);a.g.autoplay=f;b.manifest&&(a.g.play(),Qn(a));z(v)}})}function Mn(a,b,c){a.h&&(Gn(a),Jn(a,{type:"event",targetName:b,event:c},a.l))}
550
+ function Gn(a){a.G.S(Sn);for(var b={video:{},player:{}},c=t(Wm),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.U())for(var e in $m)0==a.m%$m[e]&&(b.player[e]=a.h[e]());for(var f in Zm)0==a.m%Zm[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;a.C&&(a.m+=1);Jn(a,{type:"update",update:b},a.l);Pn(a)}function Pn(a){return a.u&&(a.g.duration||a.h.U())?(Tn(a),a.u=!1,!0):!1}
551
+ function Tn(a,b){var c={contentId:a.h.sd(),streamType:a.h.U()?"LIVE":"BUFFERED",contentType:""};a.h.U()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Qn(a,void 0===b?0:b,c)}
552
+ function Ln(a,b){var c=Tm(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.u=!0;Rn(a,c.initState,c.appData);Gn(a);break;case "appData":a.D(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}a.I[d][e]=c;break;case "call":d=a.I[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=c.targetName;e=
553
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.C=!1);var g=c.id,h=b.senderId;f=a.I[d];c=f[e].apply(f,c.args);"player"==d&&"load"==e&&(c=c.then(function(){a.u=!0}));c.then(function(){return Un(a,h,g,null)},function(k){return Un(a,h,g,k)})}}
554
+ function Kn(a,b){var c=Tm(b.data);switch(c.type){case "PLAY":a.g.play();Qn(a);break;case "PAUSE":a.g.pause();Qn(a);break;case "SEEK":var d=c.currentTime,e=c.resumeState;null!=d&&(a.g.currentTime=Number(d));e&&"PLAYBACK_START"==e?(a.g.play(),Qn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Qn(a));break;case "STOP":a.h.ee().then(function(){a.h&&Qn(a)});break;case "GET_STATUS":Tn(a,Number(c.requestId));break;case "VOLUME":e=c.volume;d=e.level;e=e.muted;var f=a.g.volume,g=a.g.muted;null!=d&&(a.g.volume=Number(d));
555
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Qn(a);break;case "LOAD":a.m=0;a.C=!1;a.u=!1;d=c.media;e=c.currentTime;f=a.L(d.contentId);g=c.autoplay||!0;a.D(d.customData);g&&(a.g.autoplay=!0);a.h.load(f,e).then(function(){a.h&&Tn(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Jn(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:Jn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
556
+ function Un(a,b,c,d){a.h&&Jn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Jn(a,b,c,d){a.F&&(a=Sm(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Qn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?Vn:a.h.ud()?Wn:a.g.paused?Xn:Yn,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Jn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
557
+ M("shaka.cast.CastReceiver",Fn);Fn.prototype.destroy=Fn.prototype.destroy;Fn.prototype.setContentArtist=Fn.prototype.Wf;Fn.prototype.setContentImage=Fn.prototype.Xf;Fn.prototype.setContentTitle=Fn.prototype.Zf;Fn.prototype.clearContentMetadata=Fn.prototype.Xe;Fn.prototype.setContentMetadata=Fn.prototype.Yf;Fn.prototype.isIdle=Fn.prototype.Cf;Fn.prototype.isConnected=Fn.prototype.isConnected;var Sn=.5,On=5,Vn="IDLE",Yn="PLAYING",Wn="BUFFERING",Xn="PAUSED";function Zn(a){var b=this;this.g=[];this.h=[];this.data=[];(new ng).box("moov",rg).T("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.P,-12,c.size);b.data.push(d);b.g.push(Qc(c.reader.Za(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=Qc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
558
+ function $n(a,b,c,d){var e=a.length,f=b.length+16+e;0<d&&(f+=4+16*c.size);var g=new Uint8Array(f),h=Ib(g),k=0;h.setUint32(k,f);k+=4;h.setUint32(k,1886614376);k+=4;1>d?h.setUint32(k,0):h.setUint32(k,16777216);k+=4;g.set(b,k);k+=b.length;if(0<d)for(h.setUint32(k,c.size),k+=4,b=t(c),c=b.next();!c.done;c=b.next())c=Pc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function ao(a,b){var c=bo(a,b);return 1!=c.length?null:c[0]}function co(a,b,c){a=eo(a,b,c);return 1!=a.length?null:a[0]}function bo(a,b){for(var c=[],d=t(a.childNodes),e=d.next();!e.done;e=d.next())e=e.value,e instanceof Element&&e.tagName==b&&c.push(e);return c}function fo(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
559
+ function eo(a,b,c){var d=[];a=t(a.childNodes);for(var e=a.next();!e.done;e=a.next())e=e.value,e instanceof Element&&e.localName==c&&e.namespaceURI==b&&d.push(e);return d}function go(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function ho(a,b,c){b=t(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,a.hasAttributeNS(d,c))return a.getAttributeNS(d,c);return null}function io(a){return Array.from(a.childNodes).every(jo)?a.textContent.trim():null}
560
+ function jo(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE}function ko(a,b,c,d){d=void 0===d?null:d;var e=null;a=a.getAttribute(b);null!=a&&(e=c(a));return null==e?d:e}function lo(a){if(!a)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");a=Date.parse(a);return isNaN(a)?null:a/1E3}
561
+ function mo(a){if(!a)return null;a=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(a);if(!a)return null;a=31536E3*Number(a[1]||null)+2592E3*Number(a[2]||null)+86400*Number(a[3]||null)+3600*Number(a[4]||null)+60*Number(a[5]||null)+Number(a[6]||null);return isFinite(a)?a:null}
562
+ function no(a){var b=/([0-9]+)-([0-9]+)/.exec(a);if(!b)return null;a=Number(b[1]);if(!isFinite(a))return null;b=Number(b[2]);return isFinite(b)?{start:a,end:b}:null}function oo(a){a=Number(a);return 0===a%1?a:null}function po(a){a=Number(a);return 0===a%1&&0<a?a:null}function qo(a){a=Number(a);return 0===a%1&&0<=a?a:null}function ro(a){a=Number(a);return isNaN(a)?null:a}function so(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
563
+ function to(a,b){var c=new DOMParser,d=null;try{d=c.parseFromString(a,"text/xml")}catch(e){return null}c=d.documentElement;return!c||c.getElementsByTagName("parsererror").length||d.documentElement.tagName!=b?null:c}function uo(a,b){try{var c=Fc(a);return to(c,b)}catch(d){return null}};function vo(a,b,c){var d=wo(a),e=null;a=[];var f=[],g=new Set(d.map(function(h){return h.keyId}));g["delete"](null);if(1<g.size)throw new N(2,4,4010);b||(f=d.filter(function(h){return"urn:mpeg:dash:mp4protection:2011"==h.Ud?(e=h.init||e,!1):!0}),f.length&&(a=xo(e,f,c,g),0==a.length&&(a=[hc("",e)])));if(d.length&&(b||!f.length))for(a=[],b=t(Object.values(c)),c=b.next();!c.done;c=b.next())c=c.value,"org.w3.clearkey"!=c&&a.push(hc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
564
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{ke:g,Qg:e,drmInfos:a,oe:!0}}function yo(a,b,c,d){var e=vo(a,c,d);if(b.oe){a=1==b.drmInfos.length&&!b.drmInfos[0].keySystem;c=0==e.drmInfos.length;if(0==b.drmInfos.length||a&&!c)b.drmInfos=e.drmInfos;b.oe=!1}else if(0<e.drmInfos.length&&(b.drmInfos=b.drmInfos.filter(function(f){return e.drmInfos.some(function(g){return g.keySystem==f.keySystem})}),0==b.drmInfos.length))throw new N(2,4,4008);return e.ke||b.ke}
565
+ function zo(a){var b=0,c=Ib(a),d=c.getUint32(b,!0);if(d!=a.byteLength)return[];a:{a=b+6;for(b=[];a<c.byteLength-1;){d=c.getUint16(a,!0);a+=2;var e=c.getUint16(a,!0);a+=2;if(0!=(e&1)||e+a>c.byteLength){c=[];break a}var f=Fb(c,a,e);b.push({type:d,value:f});a+=e}c=b}return c}
566
+ function Ao(a){a=t(a.getElementsByTagName("DATA"));for(var b=a.next();!b.done;b=a.next()){b=t(b.value.childNodes);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c instanceof Element&&"LA_URL"==c.tagName)return c.textContent}return""}function Bo(a){a=co(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Oc(a.textContent);a=zo(a).filter(function(b){return b.type===Co})[0];if(!a)return"";a=Gc(a.value,!0);return(a=to(a,"WRMHEADER"))?Ao(a):""}
567
+ function xo(a,b,c,d){var e=[];b=t(b);for(var f=b.next();!f.done;f=b.next()){f=f.value;var g=c[f.Ud];if(g){var h;if(h=co(f.node,"urn:microsoft:playready","pro")){h=Oc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:$n(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Ud)if(k=d,0==k.size)k=null;else{var l=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,
568
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:$n(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=hc(g,f.init||a||h||k);if(g=Do.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function wo(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=Eo(c.value))&&b.push(c);return b}
569
+ function Eo(a){var b=a.getAttribute("schemeIdUri"),c=go(a,"urn:mpeg:cenc:2013","default_KID"),d=eo(a,"urn:mpeg:cenc:2013","pssh").map(io);if(!b)return null;b=b.toLowerCase();if(c&&(c=c.replace(/-/g,"").toLowerCase(),c.includes(" ")))throw new N(2,4,4009);var e=[];try{e=d.map(function(f){return{initDataType:"cenc",initData:Oc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Ud:b,keyId:c,init:0<e.length?e:null}}
570
+ var Co=1,Do=(new Map).set("com.widevine.alpha",function(a){return(a=co(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",Bo).set("com.microsoft.playready.recommendation",Bo).set("com.microsoft.playready.software",Bo).set("com.microsoft.playready.hardware",Bo).set("org.w3.clearkey",function(a){return(a=co(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function Fo(a,b,c,d,e){var f={RepresentationID:b,Number:c,Bandwidth:d,Time:e};return a.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(g,h,k,l){if("$$"==g)return"$";var m=f[h];if(null==m)return g;"RepresentationID"==h&&k&&(k=void 0);"Time"==h&&(m=Math.round(m));switch(l){case void 0:case "d":case "i":case "u":g=m.toString();break;case "o":g=m.toString(8);break;case "x":g=m.toString(16);break;case "X":g=m.toString(16).toUpperCase();break;default:g=m.toString()}k=
569
571
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
570
- function Ho(a,b){var c=Io(a,b,"timescale"),d=1;c&&(d=qo(c)||1);var e=Io(a,b,"duration");c=qo(e||"");"image"==a.H.contentType&&(c=so(e||""));c&&(c/=d);var f=Io(a,b,"startNumber");e=Number(Io(a,b,"presentationTimeOffset"))||0;var g=ro(f||"");if(null==f||null==g)g=1;var h=Jo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.V.duration||Infinity;h=co(h,"S");for(var l=[],m=-e,p=0;p<h.length;++p){var n=h[p],q=h[p+1],v=lo(n,"t",ro),y=lo(n,"d",ro);n=lo(n,"r",po);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;n=
571
- n||0;if(0>n)if(q){q=lo(q,"t",ro);if(null==q)break;else if(v>=q)break;n=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;n=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=n;++q)m=v+y,l.push({start:v/f,end:m/f,eg:v}),v=m}f=l}return{timescale:d,ga:c,Ib:g,Sa:e/d||0,de:e,timeline:f}}function Io(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(cc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
572
- function Jo(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(cc).map(function(d){return bo(d,c)}).reduce(function(d,e){return d||e})}
573
- function Ko(a,b,c,d,e,f){for(var g=ho(a,"http://www.w3.org/1999/xlink","href"),h=ho(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Je(new N(2,4,4028));if("onLoad"!=h)return Je(new N(2,4,4027));var m=dc([d],[g]);return e.request(0,Ze(m,b)).Z(function(p){p=vo(p.data,a.tagName);if(!p)return Je(new N(2,4,4001,g));
574
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=t(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Lo(a,b,c,m[0],e,f+1)})}
575
- function Lo(a,b,c,d,e,f){f=void 0===f?0:f;if(ho(a,"http://www.w3.org/1999/xlink","href")){var g=Ko(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return Lo(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==ho(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Lo(k,b,c,d,e,f)));return Ne(g).Z(function(){return a})};function Mo(a,b,c,d,e,f,g){var h,k=(new og).T("sidx",function(l){h=No(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
576
- function No(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Hb(),m=g.reader.Hb();g.reader.skip(2);var p=g.reader.Nd();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.N(),q=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.N();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new Mh(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function Oo(a){this.h=Ib(a);this.g=new lg(this.h,0)}Oo.prototype.ma=function(){return this.g.ma()};
577
- function Po(a){var b=Qo(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Qo(a);a:{d=t(Ro);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Ib(a.h,a.g.$(),b);a.g.skip(b);return new So(c,d)}
578
- function Qo(a){var b=a.g.$(),c=a.g.Ra();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Ro=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function So(a,b){this.id=a;this.g=b}
579
- function To(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function Uo(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Oo(a.g);for(var p=null,n=null;a.ma();){var q=Po(a);if(187==q.id){var v=Vo(q);v&&(q=c*v.fg,v=b+v.Of,null!=p&&m.push(new Mh(p+g,q+g,l,n,v-1,f,g,h,k)),p=q,n=v)}}null!=p&&m.push(new Mh(p+g,d+g,l,n,null,f,g,h,k));return m}
580
- function Vo(a){var b=new Oo(a.g);a=Po(b);if(179!=a.id)throw new N(2,3,3013);a=To(a);b=Po(b);if(183!=b.id)throw new N(2,3,3012);b=new Oo(b.g);for(var c=0;b.ma();){var d=Po(b);if(241==d.id){c=To(d);break}}return{fg:a,Of:c}};function Wo(a,b){var c=Jo(a,b,"Initialization");if(!c)return null;var d=a.H.wa,e=c.getAttribute("sourceURL");e&&(d=dc(a.H.wa,[e]));e=0;var f=null;if(c=lo(c,"range",oo))e=c.start,f=c.end;return new Kh(function(){return d},e,f,Xo(a))}
581
- function Yo(a,b){var c=Number(Io(a,Zo,"presentationTimeOffset"))||0,d=Io(a,Zo,"timescale"),e=1;d&&(e=qo(d)||1);var f=c/e||0,g=Wo(a,Zo);$o(a,g);var h=Se(a);return{yb:function(){var k=Jo(h,Zo,"RepresentationIndex"),l=h.H.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=dc(h.H.wa,[k]));k=ap(h);return bp(h,b,g,l,k.start,k.end,f)}}}
582
- function bp(a,b,c,d,e,f,g){var h,k,l,m,p,n,q,v,y,x,w,D,C,A,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Wa||!a.V.ue,l=a.V.start,m=a.V.duration,p=a.H.mimeType.split("/")[1],n=b,q=null,v=[n(d,e,f),"webm"==p?n(c.ya(),c.Ba,c.la):null],n=null,u(E,Promise.all(v),2);y=E.h;x=y[0];w=y[1]||null;D=null;C=l-g;A=l;G=m?l+m:Infinity;if("mp4"==p)var H=Mo(x,e,d,c,C,A,G);else{H=new Oo(w);if(440786851!=Po(H).id)throw new N(2,3,3008);var L=Po(H);if(408125543!=L.id)throw new N(2,3,3009);H=L.g.byteOffset;
583
- L=new Oo(L.g);for(var I=null;L.ma();){var J=Po(L);if(357149030==J.id){I=J;break}}if(!I)throw new N(2,3,3010);I=new Oo(I.g);J=1E6;for(L=null;I.ma();){var P=Po(I);if(2807729==P.id)J=To(P);else if(17545==P.id)if(4==P.g.byteLength)L=P.g.getFloat32(0);else if(8==P.g.byteLength)L=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==L)throw new N(2,3,3011);I=J/1E9;L*=I;J=Po(new Oo(x));if(475249515!=J.id)throw new N(2,3,3007);H=Uo(J,H,I,L,d,c,C,A,G)}D=H;h.Eb(D);q=new Oi(D);k&&q.Xa(A,G,!0);return E["return"](q)})}
584
- function Zo(a){return a.qc}function ap(a){var b=Jo(a,Zo,"RepresentationIndex");a=Io(a,Zo,"indexRange");a=oo(a||"");b&&(a=lo(b,"range",oo,a));return a}function $o(a,b){cp(a,b);if(!ap(a))throw new N(2,4,4002);}function cp(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=lc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
585
- function Xo(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Qc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function dp(a,b){var c=Wo(a,ep),d=fp(a);if(!d.ga&&!d.timeline&&1<d.Cb.length)throw new N(2,4,4002);if(!d.ga&&!a.V.duration&&!d.timeline&&1==d.Cb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=gp(a.V.start,a.V.duration,a.H.wa,d,c);c=!e;e?e.Db(g,a.presentationTimeline.Pa()):e=new Oi(g);a.presentationTimeline.Eb(g);a.Wa&&a.V.ue||e.Xa(a.V.start,a.V.duration?a.V.start+a.V.duration:
586
- Infinity,c);f&&(f.segmentIndex=e);return{yb:function(){e&&0!=e.J.length||e.jc(g);return Promise.resolve(e)}}}function ep(a){return a.$a}function fp(a){var b=hp(a);a=Ho(a,ep);var c=a.Ib;0==c&&(c=1);var d=0;a.ga?d=a.ga*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ga:a.ga,startTime:d,Ib:c,Sa:a.Sa,timeline:a.timeline,Cb:b}}
587
- function gp(a,b,c,d,e){var f=d.Cb.length;d.timeline&&d.timeline.length!=d.Cb.length&&(f=Math.min(d.timeline.length,d.Cb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={fd:m.fd},p++){var n=d.Cb[p];m.fd=dc(c,[n.Ff]);var q=void 0;q=null!=d.ga?l+d.ga:d.timeline?d.timeline[p].end:l+b;k.push(new Mh(a+l,a+q,function(v){return function(){return v.fd}}(m),n.start,n.end,e,g,a,h));l=q}return k}
588
- function hp(a){return[a.H.$a,a.ja.$a,a.aa.$a].filter(cc).map(function(b){return co(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.se&&(a.se=!0);var c=b.getAttribute("media");b=lo(b,"mediaRange",oo,{start:0,end:null});return{Ff:c,start:b.start,end:b.end}})};function ip(a,b,c,d,e,f){var g=jp(a),h=kp(a);lp(h);var k=Se(a);if(h.hc)return cp(a,g),{yb:function(){var q=Go(h.hc,k.H.id,null,k.bandwidth||null,null);q=dc(k.H.wa,[q]);return bp(k,b,g,q,0,null,h.Sa)}};if(h.ga)return d||(a.presentationTimeline.Hd(h.ga),a.presentationTimeline.Id(a.V.start)),{yb:function(){return mp(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=np(k,h,g);c=a.V.start;var p=a.V.duration?a.V.start+a.V.duration:Infinity,n=Infinity!=
589
- p;l?(n&&(new Oi(m)).Xa(c,p,!0),l.Db(m,a.presentationTimeline.Pa())):l=new Oi(m);a.presentationTimeline.Eb(m);n&&l.Xa(c,p);d&&a.Wa&&(d.segmentIndex=l);return{yb:function(){l&&0!=l.J.length||l.jc(m);return Promise.resolve(l)}}}function op(a){return a.rc}function kp(a){var b=Ho(a,op),c=Io(a,op,"media");a=Io(a,op,"index");return{ga:b.ga,timescale:b.timescale,Ib:b.Ib,Sa:b.Sa,de:b.de,timeline:b.timeline,Fd:c,hc:a}}
590
- function lp(a){var b=a.hc?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.hc&&(a.timeline=null),a.ga=null);if(!a.hc&&!a.Fd)throw new N(2,4,4002);}
591
- function mp(a,b,c,d,e){function f(I){var J=(I-q)*n,P=J+b.Sa,Q=J+l;J=Q+n;var Y=Math.min(J,h());Q=new Mh(Q,Y,function(){var ca=Go(y,w,I,x,P*v);return dc(D,[ca])},0,null,d,C,l,h());Q.j=J;return Q}function g(){var I=[Math.max(k.Pa(),l),Math.min(k.fb(),h())].map(function(J){return J-l});return[Math.ceil(I[0]/n),Math.ceil(I[1]/n)-1].map(function(J){return J+q})}function h(){var I=null!=m&&e[m]||p;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.V.start,m=a.aa.id,p=a.V.duration,n=b.ga,q=b.Ib,v=b.timescale,
592
- y=b.Fd,x=a.bandwidth||null,w=a.H.id,D=a.H.wa,C=l-b.Sa,A=g();a=a.Wa?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var G=a;G<=A;++G){var E=f(G);c.push(E)}var H=new Oi(c);c=k.fb()<h();G=k.U();if(c||G){var L=Math.max(a,A+1);H.Xc(n,function(){var I=k.Pa();H.cb(I);var J=t(g());J.next();J=J.next().value;for(var P=[];L<=J;){var Q=f(L);P.push(Q);L++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
593
- function np(a,b,c){var d=a.V.start,e=a.V.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={ed:h.ed,jd:h.jd,md:h.md,bd:h.bd,od:h.od,cd:h.cd},k++){var l=b.timeline[k],m=l.start,p=l.eg;l=l.end;h.md=k+b.Ib;h.od=p+b.de;h.jd=a.H.id;h.bd=a.bandwidth||null;h.ed=b.Fd;h.cd=a.H.wa;g.push(new Mh(d+m,d+l,function(n){return function(){var q=Go(n.ed,n.jd,n.md,n.bd||null,n.od);return dc(n.cd,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
594
- function jp(a){var b=Io(a,op,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.wa;return new Kh(function(){var f=Go(b,c,null,d,null);return dc(e,[f])},0,null,Xo(a))};function pp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}pp.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
595
- function qp(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I,J,P,Q,Y,ca,ra,Ea;return K(function(za){switch(za.g){case 1:d=mc;rp(b);sp(b);tp(b);up(b);if(!c&&1==b.length){e=b[0];a.g=e.Ac;a.h=e.Zc;a.j=e.textStreams;a.i=e.imageStreams;za.A(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return za["return"]();k=b.map(function(Ka){return Ka.Ac});l=b.map(function(Ka){return Ka.Zc});m=b.map(function(Ka){return Ka.textStreams});p=b.map(function(Ka){return Ka.imageStreams});
596
- n=t(m);for(q=n.next();!q.done;q=n.next())v=q.value,v.push(vp(d.X));y=t(p);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(vp(d.Sb));return u(za,wp(a.g,k,f,xp,yp),3);case 3:return u(za,wp(a.h,l,f,xp,yp),4);case 4:return u(za,wp(a.j,m,f,xp,yp),5);case 5:return u(za,wp(a.i,p,f,xp,yp),2);case 2:D=0;C=[];if(a.h.length&&a.g.length)for(I=t(a.g),J=I.next();!J.done;J=I.next())for(P=J.value,Q=t(a.h),Y=Q.next();!Y.done;Y=Q.next())ca=Y.value,ra=dg(P.drmInfos,ca.drmInfos),P.drmInfos.length&&ca.drmInfos.length&&
597
- !ra.length||(Ea=D++,C.push({id:Ea,language:P.language,primary:P.primary,audio:P,video:ca,bandwidth:(P.bandwidth||0)+(ca.bandwidth||0),drmInfos:ra,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),G=t(A),E=G.next();!E.done;E=G.next())H=E.value,L=D++,C.push({id:L,language:H.language,primary:H.primary,audio:H.type==d.bb?H:null,video:H.type==d.va?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
598
- a.l=C;z(za)}})}function rp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Ac),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&fb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Ac=c}}
599
- function tp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&fb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
600
- function sp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Zc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&fb(e.roles,h.roles)&&rf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.Zc=c}}
601
- function up(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
602
- function zp(a){var b,c,d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I,J,P;return K(function(Q){switch(Q.g){case 1:b=mc;if(1==a.length)return Q["return"](a[0]);c=a.map(function(Y){return Y.filter(function(ca){return ca.type==b.bb})});d=a.map(function(Y){return Y.filter(function(ca){return ca.type==b.va})});e=a.map(function(Y){return Y.filter(function(ca){return ca.type==b.X})});f=a.map(function(Y){return Y.filter(function(ca){return ca.type==b.Sb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
603
- k.push(Ap(b.X));l=t(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(Ap(b.Sb));return u(Q,wp([],c,0,Bp,Cp),2);case 2:return n=Q.h,u(Q,wp([],d,0,Bp,Cp),3);case 3:return q=Q.h,u(Q,wp([],e,0,Bp,Cp),4);case 4:return v=Q.h,u(Q,wp([],f,0,Bp,Cp),5);case 5:y=Q.h;x=0;if(q.length&&n.length)for(G=t(n),E=G.next();!E.done;E=G.next())for(H=E.value,L=t(q),I=L.next();!I.done;I=L.next())J=I.value,P=x++,J.variantIds.push(P),H.variantIds.push(P);else for(w=q.concat(n),D=t(w),C=D.next();!C.done;C=D.next())A=C.value,
572
+ function Go(a,b){var c=Ho(a,b,"timescale"),d=1;c&&(d=po(c)||1);var e=Ho(a,b,"duration");c=po(e||"");"image"==a.H.contentType&&(c=ro(e||""));c&&(c/=d);var f=Ho(a,b,"startNumber");e=Number(Ho(a,b,"presentationTimeOffset"))||0;var g=qo(f||"");if(null==f||null==g)g=1;var h=Io(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.V.duration||Infinity;h=bo(h,"S");for(var l=[],m=-e,p=0;p<h.length;++p){var n=h[p],q=h[p+1],v=ko(n,"t",qo),y=ko(n,"d",qo);n=ko(n,"r",oo);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;n=
573
+ n||0;if(0>n)if(q){q=ko(q,"t",qo);if(null==q)break;else if(v>=q)break;n=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;n=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=n;++q)m=v+y,l.push({start:v/f,end:m/f,fg:v}),v=m}f=l}return{timescale:d,ga:c,Ib:g,Sa:e/d||0,fe:e,timeline:f}}function Ho(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(cc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
574
+ function Io(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(cc).map(function(d){return ao(d,c)}).reduce(function(d,e){return d||e})}
575
+ function Jo(a,b,c,d,e,f){for(var g=go(a,"http://www.w3.org/1999/xlink","href"),h=go(a,"http://www.w3.org/1999/xlink","actuate")||"onRequest",k=t(Array.from(a.attributes)),l=k.next();!l.done;l=k.next())l=l.value,"http://www.w3.org/1999/xlink"==l.namespaceURI&&a.removeAttributeNS(l.namespaceURI,l.localName);if(5<=f)return Ie(new N(2,4,4028));if("onLoad"!=h)return Ie(new N(2,4,4027));var m=dc([d],[g]);return e.request(0,Ye(m,b)).Z(function(p){p=uo(p.data,a.tagName);if(!p)return Ie(new N(2,4,4001,g));
576
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;p.childNodes.length;){var n=p.childNodes[0];p.removeChild(n);a.appendChild(n)}p=t(Array.from(p.attributes));for(n=p.next();!n.done;n=p.next())a.setAttributeNode(n.value.cloneNode(!1));return Ko(a,b,c,m[0],e,f+1)})}
577
+ function Ko(a,b,c,d,e,f){f=void 0===f?0:f;if(go(a,"http://www.w3.org/1999/xlink","href")){var g=Jo(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return Ko(a,b,c,d,e,f)}));return g}g=[];for(var h=t(Array.from(a.childNodes)),k=h.next();!k.done;k=h.next())k=k.value,k instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==go(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(Ko(k,b,c,d,e,f)));return Me(g).Z(function(){return a})};function Lo(a,b,c,d,e,f,g){var h,k=(new ng).T("sidx",function(l){h=Mo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
578
+ function Mo(a,b,c,d,e,f,g){var h=[];g.reader.skip(4);var k=g.reader.N();if(0==k)throw new N(2,3,3005);if(0==g.version){var l=g.reader.N();var m=g.reader.N()}else l=g.reader.Hb(),m=g.reader.Hb();g.reader.skip(2);var p=g.reader.Pd();a=a+g.size+m;for(m=0;m<p;m++){var n=g.reader.N(),q=(n&2147483648)>>>31;n&=2147483647;var v=g.reader.N();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new Lh(l/k+c,(l+v)/k+c,function(){return f},a,a+n-1,b,c,d,e));l+=v;a+=n}g.parser.stop();return h};function No(a){this.h=Ib(a);this.g=new kg(this.h,0)}No.prototype.ma=function(){return this.g.ma()};
579
+ function Oo(a){var b=Po(a);if(7<b.length)throw new N(2,3,3002);var c=0;b=t(b);for(var d=b.next();!d.done;d=b.next())c=256*c+d.value;b=Po(a);a:{d=t(Qo);for(var e=d.next();!e.done;e=d.next())if(Db(b,new Uint8Array(e.value))){d=!0;break a}d=!1}if(d)b=a.h.byteLength-a.g.$();else{if(8==b.length&&b[1]&224)throw new N(2,3,3001);for(e=d=0;e<b.length;e++){var f=b[e];d=0==e?f&(1<<8-b.length)-1:256*d+f}b=d}b=a.g.$()+b<=a.h.byteLength?b:a.h.byteLength-a.g.$();d=Ib(a.h,a.g.$(),b);a.g.skip(b);return new Ro(c,d)}
580
+ function Po(a){var b=a.g.$(),c=a.g.Ra();if(0==c)throw new N(2,3,3002);c=8-Math.floor(Math.log2(c));a.g.skip(c-1);return Fb(a.h,b,c)}var Qo=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Ro(a,b){this.id=a;this.g=b}
581
+ function So(a){if(8<a.g.byteLength)throw new N(2,3,3002);if(8==a.g.byteLength&&a.g.getUint8(0)&224)throw new N(2,3,3001);for(var b=0,c=0;c<a.g.byteLength;c++){var d=a.g.getUint8(c);b=256*b+d}return b};function To(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new No(a.g);for(var p=null,n=null;a.ma();){var q=Oo(a);if(187==q.id){var v=Uo(q);v&&(q=c*v.gg,v=b+v.Pf,null!=p&&m.push(new Lh(p+g,q+g,l,n,v-1,f,g,h,k)),p=q,n=v)}}null!=p&&m.push(new Lh(p+g,d+g,l,n,null,f,g,h,k));return m}
582
+ function Uo(a){var b=new No(a.g);a=Oo(b);if(179!=a.id)throw new N(2,3,3013);a=So(a);b=Oo(b);if(183!=b.id)throw new N(2,3,3012);b=new No(b.g);for(var c=0;b.ma();){var d=Oo(b);if(241==d.id){c=So(d);break}}return{gg:a,Pf:c}};function Vo(a,b){var c=Io(a,b,"Initialization");if(!c)return null;var d=a.H.wa,e=c.getAttribute("sourceURL");e&&(d=dc(a.H.wa,[e]));e=0;var f=null;if(c=ko(c,"range",no))e=c.start,f=c.end;return new Jh(function(){return d},e,f,Wo(a))}
583
+ function Xo(a,b){var c=Number(Ho(a,Yo,"presentationTimeOffset"))||0,d=Ho(a,Yo,"timescale"),e=1;d&&(e=po(d)||1);var f=c/e||0,g=Vo(a,Yo);Zo(a,g);var h=Re(a);return{yb:function(){var k=Io(h,Yo,"RepresentationIndex"),l=h.H.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=dc(h.H.wa,[k]));k=$o(h);return ap(h,b,g,l,k.start,k.end,f)}}}
584
+ function ap(a,b,c,d,e,f,g){var h,k,l,m,p,n,q,v,y,x,w,D,C,A,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Wa||!a.V.ve,l=a.V.start,m=a.V.duration,p=a.H.mimeType.split("/")[1],n=b,q=null,v=[n(d,e,f),"webm"==p?n(c.ya(),c.Ba,c.la):null],n=null,u(E,Promise.all(v),2);y=E.h;x=y[0];w=y[1]||null;D=null;C=l-g;A=l;G=m?l+m:Infinity;if("mp4"==p)var H=Lo(x,e,d,c,C,A,G);else{H=new No(w);if(440786851!=Oo(H).id)throw new N(2,3,3008);var L=Oo(H);if(408125543!=L.id)throw new N(2,3,3009);H=L.g.byteOffset;
585
+ L=new No(L.g);for(var I=null;L.ma();){var J=Oo(L);if(357149030==J.id){I=J;break}}if(!I)throw new N(2,3,3010);I=new No(I.g);J=1E6;for(L=null;I.ma();){var P=Oo(I);if(2807729==P.id)J=So(P);else if(17545==P.id)if(4==P.g.byteLength)L=P.g.getFloat32(0);else if(8==P.g.byteLength)L=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==L)throw new N(2,3,3011);I=J/1E9;L*=I;J=Oo(new No(x));if(475249515!=J.id)throw new N(2,3,3007);H=To(J,H,I,L,d,c,C,A,G)}D=H;h.Eb(D);q=new Ni(D);k&&q.Xa(A,G,!0);return E["return"](q)})}
586
+ function Yo(a){return a.rc}function $o(a){var b=Io(a,Yo,"RepresentationIndex");a=Ho(a,Yo,"indexRange");a=no(a||"");b&&(a=ko(b,"range",no,a));return a}function Zo(a,b){bp(a,b);if(!$o(a))throw new N(2,4,4002);}function bp(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=lc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
587
+ function Wo(a){var b=a.H;return{bandwidth:a.bandwidth,audioSamplingRate:b.audioSamplingRate,codecs:b.codecs,contentType:b.contentType,frameRate:b.frameRate||null,height:b.height||null,mimeType:b.mimeType,channelsCount:b.Rc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function cp(a,b){var c=Vo(a,dp),d=ep(a);if(!d.ga&&!d.timeline&&1<d.Cb.length)throw new N(2,4,4002);if(!d.ga&&!a.V.duration&&!d.timeline&&1==d.Cb.length)throw new N(2,4,4002);if(d.timeline&&0==d.timeline.length)throw new N(2,4,4002);var e=null,f=null;a.aa.id&&a.H.id&&(f=b[a.aa.id+","+a.H.id])&&(e=f.segmentIndex);var g=fp(a.V.start,a.V.duration,a.H.wa,d,c);c=!e;e?e.Db(g,a.presentationTimeline.Pa()):e=new Ni(g);a.presentationTimeline.Eb(g);a.Wa&&a.V.ve||e.Xa(a.V.start,a.V.duration?a.V.start+a.V.duration:
588
+ Infinity,c);f&&(f.segmentIndex=e);return{yb:function(){e&&0!=e.J.length||e.jc(g);return Promise.resolve(e)}}}function dp(a){return a.$a}function ep(a){var b=gp(a);a=Go(a,dp);var c=a.Ib;0==c&&(c=1);var d=0;a.ga?d=a.ga*(c-1):a.timeline&&0<a.timeline.length&&(d=a.timeline[0].start);return{ga:a.ga,startTime:d,Ib:c,Sa:a.Sa,timeline:a.timeline,Cb:b}}
589
+ function fp(a,b,c,d,e){var f=d.Cb.length;d.timeline&&d.timeline.length!=d.Cb.length&&(f=Math.min(d.timeline.length,d.Cb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},p=0;p<f;m={gd:m.gd},p++){var n=d.Cb[p];m.gd=dc(c,[n.Gf]);var q=void 0;q=null!=d.ga?l+d.ga:d.timeline?d.timeline[p].end:l+b;k.push(new Lh(a+l,a+q,function(v){return function(){return v.gd}}(m),n.start,n.end,e,g,a,h));l=q}return k}
590
+ function gp(a){return[a.H.$a,a.ja.$a,a.aa.$a].filter(cc).map(function(b){return bo(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.te&&(a.te=!0);var c=b.getAttribute("media");b=ko(b,"mediaRange",no,{start:0,end:null});return{Gf:c,start:b.start,end:b.end}})};function hp(a,b,c,d,e,f){var g=ip(a),h=jp(a);kp(h);var k=Re(a);if(h.hc)return bp(a,g),{yb:function(){var q=Fo(h.hc,k.H.id,null,k.bandwidth||null,null);q=dc(k.H.wa,[q]);return ap(k,b,g,q,0,null,h.Sa)}};if(h.ga)return d||(a.presentationTimeline.Jd(h.ga),a.presentationTimeline.Kd(a.V.start)),{yb:function(){return lp(k,h,e,g,f)}};var l=null;d=d=null;a.aa.id&&a.H.id&&(d=a.aa.id+","+a.H.id,d=c[d])&&(l=d.segmentIndex);var m=mp(k,h,g);c=a.V.start;var p=a.V.duration?a.V.start+a.V.duration:Infinity,n=Infinity!=
591
+ p;l?(n&&(new Ni(m)).Xa(c,p,!0),l.Db(m,a.presentationTimeline.Pa())):l=new Ni(m);a.presentationTimeline.Eb(m);n&&l.Xa(c,p);d&&a.Wa&&(d.segmentIndex=l);return{yb:function(){l&&0!=l.J.length||l.jc(m);return Promise.resolve(l)}}}function np(a){return a.sc}function jp(a){var b=Go(a,np),c=Ho(a,np,"media");a=Ho(a,np,"index");return{ga:b.ga,timescale:b.timescale,Ib:b.Ib,Sa:b.Sa,fe:b.fe,timeline:b.timeline,Hd:c,hc:a}}
592
+ function kp(a){var b=a.hc?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.hc&&(a.timeline=null),a.ga=null);if(!a.hc&&!a.Hd)throw new N(2,4,4002);}
593
+ function lp(a,b,c,d,e){function f(I){var J=(I-q)*n,P=J+b.Sa,Q=J+l;J=Q+n;var Y=Math.min(J,h());Q=new Lh(Q,Y,function(){var ca=Fo(y,w,I,x,P*v);return dc(D,[ca])},0,null,d,C,l,h());Q.j=J;return Q}function g(){var I=[Math.max(k.Pa(),l),Math.min(k.fb(),h())].map(function(J){return J-l});return[Math.ceil(I[0]/n),Math.ceil(I[1]/n)-1].map(function(J){return J+q})}function h(){var I=null!=m&&e[m]||p;return I?l+I:Infinity}var k=a.presentationTimeline,l=a.V.start,m=a.aa.id,p=a.V.duration,n=b.ga,q=b.Ib,v=b.timescale,
594
+ y=b.Hd,x=a.bandwidth||null,w=a.H.id,D=a.H.wa,C=l-b.Sa,A=g();a=a.Wa?Math.max(A[0],A[1]-c+1):A[0];A=A[1];c=[];for(var G=a;G<=A;++G){var E=f(G);c.push(E)}var H=new Ni(c);c=k.fb()<h();G=k.U();if(c||G){var L=Math.max(a,A+1);H.Yc(n,function(){var I=k.Pa();H.cb(I);var J=t(g());J.next();J=J.next().value;for(var P=[];L<=J;){var Q=f(L);P.push(Q);L++}return I>h()&&!P.length?null:P})}return Promise.resolve(H)}
595
+ function mp(a,b,c){var d=a.V.start,e=a.V.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={fd:h.fd,kd:h.kd,nd:h.nd,cd:h.cd,pd:h.pd,dd:h.dd},k++){var l=b.timeline[k],m=l.start,p=l.fg;l=l.end;h.nd=k+b.Ib;h.pd=p+b.fe;h.kd=a.H.id;h.cd=a.bandwidth||null;h.fd=b.Hd;h.dd=a.H.wa;g.push(new Lh(d+m,d+l,function(n){return function(){var q=Fo(n.fd,n.kd,n.nd,n.cd||null,n.pd);return dc(n.dd,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
596
+ function ip(a){var b=Ho(a,np,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.wa;return new Jh(function(){var f=Fo(b,c,null,d,null);return dc(e,[f])},0,null,Wo(a))};function op(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}op.prototype.release=function(){for(var a=t(this.g.concat(this.h,this.j,this.i)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.g=[];this.h=[];this.j=[];this.i=[];this.l=[]};
597
+ function pp(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I,J,P,Q,Y,ca,ra,Fa;return K(function(za){switch(za.g){case 1:d=mc;qp(b);rp(b);sp(b);tp(b);if(!c&&1==b.length){e=b[0];a.g=e.Bc;a.h=e.$c;a.j=e.textStreams;a.i=e.imageStreams;za.A(2);break}f=-1;for(g=0;g<b.length;g++)h=b[g],a.m.has(h.id)||(a.m.add(h.id),-1==f&&(f=g));if(-1==f)return za["return"]();k=b.map(function(Ka){return Ka.Bc});l=b.map(function(Ka){return Ka.$c});m=b.map(function(Ka){return Ka.textStreams});p=b.map(function(Ka){return Ka.imageStreams});
598
+ n=t(m);for(q=n.next();!q.done;q=n.next())v=q.value,v.push(up(d.X));y=t(p);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(up(d.Sb));return u(za,vp(a.g,k,f,wp,xp),3);case 3:return u(za,vp(a.h,l,f,wp,xp),4);case 4:return u(za,vp(a.j,m,f,wp,xp),5);case 5:return u(za,vp(a.i,p,f,wp,xp),2);case 2:D=0;C=[];if(a.h.length&&a.g.length)for(I=t(a.g),J=I.next();!J.done;J=I.next())for(P=J.value,Q=t(a.h),Y=Q.next();!Y.done;Y=Q.next())ca=Y.value,ra=cg(P.drmInfos,ca.drmInfos),P.drmInfos.length&&ca.drmInfos.length&&
599
+ !ra.length||(Fa=D++,C.push({id:Fa,language:P.language,primary:P.primary,audio:P,video:ca,bandwidth:(P.bandwidth||0)+(ca.bandwidth||0),drmInfos:ra,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(A=a.h.concat(a.g),G=t(A),E=G.next();!E.done;E=G.next())H=E.value,L=D++,C.push({id:L,language:H.language,primary:H.primary,audio:H.type==d.bb?H:null,video:H.type==d.va?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
600
+ a.l=C;z(za)}})}function qp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Bc),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.channelsCount==h.channelsCount&&e.language==h.language&&e.bandwidth==h.bandwidth&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&fb(e.roles,h.roles)&&e.audioSamplingRate==h.audioSamplingRate&&e.primary==h.primary&&(f=!0);f||c.push(e)}b.Bc=c}}
601
+ function sp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.textStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.language==h.language&&e.label==h.label&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.bandwidth==h.bandwidth&&fb(e.roles,h.roles)&&(f=!0);f||c.push(e)}b.textStreams=c}}
602
+ function rp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.$c),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.frameRate==h.frameRate&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&e.label==h.label&&fb(e.roles,h.roles)&&qf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.$c=c}}
603
+ function tp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.imageStreams),e=d.next();!e.done;e=d.next()){e=e.value;for(var f=!1,g=t(c),h=g.next();!h.done;h=g.next())h=h.value,e.id!=h.id&&e.width==h.width&&e.codecs==h.codecs&&e.mimeType==h.mimeType&&(f=!0);f||c.push(e)}b.imageStreams=c}}
604
+ function yp(a){var b,c,d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I,J,P;return K(function(Q){switch(Q.g){case 1:b=mc;if(1==a.length)return Q["return"](a[0]);c=a.map(function(Y){return Y.filter(function(ca){return ca.type==b.bb})});d=a.map(function(Y){return Y.filter(function(ca){return ca.type==b.va})});e=a.map(function(Y){return Y.filter(function(ca){return ca.type==b.X})});f=a.map(function(Y){return Y.filter(function(ca){return ca.type==b.Sb})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
605
+ k.push(zp(b.X));l=t(f);for(m=l.next();!m.done;m=l.next())p=m.value,p.push(zp(b.Sb));return u(Q,vp([],c,0,Ap,Bp),2);case 2:return n=Q.h,u(Q,vp([],d,0,Ap,Bp),3);case 3:return q=Q.h,u(Q,vp([],e,0,Ap,Bp),4);case 4:return v=Q.h,u(Q,vp([],f,0,Ap,Bp),5);case 5:y=Q.h;x=0;if(q.length&&n.length)for(G=t(n),E=G.next();!E.done;E=G.next())for(H=E.value,L=t(q),I=L.next();!I.done;I=L.next())J=I.value,P=x++,J.variantIds.push(P),H.variantIds.push(P);else for(w=q.concat(n),D=t(w),C=D.next();!C.done;C=D.next())A=C.value,
604
606
  A.variantIds=[x++];return Q["return"](q.concat(n).concat(v).concat(y))}})}
605
- function wp(a,b,c,d,e){var f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I;return K(function(J){switch(J.g){case 1:f=mc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){J.A(4);break}m=l.value;return u(J,Dp(m,b,c,e,g),5);case 5:p=J.h;if(!p)throw new N(2,4,4037);l=k.next();J.A(2);break;case 4:n=t(g);for(q=n.next();!q.done;q=n.next())for(v=q.value,y=t(v),x=y.next();!x.done;x=y.next())w=x.value,(D=Ep(w,b,d,e,g))&&a.push(D);C=t(g);for(q=C.next();!q.done;q=
606
- C.next())for(A=q.value,G={},E=t(A),x=E.next();!x.done;G={Va:G.Va},x=E.next())if(G.Va=x.value,H=G.Va.type==f.X&&!G.Va.language,L=G.Va.type==f.Sb&&!G.Va.tilesLayout,!H&&!L&&(I=a.some(function(P){return function(Q){return Q.mimeType==P.Va.mimeType&&ad(Q.codecs)==ad(P.Va.codecs)}}(G))))throw new N(2,4,4037);return J["return"](a)}})}
607
- function Dp(a,b,c,d,e){return K(function(f){if(1==f.g)return Fp(b,a),a.matchedStreams?a.segmentIndex?u(f,Gp(a,c),2):f.A(2):f["return"](!1);Hp(a,c,d,e);return f["return"](!0)})}
608
- function Gp(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Ri)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);z(l)})}
609
- function Ep(a,b,c,d,e){var f=c(a);Fp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new Ri;return u(g,Gp(f,0),0)})});if(!f.matchedStreams)return null;Hp(f,0,d,e);return f}function Hp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==ud(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
610
- function xp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
611
- function Bp(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
612
- function yp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=dg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
613
- (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=xp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),yp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&yp(a.trickModeVideo,b)}
614
- function Cp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
615
- function Fp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Ip,video:Ip,text:Jp,image:Kp}[f.type],h={audio:Lp,video:Mp,text:Np,image:Op}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function Ip(a,b){var c;if(!(c=b.mimeType!=a.mimeType||ad(b.codecs)!=ad(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<dg(c,d).length:1)}return c?!1:!0}
616
- function Jp(a,b){return a.language?b.language?0==ud(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Kp(a){return a.tilesLayout?!0:!1}
617
- function Lp(a,b,c){if(a.id==c.id)return!0;var d=ud(a.language,b.language),e=ud(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
618
- d=Pp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Qp)return!0;if(d==Rp)return!1;d=Pp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Qp?!0:d==Rp?!1:a.bandwidth&&Sp(a.bandwidth,b.bandwidth,c.bandwidth)==Qp?!0:!1}
619
- function Mp(a,b,c){if(a.id==c.id)return!0;var d=Pp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Qp)return!0;if(d==Rp)return!1;if(a.frameRate){d=Pp(a.frameRate,b.frameRate,c.frameRate);if(d==Qp)return!0;if(d==Rp)return!1}return a.bandwidth&&Sp(a.bandwidth,b.bandwidth,c.bandwidth)==Qp?!0:!1}
620
- function Np(a,b,c){if(a.id==c.id)return!0;var d=ud(a.language,b.language),e=ud(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
621
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Op(a,b,c){return a.id==c.id?!0:Pp(a.width*a.height,b.width*b.height,c.width*c.height)==Qp?!0:!1}function Ap(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
622
- function vp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oi([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
623
- function Pp(a,b,c){if(b==a&&a!=c)return Rp;if(c==a&&a!=b)return Qp;if(b>a){if(c<=a||c-a<b-a)return Qp;if(c-a>b-a)return Rp}else{if(c>a)return Rp;if(a-c<a-b)return Qp;if(a-c>a-b)return Rp}return Tp}function Sp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Qp:b<a?Rp:Tp}var Qp=1,Tp=0,Rp=-1;function Up(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new pp;this.F=0;this.I=new Pa(5);this.D=new O(function(){Vp(a)});this.o=new Te;this.s=null;this.L=[];this.u=Infinity;this.C=!1}r=Up.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Wp(c),2);d=e.h;c.h&&Xp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
624
- r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return B(c,2),u(c,Wp(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};r.onExpirationUpdated=function(){};
625
- function Wp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=Ze(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Ue(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Yp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
626
- function Yp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=vo(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Zp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Lo(d,a.g.retryParameters,f,c,a.h.networkingEngine);Ue(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](Zp(a,h,c))})}
627
- function Zp(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I,J,P,Q,Y,ca,ra,Ea,za,Ka;return K(function(Ba){switch(Ba.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=co(b,"Location").map(jo).filter(cc);0<f.length&&(g=dc(e,f),e=a.m=g);h=co(b,"BaseURL");k=h.map(jo);l=dc(e,k);m=0;h&&h.length&&(m=lo(h[0],"availabilityTimeOffset",so)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=lo(b,"minBufferTime",no)||0);a.F=lo(b,"minimumUpdatePeriod",no,-1);q=lo(b,"availabilityStartTime",mo);v=lo(b,
628
- "timeShiftBufferDepth",no);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=lo(b,"suggestedPresentationDelay",no));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=lo(b,"maxSegmentDuration",no));C=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,G=t(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.cb(A.Pa());else L=a.g.defaultPresentationDelay||1.5*n,I=null!=x?x:L,A=new T(q,I,a.g.dash.autoCorrectDrift);A.sc("static"==C);(J=A.U())&&
629
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.Zd(v);P=b.getAttribute("profiles")||"";Q={Wa:"static"!=C,presentationTimeline:A,aa:null,V:null,ja:null,H:null,bandwidth:0,se:!1,wb:m,profiles:P.split(",")};Y=$p(a,Q,l,b);ca=Y.duration;ra=Y.periods;"static"!=C&&Y.le||A.Ia(ca||Infinity);a.u&&!a.C&&(Ea=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?A.De(a.u):a.u&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
630
- A.Hd(D||1);return u(Ba,qp(a.j,ra,Q.Wa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Ba.A(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!A.Ie()){Ba.A(4);break}za=co(b,"UTCTiming");return u(Ba,aq(a,l,za),5);case 5:Ka=Ba.h;if(!a.h)return Ba["return"]();A.Ee(Ka);case 4:A.Bd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Ba)}})}
631
- function $p(a,b,c,d){var e=lo(d,"mediaPresentationDuration",no),f=[],g=0;d=co(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=lo(k,"start",no,g),p=k.id,n=lo(k,"duration",no),q=null;if(l){var v=lo(l,"start",no);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.L.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=bq(a,b,c,{start:m,duration:q,node:k,ue:null==q||!l});f.push(g);b.aa.id&&q&&(a.M[b.aa.id]=q);if(null==q){g=
632
- null;break}g=m+q}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,le:!1}:{periods:f,duration:g,le:!0}}
633
- function bq(a,b,c,d){b.aa=cq(d.node,null,c);b.V=d;b.aa.wb=b.wb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=co(d.node,"EventStream");c=b.presentationTimeline.Pa();e=t(e);for(var f=e.next();!f.done;f=e.next())dq(a,d.start,d.duration,f.value,c);c=co(d.node,"AdaptationSet").map(function(m){return eq(a,b,m)}).filter(cc);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Rf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
634
- }d=c.filter(function(m){return!m.be});c=c.filter(function(m){return m.be});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.be.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={zc:h.zc},l=k.next())h.zc=l.value,h.zc.trickModeVideo=e.streams.find(function(m){return function(p){return ad(m.zc.codecs)==ad(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:fq(d,"audio");g=a.g.disableVideo?[]:fq(d,"video");f=a.g.disableText?
635
- []:fq(d,lc);c=a.g.disableThumbnails?[]:fq(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.aa.id,Ac:d,Zc:e,textStreams:g,imageStreams:f}}
636
- function fq(a,b){return a.filter(function(c){return c.contentType==b})}
637
- function eq(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ja=cq(c,b.aa,null);var e=!1,f=co(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(cc),h=void 0,k=b.ja.contentType==lc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
638
- l}}var p;m=co(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var q=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=co(c,"SupplementalProperty");m=t(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
639
- 10)));m=co(c,"Accessibility");var v=new Map;m=t(m);for(n=m.next();!n.done;n=m.next())if(q=n.value,n=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=q){q=q.split(";");for(var y=t(q),x=y.next();!x.done;x=y.next()){var w=x.value,D=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(x="CC"+n,2==q.length?n+=2:n++,D=w);v.set(x,R(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
640
- 1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+n,n++,w=x),v.set(y,R(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=co(c,"ContentProtection");var C=wo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=R(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=co(c,"Label"))&&l.length&&
641
- (l=l[0],l.textContent&&(G=l.textContent));l=co(c,"Representation");c=l.map(function(E){if(E=gq(a,b,C,h,A,G,e,g,v,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ja.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ja.contentType||"application"==b.ja.contentType)for(b.ja.contentType=hq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ja.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
642
- m.value,n=t(C.drmInfos),q=n.next();!q.done;q=n.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(cc);return{id:b.ja.id||"__fake__"+a.G++,contentType:b.ja.contentType,language:A,Qg:e,streams:c,drmInfos:C.drmInfos,be:f,Rf:k}}
643
- function gq(a,b,c,d,e,f,g,h,k,l){b.H=cq(l,b.ja,null);a.u=Math.min(a.u,b.H.wb);if(!iq(b.H))return null;var m=b.V.start;b.bandwidth=lo(l,"bandwidth",qo)||0;var p=b.H.contentType,n=p==lc||"application"==p;p="image"==p;try{var q=function(H,L,I){return jq(a,H,L,I)};if(b.H.qc)var v=Yo(b,q);else if(b.H.$a)v=dp(b,a.l);else if(b.H.rc)v=ip(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.H.wa,x=b.V.duration||0;v={yb:function(){return Promise.resolve(Qi(m,x,y))}}}}catch(H){if((n||p)&&4002==H.code)return null;
644
- throw H;}q=co(l,"ContentProtection");q=zo(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;co(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(p&&((l=co(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
607
+ function vp(a,b,c,d,e){var f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I;return K(function(J){switch(J.g){case 1:f=mc;g=[];for(h=0;h<b.length;h++)h>=c?g.push(new Set(b[h])):g.push(new Set);k=t(a);l=k.next();case 2:if(l.done){J.A(4);break}m=l.value;return u(J,Cp(m,b,c,e,g),5);case 5:p=J.h;if(!p)throw new N(2,4,4037);l=k.next();J.A(2);break;case 4:n=t(g);for(q=n.next();!q.done;q=n.next())for(v=q.value,y=t(v),x=y.next();!x.done;x=y.next())w=x.value,(D=Dp(w,b,d,e,g))&&a.push(D);C=t(g);for(q=C.next();!q.done;q=
608
+ C.next())for(A=q.value,G={},E=t(A),x=E.next();!x.done;G={Va:G.Va},x=E.next())if(G.Va=x.value,H=G.Va.type==f.X&&!G.Va.language,L=G.Va.type==f.Sb&&!G.Va.tilesLayout,!H&&!L&&(I=a.some(function(P){return function(Q){return Q.mimeType==P.Va.mimeType&&$c(Q.codecs)==$c(P.Va.codecs)}}(G))))throw new N(2,4,4037);return J["return"](a)}})}
609
+ function Cp(a,b,c,d,e){return K(function(f){if(1==f.g)return Ep(b,a),a.matchedStreams?a.segmentIndex?u(f,Fp(a,c),2):f.A(2):f["return"](!1);Gp(a,c,d,e);return f["return"](!0)})}
610
+ function Fp(a,b){var c,d,e,f,g,h,k;return K(function(l){if(1==l.g){c=[];d=a.matchedStreams;e=t(d);for(f=e.next();!f.done;f=e.next())g=f.value,c.push(g.createSegmentIndex()),g.trickModeVideo&&!g.trickModeVideo.segmentIndex&&c.push(g.trickModeVideo.createSegmentIndex());return u(l,Promise.all(c),2)}if(a.segmentIndex instanceof Qi)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);z(l)})}
611
+ function Dp(a,b,c,d,e){var f=c(a);Ep(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new Qi;return u(g,Fp(f,0),0)})});if(!f.matchedStreams)return null;Gp(f,0,d,e);return f}function Gp(a,b,c,d){for(var e=a.matchedStreams,f=0;f<e.length;f++)if(f>=b){var g=e[f];c(a,g);var h=!0;"audio"==a.type&&0==td(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
612
+ function wp(a){var b=Object.assign({},a);b.originalId=null;b.createSegmentIndex=function(){return Promise.resolve()};b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null);if(b.matchedStreams)for(var c=t(b.matchedStreams),d=c.next();!d.done;d=c.next())d=d.value,d.segmentIndex&&(d.segmentIndex.release(),d.segmentIndex=null)};b.segmentIndex=null;b.emsgSchemeIdUris=[];b.keyIds=new Set;b.closedCaptions=null;b.trickModeVideo=null;return b}
613
+ function Ap(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
614
+ function xp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));b.emsgSchemeIdUris&&(a.emsgSchemeIdUris=Array.from(new Set(a.emsgSchemeIdUris.concat(b.emsgSchemeIdUris))));a.keyIds=function(f,g){return new Set([].concat(ia(f),ia(g)))}(a.keyIds,b.keyIds);null==a.originalId?a.originalId=b.originalId:a.originalId+=","+(b.originalId||"");var c=cg(a.drmInfos,b.drmInfos);if(b.drmInfos.length&&a.drmInfos.length&&!c.length)throw new N(2,4,4038);a.drmInfos=c;a.encrypted=a.encrypted||b.encrypted;if(b.closedCaptions){a.closedCaptions||
615
+ (a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}b.trickModeVideo?(a.trickModeVideo||(a.trickModeVideo=wp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),xp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&xp(a.trickModeVideo,b)}
616
+ function Bp(a,b){a.roles=Array.from(new Set(a.roles.concat(b.roles)));var c=b.keyIds;c=new Set([].concat(ia(a.keyIds),ia(c)));a.keyIds=c;a.encrypted=a.encrypted&&b.encrypted;a.segments.push.apply(a.segments,ia(b.segments));if(b.closedCaptions){a.closedCaptions||(a.closedCaptions=new Map);c=t(b.closedCaptions);for(var d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.closedCaptions.set(d,e)}}}
617
+ function Ep(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:Hp,video:Hp,text:Ip,image:Jp}[f.type],h={audio:Kp,video:Lp,text:Mp,image:Np}[f.type],k=null;e=t(e.value);for(var l=e.next();!l.done;l=e.next())l=l.value,!g(f,l)||k&&!h(f,k,l)||(k=l);f=k;if(!f)return;c.push(f)}b.matchedStreams=c}function Hp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||$c(b.codecs)!=$c(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<cg(c,d).length:1)}return c?!1:!0}
618
+ function Ip(a,b){return a.language?b.language?0==td(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function Jp(a){return a.tilesLayout?!0:!1}
619
+ function Kp(a,b,c){if(a.id==c.id)return!0;var d=td(a.language,b.language),e=td(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length)return d=b.roles.filter(function(f){return a.roles.includes(f)}),e=c.roles.filter(function(f){return a.roles.includes(f)}),e.length>d.length?!0:e.length<d.length?!1:c.roles.length<b.roles.length;if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1;
620
+ d=Op(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Pp)return!0;if(d==Qp)return!1;d=Op(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Pp?!0:d==Qp?!1:a.bandwidth&&Rp(a.bandwidth,b.bandwidth,c.bandwidth)==Pp?!0:!1}
621
+ function Lp(a,b,c){if(a.id==c.id)return!0;var d=Op(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Pp)return!0;if(d==Qp)return!1;if(a.frameRate){d=Op(a.frameRate,b.frameRate,c.frameRate);if(d==Pp)return!0;if(d==Qp)return!1}return a.bandwidth&&Rp(a.bandwidth,b.bandwidth,c.bandwidth)==Pp?!0:!1}
622
+ function Mp(a,b,c){if(a.id==c.id)return!0;var d=td(a.language,b.language),e=td(a.language,c.language);if(e>d)return!0;if(e<d)return!1;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;if(a.roles.length){d=b.roles.filter(function(f){return a.roles.includes(f)});e=c.roles.filter(function(f){return a.roles.includes(f)});if(e.length>d.length)return!0;if(e.length<d.length)return!1}else{if(!c.roles.length&&b.roles.length)return!0;if(c.roles.length&&!b.roles.length)return!1}return c.mimeType!=
623
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Np(a,b,c){return a.id==c.id?!0:Op(a.width*a.height,b.width*b.height,c.width*c.height)==Pp?!0:!1}function zp(a){return{id:0,originalId:"",primary:!1,type:a,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
624
+ function up(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ni([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:a,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}
625
+ function Op(a,b,c){if(b==a&&a!=c)return Qp;if(c==a&&a!=b)return Pp;if(b>a){if(c<=a||c-a<b-a)return Pp;if(c-a>b-a)return Qp}else{if(c>a)return Qp;if(a-c<a-b)return Pp;if(a-c>a-b)return Qp}return Sp}function Rp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Pp:b<a?Qp:Sp}var Pp=1,Sp=0,Qp=-1;function Tp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new op;this.F=0;this.I=new Pa(5);this.D=new O(function(){Up(a)});this.o=new Se;this.s=null;this.L=[];this.u=Infinity;this.C=!1}r=Tp.prototype;r.configure=function(a){this.g=a};r.start=function(a,b){var c=this,d;return K(function(e){if(1==e.g)return c.C=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Vp(c),2);d=e.h;c.h&&Wp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
626
+ r.stop=function(){for(var a=t(Object.values(this.l)),b=a.next();!b.done;b=a.next())b=b.value,b.segmentIndex&&b.segmentIndex.release();this.j&&this.j.release();this.g=this.h=null;this.m=[];this.i=null;this.l={};this.j=null;null!=this.D&&(this.D.stop(),this.D=null);return this.o.destroy()};r.update=function(){var a=this,b;return K(function(c){if(1==c.g)return B(c,2),u(c,Vp(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);z(c)})};r.onExpirationUpdated=function(){};
627
+ function Vp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=Ye(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),Te(a.o,e),u(k,e.promise,2);if(3!=k.g){f=k.h;if(!a.h)return k["return"](0);f.uri&&!a.m.includes(f.uri)&&a.m.unshift(f.uri);return u(k,Xp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
628
+ function Xp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=uo(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Yp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=Ko(d,a.g.retryParameters,f,c,a.h.networkingEngine);Te(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](Yp(a,h,c))})}
629
+ function Yp(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I,J,P,Q,Y,ca,ra,Fa,za,Ka;return K(function(Aa){switch(Aa.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=bo(b,"Location").map(io).filter(cc);0<f.length&&(g=dc(e,f),e=a.m=g);h=bo(b,"BaseURL");k=h.map(io);l=dc(e,k);m=0;h&&h.length&&(m=ko(h[0],"availabilityTimeOffset",ro)||0);p=a.g.dash.ignoreMinBufferTime;n=0;p||(n=ko(b,"minBufferTime",mo)||0);a.F=ko(b,"minimumUpdatePeriod",mo,-1);q=ko(b,"availabilityStartTime",lo);v=ko(b,
630
+ "timeShiftBufferDepth",mo);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=ko(b,"suggestedPresentationDelay",mo));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=ko(b,"maxSegmentDuration",mo));C=b.getAttribute("type")||"static";if(a.i)for(A=a.i.presentationTimeline,G=t(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.cb(A.Pa());else L=a.g.defaultPresentationDelay||1.5*n,I=null!=x?x:L,A=new T(q,I,a.g.dash.autoCorrectDrift);A.tc("static"==C);(J=A.U())&&
631
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);A.ae(v);P=b.getAttribute("profiles")||"";Q={Wa:"static"!=C,presentationTimeline:A,aa:null,V:null,ja:null,H:null,bandwidth:0,te:!1,wb:m,profiles:P.split(",")};Y=Zp(a,Q,l,b);ca=Y.duration;ra=Y.periods;"static"!=C&&Y.me||A.Ia(ca||Infinity);a.u&&!a.C&&(Fa=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?A.Ee(a.u):a.u&&Va("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");
632
+ A.Jd(D||1);return u(Aa,pp(a.j,ra,Q.Wa),2);case 2:if(a.i){a.i.variants=a.j.l;a.i.textStreams=a.j.j.slice();a.i.imageStreams=a.j.i;a.h.filter(a.i);Aa.A(3);break}a.i={presentationTimeline:A,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:n||0,sequenceMode:!1};if(!A.Je()){Aa.A(4);break}za=bo(b,"UTCTiming");return u(Aa,$p(a,l,za),5);case 5:Ka=Aa.h;if(!a.h)return Aa["return"]();A.Fe(Ka);case 4:A.Dd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),z(Aa)}})}
633
+ function Zp(a,b,c,d){var e=ko(d,"mediaPresentationDuration",mo),f=[],g=0;d=bo(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=ko(k,"start",mo,g),p=k.id,n=ko(k,"duration",mo),q=null;if(l){var v=ko(l,"start",mo);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=n);if(!(null!==a.s&&null!==p&&null!==m&&m<a.s)||a.L.includes(p)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=aq(a,b,c,{start:m,duration:q,node:k,ve:null==q||!l});f.push(g);b.aa.id&&q&&(a.M[b.aa.id]=q);if(null==q){g=
634
+ null;break}g=m+q}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,me:!1}:{periods:f,duration:g,me:!0}}
635
+ function aq(a,b,c,d){b.aa=bq(d.node,null,c);b.V=d;b.aa.wb=b.wb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=bo(d.node,"EventStream");c=b.presentationTimeline.Pa();e=t(e);for(var f=e.next();!f.done;f=e.next())cq(a,d.start,d.duration,f.value,c);c=bo(d.node,"AdaptationSet").map(function(m){return dq(a,b,m)}).filter(cc);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.Sf);for(var g=f.next();!g.done;g=f.next())d.push(g.value)}if(d.length!=(new Set(d)).size)throw new N(2,4,4018);
636
+ }d=c.filter(function(m){return!m.de});c=c.filter(function(m){return m.de});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.de.split(" ");g=t(d);for(var h=g.next();!h.done;h=g.next()){var k=h.value;if(f.includes(k.id)){h={};k=t(k.streams);for(var l=k.next();!l.done;h={Ac:h.Ac},l=k.next())h.Ac=l.value,h.Ac.trickModeVideo=e.streams.find(function(m){return function(p){return $c(m.Ac.codecs)==$c(p.codecs)}}(h))}}}e=a.g.disableAudio?[]:eq(d,"audio");g=a.g.disableVideo?[]:eq(d,"video");f=a.g.disableText?
637
+ []:eq(d,lc);c=a.g.disableThumbnails?[]:eq(d,"image");if(!g.length&&!e.length)throw new N(2,4,4004);d=[];e=t(e);for(h=e.next();!h.done;h=e.next())d.push.apply(d,ia(h.value.streams));e=[];g=t(g);for(h=g.next();!h.done;h=g.next())e.push.apply(e,ia(h.value.streams));g=[];f=t(f);for(h=f.next();!h.done;h=f.next())g.push.apply(g,ia(h.value.streams));f=[];c=t(c);for(h=c.next();!h.done;h=c.next())f.push.apply(f,ia(h.value.streams));return{id:b.aa.id,Bc:d,$c:e,textStreams:g,imageStreams:f}}
638
+ function eq(a,b){return a.filter(function(c){return c.contentType==b})}
639
+ function dq(a,b,c){function d(E){switch(E){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}b.ja=bq(c,b.aa,null);var e=!1,f=bo(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(cc),h=void 0,k=b.ja.contentType==lc;k&&(h="subtitle");f=t(f);for(var l=f.next();!l.done;l=f.next()){l=l.value;var m=l.getAttribute("schemeIdUri");if(null==m||"urn:mpeg:dash:role:2011"==m)switch(l=l.getAttribute("value"),l){case "main":e=!0;break;case "caption":case "subtitle":h=
640
+ l}}var p;m=bo(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var n=m.next();!n.done;n=m.next()){n=n.value;var q=n.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=n.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?p=d(parseInt(n.getAttribute("value"),10)):l=!0}m=bo(c,"SupplementalProperty");m=t(m);for(n=m.next();!n.done;n=m.next())n=n.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==n.getAttribute("schemeIdUri")&&(p=d(parseInt(n.getAttribute("value"),
641
+ 10)));m=bo(c,"Accessibility");var v=new Map;m=t(m);for(n=m.next();!n.done;n=m.next())if(q=n.value,n=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==n)if(n=1,null!=q){q=q.split(";");for(var y=t(q),x=y.next();!x.done;x=y.next()){var w=x.value,D=x=void 0;w.includes("=")?(w=w.split("="),x=w[0].startsWith("CC")?w[0]:"CC"+w[0],D=w[1]||"und"):(x="CC"+n,2==q.length?n+=2:n++,D=w);v.set(x,R(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==n)if(n=
642
+ 1,null!=q)for(q=t(q.split(";")),x=q.next();!x.done;x=q.next())x=x.value,w=y=void 0,x.includes("=")?(x=x.split("="),y="svc"+x[0],w=x[1].split(",")[0].split(":").pop()):(y="svc"+n,n++,w=x),v.set(y,R(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==n&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=bo(c,"ContentProtection");var C=vo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),A=R(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=bo(c,"Label"))&&l.length&&
643
+ (l=l[0],l.textContent&&(G=l.textContent));l=bo(c,"Representation");c=l.map(function(E){if(E=fq(a,b,C,h,A,G,e,g,v,E))E.hdr=E.hdr||p;return E}).filter(function(E){return!!E});if(0==c.length){f="image"==b.ja.contentType;if(a.g.dash.ignoreEmptyAdaptationSet||k||f)return null;throw new N(2,4,4003);}if(!b.ja.contentType||"application"==b.ja.contentType)for(b.ja.contentType=gq(c[0].mimeType,c[0].codecs),k=t(c),m=k.next();!m.done;m=k.next())m.value.type=b.ja.contentType;k=t(c);for(m=k.next();!m.done;m=k.next())for(m=
644
+ m.value,n=t(C.drmInfos),q=n.next();!q.done;q=n.next())q=q.value,q.keyIds=q.keyIds&&m.keyIds?new Set([].concat(ia(q.keyIds),ia(m.keyIds))):q.keyIds||m.keyIds;k=l.map(function(E){return E.getAttribute("id")}).filter(cc);return{id:b.ja.id||"__fake__"+a.G++,contentType:b.ja.contentType,language:A,Rg:e,streams:c,drmInfos:C.drmInfos,de:f,Sf:k}}
645
+ function fq(a,b,c,d,e,f,g,h,k,l){b.H=bq(l,b.ja,null);a.u=Math.min(a.u,b.H.wb);if(!hq(b.H))return null;var m=b.V.start;b.bandwidth=ko(l,"bandwidth",po)||0;var p=b.H.contentType,n=p==lc||"application"==p;p="image"==p;try{var q=function(H,L,I){return iq(a,H,L,I)};if(b.H.rc)var v=Xo(b,q);else if(b.H.$a)v=cp(b,a.l);else if(b.H.sc)v=hp(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.H.wa,x=b.V.duration||0;v={yb:function(){return Promise.resolve(Pi(m,x,y))}}}}catch(H){if((n||p)&&4002==H.code)return null;
646
+ throw H;}q=bo(l,"ContentProtection");q=yo(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;bo(l,"SupplementalProperty").some(function(H){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==H.getAttribute("schemeIdUri")&&"JOC"==H.getAttribute("value")})&&(w=!0);var D=!1;n&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var C;if(p&&((l=bo(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
645
647
  (C=l.getAttribute("value")),!C))return null;var A;l=b.H.codecs;b.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(A="PQ");var G=b.H.id?b.aa.id+","+b.H.id:"",E={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,L,I;return K(function(J){if(1==J.g){L=(H=G&&b.Wa&&a.l[G])?a.l[G]:E;if(L.segmentIndex)return J.A(0);I=L;return u(J,v.yb(),3)}I.segmentIndex=J.h;z(J)})},closeSegmentIndex:function(){E.segmentIndex&&
646
- (E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ja.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Qc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:w,closedCaptions:k,
647
- hdr:A,tilesLayout:C,matchedStreams:[]};G&&b.Wa&&!a.l[G]&&(a.l[G]=E);return E}function Vp(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,B(d,2),u(d,Wp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Xp(a,b);z(d)}})}function Xp(a,b){0>a.F||a.D.S(Math.max(3,a.F-b,Qa(a.I)))}
648
- function cq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Qc:null,audioSamplingRate:null,wb:0};c=c||b.wa;var d=co(a,"BaseURL"),e=d.map(jo),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=lo(a,"frameRate",to)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=co(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=t(m);for(var n=m.next();!n.done;n=
649
- m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=co(a,"AudioChannelConfiguration");m=kq(m)||b.Qc;n=lo(a,"audioSamplingRate",ro)||b.audioSamplingRate;f||(f=hq(g,h));var q=bo(a,"SegmentBase"),v=bo(a,"SegmentTemplate"),y=q?lo(q,"availabilityTimeOffset",so)||0:0,x=v?lo(v,"availabilityTimeOffset",so)||0:0;d=d&&d.length?lo(d[0],"availabilityTimeOffset",so)||0:0;d=b.wb+d+y+x;return{wa:dc(c,e),qc:q||b.qc,$a:bo(a,"SegmentList")||b.$a,rc:v||b.rc,width:lo(a,"width",ro)||b.width,height:lo(a,
650
- "height",ro)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),Qc:m,audioSamplingRate:n,wb:d}}
651
- function kq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
652
- parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function iq(a){var b=a.qc?1:0;b+=a.$a?1:0;b+=a.rc?1:0;if(0==b)return a.contentType==lc||"application"==a.contentType?!0:!1;1!=b&&(a.qc&&(a.$a=null),a.rc=null);return!0}
653
- function lq(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=dc(b,[c]),f=Ze(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Ue(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Fc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
654
- function aq(a,b,c){var d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){p.A(4);break}h=g.value;B(p,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return p.A(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return p.A(8);
655
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}p.A(9);break;case 7:return u(p,lq(a,b,l,"HEAD"),10);case 10:return p["return"](p.h);case 8:return u(p,lq(a,b,l,"GET"),11);case 11:return p["return"](p.h);
648
+ (E.segmentIndex.release(),E.segmentIndex=null)},segmentIndex:null,mimeType:b.H.mimeType,codecs:b.H.codecs,frameRate:b.H.frameRate,pixelAspectRatio:b.H.pixelAspectRatio,bandwidth:b.bandwidth,width:b.H.width,height:b.H.height,kind:d,encrypted:0<c.drmInfos.length,drmInfos:c.drmInfos,keyIds:q,language:e,label:f,type:b.ja.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.H.emsgSchemeIdUris,roles:h,forced:D,channelsCount:b.H.Rc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:w,closedCaptions:k,
649
+ hdr:A,tilesLayout:C,matchedStreams:[]};G&&b.Wa&&!a.l[G]&&(a.l[G]=E);return E}function Up(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,B(d,2),u(d,Vp(a),4);case 4:b=d.h;va(d,3);break;case 2:c=F(d),a.h&&(c.severity=1,a.h.onError(c));case 3:if(!a.h)return d["return"]();Wp(a,b);z(d)}})}function Wp(a,b){0>a.F||a.D.S(Math.max(3,a.F-b,Qa(a.I)))}
650
+ function bq(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Rc:null,audioSamplingRate:null,wb:0};c=c||b.wa;var d=bo(a,"BaseURL"),e=d.map(io),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=ko(a,"frameRate",so)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=bo(a,"InbandEventStream"),p=b.emsgSchemeIdUris.slice();m=t(m);for(var n=m.next();!n.done;n=
651
+ m.next())n=n.value.getAttribute("schemeIdUri"),p.includes(n)||p.push(n);m=bo(a,"AudioChannelConfiguration");m=jq(m)||b.Rc;n=ko(a,"audioSamplingRate",qo)||b.audioSamplingRate;f||(f=gq(g,h));var q=ao(a,"SegmentBase"),v=ao(a,"SegmentTemplate"),y=q?ko(q,"availabilityTimeOffset",ro)||0:0,x=v?ko(v,"availabilityTimeOffset",ro)||0:0;d=d&&d.length?ko(d[0],"availabilityTimeOffset",ro)||0:0;d=b.wb+d+y+x;return{wa:dc(c,e),rc:q||b.rc,$a:ao(a,"SegmentList")||b.$a,sc:v||b.sc,width:ko(a,"width",qo)||b.width,height:ko(a,
652
+ "height",qo)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:p,id:a.getAttribute("id"),Rc:m,audioSamplingRate:n,wb:d}}
653
+ function jq(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){var c=b.value;if(b=c.getAttribute("schemeIdUri"))if(c=c.getAttribute("value"))switch(b){case "urn:mpeg:dash:outputChannelPositionList:2012":return c.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":b=parseInt(c,10);if(!b)continue;return b;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":b=
654
+ parseInt(c,16);if(!b)continue;for(a=0;b;)b&1&&++a,b>>=1;return a;case "urn:mpeg:mpegB:cicp:ChannelConfiguration":if(b=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(c=parseInt(c,10))&&0<c&&c<b.length)return b[c]}}return null}function hq(a){var b=a.rc?1:0;b+=a.$a?1:0;b+=a.sc?1:0;if(0==b)return a.contentType==lc||"application"==a.contentType?!0:!1;1!=b&&(a.rc&&(a.$a=null),a.sc=null);return!0}
655
+ function kq(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=dc(b,[c]),f=Ye(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),Te(a.o,g),u(m,g.promise,2);h=m.h;if("HEAD"==d){if(!h.headers||!h.headers.date)return m["return"](0);k=h.headers.date}else k=Fc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
656
+ function $p(a,b,c){var d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:d=c.map(function(n){return{scheme:n.getAttribute("schemeIdUri"),value:n.getAttribute("value")}}),e=a.g.dash.clockSyncUri,!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e}),f=t(d),g=f.next();case 2:if(g.done){p.A(4);break}h=g.value;B(p,5);k=h.scheme;l=h.value;switch(k){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return p.A(7);case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":return p.A(8);
657
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),p["return"](isNaN(m)?0:m-Date.now());case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":Va("NTP UTCTiming scheme is not supported");break;default:Va("Unrecognized scheme in UTCTiming element",k)}p.A(9);break;case 7:return u(p,kq(a,b,l,"HEAD"),10);case 10:return p["return"](p.h);case 8:return u(p,kq(a,b,l,"GET"),11);case 11:return p["return"](p.h);
656
658
  case 9:va(p,3);break;case 5:F(p);case 3:g=f.next();p.A(2);break;case 4:return Va("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p["return"](0)}})}
657
- function dq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=lo(d,"timescale",ro)||1;d=t(co(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=lo(k,"presentationTime",ro)||0,m=lo(k,"duration",ro)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
658
- function jq(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=ef,f=fj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Ue(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function hq(a,b){return ed(Zc(a,b))?lc:a.split("/")[0]}M("shaka.dash.DashParser",Up);jg.mpd=function(){return new Up};hg["application/dash+xml"]=function(){return new Up};hg["video/vnd.mpeg.dash.mpd"]=function(){return new Up};function mq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function nq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}nq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
659
- nq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function oq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function pq(a,b,c){c=void 0===c?[]:c;this.h=b;this.i=a;this.g=c}function qq(a,b){this.name=a;this.value=b};function rq(a,b){return a.filter(function(c){return c.name==b})}function sq(a,b){return a.filter(function(c){return oq(c,"TYPE")==b})}function tq(a,b){var c=rq(a,b);return c.length?c[0]:null}function uq(a){var b=0;b=void 0===b?0:b;return(a=tq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b};function vq(a){this.h=a;this.g=0}function wq(a){xq(a,/[ \t]+/gm)}function xq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function yq(a){return a.g==a.h.length?null:(a=xq(a,/[^ \t\n]*/gm))?a[0]:null};function zq(){this.g=0}
660
- function Aq(a,b,c){b=Fc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Bq(a,g),--a.g,Cq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Bq(a,h);if(Dq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
661
- var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Bq(a,m),Cq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=dc([d],[m.trim()])[0],h&&g.push(h),e.push(new pq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new pq("",g,k)));return new mq(c,b,f,e)}f.push(h);
662
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new qq("URI",k)),e=!0)}}return new mq(c,b,f)}function Bq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new vq(f);var h;(h=xq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=xq(f,k);)d.push(new qq(h[1],h[2]||h[3])),wq(f)}return new nq(c,e,d,g)}
663
- var Cq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Dq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Eq(){}function Fq(a){try{var b=Gq(a);return Le({uri:a,we:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Je(c)}}function Gq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Pc(a):e=Jc(a);return{data:e,contentType:c}}
664
- M("shaka.net.DataUriPlugin",Eq);Eq.parse=Fq;We("data",Fq);function Hq(){var a=this;this.h=this.j=null;this.La=1;this.o=new Map;this.u=new Map;this.ua=new Set;this.g=new Map;this.i=null;this.L="";this.ca=new zq;this.ia=0;this.W=!1;this.M=null;this.C=new O(function(){Iq(a)});this.m=Jq;this.G=null;this.ea=0;this.F=Infinity;this.Y=this.ha=0;this.D=new Te;this.R=[];this.I=new Map;this.Ma=!1;this.s=new Map;this.da=new Map;this.l=!1}r=Hq.prototype;r.configure=function(a){this.h=a};
665
- r.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,Kq(c,a),2);if(3!=f.g)return d=f.h,c.L=d.uri,u(f,Lq(c,d.data,a),3);e=c.ia;0<e&&c.C.S(e);return f["return"](c.G)})};r.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.h=this.j=null;this.ua.clear();this.G=null;this.g.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
666
- r.update=function(){var a=this,b,c,d;return K(function(e){if(1==e.g){if(a.m==Jq)return e["return"]();b=[];c=Array.from(a.g.values());return c.length?u(e,Mq(a,c[0]),2):e.A(2)}for(d=1;d<c.length;d++)b.push(Mq(a,c[d]));return u(e,Promise.all(b),0)})};
667
- function Mq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v;return K(function(y){if(1==y.g)return c=Nq,d=b.Me,e=new Nb(d),a.l&&b.Re&&Qb(e,new Sb("_HLS_skip=YES")),u(y,Kq(a,e.toString()),2);f=y.h;g=Aq(a.ca,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=rq(g.g,"EXT-X-DEFINE");k=Oq(a,h);l=b.stream;m=Pq(a,g,l.type,b.ic,k);l.segmentIndex.Db(m,a.i.Pa());m.length&&(p=uq(g.g),n=b.ic.get(p),l.segmentIndex.cb(n));q=m[m.length-1];if(v=tq(g.g,"EXT-X-ENDLIST"))Qq(a,c.Le),a.i.Ia(q.endTime);z(y)})}
659
+ function cq(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=ko(d,"timescale",qo)||1;d=t(bo(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=ko(k,"presentationTime",qo)||0,m=ko(k,"duration",qo)||0;l=l/h+b;m=l+m/h;null!=c&&(l=Math.min(l,b+c),m=Math.min(m,b+c));m<e||(k={schemeIdUri:f,value:g,startTime:l,endTime:m,id:k.getAttribute("id")||"",eventElement:k},a.h.onTimelineRegionAdded(k))}}
660
+ function iq(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=df,f=ej(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),Te(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function gq(a,b){return dd(Yc(a,b))?lc:a.split("/")[0]}M("shaka.dash.DashParser",Tp);ig.mpd=function(){return new Tp};gg["application/dash+xml"]=function(){return new Tp};gg["video/vnd.mpeg.dash.mpd"]=function(){return new Tp};function lq(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function mq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}mq.prototype.toString=function(){function a(d){return d.name+"="+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}var b="#"+this.name,c=this.g?this.g.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b};
661
+ mq.prototype.getAttribute=function(a){var b=this.g.filter(function(c){return c.name==a});return b.length?b[0]:null};function Z(a,b,c){return(a=a.getAttribute(b))?a.value:c||null}function nq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function oq(a,b,c){c=void 0===c?[]:c;this.h=b;this.i=a;this.g=c}function pq(a,b){this.name=a;this.value=b};function qq(a,b){return a.filter(function(c){return c.name==b})}function rq(a,b){return a.filter(function(c){return nq(c,"TYPE")==b})}function sq(a,b){var c=qq(a,b);return c.length?c[0]:null}function tq(a){var b=0;b=void 0===b?0:b;return(a=sq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b};function uq(a){this.h=a;this.g=0}function vq(a){wq(a,/[ \t]+/gm)}function wq(a,b){b.lastIndex=a.g;var c=b.exec(a.h);c=null==c?null:{position:c.index,length:c[0].length,results:c};if(a.g==a.h.length||null==c||c.position!=a.g)return null;a.g+=c.length;return c.results}function xq(a){return a.g==a.h.length?null:(a=wq(a,/[^ \t\n]*/gm))?a[0]:null};function yq(){this.g=0}
662
+ function zq(a,b,c){b=Fc(b);b=b.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var d=b.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(d[0]))throw new N(2,4,4015);b=0;for(var e=!0,f=t(d),g=f.next();!g.done;g=f.next())if(g=g.value,/^#(?!EXT)/m.test(g)||e)e=!1;else if(g=Aq(a,g),--a.g,Bq.includes(g.name)){b=1;break}else"EXT-X-STREAM-INF"==g.name&&(e=!0);f=[];e=!0;for(g=0;g<d.length;g++){var h=d[g],k=d[g+1];if(/^#(?!EXT)/m.test(h)||e)e=!1;else{h=Aq(a,h);if(Cq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
663
+ var l=d.splice(g,d.length-g);d=c;e=[];g=[];k=[];h=null;l=t(l);for(var m=l.next();!m.done;m=l.next())m=m.value,/^(#EXT)/.test(m)?(m=Aq(a,m),Bq.includes(m.name)?f.push(m):"EXT-X-MAP"==m.name?h=m:"EXT-X-PART"==m.name?k.push(m):"EXT-X-PRELOAD-HINT"==m.name?"PART"==Z(m,"TYPE")?k.push(m):"MAP"==Z(m,"TYPE")&&(m.name="EXT-X-MAP",h=m):g.push(m)):/^#(?!EXT)/m.test(m)||(m=dc([d],[m.trim()])[0],h&&g.push(h),e.push(new oq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new oq("",g,k)));return new lq(c,b,f,e)}f.push(h);
664
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new pq("URI",k)),e=!0)}}return new lq(c,b,f)}function Aq(a,b){var c=a.g++,d=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!d)throw new N(2,4,4016,b);var e=d[1],f=d[2];d=[];var g;if(f){f=new uq(f);var h;(h=wq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=wq(f,k);)d.push(new pq(h[1],h[2]||h[3])),vq(f)}return new mq(c,e,d,g)}
665
+ var Bq="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Cq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Dq(){}function Eq(a){try{var b=Fq(a);return Ke({uri:a,xe:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Ie(c)}}function Fq(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw new N(2,1,1004,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw new N(2,1,1004,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());var e;d?e=Oc(a):e=Jc(a);return{data:e,contentType:c}}
666
+ M("shaka.net.DataUriPlugin",Dq);Dq.parse=Eq;Ve("data",Eq);function Gq(){var a=this;this.h=this.j=null;this.La=1;this.o=new Map;this.u=new Map;this.ua=new Set;this.g=new Map;this.i=null;this.L="";this.ca=new yq;this.ia=0;this.W=!1;this.M=null;this.C=new O(function(){Hq(a)});this.m=Iq;this.G=null;this.ea=0;this.F=Infinity;this.Y=this.ha=0;this.D=new Se;this.R=[];this.I=new Map;this.Ma=!1;this.s=new Map;this.da=new Map;this.l=!1}r=Gq.prototype;r.configure=function(a){this.h=a};
667
+ r.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.j=b,c.l=b.isLowLatencyMode(),u(f,Jq(c,a),2);if(3!=f.g)return d=f.h,c.L=d.uri,u(f,Kq(c,d.data,a),3);e=c.ia;0<e&&c.C.S(e);return f["return"](c.G)})};r.stop=function(){this.C&&(this.C.stop(),this.C=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.h=this.j=null;this.ua.clear();this.G=null;this.g.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
668
+ r.update=function(){var a=this,b,c,d;return K(function(e){if(1==e.g){if(a.m==Iq)return e["return"]();b=[];c=Array.from(a.g.values());return c.length?u(e,Lq(a,c[0]),2):e.A(2)}for(d=1;d<c.length;d++)b.push(Lq(a,c[d]));return u(e,Promise.all(b),0)})};
669
+ function Lq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v;return K(function(y){if(1==y.g)return c=Mq,d=b.Ne,e=new Nb(d),a.l&&b.Se&&Qb(e,new Sb("_HLS_skip=YES")),u(y,Jq(a,e.toString()),2);f=y.h;g=zq(a.ca,f.data,f.uri);if(1!=g.type)throw new N(2,4,4017);h=qq(g.g,"EXT-X-DEFINE");k=Nq(a,h);l=b.stream;m=Oq(a,g,l.type,b.ic,k);l.segmentIndex.Db(m,a.i.Pa());m.length&&(p=tq(g.g),n=b.ic.get(p),l.segmentIndex.cb(n));q=m[m.length-1];if(v=sq(g.g,"EXT-X-ENDLIST"))Pq(a,c.Me),a.i.Ia(q.endTime);z(y)})}
668
670
  r.onExpirationUpdated=function(){};
669
- function Rq(a){if(!a.W){for(var b=-1,c=new Map,d=t(a.g.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.J[0]||null))for(var g=t(e.ic),h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.M=b;b=t(a.g.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)f=a.M-c.get(d),e.J.splice(0,f),(e=e.J[0]||null)&&Sq(d,-e.startTime);a.W=!0}}}
670
- function Tq(a){if(!a.W){for(var b=Infinity,c=t(a.g.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.J[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){c=t(a.g.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;null!=e&&(e=e.J[0]||null,null==e.g?Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.Yc,"Expect AV sync issues!"):Sq(d,e.g-b-e.startTime))}a.W=!0}}}
671
- function Sq(a,b){a.stream.segmentIndex.offset(b);a.Dd+=b;for(var c=t(a.ic),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.ic.set(d,e+b)}}
672
- function Lq(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I,J,P,Q,Y,ca,ra,Ea,za,Ka,Ba,ec,Dc,ld,md,hb,nd,fc,he;return K(function(Ra){switch(Ra.g){case 1:d=Aq(a.ca,b,a.L);e=rq(d.g,"EXT-X-DEFINE");Uq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.h.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],L=cd(G),I=new Map,u(Ra,Vq(a,d,c,c,L,H,"",!0,"Media Playlist",null,I,null,!1,!1,E),8);k=rq(d.g,"EXT-X-MEDIA");l=rq(d.g,"EXT-X-STREAM-INF");m=rq(d.g,"EXT-X-IMAGE-STREAM-INF");Wq(a,l);p=
673
- rq(d.g,"EXT-X-SESSION-DATA");n=t(p);for(q=n.next();!q.done;q=n.next())if(v=q.value,y=Z(v,"DATA-ID"),x=Z(v,"URI"),w=Z(v,"LANGUAGE"),D=Z(v,"VALUE"),C=(new Map).set("id",y),x&&C.set("uri",dc([a.L],[x])[0]),w&&C.set("language",w),D&&C.set("value",D),A=new S("sessiondata",C),a.j)a.j.onEvent(A);return u(Ra,Xq(a,k),4);case 4:return Yq(a,k),u(Ra,Zq(a,l),5);case 5:return f=Ra.h,u(Ra,$q(a,k),6);case 6:return g=Ra.h,u(Ra,ar(a,m),7);case 7:h=Ra.h;Ra.A(3);break;case 8:J=Ra.h,a.g.set(c,J),f.push({id:0,language:"und",
674
- primary:!0,audio:"audio"==H?J.stream:null,video:"video"==H?J.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new N(2,7,7001);a.h.hls.ignoreManifestProgramDateTime?Rq(a):Tq(a);if(a.Ma&&0==f.length)throw new N(2,4,4034);P=Infinity;Q=t(a.g.values());for(Y=Q.next();!Y.done;Y=Q.next())ca=Y.value,"text"!=ca.stream.type&&(P=Math.min(P,ca.Dd));a.m!=Jq?(a.i=new T(0,a.h.defaultPresentationDelay?a.h.defaultPresentationDelay:a.Y?a.Y:3*a.ea),a.i.sc(!1)):
675
- (a.i=new T(null,0),a.i.sc(!0));if(a.m!=Jq)a.ia=a.F,ra=Nq,a.m==ra.Ke&&(Ea=a.i.Vc,isNaN(a.h.availabilityWindowOverride)||(Ea=a.h.availabilityWindowOverride),a.i.Zd(Ea));else for(a.i.Ia(P),za=t(a.g.values()),Y=za.next();!Y.done;Y=za.next())Ka=Y.value,Ka.stream.segmentIndex.Xa(0,P);a.R=[];Ba=[];ec=t(f);for(Dc=ec.next();!Dc.done;Dc=ec.next())for(ld=Dc.value,md=t([ld.video,ld.audio]),hb=md.next();!hb.done;hb=md.next())(nd=hb.value)&&Ba.push(nd);return u(Ra,Promise.all(Ba.map(function(Ff){return K(function(Gf){return u(Gf,
676
- Ff.createSegmentIndex(),0)})})),9);case 9:fc=t(Ba);for(hb=fc.next();!hb.done;hb=fc.next())he=hb.value,a.R.push(he.segmentIndex.J);br(a);a.i.Bd();a.G={presentationTimeline:a.i,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.j.makeTextStreamsForClosedCaptions(a.G);z(Ra)}})}function Uq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}
677
- function Oq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}function Wq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=cr(a,e);if(g){var h=jc(lc,e);a.s.set(g,h);eb(e,h)}f&&(g=ic("audio",e),a.s.set(f,g));d&&(f=ic("video",e),a.s.set(d,f))}}
678
- function $q(a,b){var c,d,e,f,g,h,k,l,m,p,n,q;return K(function(v){if(1==v.g)return c=sq(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return K(function(C){if(1==C.g){if(x=a.h.disableText)return C["return"](null);B(C,2);return u(C,dr(a,y),4)}if(2!=C.g)return w=C.h,C["return"](w.stream);D=F(C);if(a.h.hls.ignoreTextStreamFailures)return C["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=oq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(p=
671
+ function Qq(a){if(!a.W){for(var b=-1,c=new Map,d=t(a.g.values()),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;if(f&&(f=f.J[0]||null))for(var g=t(e.ic),h=g.next();!h.done;h=g.next()){h=t(h.value);var k=h.next().value;if(h.next().value==f.startTime){c.set(e,k);b=Math.max(b,k);break}}}if(!(0>b)){a.M=b;b=t(a.g.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)f=a.M-c.get(d),e.J.splice(0,f),(e=e.J[0]||null)&&Rq(d,-e.startTime);a.W=!0}}}
672
+ function Sq(a){if(!a.W){for(var b=Infinity,c=t(a.g.values()),d=c.next();!d.done;d=c.next())if(d=d.value.stream.segmentIndex)d=d.J[0]||null,null!=d&&null!=d.g&&(b=Math.min(b,d.g));if(Infinity!=b){c=t(a.g.values());for(d=c.next();!d.done;d=c.next()){d=d.value;var e=d.stream.segmentIndex;null!=e&&(e=e.J[0]||null,null==e.g?Ua("Missing EXT-X-PROGRAM-DATE-TIME for stream",d.Zc,"Expect AV sync issues!"):Rq(d,e.g-b-e.startTime))}a.W=!0}}}
673
+ function Rq(a,b){a.stream.segmentIndex.offset(b);a.Fd+=b;for(var c=t(a.ic),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.ic.set(d,e+b)}}
674
+ function Kq(a,b,c){var d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I,J,P,Q,Y,ca,ra,Fa,za,Ka,Aa,ec,Ec,ld,md,hb,nd,fc,ie;return K(function(Ra){switch(Ra.g){case 1:d=zq(a.ca,b,a.L);e=qq(d.g,"EXT-X-DEFINE");Tq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.h.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],L=bd(G),I=new Map,u(Ra,Uq(a,d,c,c,L,H,"",!0,"Media Playlist",null,I,null,!1,!1,E),8);k=qq(d.g,"EXT-X-MEDIA");l=qq(d.g,"EXT-X-STREAM-INF");m=qq(d.g,"EXT-X-IMAGE-STREAM-INF");Vq(a,l);p=
675
+ qq(d.g,"EXT-X-SESSION-DATA");n=t(p);for(q=n.next();!q.done;q=n.next())if(v=q.value,y=Z(v,"DATA-ID"),x=Z(v,"URI"),w=Z(v,"LANGUAGE"),D=Z(v,"VALUE"),C=(new Map).set("id",y),x&&C.set("uri",dc([a.L],[x])[0]),w&&C.set("language",w),D&&C.set("value",D),A=new S("sessiondata",C),a.j)a.j.onEvent(A);return u(Ra,Wq(a,k),4);case 4:return Xq(a,k),u(Ra,Yq(a,l),5);case 5:return f=Ra.h,u(Ra,Zq(a,k),6);case 6:return g=Ra.h,u(Ra,$q(a,m),7);case 7:h=Ra.h;Ra.A(3);break;case 8:J=Ra.h,a.g.set(c,J),f.push({id:0,language:"und",
676
+ primary:!0,audio:"audio"==H?J.stream:null,video:"video"==H?J.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.j)throw new N(2,7,7001);a.h.hls.ignoreManifestProgramDateTime?Qq(a):Sq(a);if(a.Ma&&0==f.length)throw new N(2,4,4034);P=Infinity;Q=t(a.g.values());for(Y=Q.next();!Y.done;Y=Q.next())ca=Y.value,"text"!=ca.stream.type&&(P=Math.min(P,ca.Fd));a.m!=Iq?(a.i=new T(0,a.h.defaultPresentationDelay?a.h.defaultPresentationDelay:a.Y?a.Y:3*a.ea),a.i.tc(!1)):
677
+ (a.i=new T(null,0),a.i.tc(!0));if(a.m!=Iq)a.ia=a.F,ra=Mq,a.m==ra.Le&&(Fa=a.i.Wc,isNaN(a.h.availabilityWindowOverride)||(Fa=a.h.availabilityWindowOverride),a.i.ae(Fa));else for(a.i.Ia(P),za=t(a.g.values()),Y=za.next();!Y.done;Y=za.next())Ka=Y.value,Ka.stream.segmentIndex.Xa(0,P);a.R=[];Aa=[];ec=t(f);for(Ec=ec.next();!Ec.done;Ec=ec.next())for(ld=Ec.value,md=t([ld.video,ld.audio]),hb=md.next();!hb.done;hb=md.next())(nd=hb.value)&&Aa.push(nd);return u(Ra,Promise.all(Aa.map(function(Gf){return K(function(Hf){return u(Hf,
678
+ Gf.createSegmentIndex(),0)})})),9);case 9:fc=t(Aa);for(hb=fc.next();!hb.done;hb=fc.next())ie=hb.value,a.R.push(ie.segmentIndex.J);ar(a);a.i.Dd();a.G={presentationTimeline:a.i,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.j.makeTextStreamsForClosedCaptions(a.G);z(Ra)}})}function Tq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;d=Z(e,"NAME");e=Z(e,"VALUE");d&&e&&(a.o.has(d)||a.o.set(d,e))}}
679
+ function Nq(a,b){for(var c=new Map,d=t(b),e=d.next();!e.done;e=d.next()){var f=e.value;e=Z(f,"NAME");var g=Z(f,"VALUE");f=Z(f,"IMPORT");e&&g&&c.set(e,g);f&&(e=a.o.get(f))&&c.set(f,e)}return c}function Vq(a,b){for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value,f=Z(e,"AUDIO");d=Z(e,"VIDEO");var g=Z(e,"SUBTITLES");e=br(a,e);if(g){var h=jc(lc,e);a.s.set(g,h);eb(e,h)}f&&(g=ic("audio",e),a.s.set(f,g));d&&(f=ic("video",e),a.s.set(d,f))}}
680
+ function Zq(a,b){var c,d,e,f,g,h,k,l,m,p,n,q;return K(function(v){if(1==v.g)return c=rq(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return K(function(C){if(1==C.g){if(x=a.h.disableText)return C["return"](null);B(C,2);return u(C,cr(a,y),4)}if(2!=C.g)return w=C.h,C["return"](w.stream);D=F(C);if(a.h.hls.ignoreTextStreamFailures)return C["return"](null);throw D;})}),u(v,Promise.all(d),2);e=v.h;f=t(c);for(g=f.next();!g.done;g=f.next())if(h=g.value,k=nq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(p=
679
681
  t(m),n=p.next();!n.done;n=p.next())q=n.value,q.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
680
- function ar(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.h.disableThumbnails)return l["return"](null);B(l,2);return u(l,er(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.h.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
681
- function Xq(a,b){var c;return K(function(d){b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f});c=b.map(function(e){return dr(a,e)});return u(d,Promise.all(c),0)})}
682
- function Zq(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,q,v;return K(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(oq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,fr(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,D=v.video,C=t(D),A=C.next();!A.done;A=C.next())if(A=A.value.stream)A.width=Number(p)||void 0,A.height=Number(n)||
683
- void 0,A.frameRate=Number(h)||void 0,A.hdr=q||void 0;C=a.h.disableAudio;if(!w.length||C)w=[null];C=a.h.disableVideo;if(!D.length||C)D=[null];C=[];w=t(w);for(A=w.next();!A.done;A=w.next()){A=A.value;for(var G=t(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=A?A.stream:null;var L=H?H.stream:null,I=A?A.stream.drmInfos:null,J=H?H.stream.drmInfos:null;H=(H?H.Yc:"")+" - "+(A?A.Yc:"");E&&L&&I.length&&J.length&&!(0<dg(I,J).length)||a.ua.has(H)||(E={id:a.La++,language:E?E.language:"und",primary:!!E&&E.primary||
682
+ function $q(a,b){var c,d;return K(function(e){if(1==e.g)return c=b.map(function(f){var g,h,k;return K(function(l){if(1==l.g){if(g=a.h.disableThumbnails)return l["return"](null);B(l,2);return u(l,dr(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.h.hls.ignoreImageStreamFailures)return l["return"](null);throw k;})}),u(e,Promise.all(c),2);d=e.h;return e["return"](d.filter(function(f){return f}))})}
683
+ function Wq(a,b){var c;return K(function(d){b=b.filter(function(e){var f=Z(e,"URI")||"";return"SUBTITLES"!=Z(e,"TYPE")&&""!=f});c=b.map(function(e){return cr(a,e)});return u(d,Promise.all(c),0)})}
684
+ function Yq(a,b){var c,d,e;return K(function(f){if(1==f.g)return c=b.map(function(g){var h,k,l,m,p,n,q,v;return K(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(nq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),p=m.next().value,n=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,er(a,g),2);if(v=y.h){for(var x=y["return"],w=v.audio,D=v.video,C=t(D),A=C.next();!A.done;A=C.next())if(A=A.value.stream)A.width=Number(p)||void 0,A.height=Number(n)||
685
+ void 0,A.frameRate=Number(h)||void 0,A.hdr=q||void 0;C=a.h.disableAudio;if(!w.length||C)w=[null];C=a.h.disableVideo;if(!D.length||C)D=[null];C=[];w=t(w);for(A=w.next();!A.done;A=w.next()){A=A.value;for(var G=t(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=A?A.stream:null;var L=H?H.stream:null,I=A?A.stream.drmInfos:null,J=H?H.stream.drmInfos:null;H=(H?H.Zc:"")+" - "+(A?A.Zc:"");E&&L&&I.length&&J.length&&!(0<cg(I,J).length)||a.ua.has(H)||(E={id:a.La++,language:E?E.language:"und",primary:!!E&&E.primary||
684
686
  !!L&&L.primary,audio:E,video:L,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},C.push(E),a.ua.add(H))}}y=x.call(y,C)}else y=y["return"]([]);return y})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(ac,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
685
- function fr(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y;return K(function(x){if(1==x.g)return c=mc,d=cr(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=oq(b,"URI"),n=k.audio.find(function(w){return w&&w.Yc==p}),q=jc(c.va,d),(v=jc(c.bb,d))&&!q?l=c.bb:!h.length&&v&&q?(l=c.va,d=[[q,v].join()]):k.audio.length&&n?(l=c.bb,m=!0):l=k.video.length?c.bb:c.va,m?x.A(2):u(x,gr(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
686
- hr(k);return x["return"](k)})}function cr(a,b){var c=[];a.h.disableVideo||c.push(a.h.hls.defaultVideoCodec);a.h.disableAudio||c.push(a.h.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=bd(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function ir(a){a=Z(a,"LANGUAGE")||"und";return R(a)}
687
- function hr(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Yq(a,b){var c=sq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=ir(e);var f=oq(e,"GROUP-ID");e=oq(e,"INSTREAM-ID");a.I.get(f)||a.I.set(f,new Map);a.I.get(f).set(e,d)}}
688
- function dr(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y;return K(function(x){if(1==x.g){c=oq(b,"GROUP-ID");d="";var w=oq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=lc);e=w;e!=lc&&c&&a.s.has(c)&&(d=a.s.get(c));f=jr(oq(b,"URI"),a.o);if(a.g.has(f))return x["return"](a.g.get(f));g=ir(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
689
- v="YES"==q;return u(x,kr(a,f,d,e,g,l,h,m,null,n,v,p),2)}y=x.h;a.u.has(c)?a.u.get(c).push(y):a.u.set(c,[y]);if(null==y)return x["return"](null);if(a.g.has(f))return x["return"](a.g.get(f));a.g.set(f,y);return x["return"](y)})}
690
- function er(a,b){var c,d,e,f,g,h,k,l,m,p;return K(function(n){if(1==n.g){c=jr(oq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return n["return"](a.g.get(c));e=ir(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(n,kr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(null==h)return n["return"](null);if(a.g.has(c))return n["return"](a.g.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
687
+ function er(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y;return K(function(x){if(1==x.g)return c=mc,d=br(a,b),e=Z(b,"AUDIO"),f=Z(b,"VIDEO"),h=(g=e||f)&&a.u.has(g)?a.u.get(g):[],k={audio:e?h:[],video:f?h:[]},m=!1,p=nq(b,"URI"),n=k.audio.find(function(w){return w&&w.Zc==p}),q=jc(c.va,d),(v=jc(c.bb,d))&&!q?l=c.bb:!h.length&&v&&q?(l=c.va,d=[[q,v].join()]):k.audio.length&&n?(l=c.bb,m=!0):l=k.video.length?c.bb:c.va,m?x.A(2):u(x,fr(a,b,d,l),3);2!=x.g&&(y=x.h);if(y)k[y.stream.type]=[y];else if(null===y)return x["return"](null);
688
+ gr(k);return x["return"](k)})}function br(a,b){var c=[];a.h.disableVideo||c.push(a.h.hls.defaultVideoCodec);a.h.disableAudio||c.push(a.h.hls.defaultAudioCodec);var d=Z(b,"CODECS",c.join(",")).split(/\s*,\s*/);c=new Set;var e=[];d=t(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=ad(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function hr(a){a=Z(a,"LANGUAGE")||"und";return R(a)}
689
+ function gr(a){a=t(a.audio.concat(a.video));for(var b=a.next();!b.done;b=a.next())if(b=b.value){var c=b.stream.codecs.split(",");c=c.filter(function(d){return"mp4a.40.34"!=d});b.stream.codecs=c.join(",")}}function Xq(a,b){var c=rq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=hr(e);var f=nq(e,"GROUP-ID");e=nq(e,"INSTREAM-ID");a.I.get(f)||a.I.set(f,new Map);a.I.get(f).set(e,d)}}
690
+ function cr(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y;return K(function(x){if(1==x.g){c=nq(b,"GROUP-ID");d="";var w=nq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=lc);e=w;e!=lc&&c&&a.s.has(c)&&(d=a.s.get(c));f=ir(nq(b,"URI"),a.o);if(a.g.has(f))return x["return"](a.g.get(f));g=hr(b);h=Z(b,"NAME");k=Z(b,"DEFAULT");l="YES"==k;"audio"==e?w=(w=Z(b,"CHANNELS"))?parseInt(w.split("/")[0],10):null:w=null;m=w;"audio"==e?w=(w=Z(b,"CHANNELS"))?w.includes("/JOC"):!1:w=!1;p=w;n=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
691
+ v="YES"==q;return u(x,jr(a,f,d,e,g,l,h,m,null,n,v,p),2)}y=x.h;a.u.has(c)?a.u.get(c).push(y):a.u.set(c,[y]);if(null==y)return x["return"](null);if(a.g.has(f))return x["return"](a.g.get(f));a.g.set(f,y);return x["return"](y)})}
692
+ function dr(a,b){var c,d,e,f,g,h,k,l,m,p;return K(function(n){if(1==n.g){c=ir(nq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return n["return"](a.g.get(c));e=hr(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(n,jr(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=n.h;if(null==h)return n["return"](null);if(a.g.has(c))return n["return"](a.g.get(c));if(k=Z(b,"RESOLUTION"))if(l=h.stream.segmentIndex.get(0),m=l.tilesLayout)h.stream.width=Number(k.split("x")[0])*Number(m.split("x")[0]),h.stream.height=
691
693
  Number(k.split("x")[1])*Number(m.split("x")[1]);if(p=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(p);a.g.set(c,h);return n["return"](h)})}
692
- function gr(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=jr(oq(b,"URI"),a.o);if(a.g.has(e))return k["return"](a.g.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.I.get(l):null;g=ic(d,c);return u(k,kr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
693
- function kr(a,b,c,d,e,f,g,h,k,l,m,p){var n,q,v;return K(function(y){if(1==y.g)return n=dc([a.L],[b])[0],u(y,Kq(a,n),2);q=y.h;n=q.uri;v=Aq(a.ca,q.data,n);return y["return"](Vq(a,v,b,n,c,d,e,f,g,h,k,l,m,p))})}
694
- function Vq(a,b,c,d,e,f,g,h,k,l,m,p,n,q,v){var y,x,w,D,C,A,G,E,H,L,I,J,P,Q,Y,ca,ra,Ea,za,Ka,Ba,ec,Dc,ld,md,hb,nd,fc,he,Ra,Ff,Gf;return K(function(gc){if(1==gc.g){if(1!=b.type)throw new N(2,4,4017);y=rq(b.g,"EXT-X-DEFINE");x=Oq(a,y);lr(a,b);return v?gc.A(2):u(gc,mr(a,f,e,b,x),3)}2!=gc.g&&(v=gc.h);w=[];if(b.segments)for(D=t(b.segments),C=D.next();!C.done;C=D.next())A=C.value,G=rq(A.h,"EXT-X-KEY"),w.push.apply(w,ia(G));E=!1;H=[];L=new Set;I=t(w);for(J=I.next();!J.done;J=I.next())if(P=J.value,Q=oq(P,
695
- "METHOD"),"NONE"!=Q){E=!0;if("AES-128"==Q)return a.Ma=!0,gc["return"](null);Y=oq(P,"KEYFORMAT");if(ra=(ca=nr[Y])?ca(P,v):null){if(ra.keyIds)for(Ea=t(ra.keyIds),za=Ea.next();!za.done;za=Ea.next())Ka=za.value,L.add(Ka);H.push(ra)}}if(E&&!H.length)throw new N(2,4,4026);ri.includes(v)&&(e="");Ba=new Map;try{ec=Pq(a,b,f,Ba,x)}catch(wn){if(4035==wn.code)return Va("Skipping unsupported HLS stream",v,c),gc["return"](null);throw wn;}Dc=ec[ec.length-1].endTime;ld=new Oi(ec);md=f==lc?"subtitle":void 0;hb=[];
696
- if(p)for(nd=t(p.split(",")),fc=nd.next();!fc.done;fc=nd.next())he=fc.value,hb.push(he);Ff=(Ra=tq(b.g,"EXT-X-SERVER-CONTROL"))?null!=Ra.getAttribute("CAN-SKIP-UNTIL"):!1;Gf={id:a.La++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ld,mimeType:v,codecs:e,kind:md,encrypted:E,drmInfos:H,keyIds:L,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:hb,forced:n,
697
- channelsCount:l,audioSamplingRate:null,spatialAudio:q,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return gc["return"]({stream:Gf,Yc:c,Me:d,Dd:Dc,ic:Ba,Re:Ff})})}
698
- function lr(a,b){var c=tq(b.g,"EXT-X-PLAYLIST-TYPE"),d=tq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Qq(a,Jq);else{c?Qq(a,or):Qq(a,pr);d=tq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=tq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ha=Number(oq(c,"PART-TARGET")),a.F=Math.min(a.ha,a.F),c=tq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(oq(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ea=Math.max(d,a.ea)}}
699
- function qr(a,b,c,d){c=tq(c,"EXT-X-MAP");if(!c)return null;var e=oq(c,"URI");d=jr(dc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.da.has(b)||(c=rr(d,c),a.da.set(b,c));return a.da.get(b)}function rr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Kh(function(){return[a]},c,d)}
700
- function sr(a,b,c,d,e,f,g,h){var k=d.h,l=jr(d.i,f),m=tq(k,"EXTINF"),p=f=0,n=null;d.g.length&&!a.l&&Va("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var q=null;if(!a.h.hls.ignoreManifestProgramDateTime){var v=tq(k,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(q=mo(v.value))}v=Nh;tq(k,"EXT-X-GAP")&&(v=2);if(!m){if(0==d.g.length)throw new N(2,4,4024,"EXTINF");
701
- if(!a.l)return null}var y=[];if(a.l)for(var x={},w=0;w<d.g.length;x={gd:x.gd},w++){var D=d.g[w],C=0==w?c:y[y.length-1],A=0==w?e:C.endTime,G=Number(Z(D,"DURATION"))||a.ha;if(G){G=A+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(C=Z(D,"BYTERANGE-START"))?Number(C):0:(E=Z(D,"BYTERANGE"),C=t(tr(C,E)),E=C.next().value,H=C.next().value);if(D=Z(D,"URI"))x.gd=dc([g],[D])[0],y.push(new Mh(A,G,function(L){return function(){return[L.gd]}}(x),E,H,b,0,0,Infinity))}}m?f=e+Number(m.value.split(",")[0]):f=y[y.length-
702
- 1].endTime;(a=tq(k,"EXT-X-BYTERANGE"))?(n=t(tr(c,a.value)),p=n.next().value,n=n.next().value):y.length&&(p=y[0].Ba,n=y[y.length-1].la);c="";a=null;"image"==h&&(c="1x1",h=tq(k,"EXT-X-TILES"))&&(c=oq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new Mh(e,f,function(){return l.length?[l]:[]},p,n,b,0,0,Infinity,y,c,a,q,v)}function tr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.la+1,d=c+d-1);return[c,d]}
703
- function br(a){if(a.i){for(var b=t(a.R),c=b.next();!c.done;c=b.next())a.i.Eb(c.value);a.R=[]}}
704
- function Pq(a,b,c,d,e){var f=b.segments,g=uq(b.g),h=tq(b.g,"EXT-X-SKIP");h=h?Number(Z(h,"SKIPPED-SEGMENTS")):0;var k=g+h,l=0;a.m!=Jq&&d.has(k)&&(l=d.get(k));for(var m=[],p=null,n=0;n<f.length;n++){var q=f[n],v=0==n?l:p.endTime;k=g+h+n;d.set(k,v);var y=qr(a,b.h,q.h,e);!a.l&&a.j.isAutoLowLatencyMode()&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());(p=y=sr(a,y,p,q,v,e,b.h,c))&&(a.h.hls.ignoreManifestProgramDateTime&&null!=a.M&&k<a.M||m.push(y))}if(a=m.some(function(x){return null!=x.g}))for(b=
705
- {},c=0;c<m.length;b={Nb:b.Nb,Mb:b.Mb,uc:b.uc,Ta:b.Ta,Lb:b.Lb},c++)if(b.Ta=m[c],null==b.Ta.g)for(b.Mb=0,b.Nb=c,d=function(x){return function(){var w=m[x.Nb];if(w){if(null!=w.g)return w.g+x.Mb;x.Mb-=w.endTime-w.startTime;x.Nb+=1}return null}}(b),b.Lb=0,b.uc=c,e=function(x){return function(){var w=m[x.uc];if(w){w!=x.Ta&&(x.Lb+=w.endTime-w.startTime);if(null!=w.g)return w.g+x.Lb;--x.uc}return null}}(b);null==b.Ta.g;)b.Ta.g=e(),null==b.Ta.g&&(b.Ta.g=d());if(a)for(a=t(m),b=a.next();!b.done;b=a.next())for(c=
706
- b.value,b=c.g,c=t(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return m}function jr(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
707
- function mr(a,b,c,d,e){var f,g,h,k,l,m,p,n,q,v,y,x;return K(function(w){if(1==w.g){f=mc;g=ef;h=Math.trunc((d.segments.length-1)/2);k=jr(d.segments[h].i,e);l=new Nb(k);m=l.ta.split(".").pop();p=ur[b];if(n=p[m])return w["return"](n);if(b==f.X){if("vtt"==c||"wvtt"==c)return w["return"]("text/vtt");if(c&&""!==c)return w["return"]("application/mp4")}if(b==f.Sb&&(!c||"jpeg"==c))return w["return"]("image/jpeg");q=Ze([k],a.h.retryParameters);q.method="HEAD";return u(w,vr(a,q,g),2)}v=w.h;y=v.headers["content-type"];
708
- if(!y){if(b==f.X)return w["return"]("text/vtt");x=p.mp4;return w["return"](x)}return w["return"](y.split(";")[0])})}function Kq(a,b){var c=Ze([b],a.h.retryParameters);a.j.modifyManifestRequest(c,{format:"h"});return vr(a,c,0)}function Iq(a){var b,c;K(function(d){if(1==d.g){if(!a.j)return d["return"]();B(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ia,a.C.S(b),va(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.C.S(.1);z(d)})}
709
- function Qq(a,b){a.m=b;a.i&&a.i.sc(a.m==Jq);a.m!=Jq||a.C.stop()}function vr(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Ue(a.D,b);return b.promise}M("shaka.hls.HlsParser",Hq);
710
- var ur={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"},
711
- image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},nr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);return hc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=oq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=oq(a,"URI");b=Gq(b);b=Fb(b.data);b=hc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);
712
- if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=oq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=oq(a,"URI");a=Gq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=ao(a,b,new Set,0);return hc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Jq="VOD",pr="EVENT",or="LIVE",Nq={Le:Jq,qg:pr,Ke:or};
713
- uc("Tizen 3")||uc("Tizen 2")||wc()||(jg.m3u8=function(){return new Hq},hg["application/x-mpegurl"]=function(){return new Hq},hg["application/vnd.apple.mpegurl"]=function(){return new Hq});function wr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,we:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ic(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function xr(){}function yr(a,b,c,d,e){var f=new zr;pf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new Ar,h={fe:!1,He:!1};a=Br(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new Ie(a,function(){h.fe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.He=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
714
- function Br(a,b,c,d,e,f,g){var h,k,l,m,p,n,q,v,y,x,w,D,C;return K(function(A){switch(A.g){case 1:return h=Cr,k=Dr,n=p=0,q=Date.now(),B(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(Er(l.headers)),v=l.clone().body.getReader(),x=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,w=function(G){function E(){var H,L;return K(function(I){switch(I.g){case 1:return B(I,2),u(I,v.read(),4);case 4:H=I.h;va(I,3);break;case 2:return F(I),I["return"]();case 3:if(H.done){I.A(5);break}p+=H.value.byteLength;if(!g){I.A(5);
715
- break}return u(I,g(H.value),5);case 5:L=Date.now();if(100<L-q||H.done)e(L-q,p-n,x-p),n=p,q=L;H.done?G.close():(G.enqueue(H.value),E());z(I)}})}E()},new k({start:w}),u(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=F(A);if(d.fe)throw new N(1,1,7001,a,b);if(d.He)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return C=Er(l.headers),A["return"](wr(C,m,l.status,a,l.url,b))}})}function Er(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
716
- function Fr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",xr);xr.isSupported=Fr;xr.parse=yr;var Cr=window.fetch,Ar=window.AbortController,Dr=window.ReadableStream,zr=window.Headers;Fr()&&(We("http",yr,2,!0),We("https",yr,2,!0),We("blob",yr,2,!0));function Gr(){}
717
- function Hr(a,b,c,d,e){var f=new Ir,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new N(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var q=Jr(f);e(q);p=!0}};f.onload=function(){var q=Jr(f),v=f.response;try{var y=wr(q,v,f.status,a,f.responseURL,c);l(y)}catch(x){m(x)}};f.onerror=function(q){m(new N(1,1,1002,a,q,
718
- c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new Ie(k,function(){f.abort();return Promise.resolve()})}
719
- function Jr(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}M("shaka.net.HttpXHRPlugin",Gr);Gr.parse=Hr;var Ir=window.XMLHttpRequest;We("http",Hr,1,!0);We("https",Hr,1,!0);We("blob",Hr,1,!0);function Kr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Lr(a){return a.ya().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.la}function Mr(a,b){return fj(a.g.ya(),a.g.Ba,a.g.la,b.streaming.retryParameters)};function Nr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Or(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Nr.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g["delete"](a);this.j+=c;this.h+=b}};function Pr(a){var b=this;this.o=a;this.j=new Map;this.i=new ff(function(){return Qr(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Nr}Pr.prototype.destroy=function(){return this.i.destroy()};function Rr(a,b,c){a.m=b;a.l=c}function Qr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
720
- function Sr(a,b,c,d,e,f){gf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,q;return K(function(v){if(1==v.g)return u(v,Tr(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Fb(h),l=new $n(k),l.data)p=Number(m),n=l.data[p],q=l.g[p],a.l(n,q);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function Ur(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
721
- function Tr(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=ef,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;eb(a.h,e);return g["return"](f.data)})};function Vr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new nc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Vr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}B(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);z(b)})};
722
- function Wr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}Vr.prototype.store=function(){return this.h};Vr.prototype.promise=function(){return this.g};function Xr(a){this.h=a;this.g=[]}Xr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Yr(a,b){return Zr(a,b,"readwrite")}function Zr(a,b,c){c=a.h.transaction([b],c);var d=new Vr(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function $r(a,b,c){this.h=new Xr(a);this.i=b;this.g=c}r=$r.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return as(this.i)};r.removeSegments=function(a,b){return bs(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,cs(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.ge(e)}))})};r.addManifests=function(){return as(this.g)};
723
- r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function ds(a,b,c){a=Yr(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Yr(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return bs(this,this.g,a,b)};
724
- r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,cs(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.$b(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Zr(a.h,a.g,"readonly"),c=new Map,u(d,Wr(b,function(e,f){var g;return K(function(h){if(1==h.g)return u(h,a.$b(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.ge=function(a){return a};r.$b=function(a){return Promise.resolve(a)};
725
- function as(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Yr(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={yc:g.yc},k=h.next())l=k.value,g.yc=e.add(l),g.yc.onsuccess=function(p){return function(){f.push(p.yc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
726
- function bs(a,b,c,d){a=Yr(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={xc:e.xc},f=c.next())e.xc=f.value,b["delete"](e.xc).onsuccess=function(g){return function(){return d(g.xc)}}(e);return a.promise()}
727
- function cs(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Zr(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Rb:h.Rb,Pb:h.Pb},l=k.next())h.Pb=l.value,h.Rb=e.get(h.Pb),h.Rb.onsuccess=function(p){return function(){void 0==p.Rb.result&&g.push(p.Pb);f[p.Pb]=p.Rb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(p){return f[p]}))})};function es(a){this.g=new Xr(a)}es.prototype.destroy=function(){return this.g.destroy()};es.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Zr(a.g,"session-ids","readonly"),c=[],u(d,Wr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};es.prototype.add=function(a){var b=Yr(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
728
- es.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Yr(b.g,"session-ids"),u(d,Wr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function fs(){this.g=new Map}fs.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};fs.prototype.init=function(){var a=this;gs.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
729
- function hs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Aa:d,ka:f},ka:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function is(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Aa:d,ka:f},e)})})}
730
- function js(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function ks(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ls(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
731
- function ms(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=gs,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ns(a,b){gs.set(a,b)}M("shaka.offline.StorageMuxer",fs);fs.unregister=function(a){gs["delete"](a)};fs.register=ns;fs.prototype.destroy=fs.prototype.destroy;var gs=new Map;function os(){$r.apply(this,arguments)}pa(os,$r);os.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Yr(c.h,c.g);e=d.store();f=new nc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
732
- os.prototype.$b=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=ps(a.periods[c],e),b.push(f);return u(h,zp(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
733
- function ps(a,b){qs(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return rs(e,a.startTime,b)})}
734
- function rs(a,b,c){var d=a.initSegmentUri?ss(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=ss(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
735
- dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}os.prototype.ge=function(a){return{data:a.data}};function ss(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
736
- function qs(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
737
- f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function ts(){$r.apply(this,arguments)}pa(ts,$r);
738
- ts.prototype.$b=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(us(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,zp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
694
+ function fr(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=ir(nq(b,"URI"),a.o);if(a.g.has(e))return k["return"](a.g.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.I.get(l):null;g=ic(d,c);return u(k,jr(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(null==h)return k["return"](null);if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
695
+ function jr(a,b,c,d,e,f,g,h,k,l,m,p){var n,q,v;return K(function(y){if(1==y.g)return n=dc([a.L],[b])[0],u(y,Jq(a,n),2);q=y.h;n=q.uri;v=zq(a.ca,q.data,n);return y["return"](Uq(a,v,b,n,c,d,e,f,g,h,k,l,m,p))})}
696
+ function Uq(a,b,c,d,e,f,g,h,k,l,m,p,n,q,v){var y,x,w,D,C,A,G,E,H,L,I,J,P,Q,Y,ca,ra,Fa,za,Ka,Aa,ec,Ec,ld,md,hb,nd,fc,ie,Ra,Gf,Hf;return K(function(gc){if(1==gc.g){if(1!=b.type)throw new N(2,4,4017);y=qq(b.g,"EXT-X-DEFINE");x=Nq(a,y);kr(a,b);return v?gc.A(2):u(gc,lr(a,f,e,b,x),3)}2!=gc.g&&(v=gc.h);w=[];if(b.segments)for(D=t(b.segments),C=D.next();!C.done;C=D.next())A=C.value,G=qq(A.h,"EXT-X-KEY"),w.push.apply(w,ia(G));E=!1;H=[];L=new Set;I=t(w);for(J=I.next();!J.done;J=I.next())if(P=J.value,Q=nq(P,
697
+ "METHOD"),"NONE"!=Q){E=!0;if("AES-128"==Q)return a.Ma=!0,gc["return"](null);Y=nq(P,"KEYFORMAT");if(ra=(ca=mr[Y])?ca(P,v):null){if(ra.keyIds)for(Fa=t(ra.keyIds),za=Fa.next();!za.done;za=Fa.next())Ka=za.value,L.add(Ka);H.push(ra)}}if(E&&!H.length)throw new N(2,4,4026);qi.includes(v)&&(e="");Aa=new Map;try{ec=Oq(a,b,f,Aa,x)}catch(vn){if(4035==vn.code)return Va("Skipping unsupported HLS stream",v,c),gc["return"](null);throw vn;}Ec=ec[ec.length-1].endTime;ld=new Ni(ec);md=f==lc?"subtitle":void 0;hb=[];
698
+ if(p)for(nd=t(p.split(",")),fc=nd.next();!fc.done;fc=nd.next())ie=fc.value,hb.push(ie);Gf=(Ra=sq(b.g,"EXT-X-SERVER-CONTROL"))?null!=Ra.getAttribute("CAN-SKIP-UNTIL"):!1;Hf={id:a.La++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:ld,mimeType:v,codecs:e,kind:md,encrypted:E,drmInfos:H,keyIds:L,language:g,label:k,type:f,primary:h,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:hb,forced:n,
699
+ channelsCount:l,audioSamplingRate:null,spatialAudio:q,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return gc["return"]({stream:Hf,Zc:c,Ne:d,Fd:Ec,ic:Aa,Se:Gf})})}
700
+ function kr(a,b){var c=sq(b.g,"EXT-X-PLAYLIST-TYPE"),d=sq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Pq(a,Iq);else{c?Pq(a,nr):Pq(a,or);d=sq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=sq(b.g,"EXT-X-PART-INF");a.l&&c?(a.ha=Number(nq(c,"PART-TARGET")),a.F=Math.min(a.ha,a.F),c=sq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(nq(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ea=Math.max(d,a.ea)}}
701
+ function pr(a,b,c,d){c=sq(c,"EXT-X-MAP");if(!c)return null;var e=nq(c,"URI");d=ir(dc([b],[e])[0],d);b=[d,Z(c,"BYTERANGE","")].join("-");a.da.has(b)||(c=qr(d,c),a.da.set(b,c));return a.da.get(b)}function qr(a,b){var c=0,d=null,e=Z(b,"BYTERANGE");e&&(c=e.split("@"),d=Number(c[0]),c=Number(c[1]),d=c+d-1);return new Jh(function(){return[a]},c,d)}
702
+ function rr(a,b,c,d,e,f,g,h){var k=d.h,l=ir(d.i,f),m=sq(k,"EXTINF"),p=f=0,n=null;d.g.length&&!a.l&&Va("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var q=null;if(!a.h.hls.ignoreManifestProgramDateTime){var v=sq(k,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(q=lo(v.value))}v=Mh;sq(k,"EXT-X-GAP")&&(v=2);if(!m){if(0==d.g.length)throw new N(2,4,4024,"EXTINF");
703
+ if(!a.l)return null}var y=[];if(a.l)for(var x={},w=0;w<d.g.length;x={hd:x.hd},w++){var D=d.g[w],C=0==w?c:y[y.length-1],A=0==w?e:C.endTime,G=Number(Z(D,"DURATION"))||a.ha;if(G){G=A+G;var E=0,H=null;"EXT-X-PRELOAD-HINT"==D.name?E=(C=Z(D,"BYTERANGE-START"))?Number(C):0:(E=Z(D,"BYTERANGE"),C=t(sr(C,E)),E=C.next().value,H=C.next().value);if(D=Z(D,"URI"))x.hd=dc([g],[D])[0],y.push(new Lh(A,G,function(L){return function(){return[L.hd]}}(x),E,H,b,0,0,Infinity))}}m?f=e+Number(m.value.split(",")[0]):f=y[y.length-
704
+ 1].endTime;(a=sq(k,"EXT-X-BYTERANGE"))?(n=t(sr(c,a.value)),p=n.next().value,n=n.next().value):y.length&&(p=y[0].Ba,n=y[y.length-1].la);c="";a=null;"image"==h&&(c="1x1",h=sq(k,"EXT-X-TILES"))&&(c=nq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new Lh(e,f,function(){return l.length?[l]:[]},p,n,b,0,0,Infinity,y,c,a,q,v)}function sr(a,b){var c=0,d=null;b&&(c=b.split("@"),d=Number(c[0]),c=c[1]?Number(c[1]):a.la+1,d=c+d-1);return[c,d]}
705
+ function ar(a){if(a.i){for(var b=t(a.R),c=b.next();!c.done;c=b.next())a.i.Eb(c.value);a.R=[]}}
706
+ function Oq(a,b,c,d,e){var f=b.segments,g=tq(b.g),h=sq(b.g,"EXT-X-SKIP");h=h?Number(Z(h,"SKIPPED-SEGMENTS")):0;var k=g+h,l=0;a.m!=Iq&&d.has(k)&&(l=d.get(k));for(var m=[],p=null,n=0;n<f.length;n++){var q=f[n],v=0==n?l:p.endTime;k=g+h+n;d.set(k,v);var y=pr(a,b.h,q.h,e);!a.l&&a.j.isAutoLowLatencyMode()&&(a.j.enableLowLatencyMode(),a.l=a.j.isLowLatencyMode());(p=y=rr(a,y,p,q,v,e,b.h,c))&&(a.h.hls.ignoreManifestProgramDateTime&&null!=a.M&&k<a.M||m.push(y))}if(a=m.some(function(x){return null!=x.g}))for(b=
707
+ {},c=0;c<m.length;b={Nb:b.Nb,Mb:b.Mb,vc:b.vc,Ta:b.Ta,Lb:b.Lb},c++)if(b.Ta=m[c],null==b.Ta.g)for(b.Mb=0,b.Nb=c,d=function(x){return function(){var w=m[x.Nb];if(w){if(null!=w.g)return w.g+x.Mb;x.Mb-=w.endTime-w.startTime;x.Nb+=1}return null}}(b),b.Lb=0,b.vc=c,e=function(x){return function(){var w=m[x.vc];if(w){w!=x.Ta&&(x.Lb+=w.endTime-w.startTime);if(null!=w.g)return w.g+x.Lb;--x.vc}return null}}(b);null==b.Ta.g;)b.Ta.g=e(),null==b.Ta.g&&(b.Ta.g=d());if(a)for(a=t(m),b=a.next();!b.done;b=a.next())for(c=
708
+ b.value,b=c.g,c=t(c.h),d=c.next();!d.done;d=c.next())d=d.value,d.g=b,b+=d.endTime-d.startTime;return m}function ir(a,b){var c=String(a).replace(/%7B/g,"{").replace(/%7D/g,"}"),d=c.match(/{\$\w*}/g);if(d){d=t(d);for(var e=d.next();!e.done;e=d.next()){e=e.value;var f=e.slice(2,e.length-1),g=b.get(f);if(g)c=c.replace(e,g);else throw new N(2,4,4039,f);}}return c}
709
+ function lr(a,b,c,d,e){var f,g,h,k,l,m,p,n,q,v,y,x;return K(function(w){if(1==w.g){f=mc;g=df;h=Math.trunc((d.segments.length-1)/2);k=ir(d.segments[h].i,e);l=new Nb(k);m=l.ta.split(".").pop();p=tr[b];if(n=p[m])return w["return"](n);if(b==f.X){if("vtt"==c||"wvtt"==c)return w["return"]("text/vtt");if(c&&""!==c)return w["return"]("application/mp4")}if(b==f.Sb&&(!c||"jpeg"==c))return w["return"]("image/jpeg");q=Ye([k],a.h.retryParameters);q.method="HEAD";return u(w,ur(a,q,g),2)}v=w.h;y=v.headers["content-type"];
710
+ if(!y){if(b==f.X)return w["return"]("text/vtt");x=p.mp4;return w["return"](x)}return w["return"](y.split(";")[0])})}function Jq(a,b){var c=Ye([b],a.h.retryParameters);a.j.modifyManifestRequest(c,{format:"h"});return ur(a,c,0)}function Hq(a){var b,c;K(function(d){if(1==d.g){if(!a.j)return d["return"]();B(d,2);return u(d,a.update(),4)}if(2!=d.g)return b=a.ia,a.C.S(b),va(d,0);c=F(d);if(!a.j)return d["return"]();c.severity=1;a.j.onError(c);a.C.S(.1);z(d)})}
711
+ function Pq(a,b){a.m=b;a.i&&a.i.tc(a.m==Iq);a.m!=Iq||a.C.stop()}function ur(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.j.networkingEngine.request(c,b);Te(a.D,b);return b.promise}M("shaka.hls.HlsParser",Gq);
712
+ var tr={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"},
713
+ image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},mr={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);return hc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=nq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=nq(a,"URI");b=Fq(b);b=Fb(b.data);b=hc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);
714
+ if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=nq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=nq(a,"URI");a=Fq(a);a=Fb(a.data);b=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=$n(a,b,new Set,0);return hc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},Iq="VOD",or="EVENT",nr="LIVE",Mq={Me:Iq,rg:or,Le:nr};
715
+ uc("Tizen 3")||uc("Tizen 2")||wc()||(ig.m3u8=function(){return new Gq},gg["application/x-mpegurl"]=function(){return new Gq},gg["application/vnd.apple.mpegurl"]=function(){return new Gq});function vr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,xe:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ic(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function wr(){}function xr(a,b,c,d,e){var f=new yr;of(b.headers).forEach(function(l,m){f.append(m,l)});var g=new zr,h={he:!1,Ie:!1};a=Ar(a,c,{body:b.body||void 0,headers:f,method:b.method,signal:g.signal,credentials:b.allowCrossSiteCredentials?"include":void 0},h,d,e,b.streamDataCallback);a=new He(a,function(){h.he=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Ie=!0;g.abort()});k.S(b/1E3);a["finally"](function(){k.stop()})}return a}
716
+ function Ar(a,b,c,d,e,f,g){var h,k,l,m,p,n,q,v,y,x,w,D,C;return K(function(A){switch(A.g){case 1:return h=Br,k=Cr,n=p=0,q=Date.now(),B(A,2),u(A,h(a,c),4);case 4:return l=A.h,f(Dr(l.headers)),v=l.clone().body.getReader(),x=(y=l.headers.get("Content-Length"))?parseInt(y,10):0,w=function(G){function E(){var H,L;return K(function(I){switch(I.g){case 1:return B(I,2),u(I,v.read(),4);case 4:H=I.h;va(I,3);break;case 2:return F(I),I["return"]();case 3:if(H.done){I.A(5);break}p+=H.value.byteLength;if(!g){I.A(5);
717
+ break}return u(I,g(H.value),5);case 5:L=Date.now();if(100<L-q||H.done)e(L-q,p-n,x-p),n=p,q=L;H.done?G.close():(G.enqueue(H.value),E());z(I)}})}E()},new k({start:w}),u(A,l.arrayBuffer(),5);case 5:m=A.h;va(A,3);break;case 2:D=F(A);if(d.he)throw new N(1,1,7001,a,b);if(d.Ie)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return C=Dr(l.headers),A["return"](vr(C,m,l.status,a,l.url,b))}})}function Dr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
718
+ function Er(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",wr);wr.isSupported=Er;wr.parse=xr;var Br=window.fetch,zr=window.AbortController,Cr=window.ReadableStream,yr=window.Headers;Er()&&(Ve("http",xr,2,!0),Ve("https",xr,2,!0),Ve("blob",xr,2,!0));function Fr(){}
719
+ function Gr(a,b,c,d,e){var f=new Hr,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new N(1,1,7001,a,c))};var p=!1;f.onreadystatechange=function(){if(2==f.readyState&&!p){var q=Ir(f);e(q);p=!0}};f.onload=function(){var q=Ir(f),v=f.response;try{var y=vr(q,v,f.status,a,f.responseURL,c);l(y)}catch(x){m(x)}};f.onerror=function(q){m(new N(1,1,1002,a,q,
720
+ c))};f.ontimeout=function(){m(new N(1,1,1003,a,c))};f.onprogress=function(q){var v=Date.now();if(100<v-g||q.lengthComputable&&q.loaded==q.total)d(v-g,q.loaded-h,q.total-q.loaded),h=q.loaded,g=v};for(var n in b.headers)f.setRequestHeader(n.toLowerCase(),b.headers[n]);f.send(b.body)});return new He(k,function(){f.abort();return Promise.resolve()})}
721
+ function Ir(a){var b=a.getAllResponseHeaders().trim().split("\r\n");a={};b=t(b);for(var c=b.next();!c.done;c=b.next())c=c.value.split(": "),a[c[0].toLowerCase()]=c.slice(1).join(": ");return a}M("shaka.net.HttpXHRPlugin",Fr);Fr.parse=Gr;var Hr=window.XMLHttpRequest;Ve("http",Gr,1,!0);Ve("https",Gr,1,!0);Ve("blob",Gr,1,!0);function Jr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Kr(a){return a.ya().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.la}function Lr(a,b){return ej(a.g.ya(),a.g.Ba,a.g.la,b.streaming.retryParameters)};function Mr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Nr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Mr.prototype.close=function(a,b){if(this.g.has(a)){var c=this.g.get(a);this.g["delete"](a);this.j+=c;this.h+=b}};function Or(a){var b=this;this.o=a;this.j=new Map;this.i=new ef(function(){return Pr(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Mr}Or.prototype.destroy=function(){return this.i.destroy()};function Qr(a,b,c){a.m=b;a.l=c}function Pr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
722
+ function Rr(a,b,c,d,e,f){ff(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,p,n,q;return K(function(v){if(1==v.g)return u(v,Sr(a,c),2);h=v.h;if(a.i.g)throw new N(2,9,7001);if(e)for(m in k=Fb(h),l=new Zn(k),l.data)p=Number(m),n=l.data[p],q=l.g[p],a.l(n,q);a.g.close(d,h.byteLength);var y=a.g;a.m(0==y.i?0:y.j/y.i,a.g.h);return v["return"](f(h))})});a.j.set(b,g)}function Tr(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
723
+ function Sr(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=df,d=a.o.request(c,b),e=function(){return d.abort()},a.h.push(e),u(g,d.promise,2);f=g.h;eb(a.h,e);return g["return"](f.data)})};function Ur(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new nc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Ur.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}B(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);z(b)})};
724
+ function Vr(a,b){return new Promise(function(c,d){var e=a.h.openCursor();e.onerror=d;e.onsuccess=function(){var f;return K(function(g){if(1==g.g){if(null==e.result)return c(),g["return"]();f=e.result;return u(g,b(f.key,f.value,f),2)}f["continue"]();z(g)})}})}Ur.prototype.store=function(){return this.h};Ur.prototype.promise=function(){return this.g};function Wr(a){this.h=a;this.g=[]}Wr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Xr(a,b){return Yr(a,b,"readwrite")}function Yr(a,b,c){c=a.h.transaction([b],c);var d=new Ur(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function Zr(a,b,c){this.h=new Wr(a);this.i=b;this.g=c}r=Zr.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return $r(this.i)};r.removeSegments=function(a,b){return as(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,bs(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.ie(e)}))})};r.addManifests=function(){return $r(this.g)};
725
+ r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function cs(a,b,c){a=Xr(a.h,a.g);var d=a.store();d.get(b).onsuccess=function(){d.put(c,b)};return a.promise()}r.updateManifestExpiration=function(a,b){var c=Xr(this.h,this.g),d=c.store();d.get(a).onsuccess=function(e){if(e=e.target.result)e.expiration=b,d.put(e,a)};return c.promise()};r.removeManifests=function(a,b){return as(this,this.g,a,b)};
726
+ r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,bs(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.$b(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Yr(a.h,a.g,"readonly"),c=new Map,u(d,Vr(b,function(e,f){var g;return K(function(h){if(1==h.g)return u(h,a.$b(f),2);g=h.h;c.set(e,g);z(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.ie=function(a){return a};r.$b=function(a){return Promise.resolve(a)};
727
+ function $r(a){return Promise.reject(new N(2,9,9011,"Cannot add new value to "+a))}r.add=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Xr(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={zc:g.zc},k=h.next())l=k.value,g.zc=e.add(l),g.zc.onsuccess=function(p){return function(){f.push(p.zc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
728
+ function as(a,b,c,d){a=Xr(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={yc:e.yc},f=c.next())e.yc=f.value,b["delete"](e.yc).onsuccess=function(g){return function(){return d(g.yc)}}(e);return a.promise()}
729
+ function bs(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Yr(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Rb:h.Rb,Pb:h.Pb},l=k.next())h.Pb=l.value,h.Rb=e.get(h.Pb),h.Rb.onsuccess=function(p){return function(){void 0==p.Rb.result&&g.push(p.Pb);f[p.Pb]=p.Rb.result}}(h);return u(m,d.promise(),2)}if(g.length)throw new N(2,9,9012,"Could not find values for "+g);return m["return"](c.map(function(p){return f[p]}))})};function ds(a){this.g=new Wr(a)}ds.prototype.destroy=function(){return this.g.destroy()};ds.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Yr(a.g,"session-ids","readonly"),c=[],u(d,Vr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};ds.prototype.add=function(a){var b=Xr(this.g,"session-ids"),c=b.store();a=t(a);for(var d=a.next();!d.done;d=a.next())c.add(d.value);return b.promise()};
730
+ ds.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Xr(b.g,"session-ids"),u(d,Vr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function es(){this.g=new Map}es.prototype.destroy=function(){for(var a=[],b=t(this.g.values()),c=b.next();!c.done;c=b.next())a.push(c.value.destroy());this.g.clear();return Promise.all(a)};es.prototype.init=function(){var a=this;fs.forEach(function(e,f){var g=e();g&&a.g.set(f,g)});for(var b=[],c=t(this.g.values()),d=c.next();!d.done;d=c.next())b.push(d.value.init());return Promise.all(b)};
731
+ function gs(a){var b=null;a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){e.hasFixedKeySpace()||b||(b={path:{Aa:d,ka:f},ka:e})})});if(b)return b;throw new N(2,9,9013,"Could not find a cell that supports add-operations");}function hs(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Aa:d,ka:f},e)})})}
732
+ function is(a,b,c){a=a.g.get(b);if(!a)throw new N(2,9,9013,"Could not find mechanism with name "+b);b=a.getCells().get(c);if(!b)throw new N(2,9,9013,"Could not find cell with name "+c);return b}function js(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function ks(a){var b=Array.from(a.g.keys());if(!b.length)throw new N(2,9,9E3,"No supported storage mechanisms found");return a.g.get(b[0]).getEmeSessionCell()}
733
+ function ls(a){var b,c,d;return K(function(e){return 1==e.g?(b=Array.from(a.g.values()),c=0<b.length,c||(d=fs,d.forEach(function(f){(f=f())&&b.push(f)})),u(e,Promise.all(b.map(function(f){return f.erase()})),2)):c?e.A(0):u(e,Promise.all(b.map(function(f){return f.destroy()})),0)})}function ms(a,b){fs.set(a,b)}M("shaka.offline.StorageMuxer",es);es.unregister=function(a){fs["delete"](a)};es.register=ms;es.prototype.destroy=es.prototype.destroy;var fs=new Map;function ns(){Zr.apply(this,arguments)}pa(ns,Zr);ns.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Xr(c.h,c.g);e=d.store();f=new nc;e.get(a).onsuccess=function(h){(h=h.target.result)?(h.expiration=b,e.put(h),f.resolve()):f.reject(new N(2,9,9012,"Could not find values for "+a))};return u(g,Promise.all([d.promise(),f]),0)})};
734
+ ns.prototype.$b=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c)d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime,e=d-a.periods[c].startTime,f=os(a.periods[c],e),b.push(f);return u(h,yp(b),2)}g=h.h;return h["return"]({creationTime:0,originalManifestUri:a.originalManifestUri,duration:a.duration,size:a.size,expiration:null==a.expiration?Infinity:a.expiration,streams:g,sessionIds:a.sessionIds,drmInfo:a.drmInfo,appMetadata:a.appMetadata,sequenceMode:!1})})};
735
+ function os(a,b){ps(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return qs(e,a.startTime,b)})}
736
+ function qs(a,b,c){var d=a.initSegmentUri?rs(a.initSegmentUri):null,e=b+a.presentationTimeOffset,f=b+c;return{id:a.id,originalId:null,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,initSegmentKey:d,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(g){var h=rs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
737
+ dataKey:h,initSegmentKey:d,appendWindowStart:b,appendWindowEnd:f,timestampOffset:e,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}ns.prototype.ie=function(a){return{data:a.data}};function rs(a){var b;if((b=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(a))||(b=/^offline:segment\/([0-9]+)$/.exec(a)))return Number(b[1]);throw new N(2,9,9004,"Could not parse uri "+a);}
738
+ function ps(a){var b=a.streams.filter(function(h){return"audio"==h.contentType});a=a.streams.filter(function(h){return"video"==h.contentType});if(!b.every(function(h){return h.variantIds})||!a.every(function(h){return h.variantIds})){for(var c=t(b),d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=t(a);for(d=c.next();!d.done;d=c.next())d.value.variantIds=[];c=0;if(a.length&&!b.length){var e=c++,f=t(a);for(d=f.next();!d.done;d=f.next())d.value.variantIds.push(e)}if(!a.length&&b.length)for(e=c++,
739
+ f=t(b),d=f.next();!d.done;d=f.next())d.value.variantIds.push(e);if(a.length&&b.length)for(b=t(b),d=b.next();!d.done;d=b.next())for(d=d.value,e=t(a),f=e.next();!f.done;f=e.next()){f=f.value;var g=c++;d.variantIds.push(g);f.variantIds.push(g)}}};function ss(){Zr.apply(this,arguments)}pa(ss,Zr);
740
+ ss.prototype.$b=function(a){var b,c,d,e,f,g;return K(function(h){if(1==h.g){b=[];for(c=0;c<a.periods.length;++c){d=c==a.periods.length-1?a.duration:a.periods[c+1].startTime;e=d-a.periods[c].startTime;for(var k=a.periods[c],l=[],m=t(k.streams),p=m.next();!p.done;p=m.next())p=p.value,0!=p.variantIds.length&&l.push(ts(p,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,yp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
739
741
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
740
- function us(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
741
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function vs(){$r.apply(this,arguments)}pa(vs,$r);r=vs.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return ds(this,a,b)};r.$b=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ws(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=ws.prototype;
742
- r.init=function(){var a=this,b=new nc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new os(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new ts(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new ts(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
743
- e=e.contains("manifest-v5")&&e.contains("segment-v5")?new vs(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new es(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
742
+ function ts(a,b,c){return{id:a.id,originalId:a.originalId,primary:a.primary,type:a.contentType,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:void 0,kind:a.kind,language:a.language,label:a.label,width:a.width,height:a.height,encrypted:a.encrypted,keyIds:new Set([a.keyId]),segments:a.segments.map(function(d){return{startTime:b+d.startTime,endTime:b+d.endTime,initSegmentKey:a.initSegmentKey,appendWindowStart:b,appendWindowEnd:c,timestampOffset:b-a.presentationTimeOffset,
743
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function us(){Zr.apply(this,arguments)}pa(us,Zr);r=us.prototype;r.hasFixedKeySpace=function(){return!1};r.addSegments=function(a){return this.add(this.i,a)};r.addManifests=function(a){return this.add(this.g,a)};r.updateManifest=function(a,b){return cs(this,a,b)};r.$b=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function vs(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=vs.prototype;
744
+ r.init=function(){var a=this,b=new nc,c=window.indexedDB.open("shaka_offline_db",5);c.onsuccess=function(){var d=c.result;a.l=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new ns(d,"segment","manifest"):null;a.g=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new ss(d,"segment-v2","manifest-v2"):null;a.h=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new ss(d,"segment-v3","manifest-v3"):null;a.i=e;e=d.objectStoreNames;
745
+ e=e.contains("manifest-v5")&&e.contains("segment-v5")?new us(d,"segment-v5","manifest-v5"):null;a.j=e;d=d.objectStoreNames.contains("session-ids")?new ds(d):null;a.m=d;b.resolve()};c.onupgradeneeded=function(){for(var d=c.result,e=t(["segment-v5","manifest-v5","session-ids"]),f=e.next();!f.done;f=e.next())f=f.value,d.objectStoreNames.contains(f)||d.createObjectStore(f,{autoIncrement:!0})};c.onerror=function(d){b.reject(new N(2,9,9001,c.error));d.preventDefault()};return b};
744
746
  r.destroy=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:if(!a.m){b.A(10);break}return u(b,a.m.destroy(),10);case 10:a.l&&a.l.close(),z(b)}})};
745
747
  r.getCells=function(){var a=new Map;this.g&&a.set("v1",this.g);this.h&&a.set("v2",this.h);this.i&&a.set("v3",this.i);this.j&&a.set("v5",this.j);return a};r.getEmeSessionCell=function(){return this.m};
746
- r.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,xs(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
747
- function xs(){var a=new nc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}ns("idb",function(){return xc()||tc()||!window.indexedDB?null:new ws});function ys(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}ys.prototype.Aa=function(){return this.i};ys.prototype.ka=function(){return this.h};ys.prototype.key=function(){return this.l};ys.prototype.toString=function(){return this.j};
748
- function zs(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new ys(b,c,d,Number(a[4])):null};function As(a,b){this.h=a;this.g=b}
749
- function Bs(a,b){var c=new T(null,0);c.Ia(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Cs(a,d,e,c);e=b.streams.filter(function(l){return l.type==lc}).map(function(l){return Ds(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Ds(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
748
+ r.erase=function(){var a=this;return K(function(b){switch(b.g){case 1:if(!a.g){b.A(2);break}return u(b,a.g.destroy(),2);case 2:if(!a.h){b.A(4);break}return u(b,a.h.destroy(),4);case 4:if(!a.i){b.A(6);break}return u(b,a.i.destroy(),6);case 6:if(!a.j){b.A(8);break}return u(b,a.j.destroy(),8);case 8:return a.l&&a.l.close(),u(b,ws(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
749
+ function ws(){var a=new nc,b=window.indexedDB.deleteDatabase("shaka_offline_db");b.onblocked=function(){};b.onsuccess=function(){a.resolve()};b.onerror=function(c){a.reject(new N(2,9,9001,b.error));c.preventDefault()};return a}ms("idb",function(){return xc()||tc()||!window.indexedDB?null:new vs});function xs(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}xs.prototype.Aa=function(){return this.i};xs.prototype.ka=function(){return this.h};xs.prototype.key=function(){return this.l};xs.prototype.toString=function(){return this.j};
750
+ function ys(a){a=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(a);if(null==a)return null;var b=a[1];if("manifest"!=b&&"segment"!=b)return null;var c=a[2];if(!c)return null;var d=a[3];return d&&null!=b?new xs(b,c,d,Number(a[4])):null};function zs(a,b){this.h=a;this.g=b}
751
+ function As(a,b){var c=new T(null,0);c.Ia(b.duration);var d=b.streams.filter(function(l){return"audio"==l.type}),e=b.streams.filter(function(l){return"video"==l.type});d=Bs(a,d,e,c);e=b.streams.filter(function(l){return l.type==lc}).map(function(l){return Cs(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return Cs(a,l,c)}),g=b.drmInfo?[b.drmInfo]:[];if(b.drmInfo)for(var h=t(d.values()),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&k.audio.encrypted&&(k.audio.drmInfos=
750
752
  g),k.video&&k.video.encrypted&&(k.video.drmInfos=g);return{presentationTimeline:c,minBufferTime:2,offlineSessionIds:b.sessionIds,variants:Array.from(d.values()),textStreams:e,imageStreams:f,sequenceMode:b.sequenceMode||!1}}
751
- function Cs(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
752
- e.value,g=Ds(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Ds(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
753
- function Ds(a,b,c){var d=b.segments.map(function(e){return Es(a,e)});c.Eb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Oi(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
754
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Es(a,b){var c=new ys("segment",a.h,a.g,b.dataKey);return new Mh(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Fs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
755
- function Fs(a,b){var c=new ys("segment",a.h,a.g,b);return new Kh(function(){return[c.toString()]},0,null)};function Gs(){this.g=null}r=Gs.prototype;r.configure=function(){};
756
- r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=zs(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new fs;ua(m);return u(m,e.init(),4);case 4:return u(m,js(e,d.Aa(),d.ka()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new As(d.Aa(),d.ka()),l=Bs(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
757
- r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new fs,B(m,2,3),u(m,e.init(),5);case 5:return u(m,js(e,d.Aa(),d.ka()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
758
- hg["application/x-offline-manifest"]=function(){return new Gs};function Hs(){}function Is(a){var b=zs(a);b&&"manifest"==b.g?(a={uri:a,we:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Le(a)):a=b&&"segment"==b.g?Js(b.key(),b):Je(new N(2,1,9004,a));return a}
759
- function Js(a,b){var c=new fs;return Le(void 0).Z(function(){return c.init()}).Z(function(){return js(c,b.Aa(),b.ka())}).Z(function(d){return d.getSegments([b.key()])}).Z(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Hs);Hs.plugin=Is;We("offline",Is);function Ks(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],p=t(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var q=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,Ls(y.info,n)){y.sessionIds.push(n.sessionId);q=!0;break}q||m.push({info:n,sessionIds:[n.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Ms(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l["return"](d)}})}
760
- function Ms(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new sf({kb:b,onError:function(){},Sc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),B(f,2),d.configure(a),u(f,Af(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return B(f,6),u(f,Nf(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
761
- 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return B(h,2),u(h,Of(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
762
- function Ls(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fb(a.audioCapabilities,b.audioCapabilities,c)&&fb(a.videoCapabilities,b.videoCapabilities,c)};function Ns(a,b,c){var d=b.presentationTimeline.getDuration();b=Os(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Ps(a,b){var c=Bs(new As(a.Aa(),a.ka()),b),d=b.appMetadata||{};c=Os(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
763
- function Os(a){var b=[],c=le(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(be(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(ce(c.value));return b};function Qs(){this.g={}}function Rs(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Ss(a,b){a.g[b.id]=b.bandwidth||2048}function Ts(a,b){var c=a.g[b];null==c&&(c=0);return c};function Us(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.cc()):(this.h=Ck(),this.g=new Ve);this.i=[];this.j=[];var c=!a;this.l=new ff(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Qr(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return u(k,b.g.destroy(),4);
764
- case 4:b.h=null,b.g=null,z(k)}})})}function Vs(){if(qc())a:{var a=t(gs.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=Us.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=zk(a,b));return Ek(this.h,a)};r.getConfiguration=function(){var a=Ck();Ek(a,this.h,Ck());return a};r.cc=function(){return this.g};
765
- r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Pr(this.g);this.j.push(f);b=Ws(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return u(h,gg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new Ie(b,function(){return Qr(f)});b["finally"](function(){eb(d.j,f)});return Xs(this,b)};
766
- function Ws(a,b,c,d,e,f){var g,h,k,l,m,p,n,q,v,y,x,w,D,C;return K(function(A){switch(A.g){case 1:return Ys(),h=g=null,k=new fs,p=m=l=null,B(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,Zs(a,b,g,e),6);case 6:n=A.h;$s(a);q=!n.presentationTimeline.U()&&!n.presentationTimeline.jb();if(!q)throw new N(2,9,9005,b);return u(A,at(a,n,function(G){p=p||G},e),7);case 7:h=A.h;$s(a);if(p)throw p;return u(A,bt(n,e),8);case 8:return u(A,k.init(),9);case 9:return $s(a),u(A,hs(k),10);case 10:return l=A.h,$s(a),v=ct(h,
767
- n,b,c,e,f),y=v.Cf,x=v.ae,u(A,l.ka.addManifests([y]),11);case 11:w=A.h;$s(a);m=w[0];$s(a);if(p)throw p;return u(A,dt(a,x,m,y,f,e,l.ka,n,h),12);case 12:return $s(a),D=new ys("manifest",l.path.Aa,l.path.ka,m),A["return"](Ps(D,y));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.A(14);break}return u(A,g.stop(),14);case 14:if(!h){A.A(16);break}return u(A,h.destroy(),16);case 16:xa(A,0);break;case 2:C=F(A);if(null==m){A.A(18);break}return u(A,et(m),18);case 18:throw p||C;}})}
768
- function dt(a,b,c,d,e,f,g,h,k){var l,m,p,n,q,v,y,x,w,D;return K(function(C){switch(C.g){case 1:l={};m=0;p=function(A,G){var E,H,L,I,J,P,Q;return K(function(Y){if(1==Y.g){E={};H=t(A);for(L=H.next();!L.done;E={ab:E.ab},L=H.next())E.ab=L.value,I=Mr(E.ab,f),J=E.ab.i,P=E.ab.h,Q=function(ca){return function(ra){var Ea,za,Ka;return K(function(Ba){if(1==Ba.g)return u(Ba,g.addSegments([{data:ra}]),2);Ea=Ba.h;$s(a);za=ca.ab.g;Ka=Lr(za);l[Ka]=Ea[0];m+=ra.byteLength;z(Ba)})}}(E),Sr(e,E.ab.groupId,I,J,P,Q);return u(Y,
769
- Ur(e),2)}if(!G)return Y.A(0);$s(a);ft(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};n=!1;B(C,2);if(!gt(h)||!n||ht(h)){C.A(4);break}return u(C,p(b.filter(function(A){return A.h}),!0),5);case 5:return $s(a),b=b.filter(function(A){return!A.h}),q=l,v=m,l={},m=0,u(C,it(g,c,d,q,v,function(){return $s(a)}),6);case 6:$s(a);case 4:if(n){C.A(7);break}return u(C,p(b,!1),8);case 8:return $s(a),y=l,x=m,l={},m=0,u(C,it(g,c,d,y,x,function(){return $s(a)}),9);case 9:$s(a);case 7:va(C,0);break;case 2:return w=F(C),
770
- D=Object.values(l),u(C,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function et(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new fs,u(f,b.init(),2);case 2:return u(f,hs(b),3);case 3:return c=f.h,d=new ys("manifest",c.path.Aa,c.path.ka,a),u(f,b.destroy(),4);case 4:return e=new Us,u(f,e.remove(d.toString()),0)}})}
771
- function it(a,b,c,d,e,f){var g,h,k,l,m,p,n,q,v,y,x;return K(function(w){switch(w.g){case 1:g=!1;B(w,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=t(m.segments),n=p.next();!n.done;n=p.next())q=n.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
772
- (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return y=F(w),u(w,et(b),5);case 5:if(g){w.A(6);break}x=Object.values(d);return u(w,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
773
- function bt(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I,J,P,Q,Y,ca;return K(function(ra){switch(ra.g){case 1:return c={width:Infinity,height:Infinity},Md(a,b.restrictions,c),u(ra,Pd(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;Ad(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(be(m));p=t(a.textStreams);for(n=p.next();!n.done;n=p.next())q=n.value,
774
- d.push(ce(q));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(de(x));return u(ra,b.offline.trackSelectionCallback(d),3);case 3:w=ra.h;D=a.presentationTimeline.getDuration();C=0;A=t(w);for(G=A.next();!G.done;G=A.next())E=G.value,H=E.bandwidth*D/8,C+=H;B(ra,4);return u(ra,b.offline.downloadSizeCallback(C),6);case 6:L=ra.h;if(!L)throw new N(2,9,9014);va(ra,5);break;case 4:I=F(ra);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:J=new Set;P=new Set;Q=new Set;Y=t(w);for(G=
775
- Y.next();!G.done;G=Y.next())ca=G.value,"variant"==ca.type&&J.add(ca.id),"text"==ca.type&&P.add(ca.id),"image"==ca.type&&Q.add(ca.id);a.variants=a.variants.filter(function(Ea){return J.has(Ea.id)});a.textStreams=a.textStreams.filter(function(Ea){return P.has(Ea.id)});a.imageStreams=a.imageStreams.filter(function(Ea){return Q.has(Ea.id)});jt(a);z(ra)}})}
776
- function ct(a,b,c,d,e,f){var g=Ns(c,b,d),h=e.offline.progressCallback;Rr(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&Kf(a,"cenc",q)});var k=gt(b)&&!ht(b),l=null;k&&(l=kt.get(a.g.keySystem));for(var m=new Qs,p=t(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=t(b.imageStreams);for(n=p.next();!n.done;n=p.next())Ss(m,n.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Rs(m,p.value);m=lt(f,m,b,e);f=m.streams;m=m.ae;n=a.g;p=e.offline.usePersistentLicense;
777
- n&&p&&(n.initData=[]);return{Cf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.bc(),streams:f,sessionIds:p?Sf(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},ae:m}}function gt(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
778
- function ht(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function ft(a,b,c,d){b.expiration=c.bc();c=Sf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(gt(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return mt(this,nt(this,a))};
779
- function nt(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Ys();c=zs(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new fs;ua(k);return u(k,e.init(),4);case 4:return u(k,js(e,d.Aa(),d.ka()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([ot(a,h,e),pt(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
780
- function qt(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Zc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Zc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function ot(a,b,c){return K(function(d){return u(d,rt(a.g,a.h.drm,c,b),0)})}
781
- function pt(a,b,c){function d(){}var e=st(c);Ps(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Qf=function(){return mt(this,tt(this))};
782
- function tt(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return Ys(),b=a.g,c=a.h.drm,d=new fs,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],ks(d,function(n){return f.push(n)}),g=t(f),h=g.next();case 5:if(h.done){p.A(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,Ks(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.A(5);break;case 2:return wa(p),u(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p["return"](!e)}})}
783
- r.list=function(){return mt(this,ut())};function ut(){var a,b,c;return K(function(d){switch(d.g){case 1:return Ys(),a=[],b=new fs,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),is(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Ps(new ys("manifest",e.Aa,e.ka,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
784
- function Zs(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),$s(a),u(l,c.start(b,
785
- g),2);if(3!=l.g)return h=l.h,$s(a),k=vt(h),u(l,Promise.all(nf(k,function(m){return m.createSegmentIndex()})),3);$s(a);if(e)throw e;return l["return"](h)})}function at(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new sf({kb:a.g,onError:c,Sc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,xf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Nf(e),3);case 3:return u(f,Mf(e),4);case 4:return f["return"](e)}})}
786
- function lt(a,b,c,d){var e=new Map,f=vt(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=wt(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),ae:Array.from(e.values())}}
787
- function wt(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
788
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;xt(d,c.presentationTimeline.Pa(),function(l){var m=Lr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Ts(b,d.id)*n;n=Or(a.g,n);f.set(m,new Kr(l,n,k,!1))}l.i&&(p=Lr(l.i),f.has(p)||(n=.5*Ts(b,d.id),n=Or(a.g,n),f.set(p,new Kr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
789
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function xt(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function $s(a){if(a.l.g)throw new N(2,9,7001);}function Ys(){if(!Vs())throw new N(2,9,9E3);}function mt(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);eb(a.i,b);return xa(c,0)})}
790
- function Xs(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){eb(a.i,c)})}function st(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
791
- function rt(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=ls(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:qt(d,!1),videoCapabilities:qt(d,!0)}});return u(h,Ks(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
792
- function vt(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
793
- function jt(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",Us);Us.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new fs,ua(b),u(b,ms(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Us.prototype.list=Us.prototype.list;
794
- Us.prototype.removeEmeSessions=Us.prototype.Qf;Us.prototype.remove=Us.prototype.remove;Us.prototype.store=Us.prototype.store;Us.prototype.getNetworkingEngine=Us.prototype.cc;Us.prototype.getConfiguration=Us.prototype.getConfiguration;Us.prototype.configure=Us.prototype.configure;Us.prototype.destroy=Us.prototype.destroy;Us.support=Vs;
795
- var kt=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
796
- Hm.offline=Vs;function yt(){}function zt(a,b){for(var c={priority:b||0,Pe:a},d=0;d<At.length;d++)if(At[d].priority<c.priority){At.splice(d,0,c);return}At.push(c)}M("shaka.polyfill",yt);yt.register=zt;yt.installAll=function(){for(var a=t(At),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Pe()}catch(c){Va("Error installing polyfill!",c)}}};var At=[];function Bt(){}function Ct(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Dt(b.value)}function Dt(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}yt.Aria=Bt;Bt.install=Ct;zt(Ct);function Et(){}function Ft(){Gt()}yt.EncryptionScheme=Et;Et.install=Ft;zt(Ft,-2);function Ht(){}
797
- function It(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
798
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",Jt);document.addEventListener("webkitfullscreenerror",Jt);document.addEventListener("mozfullscreenchange",Jt);document.addEventListener("mozfullscreenerror",Jt);document.addEventListener("MSFullscreenChange",Jt);document.addEventListener("MSFullscreenError",Jt)}}
799
- function Jt(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}yt.Fullscreen=Ht;Ht.install=It;zt(It);function Kt(){}function Lt(){var a=!0;if(yc()||uc("PlayStation 5")||zc()||xc())a=!1;xc()&&uc("Android")&&(a=!0);a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Mt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Nt)}
800
- function Nt(a){var b,c,d,e,f,g,h,k,l,m,p,n,q,v,y,x;return K(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!qc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=rc(g),!h)||a.audio&&(k=a.audio.contentType,
753
+ function Bs(a,b,c,d){for(var e=new Set,f=t(b),g=f.next();!g.done;g=f.next()){var h=t(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=t(c);for(g=f.next();!g.done;g=f.next())for(h=t(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=t(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=b.next())for(e=
754
+ e.value,g=Cs(a,e,d),h=t(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;c=t(c);for(b=c.next();!b.done;b=c.next())for(e=b.value,b=Cs(a,e,d),g=t(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||b.primary,e.video=b;return f}
755
+ function Cs(a,b,c){var d=b.segments.map(function(e){return Ds(a,e)});c.Eb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Ni(d),mimeType:b.mimeType,codecs:b.codecs,width:b.width||void 0,height:b.height||void 0,frameRate:b.frameRate,pixelAspectRatio:b.pixelAspectRatio,hdr:b.hdr,kind:b.kind,encrypted:b.encrypted,drmInfos:[],keyIds:b.keyIds,language:b.language,label:b.label,type:b.type,primary:b.primary,trickModeVideo:null,emsgSchemeIdUris:null,
756
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function Ds(a,b){var c=new xs("segment",a.h,a.g,b.dataKey);return new Lh(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?Es(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
757
+ function Es(a,b){var c=new xs("segment",a.h,a.g,b);return new Jh(function(){return[c.toString()]},0,null)};function Fs(){this.g=null}r=Fs.prototype;r.configure=function(){};
758
+ r.start=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:d=ys(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new es;ua(m);return u(m,e.init(),4);case 4:return u(m,is(e,d.Aa(),d.ka()),5);case 5:return f=m.h,u(m,f.getManifests([d.key()]),6);case 6:return g=m.h,h=g[0],k=new zs(d.Aa(),d.ka()),l=As(k,h),b.makeTextStreamsForClosedCaptions(l),m["return"](l);case 2:return wa(m),u(m,e.destroy(),7);case 7:xa(m,0)}})};r.stop=function(){return Promise.resolve()};
759
+ r.update=function(){};r.onExpirationUpdated=function(a,b){var c=this,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return d=c.g,e=new es,B(m,2,3),u(m,e.init(),5);case 5:return u(m,is(e,d.Aa(),d.ka()),6);case 6:return f=m.h,u(m,f.getManifests([d.key()]),7);case 7:g=m.h;h=g[0];k=h.sessionIds.includes(a);l=void 0==h.expiration||h.expiration>b;if(!k||!l){m.A(3);break}return u(m,f.updateManifestExpiration(d.key(),b),3);case 3:return wa(m),u(m,e.destroy(),10);case 10:xa(m,0);break;case 2:F(m),m.A(3)}})};
760
+ gg["application/x-offline-manifest"]=function(){return new Fs};function Gs(){}function Hs(a){var b=ys(a);b&&"manifest"==b.g?(a={uri:a,xe:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Ke(a)):a=b&&"segment"==b.g?Is(b.key(),b):Ie(new N(2,1,9004,a));return a}
761
+ function Is(a,b){var c=new es;return Ke(void 0).Z(function(){return c.init()}).Z(function(){return is(c,b.Aa(),b.ka())}).Z(function(d){return d.getSegments([b.key()])}).Z(function(d){return{uri:b,data:d[0].data,headers:{}}})["finally"](function(){return c.destroy()})}M("shaka.offline.OfflineScheme",Gs);Gs.plugin=Hs;Ve("offline",Hs);function Js(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],p=t(c),n=p.next();!n.done;n=p.next()){n=n.value;for(var q=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,Ks(y.info,n)){y.sessionIds.push(n.sessionId);q=!0;break}q||m.push({info:n,sessionIds:[n.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Ls(a,b,g);return u(l,h,5);case 5:k=l.h;d=d.concat(k);f=e.next();l.A(2);break;case 4:return l["return"](d)}})}
762
+ function Ls(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new rf({kb:b,onError:function(){},Tc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),B(f,2),d.configure(a),u(f,zf(d,c.info.keySystem,c.info.licenseUri,c.info.serverCertificate,c.info.audioCapabilities,c.info.videoCapabilities),4);case 4:va(f,3);break;case 2:return F(f),u(f,d.destroy(),5);case 5:return f["return"]([]);case 3:return B(f,6),u(f,Mf(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
763
+ 9);case 9:return f["return"]([]);case 7:return e=[],u(f,Promise.all(c.sessionIds.map(function(g){return K(function(h){if(1==h.g)return B(h,2),u(h,Nf(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);z(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
764
+ function Ks(a,b){function c(d,e){return d.robustness==e.robustness&&d.contentType==e.contentType}return a.keySystem==b.keySystem&&a.licenseUri==b.licenseUri&&fb(a.audioCapabilities,b.audioCapabilities,c)&&fb(a.videoCapabilities,b.videoCapabilities,c)};function Ms(a,b,c){var d=b.presentationTimeline.getDuration();b=Ns(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Os(a,b){var c=As(new zs(a.Aa(),a.ka()),b),d=b.appMetadata||{};c=Ns(c);return{offlineUri:a.toString(),originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:b.expiration,tracks:c,appMetadata:d,isIncomplete:b.isIncomplete||!1}}
765
+ function Ns(a){var b=[],c=ke(a.variants);c=t(c);for(var d=c.next();!d.done;d=c.next())b.push(ae(d.value));a=t(a.textStreams);for(c=a.next();!c.done;c=a.next())b.push(be(c.value));return b};function Ps(){this.g={}}function Qs(a,b){var c=b.audio,d=b.video;c&&!d&&(a.g[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(a.g[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var e=c.bandwidth||393216,f=d.bandwidth||b.bandwidth-e;0>=f&&(f=b.bandwidth);a.g[c.id]=e;a.g[d.id]=f}}function Rs(a,b){a.g[b.id]=b.bandwidth||2048}function Ss(a,b){var c=a.g[b];null==c&&(c=0);return c};function Ts(a){var b=this;if(a&&a.constructor!=U)throw new N(2,9,9008);this.g=this.h=null;a?(this.h=a.h,this.g=a.cc()):(this.h=Bk(),this.g=new Ue);this.i=[];this.j=[];var c=!a;this.l=new ef(function(){var d,e,f,g,h;return K(function(k){switch(k.g){case 1:return u(k,Promise.all(b.j.map(function(l){return Pr(l)})),2);case 2:d=function(){};e=[];f=t(b.i);for(g=f.next();!g.done;g=f.next())h=g.value,e.push(h.then(d,d));return u(k,Promise.all(e),3);case 3:if(!c){k.A(4);break}return u(k,b.g.destroy(),4);
766
+ case 4:b.h=null,b.g=null,z(k)}})})}function Us(){if(qc())a:{var a=t(fs.values());for(var b=a.next();!b.done;b=a.next())if(b=b.value,b=b()){b.destroy();a=!0;break a}a=!1}else a=!1;return a}r=Ts.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=yk(a,b));return Dk(this.h,a)};r.getConfiguration=function(){var a=Bk();Dk(a,this.h,Bk());return a};r.cc=function(){return this.g};
767
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Or(this.g);this.j.push(f);b=Vs(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return u(h,fg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new He(b,function(){return Pr(f)});b["finally"](function(){eb(d.j,f)});return Ws(this,b)};
768
+ function Vs(a,b,c,d,e,f){var g,h,k,l,m,p,n,q,v,y,x,w,D,C;return K(function(A){switch(A.g){case 1:return Xs(),h=g=null,k=new es,p=m=l=null,B(A,2,3),u(A,d(),5);case 5:return g=A.h,u(A,Ys(a,b,g,e),6);case 6:n=A.h;Zs(a);q=!n.presentationTimeline.U()&&!n.presentationTimeline.jb();if(!q)throw new N(2,9,9005,b);return u(A,$s(a,n,function(G){p=p||G},e),7);case 7:h=A.h;Zs(a);if(p)throw p;return u(A,at(n,e),8);case 8:return u(A,k.init(),9);case 9:return Zs(a),u(A,gs(k),10);case 10:return l=A.h,Zs(a),v=bt(h,
769
+ n,b,c,e,f),y=v.Df,x=v.ce,u(A,l.ka.addManifests([y]),11);case 11:w=A.h;Zs(a);m=w[0];Zs(a);if(p)throw p;return u(A,ct(a,x,m,y,f,e,l.ka,n,h),12);case 12:return Zs(a),D=new xs("manifest",l.path.Aa,l.path.ka,m),A["return"](Os(D,y));case 3:return wa(A),u(A,k.destroy(),13);case 13:if(!g){A.A(14);break}return u(A,g.stop(),14);case 14:if(!h){A.A(16);break}return u(A,h.destroy(),16);case 16:xa(A,0);break;case 2:C=F(A);if(null==m){A.A(18);break}return u(A,dt(m),18);case 18:throw p||C;}})}
770
+ function ct(a,b,c,d,e,f,g,h,k){var l,m,p,n,q,v,y,x,w,D;return K(function(C){switch(C.g){case 1:l={};m=0;p=function(A,G){var E,H,L,I,J,P,Q;return K(function(Y){if(1==Y.g){E={};H=t(A);for(L=H.next();!L.done;E={ab:E.ab},L=H.next())E.ab=L.value,I=Lr(E.ab,f),J=E.ab.i,P=E.ab.h,Q=function(ca){return function(ra){var Fa,za,Ka;return K(function(Aa){if(1==Aa.g)return u(Aa,g.addSegments([{data:ra}]),2);Fa=Aa.h;Zs(a);za=ca.ab.g;Ka=Kr(za);l[Ka]=Fa[0];m+=ra.byteLength;z(Aa)})}}(E),Rr(e,E.ab.groupId,I,J,P,Q);return u(Y,
771
+ Tr(e),2)}if(!G)return Y.A(0);Zs(a);et(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};n=!1;B(C,2);if(!ft(h)||!n||gt(h)){C.A(4);break}return u(C,p(b.filter(function(A){return A.h}),!0),5);case 5:return Zs(a),b=b.filter(function(A){return!A.h}),q=l,v=m,l={},m=0,u(C,ht(g,c,d,q,v,function(){return Zs(a)}),6);case 6:Zs(a);case 4:if(n){C.A(7);break}return u(C,p(b,!1),8);case 8:return Zs(a),y=l,x=m,l={},m=0,u(C,ht(g,c,d,y,x,function(){return Zs(a)}),9);case 9:Zs(a);case 7:va(C,0);break;case 2:return w=F(C),
772
+ D=Object.values(l),u(C,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function dt(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new es,u(f,b.init(),2);case 2:return u(f,gs(b),3);case 3:return c=f.h,d=new xs("manifest",c.path.Aa,c.path.ka,a),u(f,b.destroy(),4);case 4:return e=new Ts,u(f,e.remove(d.toString()),0)}})}
773
+ function ht(a,b,c,d,e,f){var g,h,k,l,m,p,n,q,v,y,x;return K(function(w){switch(w.g){case 1:g=!1;B(w,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,p=t(m.segments),n=p.next();!n.done;n=p.next())q=n.value,v=q.pendingSegmentRefId?d[q.pendingSegmentRefId]:null,null!=v&&(q.dataKey=v,q.pendingSegmentRefId=void 0),v=q.pendingInitSegmentRefId?d[q.pendingInitSegmentRefId]:null,null!=v&&(q.initSegmentKey=v,q.pendingInitSegmentRefId=void 0),q.pendingSegmentRefId&&(h=!1),q.pendingInitSegmentRefId&&
774
+ (h=!1);c.size+=e;h&&(c.isIncomplete=!1);return u(w,a.updateManifest(b,c),4);case 4:g=!0;f();va(w,0);break;case 2:return y=F(w),u(w,dt(b),5);case 5:if(g){w.A(6);break}x=Object.values(d);return u(w,a.removeSegments(x,function(){}),6);case 6:throw y;}})}
775
+ function at(a,b){var c,d,e,f,g,h,k,l,m,p,n,q,v,y,x,w,D,C,A,G,E,H,L,I,J,P,Q,Y,ca;return K(function(ra){switch(ra.g){case 1:return c={width:Infinity,height:Infinity},Ld(a,b.restrictions,c),u(ra,Od(a,b.offline.usePersistentLicense),2);case 2:d=[];e=b.preferredAudioChannelCount;f=b.preferredDecodingAttributes;g=b.preferredVideoCodecs;h=b.preferredAudioCodecs;zd(a,g,h,e,f);k=t(a.variants);for(l=k.next();!l.done;l=k.next())m=l.value,d.push(ae(m));p=t(a.textStreams);for(n=p.next();!n.done;n=p.next())q=n.value,
776
+ d.push(be(q));v=t(a.imageStreams);for(y=v.next();!y.done;y=v.next())x=y.value,d.push(ce(x));return u(ra,b.offline.trackSelectionCallback(d),3);case 3:w=ra.h;D=a.presentationTimeline.getDuration();C=0;A=t(w);for(G=A.next();!G.done;G=A.next())E=G.value,H=E.bandwidth*D/8,C+=H;B(ra,4);return u(ra,b.offline.downloadSizeCallback(C),6);case 6:L=ra.h;if(!L)throw new N(2,9,9014);va(ra,5);break;case 4:I=F(ra);if(I instanceof N)throw I;throw new N(2,9,9015);case 5:J=new Set;P=new Set;Q=new Set;Y=t(w);for(G=
777
+ Y.next();!G.done;G=Y.next())ca=G.value,"variant"==ca.type&&J.add(ca.id),"text"==ca.type&&P.add(ca.id),"image"==ca.type&&Q.add(ca.id);a.variants=a.variants.filter(function(Fa){return J.has(Fa.id)});a.textStreams=a.textStreams.filter(function(Fa){return P.has(Fa.id)});a.imageStreams=a.imageStreams.filter(function(Fa){return Q.has(Fa.id)});it(a);z(ra)}})}
778
+ function bt(a,b,c,d,e,f){var g=Ms(c,b,d),h=e.offline.progressCallback;Qr(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&Jf(a,"cenc",q)});var k=ft(b)&&!gt(b),l=null;k&&(l=jt.get(a.g.keySystem));for(var m=new Ps,p=t(b.textStreams),n=p.next();!n.done;n=p.next())m.g[n.value.id]=52;p=t(b.imageStreams);for(n=p.next();!n.done;n=p.next())Rs(m,n.value);n=t(b.variants);for(p=n.next();!p.done;p=n.next())Qs(m,p.value);m=kt(f,m,b,e);f=m.streams;m=m.ce;n=a.g;p=e.offline.usePersistentLicense;
779
+ n&&p&&(n.initData=[]);return{Df:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.bc(),streams:f,sessionIds:p?Rf(a):[],drmInfo:n,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},ce:m}}function ft(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
780
+ function gt(a){return a.variants.some(function(b){return(b.video?b.video.drmInfos:[]).concat(b.audio?b.audio.drmInfos:[]).some(function(c){return c.initData&&c.initData.length})})}function et(a,b,c,d){b.expiration=c.bc();c=Rf(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(ft(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return lt(this,mt(this,a))};
781
+ function mt(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Xs();c=ys(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new es;ua(k);return u(k,e.init(),4);case 4:return u(k,is(e,d.Aa(),d.ka()),5);case 5:return f=k.h,u(k,f.getManifests([d.key()]),6);case 6:return g=k.h,h=g[0],u(k,Promise.all([nt(a,h,e),ot(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
782
+ function pt(a,b){for(var c=[],d=t(a.streams),e=d.next();!e.done;e=d.next())e=e.value,b&&"video"==e.type?c.push({contentType:Yc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Yc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function nt(a,b,c){return K(function(d){return u(d,qt(a.g,a.h.drm,c,b),0)})}
783
+ function ot(a,b,c){function d(){}var e=rt(c);Os(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.Rf=function(){return lt(this,st(this))};
784
+ function st(a){var b,c,d,e,f,g,h,k,l,m;return K(function(p){switch(p.g){case 1:return Xs(),b=a.g,c=a.h.drm,d=new es,e=!1,ua(p),u(p,d.init(),4);case 4:f=[],js(d,function(n){return f.push(n)}),g=t(f),h=g.next();case 5:if(h.done){p.A(2);break}k=h.value;return u(p,k.getAll(),8);case 8:return l=p.h,u(p,Js(c,b,l),9);case 9:return m=p.h,u(p,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();p.A(5);break;case 2:return wa(p),u(p,d.destroy(),11);case 11:xa(p,3);break;case 3:return p["return"](!e)}})}
785
+ r.list=function(){return lt(this,tt())};function tt(){var a,b,c;return K(function(d){switch(d.g){case 1:return Xs(),a=[],b=new es,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),hs(b,function(e,f){c=c.then(function(){var g;return K(function(h){if(1==h.g)return u(h,f.getAllManifests(),2);g=h.h;g.forEach(function(k,l){var m=Os(new xs("manifest",e.Aa,e.ka,l),k);a.push(m)});z(h)})})}),u(d,c,2);case 2:return wa(d),u(d,b.destroy(),6);case 6:xa(d,3);break;case 3:return d["return"](a)}})}
786
+ function Ys(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=null,f=a.g,g={networkingEngine:f,modifyManifestRequest:function(){},modifySegmentRequest:function(){},filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(m){e=m},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},c.configure(d.manifest),Zs(a),u(l,c.start(b,
787
+ g),2);if(3!=l.g)return h=l.h,Zs(a),k=ut(h),u(l,Promise.all(mf(k,function(m){return m.createSegmentIndex()})),3);Zs(a);if(e)throw e;return l["return"](h)})}function $s(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new rf({kb:a.g,onError:c,Tc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,wf(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Mf(e),3);case 3:return u(f,Lf(e),4);case 4:return f["return"](e)}})}
788
+ function kt(a,b,c,d){var e=new Map,f=ut(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=vt(a,b,c,h,d,e);g.set(h.id,k)}a=t(c.variants);for(b=a.next();!b.done;b=a.next())b=b.value,b.audio&&g.get(b.audio.id).variantIds.push(b.id),b.video&&g.get(b.video.id).variantIds.push(b.id);return{streams:Array.from(g.values()),ce:Array.from(e.values())}}
789
+ function vt(a,b,c,d,e,f){var g={id:d.id,originalId:d.originalId,primary:d.primary,type:d.type,mimeType:d.mimeType,codecs:d.codecs,frameRate:d.frameRate,pixelAspectRatio:d.pixelAspectRatio,hdr:d.hdr,kind:d.kind,language:d.language,label:d.label,width:d.width||null,height:d.height||null,encrypted:d.encrypted,keyIds:d.keyIds,segments:[],variantIds:[],roles:d.roles,forced:d.forced,channelsCount:d.channelsCount,audioSamplingRate:d.audioSamplingRate,spatialAudio:d.spatialAudio,closedCaptions:d.closedCaptions,
790
+ tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;wt(d,c.presentationTimeline.Pa(),function(l){var m=Kr(l),p=void 0;if(!f.has(m)){var n=l.endTime-l.startTime;n=Ss(b,d.id)*n;n=Nr(a.g,n);f.set(m,new Jr(l,n,k,!1))}l.i&&(p=Kr(l.i),f.has(p)||(n=.5*Ss(b,d.id),n=Nr(a.g,n),f.set(p,new Jr(l.i,n,k,!0))));g.segments.push({pendingInitSegmentRefId:p,initSegmentKey:p?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
791
+ tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function wt(a,b,c){b=a.segmentIndex.find(b);if(null!=b)for(var d=a.segmentIndex.get(b);d;)c(d),d=a.segmentIndex.get(++b)}function Zs(a){if(a.l.g)throw new N(2,9,7001);}function Xs(){if(!Us())throw new N(2,9,9E3);}function lt(a,b){return K(function(c){if(1==c.g)return a.i.push(b),ua(c),u(c,b,4);if(2!=c.g)return c["return"](c.h);wa(c);eb(a.i,b);return xa(c,0)})}
792
+ function Ws(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){eb(a.i,c)})}function rt(a){var b=new Set;a=t(a.streams);for(var c=a.next();!c.done;c=a.next()){c=t(c.value.segments);for(var d=c.next();!d.done;d=c.next())d=d.value,null!=d.initSegmentKey&&b.add(d.initSegmentKey),b.add(d.dataKey)}return Array.from(b)}
793
+ function qt(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=ks(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:pt(d,!1),videoCapabilities:pt(d,!0)}});return u(h,Js(b,a,f),2)}return 3!=h.g?(g=h.h,u(h,e.remove(g),3)):u(h,e.add(f.filter(function(k){return!g.includes(k.sessionId)})),0)})}
794
+ function ut(a){for(var b=new Set,c=t(a.textStreams),d=c.next();!d.done;d=c.next())b.add(d.value);c=t(a.imageStreams);for(d=c.next();!d.done;d=c.next())b.add(d.value);a=t(a.variants);for(c=a.next();!c.done;c=a.next())c=c.value,c.audio&&b.add(c.audio),c.video&&b.add(c.video);return b}
795
+ function it(a){a.variants.map(function(f){return f.video});var b=new Set(a.variants.map(function(f){return f.audio}));a=a.textStreams;for(var c=t(b),d=c.next();!d.done;d=c.next()){d=t(b);for(var e=d.next();!e.done;e=d.next());}b=t(a);for(c=b.next();!c.done;c=b.next())for(c=t(a),d=c.next();!d.done;d=c.next());}M("shaka.offline.Storage",Ts);Ts.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new es,ua(b),u(b,ls(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Ts.prototype.list=Ts.prototype.list;
796
+ Ts.prototype.removeEmeSessions=Ts.prototype.Rf;Ts.prototype.remove=Ts.prototype.remove;Ts.prototype.store=Ts.prototype.store;Ts.prototype.getNetworkingEngine=Ts.prototype.cc;Ts.prototype.getConfiguration=Ts.prototype.getConfiguration;Ts.prototype.configure=Ts.prototype.configure;Ts.prototype.destroy=Ts.prototype.destroy;Ts.support=Us;
797
+ var jt=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");
798
+ Gm.offline=Us;function xt(){}function yt(a,b){for(var c={priority:b||0,Qe:a},d=0;d<zt.length;d++)if(zt[d].priority<c.priority){zt.splice(d,0,c);return}zt.push(c)}M("shaka.polyfill",xt);xt.register=yt;xt.installAll=function(){for(var a=t(zt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Qe()}catch(c){Va("Error installing polyfill!",c)}}};var zt=[];function At(){}function Bt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())Ct(b.value)}function Ct(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})}xt.Aria=At;At.install=Bt;yt(Bt);function Dt(){}function Et(){Ft()}xt.EncryptionScheme=Dt;Dt.install=Et;yt(Et,-2);function Gt(){}
799
+ function Ht(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),
800
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",It);document.addEventListener("webkitfullscreenerror",It);document.addEventListener("mozfullscreenchange",It);document.addEventListener("mozfullscreenerror",It);document.addEventListener("MSFullscreenChange",It);document.addEventListener("MSFullscreenError",It)}}
801
+ function It(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)}xt.Fullscreen=Gt;Gt.install=Ht;yt(Ht);function Jt(){}function Kt(){var a=!0;if(yc()||uc("PlayStation 5")||zc()||uc("Web0S")||vc()||xc())a=!1;xc()&&uc("Android")&&(a=!0);a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Lt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Mt)}
802
+ function Mt(a){var b,c,d,e,f,g,h,k,l,m,p,n,q,v,y,x;return K(function(w){switch(w.g){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return w["return"](b);if("media-source"==a.type){if(!qc()||a.video&&(c=a.video.contentType,d=MediaSource.isTypeSupported(c),!d)||a.audio&&(e=a.audio.contentType,f=MediaSource.isTypeSupported(e),!f))return w["return"](b)}else if("file"==a.type){if(a.video&&(g=a.video.contentType,h=rc(g),!h)||a.audio&&(k=a.audio.contentType,
801
803
  l=rc(k),!l))return w["return"](b)}else return w["return"](b);if(!a.keySystemConfiguration)return b.supported=!0,w["return"](Promise.resolve(b));m=a.keySystemConfiguration;p=[];n=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},p.push(q));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},n.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
802
- p.length&&(y.audioCapabilities=p);n.length&&(y.videoCapabilities=n);B(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;va(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}yt.MediaCapabilities=Kt;Kt.install=Lt;var Mt=null;Kt.originalMcap=Mt;zt(Lt,-1);function Ot(){}function Pt(){var a=Ac();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Qt():a?12>=a?(Rt(),St()):Rt():(uc("Tizen 2")||uc("Tizen 3")||uc("Tizen 4"))&&Tt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Ut()}
803
- function Rt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function St(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Tt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=bd(b)[0]&&a(b)}}
804
- function Qt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
805
- function Ut(){var a=MediaSource.isTypeSupported;uc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}yt.MediaSource=Ot;Ot.install=Pt;zt(Pt);function Vt(){}function Wt(){screen.orientation||void 0!=window.orientation&&Xt()}function Xt(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Yt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}yt.Orientation=Vt;
806
- Vt.install=Wt;function Yt(){Qe.call(this);this.type="";this.angle=0}pa(Yt,Qe);
807
- Yt.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
808
- Yt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};zt(Wt);function Zt(){}function $t(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=au,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=bu,window.MediaKeys=cu,window.MediaKeySystemAccess=du,window.shakaMediaKeysPolyfill=!0)}function au(){return Promise.reject(Error("The key system specified is not supported."))}
809
- function bu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}yt.PatchedMediaKeysNop=Zt;Zt.install=$t;function cu(){throw new TypeError("Illegal constructor.");}cu.prototype.createSession=function(){};cu.prototype.setServerCertificate=function(){};function du(){this.keySystem="";throw new TypeError("Illegal constructor.");}du.prototype.getConfiguration=function(){};du.prototype.createMediaKeys=function(){};zt($t,-10);function eu(){}
810
- function fu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)gu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=hu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=iu;window.MediaKeys=ju;window.MediaKeySystemAccess=ku;window.shakaMediaKeysPolyfill=!0}}
811
- function lu(a){var b=gu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function hu(a,b){try{var c=new ku(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function iu(a){var b=this.mediaKeys;b&&b!=a&&mu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&mu(a,this);return Promise.resolve()}yt.PatchedMediaKeysWebkit=eu;eu.install=fu;
812
- function ku(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
804
+ p.length&&(y.audioCapabilities=p);n.length&&(y.videoCapabilities=n);B(w,3);return u(w,navigator.requestMediaKeySystemAccess(m.keySystem,[y]),5);case 5:x=w.h;va(w,4);break;case 3:F(w);case 4:x&&(b.supported=!0,b.keySystemAccess=x);case 2:return w["return"](b)}})}xt.MediaCapabilities=Jt;Jt.install=Kt;var Lt=null;Jt.originalMcap=Lt;yt(Kt,-1);function Nt(){}function Ot(){var a=Ac();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Pt():a?12>=a?(Qt(),Rt()):Qt():(uc("Tizen 2")||uc("Tizen 3")||uc("Tizen 4"))&&St());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Tt()}
805
+ function Qt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ha.apply(0,arguments));b.abort=function(){};return b}}function Rt(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function St(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=ad(b)[0]&&a(b)}}
806
+ function Pt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */);c.shift();return c.some(function(d){return d.startsWith("codecs=")})?cast.__platform__.canDisplayType(b):a(b)}}
807
+ function Tt(){var a=MediaSource.isTypeSupported;uc("Web0S")||(MediaSource.isTypeSupported=function(b){var c=b.split(/ *; */),d=c.findIndex(function(g){return g.startsWith("codecs=")});if(0>d)return a(b);var e=c[d].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),f=e.findIndex(function(g){return g.startsWith("vp09")});0<=f&&(e[f]="vp9",c[d]='codecs="'+e.join(",")+'"',b=c.join("; "));return a(b)})}xt.MediaSource=Nt;Nt.install=Ot;yt(Ot);function Ut(){}function Vt(){screen.orientation||void 0!=window.orientation&&Wt()}function Wt(){function a(){switch(window.orientation){case -90:b.type="landscape-secondary";b.angle=270;break;case 0:b.type="portrait-primary";b.angle=0;break;case 90:b.type="landscape-primary";b.angle=90;break;case 180:b.type="portrait-secondary",b.angle=180}}var b=new Xt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new S("change");b.dispatchEvent(c)})}xt.Orientation=Ut;
808
+ Ut.install=Vt;function Xt(){Pe.call(this);this.type="";this.angle=0}pa(Xt,Pe);
809
+ Xt.prototype.lock=function(a){function b(d){return screen.lockOrientation?screen.lockOrientation(d):screen.mozLockOrientation?screen.mozLockOrientation(d):screen.msLockOrientation?screen.msLockOrientation(d):!1}var c=!1;switch(a){case "natural":c=b("default");break;case "any":c=!0;this.unlock();break;default:c=b(a)}if(c)return Promise.resolve();a=Error("screen.orientation.lock() is not available on this device");a.name="NotSupportedError";a.code=DOMException.NOT_SUPPORTED_ERR;return Promise.reject(a)};
810
+ Xt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};yt(Vt);function Yt(){}function Zt(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=$t,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=au,window.MediaKeys=bu,window.MediaKeySystemAccess=cu,window.shakaMediaKeysPolyfill=!0)}function $t(){return Promise.reject(Error("The key system specified is not supported."))}
811
+ function au(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}xt.PatchedMediaKeysNop=Yt;Yt.install=Zt;function bu(){throw new TypeError("Illegal constructor.");}bu.prototype.createSession=function(){};bu.prototype.setServerCertificate=function(){};function cu(){this.keySystem="";throw new TypeError("Illegal constructor.");}cu.prototype.getConfiguration=function(){};cu.prototype.createMediaKeys=function(){};yt(Zt,-10);function du(){}
812
+ function eu(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)fu="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=gu;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=hu;window.MediaKeys=iu;window.MediaKeySystemAccess=ju;window.shakaMediaKeysPolyfill=!0}}
813
+ function ku(a){var b=fu;return b?b+a.charAt(0).toUpperCase()+a.slice(1):a}function gu(a,b){try{var c=new ju(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function hu(a){var b=this.mediaKeys;b&&b!=a&&lu(b,null);delete this.mediaKeys;(this.mediaKeys=a)&&lu(a,this);return Promise.resolve()}xt.PatchedMediaKeysWebkit=du;du.install=eu;
814
+ function ju(a,b){this.g=this.keySystem=a;var c=!1;"org.w3.clearkey"==a&&(this.g="webkit-org.w3.clearkey",c=!1);var d=!1;var e=document.getElementsByTagName("video");e=e.length?e[0]:document.createElement("video");for(var f=t(b),g=f.next();!g.done;g=f.next()){g=g.value;var h={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:g.initDataTypes,sessionTypes:["temporary"],label:g.label},k=!1;if(g.audioCapabilities)for(var l=t(g.audioCapabilities),
813
815
  m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType.split(";")[0],this.g)&&(h.audioCapabilities.push(m),d=!0));if(g.videoCapabilities)for(l=t(g.videoCapabilities),m=l.next();!m.done;m=l.next())m=m.value,m.contentType&&(k=!0,e.canPlayType(m.contentType,this.g)&&(h.videoCapabilities.push(m),d=!0));k||(d=e.canPlayType("video/mp4",this.g)||e.canPlayType("video/webm",this.g));"required"==g.persistentState&&(c?(h.persistentState="required",h.sessionTypes=["persistent-license"]):
814
- d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}ku.prototype.createMediaKeys=function(){var a=new ju(this.g);return Promise.resolve(a)};ku.prototype.getConfiguration=function(){return this.h};function ju(a){this.l=a;this.h=null;this.g=new hf;this.i=[];this.j=new Map}
815
- function mu(a,b){a.h=b;a.g.nc();var c=gu;b&&(a.g.B(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.B(b,c+"keymessage",function(d){var e=nu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.rd()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.B(b,c+"keyadded",function(d){if(d=nu(a,d.sessionId))ou(d,"usable"),
816
- d.g&&d.g.resolve(),d.g=null}),a.g.B(b,c+"keyerror",function(d){var e=nu(a,d.sessionId);e&&e.handleError(d)}))}ju.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new pu(b,this.l,a);this.i.push(a);return a};ju.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
817
- function nu(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function pu(a,b,c){Qe.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new nc;this.keyStatuses=new qu}pa(pu,Qe);r=pu.prototype;
818
- r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?ou(this,"output-restricted"):1==b?ou(this,"expired"):ou(this,"internal-error"))};
819
- function ru(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Fb(Jc("LOAD_SESSION|"+c));else{var e=Jc("PERSISTENT|");d=Sc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new nc;var f=lu("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
820
- function su(a,b,c){if(a.g)a.g.then(function(){return su(a,b,c)})["catch"](function(){return su(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Fc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Pc(e.keys[0].k);e=Pc(e.keys[0].kid)}else d=Fb(c),e=null;var f=lu("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
821
- function ou(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new S("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return ru(this,b,null)};r.load=function(a){return"persistent-license"==this.l?ru(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new nc;su(this,b,a);return b};
822
- r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=lu("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function qu(){this.size=0;this.g=void 0}r=qu.prototype;r.rd=function(){return this.g};
823
- r.forEach=function(a){this.g&&a(this.g,eg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=eg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var gu="";zt(fu);function tu(){}function uu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=vu,Object.defineProperty(a,"disablePictureInPicture",{get:wu,set:xu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=yu,document.addEventListener("webkitpresentationmodechanged",zu,!0))}}
824
- function zu(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
825
- function vu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function yu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
826
- function wu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function xu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}yt.PiPWebkit=tu;tu.install=uu;zt(uu);function Au(){}function Bu(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Cu))}function Cu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}yt.RandomUUID=Au;Au.install=Bu;zt(Bu);function Du(){}function Eu(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Fu)}function Fu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}yt.StorageEstimate=Du;Du.install=Eu;zt(Eu);function Gu(){}function Hu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Iu})}function Iu(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}yt.Symbol=Gu;Gu.install=Hu;zt(Hu);function Ju(){}function Ku(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}yt.VideoPlayPromise=Ju;Ju.install=Ku;zt(Ku);function Lu(){}function Mu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||wc())&&(a.getVideoPlaybackQuality=Nu)}}function Nu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}yt.VideoPlaybackQuality=Lu;Lu.install=Mu;zt(Mu);function Ou(){}function Pu(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Qu;else if(6==b)a=Ru;else{try{var c=!!Qu(1,2,"")}catch(d){c=!1}c&&(a=Qu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Qu(a,b,c){return new window.TextTrackCue(a,b,c)}function Ru(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}yt.VTTCue=Ou;Ou.install=Pu;zt(Pu);function Su(){}Su.prototype.parseInit=function(){};Su.prototype.setSequenceMode=function(){};Su.prototype.parseMedia=function(a,b){var c=null,d=[],e=Fc(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Tu.exec(f))){var g=Uu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ib(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",Su);Su.prototype.parseMedia=Su.prototype.parseMedia;
827
- Su.prototype.setSequenceMode=Su.prototype.setSequenceMode;Su.prototype.parseInit=Su.prototype.parseInit;var Tu=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Uu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;fd["application/x-subtitle-lrc"]=function(){return new Su};function Vu(){}Vu.prototype.parseInit=function(){};Vu.prototype.setSequenceMode=function(){};
828
- Vu.prototype.parseMedia=function(a,b){var c=Fc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(C){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=io(g,Wu,"frameRate"),k=io(g,Wu,"subFrameRate"),l=io(g,Wu,"frameRateMultiplier"),
829
- m=io(g,Wu,"tickRate"),p=io(g,Wu,"cellResolution");c=g.getAttribute("xml:space")||"default";e=io(g,Xu,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Yu(h,k,l,m);p=p?(p=/^(\d+) (\d+)$/.exec(p))?{columns:parseInt(p[1],10),rows:parseInt(p[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?go(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var n=t(g),q=n.next();!q.done;q=
830
- n.next()){var v=q.value;q=new kb;var y=v.getAttribute("xml:id");if(y){q.id=y;var x=null;e&&(x=Zu.exec(e)||$u.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,D;if(w=av(v,l,"extent"))w=(D=Zu.exec(w))||$u.exec(w),null!=w&&(q.width=Number(w[1]),q.height=Number(w[2]),D||(null!=y&&(q.width=100*q.width/y),null!=x&&(q.height=100*q.height/x)),q.widthUnits=D||null!=y?Ab:0,q.heightUnits=D||null!=x?Ab:0);if(v=av(v,l,"origin"))w=(D=Zu.exec(v))||$u.exec(v),null!=w&&(q.viewportAnchorX=Number(w[1]),q.viewportAnchorY=
831
- Number(w[2]),D||(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=y&&(q.viewportAnchorX=100*q.viewportAnchorX/y)),q.viewportAnchorUnits=D||null!=y?Ab:0)}else q=null;q&&m.push(q)}if(co(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(co(f,"div"));for(n=e.next();!n.done;n=e.next())if(co(n.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=bv(f,b.periodStart,h,k,l,g,m,c,p,null,!1))&&d.push(f)}return d};
832
- function bv(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var q=null,v=t(cv),y=v.next();!y.done&&!(q=dv(n,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||q)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(n.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
833
- a=[];if(!y)for(var x=t(n.childNodes),w=x.next();!w.done;w=x.next())(w=bv(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;x=/\S/.test(n.textContent);var D=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(D||x||"br"==n.tagName||0!=a.length||d&&!h))return null;w=ev(n,c);x=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=fv(p,c,x,w),x=w.start,w=w.end,p=p.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(x=Infinity,w=0,b=t(a),
834
- c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new ib(x,w,""),e.lineBreak=!0,e;b="";y&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new ib(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=dv(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var C=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==C})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&
835
- (g=dv(l,"region",f,"")[0]);gv(b,n,g,q,e,v,0==a.length);return b}
836
- function gv(a,b,c,d,e,f,g){f=f||g;"rtl"==hv(b,c,e,"direction",f)&&(a.direction="rtl");g=hv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=jb);(g=hv(b,c,e,"textAlign",!0))?(a.positionAlign=iv[g],a.lineAlign=jv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=mb;if(g=hv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=hv(b,c,e,"color",f))a.color=g;if(g=hv(b,c,e,"backgroundColor",
837
- f))a.backgroundColor=g;if(g=hv(b,c,e,"border",f))a.border=g;if(g=hv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=hv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=hv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=hv(b,c,e,"lineHeight",f))&&g.match(kv)&&(a.lineHeight=g);(g=hv(b,c,e,"fontSize",f))&&(g.match(kv)||g.match(lv))&&(a.fontSize=g);if(g=hv(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
838
- d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=hv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(kv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(kv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=hv(b,c,e,"letterSpacing",f))&&d.match(kv)&&(a.letterSpacing=d);(d=hv(b,c,e,"linePadding",f))&&d.match(kv)&&(a.linePadding=d);if(f=hv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=av(c,e,"textDecoration"))&&mv(a,c);(b=
839
- nv(b,e,"textDecoration"))&&mv(a,b)}
840
- function mv(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&eb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&eb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
841
- a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function hv(a,b,c,d,e){e=void 0===e?!0:e;return(a=nv(a,c,d))?a:e?av(b,c,d):null}function av(a,b,c){if(!a)return null;var d=io(a,Xu,c);return d?d:ov(a,b,c)}function nv(a,b,c){var d=io(a,Xu,c);return d?d:ov(a,b,c)}
842
- function ov(a,b,c){a=dv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=ho(a[e],"urn:ebu:tt:style",c);f||(f=io(a[e],Xu,c));f||(f=nv(a[e],b,c));f&&(d=f)}return d}
843
- function dv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?ho(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function fv(a,b,c,d){a=ev(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
844
- function ev(a,b){var c=pv(a.getAttribute("begin"),b),d=pv(a.getAttribute("end"),b),e=pv(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
845
- function pv(a,b){var c=null;if(qv.test(a)){c=qv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(rv.test(a))c=sv(rv,a);else if(tv.test(a))c=sv(tv,a);else if(uv.test(a))c=uv.exec(a),c=Number(c[1])/b.frameRate;else if(vv.test(a))c=vv.exec(a),c=Number(c[1])/b.g;else if(wv.test(a))c=sv(wv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
846
- function sv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",Vu);Vu.prototype.parseMedia=Vu.prototype.parseMedia;Vu.prototype.setSequenceMode=Vu.prototype.setSequenceMode;Vu.prototype.parseInit=Vu.prototype.parseInit;
847
- function Yu(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
848
- var Zu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,lv=/^(\d{1,2}(?:\.\d+)?|100)%$/,kv=/^(\d+px|\d+em|\d*\.?\d+c)$/,$u=/^(\d+)px (\d+)px$/,qv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,rv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,tv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,uv=/^(\d*(?:\.\d*)?)f$/,vv=/^(\d*(?:\.\d*)?)t$/,wv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),jv={left:pb,center:"center",right:"end",start:pb,
849
- end:"end"},iv={left:"line-left",center:"center",right:"line-right"},Wu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Xu=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],cv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];fd["application/ttml+xml"]=function(){return new Vu};function xv(){this.g=new Vu}xv.prototype.parseInit=function(a){var b=!1;(new og).box("moov",sg).box("trak",sg).box("mdia",sg).box("minf",sg).box("stbl",sg).T("stsd",ug).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};xv.prototype.setSequenceMode=function(){};xv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new og).box("mdat",vg(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};
850
- M("shaka.text.Mp4TtmlParser",xv);xv.prototype.parseMedia=xv.prototype.parseMedia;xv.prototype.setSequenceMode=xv.prototype.setSequenceMode;xv.prototype.parseInit=xv.prototype.parseInit;fd['application/mp4; codecs="stpp"']=function(){return new xv};fd['application/mp4; codecs="stpp.ttml"']=function(){return new xv};fd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new xv};fd['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new xv};function yv(){this.g=!1}yv.prototype.parseInit=function(){};yv.prototype.setSequenceMode=function(a){this.g=a};
851
- yv.prototype.parseMedia=function(a,b){var c=Fc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&this.g){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=zv(new vq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-
852
- c}}f=[];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new vq(g);var h=new kb;yq(g);wq(g);for(var k=yq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
853
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");wq(g);k=yq(g)}f.push(h)}e=new Map;Av(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new ib(0,0,"");for(var p=!1,n=0;n<k.length;n++){var q=
816
+ d=!1);if(d){this.h=h;return}}c="Unsupported keySystem";if("org.w3.clearkey"==a||"com.widevine.alpha"==a)c="None of the requested configurations were supported.";c=Error(c);c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}ju.prototype.createMediaKeys=function(){var a=new iu(this.g);return Promise.resolve(a)};ju.prototype.getConfiguration=function(){return this.h};function iu(a){this.l=a;this.h=null;this.g=new gf;this.i=[];this.j=new Map}
817
+ function lu(a,b){a.h=b;a.g.oc();var c=fu;b&&(a.g.B(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.B(b,c+"keymessage",function(d){var e=mu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.td()?"licenserequest":"licenserenewal").set("message",d.message),d=new S("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.B(b,c+"keyadded",function(d){if(d=mu(a,d.sessionId))nu(d,"usable"),
818
+ d.g&&d.g.resolve(),d.g=null}),a.g.B(b,c+"keyerror",function(d){var e=mu(a,d.sessionId);e&&e.handleError(d)}))}iu.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a&&"persistent-license"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");var b=this.h||document.createElement("video");b.src||(b.src="about:blank");a=new ou(b,this.l,a);this.i.push(a);return a};iu.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
819
+ function mu(a,b){var c=a.j.get(b);return c?c:(c=a.i.shift())?(c.sessionId=b,a.j.set(b,c),c):null}function ou(a,b,c){Pe.call(this);this.j=a;this.m=!1;this.g=this.h=null;this.i=b;this.l=c;this.sessionId="";this.expiration=NaN;this.closed=new nc;this.keyStatuses=new pu}pa(ou,Pe);r=ou.prototype;
820
+ r.handleError=function(a){var b=Error("EME v0.1b key error"),c=a.errorCode;c.systemCode=a.systemCode;b.errorCode=c;!a.sessionId&&this.h?(45==a.systemCode&&(b.message="Unsupported session type."),this.h.reject(b),this.h=null):a.sessionId&&this.g?(this.g.reject(b),this.g=null):(b=a.systemCode,a.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?nu(this,"output-restricted"):1==b?nu(this,"expired"):nu(this,"internal-error"))};
821
+ function qu(a,b,c){if(a.m)return Promise.reject(Error("The session is already initialized."));a.m=!0;try{if("persistent-license"==a.l)if(c)var d=Fb(Jc("LOAD_SESSION|"+c));else{var e=Jc("PERSISTENT|");d=Rc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new nc;var f=ku("generateKeyRequest");try{a.j[f](a.i,d)}catch(g){if("InvalidStateError"!=g.name)return a.h=null,Promise.reject(g);(new O(function(){try{a.j[f](a.i,d)}catch(h){a.h.reject(h),a.h=null}})).S(.01)}return a.h}
822
+ function ru(a,b,c){if(a.g)a.g.then(function(){return ru(a,b,c)})["catch"](function(){return ru(a,b,c)});else{a.g=b;if("webkit-org.w3.clearkey"==a.i){var d=Fc(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(a.g.reject(Error("Response is not a valid JSON Web Key Set.")),a.g=null);d=Oc(e.keys[0].k);e=Oc(e.keys[0].kid)}else d=Fb(c),e=null;var f=ku("addKey");try{a.j[f](a.i,d,e,a.sessionId)}catch(g){a.g.reject(g),a.g=null}}}
823
+ function nu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new S("keystatuseschange");a.dispatchEvent(c)}r.generateRequest=function(a,b){return qu(this,b,null)};r.load=function(a){return"persistent-license"==this.l?qu(this,null,a):Promise.reject(Error("Not a persistent session."))};r.update=function(a){var b=new nc;ru(this,b,a);return b};
824
+ r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var a=ku("cancelKeyRequest");try{this.j[a](this.i,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed};r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()};function pu(){this.size=0;this.g=void 0}r=pu.prototype;r.td=function(){return this.g};
825
+ r.forEach=function(a){this.g&&a(this.g,dg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=dg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var fu="";yt(eu);function su(){}function tu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=uu,Object.defineProperty(a,"disablePictureInPicture",{get:vu,set:wu,enumerable:!0,configurable:!0}),document.exitPictureInPicture=xu,document.addEventListener("webkitpresentationmodechanged",yu,!0))}}
826
+ function yu(a){a=a.target;if("picture-in-picture"==a.webkitPresentationMode){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement==a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)}
827
+ function uu(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function xu(){var a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}
828
+ function vu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function wu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}xt.PiPWebkit=su;su.install=tu;yt(tu);function zu(){}function Au(){window.crypto&&("randomUUID"in window.crypto||(window.crypto.randomUUID=Bu))}function Bu(){var a=URL.createObjectURL(new Blob),b=a.toString();URL.revokeObjectURL(a);return b.substr(b.lastIndexOf("/")+1)}xt.RandomUUID=zu;zu.install=Au;yt(Au);function Cu(){}function Du(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Eu)}function Eu(){return new Promise(function(a,b){navigator.webkitTemporaryStorage.queryUsageAndQuota(function(c,d){a({usage:c,quota:d})},b)})}xt.StorageEstimate=Cu;Cu.install=Du;yt(Du);function Fu(){}function Gu(){var a=Symbol.prototype;"description"in a||Object.defineProperty(a,"description",{get:Hu})}function Hu(){var a=/\((.*)\)/.exec(this.toString());return a?a[1]:void 0}xt.Symbol=Fu;Fu.install=Gu;yt(Gu);function Iu(){}function Ju(){if(window.HTMLMediaElement){var a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var b=a.apply(this);b&&b["catch"](function(){});return b}}}xt.VideoPlayPromise=Iu;Iu.install=Ju;yt(Ju);function Ku(){}function Lu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||wc())&&(a.getVideoPlaybackQuality=Mu)}}function Mu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}xt.VideoPlaybackQuality=Ku;Ku.install=Lu;yt(Lu);function Nu(){}function Ou(){if(!window.VTTCue&&window.TextTrackCue){var a=null,b=TextTrackCue.length;if(3==b)a=Pu;else if(6==b)a=Qu;else{try{var c=!!Pu(1,2,"")}catch(d){c=!1}c&&(a=Pu)}a&&(window.VTTCue=function(d,e,f){return a(d,e,f)})}}function Pu(a,b,c){return new window.TextTrackCue(a,b,c)}function Qu(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)}xt.VTTCue=Nu;Nu.install=Ou;yt(Ou);function Ru(){}Ru.prototype.parseInit=function(){};Ru.prototype.setSequenceMode=function(){};Ru.prototype.parseMedia=function(a,b){var c=null,d=[],e=Fc(a).split(/\r?\n/);e=t(e);for(var f=e.next();!f.done;f=e.next())if((f=f.value)&&!/^\s+$/.test(f)&&(f=Su.exec(f))){var g=Tu.exec(f[1]);g=60*parseInt(g[1],10)+parseFloat(g[2].replace(",","."));f=new ib(g,b.segmentEnd?b.segmentEnd:g+2,f[2]);c&&(c.endTime=g,d.push(c));c=f}c&&d.push(c);return d};M("shaka.text.LrcTextParser",Ru);Ru.prototype.parseMedia=Ru.prototype.parseMedia;
829
+ Ru.prototype.setSequenceMode=Ru.prototype.setSequenceMode;Ru.prototype.parseInit=Ru.prototype.parseInit;var Su=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Tu=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;ed["application/x-subtitle-lrc"]=function(){return new Ru};function Uu(){}Uu.prototype.parseInit=function(){};Uu.prototype.setSequenceMode=function(){};
830
+ Uu.prototype.parseMedia=function(a,b){var c=Fc(a),d=[],e=new DOMParser,f=null;if(""==c)return d;try{f=e.parseFromString(c,"text/xml")}catch(C){throw new N(2,2,2005,"Failed to parse TTML.");}if(f){if(c=f.getElementsByTagName("parsererror")[0])throw new N(2,2,2005,c.textContent);var g=f.getElementsByTagName("tt")[0];if(!g)throw new N(2,2,2005,"TTML does not contain <tt> tag.");f=g.getElementsByTagName("body")[0];if(!f)return[];var h=ho(g,Vu,"frameRate"),k=ho(g,Vu,"subFrameRate"),l=ho(g,Vu,"frameRateMultiplier"),
831
+ m=ho(g,Vu,"tickRate"),p=ho(g,Vu,"cellResolution");c=g.getAttribute("xml:space")||"default";e=ho(g,Wu,"extent");if("default"!=c&&"preserve"!=c)throw new N(2,2,2005,"Invalid xml:space value: "+c);c="default"==c;h=new Xu(h,k,l,m);p=p?(p=/^(\d+) (\d+)$/.exec(p))?{columns:parseInt(p[1],10),rows:parseInt(p[2],10)}:null:null;k=(k=g.getElementsByTagName("metadata")[0])?fo(k):[];l=Array.from(g.getElementsByTagName("style"));g=Array.from(g.getElementsByTagName("region"));m=[];for(var n=t(g),q=n.next();!q.done;q=
832
+ n.next()){var v=q.value;q=new kb;var y=v.getAttribute("xml:id");if(y){q.id=y;var x=null;e&&(x=Yu.exec(e)||Zu.exec(e));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,D;if(w=$u(v,l,"extent"))w=(D=Yu.exec(w))||Zu.exec(w),null!=w&&(q.width=Number(w[1]),q.height=Number(w[2]),D||(null!=y&&(q.width=100*q.width/y),null!=x&&(q.height=100*q.height/x)),q.widthUnits=D||null!=y?Ab:0,q.heightUnits=D||null!=x?Ab:0);if(v=$u(v,l,"origin"))w=(D=Yu.exec(v))||Zu.exec(v),null!=w&&(q.viewportAnchorX=Number(w[1]),q.viewportAnchorY=
833
+ Number(w[2]),D||(null!=x&&(q.viewportAnchorY=100*q.viewportAnchorY/x),null!=y&&(q.viewportAnchorX=100*q.viewportAnchorX/y)),q.viewportAnchorUnits=D||null!=y?Ab:0)}else q=null;q&&m.push(q)}if(bo(f,"p").length)throw new N(2,2,2001,"<p> can only be inside <div> in TTML");e=t(bo(f,"div"));for(n=e.next();!n.done;n=e.next())if(bo(n.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");(f=av(f,b.periodStart,h,k,l,g,m,c,p,null,!1))&&d.push(f)}return d};
834
+ function av(a,b,c,d,e,f,g,h,k,l,m){var p=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var n=document.createElement("span");n.textContent=a.textContent}else n=a;for(var q=null,v=t(bv),y=v.next();!y.done&&!(q=cv(n,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||q)m=!0;h="default"==(n.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(n.childNodes).every(function(A){return A.nodeType==Node.TEXT_NODE});
835
+ a=[];if(!y)for(var x=t(n.childNodes),w=x.next();!w.done;w=x.next())(w=av(w.value,b,c,d,e,f,g,h,k,n,m))&&a.push(w);d=null!=l;x=/\S/.test(n.textContent);var D=n.hasAttribute("begin")||n.hasAttribute("end")||n.hasAttribute("dur");if(!(D||x||"br"==n.tagName||0!=a.length||d&&!h))return null;w=dv(n,c);x=w.start;for(w=w.end;p&&p.nodeType==Node.ELEMENT_NODE&&"tt"!=p.tagName;)w=ev(p,c,x,w),x=w.start,w=w.end,p=p.parentNode;null==x&&(x=0);x+=b;w=null==w?Infinity:w+b;if(!D&&0<a.length)for(x=Infinity,w=0,b=t(a),
836
+ c=b.next();!c.done;c=b.next())c=c.value,x=Math.min(x,c.startTime),w=Math.max(w,c.endTime);if("br"==n.tagName)return e=new ib(x,w,""),e.lineBreak=!0,e;b="";y&&(b=n.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new ib(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=cv(n,"region",f,"")[0];if(n.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var C=k.getAttribute("xml:id");b.region=g.filter(function(A){return A.id==C})[0]}g=k;l&&d&&!n.getAttribute("region")&&!n.getAttribute("style")&&
837
+ (g=cv(l,"region",f,"")[0]);fv(b,n,g,q,e,v,0==a.length);return b}
838
+ function fv(a,b,c,d,e,f,g){f=f||g;"rtl"==gv(b,c,e,"direction",f)&&(a.direction="rtl");g=gv(b,c,e,"writingMode",f);"tb"==g||"tblr"==g?a.writingMode="vertical-lr":"tbrl"==g?a.writingMode="vertical-rl":"rltb"==g||"rl"==g?a.direction="rtl":g&&(a.direction=jb);(g=gv(b,c,e,"textAlign",!0))?(a.positionAlign=hv[g],a.lineAlign=iv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=mb;if(g=gv(b,c,e,"displayAlign",!0))a.displayAlign=vb[g.toUpperCase()];if(g=gv(b,c,e,"color",f))a.color=g;if(g=gv(b,c,e,"backgroundColor",
839
+ f))a.backgroundColor=g;if(g=gv(b,c,e,"border",f))a.border=g;if(g=gv(b,c,e,"fontFamily",f))a.fontFamily=g;(g=gv(b,c,e,"fontWeight",f))&&"bold"==g&&(a.fontWeight=700);g=gv(b,c,e,"wrapOption",f);a.wrapLine=g&&"noWrap"==g?!1:!0;(g=gv(b,c,e,"lineHeight",f))&&g.match(jv)&&(a.lineHeight=g);(g=gv(b,c,e,"fontSize",f))&&(g.match(jv)||g.match(kv))&&(a.fontSize=g);if(g=gv(b,c,e,"fontStyle",f))a.fontStyle=zb[g.toUpperCase()];if(d){g=d.getAttribute("imageType")||d.getAttribute("imagetype");var h=d.getAttribute("encoding");
840
+ d=d.textContent.trim();"PNG"==g&&"Base64"==h&&d&&(a.backgroundImage="data:image/png;base64,"+d)}if(d=gv(b,c,e,"textOutline",f))d=d.split(" "),d[0].match(jv)?a.textStrokeColor=a.color:(a.textStrokeColor=d[0],d.shift()),d[0]&&d[0].match(jv)?a.textStrokeWidth=d[0]:a.textStrokeColor="";(d=gv(b,c,e,"letterSpacing",f))&&d.match(jv)&&(a.letterSpacing=d);(d=gv(b,c,e,"linePadding",f))&&d.match(jv)&&(a.linePadding=d);if(f=gv(b,c,e,"opacity",f))a.opacity=parseFloat(f);(c=$u(c,e,"textDecoration"))&&lv(a,c);(b=
841
+ mv(b,e,"textDecoration"))&&lv(a,b)}
842
+ function lv(a,b){for(var c=t(b.split(" ")),d=c.next();!d.done;d=c.next())switch(d.value){case "underline":a.textDecoration.includes("underline")||a.textDecoration.push("underline");break;case "noUnderline":a.textDecoration.includes("underline")&&eb(a.textDecoration,"underline");break;case "lineThrough":a.textDecoration.includes("lineThrough")||a.textDecoration.push("lineThrough");break;case "noLineThrough":a.textDecoration.includes("lineThrough")&&eb(a.textDecoration,"lineThrough");break;case "overline":a.textDecoration.includes("overline")||
843
+ a.textDecoration.push("overline");break;case "noOverline":a.textDecoration.includes("overline")&&eb(a.textDecoration,"overline")}}function gv(a,b,c,d,e){e=void 0===e?!0:e;return(a=mv(a,c,d))?a:e?$u(b,c,d):null}function $u(a,b,c){if(!a)return null;var d=ho(a,Wu,c);return d?d:nv(a,b,c)}function mv(a,b,c){var d=ho(a,Wu,c);return d?d:nv(a,b,c)}
844
+ function nv(a,b,c){a=cv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=go(a[e],"urn:ebu:tt:style",c);f||(f=ho(a[e],Wu,c));f||(f=mv(a[e],b,c));f&&(d=f)}return d}
845
+ function cv(a,b,c,d,e){var f=[];if(!a||1>c.length)return f;var g=a;for(a=null;g&&!(a=e?go(g,e,b):g.getAttribute(b))&&(g=g.parentNode,g instanceof Element););if(b=a)for(b=t(b.split(" ")),e=b.next();!e.done;e=b.next())for(e=e.value,a=t(c),g=a.next();!g.done;g=a.next())if(g=g.value,d+g.getAttribute("xml:id")==e){f.push(g);break}return f}function ev(a,b,c,d){a=dv(a,b);null==c?c=a.start:null!=a.start&&(c+=a.start);null==d?d=a.end:null!=a.start&&(d+=a.start);return{start:c,end:d}}
846
+ function dv(a,b){var c=ov(a.getAttribute("begin"),b),d=ov(a.getAttribute("end"),b),e=ov(a.getAttribute("dur"),b);null==d&&null!=e&&(d=c+e);return{start:c,end:d}}
847
+ function ov(a,b){var c=null;if(pv.test(a)){c=pv.exec(a);var d=Number(c[1]),e=Number(c[2]),f=Number(c[3]),g=Number(c[4]);g+=(Number(c[5])||0)/b.h;f+=g/b.frameRate;c=f+60*e+3600*d}else if(qv.test(a))c=rv(qv,a);else if(sv.test(a))c=rv(sv,a);else if(tv.test(a))c=tv.exec(a),c=Number(c[1])/b.frameRate;else if(uv.test(a))c=uv.exec(a),c=Number(c[1])/b.g;else if(vv.test(a))c=rv(vv,a);else if(a)throw new N(2,2,2001,"Could not parse cue time range in TTML");return c}
848
+ function rv(a,b){var c=a.exec(b);return null==c||""==c[0]?null:(Number(c[4])||0)/1E3+(Number(c[3])||0)+60*(Number(c[2])||0)+3600*(Number(c[1])||0)}M("shaka.text.TtmlTextParser",Uu);Uu.prototype.parseMedia=Uu.prototype.parseMedia;Uu.prototype.setSequenceMode=Uu.prototype.setSequenceMode;Uu.prototype.parseInit=Uu.prototype.parseInit;
849
+ function Xu(a,b,c,d){this.frameRate=Number(a)||30;this.h=Number(b)||1;this.g=Number(d);0==this.g&&(this.g=a?this.frameRate*this.h:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))}
850
+ var Yu=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,kv=/^(\d{1,2}(?:\.\d+)?|100)%$/,jv=/^(\d+px|\d+em|\d*\.?\d+c)$/,Zu=/^(\d+)px (\d+)px$/,pv=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,qv=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,sv=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,tv=/^(\d*(?:\.\d*)?)f$/,uv=/^(\d*(?:\.\d*)?)t$/,vv=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),iv={left:pb,center:"center",right:"end",start:pb,
851
+ end:"end"},hv={left:"line-left",center:"center",right:"line-right"},Vu=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Wu=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],bv=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];ed["application/ttml+xml"]=function(){return new Uu};function wv(){this.g=new Uu}wv.prototype.parseInit=function(a){var b=!1;(new ng).box("moov",rg).box("trak",rg).box("mdia",rg).box("minf",rg).box("stbl",rg).T("stsd",tg).box("stpp",function(c){b=!0;c.parser.stop()}).parse(a);if(!b)throw new N(2,2,2007);};wv.prototype.setSequenceMode=function(){};wv.prototype.parseMedia=function(a,b){var c=this,d=!1,e=[];(new ng).box("mdat",ug(function(f){d=!0;e=e.concat(c.g.parseMedia(f,b))})).parse(a,!1);if(!d)throw new N(2,2,2007);return e};
852
+ M("shaka.text.Mp4TtmlParser",wv);wv.prototype.parseMedia=wv.prototype.parseMedia;wv.prototype.setSequenceMode=wv.prototype.setSequenceMode;wv.prototype.parseInit=wv.prototype.parseInit;ed['application/mp4; codecs="stpp"']=function(){return new wv};ed['application/mp4; codecs="stpp.ttml"']=function(){return new wv};ed['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new wv};ed['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new wv};function xv(){this.g=!1}xv.prototype.parseInit=function(){};xv.prototype.setSequenceMode=function(a){this.g=a};
853
+ xv.prototype.parseMedia=function(a,b){var c=Fc(a);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=c.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new N(2,2,2E3);c=b.vttOffset;if(d[0].includes("X-TIMESTAMP-MAP")&&this.g){var e=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),f=d[0].match(/MPEGTS:(\d+)/m);if(e&&f){c=yv(new uq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+f/9E4-
854
+ c}}f=[];e=t(d[0].split("\n"));for(var g=e.next();!g.done;g=e.next())if(g=g.value,/^Region:/.test(g)){g=new uq(g);var h=new kb;xq(g);vq(g);for(var k=xq(g);k;){var l=h,m=k;(k=/^id=(.*)$/.exec(m))?l.id=k[1]:(k=/^width=(\d{1,2}|100)%$/.exec(m))?l.width=Number(k[1]):(k=/^lines=(\d+)$/.exec(m))?(l.height=Number(k[1]),l.heightUnits=2):(k=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?(l.regionAnchorX=Number(k[1]),l.regionAnchorY=Number(k[2])):(k=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(m))?
855
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");vq(g);k=xq(g)}f.push(h)}e=new Map;zv(e);g=[];d=t(d.slice(1));for(h=d.next();!h.done;h=d.next()){h=h.value.split("\n");if((1!=h.length||h[0])&&!/^NOTE($|[ \t])/.test(h[0])&&"STYLE"==h[0]&&h[1].includes("::cue")){l="global";(k=h[1].match(/\((.*)\)/))&&(l=k.pop());k=h.slice(2,-1);h[1].includes("}")&&(m=/\{(.*?)\}/.exec(h[1]))&&(k=m[1].split(";"));m=new ib(0,0,"");for(var p=!1,n=0;n<k.length;n++){var q=
854
856
  /^\s*([^:]+):\s*(.*)/.exec(k[n]);if(q){var v=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":p=!0;m.backgroundColor=v;break;case "color":p=!0;m.color=v;break;case "font-family":p=!0;m.fontFamily=v;break;case "font-size":p=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(p=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":p=!0;m.fontStyle=sb;break;case "italic":p=!0;m.fontStyle="italic";break;case "oblique":p=!0,m.fontStyle="oblique"}break;case "opacity":p=
855
- !0;m.opacity=parseFloat(v);break;case "white-space":p=!0,m.wrapLine="noWrap"!=v}}}p&&e.set(l,m)}n=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new vq(h[0]);m=zv(k);q=xq(k,/[ \t]+--\x3e[ \t]+/g);p=zv(k);if(null==m||null==q||null==p)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=n;p+=n;n=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=p,h.payload=
856
- ""):h=new ib(m,p,"");Bv(n,h,e);wq(k);for(m=yq(k);m;)Cv(h,m,f),wq(k),m=yq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function Av(a){for(var b=t(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new ib(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new ib(0,0,""),e.backgroundColor=d,a.set(c,e)}
857
- function Bv(a,b,c){0===c.size&&Av(c);a=Dv(a);var d=uo("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())Ev(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
858
- function Dv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function Fv(a,b){return a&&0<a.length?a:b}
859
- function Ev(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Fv(h.backgroundColor,e.backgroundColor),e.color=Fv(h.color,e.color),e.fontFamily=Fv(h.fontFamily,e.fontFamily),e.fontSize=Fv(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
860
- "italic";break;case "u":e.textDecoration.push("underline")}}if(ko(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Ev(a.value,e,c,d)}
861
- function Cv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
862
- b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Gv(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ob,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function Gv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
863
- function zv(a){a=xq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",yv);yv.prototype.parseMedia=yv.prototype.parseMedia;yv.prototype.setSequenceMode=yv.prototype.setSequenceMode;yv.prototype.parseInit=yv.prototype.parseInit;fd["text/vtt"]=function(){return new yv};fd['text/vtt; codecs="vtt"']=function(){return new yv};
864
- fd['text/vtt; codecs="wvtt"']=function(){return new yv};function Hv(){this.g=null}Hv.prototype.parseInit=function(a){var b=this,c=!1;(new og).box("moov",sg).box("trak",sg).box("mdia",sg).T("mdhd",function(d){d=Fh(d.reader,d.version);b.g=d.timescale}).box("minf",sg).box("stbl",sg).T("stsd",ug).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};Hv.prototype.setSequenceMode=function(){};
865
- Hv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new og).box("moof",sg).box("traf",sg).T("tfdt",function(A){g=!0;c=Eh(A.reader,A.version).ee}).T("tfhd",function(A){l=Dh(A.reader,A.flags).ke}).T("trun",function(A){h=!0;d=Gh(A.reader,A.version,A.flags).Ae}).box("mdat",vg(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,p=new lg(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=q.value;var v=q.Rd||l,y=q.Wc?
866
- c+q.Wc:m;m=y+(v||0);var x=0;do{var w=p.N();x+=w;var D=p.N(),C=null;"vttc"==wg(D)?8<w&&(C=p.Za(w-8)):p.skip(w-8);v&&C&&(w=Iv(C,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(cc)};function Iv(a,b,c){var d,e,f;(new og).box("payl",vg(function(g){d=Fc(g)})).box("iden",vg(function(g){e=Fc(g)})).box("sttg",vg(function(g){f=Fc(g)})).parse(a);return d?Jv(d,e,f,b,c):null}
867
- function Jv(a,b,c,d,e){d=new ib(d,e,"");Bv(a,d,new Map);b&&(d.id=b);if(c)for(a=new vq(c),b=yq(a);b;)Cv(d,b,[]),wq(a),b=yq(a);return d}M("shaka.text.Mp4VttParser",Hv);Hv.prototype.parseMedia=Hv.prototype.parseMedia;Hv.prototype.setSequenceMode=Hv.prototype.setSequenceMode;Hv.prototype.parseInit=Hv.prototype.parseInit;fd['application/mp4; codecs="wvtt"']=function(){return new Hv};function Kv(){}Kv.prototype.parseInit=function(){};Kv.prototype.setSequenceMode=function(){};Kv.prototype.parseMedia=function(a){var b=Fc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new vq(c[0]),e=Lv(d),f=xq(d,/,/g);d=Lv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ib(e,d,c.slice(1).join("\n").trim()))}return a};
868
- function Lv(a){a=xq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",Kv);Kv.prototype.parseMedia=Kv.prototype.parseMedia;Kv.prototype.setSequenceMode=Kv.prototype.setSequenceMode;Kv.prototype.parseInit=Kv.prototype.parseInit;fd["text/x-subviewer"]=function(){return new Kv};function Mv(){this.g=new yv}Mv.prototype.parseInit=function(){};Mv.prototype.setSequenceMode=function(){};Mv.prototype.parseMedia=function(a,b){var c=Fc(a);c=Nv(c);c=Fb(Jc(c));return this.g.parseMedia(c,b)};function Nv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",Mv);
869
- Mv.srt2webvtt=Nv;Mv.prototype.parseMedia=Mv.prototype.parseMedia;Mv.prototype.setSequenceMode=Mv.prototype.setSequenceMode;Mv.prototype.parseInit=Mv.prototype.parseInit;fd["text/srt"]=function(){return new Mv};function Ov(){}Ov.prototype.parseInit=function(){};Ov.prototype.setSequenceMode=function(){};
870
- Ov.prototype.parseMedia=function(a){var b="",c="";a=Fc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Pv.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Qv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Rv);else if("Style"==e){e=f.split(Rv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
871
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={nd:e.nd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Qv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Rv);else if("Dialogue"==f){g=g.split(Rv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Sv(f.Start);var k=Sv(f.End);g=new ib(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.nd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.nd}}(e)))&&Tv(g,f);d.push(g)}return d};
872
- function Tv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Uv(c))a.color=c;if(c=b.BackColour)if(c=Uv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=qb;a.textAlign="start";break;case 2:a.displayAlign=qb;a.textAlign=mb;break;case 3:a.displayAlign=qb;a.textAlign="end";
857
+ !0;m.opacity=parseFloat(v);break;case "white-space":p=!0,m.wrapLine="noWrap"!=v}}}p&&e.set(l,m)}n=c;if(1==h.length&&!h[0]||/^NOTE($|[ \t])/.test(h[0])||"STYLE"==h[0])h=null;else{l=null;h[0].includes("--\x3e")||(l=h[0],h.splice(0,1));k=new uq(h[0]);m=yv(k);q=wq(k,/[ \t]+--\x3e[ \t]+/g);p=yv(k);if(null==m||null==q||null==p)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=n;p+=n;n=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),h.startTime=m,h.endTime=p,h.payload=
858
+ ""):h=new ib(m,p,"");Av(n,h,e);vq(k);for(m=xq(k);m;)Bv(h,m,f),vq(k),m=xq(k);null!=l&&(h.id=l)}h&&g.push(h)}return g};function zv(a){for(var b=t(Object.entries(xb)),c=b.next();!c.done;c=b.next()){var d=t(c.value);c=d.next().value;d=d.next().value;var e=new ib(0,0,"");e.color=d;a.set(c,e)}b=t(Object.entries(yb));for(c=b.next();!c.done;c=b.next())d=t(c.value),c=d.next().value,d=d.next().value,e=new ib(0,0,""),e.backgroundColor=d,a.set(c,e)}
859
+ function Av(a,b,c){0===c.size&&zv(c);a=Cv(a);var d=to("<span>"+a+"</span>","span");if(d){var e=[];d=d.childNodes;if(1==d.length){var f=d[0];if(f.nodeType==Node.TEXT_NODE||f.nodeType==Node.CDATA_SECTION_NODE){b.payload=a;return}}a=t(d);for(d=a.next();!d.done;d=a.next())Dv(d.value,b,e,c);b.nestedCues=e}else b.payload=a}
860
+ function Cv(a){for(var b=[],c=-1,d="",e=0;e<a.length;e++)if("/"===a[e]){var f=a.indexOf(">",e);if(f<=e)return a;f=a.substring(e+1,f);var g=b.pop();if(f&&g){if(g===f)d+="/"+f+">";else{if(!g.startsWith("c.")||"c"!==f)return a;d+="/"+g+">"}e+=f.length+1}else return a}else"<"===a[e]?c=e+1:">"===a[e]&&0<c&&(b.push(a.substr(c,e-c)),c=-1),d+=a[e];return d}function Ev(a,b){return a&&0<a.length?a:b}
861
+ function Dv(a,b,c,d){var e=b.clone();if(a.nodeType===Node.ELEMENT_NODE&&a.nodeName)for(var f=t(a.nodeName.split(/[ .]+/)),g=f.next();!g.done;g=f.next()){g=g.value;if(d.has(g)){var h=d.get(g);h&&(e.backgroundColor=Ev(h.backgroundColor,e.backgroundColor),e.color=Ev(h.color,e.color),e.fontFamily=Ev(h.fontFamily,e.fontFamily),e.fontSize=Ev(h.fontSize,e.fontSize),e.fontWeight=h.fontWeight,e.fontStyle=h.fontStyle,e.opacity=h.opacity,e.wrapLine=h.wrapLine)}switch(g){case "b":e.fontWeight=700;break;case "i":e.fontStyle=
862
+ "italic";break;case "u":e.textDecoration.push("underline")}}if(jo(a))for(f=!0,d=t(a.textContent.split("\n")),a=d.next();!a.done;a=d.next())a=a.value,f||(f=b.clone(),f.lineBreak=!0,c.push(f)),0<a.length&&(f=e.clone(),f.payload=a,c.push(f)),f=!1;else for(b=t(a.childNodes),a=b.next();!a.done;a=b.next())Dv(a.value,e,c,d)}
863
+ function Bv(a,b,c){var d;if(d=/^align:(start|middle|center|end|left|right)$/.exec(b))b=d[1],"middle"==b?a.textAlign=mb:a.textAlign=ub[b.toUpperCase()];else if(d=/^vertical:(lr|rl)$/.exec(b))a.writingMode="lr"==d[1]?"vertical-lr":"vertical-rl";else if(d=/^size:([\d.]+)%$/.exec(b))a.size=Number(d[1]);else if(d=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(b))a.position=Number(d[1]),d[2]&&(b=d[2],a.positionAlign="line-left"==b||"start"==b?"line-left":"line-right"==b||"end"==
864
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Fv(c,d[1]))a.region=b}else if(c=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=1,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()]);else if(c=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(b))a.lineInterpretation=ob,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function Fv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
865
+ function yv(a){a=wq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.VttTextParser",xv);xv.prototype.parseMedia=xv.prototype.parseMedia;xv.prototype.setSequenceMode=xv.prototype.setSequenceMode;xv.prototype.parseInit=xv.prototype.parseInit;ed["text/vtt"]=function(){return new xv};ed['text/vtt; codecs="vtt"']=function(){return new xv};
866
+ ed['text/vtt; codecs="wvtt"']=function(){return new xv};function Gv(){this.g=null}Gv.prototype.parseInit=function(a){var b=this,c=!1;(new ng).box("moov",rg).box("trak",rg).box("mdia",rg).T("mdhd",function(d){d=Eh(d.reader,d.version);b.g=d.timescale}).box("minf",rg).box("stbl",rg).T("stsd",tg).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};Gv.prototype.setSequenceMode=function(){};
867
+ Gv.prototype.parseMedia=function(a,b){if(!this.g)throw new N(2,2,2008);var c=0,d=[],e,f=[],g=!1,h=!1,k=!1,l=null;(new ng).box("moof",rg).box("traf",rg).T("tfdt",function(A){g=!0;c=Dh(A.reader,A.version).ge}).T("tfhd",function(A){l=Ch(A.reader,A.flags).le}).T("trun",function(A){h=!0;d=Fh(A.reader,A.version,A.flags).Be}).box("mdat",ug(function(A){k=!0;e=A})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,p=new kg(e,0),n=t(d),q=n.next();!q.done;q=n.next()){q=q.value;var v=q.Td||l,y=q.Xc?
868
+ c+q.Xc:m;m=y+(v||0);var x=0;do{var w=p.N();x+=w;var D=p.N(),C=null;"vttc"==vg(D)?8<w&&(C=p.Za(w-8)):p.skip(w-8);v&&C&&(w=Hv(C,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(cc)};function Hv(a,b,c){var d,e,f;(new ng).box("payl",ug(function(g){d=Fc(g)})).box("iden",ug(function(g){e=Fc(g)})).box("sttg",ug(function(g){f=Fc(g)})).parse(a);return d?Iv(d,e,f,b,c):null}
869
+ function Iv(a,b,c,d,e){d=new ib(d,e,"");Av(a,d,new Map);b&&(d.id=b);if(c)for(a=new uq(c),b=xq(a);b;)Bv(d,b,[]),vq(a),b=xq(a);return d}M("shaka.text.Mp4VttParser",Gv);Gv.prototype.parseMedia=Gv.prototype.parseMedia;Gv.prototype.setSequenceMode=Gv.prototype.setSequenceMode;Gv.prototype.parseInit=Gv.prototype.parseInit;ed['application/mp4; codecs="wvtt"']=function(){return new Gv};function Jv(){}Jv.prototype.parseInit=function(){};Jv.prototype.setSequenceMode=function(){};Jv.prototype.parseMedia=function(a){var b=Fc(a).replace(/\r+/g,"");b=b.trim();a=[];if(""==b)return a;b=t(b.split("\n\n"));for(var c=b.next();!c.done;c=b.next()){c=c.value.split("\n");var d=new uq(c[0]),e=Kv(d),f=wq(d,/,/g);d=Kv(d);if(null==e||null==f||null==d)throw new N(2,2,2001,"Could not parse cue time range in SubViewer");a.push(new ib(e,d,c.slice(1).join("\n").trim()))}return a};
870
+ function Kv(a){a=wq(a,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g);if(null==a)return null;var b=Number(a[2]),c=Number(a[3]);return 59<b||59<c?null:Number(a[4])/1E3+c+60*b+3600*(Number(a[1])||0)}M("shaka.text.SbvTextParser",Jv);Jv.prototype.parseMedia=Jv.prototype.parseMedia;Jv.prototype.setSequenceMode=Jv.prototype.setSequenceMode;Jv.prototype.parseInit=Jv.prototype.parseInit;ed["text/x-subviewer"]=function(){return new Jv};function Lv(){this.g=new xv}Lv.prototype.parseInit=function(){};Lv.prototype.setSequenceMode=function(){};Lv.prototype.parseMedia=function(a,b){var c=Fc(a);c=Mv(c);c=Fb(Jc(c));return this.g.parseMedia(c,b)};function Mv(a){var b="WEBVTT\n\n";if(""==a)return b;a=a.replace(/\r+/g,"");a=a.trim();a=t(a.split("\n\n"));for(var c=a.next();!c.done;c=a.next())c=c.value.split(/\n/),c[0].match(/\d+/)&&c.shift(),c[0]=c[0].replace(/,/g,"."),b+=c.join("\n")+"\n\n";return b}M("shaka.text.SrtTextParser",Lv);
871
+ Lv.srt2webvtt=Mv;Lv.prototype.parseMedia=Lv.prototype.parseMedia;Lv.prototype.setSequenceMode=Lv.prototype.setSequenceMode;Lv.prototype.parseInit=Lv.prototype.parseInit;ed["text/srt"]=function(){return new Lv};function Nv(){}Nv.prototype.parseInit=function(){};Nv.prototype.setSequenceMode=function(){};
872
+ Nv.prototype.parseMedia=function(a){var b="",c="";a=Fc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Ov.exec(d.value);e&&(d=e[1],e=e[2],"V4 Styles"==d||"V4+ Styles"==d?b=e:"Events"==d&&(c=e))}a=[];d=null;b=t(b.split(/\r?\n/));for(var f=b.next();!f.done;f=b.next())if(e=f.value,!/^\s*;/.test(e)&&(f=Pv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Qv);else if("Style"==e){e=f.split(Qv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
873
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={od:e.od},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Pv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Qv);else if("Dialogue"==f){g=g.split(Qv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Rv(f.Start);var k=Rv(f.End);g=new ib(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.od=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.od}}(e)))&&Sv(g,f);d.push(g)}return d};
874
+ function Sv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Tv(c))a.color=c;if(c=b.BackColour)if(c=Tv(c))a.backgroundColor=c;b.Bold&&(a.fontWeight=700);b.Italic&&(a.fontStyle="italic");b.Underline&&a.textDecoration.push("underline");if(c=b.Spacing)a.letterSpacing=c+"px";if(c=b.Alignment)switch(parseInt(c,10)){case 1:a.displayAlign=qb;a.textAlign="start";break;case 2:a.displayAlign=qb;a.textAlign=mb;break;case 3:a.displayAlign=qb;a.textAlign="end";
873
875
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=mb;break;case 7:a.displayAlign="before";a.textAlign="end";break;case 9:a.displayAlign="center";a.textAlign="start";break;case 10:a.displayAlign="center";a.textAlign=mb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
874
- function Uv(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Sv(a){a=Vv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Ov);Ov.prototype.parseMedia=Ov.prototype.parseMedia;Ov.prototype.setSequenceMode=Ov.prototype.setSequenceMode;Ov.prototype.parseInit=Ov.prototype.parseInit;
875
- var Pv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Qv=/^\s*([^:]+):\s*(.*)/,Rv=/\s*,\s*/,Vv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;fd["text/x-ssa"]=function(){return new Ov};function Wv(){}M("shaka.util.FairPlayUtils",Wv);Wv.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Fc(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Gb(Pc(c)))}};
876
- Wv.spcFairPlayRequest=function(a,b){if(2===a){var c=Fb(b.body);c=Oc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Jc("spc="+c)}};Wv.initDataTransform=function(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Kc(b,!0):e=b;a=Ic(a);a=Kc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f};
877
- Wv.defaultGetContentId=function(a){a=Ic(a);return(new Nb(a)).Fa};Wv.isFairPlaySupported=function(){var a;return K(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},B(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);F(b);return b["return"](!1)})};/*
876
+ function Tv(a){a=parseInt(a.replace("&H",""),16);return 0<=a?"rgba("+(a&255)+","+(a>>8&255)+","+(a>>16&255)+","+(a>>24&255^255)/255+")":null}function Rv(a){a=Uv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Nv);Nv.prototype.parseMedia=Nv.prototype.parseMedia;Nv.prototype.setSequenceMode=Nv.prototype.setSequenceMode;Nv.prototype.parseInit=Nv.prototype.parseInit;
877
+ var Ov=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Pv=/^\s*([^:]+):\s*(.*)/,Qv=/\s*,\s*/,Uv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ed["text/x-ssa"]=function(){return new Nv};function Vv(){}M("shaka.util.FairPlayUtils",Vv);Vv.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Fc(b.data)}catch(f){return}var d=!1;c=c.trim();"<ckc>"===c.substr(0,5)&&"</ckc>"===c.substr(-6)&&(c=c.slice(5,-6),d=!0);try{var e=JSON.parse(c);e.ckc&&(c=e.ckc,d=!0);e.CkcMessage&&(c=e.CkcMessage,d=!0);e.License&&(c=e.License,d=!0)}catch(f){}d&&(b.data=Gb(Oc(c)))}};
878
+ Vv.spcFairPlayRequest=function(a,b){if(2===a){var c=Fb(b.body);c=Nc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Jc("spc="+c)}};Vv.initDataTransform=function(a,b,c){function d(h){Ib(f).setUint32(g,h.byteLength,!0);g+=4;f.set(Fb(h),g);g+=h.byteLength}if(!c||!c.byteLength)throw new N(2,6,6015);var e;"string"==typeof b?e=Kc(b,!0):e=b;a=Ic(a);a=Kc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f};
879
+ Vv.defaultGetContentId=function(a){a=Ic(a);return(new Nb(a)).Fa};Vv.isFairPlaySupported=function(){var a;return K(function(b){if(1==b.g)return a={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},B(b,2),u(b,navigator.requestMediaKeySystemAccess("com.apple.fps",[a]),4);if(2!=b.g)return b["return"](!0);F(b);return b["return"](!1)})};/*
878
880
  @license
879
881
  EME Encryption Scheme Polyfill
880
882
  Copyright 2019 Google LLC
881
883
  SPDX-License-Identifier: Apache-2.0
882
884
  */
883
- function Xv(){}var Yv;function Zv(){Yv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Yv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=$v):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
884
- function $v(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Yv.call(c,a,b),2);d=e.h;if(aw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Yv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=bw;return e["return"](bw.call(c,
885
+ function Wv(){}var Xv;function Yv(){Xv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Xv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Zv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
886
+ function Zv(a,b){var c=this,d;return K(function(e){if(1==e.g)return console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess'),u(e,Xv.call(c,a,b),2);d=e.h;if($v(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Xv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=aw;return e["return"](aw.call(c,
885
887
  a,b))})}
886
- function bw(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return K(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=cw(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=dw(h.videoCapabilities,d),l=dw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw p=Error("Unsupported keySystem or supportedConfigurations."),
887
- p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(q,Yv.call(c,a,e),2)}n=q.h;return q["return"](new ew(n,d))})}function dw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Xv);Xv.install=Zv;function fw(){}var gw;
888
- function hw(){gw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(gw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=iw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
889
- function iw(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,gw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&aw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=gw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
890
- navigator.mediaCapabilities.decodingInfo=jw;if(d){f.A(3);break}e=c;return u(f,kw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](jw.call(b,a))}})}
891
- function jw(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=cw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,gw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
892
- new ew(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,kw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
893
- function kw(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
894
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}M("McEncryptionSchemePolyfill",fw);fw.install=hw;function ew(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
895
- ew.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};ew.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
896
- function cw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function aw(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}function lw(){}
897
- function Gt(){Zv();hw()}M("EncryptionSchemePolyfills",lw);lw.install=Gt;"undefined"!==typeof module&&module.exports&&(module.exports=lw);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
888
+ function aw(a,b){var c=this,d,e,f,g,h,k,l,m,p,n;return K(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=bw(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=cw(h.videoCapabilities,d),l=cw(h.audioCapabilities,d),h.videoCapabilities&&h.videoCapabilities.length&&!k.length||h.audioCapabilities&&h.audioCapabilities.length&&!l.length||(m=Object.assign({},h),m.videoCapabilities=k,m.audioCapabilities=l,e.push(m));if(!e.length)throw p=Error("Unsupported keySystem or supportedConfigurations."),
889
+ p.name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return u(q,Xv.call(c,a,e),2)}n=q.h;return q["return"](new dw(n,d))})}function cw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Wv);Wv.install=Yv;function ew(){}var fw;
890
+ function gw(){fw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(fw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=hw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
891
+ function hw(a){var b=this,c,d,e;return K(function(f){switch(f.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),u(f,fw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&$v(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=fw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
892
+ navigator.mediaCapabilities.decodingInfo=iw;if(d){f.A(3);break}e=c;return u(f,jw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](iw.call(b,a))}})}
893
+ function iw(a){var b=this,c,d,e,f,g,h,k,l;return K(function(m){switch(m.g){case 1:return console.assert(b==navigator.mediaCapabilities,'bad "this" for decodingInfo'),c=null,a.keySystemConfiguration&&(d=a.keySystemConfiguration,e=d.keySystem,f=d.audio&&d.audio.encryptionScheme,g=d.video&&d.video.encryptionScheme,c=bw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,fw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
894
+ new dw(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,jw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
895
+ function jw(a){var b,c;return K(function(d){if(1==d.g){var e=a.keySystemConfiguration,f=[],g=[];e.audio&&f.push({robustness:e.audio.robustness||"",contentType:a.audio.contentType});e.video&&g.push({robustness:e.video.robustness||"",contentType:a.video.contentType});e={initDataTypes:e.initDataType?[e.initDataType]:[],distinctiveIdentifier:e.distinctiveIdentifier,persistentState:e.persistentState,sessionTypes:e.sessionTypes};f.length&&(e.audioCapabilities=f);g.length&&(e.videoCapabilities=g);b=e;return u(d,
896
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}M("McEncryptionSchemePolyfill",ew);ew.install=gw;function dw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
897
+ dw.prototype.getConfiguration=function(){var a=this.h.getConfiguration();if(a.videoCapabilities)for(var b=t(a.videoCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;if(a.audioCapabilities)for(b=t(a.audioCapabilities),c=b.next();!c.done;c=b.next())c.value.encryptionScheme=this.g;return a};dw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
898
+ function bw(a){if(a.startsWith("com.widevine")||a.startsWith("com.microsoft")||a.startsWith("com.chromecast")||a.startsWith("com.adobe")||a.startsWith("org.w3"))return"cenc";if(a.startsWith("com.apple"))return"cbcs-1-9";console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",a,"Please contribute!");return null}function $v(a){a=a.getConfiguration();var b=a.audioCapabilities&&a.audioCapabilities[0];return(a=a.videoCapabilities&&a.videoCapabilities[0]||b)&&void 0!==a.encryptionScheme?!0:!1}
899
+ function kw(){}function Ft(){Yv();gw()}M("EncryptionSchemePolyfills",kw);kw.install=Ft;"undefined"!==typeof module&&module.exports&&(module.exports=kw);}).call(exportTo,innerGlobal,innerGlobal,undefined);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define=="function"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
898
900
 
899
901
  //# sourceMappingURL=shaka-player.compiled.map