shaka-player 4.2.3 → 4.2.4

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 (46) hide show
  1. package/AUTHORS +1 -0
  2. package/CHANGELOG.md +15 -0
  3. package/CONTRIBUTORS +1 -0
  4. package/dist/deps.js +2 -2
  5. package/dist/locales.js +26 -26
  6. package/dist/shaka-player.compiled.d.ts +5 -1
  7. package/dist/shaka-player.compiled.debug.d.ts +5 -1
  8. package/dist/shaka-player.compiled.debug.externs.js +2 -1
  9. package/dist/shaka-player.compiled.debug.js +83 -80
  10. package/dist/shaka-player.compiled.debug.map +3 -3
  11. package/dist/shaka-player.compiled.externs.js +2 -1
  12. package/dist/shaka-player.compiled.js +565 -562
  13. package/dist/shaka-player.compiled.map +3 -3
  14. package/dist/shaka-player.ui.d.ts +5 -1
  15. package/dist/shaka-player.ui.debug.d.ts +5 -1
  16. package/dist/shaka-player.ui.debug.externs.js +2 -1
  17. package/dist/shaka-player.ui.debug.js +99 -96
  18. package/dist/shaka-player.ui.debug.map +3 -3
  19. package/dist/shaka-player.ui.externs.js +2 -1
  20. package/dist/shaka-player.ui.js +694 -691
  21. package/dist/shaka-player.ui.map +3 -3
  22. package/externs/mux.js +3 -0
  23. package/lib/cast/cast_proxy.js +2 -1
  24. package/lib/cast/cast_receiver.js +19 -5
  25. package/lib/cast/cast_sender.js +2 -1
  26. package/lib/cast/cast_utils.js +16 -6
  27. package/lib/hls/hls_parser.js +9 -2
  28. package/lib/media/media_source_engine.js +6 -0
  29. package/lib/media/playhead.js +23 -1
  30. package/lib/media/streaming_engine.js +3 -12
  31. package/lib/media/transmuxer.js +6 -0
  32. package/lib/player.js +24 -11
  33. package/lib/util/manifest_parser_utils.js +4 -0
  34. package/package.json +1 -1
  35. package/roadmap.md +24 -6
  36. package/test/cast/cast_receiver_integration.js +97 -16
  37. package/test/cast/cast_receiver_unit.js +17 -12
  38. package/test/cast/cast_utils_unit.js +1 -0
  39. package/test/media/media_source_engine_integration.js +31 -0
  40. package/test/media/playhead_unit.js +41 -0
  41. package/test/media/streaming_engine_integration.js +13 -0
  42. package/test/media/streaming_engine_unit.js +36 -23
  43. package/test/player_unit.js +87 -0
  44. package/test/test/util/simple_fakes.js +3 -0
  45. package/ui/controls.js +4 -1
  46. package/ui/settings_menu.js +11 -2
@@ -15,16 +15,16 @@ 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=da[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.gh=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 ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
19
- function sa(a,b){a.i={te:b,Be:!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 A(a){a.g=0}function C(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.te;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.Be?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 za(a,b){ra(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(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.hh=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 ra(a){if(a.o)throw new TypeError("Generator is already running");a.o=!0}qa.prototype.s=function(a){this.h=a};
19
+ function sa(a,b){a.i={ue:b,Ce:!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 A(a){a.g=0}function C(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.ue;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.Ce?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 za(a,b){ra(a.g);var c=a.g.l;if(c)return Aa(a,"return"in c?c["return"]:function(d){return{value:d,done:!0}},b,a.g["return"]);a.g["return"](b);return Ba(a)}
21
21
  function Aa(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,sa(a.g,g),Ba(a)}a.g.l=null;d.call(a.g,f);return Ba(a)}
22
- function Ba(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,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Be)throw b.te;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
22
+ function Ba(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,sa(a.g,c)}a.g.o=!1;if(a.g.i){b=a.g.i;a.g.i=null;if(b.Ce)throw b.ue;return{value:b["return"],done:!0}}return{value:void 0,done:!0}}
23
23
  function Ea(a){this.next=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l.next,b,a.g.s):(a.g.s(b),b=Ba(a));return b};this["throw"]=function(b){ra(a.g);a.g.l?b=Aa(a,a.g.l["throw"],b,a.g.s):(sa(a.g,b),b=Ba(a));return b};this["return"]=function(b){return za(a,b)};this[Symbol.iterator]=function(){return this}}
24
24
  function Fa(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 Fa(new Ea(new ya(a)))}function Ia(){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=da.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
- 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=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.C=
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.B()){var h=da.console;"undefined"!==typeof h&&h.error(g.i)}},1)};b.prototype.B=
28
28
  function(){if(this.o)return!1;var g=da.CustomEvent,h=da.Event,k=da.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=da.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
29
  b.prototype.I=function(g){var h=this.j();g.Gc(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(p,q){return"function"==typeof p?function(v){try{l(p(v))}catch(y){m(y)}}:q}var l,m,n=new b(function(p,q){l=p;m=q});this.Gc(k(g,l),k(h,m));return n};b.prototype["catch"]=function(g){return this.then(void 0,g)};b.prototype.Gc=function(g,h){function k(){switch(l.h){case 1:g(l.i);break;case 2:h(l.i);
30
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).Gc(h,k)})};b.all=function(g){var h=t(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;q--;0==q&&l(p)}}var p=[],q=0;do p.push(void 0),q++,d(k.value).Gc(n(p.length-1),m),k=h.next();
@@ -32,14 +32,14 @@ while(!k.done)})};return b});function Ja(a,b){return Object.prototype.hasOwnProp
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(!Ja(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(n){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(!Ja(k,g))throw Error("WeakMap key fail: "+k);k[g][this.g]=l;return this};b.prototype.get=function(k){return d(k)&&Ja(k,g)?k[g][this.g]:void 0};b.prototype.has=function(k){return d(k)&&
34
34
  Ja(k,g)&&Ja(k[g],this.g)};b.prototype["delete"]=function(k){return d(k)&&Ja(k,g)&&Ja(k[g],this.g)?delete k[g][this.g]:!1};return b});
35
- fa("Map",function(a){function b(){var h={};return h.Qa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Qa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ja(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,fa:p}}return{id:l,
35
+ fa("Map",function(a){function b(){var h={};return h.Pa=h.next=h.head=h}function c(h,k){var l=h.g;return ha(function(){if(l){for(;l.head!=h.g;)l=l.Pa;for(;l.next!=l.head;)return l=l.next,{done:!1,value:k(l)};l=null}return{done:!0,value:void 0}})}function d(h,k){var l=k&&typeof k;"object"==l||"function"==l?f.has(k)?l=f.get(k):(l=""+ ++g,f.set(k,l)):l="p_"+k;var m=h.h[l];if(m&&Ja(h.h,l))for(var n=0;n<m.length;n++){var p=m[n];if(k!==k&&p.key!==p.key||k===p.key)return{id:l,list:m,index:n,fa:p}}return{id:l,
36
36
  list:m,index:-1,fa:void 0}}function e(h){this.h={};this.g=b();this.size=0;if(h){h=t(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}}if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(t([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var l=k.entries(),m=l.next();if(m.done||m.value[0]!=h||"s"!=m.value[1])return!1;m=l.next();return m.done||4!=m.value[0].x||
37
- "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.fa?l.fa.value=k:(l.fa={next:this.g,Qa:this.g.Qa,head:this.g,key:h,value:k},l.list.push(l.fa),this.g.Qa.next=l.fa,this.g.Qa=l.fa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.fa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.fa.Qa.next=h.fa.next,h.fa.next.Qa=h.fa.Qa,
38
- h.fa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Qa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).fa};e.prototype.get=function(h){return(h=d(this,h).fa)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
37
+ "t"!=m.value[1]||!l.next().done?!1:!0}catch(n){return!1}}())return a;var f=new WeakMap;e.prototype.set=function(h,k){h=0===h?0:h;var l=d(this,h);l.list||(l.list=this.h[l.id]=[]);l.fa?l.fa.value=k:(l.fa={next:this.g,Pa:this.g.Pa,head:this.g,key:h,value:k},l.list.push(l.fa),this.g.Pa.next=l.fa,this.g.Pa=l.fa,this.size++);return this};e.prototype["delete"]=function(h){h=d(this,h);return h.fa&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.h[h.id],h.fa.Pa.next=h.fa.next,h.fa.next.Pa=h.fa.Pa,
38
+ h.fa.head=null,this.size--,!0):!1};e.prototype.clear=function(){this.h={};this.g=this.g.Pa=b();this.size=0};e.prototype.has=function(h){return!!d(this,h).fa};e.prototype.get=function(h){return(h=d(this,h).fa)&&h.value};e.prototype.entries=function(){return c(this,function(h){return[h.key,h.value]})};e.prototype.keys=function(){return c(this,function(h){return h.key})};e.prototype.values=function(){return c(this,function(h){return h.value})};e.prototype.forEach=function(h,k){for(var l=this.entries(),
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 Ka(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{ze:e,v:f}}return{ze:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).ze}});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 Ka(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{Ae:e,v:f}}return{Ae:-1,v:void 0}}fa("Array.prototype.findIndex",function(a){return a?a:function(b,c){return Ka(this,b,c).Ae}});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 Ka(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)Ja(d,e)&&(a[e]=d[e])}return a};
@@ -78,32 +78,33 @@ var Mb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=
78
78
  Copyright 2006 The Closure Library Authors
79
79
  SPDX-License-Identifier: Apache-2.0
80
80
  */
81
- function Nb(a){var b;a instanceof Nb?(Ob(this,a.Fa),this.ob=a.ob,this.Ga=a.Ga,Pb(this,a.Ib),this.ua=a.ua,Qb(this,a.g.clone()),this.fb=a.fb):a&&(b=String(a).match(Mb))?(Ob(this,b[1]||"",!0),this.ob=Rb(b[2]||""),this.Ga=Rb(b[3]||"",!0),Pb(this,b[4]),this.ua=Rb(b[5]||"",!0),Qb(this,b[6]||"",!0),this.fb=Rb(b[7]||"")):this.g=new Sb(null)}r=Nb.prototype;r.Fa="";r.ob="";r.Ga="";r.Ib=null;r.ua="";r.fb="";
82
- r.toString=function(){var a=[],b=this.Fa;b&&a.push(Ub(b,Vb,!0),":");if(b=this.Ga){a.push("//");var c=this.ob;c&&a.push(Ub(c,Vb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ib;null!=b&&a.push(":",String(b))}if(b=this.ua)this.Ga&&"/"!=b.charAt(0)&&a.push("/"),a.push(Ub(b,"/"==b.charAt(0)?Wb:Xb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fb)&&a.push("#",Ub(b,Yb));return a.join("")};
83
- r.resolve=function(a){var b=this.clone();"data"===b.Fa&&(b=new Nb);var c=!!a.Fa;c?Ob(b,a.Fa):c=!!a.ob;c?b.ob=a.ob:c=!!a.Ga;c?b.Ga=a.Ga:c=null!=a.Ib;var d=a.ua;if(c)Pb(b,a.Ib);else if(c=!!a.ua){if("/"!=d.charAt(0))if(this.Ga&&!this.ua)d="/"+d;else{var e=b.ua.lastIndexOf("/");-1!=e&&(d=b.ua.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
- 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.ua=d:c=""!==a.g.toString();c?Qb(b,a.g.clone()):c=!!a.fb;c&&(b.fb=a.fb);return b};r.clone=function(){return new Nb(this)};function Ob(a,b,c){a.Fa=c?Rb(b,!0):b;a.Fa&&(a.Fa=a.Fa.replace(/:$/,""))}function Pb(a,b){if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ib=b}else a.Ib=null}function Qb(a,b,c){b instanceof Sb?a.g=b:(c||(b=Ub(b,Zb)),a.g=new Sb(b))}
85
- function Rb(a,b){return a?b?decodeURI(a):decodeURIComponent(a):""}function Ub(a,b,c){return null!=a?(a=encodeURI(a).replace(b,$b),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function $b(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Vb=/[#\/\?@]/g,Xb=/[#\?:]/g,Wb=/[#\?]/g,Zb=/[#\?@]/g,Yb=/#/g;function Sb(a){this.g=a||null}
81
+ function Nb(a){var b;a instanceof Nb?(Ob(this,a.Ea),this.ob=a.ob,this.Fa=a.Fa,Pb(this,a.Ib),this.ua=a.ua,Qb(this,a.g.clone()),this.fb=a.fb):a&&(b=String(a).match(Mb))?(Ob(this,b[1]||"",!0),this.ob=Rb(b[2]||""),this.Fa=Rb(b[3]||"",!0),Pb(this,b[4]),this.ua=Rb(b[5]||"",!0),Qb(this,b[6]||"",!0),this.fb=Rb(b[7]||"")):this.g=new Sb(null)}r=Nb.prototype;r.Ea="";r.ob="";r.Fa="";r.Ib=null;r.ua="";r.fb="";
82
+ r.toString=function(){var a=[],b=this.Ea;b&&a.push(Tb(b,Vb,!0),":");if(b=this.Fa){a.push("//");var c=this.ob;c&&a.push(Tb(c,Vb,!0),"@");a.push(encodeURIComponent(b).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));b=this.Ib;null!=b&&a.push(":",String(b))}if(b=this.ua)this.Fa&&"/"!=b.charAt(0)&&a.push("/"),a.push(Tb(b,"/"==b.charAt(0)?Wb:Xb,!0));(b=this.g.toString())&&a.push("?",b);(b=this.fb)&&a.push("#",Tb(b,Yb));return a.join("")};
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.ob;c?b.ob=a.ob:c=!!a.Fa;c?b.Fa=a.Fa:c=null!=a.Ib;var d=a.ua;if(c)Pb(b,a.Ib);else if(c=!!a.ua){if("/"!=d.charAt(0))if(this.Fa&&!this.ua)d="/"+d;else{var e=b.ua.lastIndexOf("/");-1!=e&&(d=b.ua.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
+ 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.ua=d:c=""!==a.g.toString();c?Qb(b,a.g.clone()):c=!!a.fb;c&&(b.fb=a.fb);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.Ib=b}else a.Ib=null}function Qb(a,b,c){b instanceof Sb?a.g=b:(c||(b=Tb(b,Zb)),a.g=new Sb(b))}
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,$b),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function $b(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var Vb=/[#\/\?@]/g,Xb=/[#\?:]/g,Wb=/[#\?]/g,Zb=/[#\?@]/g,Yb=/#/g;function Sb(a){this.g=a||null}
86
86
  function ac(a){if(!a.na&&(a.na={},a.Ic=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.Ic=null;r.add=function(a,b){ac(this);this.g=null;var c=this.na.hasOwnProperty(a)&&this.na[a];c||(this.na[a]=c=[]);c.push(b);this.Ic++;return this};
87
87
  r.set=function(a,b){ac(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.Ic=this.Ic}return a};function bc(a,b){return a.concat(b)}function cc(){}function dc(a){return null!=a};function ec(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(bc,[]).map(function(d){return d.toString()})}function fc(a,b){return{keySystem:a,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:b||[],keyIds:new Set}}
88
- function gc(a,b){if(1==b.length)return b[0];var c=hc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function hc(a,b){for(var c=t(ic[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==jc?"":null}var jc="text",kc={ra:"video",cb:"audio",X:jc,Ub:"image",sg:"application"},ic={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function lc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}lc.prototype.resolve=function(){};lc.prototype.reject=function(){};function mc(a){this.h=a;this.g=void 0}mc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function nc(a){this.h=a;this.g=null}nc.prototype.P=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};nc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Lb=function(){this.stop();this.h();return this};O.prototype.P=function(a){var b=this;this.stop();this.g=(new nc(function(){b.h()})).P(a);return this};O.prototype.Da=function(a){var b=this;this.stop();this.g=(new nc(function(){b.g.P(a);b.h()})).P(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.Da;O.prototype.tickAfter=O.prototype.P;
88
+ function gc(a,b){if(1==b.length)return b[0];var c=hc(a,b);if(null!=c)return c;throw new N(2,4,4025,b);}function hc(a,b){for(var c=t(ic[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==jc?"":null}
89
+ var jc="text",kc={ra:"video",cb:"audio",X:jc,Ub:"image",tg:"application"},ic={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cx]$/,/^[du]dts$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvhe/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function lc(){var a,b,c=new Promise(function(d,e){a=d;b=e});c.resolve=a;c.reject=b;return c}lc.prototype.resolve=function(){};lc.prototype.reject=function(){};function mc(a){this.h=a;this.g=void 0}mc.prototype.value=function(){void 0==this.g&&(this.g=this.h());return this.g};function nc(a){this.h=a;this.g=null}nc.prototype.P=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};nc.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function O(a){this.h=a;this.g=null}O.prototype.Lb=function(){this.stop();this.h();return this};O.prototype.P=function(a){var b=this;this.stop();this.g=(new nc(function(){b.h()})).P(a);return this};O.prototype.Ca=function(a){var b=this;this.stop();this.g=(new nc(function(){b.g.P(a);b.h()})).P(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.P;
89
90
  O.prototype.tickNow=O.prototype.Lb;function oc(){return window.MediaSource&&MediaSource.isTypeSupported?!0:!1}function pc(a){return""!=qc().canPlayType(a)}function rc(){return sc("Xbox One")}function tc(){return sc("Tizen")}function uc(){return sc("Web0S")&&sc("Chrome/38.0.2125.122 Safari/537.36")}function vc(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tc()&&!sc("PC=EOS")&&!wc()&&!sc("AFT")}function wc(){return sc("PlayStation 4")}
90
91
  function xc(){if(!vc())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 sc(a){return(navigator.userAgent||"").includes(a)}function qc(){if(yc)return yc;zc||(zc=new O(function(){yc=null}));(yc=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(yc=document.createElement("video"));zc.P(1);return yc}var zc=null,yc=null;function Ac(){}
91
92
  function Bc(a){if(!a)return"";a=Fb(a);239==a[0]&&187==a[1]&&191==a[2]&&(a=a.subarray(3));if(window.TextDecoder&&!wc())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
93
  (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
94
  function Cc(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 Dc.value()(d)}
94
- function Ec(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 Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new N(2,2,2003);}
95
- function Ic(a){if(window.TextEncoder&&!wc()){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 Jc(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",Ac);Ac.resetFromCharCode=function(){Dc.g=void 0};Ac.toUTF16=Jc;Ac.toUTF8=Ic;Ac.fromBytesAutoDetect=Ec;Ac.fromUTF16=Cc;
95
+ function Hc(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 Bc(c);if(254==c[0]&&255==c[1])return Cc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Cc(c.subarray(2),!0);if(0==c[0]&&0==c[2])return Cc(a,!1);if(0==c[1]&&0==c[3])return Cc(a,!0);if(b(0)&&b(1)&&b(2)&&b(3))return Bc(a);throw new N(2,2,2003);}
96
+ function Ic(a){if(window.TextEncoder&&!wc()){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 Jc(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",Ac);Ac.resetFromCharCode=function(){Dc.g=void 0};Ac.toUTF16=Jc;Ac.toUTF8=Ic;Ac.fromBytesAutoDetect=Hc;Ac.fromUTF16=Cc;
96
97
  Ac.fromUTF8=Bc;var Dc=new mc(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 Kc(){}function Lc(a){a=Fb(a);a=Dc.value()(a);return btoa(a)}function Mc(a,b){b=void 0==b?!0:b;var c=Lc(a).replace(/\+/g,"-").replace(/\//g,"_");return b?c:c.replace(/[=]*$/,"")}function Nc(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 Oc(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
98
  function Pc(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 Qc(){for(var a=Ia.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",Kc);Kc.concat=Qc;Kc.toHex=Pc;Kc.fromHex=Oc;Kc.fromBase64=Nc;Kc.toBase64=Mc;Kc.toStandardBase64=Lc;function Rc(){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(Qc(b.initSegment,b.data))});this.g.on("done",function(){var b={data:Qc.apply(Kc,ia(a.m)),captions:a.j,metadata:a.i};a.h.resolve(b);a.l=!1})}Rc.prototype.destroy=function(){this.g.dispose();this.g=null;return Promise.resolve()};
98
99
  function Sc(a,b){if(!Kb.get("muxjs")()||!Tc(a))return!1;if(b)return MediaSource.isTypeSupported(Uc(b,a));var c=Uc("audio",a),d=Uc("video",a);return MediaSource.isTypeSupported(c)||MediaSource.isTypeSupported(d)}function Tc(a){return"mp2t"==a.toLowerCase().split(";")[0].split("/")[1]}
99
100
  function Uc(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 Vc(a,b){a.l=!0;a.h=new lc;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 Wc(){}function Xc(a,b){var c=a;b&&(c+='; codecs="'+b+'"');return c}function Yc(a,b,c){a=Xc(a,b);if(Tc(a)){if(Kb.get("muxjs")())return Uc(c,a)}else if("audio"==c)return a.replace("video","audio");return a}
100
101
  function Zc(a){var b=$c(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
102
  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 ad(a){a=a.split(/ *; */);a.shift();return(a=a.find(function(b){return b.startsWith("codecs=")}))?a.split("=")[1].replace(/^"|"$/g,""):""}function $c(a){a=a.split(".");var b=a[0];a.shift();return[b,a.join(".")]}M("shaka.util.MimeUtils",Wc);Wc.getFullType=Xc;
102
- (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function bd(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 cd(a){return dd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}bd.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
103
+ (new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function bd(a){this.j=null;this.i=a;this.u=!1;this.l=this.s=0;this.m=Infinity;this.h=this.g=null;this.B="";this.o=new Map}function cd(a){return dd[a]||"application/cea-608"==a||"application/cea-708"==a?!0:!1}bd.prototype.destroy=function(){this.i=this.j=null;this.o.clear();return Promise.resolve()};
103
104
  function ed(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);A(k)})}
104
- bd.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));A(d)})};function fd(a,b,c){a.l=b;a.m=c}function gd(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
+ bd.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));A(d)})};function fd(a,b,c){a.l=b;a.m=c}function gd(a,b,c){a.B=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
106
  function hd(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 hb(c.startTime,c.endTime,c.text)});return b}function id(a,b,c){b.startTime+=c;b.endTime+=c;b=t(b.nestedCues);for(var d=b.next();!d.done;d=b.next())id(a,d.value,c)}
106
- function jd(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,[]);id(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
+ function jd(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,[]);id(a,k,e);k.startTime>=a.l&&k.startTime<a.m&&(g.get(h).get(f).push(k),h==a.B&&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
108
  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",bd);bd.prototype.destroy=bd.prototype.destroy;bd.findParser=function(a){return dd[a]};bd.unregisterParser=function(a){delete dd[a]};bd.registerParser=function(a,b){dd[a]=b};var dd={};function kd(){}function ld(a,b){a=Q(a);b=Q(b);return a.split("-")[0]==b.split("-")[0]}function md(a,b){a=Q(a);b=Q(b);var c=a.split("-"),d=b.split("-");return c[0]==d[0]&&1==c.length&&2==d.length}function nd(a,b){a=Q(a);b=Q(b);var c=a.split("-"),d=b.split("-");return 2==c.length&&2==d.length&&c[0]==d[0]}function Q(a){var b=a.split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=od.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a}
108
109
  function pd(a,b){a=Q(a);b=Q(b);return b==a?4:md(b,a)?3:nd(b,a)?2:md(a,b)?1:0}function td(a){var b=a.indexOf("-");a=0<=b?a.substring(0,b):a;a=a.toLowerCase();return a=od.get(a)||a}function vd(a){return a.language?Q(a.language):a.audio&&a.audio.language?Q(a.audio.language):a.video&&a.video.language?Q(a.video.language):"und"}
109
110
  function wd(a,b){for(var c=Q(a),d=new Set,e=t(b),f=e.next();!f.done;f=e.next())d.add(Q(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,md(f,c))return f;e=t(d);for(f=e.next();!f.done;f=e.next())if(f=f.value,nd(f,c))return f;d=t(d);for(f=d.next();!f.done;f=d.next())if(f=f.value,md(c,f))return f;return null}M("shaka.util.LanguageUtils",kd);kd.findClosestLocale=wd;kd.getLocaleForVariant=vd;
@@ -145,11 +146,11 @@ function Bd(a,b){var c=a.filter(function(g){return g.audio&&g.audio.channelsCoun
145
146
  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(Q(b),a.map(function(k){return k.language}));h&&(e=a.filter(function(k){return Q(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(bc,[]);return a.length?
146
147
  me(e,a[0]):e}function me(a,b){return a.filter(function(c){return c.roles.includes(b)})}function Wd(a){var b=[];a.audio&&b.push(ne(a.audio));a.video&&b.push(ne(a.video));return b.join(", ")}
147
148
  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 fe=0,Gd="smooth",Hd="powerEfficient",Jd="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 oe(){var a=this;this.l=null;this.o=!1;this.i=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.o){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.m=[];this.u=1;this.C=!1;this.h=this.j=this.g=this.s=null;this.D=new O(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}r=oe.prototype;
149
+ var fe=0,Gd="smooth",Hd="powerEfficient",Jd="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 oe(){var a=this;this.l=null;this.o=!1;this.i=new Sa;navigator.connection&&navigator.connection.addEventListener("change",function(){if(a.g.useNetworkInformation&&a.o){a.i=new Sa;a.g&&a.i.configure(a.g.advanced);var b=a.chooseVariant();b&&a.l(b)}});this.m=[];this.u=1;this.B=!1;this.h=this.j=this.g=this.s=null;this.D=new O(function(){if(a.g.restrictToElementSize){var b=a.chooseVariant();b&&a.l(b)}})}r=oe.prototype;
149
150
  r.stop=function(){this.l=null;this.o=!1;this.m=[];this.u=1;this.j=this.s=null;this.h&&(this.h.disconnect(),this.h=null);this.D.stop()};r.init=function(a){this.l=a};
150
151
  r.chooseVariant=function(){var a=Infinity,b=Infinity;this.h&&this.g.restrictToElementSize&&(b=this.g.ignoreDevicePixelRatio?1:window.devicePixelRatio,a=this.j.clientWidth*b,b*=this.j.clientHeight);a=pe(this.g.restrictions,this.m,a,b);b=this.i.getBandwidthEstimate(qe(this));this.m.length&&!a.length&&(a=pe(null,this.m,Infinity,Infinity),a=[a[0]]);for(var c=a[0]||null,d=0;d<a.length;d++){for(var e=a[d],f=isNaN(this.u)?1:Math.abs(this.u),g=f*e.bandwidth/this.g.bandwidthDowngradeTarget,h={bandwidth:Infinity},
151
152
  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.s=Date.now();return c};r.enable=function(){this.o=!0};r.disable=function(){this.o=!1};
152
- r.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.C){var c=this.i;if(!(c.g>=c.i))break a;this.C=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.i.getBandwidthEstimate(qe(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(qe(this))};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.u=a};
153
+ r.segmentDownloaded=function(a,b){this.i.sample(a,b);if(null!=this.s&&this.o)a:{if(!this.B){var c=this.i;if(!(c.g>=c.i))break a;this.B=!0}else if(Date.now()-this.s<1E3*this.g.switchInterval)break a;c=this.chooseVariant();this.i.getBandwidthEstimate(qe(this));c&&this.l(c)}};r.getBandwidthEstimate=function(){return this.i.getBandwidthEstimate(qe(this))};r.setVariants=function(a){this.m=a};r.playbackRateChanged=function(a){this.u=a};
153
154
  r.setMediaElement=function(a){var b=this;this.j=a;this.h&&(this.h.disconnect(),this.h=null);this.j&&"ResizeObserver"in window&&(this.h=new ResizeObserver(function(){b.D.P(re)}),this.h.observe(this.j))};r.configure=function(a){this.g=a;this.i&&this.g&&this.i.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}
154
155
  function pe(a,b,c,d){a&&(b=b.filter(function(e){return Md(e,a,{width:d,height:c})}));return b.sort(function(e,f){return e.bandwidth-f.bandwidth})}M("shaka.abr.SimpleAbrManager",oe);oe.prototype.configure=oe.prototype.configure;oe.prototype.setMediaElement=oe.prototype.setMediaElement;oe.prototype.playbackRateChanged=oe.prototype.playbackRateChanged;oe.prototype.setVariants=oe.prototype.setVariants;oe.prototype.getBandwidthEstimate=oe.prototype.getBandwidthEstimate;oe.prototype.segmentDownloaded=oe.prototype.segmentDownloaded;
155
156
  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;var re=1;function se(a,b){this.g=a;this.h=b}se.prototype.toString=function(){return"v"+this.g+"."+this.h};function te(){var a=new se(5,0),b=ue,c=b.g,d=a.h-c.h;(0<(a.g-c.g||d)?b.i:b.h)(b.g,a,"AbrManager","Please use an AbrManager with setMediaElement function.")}function ve(a,b,c,d){Va([c,"has been deprecated and will be removed in",b,". We are currently at version",a,". Additional information:",d].join(" "))}function we(a,b,c,d){Ua([c,"has been deprecated and has been removed in",b,". We are now at version",a,". Additional information:",d].join(""))}var ue=null;function xe(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)}xe.prototype.add=function(a){return ye(this.h,a)?(this.g.add(a),!0):!1};
@@ -162,28 +163,28 @@ function Se(a){return new Ne(Promise.all(a.map(function(b){return b.promise})),f
162
163
  Ne.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=Te(l,k,f):(h?f.resolve:f.reject)(k)}}}function d(){f.reject(g);return e.abort()}var e=this,f=new lc,g=new N(2,7,7001);this.promise.then(c(!0),c(!1));return new Ne(f,function(){return d()})};
163
164
  function Te(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",Ne);Ne.prototype.chain=Ne.prototype.Z;Ne.prototype["finally"]=Ne.prototype["finally"];Ne.all=Se;Ne.prototype.abort=Ne.prototype.abort;Ne.notAbortable=Re;Ne.completed=Qe;Ne.aborted=Pe;Ne.failed=Oe;function R(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}
164
165
  function Ue(a){var b=new R(a.type),c;for(c in a)Object.defineProperty(b,c,{value:a[c],writable:!0,enumerable:!0});return b}R.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};R.prototype.stopImmediatePropagation=function(){this.g=!0};R.prototype.stopPropagation=function(){};M("shaka.util.FakeEvent",R);
165
- var Ve={ug:"abrstatuschanged",vg:"adaptation",wg:"buffering",yg:"downloadfailed",zg:"downloadheadersreceived",Ag:"drmsessionupdate",Cg:"emsg",Error:"error",Dg:"expirationupdated",Eg:"gapjumped",Gg:"loaded",Hg:"loading",Jg:"manifestparsed",Kg:"mediaqualitychanged",Metadata:"metadata",Mg:"onstatechange",Ng:"onstateidle",Og:"ratechange",Qg:"sessiondata",Rg:"stalldetected",Sg:"streaming",Tg:"textchanged",Ug:"texttrackvisibility",Vg:"timelineregionadded",Wg:"timelineregionenter",Xg:"timelineregionexit",
166
- Yg:"trackschanged",$g:"unloading",ah:"variantchanged"};function We(){this.da=new xd;this.Lc=this}We.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};We.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};We.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.Lc;a.currentTarget=this.Lc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
167
- We.prototype.release=function(){this.da=null};function Xe(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 Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){this.g=[]}function $e(a,b){a.g.push(b["finally"](function(){eb(a.g,b)}))}Ze.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 af(a,b,c){We.call(this);this.i=!1;this.m=new Ze;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa(af,We);r=af.prototype;r.$d=function(a){this.o=a};function bf(a,b,c,d){c=c||cf;var e=df[a];if(!e||c>=e.priority)df[a]={priority:c,Vf:b,Wf:void 0===d?!1:d}}r.Xf=function(a){this.g.add(a)};r.ng=function(a){this.g["delete"](a)};r.df=function(){this.g.clear()};r.Yf=function(a){this.h.add(a)};r.og=function(a){this.h["delete"](a)};r.ef=function(){this.h.clear()};
166
+ var Ve={vg:"abrstatuschanged",wg:"adaptation",xg:"buffering",zg:"downloadfailed",Ag:"downloadheadersreceived",Bg:"drmsessionupdate",Dg:"emsg",Error:"error",Eg:"expirationupdated",Fg:"gapjumped",Hg:"loaded",Ig:"loading",Kg:"manifestparsed",Lg:"mediaqualitychanged",Metadata:"metadata",Ng:"onstatechange",Og:"onstateidle",Pg:"ratechange",Rg:"sessiondata",Sg:"stalldetected",Tg:"streaming",Ug:"textchanged",Vg:"texttrackvisibility",Wg:"timelineregionadded",Xg:"timelineregionenter",Yg:"timelineregionexit",
167
+ Zg:"trackschanged",ah:"unloading",bh:"variantchanged"};function We(){this.da=new xd;this.Lc=this}We.prototype.addEventListener=function(a,b){this.da&&this.da.push(a,b)};We.prototype.removeEventListener=function(a,b){this.da&&this.da.remove(a,b)};We.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.Lc;a.currentTarget=this.Lc;try{c.handleEvent?c.handleEvent(a):c.call(this,a)}catch(d){}if(a.g)break}return a.defaultPrevented};
168
+ We.prototype.release=function(){this.da=null};function Xe(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 Ye(a){var b={},c;for(c in a)b[c]=a[c];return b};function Ze(){this.g=[]}function $e(a,b){a.g.push(b["finally"](function(){eb(a.g,b)}))}Ze.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 af(a,b,c){We.call(this);this.i=!1;this.m=new Ze;this.g=new Set;this.h=new Set;this.l=a||null;this.j=b||null;this.s=c||null;this.o=!1}pa(af,We);r=af.prototype;r.ae=function(a){this.o=a};function bf(a,b,c,d){c=c||cf;var e=df[a];if(!e||c>=e.priority)df[a]={priority:c,Wf:b,Xf:void 0===d?!1:d}}r.Yf=function(a){this.g.add(a)};r.og=function(a){this.g["delete"](a)};r.ef=function(){this.g.clear()};r.Zf=function(a){this.h.add(a)};r.pg=function(a){this.h["delete"](a)};r.ff=function(){this.h.clear()};
168
169
  function ef(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();We.prototype.release.call(this);return this.m.destroy()};
169
170
  r.request=function(a,b){var c=this,d=new ff;if(this.i){var e=Promise.reject(new N(2,7,7001));e["catch"](function(){});return new gf(e,function(){return Promise.resolve()},d)}b.method=b.method||"GET";b.headers=b.headers||{};b.retryParameters=b.retryParameters?Xe(b.retryParameters):Le();b.uris=Xe(b.uris);e=hf(this,a,b);var f=e.Z(function(){return jf(c,a,b,new Ke(b.retryParameters,!1),0,null,d)}),g=f.Z(function(n){return kf(c,a,n)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});
170
- var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.Kf||!c.l||q.fromCache||a!=lf||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new gf(m.promise,function(){return m.abort()},d);$e(this.m,e);return e};
171
+ var l=0;f.promise.then(function(){l=Date.now()},function(){});var m=g.Z(function(n){var p=Date.now()-l,q=n.response;q.timeMs+=k;q.timeMs+=p;n.Lf||!c.l||q.fromCache||a!=lf||c.l(q.timeMs,q.data.byteLength);return q},function(n){n&&(n.severity=2);throw n;});e=new gf(m.promise,function(){return m.abort()},d);$e(this.m,e);return e};
171
172
  function hf(a,b,c){var d=Qe(void 0),e={};a=t(a.g);for(var f=a.next();!f.done;e={pd:e.pd},f=a.next())e.pd=f.value,d=d.Z(function(g){return function(){c.body&&(c.body=Gb(c.body));return g.pd(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);})}
172
- function jf(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.Fa,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=df[k])?k.Vf:null;if(!m)return Oe(new N(2,1,1E3,h));var n=k.Wf,p=null,q=null,v=!1,y=!1,x;return Re(Me(d)).Z(function(){if(a.i)return Pe();x=Date.now();var w=m(c.uris[e],c,b,function(B,G,E){p&&p.stop();q&&q.P(z/1E3);a.l&&b==lf&&(a.l(B,G),l=!0,g.g=E)},function(B){a.j&&a.j(B,c,b);y=!0});
173
- if(!n)return w;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;w.abort()}),p.P(D/1E3));var z=c.retryParameters.stallTimeout;z&&(q=new O(function(){v=!0;w.abort()}));return w}).Z(function(w){p&&p.stop();q&&q.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var D={response:w,Kf:l};!y&&a.j&&a.j(w.headers,c,b);return D},function(w){p&&p.stop();q&&q.stop();if(a.s){var D=null,z=0;w instanceof N&&(D=w,1001==w.code&&(z=w.data[1]));a.s(c,D,z,v)}if(a.i)return Pe();v&&(w=new N(1,1,1003,
173
+ function jf(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=df[k])?k.Wf:null;if(!m)return Oe(new N(2,1,1E3,h));var n=k.Xf,p=null,q=null,v=!1,y=!1,x;return Re(Me(d)).Z(function(){if(a.i)return Pe();x=Date.now();var w=m(c.uris[e],c,b,function(B,G,E){p&&p.stop();q&&q.P(z/1E3);a.l&&b==lf&&(a.l(B,G),l=!0,g.g=E)},function(B){a.j&&a.j(B,c,b);y=!0});
174
+ if(!n)return w;var D=c.retryParameters.connectionTimeout;D&&(p=new O(function(){v=!0;w.abort()}),p.P(D/1E3));var z=c.retryParameters.stallTimeout;z&&(q=new O(function(){v=!0;w.abort()}));return w}).Z(function(w){p&&p.stop();q&&q.stop();void 0==w.timeMs&&(w.timeMs=Date.now()-x);var D={response:w,Lf:l};!y&&a.j&&a.j(w.headers,c,b);return D},function(w){p&&p.stop();q&&q.stop();if(a.s){var D=null,z=0;w instanceof N&&(D=w,1001==w.code&&(z=w.data[1]));a.s(c,D,z,v)}if(a.i)return Pe();v&&(w=new N(1,1,1003,
174
175
  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 R("retry",D),a.dispatchEvent(D),e=(e+1)%c.uris.length,jf(a,b,c,d,e,w,g)}throw w;})}
175
176
  function kf(a,b,c){var d=Qe(void 0),e={};a=t(a.h);for(var f=a.next();!f.done;e={qd:e.qd},f=a.next())e.qd=f.value,d=d.Z(function(g){return function(){var h=c.response;h.data&&(h.data=Gb(h.data));return g.qd(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",af);af.prototype.request=af.prototype.request;af.prototype.destroy=af.prototype.destroy;af.makeRequest=ef;
176
- af.defaultRetryParameters=function(){return Le()};af.prototype.clearAllResponseFilters=af.prototype.ef;af.prototype.unregisterResponseFilter=af.prototype.og;af.prototype.registerResponseFilter=af.prototype.Yf;af.prototype.clearAllRequestFilters=af.prototype.df;af.prototype.unregisterRequestFilter=af.prototype.ng;af.prototype.registerRequestFilter=af.prototype.Xf;af.unregisterScheme=function(a){delete df[a]};af.registerScheme=bf;af.prototype.setForceHTTPS=af.prototype.$d;function ff(){this.g=0}
177
- af.NumBytesRemainingClass=ff;function gf(a,b,c){Ne.call(this,a,b);this.h=c}pa(gf,Ne);af.PendingRequest=gf;var lf=1;af.RequestType={MANIFEST:0,SEGMENT:lf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var cf=3;af.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:cf};var df={};function mf(a){this.g=!1;this.h=new lc;this.i=a}mf.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 nf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function of(){this.g=new xd}r=of.prototype;r.release=function(){this.mb();this.g=null};r.B=function(a,b,c,d){this.g&&(a=new pf(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.xc(a,b,e);c(g)}var f=this;this.B(a,b,e,d)};r.xc=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.xc(),this.g.remove(b,e))}};
178
- r.mb=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.xc();this.g.g={}}};M("shaka.util.EventManager",of);of.prototype.removeAll=of.prototype.mb;of.prototype.unlisten=of.prototype.xc;of.prototype.listenOnce=of.prototype.oa;of.prototype.listen=of.prototype.B;of.prototype.release=of.prototype.release;function pf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qf(a,d);this.target.addEventListener(b,c,this.g)}
177
+ af.defaultRetryParameters=function(){return Le()};af.prototype.clearAllResponseFilters=af.prototype.ff;af.prototype.unregisterResponseFilter=af.prototype.pg;af.prototype.registerResponseFilter=af.prototype.Zf;af.prototype.clearAllRequestFilters=af.prototype.ef;af.prototype.unregisterRequestFilter=af.prototype.og;af.prototype.registerRequestFilter=af.prototype.Yf;af.unregisterScheme=function(a){delete df[a]};af.registerScheme=bf;af.prototype.setForceHTTPS=af.prototype.ae;function ff(){this.g=0}
178
+ af.NumBytesRemainingClass=ff;function gf(a,b,c){Ne.call(this,a,b);this.h=c}pa(gf,Ne);af.PendingRequest=gf;var lf=1;af.RequestType={MANIFEST:0,SEGMENT:lf,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6};var cf=3;af.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:cf};var df={};function mf(a){this.g=!1;this.h=new lc;this.i=a}mf.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 nf(a,b){if(a.g){if(b instanceof N&&7003==b.code)throw b;throw new N(2,7,7003,b);}};function of(){this.g=new xd}r=of.prototype;r.release=function(){this.mb();this.g=null};r.C=function(a,b,c,d){this.g&&(a=new pf(a,b,c,d),this.g.push(b,a))};r.oa=function(a,b,c,d){function e(g){f.xc(a,b,e);c(g)}var f=this;this.C(a,b,e,d)};r.xc=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.xc(),this.g.remove(b,e))}};
179
+ r.mb=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.xc();this.g.g={}}};M("shaka.util.EventManager",of);of.prototype.removeAll=of.prototype.mb;of.prototype.unlisten=of.prototype.xc;of.prototype.listenOnce=of.prototype.oa;of.prototype.listen=of.prototype.C;of.prototype.release=of.prototype.release;function pf(a,b,c,d){this.target=a;this.type=b;this.listener=c;this.g=qf(a,d);this.target.addEventListener(b,c,this.g)}
179
180
  pf.prototype.xc=function(){this.target.removeEventListener(this.type,this.listener,this.g);this.listener=this.target=null;this.g=!1};function qf(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 rf(a)?b:b.capture||!1}
180
- function rf(a){var b=sf;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}sf=b}return b||!1}var sf=void 0;function tf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function uf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function vf(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 wf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function xf(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 yf(a,b){this.S=Ib(a);this.h=b==zf;this.g=0}r=yf.prototype;r.ma=function(){return this.g<this.S.byteLength};r.$=function(){return this.g};r.tf=function(){return this.S.byteLength};r.Ra=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw Af();}};r.Rd=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Af();}};r.N=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Af();}};
181
- r.Ie=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Af();}};r.Jb=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw Af();}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.S.byteLength)throw Af();var b=Fb(this.S,this.g,a);this.g+=a;return b};
182
- r.skip=function(a){if(this.g+a>this.S.byteLength)throw Af();this.g+=a};r.dg=function(a){if(this.g<a)throw Af();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw Af();this.g=a};r.qc=function(){for(var a=this.g;this.ma()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Fb(this.S,a,this.g-a);this.g+=1;return Bc(a)};function Af(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",yf);yf.prototype.readTerminatedString=yf.prototype.qc;yf.prototype.seek=yf.prototype.seek;yf.prototype.rewind=yf.prototype.dg;
183
- yf.prototype.skip=yf.prototype.skip;yf.prototype.readBytes=yf.prototype.Za;yf.prototype.readUint64=yf.prototype.Jb;yf.prototype.readInt32=yf.prototype.Ie;yf.prototype.readUint32=yf.prototype.N;yf.prototype.readUint16=yf.prototype.Rd;yf.prototype.readUint8=yf.prototype.Ra;yf.prototype.getLength=yf.prototype.tf;yf.prototype.getPosition=yf.prototype.$;yf.prototype.hasMoreData=yf.prototype.ma;var zf=1;yf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:zf};function Bf(){this.i=[];this.h=[];this.g=!1}r=Bf.prototype;r.box=function(a,b){var c=Cf(a);this.i[c]=Df;this.h[c]=b;return this};r.U=function(a,b){var c=Cf(a);this.i[c]=Ef;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new yf(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Zc(0,a,b,c)};
181
+ function rf(a){var b=sf;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}sf=b}return b||!1}var sf=void 0;function tf(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next())c.push(b(e.value));return c}function uf(a,b){for(var c=t(a),d=c.next();!d.done;d=c.next())if(!b(d.value))return!1;return!0};function vf(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 wf(a){var b={};a.forEach(function(c,d){b[d]=c});return b}function xf(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 yf(a,b){this.S=Ib(a);this.h=b==zf;this.g=0}r=yf.prototype;r.ma=function(){return this.g<this.S.byteLength};r.$=function(){return this.g};r.uf=function(){return this.S.byteLength};r.Qa=function(){try{var a=this.S.getUint8(this.g);this.g+=1;return a}catch(b){throw Af();}};r.Sd=function(){try{var a=this.S.getUint16(this.g,this.h);this.g+=2;return a}catch(b){throw Af();}};r.N=function(){try{var a=this.S.getUint32(this.g,this.h);this.g+=4;return a}catch(b){throw Af();}};
182
+ r.Je=function(){try{var a=this.S.getInt32(this.g,this.h);this.g+=4;return a}catch(b){throw Af();}};r.Jb=function(){try{if(this.h){var a=this.S.getUint32(this.g,!0);var b=this.S.getUint32(this.g+4,!0)}else b=this.S.getUint32(this.g,!1),a=this.S.getUint32(this.g+4,!1)}catch(c){throw Af();}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.S.byteLength)throw Af();var b=Fb(this.S,this.g,a);this.g+=a;return b};
183
+ r.skip=function(a){if(this.g+a>this.S.byteLength)throw Af();this.g+=a};r.eg=function(a){if(this.g<a)throw Af();this.g-=a};r.seek=function(a){if(0>a||a>this.S.byteLength)throw Af();this.g=a};r.qc=function(){for(var a=this.g;this.ma()&&0!=this.S.getUint8(this.g);)this.g+=1;a=Fb(this.S,a,this.g-a);this.g+=1;return Bc(a)};function Af(){return new N(2,3,3E3)}M("shaka.util.DataViewReader",yf);yf.prototype.readTerminatedString=yf.prototype.qc;yf.prototype.seek=yf.prototype.seek;yf.prototype.rewind=yf.prototype.eg;
184
+ yf.prototype.skip=yf.prototype.skip;yf.prototype.readBytes=yf.prototype.Za;yf.prototype.readUint64=yf.prototype.Jb;yf.prototype.readInt32=yf.prototype.Je;yf.prototype.readUint32=yf.prototype.N;yf.prototype.readUint16=yf.prototype.Sd;yf.prototype.readUint8=yf.prototype.Qa;yf.prototype.getLength=yf.prototype.uf;yf.prototype.getPosition=yf.prototype.$;yf.prototype.hasMoreData=yf.prototype.ma;var zf=1;yf.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:zf};function Bf(){this.i=[];this.h=[];this.g=!1}r=Bf.prototype;r.box=function(a,b){var c=Cf(a);this.i[c]=Df;this.h[c]=b;return this};r.U=function(a,b){var c=Cf(a);this.i[c]=Ef;this.h[c]=b;return this};r.stop=function(){this.g=!0};r.parse=function(a,b,c){a=new yf(a,0);for(this.g=!1;a.ma()&&!this.g;)this.Zc(0,a,b,c)};
184
185
  r.Zc=function(a,b,c,d){var e=b.$();if(d&&e+8>b.S.byteLength)this.g=!0;else{var f=b.N(),g=b.N(),h=!1;switch(f){case 0:f=b.S.byteLength-e;break;case 1:if(d&&b.$()+8>b.S.byteLength){this.g=!0;return}f=b.Jb();h=!0}var k=this.h[g];if(k){var l=null,m=null;if(this.i[g]==Ef){if(d&&b.$()+4>b.S.byteLength){this.g=!0;return}m=b.N();l=m>>>24;m&=16777215}g=e+f;c&&g>b.S.byteLength&&(g=b.S.byteLength);d&&g>b.S.byteLength?this.g=!0:(d=g-b.$(),b=0<d?b.Za(d):new Uint8Array(0),b=new yf(b,0),k({parser:this,partialOkay:c||
185
186
  !1,version:l,flags:m,reader:b,size:f,start:e+a,has64BitSize:h}))}else b.skip(Math.min(e+f-b.$(),b.S.byteLength-b.$()))}};function Ff(a){for(var b=Gf(a);a.reader.ma()&&!a.parser.g;)a.parser.Zc(a.start+b,a.reader,a.partialOkay)}function Hf(a){for(var b=Gf(a),c=a.reader.N(),d=0;d<c&&(a.parser.Zc(a.start+b,a.reader,a.partialOkay),!a.parser.g);d++);}function If(a){return function(b){a(b.reader.Za(b.reader.S.byteLength-b.reader.$()))}}
186
- function Cf(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 Lf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Gf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Bf);Bf.headerSize=Gf;Bf.typeToString=Lf;Bf.allData=If;Bf.sampleDescription=Hf;Bf.children=Ff;Bf.prototype.parseNext=Bf.prototype.Zc;Bf.prototype.parse=Bf.prototype.parse;Bf.prototype.stop=Bf.prototype.stop;
187
+ function Cf(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 Jf(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}function Gf(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)}M("shaka.util.Mp4Parser",Bf);Bf.headerSize=Gf;Bf.typeToString=Jf;Bf.allData=If;Bf.sampleDescription=Hf;Bf.children=Ff;Bf.prototype.parseNext=Bf.prototype.Zc;Bf.prototype.parse=Bf.prototype.parse;Bf.prototype.stop=Bf.prototype.stop;
187
188
  Bf.prototype.fullBox=Bf.prototype.U;Bf.prototype.box=Bf.prototype.box;var Df=0,Ef=1;function Mf(a){var b=this;this.g=[];this.h=[];this.data=[];(new Bf).box("moov",Ff).box("moof",Ff).U("pssh",function(c){if(!(1<c.version)){var d=Fb(c.reader.S,-12,c.size);b.data.push(d);b.g.push(Pc(c.reader.Za(16)));if(0<c.version){d=c.reader.N();for(var e=0;e<d;e++){var f=Pc(c.reader.Za(16));b.h.push(f)}}}}).parse(a)}
188
189
  function Nf(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=Oc(c.value),g.set(c,k),k+=c.length;h.setUint32(k,e);g.set(a,k+4);return g};function Of(a,b){var c=Pf(a,b);return 1!=c.length?null:c[0]}function Qf(a,b,c){a=Rf(a,b,c);return 1!=a.length?null:a[0]}function Pf(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 Sf(a){return Array.from(a.childNodes).filter(function(b){return b instanceof Element})}
189
190
  function Rf(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 Tf(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}function Uf(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 Vf(a){return Array.from(a.childNodes).every(Wf)?a.textContent.trim():null}
@@ -191,17 +192,17 @@ function Wf(a){return a.nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION
191
192
  function Zf(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}
192
193
  function $f(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 ag(a){a=Number(a);return 0===a%1?a:null}function bg(a){a=Number(a);return 0===a%1&&0<a?a:null}function cg(a){a=Number(a);return 0===a%1&&0<=a?a:null}function dg(a){a=Number(a);return isNaN(a)?null:a}function eg(a){var b;var c=(b=a.match(/^(\d+)\/(\d+)$/))?Number(b[1])/Number(b[2]):Number(a);return isNaN(c)?null:c}
193
194
  function fg(a,b){var c=new DOMParser,d=gg.value()(a),e=null;try{e=c.parseFromString(d,"text/xml")}catch(f){return null}c=e.documentElement;if(!c||c.getElementsByTagName("parsererror").length||c.tagName!=b)return null;for(e=document.createNodeIterator(e,NodeFilter.SHOW_ALL);d=e.nextNode();)if(d instanceof HTMLElement||d instanceof SVGElement)return null;return c}function hg(a,b){try{var c=Bc(a);return fg(c,b)}catch(d){return null}}
194
- var gg=new mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function ig(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.ha=this.ca=!1;this.I=0;this.g=null;this.s=new of;this.i=new Map;this.C=[];this.o=new lc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ia=new Map;this.da=new Map;this.T=new O(function(){return jg(c)});this.M=!1;this.L=[];this.O=!1;this.ea=(new O(function(){kg(c)})).Da(b);this.o["catch"](function(){});this.j=new mf(function(){return lg(c)});this.Y=!1;this.F=null}r=ig.prototype;r.destroy=function(){return this.j.destroy()};
195
- function lg(a){return K(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,mg(a),2);case 2:if(!a.l){b.A(3);break}C(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.u=null,a.C=[],a.h=null,a.m=function(){},a.D=null,a.Y=!1,a.F=null,A(b)}})}r.configure=function(a){this.h=a};function ng(a,b,c){a.ha=!0;a.C=[];a.M=c;return og(a,b)}
196
- function pg(a,b,c){a.C=c;a.M=0<c.length;return og(a,b)}function qg(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 rg(a,g,[])}
195
+ var gg=new mc(function(){if("undefined"!==typeof trustedTypes){var a=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(b){return b}});return function(b){return a.createHTML(b)}}return function(b){return b}});function ig(a,b){var c=this;b=void 0===b?1:b;this.D=a;this.G=new Set;this.l=this.u=null;this.ha=this.ca=!1;this.I=0;this.g=null;this.s=new of;this.i=new Map;this.B=[];this.o=new lc;this.h=null;this.m=function(d){c.o.reject(d);a.onError(d)};this.ia=new Map;this.da=new Map;this.T=new O(function(){return jg(c)});this.M=!1;this.L=[];this.O=!1;this.ea=(new O(function(){kg(c)})).Ca(b);this.o["catch"](function(){});this.j=new mf(function(){return lg(c)});this.Y=!1;this.F=null}r=ig.prototype;r.destroy=function(){return this.j.destroy()};
196
+ function lg(a){return K(function(b){switch(b.g){case 1:return a.s.release(),a.s=null,a.o.reject(),a.ea.stop(),a.ea=null,a.T.stop(),a.T=null,u(b,mg(a),2);case 2:if(!a.l){b.A(3);break}C(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.u=null,a.B=[],a.h=null,a.m=function(){},a.D=null,a.Y=!1,a.F=null,A(b)}})}r.configure=function(a){this.h=a};function ng(a,b,c){a.ha=!0;a.B=[];a.M=c;return og(a,b)}
197
+ function pg(a,b,c){a.B=c;a.M=0<c.length;return og(a,b)}function qg(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 rg(a,g,[])}
197
198
  function og(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g){if(c=sg(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=vf(a.h.servers),tg(b,h));k=t(b);for(e=k.next();!e.done;e=k.next())for(l=e.value,m=ug(l),n=t(m),p=n.next();!p.done;p=n.next())q=p.value,vg(q,vf(a.h.servers),vf(a.h.advanced||{}),a.h.keySystemsMapping);
198
199
  return u(x,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=rg(a,void 0,b);return x["return"](g?y:y["catch"](function(){}))})}
199
200
  function wg(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 nf(a.j),c["return"]();case 2:return C(c,4),a.F=a.l.setMediaKeys(a.u),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:nf(a.j),A(c)}})}function xg(a,b){return K(function(c){if(1==c.g)return u(c,wg(a),2);yg(a,b.initDataType,Fb(b.initData));A(c)})}
200
- r.Yb=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.u)return b.s.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d["return"]();b.l=a;b.s.oa(b.l,"play",function(){for(var e=t(b.L),f=e.next();!f.done;f=e.next())zg(b,f.value);b.O=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.B(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return mg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.C.length?
201
- u(d,wg(b),2):d.A(2)}Ag(b);c||b.C.length||b.h.parseInbandPsshEnabled||b.s.B(b.l,"encrypted",function(e){return xg(b,e)});A(d)})};
201
+ r.Yb=function(a){var b=this,c;return K(function(d){if(1==d.g){if(!b.u)return b.s.oa(a,"encrypted",function(){b.m(new N(2,6,6010))}),d["return"]();b.l=a;b.s.oa(b.l,"play",function(){for(var e=t(b.L),f=e.next();!f.done;f=e.next())zg(b,f.value);b.O=!0;b.L=[]});"webkitCurrentPlaybackTargetIsWireless"in b.l&&b.s.C(b.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return mg(b)});return(c=b.g.initData.find(function(e){return 0<e.initData.length}))||"com.apple.fps"!==b.g.keySystem||b.B.length?
202
+ u(d,wg(b),2):d.A(2)}Ag(b);c||b.B.length||b.h.parseInbandPsshEnabled||b.s.C(b.l,"encrypted",function(e){return xg(b,e)});A(d)})};
202
203
  function Bg(a){var b,c,d,e,f;return K(function(g){switch(g.g){case 1:if(!a.u||!a.g)return g["return"]();if(!a.g.serverCertificateUri||a.g.serverCertificate&&a.g.serverCertificate.length){g.A(2);break}b=ef([a.g.serverCertificateUri],a.h.retryParameters);C(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"]();
203
204
  C(g,6);return u(g,a.u.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 Cg(a,b){var c,d,e;return K(function(f){if(1==f.g)return u(f,Dg(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 lc,d.push(e.Ja);d.push(c.remove());return u(f,Promise.all(d),3)}a.i["delete"](c);A(f)})}
204
- function Ag(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,yg(a,d.initDataType,d.initData);c=t(a.C);for(d=c.next();!d.done;d=c.next())Dg(a,d.value);b.length||a.C.length||a.o.resolve();return a.o}function yg(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)&&!sc("Tizen 2"))return;0<a.i.size&&Eg(a)&&(a.o.resolve(),a.o=new lc,a.o["catch"](function(){}));Fg(a,b,c,a.g.sessionType)}}
205
+ function Ag(a){for(var b=(a.g?a.g.initData:[])||[],c=t(b),d=c.next();!d.done;d=c.next())d=d.value,yg(a,d.initDataType,d.initData);c=t(a.B);for(d=c.next();!d.done;d=c.next())Dg(a,d.value);b.length||a.B.length||a.o.resolve();return a.o}function yg(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)&&!sc("Tizen 2"))return;0<a.i.size&&Eg(a)&&(a.o.resolve(),a.o=new lc,a.o["catch"](function(){}));Fg(a,b,c,a.g.sessionType)}}
205
206
  function Gg(a){return a?!!a.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Hg(a){a=a.i.keys();a=tf(a,function(b){return b.sessionId});return Array.from(a)}r.ec=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.Nc=function(){return wf(this.da)};
206
207
  function rg(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){switch(x.g){case 1:d=new Map;if(c.length){e=Ig(a,c,d);x.A(2);break}return u(x,Jg(a,b),3);case 3:e=x.h;case 2:f=e;if(!f)throw new N(2,6,6001);nf(a.j);C(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())n=m.value,a.G.add(n.contentType.toLowerCase());p=t(k);for(m=p.next();!m.done;m=p.next())q=m.value,a.G.add(q.contentType.toLowerCase());if(c.length){var w=
207
208
  f.keySystem;var D=d.get(f.keySystem);var z=[],B=[],G=[],E=[],H=new Set;Kg(D,z,G,B,E,H);var I=a.M?"persistent-license":"temporary";w={keySystem:w,licenseServerUri:z[0],distinctiveIdentifierRequired:D[0].distinctiveIdentifierRequired,persistentStateRequired:D[0].persistentStateRequired,sessionType:D[0].sessionType||I,audioRobustness:D[0].audioRobustness||"",videoRobustness:D[0].videoRobustness||"",serverCertificate:G[0],serverCertificateUri:B[0],initData:E,keyIds:H};D=t(D);for(z=D.next();!z.done;z=
@@ -213,9 +214,9 @@ function Jg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){switch(w
213
214
  w.h,w["return"](c);case 6:F(w);case 7:nf(a.j);case 3:h=g.next();w.A(2);break;case 4:m=t([!0,!1]),n=m.next();case 9:if(n.done){w.A(11);break}p=n.value;q=t(b.keys());h=q.next();case 12:if(h.done){n=m.next();w.A(9);break}v=h.value;y=b.get(v);x=y.drmInfos.some(function(D){return!!D.licenseServerUri});if(x!=p){w.A(13);break}C(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:nf(a.j);case 13:h=q.next();w.A(12);break;case 11:return w["return"](c)}})}
214
215
  function sg(a){a=vf(a.h.clearKeys);if(0==a.size)return null;var b=[],c=[];a.forEach(function(e,f){var g=Oc(f),h=Oc(e);g={kty:"oct",kid:Mc(g,!1),k:Mc(h,!1)};b.push(g);c.push(g.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:Fb(Ic(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
215
216
  serverCertificateUri:"",sessionType:"",initData:d,keyIds:new Set(c)}}
216
- function Dg(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.s.B(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(k):zg(a,k)});a.s.B(c,"keystatuseschange",function(k){return Lg(a,k)});e={initData:null,initDataType:null,loaded:!1,Od:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);
217
+ function Dg(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:try{c=a.u.createSession("persistent-license")}catch(k){return d=new N(2,6,6005,k.message),a.m(d),h["return"](Promise.reject(d))}a.s.C(c,"message",function(k){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(k):zg(a,k)});a.s.C(c,"keystatuseschange",function(k){return Lg(a,k)});e={initData:null,initDataType:null,loaded:!1,Pd:Infinity,Ja:null,type:"persistent-license"};a.i.set(c,e);C(h,2);return u(h,c.load(b),4);
217
218
  case 4:f=h.h;nf(a.j);if(!f)return a.i["delete"](c),a.m(new N(2,6,6013)),h["return"](Promise.resolve());e.loaded=!0;Eg(a)&&a.o.resolve();return h["return"](c);case 2:g=F(h),nf(a.j,g),a.i["delete"](c),a.m(new N(2,6,6005,g.message));case 3:return h["return"](Promise.resolve())}})}
218
- function Fg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.s.B(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(f):zg(a,f)});a.s.B(e,"keystatuseschange",function(f){return Lg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Od: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&&Mc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
219
+ function Fg(a,b,c,d){try{var e=a.u.createSession(d)}catch(f){a.m(new N(2,6,6005,f.message));return}a.s.C(e,"message",function(f){a.l&&a.h.delayLicenseRequestUntilPlayed&&a.l.paused&&!a.O?a.L.push(f):zg(a,f)});a.s.C(e,"keystatuseschange",function(f){return Lg(a,f)});a.i.set(e,{initData:c,initDataType:b,loaded:!1,Pd: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&&Mc(c);e.generateRequest(b,c)["catch"](function(f){if(!a.j.g){a.i["delete"](e);
219
220
  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))}})}
220
221
  function zg(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;K(function(x){switch(x.g){case 1:return c=b.target,a.h.logLicenseExchange&&Mc(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=ef([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),
221
222
  Gg(a.g.keySystem)&&Mg(g),h=Date.now(),C(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),n=new N(2,6,6007,m),a.m(n),d&&d.Ja&&d.Ja.reject(n),x["return"]();case 3:if(a.j.g)return x["return"]();a.I+=(Date.now()-h)/1E3;a.h.logLicenseExchange&&Mc(k.data);C(x,5);return u(x,c.update(k.data),7);case 7:va(x,6);break;case 5:return p=F(x),q=new N(2,6,6008,p.message),a.m(q),d&&d.Ja&&d.Ja.reject(q),x["return"]();case 6:if(a.j.g)return x["return"]();v=new R("drmsessionupdate");
@@ -226,10 +227,10 @@ c.close()["catch"](function(){}));Eg(a)&&(a.o.resolve(),a.T.P(Og))}function jg(a
226
227
  function Pg(){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.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,c],f=new Map,g=function(l){var m,n,
227
228
  p;return K(function(q){switch(q.g){case 1:C(q,2);if("org.w3.clearkey"===l&&xc())throw Error("Unsupported keySystem");return u(q,navigator.requestMediaKeySystemAccess(l,e),4);case 4:return m=q.h,p=(n=m.getConfiguration().sessionTypes)?n.includes("persistent-license"):!1,sc("Tizen 3")&&(p=!1),f.set(l,{persistentState:p}),u(q,m.createMediaKeys(),5);case 5:va(q,0);break;case 2:F(q),f.set(l,null),A(q)}})},h=a.map(function(l){return g(l)}),u(k,Promise.all(h),2)):k["return"](wf(f))})}
228
229
  function Qg(a){var b;return K(function(c){if(1==c.g)return b=new Promise(function(d,e){(new O(e)).P(Rg)}),C(c,2),u(c,Promise.race([Promise.all([a.close(),a.closed]),b]),4);if(2!=c.g)return va(c,0);F(c);A(c)})}
229
- function mg(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 C(g,2),a.ha||a.C.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Qg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);A(g)})})),0)})}
230
- function Sg(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={Ea:f.Ea},h=g.next())if(h=h.value,e.keySystem==h.keySystem){f.Ea=[];f.Ea=f.Ea.concat(e.initData||[]);f.Ea=f.Ea.concat(h.initData||[]);f.Ea=f.Ea.filter(function(k){return function(l,m){return void 0===l.keyId||m===k.Ea.findIndex(function(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
230
+ function mg(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 C(g,2),a.ha||a.B.includes(e.sessionId)||"persistent-license"!==f.type?u(g,Qg(e),5):u(g,e.remove(),5);if(2!=g.g)return va(g,0);F(g);A(g)})})),0)})}
231
+ function Sg(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(n){return n.keyId===l.keyId})}}(f));g=e.keyIds&&h.keyIds?new Set([].concat(ia(e.keyIds),ia(h.keyIds))):
231
232
  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,
232
- initData:f.Ea,keyIds:g});break}}return c}function ug(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function kg(a){a.i.forEach(function(b,c){var d=b.Od,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Od=e)})}function Eg(a){a=a.i.values();return uf(a,function(b){return b.loaded})}
233
+ initData:f.Da,keyIds:g});break}}return c}function ug(a){return(a.video?a.video.drmInfos:[]).concat(a.audio?a.audio.drmInfos:[])}function kg(a){a.i.forEach(function(b,c){var d=b.Pd,e=c.expiration;isNaN(e)&&(e=Infinity);e!=d&&(a.D.onExpirationUpdated(c.sessionId,e),b.Pd=e)})}function Eg(a){a=a.i.values();return uf(a,function(b){return b.loaded})}
233
234
  function tg(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)}
234
235
  function Kg(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(n){return Db(n,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={Ac:h.Ac},l=k.next())h.Ac=l.value,e.some(function(m){return function(n){var p=
235
236
  m.Ac;return n.keyId&&n.keyId==p.keyId?!0:n.initDataType==p.initDataType&&Db(n.initData,p.initData)}}(h))||e.push(h.Ac)}if(g.qa.keyIds)for(h=t(g.qa.keyIds),k=h.next();!k.done;k=h.next())f.add(k.value)}}
@@ -246,116 +247,116 @@ function uh(a,b,c,d){if(!(0>c||0>b))if(b>=c)for(--d;0<=d;d--)a.i[b+d]=a.i[c+d].m
246
247
  var mh=0,oh=1,qh=2,sh=3,nh=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"]]),ph=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"]]),rh=new Map([[32,"\u00c1"],[33,"\u00c9"],[34,"\u00d3"],
247
248
  [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"]]),th=new Map([[32,"\u00c3"],[33,"\u00e3"],[34,"\u00cd"],[35,"\u00cc"],[36,"\u00ec"],[37,"\u00d2"],[38,"\u00f2"],
248
249
  [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 vh(a,b){this.h=wh;this.o=new hh(a,b);this.i=new hh(a,b);this.l=new hh(a,b);this.g=this.i;this.j=0;this.m=null}function xh(a,b,c){a.g=a.i;var d=a.g,e=null;a.h!==yh&&a.h!==zh&&(e=jh(d,a.j,c),c=a.i,c.g=0<c.h?c.h:0,kh(c,0,15),c=a.l,c.g=0<c.h?c.h:0,kh(c,0,15),d.g=15);a.h=yh;d.h=b;return e}function Ah(a){a.h=Bh;a.g=a.l;a.g.h=0}function Ch(a){Wa("Cea608DataChannel","CEA-608 text mode entered, but is unsupported");a.g=a.o;a.h=zh}
249
- var wh=0,Bh=1,yh=3,zh=4,Dh="black green blue cyan red yellow magenta black".split(" "),Eh="white green blue cyan red yellow magenta white_italics".split(" ");function Fh(){this.l=!1;this.C=this.F=0;this.D=Gh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Hh(this)}function Hh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Ih())}function Ih(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Jh(a,b){Kh(a)&&(a.i[a.h][a.g]=new gh(b,a.u,a.o,a.m,a.s),a.g++)}function Kh(a){var b=a.g<a.C&&0<=a.g;return a.h<a.F&&0<=a.h&&b}Fh.prototype.isVisible=function(){return this.l};
250
+ var wh=0,Bh=1,yh=3,zh=4,Dh="black green blue cyan red yellow magenta black".split(" "),Eh="white green blue cyan red yellow magenta white_italics".split(" ");function Fh(){this.l=!1;this.B=this.F=0;this.D=Gh;this.i=[];this.g=this.h=this.j=0;this.u=this.o=!1;this.s="white";this.m="black";Hh(this)}function Hh(a){a.i=[];for(var b=0;15>b;b++)a.i.push(Ih())}function Ih(){for(var a=[],b=0;42>b;b++)a.push(null);return a}function Jh(a,b){Kh(a)&&(a.i[a.h][a.g]=new gh(b,a.u,a.o,a.m,a.s),a.g++)}function Kh(a){var b=a.g<a.B&&0<=a.g;return a.h<a.F&&0<=a.h&&b}Fh.prototype.isVisible=function(){return this.l};
250
251
  function Lh(a,b,c){var d=new hb(a.j,b,"");d.textAlign=a.D===Mh?"left":a.D===Nh?"right":lb;if(c=dh(d,"svc"+c,a.i,a.j,b))a.j=b;return c}var Mh=0,Nh=1,Gh=2;function Oh(){this.i=[];this.h=null;this.g=0}function Ph(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 Qh(a.h)),a.h=null,a.g=0))}function Qh(a){this.g=0;this.h=a}Qh.prototype.ma=function(){return this.g<this.h.length};Qh.prototype.$=function(){return this.g};function Rh(a){if(!a.ma())throw new N(2,2,3E3);return a.h[a.g++]}Qh.prototype.skip=function(a){if(this.g+a>this.h.length)throw new N(2,2,3E3);this.g+=a};function Sh(a){this.i=a;this.h=[null,null,null,null,null,null,null,null];this.g=null}
251
252
  function Th(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=Rh(b).value;b=null;c=t(Uh(a,c));for(var e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Lh(e,d,a.i)),Hh(e);return b}if(137===c)for(b=Rh(b).value,b=t(Uh(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=Rh(b).value;b=null;c=t(Uh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()&&(b=Lh(e,d,a.i)),e.l=!1;return b}if(139===c){c=Rh(b).value;
252
253
  b=null;c=t(Uh(a,c));for(e=c.next();!e.done;e=c.next())e=a.h[e.value],e.isVisible()?b=Lh(e,d,a.i):e.j=d,e.l=!e.l;return b}if(140===c)return b=Rh(b).value,Vh(a,b,d);if(143===c)return d=Vh(a,255,d),Wh(a),d;if(144===c)b.skip(1),d=Rh(b).value,a.g&&(a.g.o=0<(d&128),a.g.u=0<(d&64));else if(145===c)d=Rh(b).value,c=Rh(b).value,b.skip(1),a.g&&(b=Xh((c&48)>>4,(c&12)>>2,c&3),a.g.s=Xh((d&48)>>4,(d&12)>>2,d&3),a.g.m=b);else if(146===c)d=Rh(b).value,b=Rh(b).value,a.g&&(a=a.g,a.h=d&15,a.g=b&63);else if(151===c)b.skip(1),
253
- b.skip(1),d=Rh(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 Fh;f.j=d;a.h[c]=f}d=Rh(b).value;Rh(b);Rh(b);f=Rh(b).value;var g=Rh(b).value;b=Rh(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 Uh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
254
+ b.skip(1),d=Rh(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 Fh;f.j=d;a.h[c]=f}d=Rh(b).value;Rh(b);Rh(b);f=Rh(b).value;var g=Rh(b).value;b=Rh(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.B=(g&63)+1;a.g=a.h[c]}}}return null}function Uh(a,b){for(var c=[],d=0;8>d;d++)1===(b&1)&&a.h[d]&&c.push(d),b>>=1;return c}
254
255
  function Vh(a,b,c){var d=null;b=t(Uh(a,b));for(var e=b.next();!e.done;e=b.next()){e=e.value;var f=a.h[e];f.isVisible()&&(d=Lh(f,c,a.i));a.h[e]=null}return d}function Wh(a){a.g=null;a.h=[null,null,null,null,null,null,null,null]}function Xh(a,b,c){var d={0:0,1:0,2:1,3:1};a=d[a];b=d[b];c=d[c];return Yh[a<<2|b<<1|c]}
255
256
  var Zh=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"]]),Yh="black blue green cyan red magenta yellow white".split(" ");function $h(){this.h=[];this.g=[];this.i=new Oh;this.l=0;this.s=new Map([["CC1",new vh(0,0)],["CC2",new vh(0,1)],["CC3",new vh(1,0)],["CC4",new vh(1,1)]]);this.o=this.m=0;this.j=new Map;ai(this)}function ai(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,ih(b.i),ih(b.l),ih(b.o)}
256
257
  function bi(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=ci(a,e.value))&&c.push(e);d=t(a.g);for(e=d.next();!e.done;e=d.next())Ph(a.i,e.value);d=t(a.i.i);for(e=d.next();!e.done;e=d.next())e=di(a,e.value),c.push.apply(c,ia(e));a.i.i=[];a.h=[];a.g=[];return c}
257
- function ci(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.Ma||!b.xa&&!b.Ma||!ei(b.xa)||!ei(b.Ma))return 45<=++a.l&&ai(a),null;a.l=0;b.xa&=127;b.Ma&=127;if(!b.xa&&!b.Ma)return null;d=null;if(16===(b.xa&112))a:{var e=b.xa;d=b.Ma;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=Eh[f]:7===f&&(h=!0);
258
+ function ci(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.La||!b.xa&&!b.La||!ei(b.xa)||!ei(b.La))return 45<=++a.l&&ai(a),null;a.l=0;b.xa&=127;b.La&=127;if(!b.xa&&!b.La)return null;d=null;if(16===(b.xa&112))a:{var e=b.xa;d=b.La;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=Eh[f]:7===f&&(h=!0);
258
259
  d=1===(d&1);if(c.h!==zh){f=c.g;if(c.h===yh&&e!==f.g){var k=1+e-f.h;uh(f,k,1+f.g-f.h,f.h);kh(f,0,k-1);kh(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",lh(c.g,mh,32),g=!1,e=Eh[(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=Dh[(d&14)>>1]),c.g.o=g;else if(17===(e&247)&&48===(d&240))lh(c.g,oh,d);else if(18===
259
- (e&246)&&32===(d&224))lh(c.g,e&1?sh:qh,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.Ma){case 32:Ah(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=xh(c,2,d);break;case 38:e=xh(c,3,d);break;case 39:e=xh(c,4,d);break;case 40:lh(c.g,mh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:ih(c.o);Ch(c);break;case 43:Ch(c);break;case 44:e=c.i;g=null;c.h!==zh&&(g=jh(e,c.j,d));kh(e,0,15);e=g;break;case 45:e=c.g;c.h!==yh?e=null:(g=jh(e,c.j,d),h=e.g-e.h+1,uh(e,h-1,h,e.h),kh(e,
260
- 0,h-1),kh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:kh(c.l,0,15);break;case 47:e=null,c.h!==zh&&(e=jh(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Ah(c),c.j=d}d=e;break a}d=null}else e=b.Ma,lh(c.g,mh,b.xa),lh(c.g,mh,e);return d}
261
- function di(a,b){var c=[];try{for(;b.ma();){var d=Rh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Rh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Sh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=Rh(e),l=k.value,m=k.pts;if(16===l){var n=Rh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Kh(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=Lh(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,y=1;15>y;y++,
260
+ (e&246)&&32===(d&224))lh(c.g,e&1?sh:qh,d);else if(20===(e&246)&&32===(d&240)){d=b.pts;e=null;switch(b.La){case 32:Ah(c);break;case 33:c=c.g;c.i[c.g].pop();break;case 37:e=xh(c,2,d);break;case 38:e=xh(c,3,d);break;case 39:e=xh(c,4,d);break;case 40:lh(c.g,mh,32);break;case 41:c.h=2;c.g=c.i;c.g.h=0;c.j=d;break;case 42:ih(c.o);Ch(c);break;case 43:Ch(c);break;case 44:e=c.i;g=null;c.h!==zh&&(g=jh(e,c.j,d));kh(e,0,15);e=g;break;case 45:e=c.g;c.h!==yh?e=null:(g=jh(e,c.j,d),h=e.g-e.h+1,uh(e,h-1,h,e.h),kh(e,
261
+ 0,h-1),kh(e,e.g,15-e.g),c.j=d,e=g);break;case 46:kh(c.l,0,15);break;case 47:e=null,c.h!==zh&&(e=jh(c.i,c.j,d)),g=c.l,c.l=c.i,c.i=g,Ah(c),c.j=d}d=e;break a}d=null}else e=b.La,lh(c.g,mh,b.xa),lh(c.g,mh,e);return d}
262
+ function di(a,b){var c=[];try{for(;b.ma();){var d=Rh(b).value,e=(d&224)>>5,f=d&31;7===e&&0!=f&&(e=Rh(b).value&63);if(0!=e){a.j.has(e)||a.j.set(e,new Sh(e));for(var g=a.j.get(e),h=b.$();b.$()-h<f;){e=b;var k=Rh(e),l=k.value,m=k.pts;if(16===l){var n=Rh(e);l=l<<16|n.value}if(0<=l&&31>=l){var p=m;if(g.g){var q=g.g;e=null;switch(l){case 8:!Kh(q)||0>=q.g&&0>=q.h||(0>=q.g?(q.g=q.B-1,q.h--):q.g--,q.i[q.h][q.g]=null);break;case 13:q.isVisible()&&(e=Lh(q,p,g.i));if(q.h+1>=q.F){p=q;for(var v=0,y=1;15>y;y++,
262
263
  v++)p.i[v]=p.i[y];for(y=0;1>y;y++,v++)p.i[v]=Ih()}else q.h++;q.g=0;break;case 14:q.isVisible()&&(e=Lh(q,p,g.i));q.i[q.h]=Ih();q.g=0;break;case 12:q.isVisible()&&(e=Lh(q,p,g.i)),Hh(q),p=q,p.h=0,p.g=0}var x=e}else x=null}else if(128<=l&&159>=l)x=Th(g,e,l,m);else{if(4096<=l&&4127>=l)p=l&255,8<=p&&15>=p?e.skip(1):16<=p&&23>=p?e.skip(2):24<=p&&31>=p&&e.skip(3);else if(4224<=l&&4255>=l)p=l&255,128<=p&&135>=p?e.skip(4):136<=p&&143>=p&&e.skip(5);else if(32<=l&&127>=l)e=l,g.g&&(127===e?Jh(g.g,"\u266a"):Jh(g.g,
263
- String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Jh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Zh.has(e)){var w=Zh.get(e);Jh(g.g,w)}else Jh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Jh(g.g,"_"):Jh(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 ei(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function fi(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,re:c,hf:d}}function gi(a,b){return{le:1==b?a.Jb():a.N()}}function hi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
264
- function ii(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={Vd:null,sampleSize:null,ad:null};c&256&&(g.Vd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.ad=0==b?a.N():a.Ie());e.push(g)}return{fh:d,Ke:e}};function ji(){this.i=new Map;this.h=this.g=0}
264
+ String.fromCharCode(e)));else if(160<=l&&255>=l)g.g&&Jh(g.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(e=l&255,g.g)if(Zh.has(e)){var w=Zh.get(e);Jh(g.g,w)}else Jh(g.g,"_")}else 4256<=l&&4351>=l&&g.g&&(160!=(l&255)?Jh(g.g,"_"):Jh(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 ei(a){for(var b=0;a;)b^=a&1,a>>=1;return 1===b};function fi(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,se:c,jf:d}}function gi(a,b){return{me:1==b?a.Jb():a.N()}}function hi(a,b){1==b?(a.skip(8),a.skip(8)):(a.skip(4),a.skip(4));return{timescale:a.N()}}
265
+ function ii(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={Wd:null,sampleSize:null,ad:null};c&256&&(g.Wd=a.N());c&512&&(g.sampleSize=a.N());c&1024&&a.skip(4);c&2048&&(g.ad=0==b?a.N():a.Je());e.push(g)}return{gh:d,Le:e}};function ji(){this.i=new Map;this.h=this.g=0}
265
266
  ji.prototype.init=function(a){var b=this,c=[],d=[];(new Bf).box("moov",Ff).box("mvex",Ff).U("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",Ff).U("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",Ff).U("mdhd",function(e){e=hi(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])})};
266
- ji.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Bf).box("moof",Ff).box("traf",Ff).U("trun",function(k){f=ii(k.reader,k.version,k.flags).Ke}).U("tfhd",function(k){k=fi(k.reader,k.flags);d=k.re||b.g;e=k.hf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=gi(k.reader,k.version).le}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,y=p;for(q.length&&(y=q[0].sampleSize||p);k.ma();){var x=k.N();if(6==
267
- (k.Ra()&31)){var w=0;q.length>v&&(w=q[v].ad||0);w=(l+w)/m;for(var D=[],z,B=k.Za(x-1),G=z=0;G<B.length;)2==z&&3==B[G]?(z=0,B=[].concat(ia(B)),B.splice(G,1),B=new Uint8Array(B)):0==B[G]?z++:z=0,G++;z=B;for(G=0;G<z.length;){for(B=0;255==z[G];)B+=255,G++;B+=z[G++];for(var E=0;255==z[G];)E+=255,G++;E+=z[G++];4==B&&D.push(z.subarray(G,G+E));G+=E}D=t(D);for(z=D.next();!z.done;z=D.next())c.push({Uf:z.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=q.length>v?l+(q[v].Vd||n):l+n,v++,y=q.length>
267
+ ji.prototype.parse=function(a){var b=this,c=[],d=this.g,e=this.h,f=[],g=null,h=9E4;(new Bf).box("moof",Ff).box("traf",Ff).U("trun",function(k){f=ii(k.reader,k.version,k.flags).Le}).U("tfhd",function(k){k=fi(k.reader,k.flags);d=k.se||b.g;e=k.jf||b.h;k=k.trackId;b.i.has(k)&&(h=b.i.get(k))}).U("tfdt",function(k){g=gi(k.reader,k.version).me}).box("mdat",function(k){if(null===g)throw new N(2,2,2010);k=k.reader;var l=g,m=h,n=d,p=e,q=f,v=0,y=p;for(q.length&&(y=q[0].sampleSize||p);k.ma();){var x=k.N();if(6==
268
+ (k.Qa()&31)){var w=0;q.length>v&&(w=q[v].ad||0);w=(l+w)/m;for(var D=[],z,B=k.Za(x-1),G=z=0;G<B.length;)2==z&&3==B[G]?(z=0,B=[].concat(ia(B)),B.splice(G,1),B=new Uint8Array(B)):0==B[G]?z++:z=0,G++;z=B;for(G=0;G<z.length;){for(B=0;255==z[G];)B+=255,G++;B+=z[G++];for(var E=0;255==z[G];)E+=255,G++;E+=z[G++];4==B&&D.push(z.subarray(G,G+E));G+=E}D=t(D);for(z=D.next();!z.done;z=D.next())c.push({Vf:z.value,pts:w})}else try{k.skip(x-1)}catch(H){break}y-=x+4;0==y&&(l=q.length>v?l+(q[v].Wd||n):l+n,v++,y=q.length>
268
269
  v?q[v].sampleSize||p:p)}}).parse(a,!1);return c};function ki(){this.h=new ji;this.g=new $h}ki.prototype.init=function(a){this.h.init(a)};
269
- function li(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.Uf);if(0<f.length&&(d=a.g,e=e.pts,f=new yf(f,0),181===f.Ra()&&49===f.Rd()&&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(),n=f.Ra();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,xa:m,Ma:n,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:n,order:d.g.length})))}}}}return bi(a.g)}
270
- ;function mi(a,b,c,d){this.ya=a;this.Ca=b;this.la=c;this.Id=void 0===d?null:d}mi.prototype.ic=function(){return this.Ca};mi.prototype.dc=function(){return this.la};function ni(a,b){return a&&b?a.ic()==b.ic()&&a.dc()==b.dc()&&gb(a.ya(),b.ya()):a==b}M("shaka.media.InitSegmentReference",mi);mi.prototype.getEndByte=mi.prototype.dc;mi.prototype.getStartByte=mi.prototype.ic;
271
- function oi(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){l=void 0===l?[]:l;q=void 0===q?pi:q;this.startTime=a;this.j=this.endTime=b;this.o=c;this.Ca=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.m=void 0===n?null:n;this.g=void 0===p?null:p;this.status=q;this.l=void 0===v?null:v}r=oi.prototype;r.ya=function(){return this.o()};r.getStartTime=function(){return this.startTime};r.qf=function(){return this.endTime};r.ic=function(){return this.Ca};
272
- r.dc=function(){return this.la};r.Hf=function(){return this.tilesLayout};r.Gf=function(){return this.m};r.Cb=function(){return this.status};r.Of=function(){this.status=qi};M("shaka.media.SegmentReference",oi);oi.prototype.markAsUnavailable=oi.prototype.Of;oi.prototype.getStatus=oi.prototype.Cb;oi.prototype.getTileDuration=oi.prototype.Gf;oi.prototype.getTilesLayout=oi.prototype.Hf;oi.prototype.getEndByte=oi.prototype.dc;oi.prototype.getStartByte=oi.prototype.ic;oi.prototype.getEndTime=oi.prototype.qf;
273
- oi.prototype.getStartTime=oi.prototype.getStartTime;oi.prototype.getUris=oi.prototype.ya;var pi=0,qi=1;oi.Status={tg:pi,Zg:qi,Ig:2};function ri(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 si(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ti(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)}
274
- function ui(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(vi(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 wi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=vi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function vi(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 xi(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.T=d||function(){};this.i={};this.o=new of;this.u={};this.C=b;this.G=new lc;this.l=yi(this,this.G);this.D=new mf(function(){return zi(e)});this.I="";this.s=!1;this.O=new lc}function yi(a,b){var c=new MediaSource;a.o.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Ai(c);a.j.src=a.I;return c}r=xi.prototype;r.destroy=function(){return this.D.destroy()};
275
- function zi(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"](cc)),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=
270
+ function li(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.Vf);if(0<f.length&&(d=a.g,e=e.pts,f=new yf(f,0),181===f.Qa()&&49===f.Sd()&&1195456820===f.N()&&3===f.Qa())){var g=f.Qa();if(0!==(g&64)){g&=31;f.skip(1);for(var h=0;h<g;h++){var k=f.Qa(),l=(k&4)>>2,m=f.Qa(),n=f.Qa();l&&(k&=3,0===k||1===k?d.h.push({pts:e,type:k,xa:m,La:n,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:n,order:d.g.length})))}}}}return bi(a.g)}
271
+ ;function mi(a,b,c,d){this.ya=a;this.Ba=b;this.la=c;this.Jd=void 0===d?null:d}mi.prototype.ic=function(){return this.Ba};mi.prototype.dc=function(){return this.la};function ni(a,b){return a&&b?a.ic()==b.ic()&&a.dc()==b.dc()&&gb(a.ya(),b.ya()):a==b}M("shaka.media.InitSegmentReference",mi);mi.prototype.getEndByte=mi.prototype.dc;mi.prototype.getStartByte=mi.prototype.ic;
272
+ function oi(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){l=void 0===l?[]:l;q=void 0===q?pi:q;this.startTime=a;this.j=this.endTime=b;this.o=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.m=void 0===n?null:n;this.g=void 0===p?null:p;this.status=q;this.l=void 0===v?null:v}r=oi.prototype;r.ya=function(){return this.o()};r.getStartTime=function(){return this.startTime};r.rf=function(){return this.endTime};r.ic=function(){return this.Ba};
273
+ r.dc=function(){return this.la};r.If=function(){return this.tilesLayout};r.Hf=function(){return this.m};r.Cb=function(){return this.status};r.Pf=function(){this.status=qi};M("shaka.media.SegmentReference",oi);oi.prototype.markAsUnavailable=oi.prototype.Pf;oi.prototype.getStatus=oi.prototype.Cb;oi.prototype.getTileDuration=oi.prototype.Hf;oi.prototype.getTilesLayout=oi.prototype.If;oi.prototype.getEndByte=oi.prototype.dc;oi.prototype.getStartByte=oi.prototype.ic;oi.prototype.getEndTime=oi.prototype.rf;
274
+ oi.prototype.getStartTime=oi.prototype.getStartTime;oi.prototype.getUris=oi.prototype.ya;var pi=0,qi=1;oi.Status={ug:pi,$g:qi,Jg:2};function ri(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 si(a){return!a||1==a.length&&1E-6>a.end(0)-a.start(0)?null:a.length?a.end(a.length-1):null}function ti(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)}
275
+ function ui(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(vi(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 wi(a,b,c){if(!a||!a.length||1==a.length&&1E-6>a.end(0)-a.start(0))return null;a=vi(a).findIndex(function(d,e,f){return d.start>b&&(0==e||f[e-1].end-b<=c)});return 0<=a?a:null}function vi(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 xi(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.T=d||function(){};this.i={};this.s=new of;this.o={};this.B=b;this.G=new lc;this.l=yi(this,this.G);this.D=new mf(function(){return zi(e)});this.I="";this.u=!1;this.O=new lc}function yi(a,b){var c=new MediaSource;a.s.oa(c,"sourceopen",function(){URL.revokeObjectURL(a.I);b.resolve()});a.I=Ai(c);a.j.src=a.I;return c}r=xi.prototype;r.destroy=function(){return this.D.destroy()};
276
+ function zi(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"](cc)),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.o)b.push(a.o[k].destroy());return u(l,Promise.all(b),2)}a.s&&(a.s.release(),a.s=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.o={};a.B=null;a.i=
276
277
  {};A(l)})}
277
- 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(n){if(1==n.g)return e=kc,u(n,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=Xc(k.mimeType,k.codecs),f.pa==e.X?Bi(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Sc(l,f.pa)||(d.u[f.pa]=new Rc,l=Uc(f.pa,l)),m=d.l.addSourceBuffer(l),d.o.B(m,"error",function(p){return function(){d.i[p.pa][0].p.reject(new N(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.o.B(m,"updateend",
278
+ 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(n){if(1==n.g)return e=kc,u(n,d.G,2);d.u=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=Xc(k.mimeType,k.codecs),f.pa==e.X?Bi(d,l,c):(!b&&MediaSource.isTypeSupported(l)||!Sc(l,f.pa)||(d.o[f.pa]=new Rc,l=Uc(f.pa,l)),m=d.l.addSourceBuffer(l),d.s.C(m,"error",function(p){return function(){d.i[p.pa][0].p.reject(new N(2,3,3014,d.j.error?d.j.error.code:0))}}(f)),d.s.C(m,"updateend",
278
279
  function(p){return function(){return Ci(d,p.pa)}}(f)),d.h[f.pa]=m,d.M[f.pa]=l,d.i[f.pa]=[],d.L[f.pa]=!!k.drmInfos.length);A(n)})};function Bi(a,b,c){a.g||(a.g=new bd(a.m));var d=a.g;a=a.F;"application/cea-608"!=b&&"application/cea-708"!=b&&(d.j=(0,dd[b])(),d.j.setSequenceMode?d.j.setSequenceMode(c):Va('Text parsers should have a "setSequenceMode" method!'),d.u=a)}function Di(a){return a.l?"ended"==a.l.readyState:!0}function Ei(a,b){return b==jc?a.g.g:ri(Fi(a,b))}
279
- function Gi(a,b){return b==jc?a.g.h:si(Fi(a,b))}function Hi(a,b,c){if(b==jc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Fi(a,b);return ui(a,c)}r.Na=function(){var a={total:vi(this.j.buffered),audio:vi(Fi(this,"audio")),video:vi(Fi(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 Fi(a,b){try{return a.h[b].buffered}catch(c){return null}}
280
- function Ii(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E;return K(function(H){switch(H.g){case 1:h=kc;if(b!=h.X){H.A(2);break}if(!a.s){H.A(3);break}return u(H,a.O,4);case 4:k=H.h,a.g.s=k;case 3:return u(H,ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return H["return"]();case 2:if(!a.u[b]){e&&(a.g||Bi(a,"text/vtt",a.s),d?(l=li(a.C,c),l.length&&(m=a.h[h.ra].timestampOffset,jd(a.g,l,d.startTime,d.endTime,m))):a.C.init(c));H.A(6);break}return u(H,Vc(a.u[b],
281
- c),7);case 7:n=H.h,a.g||Bi(a,"text/vtt",a.s),n.metadata&&(p=a.h[b].timestampOffset,a.T(n.metadata,p,d?d.endTime:null)),n.captions&&n.captions.length&&(q=a.h[h.ra].timestampOffset,v=hd(n.captions),jd(a.g,v,d?d.startTime:null,d?d.endTime:null,q)),c=n.data;case 6:c=Ji(a,c,d?d.startTime:null,b);y=a.h[b];x=Ki;if(!a.s||y.mode==x||!d){H.A(8);break}w=b==h.ra||!(h.ra in a.h);if(!w){H.A(9);break}D=[y.appendWindowStart,y.appendWindowEnd];y.appendWindowStart=0;y.appendWindowEnd=Infinity;z=y.timestampOffset;y.timestampOffset=
282
- 0;return u(H,Li(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return u(H,Li(a,b,function(){return Mi(a,b)}),11);case 11:return y.timestampOffset=z,y.appendWindowStart=D[0],y.appendWindowEnd=D[1],B=ri(Fi(a,b)),G=(d.startTime||0)-(B||0),a.O.resolve(G),u(H,Li(a,b,function(){return Ni(a,b,0,a.l.duration)}),12);case 12:if(b!=h.ra){H.A(9);break}return u(H,Li(a,b,function(){a.j.currentTime-=.001;Ci(a,b)}),9);case 9:y.mode=x;case 8:return d&&a.s&&b!=h.X&&(f||g)&&(E=d.startTime,Li(a,b,function(){return Mi(a,
283
- b)}),Li(a,b,function(){var I=E;0>I&&(I+=.001);a.h[b].timestampOffset=I;Ci(a,b)})),u(H,Li(a,b,function(){a.h[b].appendBuffer(c)}),15);case 15:A(H)}})}function Oi(a,b){var c=Gi(a,"video")||0;gd(a.g,b,c)}function Pi(a){a.g&&gd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return K(function(f){e=kc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,Li(d,a,function(){return Ni(d,a,b,c)}),0)})};
280
+ function Gi(a,b){return b==jc?a.g.h:si(Fi(a,b))}function Hi(a,b,c){if(b==jc)return a=a.g,null==a.h||a.h<c?0:a.h-Math.max(c,a.g);a=Fi(a,b);return ui(a,c)}r.Ma=function(){var a={total:vi(this.j.buffered),audio:vi(Fi(this,"audio")),video:vi(Fi(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 Fi(a,b){try{return a.h[b].buffered}catch(c){return null}}
281
+ function Ii(a,b,c,d,e,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E;return K(function(H){switch(H.g){case 1:h=kc;if(b!=h.X){H.A(2);break}if(!a.u){H.A(3);break}return u(H,a.O,4);case 4:k=H.h,a.g.s=k;case 3:return u(H,ed(a.g,c,d?d.startTime:null,d?d.endTime:null),5);case 5:return H["return"]();case 2:if(!a.o[b]){e&&(a.g||Bi(a,"text/vtt",a.u),d?(l=li(a.B,c),l.length&&(m=a.h[h.ra].timestampOffset,jd(a.g,l,d.startTime,d.endTime,m))):a.B.init(c));H.A(6);break}f&&a.o[b].g.resetCaptions();
282
+ return u(H,Vc(a.o[b],c),7);case 7:n=H.h,a.g||Bi(a,"text/vtt",a.u),n.metadata&&(p=a.h[b].timestampOffset,a.T(n.metadata,p,d?d.endTime:null)),n.captions&&n.captions.length&&(q=a.h[h.ra].timestampOffset,v=hd(n.captions),jd(a.g,v,d?d.startTime:null,d?d.endTime:null,q)),c=n.data;case 6:c=Ji(a,c,d?d.startTime:null,b);y=a.h[b];x=Ki;if(!a.u||y.mode==x||!d){H.A(8);break}w=b==h.ra||!(h.ra in a.h);if(!w){H.A(9);break}D=[y.appendWindowStart,y.appendWindowEnd];y.appendWindowStart=0;y.appendWindowEnd=Infinity;
283
+ z=y.timestampOffset;y.timestampOffset=0;return u(H,Li(a,b,function(){a.h[b].appendBuffer(c)}),10);case 10:return u(H,Li(a,b,function(){return Mi(a,b)}),11);case 11:return y.timestampOffset=z,y.appendWindowStart=D[0],y.appendWindowEnd=D[1],B=ri(Fi(a,b)),G=(d.startTime||0)-(B||0),a.O.resolve(G),u(H,Li(a,b,function(){return Ni(a,b,0,a.l.duration)}),12);case 12:if(b!=h.ra){H.A(9);break}return u(H,Li(a,b,function(){a.j.currentTime-=.001;Ci(a,b)}),9);case 9:y.mode=x;case 8:return d&&a.u&&b!=h.X&&(f||g)&&
284
+ (E=d.startTime,Li(a,b,function(){return Mi(a,b)}),Li(a,b,function(){var I=E;0>I&&(I+=.001);a.h[b].timestampOffset=I;Ci(a,b)})),u(H,Li(a,b,function(){a.h[b].appendBuffer(c)}),15);case 15:A(H)}})}function Oi(a,b){var c=Gi(a,"video")||0;gd(a.g,b,c)}function Pi(a){a.g&&gd(a.g,"",0)}r.remove=function(a,b,c){var d=this,e;return K(function(f){e=kc;return a==e.X?u(f,d.g.remove(b,c),0):u(f,Li(d,a,function(){return Ni(d,a,b,c)}),0)})};
284
285
  function Qi(a,b){var c;return K(function(d){c=kc;return b==c.X?a.g?u(d,a.g.remove(0,Infinity),0):d["return"]():u(d,Li(a,b,function(){return Ni(a,b,0,a.l.duration)}),0)})}r.flush=function(a){var b=this,c;return K(function(d){c=kc;return a==c.X?d["return"]():u(d,Li(b,a,function(){b.j.currentTime-=.001;Ci(b,a)}),0)})};
285
286
  function Ri(a,b,c,d,e,f){var g;return K(function(h){g=kc;return b==g.X?(f||(a.g.s=c),fd(a.g,d,e),h["return"]()):u(h,Promise.all([Li(a,b,function(){return Mi(a,b)}),f?Promise.resolve():Li(a,b,function(){var k=c;0>k&&(k+=.001);a.h[b].timestampOffset=k;Ci(a,b)}),Li(a,b,function(){a.h[b].appendWindowStart=0;a.h[b].appendWindowEnd=e;a.h[b].appendWindowStart=d;Ci(a,b)})]),0)})}
286
287
  r.endOfStream=function(a){var b=this;return K(function(c){return u(c,Si(b,function(){Di(b)||(a?b.l.endOfStream(a):b.l.endOfStream())}),0)})};r.Ia=function(a){var b=this;return K(function(c){return u(c,Si(b,function(){if(a<b.l.duration)for(var d in b.h){var e={start:function(){},p:new lc};b.i[d].unshift(e)}b.l.duration=a}),0)})};r.getDuration=function(){return this.l.duration};function Ni(a,b,c,d){d<=c?Ci(a,b):a.h[b].remove(c,d)}
287
288
  function Mi(a,b){var c=a.h[b].appendWindowStart,d=a.h[b].appendWindowEnd;a.h[b].abort();a.h[b].appendWindowStart=c;a.h[b].appendWindowEnd=d;Ci(a,b)}function Ci(a,b){var c=a.i[b][0];c&&(c.p.resolve(),Ti(a,b))}function Li(a,b,c){nf(a.D);c={start:c,p:new lc};a.i[b].push(c);1==a.i[b].length&&Ui(a,b);return c.p}
288
289
  function Si(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:nf(a.D);c=[];d={};for(e in a.h)d.Sb=new lc,f={start:function(l){return function(){return l.Sb.resolve()}}(d),p:d.Sb},a.i[e].push(f),c.push(d.Sb),1==a.i[e].length&&f.start(),d={Sb:d.Sb};C(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)Ti(a,h)}A(k)}})}function Ti(a,b){a.i[b].shift();Ui(a,b)}
289
- function Ui(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)),Ti(a,b)}}function Ji(a,b,c,d){var e=a.L[d];null==c&&e&&(tc()||rc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=$g(b));return b}var Ai=window.URL.createObjectURL,Ki="sequence",Vi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.l=a;this.$c=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.xf=function(){return this.g};r.Ia=function(a){this.i=a};r.Cf=function(){return this.l};r.Oe=function(a){this.o=a};r.wc=function(a){this.s=a};r.ce=function(a){this.m=a};r.jg=function(a){this.$c=a};r.pf=function(){return this.$c};
290
- r.Gb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Md(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.Gd=function(){this.F=!0};r.Md=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Ld=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)};
291
- r.V=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.gb()-this.m)};r.Pe=function(a){this.u=a};r.gb=function(){return this.V()||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.hc=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.gb()-this.m+a,this.Oa()))};r.Bb=function(){return this.hc(0)};
292
- r.Oa=function(){return Math.max(0,this.gb()-(this.V()||this.jb()?this.$c:0))};r.Se=function(){return null==this.l||null!=this.h&&this.C?!1:!0};r.Ne=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Ne;T.prototype.usingPresentationStartTime=T.prototype.Se;T.prototype.getSeekRangeEnd=T.prototype.Oa;T.prototype.getSeekRangeStart=T.prototype.Bb;T.prototype.getSafeSeekRangeStart=T.prototype.hc;T.prototype.getSegmentAvailabilityEnd=T.prototype.gb;
293
- T.prototype.setUserSeekStart=T.prototype.Pe;T.prototype.getSegmentAvailabilityStart=T.prototype.Pa;T.prototype.isInProgress=T.prototype.jb;T.prototype.isLive=T.prototype.V;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Ld;T.prototype.notifyMinSegmentStartTime=T.prototype.Md;T.prototype.lockStartTime=T.prototype.Gd;T.prototype.notifySegments=T.prototype.Gb;T.prototype.getDelay=T.prototype.pf;T.prototype.setDelay=T.prototype.jg;
294
- T.prototype.setSegmentAvailabilityDuration=T.prototype.ce;T.prototype.setStatic=T.prototype.wc;T.prototype.setClockOffset=T.prototype.Oe;T.prototype.getPresentationStartTime=T.prototype.Cf;T.prototype.setDuration=T.prototype.Ia;T.prototype.getMaxSegmentDuration=T.prototype.xf;T.prototype.getDuration=T.prototype.getDuration;function Wi(a,b,c){this.l=c;this.j=a;this.s=Xi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}Wi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function Yi(a,b){a.i=b}function Zi(a){this.g=a}function Xi(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(vi(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 $i(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new of;this.m=!1;this.C=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.B(a,"waiting",function(){return aj(f)});this.j=(new O(function(){aj(f)})).Da(.25)}$i.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.s=this.o=null};$i.prototype.Pd=function(){this.l=!0;aj(this)};
295
- function aj(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.C&&(a.C=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Xi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new R("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=wi(c,b,a.D.gapDetectionThreshold),null==
296
- d||0==d&&!a.l||(e=c.start(d),e>=a.s.Oa()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new R("gapjumped")))))}}};function bj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=cj.value().get(b),c.oa(a,b,d))}var cj=new mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function dj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new of;this.i=new ej(a);bj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){fj(d,d.j)})}dj.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 gj(a){return a.m?a.g.currentTime:a.j}function hj(a,b){0<a.g.readyState?ij(a.i,b):bj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){fj(a,a.j)})}
297
- function fj(a,b){.001>Math.abs(a.g.currentTime-b)?jj(a):(a.h.oa(a.g,"seeking",function(){jj(a)}),ij(a.i,0==a.g.currentTime?b:a.g.currentTime))}function jj(a){a.m=!0;a.h.B(a.g,"seeking",function(){return a.l()})}function ej(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--)})}ej.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
298
- function ij(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Da(.1)};function kj(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 of;bj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){b()})}r=kj.prototype;r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.vd=function(a){this.h=this.j?this.h:a};r.Ec=function(){return(this.j?this.g.currentTime:this.h)||0};r.je=function(){return 0};r.ie=function(){return 0};
299
- r.Ee=function(){};
300
- function lj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.C=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.m=mj(a,c,f);this.j=new $i(a,b.presentationTimeline,c,this.m,f);this.h=new dj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=gj(g.h);h=nj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;hj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},oj(this,d));this.o=(new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=gj(g.h),k=g.g.Bb(),l=g.g.Oa();3>
301
- l-k&&(k=l-3);h<k&&(h=nj(g,h),g.i.currentTime=h)}})).Da(.25)}r=lj.prototype;r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.o&&(this.o.stop(),this.o=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};r.vd=function(a){hj(this.h,a)};r.Ec=function(){var a=gj(this.h);return 0<this.i.readyState&&!this.i.paused?pj(this,a):a};r.je=function(){return this.m?this.m.o:0};r.ie=function(){return this.j.u};
302
- function oj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Bb():a.g.Oa():0>b&&(b=a.g.Oa()+b);return qj(a,pj(a,b))}r.Ee=function(){this.j.Pd()};function qj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function nj(a,b){var c=Math.max(a.C,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.Oa(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.hc(c),k=a.g.hc(d);c=a.g.hc(c+d);return b>=g?qj(a,b):b>f?f:b<e?ti(a.i.buffered,k)?k:c:b>=h||ti(a.i.buffered,b)?b:c}
303
- function pj(a,b){var c=a.g.Bb();if(b<c)return c;c=a.g.Oa();return b>c?c:b}function mj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Wi(new Zi(a),b.stallThreshold,c);Yi(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function rj(a){this.J=a;this.g=null;this.h=0;this.i=!1}r=rj.prototype;r.release=function(){this.i||(this.J=[],this.g&&this.g.stop(),this.g=null)};r.Pf=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]};
290
+ function Ui(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)),Ti(a,b)}}function Ji(a,b,c,d){var e=a.L[d];null==c&&e&&(tc()||rc())&&"mp4"==a.M[d].split(";")[0].split("/")[1]&&(b=$g(b));return b}var Ai=window.URL.createObjectURL,Ki="sequence",Vi=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function T(a,b,c){this.l=a;this.$c=b;this.m=this.i=Infinity;this.g=1;this.h=this.j=null;this.o=0;this.s=!0;this.u=0;this.B=void 0===c?!0:c;this.D=0;this.F=!1}r=T.prototype;r.getDuration=function(){return this.i};r.yf=function(){return this.g};r.Ia=function(a){this.i=a};r.Df=function(){return this.l};r.Pe=function(a){this.o=a};r.wc=function(a){this.s=a};r.de=function(a){this.m=a};r.kg=function(a){this.$c=a};r.qf=function(){return this.$c};
291
+ r.Gb=function(a){if(0!=a.length){var b=a[a.length-1].endTime;this.Nd(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.B&&!this.F&&(this.l=(Date.now()+this.o)/1E3-this.h-this.g)}};r.Hd=function(){this.F=!0};r.Nd=function(a){this.j=null==this.j?a:Math.min(this.j,a)};r.Md=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)};
292
+ r.V=function(){return Infinity==this.i&&!this.s};r.jb=function(){return Infinity!=this.i&&!this.s};r.Oa=function(){return Math.max(this.u,this.gb()-this.m)};r.Qe=function(a){this.u=a};r.gb=function(){return this.V()||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.hc=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.gb()-this.m+a,this.Na()))};r.Bb=function(){return this.hc(0)};
293
+ r.Na=function(){return Math.max(0,this.gb()-(this.V()||this.jb()?this.$c:0))};r.Te=function(){return null==this.l||null!=this.h&&this.B?!1:!0};r.Oe=function(a){this.D=a};M("shaka.media.PresentationTimeline",T);T.prototype.setAvailabilityTimeOffset=T.prototype.Oe;T.prototype.usingPresentationStartTime=T.prototype.Te;T.prototype.getSeekRangeEnd=T.prototype.Na;T.prototype.getSeekRangeStart=T.prototype.Bb;T.prototype.getSafeSeekRangeStart=T.prototype.hc;T.prototype.getSegmentAvailabilityEnd=T.prototype.gb;
294
+ T.prototype.setUserSeekStart=T.prototype.Qe;T.prototype.getSegmentAvailabilityStart=T.prototype.Oa;T.prototype.isInProgress=T.prototype.jb;T.prototype.isLive=T.prototype.V;T.prototype.offset=T.prototype.offset;T.prototype.notifyMaxSegmentDuration=T.prototype.Md;T.prototype.notifyMinSegmentStartTime=T.prototype.Nd;T.prototype.lockStartTime=T.prototype.Hd;T.prototype.notifySegments=T.prototype.Gb;T.prototype.getDelay=T.prototype.qf;T.prototype.setDelay=T.prototype.kg;
295
+ T.prototype.setSegmentAvailabilityDuration=T.prototype.de;T.prototype.setStatic=T.prototype.wc;T.prototype.setClockOffset=T.prototype.Pe;T.prototype.getPresentationStartTime=T.prototype.Df;T.prototype.setDuration=T.prototype.Ia;T.prototype.getMaxSegmentDuration=T.prototype.yf;T.prototype.getDuration=T.prototype.getDuration;function Wi(a,b,c){this.l=c;this.j=a;this.s=Xi(a);this.g=a.g.currentTime;this.m=Date.now()/1E3;this.h=!1;this.o=0;this.u=b;this.i=function(){}}Wi.prototype.release=function(){this.l=this.j=null;this.i=function(){}};function Yi(a,b){a.i=b}function Zi(a){this.g=a}function Xi(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(vi(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 $i(a,b,c,d,e){var f=this;this.o=e;this.g=a;this.s=b;this.D=c;this.i=new of;this.m=!1;this.B=a.readyState;this.u=0;this.h=d;this.l=!1;this.i.C(a,"waiting",function(){return aj(f)});this.j=(new O(function(){aj(f)})).Ca(.25)}$i.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.s=this.o=null};$i.prototype.Qd=function(){this.l=!0;aj(this)};
296
+ function aj(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.B&&(a.B=a.g.readyState);var b;if(!(b=!a.h)){b=a.h;var c=b.j,d=Xi(c),e=c.g.currentTime,f=Date.now()/1E3;if(b.g!=e||b.s!=d)b.m=f,b.g=e,b.s=d,b.h=!1;e=f-b.m;if(d=e>=b.u&&d&&!b.h)b.i(b.g,e),b.h=!0,b.g=c.g.currentTime,b.o++,b.l(new R("stalldetected"));b=!d}b&&(b=a.g.currentTime,c=a.g.buffered,d=wi(c,b,a.D.gapDetectionThreshold),null==
297
+ d||0==d&&!a.l||(e=c.start(d),e>=a.s.Na()||.001>e-b||(0!=d&&c.end(d-1),a.g.currentTime=e,a.u++,a.o(new R("gapjumped")))))}}};function bj(a,b,c,d){b==HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=cj.value().get(b),c.oa(a,b,d))}var cj=new mc(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function dj(a,b,c){var d=this;this.g=a;this.l=b;this.j=c;this.m=!1;this.h=new of;this.i=new ej(a);bj(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){fj(d,d.j)})}dj.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 gj(a){return a.m?a.g.currentTime:a.j}function hj(a,b){0<a.g.readyState?ij(a.i,b):bj(a.g,HTMLMediaElement.HAVE_METADATA,a.h,function(){fj(a,a.j)})}
298
+ function fj(a,b){.001>Math.abs(a.g.currentTime-b)?jj(a):(a.h.oa(a.g,"seeking",function(){jj(a)}),ij(a.i,0==a.g.currentTime?b:a.g.currentTime))}function jj(a){a.m=!0;a.h.C(a.g,"seeking",function(){return a.l()})}function ej(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--)})}ej.prototype.release=function(){this.g&&(this.g.stop(),this.g=null);this.h=null};
299
+ function ij(a,b){a.j=a.h.currentTime;a.l=b;a.i=a.m;a.h.currentTime=b;a.g.Ca(.1)};function kj(a){this.g=a;this.j=!1;this.h=null;this.i=new of}r=kj.prototype;r.vd=function(){function a(){null==b.h||0==b.h?b.j=!0:(b.i.oa(b.g,"seeking",function(){b.j=!0}),b.g.currentTime=Math.max(0,b.g.currentTime+b.h))}var b=this;bj(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,function(){a()})};r.release=function(){this.i&&(this.i.release(),this.i=null);this.g=null};r.wd=function(a){this.h=this.j?this.h:a};r.Ec=function(){return(this.j?this.g.currentTime:this.h)||0};r.ke=function(){return 0};
300
+ r.je=function(){return 0};r.Fe=function(){};
301
+ function lj(a,b,c,d,e,f){var g=this;this.i=a;this.g=b.presentationTimeline;this.B=b.minBufferTime||0;this.l=c;this.u=e;this.s=null;this.o=mj(a,c,f);this.j=new $i(a,b.presentationTimeline,c,this.o,f);this.h=new dj(a,function(){a:{var h=g.j;h.m=!0;h.l=!1;var k=gj(g.h);h=nj(g,k);if(.001<Math.abs(h-k)&&(k=Date.now()/1E3,!g.s||g.s<k-1)){g.s=k;hj(g.h,h);h=void 0;break a}g.u();h=void 0}return h},oj(this,d));this.m=new O(function(){if(0!=g.i.readyState&&!g.i.paused){var h=gj(g.h),k=g.g.Bb(),l=g.g.Na();3>
302
+ l-k&&(k=l-3);h<k&&(h=nj(g,h),g.i.currentTime=h)}})}r=lj.prototype;r.vd=function(){this.m.Ca(.25)};r.release=function(){this.h&&(this.h.release(),this.h=null);this.j&&(this.j.release(),this.j=null);this.m&&(this.m.stop(),this.m=null);this.i=this.h=this.g=this.l=null;this.u=function(){}};r.wd=function(a){hj(this.h,a)};r.Ec=function(){var a=gj(this.h);return 0<this.i.readyState&&!this.i.paused?pj(this,a):a};r.ke=function(){return this.o?this.o.o:0};r.je=function(){return this.j.u};
303
+ function oj(a,b){null==b?b=Infinity>a.g.getDuration()?a.g.Bb():a.g.Na():0>b&&(b=a.g.Na()+b);return qj(a,pj(a,b))}r.Fe=function(){this.j.Qd()};function qj(a,b){var c=a.g.getDuration();return b>=c?c-a.l.durationBackoff:b}function nj(a,b){var c=Math.max(a.B,a.l.rebufferingGoal),d=a.l.safeSeekOffset,e=a.g.Bb(),f=a.g.Na(),g=a.g.getDuration();3>f-e&&(e=f-3);var h=a.g.hc(c),k=a.g.hc(d);c=a.g.hc(c+d);return b>=g?qj(a,b):b>f?f:b<e?ti(a.i.buffered,k)?k:c:b>=h||ti(a.i.buffered,b)?b:c}
304
+ function pj(a,b){var c=a.g.Bb();if(b<c)return c;c=a.g.Na();return b>c?c:b}function mj(a,b,c){if(!b.stallEnabled)return null;var d=b.stallSkip;b=new Wi(new Zi(a),b.stallThreshold,c);Yi(b,function(){d?a.currentTime+=d:(a.pause(),a.play())});return b};function rj(a){this.J=a;this.g=null;this.h=0;this.i=!1}r=rj.prototype;r.release=function(){this.i||(this.J=[],this.g&&this.g.stop(),this.g=null)};r.Qf=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]};
304
305
  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.nc=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.Fb=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.nc(a);this.eb(b)};
305
306
  r.eb=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}};
306
- 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 oi(a.startTime,b,a.o,a.Ca,a.la,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.m,a.g,a.status,a.l))}};
307
- r.bd=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.Da(a))};rj.prototype[Symbol.iterator]=function(){return this.Ab(0)};rj.prototype.Ab=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 sj(this,b,d)};
308
- function tj(a,b,c){return new rj([new oi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",rj);rj.forSingleSegment=tj;rj.prototype.getIteratorForTime=rj.prototype.Ab;rj.prototype.updateEvery=rj.prototype.bd;rj.prototype.fit=rj.prototype.Xa;rj.prototype.evict=rj.prototype.eb;rj.prototype.mergeAndEvict=rj.prototype.Fb;rj.prototype.offset=rj.prototype.offset;rj.prototype.get=rj.prototype.get;rj.prototype.find=rj.prototype.find;rj.prototype.markImmutable=rj.prototype.Pf;
309
- rj.prototype.release=rj.prototype.release;function sj(a,b,c){this.i=a;this.g=b;this.h=c}sj.prototype.gf=function(){return this.g};sj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.ya().length&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};
310
- sj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.ya().length&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",sj);sj.prototype.next=sj.prototype.next;sj.prototype.current=sj.prototype.current;sj.prototype.currentPosition=sj.prototype.gf;function uj(){rj.call(this,[]);this.j=[]}pa(uj,rj);r=uj.prototype;r.clone=function(){var a=new uj;a.j=this.j.slice();return a};
307
+ 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 oi(a.startTime,b,a.o,a.Ba,a.la,a.i,a.timestampOffset,a.appendWindowStart,a.appendWindowEnd,a.h,a.tilesLayout,a.m,a.g,a.status,a.l))}};
308
+ r.bd=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))};rj.prototype[Symbol.iterator]=function(){return this.Ab(0)};rj.prototype.Ab=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 sj(this,b,d)};
309
+ function tj(a,b,c){return new rj([new oi(a,a+b,function(){return c},0,null,null,a,a,a+b)])}M("shaka.media.SegmentIndex",rj);rj.forSingleSegment=tj;rj.prototype.getIteratorForTime=rj.prototype.Ab;rj.prototype.updateEvery=rj.prototype.bd;rj.prototype.fit=rj.prototype.Xa;rj.prototype.evict=rj.prototype.eb;rj.prototype.mergeAndEvict=rj.prototype.Fb;rj.prototype.offset=rj.prototype.offset;rj.prototype.get=rj.prototype.get;rj.prototype.find=rj.prototype.find;rj.prototype.markImmutable=rj.prototype.Qf;
310
+ rj.prototype.release=rj.prototype.release;function sj(a,b,c){this.i=a;this.g=b;this.h=c}sj.prototype.hf=function(){return this.g};sj.prototype.current=function(){var a=this.i.get(this.g);a&&0<a.h.length&&a.ya().length&&this.h>=a.h.length&&(this.g++,this.h=0,a=this.i.get(this.g));return a&&0<a.h.length?a.h[this.h]:a};
311
+ sj.prototype.next=function(){var a=this.i.get(this.g);a&&0<a.h.length?(this.h++,a.ya().length&&this.h==a.h.length&&(this.g++,this.h=0)):(this.g++,this.h=0);a=this.current();return{value:a,done:!a}};M("shaka.media.SegmentIterator",sj);sj.prototype.next=sj.prototype.next;sj.prototype.current=sj.prototype.current;sj.prototype.currentPosition=sj.prototype.hf;function uj(){rj.call(this,[]);this.j=[]}pa(uj,rj);r=uj.prototype;r.clone=function(){var a=new uj;a.j=this.j.slice();return a};
311
312
  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};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.nc=function(){};r.eb=function(){};r.Fb=function(){};r.Xa=function(){};r.bd=function(){};
312
- M("shaka.media.MetaSegmentIndex",uj);uj.prototype.updateEvery=uj.prototype.bd;uj.prototype.fit=uj.prototype.Xa;uj.prototype.mergeAndEvict=uj.prototype.Fb;uj.prototype.evict=uj.prototype.eb;uj.prototype.merge=uj.prototype.nc;uj.prototype.offset=uj.prototype.offset;uj.prototype.get=uj.prototype.get;uj.prototype.find=uj.prototype.find;uj.prototype.release=uj.prototype.release;function vj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Qc();this.h=new O(function(){b.g.De(.25*b.i)})}vj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};vj.prototype.set=function(a){this.i=a;wj(this)};vj.prototype.Mc=function(){return this.g.Mc()};function wj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Qc()!=b&&a.g.be(b);return}catch(c){}a.h.Da(.25);0!=a.g.Qc()&&a.g.be(0)};function xj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){yj(b,!1)})).Da(.25)}xj.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 yj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function zj(a){We.call(this);this.g=new Map;this.h=a}pa(zj,We);zj.prototype.release=function(){this.g.clear();We.prototype.release.call(this)};function Aj(a,b){var c=a.g.get(b);c||(c={pc:[],pe:null,contentType:b},a.g.set(b,c));return c}function Bj(a,b,c){var d=Aj(a,b.contentType);Cj(a,d);a={Id:b,position:c};d=d.pc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
313
- zj.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.pc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Id;break a}}d=null}if(e=d)e=c.pe,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);
314
- 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.pe=d,JSON.stringify(d),c=new R("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Cj(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.pc;b.pc=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.pc=[]};function Dj(a){We.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 R("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Da(2)}pa(Dj,We);Dj.prototype.release=function(){this.g.clear();this.h.stop();We.prototype.release.call(this)};function Ej(a){We.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{qb:null,pb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{qb:Hj,pb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{qb:Ij,pb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{qb:Fj,pb:Hj,ib:function(c,d){return Gj(b,"exit",c,d)}},{qb:Fj,pb:Ij,ib:function(c,d){return Gj(b,"exit",c,d)}},{qb:Hj,pb:Ij,ib:function(c,d){return Gj(b,"skip",c,d)}},{qb:Ij,pb:Hj,ib:function(c,d){return Gj(b,"skip",c,d)}}];this.h=new of;this.h.B(this.i,"regionremove",
313
+ M("shaka.media.MetaSegmentIndex",uj);uj.prototype.updateEvery=uj.prototype.bd;uj.prototype.fit=uj.prototype.Xa;uj.prototype.mergeAndEvict=uj.prototype.Fb;uj.prototype.evict=uj.prototype.eb;uj.prototype.merge=uj.prototype.nc;uj.prototype.offset=uj.prototype.offset;uj.prototype.get=uj.prototype.get;uj.prototype.find=uj.prototype.find;uj.prototype.release=uj.prototype.release;function vj(a){var b=this;this.g=a;this.j=!1;this.i=this.g.Qc();this.h=new O(function(){b.g.Ee(.25*b.i)})}vj.prototype.release=function(){this.h&&(this.h.stop(),this.h=null);this.g=null};vj.prototype.set=function(a){this.i=a;wj(this)};vj.prototype.Mc=function(){return this.g.Mc()};function wj(a){a.h.stop();var b=a.j?0:a.i;if(0<=b)try{a.g.Qc()!=b&&a.g.ce(b);return}catch(c){}a.h.Ca(.25);0!=a.g.Qc()&&a.g.ce(0)};function xj(a){var b=this;this.h=a;this.g=new Set;this.i=(new O(function(){yj(b,!1)})).Ca(.25)}xj.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 yj(a,b){for(var c=t(a.g),d=c.next();!d.done;d=c.next())d.value.j(a.h.currentTime,b)};function zj(a){We.call(this);this.g=new Map;this.h=a}pa(zj,We);zj.prototype.release=function(){this.g.clear();We.prototype.release.call(this)};function Aj(a,b){var c=a.g.get(b);c||(c={pc:[],qe:null,contentType:b},a.g.set(b,c));return c}function Bj(a,b,c){var d=Aj(a,b.contentType);Cj(a,d);a={Jd:b,position:c};d=d.pc;b=d.findIndex(function(e){return e.position>=c});0<=b?d.splice(b,d[b].position==c?1:0,a):d.push(a)}
314
+ zj.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.pc;for(var e=d.length-1;0<=e;e--){var f=d[e];if(f.position<=a){d=f.Jd;break a}}d=null}if(e=d)e=c.qe,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);
315
+ 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.qe=d,JSON.stringify(d),c=new R("qualitychange",new Map([["quality",d],["position",a]])),this.dispatchEvent(c))}};function Cj(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.pc;b.pc=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.pc=[]};function Dj(a){We.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 R("regionremove",new Map([["region",e]])),b.dispatchEvent(e))})).Ca(2)}pa(Dj,We);Dj.prototype.release=function(){this.g.clear();this.h.stop();We.prototype.release.call(this)};function Ej(a){We.call(this);var b=this;this.i=a;this.g=new Map;this.l=[{qb:null,pb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{qb:Hj,pb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{qb:Ij,pb:Fj,ib:function(c,d){return Gj(b,"enter",c,d)}},{qb:Fj,pb:Hj,ib:function(c,d){return Gj(b,"exit",c,d)}},{qb:Fj,pb:Ij,ib:function(c,d){return Gj(b,"exit",c,d)}},{qb:Hj,pb:Ij,ib:function(c,d){return Gj(b,"skip",c,d)}},{qb:Ij,pb:Hj,ib:function(c,d){return Gj(b,"skip",c,d)}}];this.h=new of;this.h.C(this.i,"regionremove",
315
316
  function(c){b.g["delete"](c.region)})}pa(Ej,We);Ej.prototype.release=function(){this.i=null;this.g.clear();this.h.release();this.h=null;We.prototype.release.call(this)};Ej.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?Hj:a>d.endTime?Ij:Fj;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)}};
316
- function Gj(a,b,c,d){b=new R(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hj=1,Fj=2,Ij=3;function Jj(a,b,c,d,e){a=ef(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Kj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.u=1;this.o=this.l=null;this.i=new Map;this.C=!1;this.D=null;this.s=!1;this.h=new mf(function(){return Lj(c)})}r=Kj.prototype;r.destroy=function(){return this.h.destroy()};function Lj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Mj(e),b.push(Nj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;A(f)})}
317
- r.configure=function(a){this.j=a;this.D=new Ke({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)};r.start=function(){var a=this;return K(function(b){if(1==b.g)return u(b,Oj(a),2);nf(a.h);a.C=!0;A(b)})};
317
+ function Gj(a,b,c,d){b=new R(b,new Map([["region",c],["seeking",d]]));a.dispatchEvent(b)}var Hj=1,Fj=2,Ij=3;function Jj(a,b,c,d,e){a=ef(a,d,e);if(0!=b||null!=c)a.headers.Range=c?"bytes="+b+"-"+c:"bytes="+b+"-";return a};function Kj(a,b){var c=this;this.g=b;this.m=a;this.j=null;this.u=1;this.o=this.l=null;this.i=new Map;this.B=!1;this.D=null;this.s=!1;this.h=new mf(function(){return Lj(c)})}r=Kj.prototype;r.destroy=function(){return this.h.destroy()};function Lj(a){var b,c,d,e;return K(function(f){if(1==f.g){b=[];c=t(a.i.values());for(d=c.next();!d.done;d=c.next())e=d.value,Mj(e),b.push(Nj(e));return u(f,Promise.all(b),2)}a.i.clear();a.g=null;a.m=null;a.j=null;A(f)})}
318
+ r.configure=function(a){this.j=a;this.D=new Ke({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)};r.start=function(){var a=this;return K(function(b){if(1==b.g)return u(b,Oj(a),2);nf(a.h);a.B=!0;A(b)})};
318
319
  function Pj(a,b){var c,d,e,f,g,h;K(function(k){switch(k.g){case 1:return c=kc,C(k,2),u(k,Qi(a.g.R,c.X),4);case 4:va(k,3);break;case 2:if(d=F(k),a.g)a.g.onError(d);case 3:e=Xc(b.mimeType,b.codecs);Bi(a.g.R,e,a.m.sequenceMode);f=a.g.R.m;if(g=f.isTextVisible()||a.j.alwaysStreamText)h=Qj(b),a.i.set(c.X,h),Rj(a,h,0);A(k)}})}function Sj(a){var b=a.i.get(jc);b&&(Mj(b),Nj(b)["catch"](function(){}),a.i["delete"](jc));a.o=null}
319
- function Tj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.nb&&(Uj(a,e,!1,0,!1),c.nb=d)}else if(d=c.nb)c.nb=null,Uj(a,d,!0,0,!1)}}function Vj(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.C&&(b.video&&Uj(a,b.video,c,d,e,f),b.audio&&Uj(a,b.audio,c,d,e,f))}function Wj(a,b){a.o=b;a.C&&Uj(a,b,!0,0,!1)}
320
- function Uj(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=jc?g&&(g.nb&&(b.trickModeVideo?(g.nb=b,b=b.trickModeVideo):g.nb=null),g.stream!=b||e)&&(b.type==jc&&Bi(a.g.R,Xc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.ke=!!f,c&&(g.ac?g.ed=!0:g.Ba?(g.ab=!0,g.Hc=d,g.ed=!0):(Mj(g),Xj(a,g,!0,d)["catch"](function(h){if(a.g)a.g.onError(h)}))),Yj(a,g)["catch"](function(h){if(a.g)a.g.onError(h)})):Pj(a,b)}
321
- function Yj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.ta)return e["return"]();c=b.stream;d=b.ta;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ta!=d||b.stream!=c)return e["return"]();var f=a.g.Pc();var g=Gi(a.g.R,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.Ca:null:null;k&&!h&&(h=(k.endTime-k.getStartTime())*(b.stream.bandwidth||0)/8);h?((k=k.i)&&(h+=(k.la?k.la-k.Ca:null)||0),k=a.g.getBandwidthEstimate(),
320
+ function Tj(a,b){var c=a.i.get("video");if(c){var d=c.stream;if(d)if(b){var e=d.trickModeVideo;e&&!c.nb&&(Uj(a,e,!1,0,!1),c.nb=d)}else if(d=c.nb)c.nb=null,Uj(a,d,!0,0,!1)}}function Vj(a,b,c,d,e,f){c=void 0===c?!1:c;d=void 0===d?0:d;e=void 0===e?!1:e;f=void 0===f?!1:f;a.l=b;a.B&&(b.video&&Uj(a,b.video,c,d,e,f),b.audio&&Uj(a,b.audio,c,d,e,f))}function Wj(a,b){a.o=b;a.B&&Uj(a,b,!0,0,!1)}
321
+ function Uj(a,b,c,d,e,f){var g=a.i.get(b.type);g||b.type!=jc?g&&(g.nb&&(b.trickModeVideo?(g.nb=b,b=b.trickModeVideo):g.nb=null),g.stream!=b||e)&&(b.type==jc&&Bi(a.g.R,Xc(b.mimeType,b.codecs),a.m.sequenceMode),g.stream.closeSegmentIndex&&g.stream.closeSegmentIndex(),g.stream=b,g.ba=null,g.le=!!f,c&&(g.ac?g.ed=!0:g.Ha?(g.ab=!0,g.Hc=d,g.ed=!0):(Mj(g),Xj(a,g,!0,d)["catch"](function(h){if(a.g)a.g.onError(h)}))),Yj(a,g)["catch"](function(h){if(a.g)a.g.onError(h)})):Pj(a,b)}
322
+ function Yj(a,b){var c,d;return K(function(e){if(1==e.g){if(!b.ta)return e["return"]();c=b.stream;d=b.ta;return c.segmentIndex?e.A(2):u(e,c.createSegmentIndex(),2)}if(b.ta!=d||b.stream!=c)return e["return"]();var f=a.g.Pc();var g=Gi(a.g.R,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(),
322
323
  f=8*h/k<(g||0)-f-Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal)||b.ta.h.g>h?!0:!1):f=!1;f&&b.ta.abort();A(e)})}
323
- r.tc=function(){for(var a=this.g.Pc(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.ba=null;var e=this.g.R;d==jc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Fi(e,d),e=ti(e,a));if(!e){(null!=Gi(this.g.R,d)||c.Ba)&&Zj(this,c);c.ta&&(c.ta.abort(),c.ta=null);if(d===jc)for(d=this.g.R.C.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,ai(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())Wh(e.value);c.tc=!0}}};
324
- function Zj(a,b){b.ac||b.ab||(b.Ba?(b.ab=!0,b.Hc=0):null==Ei(a.g.R,b.type)?null==b.Ka&&Rj(a,b,0):(Mj(b),Xj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
324
+ r.tc=function(){for(var a=this.g.Pc(),b=t(this.i.keys()),c=b.next();!c.done;c=b.next()){var d=c.value;c=this.i.get(d);c.ba=null;var e=this.g.R;d==jc?(e=e.g,e=null==e.g||null==e.h?!1:a>=e.g&&a<e.h):(e=Fi(e,d),e=ti(e,a));if(!e){(null!=Gi(this.g.R,d)||c.Ha)&&Zj(this,c);c.ta&&(c.ta.abort(),c.ta=null);if(d===jc)for(d=this.g.R.B.g,d.l=0,d.h=[],d.g=[],e=d.i,e.i=[],e.h=[],e.g=0,ai(d),d=t(d.j.values()),e=d.next();!e.done;e=d.next())Wh(e.value);c.tc=!0}}};
325
+ function Zj(a,b){b.ac||b.ab||(b.Ha?(b.ab=!0,b.Hc=0):null==Ei(a.g.R,b.type)?null==b.Sa&&Rj(a,b,0):(Mj(b),Xj(a,b,!1,0)["catch"](function(c){if(a.g)a.g.onError(c)})))}
325
326
  function Oj(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){if(1==n.g){b=kc;if(!a.l)throw new N(2,5,5006);c=new Map;d=new Set;a.l.audio&&(c.set(b.cb,a.l.audio),d.add(a.l.audio));a.l.video&&(c.set(b.ra,a.l.video),d.add(a.l.video));a.o&&(c.set(b.X,a.o),d.add(a.o));e=a.g.R;f=a.j.forceTransmuxTS;return u(n,e.init(c,f,a.m.sequenceMode),2)}nf(a.h);a.updateDuration();g=t(c.keys());for(h=g.next();!h.done;h=g.next())k=h.value,l=c.get(k),a.i.has(k)||(m=Qj(l),a.i.set(k,m),Rj(a,m,0));A(n)})}
326
- function Qj(a){return{stream:a,type:a.type,ba:null,za:null,Uc:null,Fd:null,Ed:null,Dd:null,nb:null,endOfStream:!1,Ba:!1,Ka:null,ab:!1,Hc:0,ed:!1,ac:!1,tc:!0,Td:!1,jc:!1,ta:null}}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Ia(a):this.g.R.Ia(Math.pow(2,32))};
327
- function ak(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:nf(a.h);if(b.Ba||null==b.Ka||b.ac)return h["return"]();b.Ka=null;if(!b.ab){h.A(2);break}return u(h,Xj(a,b,b.ed,b.Hc),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&&Rj(a,b,0),h["return"]();case 4:C(h,6);d=bk(a,b);null!=d&&(Rj(a,b,d),b.jc=!1);va(h,7);break;case 6:return e=
328
- F(h),u(h,ck(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.C||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.R.endOfStream(),10);case 10:nf(a.h),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),A(h)}})}
327
+ function Qj(a){return{stream:a,type:a.type,ba:null,za:null,Uc:null,Gd:null,Fd:null,Ed:null,nb:null,endOfStream:!1,Ha:!1,Sa:null,ab:!1,Hc:0,ed:!1,ac:!1,tc:!0,Ud:!1,jc:!1,ta:null}}r.updateDuration=function(){var a=this.m.presentationTimeline.getDuration();Infinity>a?this.g.R.Ia(a):this.g.R.Ia(Math.pow(2,32))};
328
+ function ak(a,b){var c,d,e,f,g;return K(function(h){switch(h.g){case 1:nf(a.h);if(b.Ha||null==b.Sa||b.ac)return h["return"]();b.Sa=null;if(!b.ab){h.A(2);break}return u(h,Xj(a,b,b.ed,b.Hc),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.Sa&&Rj(a,b,0),h["return"]();case 4:C(h,6);d=bk(a,b);null!=d&&(Rj(a,b,d),b.jc=!1);va(h,7);break;case 6:return e=
329
+ F(h),u(h,ck(a,e),8);case 8:return h["return"]();case 7:f=Array.from(a.i.values());if(!a.B||!f.every(function(k){return k.endOfStream})){h.A(0);break}return u(h,a.g.R.endOfStream(),10);case 10:nf(a.h),g=a.g.R.getDuration(),0!=g&&g<a.m.presentationTimeline.getDuration()&&a.m.presentationTimeline.Ia(g),A(h)}})}
329
330
  function bk(a,b){if(dk(b))return Oi(a.g.R,b.stream.originalId||""),null;b.type==jc&&Pi(a.g.R);var c=a.g.Pc(),d=b.za?b.za.endTime:c,e=Hi(a.g.R,b.type,c),f=Math.max(a.m.minBufferTime||0,a.j.rebufferingGoal,a.j.bufferingGoal)*a.u,g=a.m.presentationTimeline.getDuration()-d,h=Gi(a.g.R,b.type);if(1E-6>g&&h)return b.endOfStream=!0,"video"==b.type&&(c=a.i.get(jc))&&dk(c)&&(c.endOfStream=!0),null;b.endOfStream=!1;if(e>=f)return a.j.updateIntervalSeconds/2;e=ek(a,b,c,h);if(!e)return a.j.updateIntervalSeconds;
330
331
  f=Infinity;g=Array.from(a.i.values());g=t(g);for(h=g.next();!h.done;h=g.next())h=h.value,dk(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.j.updateIntervalSeconds;fk(a,b,c,e)["catch"](function(){});return null}
331
332
  function ek(a,b,c,d){if(b.ba)return b.ba.current();if(b.za||d)return b.ba=b.stream.segmentIndex.Ab(b.za?b.za.endTime:d),b.ba&&b.ba.next().value;a=a.j.inaccurateManifestTolerance;d=Math.max(c-a,0);var e=null;a&&(b.ba=b.stream.segmentIndex.Ab(d),e=b.ba&&b.ba.next().value);e||(b.ba=b.stream.segmentIndex.Ab(c),e=b.ba&&b.ba.next().value);return e}
332
- function fk(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y,x,w,D;return K(function(z){switch(z.g){case 1:e=kc;f=b.stream;g=b.ba;b.Ba=!0;C(z,2);if(2==d.Cb())throw new N(1,1,1011);return u(z,gk(a,b,d),4);case 4:nf(a.h);if(a.s)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h&&!d.l)return n=new Uint8Array(0),q=p=!1,v=function(B){var G,E,H;return K(function(I){if(p)return I["return"]();q=!0;nf(a.h);if(a.s)return I["return"]();n=hk(n,B);G=
333
- !1;E=0;(new Bf).box("mdat",function(J){E=J.size+J.start;G=!0}).parse(n,!1,!0);if(!G)return I.A(0);H=n.subarray(0,E);n=n.subarray(E);return u(I,ik(a,b,c,f,d,H),0)})},u(z,jk(a,b,d,v),11);l=jk(a,b,d);return u(z,l,7);case 7:m=z.h;nf(a.h);if(a.s)return z["return"]();if(!d.l){z.A(8);break}return u(z,kk(m,d,g),9);case 9:m=z.h;case 8:return nf(a.h),b.ab?(b.Ba=!1,Rj(a,b,0),z["return"]()):u(z,ik(a,b,c,f,d,m),6);case 11:y=z.h;if(q){z.A(6);break}p=!0;nf(a.h);return a.s?z["return"]():b.ab?(b.Ba=!1,Rj(a,b,0),z["return"]()):
334
- u(z,ik(a,b,c,f,d,y),6);case 6:nf(a.h);if(a.s)return z["return"]();b.za=d;g.next();b.Ba=!1;b.Td=!1;x=a.g.R.Na();w=x[b.type];$a(JSON.stringify(w));b.ab||a.g.Pd();Rj(a,b,0);va(z,0);break;case 2:D=F(z);nf(a.h,D);if(a.s)return z["return"]();b.Ba=!1;if(7001==D.code)b.Ba=!1,b.Ka=null,Rj(a,b,0),z.A(0);else if(b.type==e.X&&a.j.ignoreTextStreamFailures)a.i["delete"](e.X),z.A(0);else if(3017==D.code)lk(a,b,D),z.A(0);else if(1001==D.code&&D.data&&404==D.data[1])b.Ba=!1,b.Ka=null,Rj(a,b,1),z.A(0);else return b.jc=
335
- !0,D.severity=2,u(z,ck(a,D),0)}})}function kk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.A(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Fb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h["return"](window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function hk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
336
- function lk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Td})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.jc=!0;a.s=!0;a.g.onError(c);return}b.Td=!0}Rj(a,b,4)}
337
- function gk(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.Fd||e!=b.Ed||f!=b.Dd)h=function(){var n;return K(function(p){if(1==p.g)return C(p,2),b.Ed=e,b.Dd=f,b.Fd=g,u(p,Ri(a.g.R,b.type,g,e,f,a.m.sequenceMode),4);if(2!=p.g)return va(p,0);n=F(p);b.Ed=null;b.Dd=null;b.Fd=null;throw n;})},d.push(h());!ni(c.i,b.Uc)&&(b.Uc=c.i)&&(k=jk(a,b,c.i),l=function(){var n,p,q;return K(function(v){switch(v.g){case 1:return C(v,
338
- 2),u(v,k,4);case 4:return n=v.h,nf(a.h),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,a.g.me(b.type,n),5);case 5:return u(v,Ii(a.g.R,b.type,n,null,p),6);case 6:va(v,0);break;case 2:throw q=F(v),b.Uc=null,q;}})},a.g.Sf(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
333
+ function fk(a,b,c,d){var e,f,g,h,k,l,m,n,p,q,v,y,x,w,D;return K(function(z){switch(z.g){case 1:e=kc;f=b.stream;g=b.ba;b.Ha=!0;C(z,2);if(2==d.Cb())throw new N(1,1,1011);return u(z,gk(a,b,d),4);case 4:nf(a.h);if(a.s)return z["return"]();h="video/mp4"==f.mimeType||"audio/mp4"==f.mimeType;k=window.ReadableStream;if(a.j.lowLatencyMode&&k&&h&&!d.l)return n=new Uint8Array(0),q=p=!1,v=function(B){var G,E,H;return K(function(I){if(p)return I["return"]();q=!0;nf(a.h);if(a.s)return I["return"]();n=hk(n,B);G=
334
+ !1;E=0;(new Bf).box("mdat",function(J){E=J.size+J.start;G=!0}).parse(n,!1,!0);if(!G)return I.A(0);H=n.subarray(0,E);n=n.subarray(E);return u(I,ik(a,b,c,f,d,H),0)})},u(z,jk(a,b,d,v),11);l=jk(a,b,d);return u(z,l,7);case 7:m=z.h;nf(a.h);if(a.s)return z["return"]();if(!d.l){z.A(8);break}return u(z,kk(m,d,g),9);case 9:m=z.h;case 8:return nf(a.h),b.ab?(b.Ha=!1,Rj(a,b,0),z["return"]()):u(z,ik(a,b,c,f,d,m),6);case 11:y=z.h;if(q){z.A(6);break}p=!0;nf(a.h);return a.s?z["return"]():b.ab?(b.Ha=!1,Rj(a,b,0),z["return"]()):
335
+ u(z,ik(a,b,c,f,d,y),6);case 6:nf(a.h);if(a.s)return z["return"]();b.za=d;g.next();b.Ha=!1;b.Ud=!1;x=a.g.R.Ma();w=x[b.type];$a(JSON.stringify(w));b.ab||a.g.Qd();Rj(a,b,0);va(z,0);break;case 2:D=F(z);nf(a.h,D);if(a.s)return z["return"]();b.Ha=!1;if(7001==D.code)b.Ha=!1,b.Sa=null,Rj(a,b,0),z.A(0);else if(b.type==e.X&&a.j.ignoreTextStreamFailures)a.i["delete"](e.X),z.A(0);else if(3017==D.code)lk(a,b,D),z.A(0);else return b.jc=!0,D.severity=2,u(z,ck(a,D),0)}})}
336
+ function kk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g)return d=b.l,d.cryptoKey?h.A(2):u(h,d.fetchKey(),3);e=d.iv;if(!e)for(e=Fb(new ArrayBuffer(16)),f=d.firstMediaSequenceNumber+c.g,g=e.byteLength-1;0<=g;g--)e[g]=f&255,f>>=8;return h["return"](window.crypto.subtle.decrypt({name:"AES-CBC",iv:e},d.cryptoKey,a))})}function hk(a,b){var c=new Uint8Array(a.length+b.length);c.set(a);c.set(b,a.length);return c}
337
+ function lk(a,b,c){if(!Array.from(a.i.values()).some(function(e){return e!=b&&e.Ud})){var d=Math.round(100*a.u);if(20<d)a.u-=.2;else if(4<d)a.u-=.04;else{b.jc=!0;a.s=!0;a.g.onError(c);return}b.Ud=!0}Rj(a,b,4)}
338
+ function gk(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.Gd||e!=b.Fd||f!=b.Ed)h=function(){var n;return K(function(p){if(1==p.g)return C(p,2),b.Fd=e,b.Ed=f,b.Gd=g,u(p,Ri(a.g.R,b.type,g,e,f,a.m.sequenceMode),4);if(2!=p.g)return va(p,0);n=F(p);b.Fd=null;b.Ed=null;b.Gd=null;throw n;})},d.push(h());!ni(c.i,b.Uc)&&(b.Uc=c.i)&&(k=jk(a,b,c.i),l=function(){var n,p,q;return K(function(v){switch(v.g){case 1:return C(v,
339
+ 2),u(v,k,4);case 4:return n=v.h,nf(a.h),p=b.stream.closedCaptions&&0<b.stream.closedCaptions.size,u(v,a.g.ne(b.type,n),5);case 5:return u(v,Ii(a.g.R,b.type,n,null,p),6);case 6:va(v,0);break;case 2:throw q=F(v),b.Uc=null,q;}})},a.g.Tf(c.startTime,c.i),d.push(l()));return u(m,Promise.all(d),0)})}
339
340
  function ik(a,b,c,d,e,f){var g,h,k;return K(function(l){switch(l.g){case 1:return g=d.closedCaptions&&0<d.closedCaptions.size,(null!=d.emsgSchemeIdUris&&0<d.emsgSchemeIdUris.length||a.j.dispatchAllEmsgBoxes)&&(new Bf).U("emsg",function(m){var n=d.emsgSchemeIdUris;if(0===m.version){var p=m.reader.qc();var q=m.reader.qc();var v=m.reader.N();var y=m.reader.N();var x=m.reader.N();var w=m.reader.N();var D=e.startTime+y/v}else v=m.reader.N(),D=m.reader.Jb()/v+e.timestampOffset,y=D-e.startTime,x=m.reader.N(),
340
- w=m.reader.N(),p=m.reader.qc(),q=m.reader.qc();m=m.reader.Za(m.reader.S.byteLength-m.reader.$());if(n&&n.includes(p)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g.Tf():(n=(new Map).set("detail",{startTime:D,endTime:D+x/v,schemeIdUri:p,value:q,timescale:v,presentationTimeDelta:y,eventDuration:x,id:w,messageData:m}),n=new R("emsg",n),a.g.onEvent(n))}).parse(f),u(l,mk(a,b,c),2);case 2:return nf(a.h),h=b.tc,b.tc=!1,k=b.ke,b.ke=!1,u(l,a.g.me(b.type,f),3);case 3:return u(l,Ii(a.g.R,b.type,
341
+ w=m.reader.N(),p=m.reader.qc(),q=m.reader.qc();m=m.reader.Za(m.reader.S.byteLength-m.reader.$());if(n&&n.includes(p)||a.j.dispatchAllEmsgBoxes)"urn:mpeg:dash:event:2012"==p?a.g.Uf():(n=(new Map).set("detail",{startTime:D,endTime:D+x/v,schemeIdUri:p,value:q,timescale:v,presentationTimeDelta:y,eventDuration:x,id:w,messageData:m}),n=new R("emsg",n),a.g.onEvent(n))}).parse(f),u(l,mk(a,b,c),2);case 2:return nf(a.h),h=b.tc,b.tc=!1,k=b.le,b.le=!1,u(l,a.g.ne(b.type,f),3);case 3:return u(l,Ii(a.g.R,b.type,
341
342
  f,e,g,h,k),4);case 4:nf(a.h),A(l)}})}function mk(a,b,c){var d,e,f,g;return K(function(h){if(1==h.g){d=Math.max(a.j.bufferBehind,a.m.presentationTimeline.g);e=Ei(a.g.R,b.type);if(null==e)return h["return"]();f=c-e;g=f-d;return.01>=g?h["return"]():u(h,a.g.R.remove(b.type,e,e+g),2)}nf(a.h);A(h)})}function dk(a){return a&&a.type==jc&&("application/cea-608"==a.stream.mimeType||"application/cea-708"==a.stream.mimeType)}
342
- function jk(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Jj(c.ya(),c.Ca,c.la,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof mi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.kb.request(e,f),b.ta=h,u(l,h.promise,2);k=l.h;b.ta=null;return l["return"](k.data)})}
343
+ function jk(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Jj(c.ya(),c.Ba,c.la,a.j.retryParameters,d),g=b.stream,a.g.modifySegmentRequest(f,{type:g.type,init:c instanceof mi,duration:c.endTime-c.startTime,mimeType:g.mimeType,codecs:g.codecs,bandwidth:g.bandwidth}),h=a.g.kb.request(e,f),b.ta=h,u(l,h.promise,2);k=l.h;b.ta=null;return l["return"](k.data)})}
343
344
  function Xj(a,b,c,d){var e,f;return K(function(g){if(1==g.g)return b.ab=!1,b.ed=!1,b.Hc=0,b.ac=!0,b.za=null,b.Uc=null,b.ba=null,d?(e=a.g.Pc(),f=a.g.R.getDuration(),u(g,a.g.R.remove(b.type,e+d,f),3)):u(g,Qi(a.g.R,b.type),4);if(3!=g.g)return nf(a.h),c?u(g,a.g.R.flush(b.type),3):g.A(3);nf(a.h);b.ac=!1;b.endOfStream=!1;Rj(a,b,0);A(g)})}
344
- function Rj(a,b,c){var d=b.type;if(d!=jc||a.i.has(d))b.Ka=(new nc(function(){var e;return K(function(f){if(1==f.g)return C(f,2),u(f,ak(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);A(f)})})).P(c)}function Mj(a){null!=a.Ka&&(a.Ka.stop(),a.Ka=null)}function Nj(a){return K(function(b){return a.ta?u(b,a.ta.abort(),0):b.A(0)})}function ck(a,b){return K(function(c){if(1==c.g)return u(c,Me(a.D),2);nf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);A(c)})};function nk(a,b){var c=ok(),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 pk(d)});this.s=new mf(function(){return qk(d)})}nk.prototype.destroy=function(){return this.s.destroy()};function qk(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),rk(a),u(e,a.u,2);a.g&&a.g.Ha.lb();b=t(a.m);for(c=b.next();!c.done;c=b.next())d=c.value,d.Ha.lb();a.g=null;a.m=[];a.j=null;A(e)})}
345
- function sk(a,b){var c={Hb:function(){},Wc:function(){},lb:function(){},onError:function(){},Yc:function(){},eh:function(){}};a.m.push({create:b,Ha:c});a.h&&a.h.abort();rk(a);return c}
346
- function pk(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.Ha.lb(),a.g=null);c=a.m.shift();var d=c.create(a.l);d?(c.Ha.Hb(),a.g={node:d.node,payload:d.payload,hb:d.hb,Ha:c.Ha}):c.Ha.Yc();c=!0}c?c=Promise.resolve():a.g?c=tk(a):(a.j.Rf(a.i),a.o=new lc,c=a.o);b=u(b,c,1)}return b})}
347
- function tk(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.zf(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.jf(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.Ha.Wc(),a.g=null);va(d,0);break;case 2:b=F(d);if(7001==b.code)a.g.Ha.lb();else a.g.Ha.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,A(d)}})}function rk(a){a.o&&(a.o.resolve(),a.o=null)};function uk(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=uk.prototype;r.remove=function(a,b){if(!this.g)return!1;vk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
345
+ function Rj(a,b,c){var d=b.type;if(d!=jc||a.i.has(d))b.Sa=(new nc(function(){var e;return K(function(f){if(1==f.g)return C(f,2),u(f,ak(a,b),4);if(2!=f.g)return va(f,0);e=F(f);if(a.g)a.g.onError(e);A(f)})})).P(c)}function Mj(a){null!=a.Sa&&(a.Sa.stop(),a.Sa=null)}function Nj(a){return K(function(b){return a.ta?u(b,a.ta.abort(),0):b.A(0)})}function ck(a,b){return K(function(c){if(1==c.g)return u(c,Me(a.D),2);nf(a.h);a.g.onError(b);b.handled||a.j.failureCallback(b);A(c)})};function nk(a,b){var c=ok(),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 pk(d)});this.s=new mf(function(){return qk(d)})}nk.prototype.destroy=function(){return this.s.destroy()};function qk(a){var b,c,d;return K(function(e){if(1==e.g)return a.h&&a.h.abort(),rk(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;A(e)})}
346
+ function sk(a,b){var c={Hb:function(){},Wc:function(){},lb:function(){},onError:function(){},Yc:function(){},fh:function(){}};a.m.push({create:b,Ga:c});a.h&&a.h.abort();rk(a);return c}
347
+ function pk(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.Hb(),a.g={node:d.node,payload:d.payload,hb:d.hb,Ga:c.Ga}):c.Ga.Yc();c=!0}c?c=Promise.resolve():a.g?c=tk(a):(a.j.Sf(a.i),a.o=new lc,c=a.o);b=u(b,c,1)}return b})}
348
+ function tk(a){var b,c;return K(function(d){switch(d.g){case 1:return a.i=a.j.Af(a.i,a.l,a.g.node,a.g.payload),C(d,2),a.h=a.j.kf(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.Wc(),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,A(d)}})}function rk(a){a.o&&(a.o.resolve(),a.o=null)};function uk(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=uk.prototype;r.remove=function(a,b){if(!this.g)return!1;vk(this.g,function(c){return c.startTime<b&&c.endTime>a});return!0};
348
349
  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 n=m.clone();n.nestedCues=[];n.payload=c(m);k.push(n)}return k}function c(h){var k=[],l=700<=h.fontWeight,m="italic"==h.fontStyle,n=h.textDecoration.includes("underline");l&&k.push("b");m&&k.push("i");n&&k.push("u");l=k.reduce(function(p,q){return p+"<"+q+">"},"");k=k.reduceRight(function(p,q){return p+"</"+q+">"},"");return h.lineBreak?"\n":h.nestedCues.length?h.nestedCues.map(c).join(""):
349
350
  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=wk(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)-
350
351
  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&&(vk(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"};
351
352
  function wk(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}
352
- function vk(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",uk);uk.prototype.setTextVisibility=uk.prototype.setTextVisibility;uk.prototype.isTextVisible=uk.prototype.isTextVisible;uk.prototype.destroy=uk.prototype.destroy;uk.prototype.append=uk.prototype.append;uk.prototype.remove=uk.prototype.remove;function xk(){}function yk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",xk);xk.removeAllChildren=yk;function zk(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(){Ak(c)})).Da(.25);this.h=new Map;this.s=new of;this.s.B(document,"fullscreenchange",function(){Ak(c,!0)});this.l=null;"ResizeObserver"in
353
+ function vk(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",uk);uk.prototype.setTextVisibility=uk.prototype.setTextVisibility;uk.prototype.isTextVisible=uk.prototype.isTextVisible;uk.prototype.destroy=uk.prototype.destroy;uk.prototype.append=uk.prototype.append;uk.prototype.remove=uk.prototype.remove;function xk(){}function yk(a){for(;a.firstChild;)a.removeChild(a.firstChild)}M("shaka.util.Dom",xk);xk.removeAllChildren=yk;function zk(a,b){var c=this;this.j=!1;this.i=[];this.B=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(){Ak(c)})).Ca(.25);this.h=new Map;this.s=new of;this.s.C(document,"fullscreenchange",function(){Ak(c,!0)});this.l=null;"ResizeObserver"in
353
354
  window&&(this.l=new ResizeObserver(function(){Ak(c,!0)}),this.l.observe(this.g));this.o=new Map}r=zk.prototype;r.append=function(a){var b=[].concat(ia(this.i)),c={};a=t(a);for(var d=a.next();!d.done;c={zc:c.zc},d=a.next())c.zc=d.value,b.some(function(e){return function(f){return tb(f,e.zc)}}(c))||this.i.push(c.zc);Ak(this)};
354
355
  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});Ak(this,c>this.i.length);return!0};r.isTextVisible=function(){return this.j};r.setTextVisibility=function(a){this.j=a};
355
- function Bk(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,n=l?l.Te:null;l&&(g.push(l.wd),l.rc&&g.push(l.rc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Ck(a,k,e),l=a.h.get(k),n=l.Te,f=!0));0<k.nestedCues.length&&n&&Bk(a,k.nestedCues,n,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(p,q){return p.startTime!=q.startTime?
356
- p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.rc?(c.appendChild(d.rc),d.rc.appendChild(d.wd)):c.appendChild(d.wd)}}function Ak(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())yk(e.value);yk(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));Bk(a,a.i,a.g,c,[])}}}
356
+ function Bk(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,n=l?l.Ue:null;l&&(g.push(l.xd),l.rc&&g.push(l.rc),m||(f=!0,a.h["delete"](k),l=null));m&&(h.push(k),l||(Ck(a,k,e),l=a.h.get(k),n=l.Ue,f=!0));0<k.nestedCues.length&&n&&Bk(a,k.nestedCues,n,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(p,q){return p.startTime!=q.startTime?
357
+ p.startTime-q.startTime:p.endTime-q.endTime});h=t(h);for(k=h.next();!k.done;k=h.next())d=a.h.get(k.value),d.rc?(c.appendChild(d.rc),d.rc.appendChild(d.xd)):c.appendChild(d.xd)}}function Ak(a,b){if(a.g){var c=a.B.currentTime;if(!a.j||(void 0===b?0:b)){for(var d=t(a.o.values()),e=d.next();!e.done;e=d.next())yk(e.value);yk(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));Bk(a,a.i,a.g,c,[])}}}
357
358
  function Ck(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&&Dk(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=
358
- "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,{wd:f,Te:e,rc:c})}
359
+ "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,{xd:f,Ue:e,rc:c})}
359
360
  function Dk(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=Ek(c.linePadding,c,a.m);f.paddingRight=Ek(c.linePadding,c,a.m);f.textShadow=c.textShadow;if(c.backgroundImage)f.backgroundImage="url('"+c.backgroundImage+"')",f.backgroundRepeat=
360
361
  "no-repeat",f.backgroundSize="contain",f.backgroundPosition="center",f.width="100%",f.height="100%";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=Fk(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=
361
362
  "before"==c.displayAlign?"flex-start":"center"==c.displayAlign?"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=Ek(c.fontSize,c,a.m);c.line&&1==c.lineInterpretation&&(f.position="absolute",f.left="0",f.top="0",c.writingMode==mb?(f.width="100%",c.lineAlign==ob?f.top=c.line+"%":"end"==c.lineAlign&&(f.bottom=c.line+"%")):"vertical-lr"==c.writingMode?(f.height="100%",c.lineAlign==ob?
@@ -366,11 +367,11 @@ function Fk(a,b){for(var c=a.length-1;0<=c;c--){var d=b(a[c]);if(d||0===d)return
366
367
  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 Hk(a,b){this.h=a;this.g=b;this.j="";this.o=void 0;this.i=!1;this.m=!0;this.l=!1}function Ik(a,b,c){try{if(a.g.enabled){var d={d:1E3*c.duration,st:a.h.V()?Jk:Kk};d.ot=Lk(c);var e=d.ot===Mk||d.ot===Nk||d.ot===Ok||d.ot===Pk;e&&(d.bl=Qk(a,c.type));c.bandwidth&&(d.br=c.bandwidth/1E3);e&&d.ot!==Pk&&(d.tb=Rk(a,d.ot)/1E3);Sk(a,b,d)}}catch(f){Wa("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",f)}}
367
368
  function Tk(a,b,c){try{if(!a.g.enabled)return b;var d=Uk(a);a:{switch(c){case "video/webm":case "video/mp4":var e=Ok;break a;case "application/x-mpegurl":e=Vk;break a}e=void 0}d.ot=e;d.su=!0;var f=Wk(d);return Xk(b,f)}catch(g){return Wa("CMCD_SRC_ERROR","Could not generate src CMCD data.",g),b}}function Uk(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}}
368
369
  function Sk(a,b,c){c=void 0===c?{}:c;var d=void 0===d?a.g.useHeaders:d;if(a.g.enabled){Object.assign(c,Uk(a));c.pr=a.h.Oc();var e=c.ot===Mk||c.ot===Ok;a.l&&e&&(c.bs=!0,c.su=!0,a.l=!1);null==c.su&&(c.su=a.m);if(d)a=Yk(c),Object.keys(a).length&&Object.assign(b.headers,a);else{var f=Wk(c);f&&(b.uris=b.uris.map(function(g){return Xk(g,f)}))}}}
369
- function Lk(a){var b=a.type;if(a.init)return Zk;if("video"==b)return a.codecs.includes(",")?Ok:Mk;if("audio"==b)return Nk;if("text"==b)return"application/mp4"===a.mimeType?Pk:$k}function Qk(a,b){var c=a.h.Na()[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}
370
+ function Lk(a){var b=a.type;if(a.init)return Zk;if("video"==b)return a.codecs.includes(",")?Ok:Mk;if("audio"==b)return Nk;if("text"==b)return"application/mp4"===a.mimeType?Pk:$k}function Qk(a,b){var c=a.h.Ma()[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}
370
371
  function Rk(a,b){var c=a.h.Ya();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 Mk:return d.videoBandwidth||NaN;case Nk:return d.audioBandwidth||NaN;default:return d.bandwidth}}
371
372
  function Wk(a){function b(n){return 100*c(n/100)}function c(n){return Math.round(n)}function d(n){return!Number.isNaN(n)&&null!=n&&""!==n&&!1!==n}var e=[],f={br:c,d:c,bl:b,dl:b,mtp:b,nor:function(n){return encodeURIComponent(n)},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"===
372
373
  l?h:"symbol"===l?h+"="+k.description:h+"="+k;e.push(m)}}return e.join(",")}function Yk(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=Wk(e[a]))&&(c["CMCD-"+d[a]]=f);return c}
373
- function Xk(a,b){if(!b||a.includes("offline:"))return a;var c=new Nb(a);c.g.set("CMCD",b);return c.toString()}var Vk="m",Nk="a",Mk="v",Ok="av",Zk="i",$k="c",Pk="tt",Kk="v",Jk="l";M("shaka.util.CmcdManager.StreamingFormat",{xg:"d",Fg:"h",Pg:"s",Lg:"o"});function al(){}
374
+ function Xk(a,b){if(!b||a.includes("offline:"))return a;var c=new Nb(a);c.g.set("CMCD",b);return c.toString()}var Vk="m",Nk="a",Mk="v",Ok="av",Zk="i",$k="c",Pk="tt",Kk="v",Jk="l";M("shaka.util.CmcdManager.StreamingFormat",{yg:"d",Gg:"h",Qg:"s",Mg:"o"});function al(){}
374
375
  function bl(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]=Xe(l):l.constructor==Object&&b[h]&&b[h].constructor==Object?(a[h]||(a[h]=Xe(l)),k=bl(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 "+
375
376
  k),g=!1)}return g}function cl(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 dl(a,b){return a&&b}M("shaka.util.ConfigUtils",al);al.convertToConfigObject=cl;al.mergeConfigObjects=bl;function el(){}
376
377
  function fl(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&(a=360);var b={retryParameters:Le(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:function(g,h,k){return dl([g,h,k],g)},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:rc()},c={retryParameters:Le(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,
@@ -383,144 +384,144 @@ preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],prefer
383
384
  f.preferredAudioLanguage))})};return f}function hl(a,b,c){var d={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return bl(a,b,c||fl(),d,"")}
384
385
  function gl(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 Q(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/
385
386
  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!=jc&&"image"!=g.type||c.push(g);return c}M("shaka.util.PlayerConfiguration",el);el.mergeConfigObjects=hl;el.createDefault=fl;function il(){this.g=null;this.h=[]}function jl(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 kl(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}
386
- function ll(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 ml(){this.i=this.h=null;this.g=[]}function nl(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 ol(){this.u=this.C=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.I=this.L=this.M=this.l=this.o=NaN;this.g=new il;this.h=new ml};function U(a,b){We.call(this);var c=this;this.l=pl;this.Jc=this.g=null;this.ha=!1;this.Rc=new of;this.Wb=new of;this.s=new of;this.Bd=this.u=this.Vb=this.i=this.Sc=this.I=this.j=this.ia=this.T=this.Tc=this.M=this.Kc=this.G=this.vb=this.C=this.L=this.m=this.F=null;this.He=1E9;this.h=ql(this);this.$b={width:Infinity,height:Infinity};this.o=null;this.La=new Ce(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.sb=this.h.preferredTextLanguage;this.Zb=this.h.preferredTextRole;
387
- this.Xb=this.h.preferForcedSubs;this.Mb=[];this.cc=null;b&&b(this);this.F=rl(this);this.F.$d(this.h.streaming.forceHTTPS);this.D=null;sl&&(this.D=sl());this.Rc.B(window,"online",function(){c.Ud()});this.O={name:"detach"};this.Y={name:"attach"};this.ea={name:"unload"};this.Nd={name:"manifest-parser"};this.Kd={name:"manifest"};this.ub={name:"media-source"};this.Cd={name:"drm-engine"};this.ca={name:"load"};this.Qd={name:"src-equals-drm-engine"};this.wb={name:"src-equals"};var d=new Map;d.set(this.Y,
388
- function(e,f){return Re(tl(c,e,f))});d.set(this.O,function(e){e.K&&(c.Wb.mb(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Re(e)});d.set(this.ea,function(e){return Re(ul(c,e))});d.set(this.ub,function(e){e=vl(c,e);return Re(e)});d.set(this.Nd,function(e,f){var g=wl(c,e,f);return Re(g)});d.set(this.Kd,function(e){return xl(c,e)});d.set(this.Cd,function(e){e=yl(c,e);return Re(e)});d.set(this.ca,function(e,f){return Re(zl(c,e,f))});d.set(this.Qd,function(e,f){var g=Al(c,e,f);return Re(g)});
389
- d.set(this.wb,function(e,f){return Bl(c,e,f)});this.va=new nk(this.O,{zf:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Y);e==c.Y&&(k=g==c.O||f.K!=h.K?c.O:g==c.Y?c.Y:g==c.ub||g==c.ca?c.ub:g==c.wb?c.Qd:null);e==c.ub&&(k=g==c.ca&&f.K==h.K?c.Nd:c.ea);e==c.Nd&&(k=Cl(c.ca,c.Kd,c.ea,g,f,h));e==c.Kd&&(k=Cl(c.ca,c.Cd,c.ea,g,f,h));e==c.Cd&&(k=Cl(c.ca,c.ca,c.ea,g,f,h));e==c.Qd&&(k=g==c.wb&&f.K==h.K?c.wb:c.ea);if(e==c.ca||e==c.wb)k=c.ea;e==c.ea&&(k=h.K&&f.K==h.K?c.Y:c.O);return k},jf:function(e,f,g){c.dispatchEvent(Dl("onstatechange",
390
- (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,ul(c,e),2):f["return"](e.K?c.Y:c.O)})},Rf:function(e){c.dispatchEvent(Dl("onstateidle",(new Map).set("state",e.name)))}});this.Ge=new O(function(){Nd(c.i.variants,c.h.restrictions,c.$b)&&El(c)});a&&this.Yb(a,!0)}pa(U,We);function Dl(a,b){return new R(a,b)}r=U.prototype;
391
- r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Fl)return c["return"]();a.l=Fl;b=sk(a.va,function(){return{node:a.O,payload:ok(),hb:!1}});return u(c,new Promise(function(d){b.Hb=function(){};b.Wc=function(){d()};b.lb=function(){d()};b.onError=function(){d()};b.Yc=function(){d()}}),2);case 2:return u(c,a.va.destroy(),3);case 3:a.Rc&&(a.Rc.release(),a.Rc=null);a.Wb&&(a.Wb.release(),a.Wb=null);a.s&&(a.s.release(),a.s=null);a.Bd=null;a.u=null;a.h=null;a.o=null;a.Jc=null;
387
+ function ll(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 ml(){this.i=this.h=null;this.g=[]}function nl(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 ol(){this.u=this.B=this.G=this.D=this.s=this.j=this.F=this.m=this.i=this.O=this.T=this.I=this.L=this.M=this.l=this.o=NaN;this.g=new il;this.h=new ml};function U(a,b){We.call(this);var c=this;this.l=pl;this.Jc=this.g=null;this.ha=!1;this.Rc=new of;this.Wb=new of;this.s=new of;this.Cd=this.u=this.Vb=this.i=this.Sc=this.I=this.j=this.ia=this.T=this.Tc=this.M=this.Kc=this.G=this.vb=this.B=this.L=this.m=this.F=null;this.Ie=1E9;this.h=ql(this);this.$b={width:Infinity,height:Infinity};this.o=null;this.Ka=new Ce(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount);this.sb=this.h.preferredTextLanguage;this.Zb=this.h.preferredTextRole;
388
+ this.Xb=this.h.preferForcedSubs;this.Mb=[];this.cc=null;b&&b(this);this.F=rl(this);this.F.ae(this.h.streaming.forceHTTPS);this.D=null;sl&&(this.D=sl());this.Rc.C(window,"online",function(){c.Vd()});this.O={name:"detach"};this.Y={name:"attach"};this.ea={name:"unload"};this.Od={name:"manifest-parser"};this.Ld={name:"manifest"};this.ub={name:"media-source"};this.Dd={name:"drm-engine"};this.ca={name:"load"};this.Rd={name:"src-equals-drm-engine"};this.wb={name:"src-equals"};var d=new Map;d.set(this.Y,
389
+ function(e,f){return Re(tl(c,e,f))});d.set(this.O,function(e){e.K&&(c.Wb.mb(),e.K=null);c.D&&c.D.release();c.g=null;e=Promise.resolve();return Re(e)});d.set(this.ea,function(e){return Re(ul(c,e))});d.set(this.ub,function(e){e=vl(c,e);return Re(e)});d.set(this.Od,function(e,f){var g=wl(c,e,f);return Re(g)});d.set(this.Ld,function(e){return xl(c,e)});d.set(this.Dd,function(e){e=yl(c,e);return Re(e)});d.set(this.ca,function(e,f){return Re(zl(c,e,f))});d.set(this.Rd,function(e,f){var g=Al(c,e,f);return Re(g)});
390
+ d.set(this.wb,function(e,f){return Bl(c,e,f)});this.va=new nk(this.O,{Af:function(e,f,g,h){var k=null;e==c.O&&(k=g==c.O?c.O:c.Y);e==c.Y&&(k=g==c.O||f.K!=h.K?c.O:g==c.Y?c.Y:g==c.ub||g==c.ca?c.ub:g==c.wb?c.Rd:null);e==c.ub&&(k=g==c.ca&&f.K==h.K?c.Od:c.ea);e==c.Od&&(k=Cl(c.ca,c.Ld,c.ea,g,f,h));e==c.Ld&&(k=Cl(c.ca,c.Dd,c.ea,g,f,h));e==c.Dd&&(k=Cl(c.ca,c.ca,c.ea,g,f,h));e==c.Rd&&(k=g==c.wb&&f.K==h.K?c.wb:c.ea);if(e==c.ca||e==c.wb)k=c.ea;e==c.ea&&(k=h.K&&f.K==h.K?c.Y:c.O);return k},kf:function(e,f,g){c.dispatchEvent(Dl("onstatechange",
391
+ (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,ul(c,e),2):f["return"](e.K?c.Y:c.O)})},Sf:function(e){c.dispatchEvent(Dl("onstateidle",(new Map).set("state",e.name)))}});this.He=new O(function(){Nd(c.i.variants,c.h.restrictions,c.$b)&&El(c)});a&&this.Yb(a,!0)}pa(U,We);function Dl(a,b){return new R(a,b)}r=U.prototype;
392
+ r.destroy=function(){var a=this,b;return K(function(c){switch(c.g){case 1:if(a.l==Fl)return c["return"]();a.l=Fl;b=sk(a.va,function(){return{node:a.O,payload:ok(),hb:!1}});return u(c,new Promise(function(d){b.Hb=function(){};b.Wc=function(){d()};b.lb=function(){d()};b.onError=function(){d()};b.Yc=function(){d()}}),2);case 2:return u(c,a.va.destroy(),3);case 3:a.Rc&&(a.Rc.release(),a.Rc=null);a.Wb&&(a.Wb.release(),a.Wb=null);a.s&&(a.s.release(),a.s=null);a.Cd=null;a.u=null;a.h=null;a.o=null;a.Jc=null;
392
393
  a.T=null;if(!a.F){c.A(4);break}return u(c,a.F.destroy(),5);case 5:a.F=null;case 4:We.prototype.release.call(a),A(c)}})};r.Yb=function(a,b){b=void 0===b?!0:b;if(this.l==Fl)return Promise.reject(Gl());var c=ok();c.K=a;oc()||(b=!1);var d=b?this.ub:this.Y,e=sk(this.va,function(){return{node:d,payload:c,hb:!1}});e.Hb=function(){};return Hl(e)};r.detach=function(){var a=this;if(this.l==Fl)return Promise.reject(Gl());var b=sk(this.va,function(){return{node:a.O,payload:ok(),hb:!1}});b.Hb=function(){};return Hl(b)};
393
- r.ge=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Fl)return Promise.reject(Gl());oc()||(a=!1);var c=ok(),d=sk(this.va,function(e){var f=e.K&&a?b.ub:e.K?b.Y:b.O;c.K=e.K;return{node:f,payload:c,hb:!1}});d.Hb=function(){};return Hl(d)};r.rg=function(a){this.cc=a};
394
- r.load=function(a,b,c){var d=this;this.cc=null;if(this.l==Fl)return Promise.reject(Gl());this.dispatchEvent(Dl("loading"));var e=ok();e.uri=a;e.de=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Il(this,e)?this.wb:this.ca,g=sk(this.va,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,hb:!0}});this.o=new ol;this.T=Jl(this);g.Hb=function(){};return new Promise(function(h,k){g.Yc=function(){return k(new N(2,7,7002))};g.Wc=function(){h();d.dispatchEvent(Dl("loaded"))};
395
- g.lb=function(){return k(Gl())};g.onError=function(l){return k(l)}})};function Il(a,b){if(!oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Xg(d),c=Kl[c]);if(c){if(""==(b.K||qc()).canPlayType(c))return!1;if(!oc()||!(c in Wg||Xg(d)in Yg)||a.h.streaming.preferNativeHls)return!0;if(vc())return a.h.streaming.useNativeHlsOnSafari}return!1}function tl(a,b,c){null==b.K&&(b.K=c.K,a.Wb.B(b.K,"error",function(){var d=Ll(a);d&&Ml(a,d)}));a.g=b.K;return Promise.resolve()}
396
- function ul(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.l!=Fl&&(a.l=pl),c=a.Mb.map(function(p){return p()}),a.Mb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Dl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.s.mb();a.Ge.stop();a.vb&&(a.vb.release(),a.vb=null);a.Kc&&(a.Kc.stop(),a.Kc=null);if(!a.I){n.A(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Sc=null;case 3:if(!a.u){n.A(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.A(7);break}return u(n,
397
- a.j.destroy(),8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.C&&(a.C.release(),a.C=null);if(!a.L){n.A(9);break}return u(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.K||!b.K.src){n.A(11);break}return u(n,new Promise(function(p){return(new O(p)).P(.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){n.A(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Vb=null;a.M=null;if(a.i){d=
398
- t(a.i.variants);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.o=new ol;a.Hd=null;Nl(a);A(n)}})}
399
- function vl(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new ki,d=a.h.textDisplayFactory,e=d(),a.Hd=d,f=Ol(b.K,c,e,function(l,m,n){l=t(l);for(var p=l.next();!p.done;p=l.next())if(p=p.value,p.data&&p.cueTime&&p.frames){for(var q=p.cueTime+m,v=n,y=t(p.frames),x=y.next();!x.done;x=y.next())Pl(a,q,v,"ID3",x.value);if(a.D)a.D.onHlsTimedMetadata(p,q)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.F=h,u(k,f.G,2);a.L=f;A(k)})}
394
+ r.he=function(a){var b=this;a=void 0===a?!0:a;if(this.l==Fl)return Promise.reject(Gl());oc()||(a=!1);var c=ok(),d=sk(this.va,function(e){var f=e.K&&a?b.ub:e.K?b.Y:b.O;c.K=e.K;return{node:f,payload:c,hb:!1}});d.Hb=function(){};return Hl(d)};r.sg=function(a){this.cc=a};
395
+ r.load=function(a,b,c){var d=this;this.cc=null;if(this.l==Fl)return Promise.reject(Gl());this.dispatchEvent(Dl("loading"));var e=ok();e.uri=a;e.ee=Date.now()/1E3;c&&(e.mimeType=c);void 0!==b&&(e.startTime=b);var f=Il(this,e)?this.wb:this.ca,g=sk(this.va,function(h){if(null==h.K)return null;e.K=h.K;return{node:f,payload:e,hb:!0}});this.o=new ol;this.T=Jl(this);g.Hb=function(){};return new Promise(function(h,k){g.Yc=function(){return k(new N(2,7,7002))};g.Wc=function(){h();d.dispatchEvent(Dl("loaded"))};
396
+ g.lb=function(){return k(Gl())};g.onError=function(l){return k(l)}})};function Il(a,b){if(!oc())return!0;var c=b.mimeType,d=b.uri||"";c||(c=Xg(d),c=Kl[c]);if(c){if(""==(b.K||qc()).canPlayType(c))return!1;if(!oc()||!(c in Wg||Xg(d)in Yg)||a.h.streaming.preferNativeHls)return!0;if(vc())return a.h.streaming.useNativeHlsOnSafari}return!1}function tl(a,b,c){null==b.K&&(b.K=c.K,a.Wb.C(b.K,"error",function(){var d=Ll(a);d&&Ml(a,d)}));a.g=b.K;return Promise.resolve()}
397
+ function ul(a,b){var c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return a.l!=Fl&&(a.l=pl),c=a.Mb.map(function(p){return p()}),a.Mb=[],u(n,Promise.all(c),2);case 2:a.dispatchEvent(Dl("unloading"));b.mimeType=null;b.startTime=null;b.uri=null;b.K&&a.s.mb();a.He.stop();a.vb&&(a.vb.release(),a.vb=null);a.Kc&&(a.Kc.stop(),a.Kc=null);if(!a.I){n.A(3);break}return u(n,a.I.stop(),4);case 4:a.I=null,a.Sc=null;case 3:if(!a.u){n.A(5);break}return u(n,a.u.stop(),5);case 5:if(!a.j){n.A(7);break}return u(n,
398
+ a.j.destroy(),8);case 8:a.j=null;case 7:a.G&&(a.G.release(),a.G=null);a.B&&(a.B.release(),a.B=null);if(!a.L){n.A(9);break}return u(n,a.L.destroy(),10);case 10:a.L=null;case 9:if(a.D)a.D.onAssetUnload();if(!b.K||!b.K.src){n.A(11);break}return u(n,new Promise(function(p){return(new O(p)).P(.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){n.A(13);break}return u(n,a.m.destroy(),14);case 14:a.m=null;case 13:a.Vb=null;a.M=null;if(a.i){d=
399
+ t(a.i.variants);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.o=new ol;a.Id=null;Nl(a);A(n)}})}
400
+ function vl(a,b){var c,d,e,f,g,h;return K(function(k){if(1==k.g)return c=new ki,d=a.h.textDisplayFactory,e=d(),a.Id=d,f=Ol(b.K,c,e,function(l,m,n){l=t(l);for(var p=l.next();!p.done;p=l.next())if(p=p.value,p.data&&p.cueTime&&p.frames){for(var q=p.cueTime+m,v=n,y=t(p.frames),x=y.next();!x.done;x=y.next())Pl(a,q,v,"ID3",x.value);if(a.D)a.D.onHlsTimedMetadata(p,q)}}),g=a.h.manifest,h=g.segmentRelativeVttTiming,f.F=h,u(k,f.G,2);a.L=f;A(k)})}
400
401
  function wl(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.Vb=d,f=a,u(h,Vg(d,e,a.h.manifest.retryParameters,b.mimeType),2);f.Sc=h.h;a.I=a.Sc();g=Xe(a.h.manifest);c.K&&"AUDIO"===c.K.nodeName&&(g.disableVideo=!0);a.I.configure(g);A(h)})}
401
- function xl(a,b){var c=b.uri,d=a.F;a.Tc=new Dj(function(){return a.sc()});a.Tc.addEventListener("regionadd",function(g){g=g.region;Ql(a,"timelineregionadded",g);if(a.D)a.D.onDashTimedMetadata(g)});a.ia=null;a.h.streaming.observeQualityChanges&&(a.ia=new zj(function(){return a.Na()}),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,
402
+ function xl(a,b){var c=b.uri,d=a.F;a.Tc=new Dj(function(){return a.sc()});a.Tc.addEventListener("regionadd",function(g){g=g.region;Ql(a,"timelineregionadded",g);if(a.D)a.D.onDashTimedMetadata(g)});a.ia=null;a.h.streaming.observeQualityChanges&&(a.ia=new zj(function(){return a.Ma()}),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,
402
403
  height:h.height,mimeType:h.mimeType,channelsCount:h.channelsCount,pixelAspectRatio:h.pixelAspectRatio,width:h.width}).set("position",g);a.dispatchEvent(Dl("mediaqualitychanged",h))}));var e={networkingEngine:d,modifyManifestRequest:function(g,h){var k=a.T;try{k.g.enabled&&(k.o=h.format,Sk(k,g,{ot:Vk,su:!k.i}))}catch(l){Wa("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",l)}},modifySegmentRequest:function(g,h){Ik(a.T,g,h)},filter:function(g){return Rl(a,g)},makeTextStreamsForClosedCaptions:function(g){return Sl(a,
403
404
  g)},onTimelineRegionAdded:function(g){var h=a.Tc;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 R("regionadd",new Map([["region",g]])),h.dispatchEvent(g))},onEvent:function(g){return a.dispatchEvent(g)},onError:function(g){return Ml(a,g)},isLowLatencyMode:function(){return a.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return a.h.streaming.autoLowLatencyMode},
404
405
  enableLowLatencyMode:function(){a.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){a.j&&a.j.updateDuration()}},f=Date.now()/1E3;return new Ne(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=Dl("manifestparsed");a.dispatchEvent(h);if(0==a.i.variants.length)throw new N(2,4,4036);Tl(a.i);k=Date.now()/1E3;l=k-f;a.o.F=l;A(m)})}(),function(){return a.I.stop()})}
405
406
  function yl(a,b){var c,d;return K(function(e){return 1==e.g?(c=Date.now()/1E3,d=!0,a.m=Ul(a,{kb:a.F,onError:function(f){Ml(a,f)},Xc:function(f){Vl(a,f)},onExpirationUpdated:function(f,g){Wl(a,f,g)},onEvent:function(f){a.dispatchEvent(f);"drmsessionupdate"==f.type&&d&&(d=!1,a.o.j=Date.now()/1E3-c)}}),a.m.configure(a.h.drm),u(e,pg(a.m,a.i.variants,a.i.offlineSessionIds),2)):3!=e.g?u(e,a.m.Yb(b.K),3):u(e,Rl(a,a.i),0)})}
406
- function zl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.cc&&(b.startTime=a.cc,a.cc=null);d=b.K;e=b.uri;a.Vb=e;a.G=new vj({Qc:function(){return d.playbackRate},Mc:function(){return d.defaultPlaybackRate},be:function(x){d.playbackRate=x},De:function(x){d.currentTime+=x}});f=function(){return Xl(a)};g=function(){return Yl(a)};a.s.B(d,"playing",f);a.s.B(d,"pause",f);a.s.B(d,"ended",f);a.s.B(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.Bd==h||
407
- (a.Bd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(te(),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.La=new Ce(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.sb=a.h.preferredTextLanguage;a.Zb=a.h.preferredTextRole;a.Xb=a.h.preferForcedSubs;Zl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(x,w,D){a.j&&x!=a.j.l&&$l(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.u.setMediaElement(d);a.C=am(a,b.startTime);a.vb=bm(a);
408
- k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);cm(a,k);zd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=dm(a);a.j.configure(a.h.streaming);a.l=em;d.textTracks&&a.s.B(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":fm(a,x)}});a.dispatchEvent(Dl("streaming"));l=null;if(m=a.Ya().find(function(x){return x.active})){y.A(2);break}l=El(a);$l(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.A(3);
409
- break}n=a.C.Ec();return u(y,gm(l,n),4);case 4:p=y.h,a.C.vd(p);case 3:hm(a,null,be(l));case 2:return q=a.Db().find(function(x){return x.active}),q||((v=le(a.i.textStreams,a.sb,a.Zb,a.Xb)[0]||null)&&nl(a.o.h,v,!0),l&&(v?(l.audio&&im(a,l.audio,v)&&(a.ha=!0),a.ha&&a.L.m.setTextVisibility(!0),jm(a)):a.ha=!1),v&&(a.h.streaming.alwaysStreamText||a.zd())&&Wj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),km(a)),Qd(a.j?a.j.l:null,a.i),lm(a.i),mm(a),nm(a),a.i.variants.some(function(x){return x.primary}),
410
- a.s.oa(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.de}),A(y)}})}
407
+ function zl(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v;return K(function(y){switch(y.g){case 1:b.startTime=c.startTime;null!=a.cc&&(b.startTime=a.cc,a.cc=null);d=b.K;e=b.uri;a.Vb=e;a.G=new vj({Qc:function(){return d.playbackRate},Mc:function(){return d.defaultPlaybackRate},ce:function(x){d.playbackRate=x},Ee:function(x){d.currentTime+=x}});f=function(){return Xl(a)};g=function(){return Yl(a)};a.s.C(d,"playing",f);a.s.C(d,"pause",f);a.s.C(d,"ended",f);a.s.C(d,"ratechange",g);h=a.h.abrFactory;a.u&&a.Cd==h||
408
+ (a.Cd=h,a.u=h(),"function"!=typeof a.u.setMediaElement&&(te(),a.u.setMediaElement=function(){}),a.u.configure(a.h.abr));a.Ka=new Ce(a.h.preferredAudioLanguage,a.h.preferredVariantRole,a.h.preferredAudioChannelCount);a.sb=a.h.preferredTextLanguage;a.Zb=a.h.preferredTextRole;a.Xb=a.h.preferForcedSubs;Zl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd);a.u.init(function(x,w,D){a.j&&x!=a.j.l&&$l(a,x,!0,void 0===w?!1:w,void 0===D?0:D)});a.u.setMediaElement(d);a.B=am(a,b.startTime);a.vb=bm(a);
409
+ k=Math.max(a.i.minBufferTime,a.h.streaming.rebufferingGoal);cm(a,k);zd(a.i,a.h.preferredVideoCodecs,a.h.preferredAudioCodecs,a.h.preferredAudioChannelCount,a.h.preferredDecodingAttributes);a.j=dm(a);a.j.configure(a.h.streaming);a.l=em;d.textTracks&&a.s.C(d.textTracks,"addtrack",function(x){if(x.track)switch(x=x.track,x.kind){case "chapters":fm(a,x)}});a.dispatchEvent(Dl("streaming"));l=null;if(m=a.Ya().find(function(x){return x.active})){y.A(2);break}l=El(a);$l(a,l,!0,!1,0);if(!a.h.streaming.startAtSegmentBoundary){y.A(3);
410
+ break}n=a.B.Ec();return u(y,gm(l,n),4);case 4:p=y.h,a.B.wd(p);case 3:hm(a,null,be(l));case 2:return a.B.vd(),q=a.Db().find(function(x){return x.active}),q||((v=le(a.i.textStreams,a.sb,a.Zb,a.Xb)[0]||null)&&nl(a.o.h,v,!0),l&&(v?(l.audio&&im(a,l.audio,v)&&(a.ha=!0),a.ha&&a.L.m.setTextVisibility(!0),jm(a)):a.ha=!1),v&&(a.h.streaming.alwaysStreamText||a.Bd())&&Wj(a.j,v)),u(y,a.j.start(),5);case 5:a.h.abr.enabled&&(a.u.enable(),km(a)),Qd(a.j?a.j.l:null,a.i),lm(a.i),mm(a),nm(a),a.i.variants.some(function(x){return x.primary}),
411
+ a.s.oa(d,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.ee}),A(y)}})}
411
412
  function Al(a,b,c){var d,e,f,g,h,k,l;return K(function(m){return 1==m.g?(d=kc,e=Date.now()/1E3,f=!0,a.m=Ul(a,{kb:a.F,onError:function(n){Ml(a,n)},Xc:function(n){Vl(a,n)},onExpirationUpdated:function(n,p){Wl(a,n,p)},onEvent:function(n){a.dispatchEvent(n);"drmsessionupdate"==n.type&&f&&(f=!1,a.o.j=Date.now()/1E3-e)}}),a.m.configure(a.h.drm),g=c.uri||"",h=Xg(g),k=Kl[h],"application/x-mpegurl"==k&&vc()&&(k="application/vnd.apple.mpegurl"),k||(k="video/mp4"),l={id:0,language:"und",disabledUntilTime:0,
412
413
  primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:c.mimeType?c.mimeType.split(";")[0]:k,codecs:c.mimeType?ad(c.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:d.ra,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},
413
414
  a.m.Y=!0,u(m,pg(a.m,[l],[]),2)):u(m,a.m.Yb(b.K),0)})}
414
- function Bl(a,b,c){function d(){return Xl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Vb=b.uri;var e=b.K;a.C=new kj(e);var f=!1;a.Mb.push(function(){f=!0});null!=b.startTime&&a.C.vd(b.startTime);a.G=new vj({Qc:function(){return e.playbackRate},Mc:function(){return e.defaultPlaybackRate},be:function(k){e.playbackRate=k},De:function(k){e.currentTime+=k}});cm(a,a.h.streaming.rebufferingGoal);a.s.B(e,"playing",d);a.s.B(e,"pause",d);a.s.B(e,"ended",d);a.s.B(e,"ratechange",function(){return Yl(a)});"none"!=
415
- e.preload&&a.s.oa(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.de});e.audioTracks&&(a.s.B(e.audioTracks,"addtrack",function(){return mm(a)}),a.s.B(e.audioTracks,"removetrack",function(){return mm(a)}),a.s.B(e.audioTracks,"change",function(){return mm(a)}));e.textTracks&&(a.s.B(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":om(a,k);break;case "chapters":fm(a,k);break;default:mm(a)}}),a.s.B(e.textTracks,"removetrack",function(){return mm(a)}),a.s.B(e.textTracks,
416
- "change",function(){return mm(a)}));var g=Xg(b.uri);e.src=Tk(a.T,b.uri,Kl[g]);(tc()||sc("Web0S"))&&e.load();a.l=pm;a.dispatchEvent(Dl("streaming"));var h=new lc;bj(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){h.resolve()});bj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return K(function(l){if(1==l.g)return qm(a),k=rm(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.s.oa(e.textTracks,"change",m);(new O(m)).P(1)}),2);if(f)return l["return"]();sm(a);
417
- A(l)})});e.error?h.reject(Ll(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.s.oa(e,"error",function(){h.reject(Ll(a))});return new Ne(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
418
- function qm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Xd(b);var c=a.h.preferredVariantRole;""!=c&&a.Xd(b,c)}}function sm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Yd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Yd(b,d,c)}}
419
- function om(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.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.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=tm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().P(.5);a.Mb.push(function(){c.stop()})}}
415
+ function Bl(a,b,c){function d(){return Xl(a)}b.uri=c.uri;b.startTime=c.startTime;a.Vb=b.uri;var e=b.K;a.B=new kj(e);var f=!1;a.Mb.push(function(){f=!0});null!=b.startTime&&a.B.wd(b.startTime);a.G=new vj({Qc:function(){return e.playbackRate},Mc:function(){return e.defaultPlaybackRate},ce:function(k){e.playbackRate=k},Ee:function(k){e.currentTime+=k}});cm(a,a.h.streaming.rebufferingGoal);a.s.C(e,"playing",d);a.s.C(e,"pause",d);a.s.C(e,"ended",d);a.s.C(e,"ratechange",function(){return Yl(a)});"none"!=
416
+ e.preload&&a.s.oa(e,"loadedmetadata",function(){a.o.m=Date.now()/1E3-c.ee});e.audioTracks&&(a.s.C(e.audioTracks,"addtrack",function(){return mm(a)}),a.s.C(e.audioTracks,"removetrack",function(){return mm(a)}),a.s.C(e.audioTracks,"change",function(){return mm(a)}));e.textTracks&&(a.s.C(e.textTracks,"addtrack",function(k){if(k.track)switch(k=k.track,k.kind){case "metadata":om(a,k);break;case "chapters":fm(a,k);break;default:mm(a)}}),a.s.C(e.textTracks,"removetrack",function(){return mm(a)}),a.s.C(e.textTracks,
417
+ "change",function(){return mm(a)}));var g=Xg(b.uri);e.src=Tk(a.T,b.uri,Kl[g]);(tc()||sc("Web0S"))&&e.load();a.l=pm;a.dispatchEvent(Dl("streaming"));var h=new lc;bj(e,HTMLMediaElement.HAVE_METADATA,a.s,function(){a.B.vd();h.resolve()});bj(e,HTMLMediaElement.HAVE_CURRENT_DATA,a.s,function(){var k;return K(function(l){if(1==l.g)return qm(a),k=rm(a),k.find(function(m){return"disabled"!=m.mode})?l.A(2):u(l,new Promise(function(m){a.s.oa(e.textTracks,"change",m);(new O(m)).P(1)}),2);if(f)return l["return"]();
418
+ sm(a);A(l)})});e.error?h.reject(Ll(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.s.oa(e,"error",function(){h.reject(Ll(a))});return new Ne(h,function(){h.reject(new N(2,7,7001));return Promise.resolve()})}
419
+ function qm(a){var b=a.h.preferredAudioLanguage;if(""!=b){a.Yd(b);var c=a.h.preferredVariantRole;""!=c&&a.Yd(b,c)}}function sm(a){var b=a.h.preferredTextLanguage,c=a.h.preferForcedSubs;if(""!=b){a.Zd(b,"",c);var d=a.h.preferredTextRole;""!=d&&a.Zd(b,d,c)}}
420
+ function om(a,b){if("metadata"==b.kind){b.mode="hidden";a.s.C(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.D)a.D.onCueMetadataChange(e.value)});var c=(new O(function(){var d=tm(a);d=t(d);for(var e=d.next();!e.done;e=d.next())e.value.mode="hidden"})).Lb().P(.5);a.Mb.push(function(){c.stop()})}}
420
421
  function Pl(a,b,c,d,e){b=(new Map).set("startTime",b).set("endTime",c).set("metadataType",d).set("payload",e);a.dispatchEvent(Dl("metadata",b))}function fm(a,b){if(b&&"chapters"==b.kind){b.mode="hidden";var c=(new O(function(){b.mode="hidden"})).Lb().P(.5);a.Mb.push(function(){c.stop()})}}function Tl(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 Ul(a,b){return new ig(b,a.h.drm.updateExpirationTime)}
421
422
  function rl(a){return new af(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(Dl("downloadheadersreceived",b))},function(b,c,d,e){b=(new Map).set("request",b).set("error",c).set("httpResponseCode",d).set("aborted",e);a.dispatchEvent(Dl("downloadfailed",b))})}
422
423
  function am(a,b){return new lj(a.g,a.i,a.h.streaming,b,function(){a.vb&&yj(a.vb,!0);a.j&&a.j.tc();a.M&&um(a)},function(c){return a.dispatchEvent(c)})}
423
- function bm(a){var b=new Ej(a.Tc);b.addEventListener("enter",function(d){Ql(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Ql(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Ql(a,"timelineregionenter",e),Ql(a,"timelineregionexit",e))});var c=new xj(a.g);c.g.add(b);a.ia&&c.g.add(a.ia);return c}function cm(a,b){a.M=new Ge;a.M.g=Ie;Je(a.M,b,Math.min(.5,b/2));Nl(a);a.Kc=(new O(function(){um(a)})).Da(.25)}
424
+ function bm(a){var b=new Ej(a.Tc);b.addEventListener("enter",function(d){Ql(a,"timelineregionenter",d.region)});b.addEventListener("exit",function(d){Ql(a,"timelineregionexit",d.region)});b.addEventListener("skip",function(d){var e=d.region;d.seeking||(Ql(a,"timelineregionenter",e),Ql(a,"timelineregionexit",e))});var c=new xj(a.g);c.g.add(b);a.ia&&c.g.add(a.ia);return c}function cm(a,b){a.M=new Ge;a.M.g=Ie;Je(a.M,b,Math.min(.5,b/2));Nl(a);a.Kc=(new O(function(){um(a)})).Ca(.25)}
424
425
  function um(a){switch(a.l){case pm:if(a.g.ended)var b=!0;else{var c=si(a.g.buffered);b=null!=c&&c>=a.g.duration-1}break;case em:a:if(a.g.ended||Di(a.L))b=!0;else{if(a.i.presentationTimeline.V()){c=a.i.presentationTimeline.gb();var d=si(a.g.buffered);if(null!=d&&d>=c){b=!0;break a}}b=!1}break;default:b=!1}d=ui(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?He:Ie;c.g=d;b!=d&&Nl(a)}function Ol(a,b,c,d){return new xi(a,b,c,d)}
425
- function Jl(a){return new Hk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Na:function(){return a.Na()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Ya:function(){return a.Ya()},Oc:function(){return a.Oc()},V:function(){return a.V()}},a.h.cmcd)}
426
- function dm(a){return new Kj(a.i,{Pc:function(){return a.C.Ec()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Ik(a.T,b,c)},R:a.L,kb:a.F,onError:function(b){return Ml(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Tf:function(){a.I&&a.I.update&&a.I.update()},Pd:function(){a.C&&a.C.Ee();um(a)},Sf:function(b,c){var d=c.Id;d&&a.ia&&Bj(a.ia,d,b)},me:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){for(var e=
426
+ function Jl(a){return new Hk({getBandwidthEstimate:function(){return a.u?a.u.getBandwidthEstimate():NaN},Ma:function(){return a.Ma()},getCurrentTime:function(){return a.g?a.g.currentTime:0},Ya:function(){return a.Ya()},Oc:function(){return a.Oc()},V:function(){return a.V()}},a.h.cmcd)}
427
+ function dm(a){return new Kj(a.i,{Pc:function(){return a.B.Ec()},getBandwidthEstimate:function(){return a.u.getBandwidthEstimate()},modifySegmentRequest:function(b,c){Ik(a.T,b,c)},R:a.L,kb:a.F,onError:function(b){return Ml(a,b)},onEvent:function(b){return a.dispatchEvent(b)},Uf:function(){a.I&&a.I.update&&a.I.update()},Qd:function(){a.B&&a.B.Fe();um(a)},Tf:function(b,c){var d=c.Jd;d&&a.ia&&Bj(a.ia,d,b)},ne:function(b,c){var d=a.m;if(d.h.parseInbandPsshEnabled&&["audio","video"].includes(b)){for(var e=
427
428
  new Mf(Fb(c)),f=0,g=t(e.data),h=g.next();!h.done;h=g.next())f+=h.value.length;if(0==f)d=Promise.resolve();else{f=new Uint8Array(f);g=0;e=t(e.data);for(h=e.next();!h.done;h=e.next())h=h.value,f.set(h,g),g+=h.length;yg(d,"cenc",f);d=d.o}}else d=Promise.resolve();return d}})}
428
429
  r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cl(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=hl(this.h,a,ql(this));vm(this);return c};
429
- function vm(a){if(a.I){var b=Xe(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{wm(a,a.i)}catch(f){Ml(a,f)}a.u&&nm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||xm(a)}a.F&&a.F.$d(a.h.streaming.forceHTTPS);if(a.L&&(a.L.F=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Hd!=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=
430
- c);a.Hd=b;a.j&&(b=a.j,(c=b.i.get(jc))&&Uj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),km(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Je(a.M,b,Math.min(.5,b/2)));a.i&&Zl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=ql(this);hl(a,this.h,ql(this));return a};
431
- r.mf=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.sc().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.cg=function(){for(var a in this.h)delete this.h[a];hl(this.h,ql(this),ql(this));vm(this)};r.uf=function(){return this.l};r.yf=function(){return this.g};r.fc=function(){return this.F};r.xd=function(){return this.Vb};
432
- r.ve=function(){return this.D?this.D:null};r.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};r.jb=function(){return this.i?this.i.presentationTimeline.jb():!1};r.Lf=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};
433
- r.sc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Bb(),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.Jf=function(){this.V()&&(this.g.currentTime=this.sc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.ec=function(){return this.m?this.m.ec():Infinity};r.Nc=function(){return this.m?this.m.Nc():{}};
434
- r.yd=function(){return this.M?this.M.g==Ie:!1};r.Oc=function(){return this.g?this.G?this.G.i:1:0};r.mg=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==em&&(this.u.playbackRateChanged(a),Tj(this.j,1<Math.abs(a))))};r.bf=function(){var a=this.G.Mc();this.l==pm&&this.G.set(a);this.l==em&&(this.G.set(a),this.u.playbackRateChanged(a),Tj(this.j,!1))};
430
+ function vm(a){if(a.I){var b=Xe(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{wm(a,a.i)}catch(f){Ml(a,f)}a.u&&nm(a);b=a.j.l;!b||b.allowedByApplication&&b.allowedByKeySystem||xm(a)}a.F&&a.F.ae(a.h.streaming.forceHTTPS);if(a.L&&(a.L.F=a.h.manifest.segmentRelativeVttTiming,b=a.h.textDisplayFactory,a.Id!=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=
431
+ c);a.Id=b;a.j&&(b=a.j,(c=b.i.get(jc))&&Uj(b,c.stream,!0,0,!0))}a.u&&(a.u.configure(a.h.abr),a.h.abr.enabled?a.u.enable():a.u.disable(),km(a));a.M&&(b=a.h.streaming.rebufferingGoal,a.i&&(b=Math.max(b,a.i.minBufferTime)),Je(a.M,b,Math.min(.5,b/2)));a.i&&Zl(a.i.presentationTimeline,a.h.playRangeStart,a.h.playRangeEnd)}r.getConfiguration=function(){var a=ql(this);hl(a,this.h,ql(this));return a};
432
+ r.nf=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.sc().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.dg=function(){for(var a in this.h)delete this.h[a];hl(this.h,ql(this),ql(this));vm(this)};r.vf=function(){return this.l};r.zf=function(){return this.g};r.fc=function(){return this.F};r.yd=function(){return this.Vb};
433
+ r.we=function(){return this.D?this.D:null};r.V=function(){return this.i?this.i.presentationTimeline.V():this.g&&this.g.src?Infinity==this.g.duration:!1};r.jb=function(){return this.i?this.i.presentationTimeline.jb():!1};r.Mf=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};
434
+ r.sc=function(){if(this.i){var a=this.i.presentationTimeline;return{start:a.Bb(),end:a.Na()}}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.Kf=function(){this.V()&&(this.g.currentTime=this.sc().end)};r.keySystem=function(){var a=this.drmInfo();return a?a.keySystem:""};r.drmInfo=function(){return this.m?this.m.g:null};r.ec=function(){return this.m?this.m.ec():Infinity};r.Nc=function(){return this.m?this.m.Nc():{}};
435
+ r.zd=function(){return this.M?this.M.g==Ie:!1};r.Oc=function(){return this.g?this.G?this.G.i:1:0};r.ng=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==em&&(this.u.playbackRateChanged(a),Tj(this.j,1<Math.abs(a))))};r.cf=function(){var a=this.G.Mc();this.l==pm&&this.G.set(a);this.l==em&&(this.G.set(a),this.u.playbackRateChanged(a),Tj(this.j,!1))};
435
436
  r.Ya=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=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 ie(g)}):[]};
436
- r.Db=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?rm(this).map(function(f){return ge(f)}):[]};r.rf=function(){return this.i?this.i.imageStreams.map(function(a){return de(a)}):[]};
437
- r.Ff=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B;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);n=parseInt(h[2],10);p=k/m;q=l/n;
437
+ r.Db=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?rm(this).map(function(f){return ge(f)}):[]};r.tf=function(){return this.i?this.i.imageStreams.map(function(a){return de(a)}):[]};
438
+ r.Gf=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B;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);n=parseInt(h[2],10);p=k/m;q=l/n;
438
439
  v=m*n;y=f.j-f.startTime;x=f.m||y/v;w=f.startTime;z=D=0;1<v&&(B=Math.floor((b-f.startTime)/x),w=f.startTime+B*x,D=B%m*p,z=Math.floor(B/m)*q);return G["return"]({imageHeight:l,imageWidth:k,height:q,positionX:D,positionY:z,startTime:w,duration:x,uris:f.ya(),width:p})}return G["return"](null)})};
439
- r.Le=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&&(nl(this.o.h,b,!1),Wj(this.j,b),ym(this),this.sb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=rm(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";ym(this)}};
440
- r.Me=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)&&($l(this,d,!1,b,c),this.La=new Be(d),nm(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,
441
- ee(c)==a.id){zm(this,c);break}};r.lf=function(){return Am(this.Ya())};r.Ef=function(){return Am(this.Db())};r.kf=function(){return Array.from(Bm(this.Ya()))};r.Df=function(){return Array.from(Bm(this.Db()))};
442
- r.Xd=function(a,b){if(this.i&&this.C){this.La=new Ce(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.Me(c,!0)):xm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Q(a);f=d=null;e=
440
+ r.Me=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&&(nl(this.o.h,b,!1),Wj(this.j,b),ym(this),this.sb=b.language)}else if(this.g&&this.g.src&&this.g.textTracks){b=rm(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";ym(this)}};
441
+ r.Ne=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)&&($l(this,d,!1,b,c),this.Ka=new Be(d),nm(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,
442
+ ee(c)==a.id){zm(this,c);break}};r.mf=function(){return Am(this.Ya())};r.Ff=function(){return Am(this.Db())};r.lf=function(){return Array.from(Bm(this.Ya()))};r.Ef=function(){return Array.from(Bm(this.Db()))};
443
+ r.Yd=function(a,b){if(this.i&&this.B){this.Ka=new Ce(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.Ka.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.Ne(c,!0)):xm(this)}else if(this.g&&this.g.audioTracks){e=Array.from(this.g.audioTracks);c=Q(a);f=d=null;e=
443
444
  t(e);for(g=e.next();!g.done;g=e.next()){g=g.value;var h=ie(g);Q(h.language)==c&&(d=g,b?h.roles.includes(b)&&(f=g):0==h.roles.length&&(f=g))}f?zm(this,f):d&&zm(this,d)}};
444
- r.Yd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.C){if(this.sb=a,this.Zb=b||"",this.Xb=c,(a=le(this.i.textStreams,this.sb,this.Zb,this.Xb)[0]||null)&&a!=this.j.o&&(nl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.zd()))Wj(this.j,a),ym(this)}else{var d=Q(a);(a=this.Db().find(function(e){return Q(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Le(a)}};
445
- r.eg=function(a){if(this.i&&this.C){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 Ce(b.language,"",0,a),xm(this))}};r.zd=function(){var a=this.ha;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?rm(this).some(function(b){return"showing"==b.mode}):a};r.we=function(){return this.g&&this.g.src&&this.g.textTracks?Cm(this).map(function(a){return ge(a)}):[]};
446
- r.nf=function(a){var b=Q(a),c=Cm(this).filter(function(g){return Q(g.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;var f=e.id;f&&""!=f||(f=e.startTime+"-"+e.endTime+"-"+e.text);a.push({id:f,title:e.text,startTime:e.startTime,endTime:e.endTime})}}return a};
445
+ r.Zd=function(a,b,c){c=void 0===c?!1:c;if(this.i&&this.B){if(this.sb=a,this.Zb=b||"",this.Xb=c,(a=le(this.i.textStreams,this.sb,this.Zb,this.Xb)[0]||null)&&a!=this.j.o&&(nl(this.o.h,a,!1),this.h.streaming.alwaysStreamText||this.Bd()))Wj(this.j,a),ym(this)}else{var d=Q(a);(a=this.Db().find(function(e){return Q(e.language)==d&&(!b||e.roles.includes(b))&&e.forced==c}))&&this.Me(a)}};
446
+ r.fg=function(a){if(this.i&&this.B){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.Ka=new Ce(b.language,"",0,a),xm(this))}};r.Bd=function(){var a=this.ha;return this.L?this.L.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?rm(this).some(function(b){return"showing"==b.mode}):a};r.xe=function(){return this.g&&this.g.src&&this.g.textTracks?Cm(this).map(function(a){return ge(a)}):[]};
447
+ r.pf=function(a){var b=Q(a),c=Cm(this).filter(function(g){return Q(g.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;var f=e.id;f&&""!=f||(f=e.startTime+"-"+e.endTime+"-"+e.text);a.push({id:f,title:e.text,startTime:e.startTime,endTime:e.endTime})}}return a};
447
448
  function rm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"!=b.kind&&"chapters"!=b.kind&&"Shaka Player TextTrack"!=b.label})}function tm(a){return Array.from(a.g.textTracks).filter(function(b){return"metadata"==b.kind})}function Cm(a){return Array.from(a.g.textTracks).filter(function(b){return"chapters"==b.kind})}
448
- r.kg=function(a){a=!!a;if(this.ha!=a){this.ha=a;if(this.l==em)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=le(this.i.textStreams,this.sb,this.Zb,this.Xb),0<a.length&&(Wj(this.j,a[0]),ym(this))):Sj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=rm(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")}jm(this)}};
449
- r.Bf=function(){if(!this.V())return null;var a=this.va.l,b=0;if(this.C)b=this.C.Ec();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};
450
- r.xe=function(){if(!this.V())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.Na=function(){if(this.l==em)return this.L.Na();var a={total:[],audio:[],video:[],text:[]};this.l==pm&&(a.total=vi(this.g.buffered));return a};
449
+ r.lg=function(a){a=!!a;if(this.ha!=a){this.ha=a;if(this.l==em)this.L.m.setTextVisibility(a),this.h.streaming.alwaysStreamText||(a?this.j.o||(a=le(this.i.textStreams,this.sb,this.Zb,this.Xb),0<a.length&&(Wj(this.j,a[0]),ym(this))):Sj(this.j));else if(this.g&&this.g.src&&this.g.textTracks){var b=rm(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")}jm(this)}};
450
+ r.Cf=function(){if(!this.V())return null;var a=this.va.l,b=0;if(this.B)b=this.B.Ec();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};
451
+ r.ye=function(){if(!this.V())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.Ma=function(){if(this.l==em)return this.L.Ma();var a={total:[],audio:[],video:[],text:[]};this.l==pm&&(a.total=vi(this.g.buffered));return a};
451
452
  r.getStats=function(){if(this.l!=em&&this.l!=pm)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped: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:[]};Xl(this);var a=this.g,b=a.currentTime/a.duration;if(!isNaN(b)){var c=this.o;b=
452
- Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.C&&(this.o.O=this.C.ie(),this.o.T=this.C.je());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.L=d;this.o.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.o.s=c;if(this.l==em){if(c=this.j.l)this.o.C=(this.G?this.G.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.xe().valueOf()+
453
- 1E3*this.sc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.o.u=c}this.l==pm&&(c=this.o,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.o;a=e.o;c=e.l;b=e.C;d=e.L;var f=e.M,g=e.I,h=e.T,k=e.O,l=e.u,m=e.i,n=e.m,p=e.F,q=e.j,v=kl(e.g,"playing"),y=kl(e.g,"paused"),x=kl(e.g,"buffering"),w=e.s,D=e.D,z=e.G,B=ll(e.g),G=[];e=t(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,G.push({timestamp:E.timestamp,
453
+ Math.round(100*b);c.i=isNaN(c.i)?b:Math.max(c.i,b)}this.B&&(this.o.O=this.B.je(),this.o.T=this.B.ke());if(a.getVideoPlaybackQuality){c=a.getVideoPlaybackQuality();b=this.o;var d=Number(c.totalVideoFrames);b.M=Number(c.droppedVideoFrames);b.L=d;this.o.I=Number(c.corruptedVideoFrames)}this.m?(c=this.m,c=c.I?c.I:NaN):c=NaN;this.o.s=c;if(this.l==em){if(c=this.j.l)this.o.B=(this.G?this.G.i:1)*c.bandwidth;c&&c.video&&(b=this.o,d=c.video.height||NaN,b.o=c.video.width||NaN,b.l=d);this.V()&&(c=this.ye().valueOf()+
454
+ 1E3*this.sc().end,this.o.D=(Date.now()-c)/1E3);this.i&&this.i.presentationTimeline&&(this.o.G=this.i.presentationTimeline.g);c=this.u.getBandwidthEstimate();this.o.u=c}this.l==pm&&(c=this.o,b=a.videoHeight||NaN,c.o=a.videoWidth||NaN,c.l=b);var e=this.o;a=e.o;c=e.l;b=e.B;d=e.L;var f=e.M,g=e.I,h=e.T,k=e.O,l=e.u,m=e.i,n=e.m,p=e.F,q=e.j,v=kl(e.g,"playing"),y=kl(e.g,"paused"),x=kl(e.g,"buffering"),w=e.s,D=e.D,z=e.G,B=ll(e.g),G=[];e=t(e.h.g);for(var E=e.next();!E.done;E=e.next())E=E.value,G.push({timestamp:E.timestamp,
454
455
  id:E.id,type:E.type,fromAdaptation:E.fromAdaptation,bandwidth:E.bandwidth});return{width:a,height:c,streamBandwidth:b,decodedFrames:d,droppedFrames:f,corruptedFrames:g,stallsDetected:h,gapsJumped:k,estimatedBandwidth:l,completionPercent:m,loadLatency:n,manifestTimeSeconds:p,drmTimeSeconds:q,playTime:v,pauseTime:y,bufferingTime:x,licenseTime:w,liveLatency:D,maxSegmentDuration:z,stateHistory:B,switchHistory:G}};
455
- r.Ye=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,y,x,w,D;return K(function(z){switch(z.g){case 1:if(h.l!=em&&h.l!=pm)throw new N(1,7,7004);if(d){z.A(2);break}return u(z,Dm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=pm){z.A(4);break}g&&(c="forced");return u(z,Em(h,a,b,c,d,f||"",k),5);case 5:l=h.Db();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return mm(h),z["return"](m);throw new N(1,2,2012);case 4:n=
456
- kc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){z.A(6);break}return u(z,Fm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=z.h,v=Gm(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Ai(y),d="text/vtt";case 6:x={id:h.He++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:tj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.X,primary:!1,trickModeVideo:null,
456
+ r.Ze=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,v,y,x,w,D;return K(function(z){switch(z.g){case 1:if(h.l!=em&&h.l!=pm)throw new N(1,7,7004);if(d){z.A(2);break}return u(z,Dm(h,a),3);case 3:d=z.h;case 2:k=[];if(h.D)try{k=h.D.getServerSideCuePoints()}catch(B){}if(h.l!=pm){z.A(4);break}g&&(c="forced");return u(z,Em(h,a,b,c,d,f||"",k),5);case 5:l=h.Db();if(m=l.find(function(B){return B.language==b&&B.label==(f||"")&&B.kind==c}))return mm(h),z["return"](m);throw new N(1,2,2012);case 4:n=
457
+ kc;p=h.i.presentationTimeline.getDuration();if(Infinity==p)throw new N(1,4,4033);if(!k.length){z.A(6);break}return u(z,Fm(h,a,h.F,h.h.streaming.retryParameters),7);case 7:q=z.h,v=Gm(h,q,d,k),y=new Blob([v],{type:"text/vtt"}),a=Ai(y),d="text/vtt";case 6:x={id:h.Ie++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:tj(0,p,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,label:f||null,type:n.X,primary:!1,trickModeVideo:null,
457
458
  emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null};w=Xc(x.mimeType,x.codecs);D=cd(w);if(!D)throw new N(2,2,2014,d);h.i.textStreams.push(x);mm(h);return z["return"](ce(x))}})};
458
- r.Xe=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=em&&d.l!=pm)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,Dm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Em(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.we();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.s.oa(f,"load",l);d.s.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
459
+ r.Ye=function(a,b,c){var d=this,e,f,g,h;return K(function(k){switch(k.g){case 1:if(d.l!=em&&d.l!=pm)throw new N(1,7,7004);if(c){k.A(2);break}return u(k,Dm(d,a),3);case 3:c=k.h;case 2:e=[];if(d.D)try{e=d.D.getServerSideCuePoints()}catch(l){}return u(k,Em(d,a,b,"chapters",c,"",e),4);case 4:f=k.h;g=d.xe();h=g.find(function(l){return l.language==b});if(!h){k.A(5);break}return u(k,new Promise(function(l,m){d.s.oa(f,"load",l);d.s.oa(f,"error",function(){m(new N(1,2,2015))})}),6);case 6:return k["return"](h);
459
460
  case 5:throw new N(1,2,2012);}})};function Dm(a,b){var c,d;return K(function(e){switch(e.g){case 1:c=Xg(b);if(d=Hm[c])return e["return"](d);C(e,2);return u(e,Zg(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);}})}
460
461
  function Em(a,b,c,d,e,f,g){var h,k,l,m;return K(function(n){if(1==n.g)return"text/vtt"!=e||g.length?u(n,Fm(a,b,a.F,a.h.streaming.retryParameters),3):n.A(2);2!=n.g&&(h=n.h,k=Gm(a,h,e,g),l=new Blob([k],{type:"text/vtt"}),b=Ai(l),e="text/vtt");m=document.createElement("track");var p=a.T,q=b;try{if(p.g.enabled){var v=Uk(p);v.ot=$k;v.su=!0;var y=Wk(v);var x=Xk(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")||
461
462
  a.g.setAttribute("crossorigin","anonymous");a.g.appendChild(m);return n["return"](m)})}function Fm(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){e=lf;f=ef([b],d);f.method="GET";var k=a.T;try{k.g.enabled&&Sk(k,f,{ot:$k,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)})}
462
- function Gm(a,b,c,d){var e=dd[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),Gk(b,d);throw new N(2,2,2014,c);}r.ae=function(a,b){this.$b.width=a;this.$b.height=b};r.Ud=function(){if(this.l==em){var a=this.j;if(a.h.g)a=!1;else if(a.s)a=!1;else{for(var b=t(a.i.values()),c=b.next();!c.done;c=b.next())c=c.value,c.jc&&(c.jc=!1,Rj(a,c,.1));a=!0}}else a=!1;return a};
463
- r.vf=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.wf=function(){return this.Sc};
464
- function ql(a){var b=fl();b.streaming.failureCallback=function(c){var d=[1001,1002,1003];a.V()&&d.includes(c.code)&&(c.severity=1,a.Ud())};b.textDisplayFactory=function(){return a.Jc?new zk(a.g,a.Jc):new uk(a.g)};return b}r.Qe=function(a){this.Jc=a};
465
- function Sl(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 uj;h={id:a.He++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
463
+ function Gm(a,b,c,d){var e=dd[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),Gk(b,d);throw new N(2,2,2014,c);}r.be=function(a,b){this.$b.width=a;this.$b.height=b};r.Vd=function(a){if(this.l==em){var b=this.j;a=void 0===a?.1:a;if(b.h.g)b=!1;else if(b.s)b=!1;else{for(var c=t(b.i.values()),d=c.next();!d.done;d=c.next())d=d.value,d.jc&&(d.jc=!1,Rj(b,d,a));b=!0}}else b=!1;return b};
464
+ r.wf=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.xf=function(){return this.Sc};
465
+ function ql(a){var b=fl();b.streaming.failureCallback=function(c){if(a.V()){var d=null;1001==c.code||1002==c.code?d=1:1003==c.code&&(d=.1);null!=d&&(c.severity=1,a.Vd(d))}};b.textDisplayFactory=function(){return a.Jc?new zk(a.g,a.Jc):new uk(a.g)};return b}r.Re=function(a){this.Jc=a};
466
+ function Sl(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 uj;h={id:a.Ie++,originalId:g,createSegmentIndex:function(){return Promise.resolve()},
466
467
  segmentIndex:k,mimeType:h,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:e.closedCaptions.get(g),label:null,type:jc,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 Rl(a,b){return K(function(c){if(1==c.g)return u(c,Im(a,b),2);wm(a,b);A(c)})}
467
468
  function Im(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);lm(b);A(d)})}
468
469
  function wm(a,b){if(a.l!=Fl){Nd(b.variants,a.h.restrictions,a.$b)&&a.j&&mm(a);var c=a.m?a.m.g:null;if(c&&a.m.u)for(var d=t(b.variants),e=d.next();!e.done;e=d.next()){e=e.value;e=t((e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]));for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.keySystem==c.keySystem){f=t(f.initData||[]);for(var g=f.next();!g.done;g=f.next())g=g.value,yg(a.m,g.initDataType,g.initData)}}Jm(a,b)}}
469
470
  function gm(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,n,p;return K(function(q){if(1==q.g)return k?u(q,k.createSegmentIndex(),2):q["return"](null);n=(m=k.segmentIndex.Ab(l))?m.next().value:null;if(!n)return q["return"](null);p=n.startTime;return q["return"](p)})},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)})}
470
- function Nl(a){var b=a.yd();if(a.o&&a.M&&a.C){var c=a.G;c.j=b;wj(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Xl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Dl("buffering",b))}function Yl(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Dl("ratechange"),a.dispatchEvent(b))}function Xl(a){if(a.o&&a.M){var b=a.o.g;a.M.g==Ie?jl(b,"buffering"):a.g.paused?jl(b,"paused"):a.g.ended?jl(b,"ended"):jl(b,"playing")}}
471
- function nm(a){try{Jm(a,a.i)}catch(c){return Ml(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 El(a){return nm(a)?a.u.chooseVariant():null}function xm(a){var b=El(a);b&&$l(a,b,!0,!0,0)}
471
+ function Nl(a){var b=a.zd();if(a.o&&a.M&&a.B){var c=a.G;c.j=b;wj(c);a.T&&(c=a.T,b||c.i||(c.i=!0),c.i&&b&&(c.l=!0),c.m=b);Xl(a)}b=(new Map).set("buffering",b);a.dispatchEvent(Dl("buffering",b))}function Yl(a){var b=a.g.playbackRate;0!=b&&(a.G&&a.G.set(b),b=Dl("ratechange"),a.dispatchEvent(b))}function Xl(a){if(a.o&&a.M){var b=a.o.g;a.M.g==Ie?jl(b,"buffering"):a.g.paused?jl(b,"paused"):a.g.ended?jl(b,"ended"):jl(b,"playing")}}
472
+ function nm(a){try{Jm(a,a.i)}catch(c){return Ml(a,c),!1}var b=a.i.variants.filter(function(c){return je(c)});b=a.Ka.create(b);a.u.setVariants(Array.from(b.values()));return!0}function El(a){return nm(a)?a.u.chooseVariant():null}function xm(a){var b=El(a);b&&$l(a,b,!0,!0,0)}
472
473
  function $l(a,b,c,d,e){var f=a.j.l;if(b==f)d&&Vj(a.j,b,d,e,!0);else{var g=a.o.h;g.h!=b&&(g.h=b,g.g.push({timestamp:Date.now()/1E3,id:b.id,type:"variant",fromAdaptation:c,bandwidth:b.bandwidth}));Vj(a.j,b,d,e,void 0,c);d=null;f&&(d=be(f));b=be(b);c?hm(a,d,b):Km(a,d,b)}}function zm(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=ie(c);var d=ie(b);Km(a,c,d)}
473
474
  function im(a,b,c){a=Q(a.h.preferredTextLanguage);b=Q(b.language);c=Q(c.language);return ld(c,a)&&!ld(b,c)}function hm(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Dl("adaptation",b);Lm(a,b)}function mm(a){var b=Dl("trackschanged");Lm(a,b)}function Km(a,b,c){b=(new Map).set("oldTrack",b).set("newTrack",c);b=Dl("variantchanged",b);Lm(a,b)}function ym(a){var b=Dl("textchanged");Lm(a,b)}function jm(a){var b=Dl("texttrackvisibility");Lm(a,b)}
474
475
  function km(a){var b=(new Map).set("newStatus",a.h.abr.enabled);Lm(a,Dl("abrstatuschanged",b))}
475
- function Mm(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;for(var d=a.Ya().find(function(h){return h.active}),e=a.i,f=t(e.variants),g=f.next();!g.done;g=f.next())g=g.value,g.id===d.id&&(g.disabledUntilTime=Date.now()/1E3+c);Nd(e.variants,a.h.restrictions,a.$b);d=El(a);if(!d)return!1;e=a.Na().video.reduce(function(h,k){return h+k.end-k.start},0);$l(a,d,!1,!0,e);a.Ge.P(c);return!0}
476
+ function Mm(a,b){if(1002!=b.code&&1011!=b.code||1!=b.category||!navigator.onLine)return!1;var c=a.h.streaming.maxDisabledTime;if(0==c)if(1011==b.code)c=1;else return!1;for(var d=a.Ya().find(function(h){return h.active}),e=a.i,f=t(e.variants),g=f.next();!g.done;g=f.next())g=g.value,g.id===d.id&&(g.disabledUntilTime=Date.now()/1E3+c);Nd(e.variants,a.h.restrictions,a.$b);d=El(a);if(!d)return!1;e=a.Ma().video.reduce(function(h,k){return h+k.end-k.start},0);$l(a,d,!1,!0,e);a.He.P(c);return!0}
476
477
  function Ml(a,b){if(a.l!=Fl)if(Mm(a,b))b.handled=!0;else{var c=Dl("error",(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(Dl(b,c))}
477
478
  function Ll(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)}
478
479
  function Vl(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&&!Nm.includes(l)}h!=f.allowedByKeySystem&&
479
- (e=!0)}}}if(!e||nm(a))(d=a.j.l)&&!d.allowedByKeySystem&&xm(a),e&&mm(a)}}function Wl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Dl("expirationupdated");a.dispatchEvent(b)}function Zl(a,b,c){0<b&&(a.V()||a.Pe(b));b=a.getDuration();c<b&&(a.V()||a.Ia(c))}
480
+ (e=!0)}}}if(!e||nm(a))(d=a.j.l)&&!d.allowedByKeySystem&&xm(a),e&&mm(a)}}function Wl(a,b,c){if(a.I&&a.I.onExpirationUpdated)a.I.onExpirationUpdated(b,c);b=Dl("expirationupdated");a.dispatchEvent(b)}function Zl(a,b,c){0<b&&(a.V()||a.Qe(b));b=a.getDuration();c<b&&(a.V()||a.Ia(c))}
480
481
  function Jm(a,b){var c=a.m?a.m.Nc():{},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 n=m.next();!n.done;n=m.next())if(n=n.value,n.keyIds.size){n=t(n.keyIds);for(var p=n.next();!p.done;p=n.next()){p=p.value;var q=c[d?"00":p];q?Nm.includes(q)&&h.add(q):g.add(p)}}l.allowedByApplication?l.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw c={hasAppRestrictions:f,
481
482
  missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new N(2,4,4012,c);}function lm(a){if(!a.variants.some(je))throw new N(2,4,4032);}function Lm(a,b){K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);a.l!=Fl&&a.dispatchEvent(b);A(c)})}function Bm(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(Q(c.language)):b.add("und");return b}
482
483
  function Am(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=Q(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),n=m.next();!n.done;n=m.next()){n=n.value;var p=null;c.has(l)&&c.get(l).has(n)&&(p=c.get(l).get(n));
483
- h.push({language:l,role:n,label:p})}});return h}function Gl(){return new N(2,7,7E3)}function Cl(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function ok(){return{K:null,mimeType:null,startTime:null,de:NaN,uri:null}}function Hl(a){return new Promise(function(b,c){a.lb=function(){return c(Gl())};a.Wc=function(){return b()};a.onError=function(d){return c(d)};a.Yc=function(){return c(Gl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Qe;
484
- U.prototype.getManifestParserFactory=U.prototype.wf;U.prototype.getManifest=U.prototype.vf;U.prototype.retryStreaming=U.prototype.Ud;U.prototype.setMaxHardwareResolution=U.prototype.ae;U.prototype.addChaptersTrack=U.prototype.Xe;U.prototype.addTextTrackAsync=U.prototype.Ye;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Na;U.prototype.getPresentationStartTimeAsDate=U.prototype.xe;U.prototype.getPlayheadTimeAsDate=U.prototype.Bf;
485
- U.prototype.setTextTrackVisibility=U.prototype.kg;U.prototype.getChapters=U.prototype.nf;U.prototype.getChaptersTracks=U.prototype.we;U.prototype.isTextTrackVisible=U.prototype.zd;U.prototype.selectVariantsByLabel=U.prototype.eg;U.prototype.selectTextLanguage=U.prototype.Yd;U.prototype.selectAudioLanguage=U.prototype.Xd;U.prototype.getTextLanguages=U.prototype.Df;U.prototype.getAudioLanguages=U.prototype.kf;U.prototype.getTextLanguagesAndRoles=U.prototype.Ef;
486
- U.prototype.getAudioLanguagesAndRoles=U.prototype.lf;U.prototype.selectVariantTrack=U.prototype.Me;U.prototype.selectTextTrack=U.prototype.Le;U.prototype.getThumbnails=U.prototype.Ff;U.prototype.getImageTracks=U.prototype.rf;U.prototype.getTextTracks=U.prototype.Db;U.prototype.getVariantTracks=U.prototype.Ya;U.prototype.cancelTrickPlay=U.prototype.bf;U.prototype.trickPlay=U.prototype.mg;U.prototype.getPlaybackRate=U.prototype.Oc;U.prototype.isBuffering=U.prototype.yd;U.prototype.getKeyStatuses=U.prototype.Nc;
487
- U.prototype.getExpiration=U.prototype.ec;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Jf;U.prototype.seekRange=U.prototype.sc;U.prototype.isAudioOnly=U.prototype.Lf;U.prototype.isInProgress=U.prototype.jb;U.prototype.isLive=U.prototype.V;U.prototype.getAdManager=U.prototype.ve;U.prototype.getAssetUri=U.prototype.xd;U.prototype.getNetworkingEngine=U.prototype.fc;U.prototype.getMediaElement=U.prototype.yf;
488
- U.prototype.getLoadMode=U.prototype.uf;U.prototype.resetConfiguration=U.prototype.cg;U.prototype.getBufferFullness=U.prototype.mf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.rg;U.prototype.unload=U.prototype.ge;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Yb;
484
+ h.push({language:l,role:n,label:p})}});return h}function Gl(){return new N(2,7,7E3)}function Cl(a,b,c,d,e,f){return d==a&&e.K==f.K&&e.uri==f.uri&&e.mimeType==f.mimeType?b:c}function ok(){return{K:null,mimeType:null,startTime:null,ee:NaN,uri:null}}function Hl(a){return new Promise(function(b,c){a.lb=function(){return c(Gl())};a.Wc=function(){return b()};a.onError=function(d){return c(d)};a.Yc=function(){return c(Gl())}})}M("shaka.Player",U);U.prototype.setVideoContainer=U.prototype.Re;
485
+ U.prototype.getManifestParserFactory=U.prototype.xf;U.prototype.getManifest=U.prototype.wf;U.prototype.retryStreaming=U.prototype.Vd;U.prototype.setMaxHardwareResolution=U.prototype.be;U.prototype.addChaptersTrack=U.prototype.Ye;U.prototype.addTextTrackAsync=U.prototype.Ze;U.prototype.getStats=U.prototype.getStats;U.prototype.getBufferedInfo=U.prototype.Ma;U.prototype.getPresentationStartTimeAsDate=U.prototype.ye;U.prototype.getPlayheadTimeAsDate=U.prototype.Cf;
486
+ U.prototype.setTextTrackVisibility=U.prototype.lg;U.prototype.getChapters=U.prototype.pf;U.prototype.getChaptersTracks=U.prototype.xe;U.prototype.isTextTrackVisible=U.prototype.Bd;U.prototype.selectVariantsByLabel=U.prototype.fg;U.prototype.selectTextLanguage=U.prototype.Zd;U.prototype.selectAudioLanguage=U.prototype.Yd;U.prototype.getTextLanguages=U.prototype.Ef;U.prototype.getAudioLanguages=U.prototype.lf;U.prototype.getTextLanguagesAndRoles=U.prototype.Ff;
487
+ U.prototype.getAudioLanguagesAndRoles=U.prototype.mf;U.prototype.selectVariantTrack=U.prototype.Ne;U.prototype.selectTextTrack=U.prototype.Me;U.prototype.getThumbnails=U.prototype.Gf;U.prototype.getImageTracks=U.prototype.tf;U.prototype.getTextTracks=U.prototype.Db;U.prototype.getVariantTracks=U.prototype.Ya;U.prototype.cancelTrickPlay=U.prototype.cf;U.prototype.trickPlay=U.prototype.ng;U.prototype.getPlaybackRate=U.prototype.Oc;U.prototype.isBuffering=U.prototype.zd;U.prototype.getKeyStatuses=U.prototype.Nc;
488
+ U.prototype.getExpiration=U.prototype.ec;U.prototype.drmInfo=U.prototype.drmInfo;U.prototype.keySystem=U.prototype.keySystem;U.prototype.goToLive=U.prototype.Kf;U.prototype.seekRange=U.prototype.sc;U.prototype.isAudioOnly=U.prototype.Mf;U.prototype.isInProgress=U.prototype.jb;U.prototype.isLive=U.prototype.V;U.prototype.getAdManager=U.prototype.we;U.prototype.getAssetUri=U.prototype.yd;U.prototype.getNetworkingEngine=U.prototype.fc;U.prototype.getMediaElement=U.prototype.zf;
489
+ U.prototype.getLoadMode=U.prototype.vf;U.prototype.resetConfiguration=U.prototype.dg;U.prototype.getBufferFullness=U.prototype.nf;U.prototype.getConfiguration=U.prototype.getConfiguration;U.prototype.configure=U.prototype.configure;U.prototype.load=U.prototype.load;U.prototype.updateStartTime=U.prototype.sg;U.prototype.unload=U.prototype.he;U.prototype.detach=U.prototype.detach;U.prototype.attach=U.prototype.Yb;
489
490
  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,Pg(),3):h.A(2);2!=h.g&&(b=h.h);var k={};if(oc()){for(var l in Wg)k[l]=!0;for(var m in Yg)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 n=m.next();!n.done;n=m.next())n=n.value,k[n]=oc()?!!Wg[n]:pc(n);for(var p in l)k[p]=
490
491
  oc()?!!Yg[p]:pc(l[p]);c=k;p='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(Vi));
491
492
  k={};p=t(p);for(l=p.next();!l.done;l=p.next())l=l.value,k[l]=oc()?cd(l)?!0:MediaSource.isTypeSupported(l)||Sc(l):pc(l),m=l.split(";")[0],k[m]=k[m]||k[l];d=k;e={manifest:c,media:d,drm:b};f=Om;for(g in f)e[g]=f[g]();return h["return"](e)})};
492
493
  U.isBrowserSupported=function(){window.Promise||Va("A Promise implementation or polyfill is required");if(!(window.Promise&&window.Uint8Array&&Array.prototype.forEach)||sc("Trident/"))return!1;var a=xc();return a&&13>a||!(window.MediaKeys&&window.navigator&&window.navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&window.MediaKeySystemAccess.prototype.getConfiguration)?!1:oc()?!0:pc("application/x-mpegurl")};U.setAdManagerFactory=function(a){sl=a};
493
- U.registerSupportPlugin=function(a,b){Om[a]=b};U.prototype.destroy=U.prototype.destroy;var Fl=0,pl=1,em=2,pm=3;U.LoadMode={DESTROYED:Fl,NOT_LOADED:pl,MEDIA_SOURCE:em,SRC_EQUALS:pm};U.version="v4.2.3";var Pm=["4","2"];ue=new function(a){this.g=a;this.i=ve;this.h=we}(new se(Number(Pm[0]),Number(Pm[1])));
494
+ U.registerSupportPlugin=function(a,b){Om[a]=b};U.prototype.destroy=U.prototype.destroy;var Fl=0,pl=1,em=2,pm=3;U.LoadMode={DESTROYED:Fl,NOT_LOADED:pl,MEDIA_SOURCE:em,SRC_EQUALS:pm};U.version="v4.2.4";var Pm=["4","2"];ue=new function(a){this.g=a;this.i=ve;this.h=we}(new se(Number(Pm[0]),Number(Pm[1])));
494
495
  var Nm=["output-restricted","internal-error"],Om={},sl=null,Kl={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"},Hm={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",
495
- ssa:"text/x-ssa",ass:"text/x-ssa"};function Qm(){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 of;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};
496
+ ssa:"text/x-ssa",ass:"text/x-ssa"};function Qm(){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 of;this.j.C(this.g,google.ima.AdEvent.Type.PAUSED,function(){d.i=!0});this.j.C(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};
496
497
  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()};
497
498
  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()};
498
499
  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;
499
500
  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;
500
- V.prototype.getDuration=V.prototype.getDuration;function Rm(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 of;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.2.3");this.g=null;this.h.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Sm(e,f)});this.h.B(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
501
+ V.prototype.getDuration=V.prototype.getDuration;function Rm(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 of;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.2.4");this.g=null;this.h.oa(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(f){Sm(e,f)});this.h.C(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,
501
502
  function(f){Tm(e,f)});this.i.onended=function(){e.m.contentComplete()}}Rm.prototype.stop=function(){this.g&&this.g.stop();this.o&&yk(this.o)};Rm.prototype.release=function(){this.stop();this.s&&this.s.disconnect();this.h&&this.h.release();this.g&&this.g.destroy();this.m.destroy()};function Tm(a,b){b.getError();Um(a,null);a.l(new R("ad-cue-points-changed",(new Map).set("cuepoints",[])))}
502
- function Sm(a,b){a.l(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new R("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 R("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Vm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Wm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.B(a.i,"loadeddata",
503
- function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Wm(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,Wm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.B(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Wm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
503
+ function Sm(a,b){a.l(new R("ads-loaded",(new Map).set("loadTime",Date.now()/1E3-a.u)));a.g=b.getAdsManager(a.i);a.l(new R("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 R("ad-cue-points-changed",(new Map).set("cuepoints",d)))}Vm(a);try{a.g.init(a.i.offsetWidth,a.i.offsetHeight,Wm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),a.h.C(a.i,"loadeddata",
504
+ function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Wm(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,Wm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.s.observe(a.i)):a.h.C(document,"fullscreenchange",function(){a.g.resize(a.i.offsetWidth,a.i.offsetHeight,Wm(a)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)}),a.i.addEventListener("play",function(){a.g.start()},
504
505
  {once:!0})}catch(f){Um(a,null)}}function Wm(a){if(document.fullscreenEnabled)return!!document.fullscreenElement;a=a.i;return a.webkitSupportsFullscreen?a.webkitDisplayingFullscreen:!1}
505
- function Vm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new R(d,e))}a.h.B(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Tm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Xm(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.STARTED,function(c){Xm(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,
506
- 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){Um(a,c)});a.h.B(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Um(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")});
507
- 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,
508
- 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,
509
- 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 Xm(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 R("ad-started",c));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
506
+ function Vm(a){function b(c,d){var e=(new Map).set("originalEvent",c);a.l(new R(d,e))}a.h.C(a.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(c){Tm(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(c){Xm(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.STARTED,function(c){Xm(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(c){b(c,"ad-first-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.MIDPOINT,function(c){b(c,"ad-midpoint")});a.h.C(a.g,google.ima.AdEvent.Type.THIRD_QUARTILE,
507
+ function(c){b(c,"ad-third-quartile")});a.h.C(a.g,google.ima.AdEvent.Type.COMPLETE,function(c){b(c,"ad-complete")});a.h.C(a.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(c){Um(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){Um(a,c)});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPED,function(c){b(c,"ad-skipped")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(c){b(c,"ad-volume-changed")});a.h.C(a.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(c){b(c,"ad-muted")});
508
+ a.h.C(a.g,google.ima.AdEvent.Type.PAUSED,function(c){a.j.i=!0;b(c,"ad-paused")});a.h.C(a.g,google.ima.AdEvent.Type.RESUMED,function(c){a.j.i=!1;b(c,"ad-resumed")});a.h.C(a.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(c){b(c,"ad-skip-state-changed")});a.h.C(a.g,google.ima.AdEvent.Type.CLICK,function(c){b(c,"ad-clicked")});a.h.C(a.g,google.ima.AdEvent.Type.AD_PROGRESS,function(c){b(c,"ad-progress")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BUFFERING,function(c){b(c,"ad-buffering")});a.h.C(a.g,
509
+ google.ima.AdEvent.Type.IMPRESSION,function(c){b(c,"ad-impression")});a.h.C(a.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(c){b(c,"ad-duration-changed")});a.h.C(a.g,google.ima.AdEvent.Type.USER_CLOSE,function(c){b(c,"ad-closed")});a.h.C(a.g,google.ima.AdEvent.Type.LOADED,function(c){b(c,"ad-loaded")});a.h.C(a.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(c){b(c,"all-ads-completed")});a.h.C(a.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(c){b(c,"ad-linear-changed")});a.h.C(a.g,google.ima.AdEvent.Type.AD_METADATA,
510
+ function(c){b(c,"ad-metadata")});a.h.C(a.g,google.ima.AdEvent.Type.LOG,function(c){b(c,"ad-recoverable-error")});a.h.C(a.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(c){b(c,"ad-break-ready")});a.h.C(a.g,google.ima.AdEvent.Type.INTERACTION,function(c){b(c,"ad-interaction")})}function Xm(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 R("ad-started",c));a.j.isLinear()&&(a.o.setAttribute("ad-active","true"),a.i.pause())}
510
511
  function Um(a,b){a.l(new R("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)};
511
512
  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};
512
513
  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;
513
514
  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;
514
- W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Ym(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 of;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 R("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Zm(e,f)});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.C.length?
515
- 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 R("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");
516
- 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 R("ad-first-quartile"))});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new R("ad-midpoint"))});this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new R("ad-third-quartile"))});
517
- this.h.B(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new R("ad-complete"));e.i(new R("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 R("ad-skipped"));e.i(new R("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=
518
- f;e.i(new R("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Ym.prototype.stop=function(){this.C="";this.o=null;this.D=[]};Ym.prototype.release=function(){this.stop();this.h&&this.h.release()};Ym.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
519
- function Zm(a,b){a.i(new R("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(){We.call(this);this.g=this.i=null;this.h=new Qm;this.j=navigator.language}pa(X,We);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 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)})};
515
+ W.prototype.getRemainingTime=W.prototype.getRemainingTime;W.prototype.getMinSuggestedDuration=W.prototype.getMinSuggestedDuration;W.prototype.getDuration=W.prototype.getDuration;function Ym(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.B="";this.D=[];this.h=new of;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 R("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g)));this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(f){Zm(e,f)});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){e.B.length?
516
+ e.j.resolve(e.B):e.j.reject("IMA Stream request returned an error and there was no backup asset uri provided.");e.j=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){});this.h.C(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 R("ad-started",(new Map).set("ad",e.m)));e.s.setAttribute("ad-active","true")});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){e.s.removeAttribute("ad-active");
517
+ var f=e.l.currentTime;e.o&&e.o>f&&(e.l.currentTime=e.o,e.o=null)});this.h.C(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.C(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){e.i(new R("ad-first-quartile"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){e.i(new R("ad-midpoint"))});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){e.i(new R("ad-third-quartile"))});
518
+ this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){e.i(new R("ad-complete"));e.i(new R("ad-stopped"));e.s.removeAttribute("ad-active");e.m=null});this.h.C(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){e.i(new R("ad-skipped"));e.i(new R("ad-stopped"))});this.h.C(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=
519
+ f;e.i(new R("ad-cue-points-changed",(new Map).set("cuepoints",f)))})}Ym.prototype.stop=function(){this.B="";this.o=null;this.D=[]};Ym.prototype.release=function(){this.stop();this.h&&this.h.release()};Ym.prototype.onCueMetadataChange=function(a){if(a.key&&a.data){var b={};b[a.key]=a.data;this.g.onTimedMetadata(b)}};
520
+ function Zm(a,b){a.i(new R("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.C(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(){We.call(this);this.g=this.i=null;this.h=new Qm;this.j=navigator.language}pa(X,We);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 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)})};
520
521
  r.release=function(){this.i&&(this.i.release(),this.i=null);this.g&&(this.g.release(),this.g=null);We.prototype.release.call(this)};r.onAssetUnload=function(){this.i&&this.i.stop();this.g&&this.g.stop();this.dispatchEvent(new R("ad-stopped"));this.h=new Qm};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)};
521
522
  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 Ym(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)})};
522
- 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.2.3";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
523
- (c.F=!0),c.j=new lc,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.2.3";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
523
+ 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.2.4";c=this.g;var d=b;c.j?c=Promise.reject(new N(1,10,10004)):(a instanceof google.ima.dai.api.LiveStreamRequest&&
524
+ (c.F=!0),c.j=new lc,c.g.requestStream(a),c.B=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.2.4";this.g.g.replaceAdTagParameters(a)};r.getServerSideCuePoints=function(){if(!this.g)throw new N(1,10,10003);return this.g.D};
524
525
  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);
525
526
  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;
526
527
  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";
@@ -529,395 +530,397 @@ X.AD_LOADED="ad-loaded";X.ALL_ADS_COMPLETED="all-ads-completed";X.AD_LINEAR_CHAN
529
530
  TimeRanges)for(f={__type__:"TimeRanges",length:c.length,start:[],end:[]},d=t(vi(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}})}
530
531
  function an(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=bn(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})}
531
532
  function bn(a){return{length:a.length,start:function(b){return a.start[b]},end:function(b){return a.end[b]}}}
532
- var cn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),dn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),en=["loop","playbackRate"],fn=["pause","play"],gn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,
533
- getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},hn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},jn=[["getConfiguration","configure"]],ln=[["isTextTrackVisible","setTextTrackVisibility"]],mn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
534
- nn=["attach","detach","load","unload"];function on(a,b,c,d,e,f,g){var h=this;this.G=a;this.O=g;this.j=new O(b);this.T=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 pn(h)};this.D=function(k,l){var m=an(l);switch(m.type){case "event":var n=m.targetName;m=Ue(m.event);h.s(n,m);break;case "update":n=m.update;for(var p in n){m=h.g[p]||{};for(var q in n[p])m[q]=n[p][q]}h.u&&(h.T(),h.u=!1);break;case "asyncComplete":if(p=m.id,m=m.error,q=h.i[p],delete h.i[p],q)if(m){p=new N(m.severity,m.category,
535
- m.code);for(n in m)p[n]=m[n];q.reject(p)}else q.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;qn.add(this)}r=on.prototype;r.destroy=function(){qn["delete"](this);rn(this);sn&&tn(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.sa=function(){return this.h};r.Sd=function(){return this.M};
536
- r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Lb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(qn),d=c.next();!d.done;d=c.next())un(d.value,b)},function(b){for(var c=t(qn),d=c.next();!d.done;d=c.next())d=d.value,vn="available"==b,d.j.Lb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});vn&&this.j.P(wn);(a=sn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
537
- un(this,a):sn=null}else window.__onGCastApiAvailable!==xn&&(yn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=xn)};r.Zd=function(a){this.o=a;this.h&&zn(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!vn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new lc;chrome.cast.requestSession(function(d){return An(b,a,d)},function(d){return Bn(b,d)});return u(c,b.l,0)})};
538
- function Cn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return An(a,b,c)},function(c){return Bn(a,c)})}}r.yb=function(){if(this.h){rn(this);if(sn){tn(this);try{sn.stop(function(){},function(){})}catch(a){}sn=null}pn(this)}};
539
- r.get=function(a,b){var c=this;if("video"==a){if(fn.includes(b))return function(){return c.Je.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(hn[b]&&!this.get("player","isLive")())return function(){};if(mn.includes(b))return function(){return c.Je.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(nn.includes(b))return function(){return c.$f.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(gn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
540
- r.set=function(a,b,c){this.g[a][b]=c;zn(this,{type:"set",targetName:a,property:b,value:c})};function An(a,b,c){sn=c;c.addUpdateListener(a.C);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);pn(a);zn(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Bn(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))}
541
- r.Je=function(a,b){zn(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};r.$f=function(a,b){var c=Ia.apply(2,arguments),d=new lc,e=this.I.toString();this.I++;this.i[e]=d;try{zn(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function un(a,b){var c=a.L();a.l=new lc;a.u=!0;An(a,c,b)}function tn(a){var b=sn;b.removeUpdateListener(a.C);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
542
- function pn(a){var b=sn?"connected"==sn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};rn(a)}a.h=b;a.M=b?sn.receiver.friendlyName:"";a.j.Lb()}function rn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function zn(a,b){var c=$m(b),d=sn;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 R("error",(new Map).set("detail",c)),a.s("player",d),a.yb(),c;}}var wn=.02,vn=!1,sn=null,yn=null,qn=new Set;
543
- function xn(a){yn?window.__onGCastApiAvailable=yn:delete window.__onGCastApiAvailable;yn=null;if(a)for(var b=t(qn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function Dn(a,b,c,d){d=void 0===d?!1:d;We.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.C=d;this.u=new Map;this.g=new on(c,function(){return En(e)},function(){return Fn(e)},function(f,g){return Gn(e,f,g)},function(){return Hn(e)},function(){return In(e)},d);Jn(this)}pa(Dn,We);r=Dn.prototype;
544
- r.destroy=function(a){a&&this.g.yb();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;We.prototype.release.call(this);return Promise.all(a)};r.If=function(){return this.l};r.Af=function(){return this.s};r.$e=function(){return this.g.m&&vn};r.sa=function(){return this.g.sa()};r.Sd=function(){return this.g.Sd()};
545
- r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=In(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.ge(),0):c["return"]()})};r.Zd=function(a){this.g.Zd(a)};r.lg=function(){Cn(this.g)};r.yb=function(){this.g.yb()};
546
- r.cf=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.D&&b==c.C)return d["return"]();c.D=a;c.C=b;c.g.yb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new on(a,function(){return En(c)},function(){return Fn(c)},function(e,f){return Gn(c,e,f)},function(){return Hn(c)},function(){return In(c)},b);c.g.init();A(d)})};
547
- function Jn(a){a.g.init();a.m=new of;for(var b=t(cn),c=b.next();!c.done;c=b.next())a.m.B(a.i,c.value,function(f){a.g.sa()||(f=Ue(f),a.j.dispatchEvent(f))});for(var d in Ve)a.m.B(a.h,Ve[d],function(f){a.g.sa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Qb=e,Object.defineProperty(a.l,b.Qb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Kn(a,f.Qb)}}(b),set:function(f){return function(g){var h=f.Qb;a.g.sa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Qb:b.Qb};a.s={};Ln(a,
548
- function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Mn(a,f)}})});Nn(a);a.j=new We;a.j.Lc=a.l;a.o=new We;a.o.Lc=a.s}function Nn(a){var b=new Map;Ln(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)})}
549
- function Ln(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)}}
550
- function In(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.xd(),startTime:null};a.i.pause();for(var c=t(en),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(jn);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(ln);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 En(a){var b=new R("caststatuschanged");a.dispatchEvent(b)}
551
- function Fn(a){var b=new R(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
552
- function Hn(a){for(var b=t(jn),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(en);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(en),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(ln);for(k=
533
+ var cn="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),dn="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),en=["loop","playbackRate"],fn=["pause","play"],gn={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,
534
+ isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10},hn={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},jn={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},kn=[["getConfiguration","configure"]],mn=[["isTextTrackVisible","setTextTrackVisibility"]],nn="addChaptersTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),
535
+ on=["attach","detach","load","unload"];function pn(a,b,c,d,e,f,g){var h=this;this.G=a;this.O=g;this.j=new O(b);this.T=c;this.u=!1;this.s=d;this.F=e;this.L=f;this.h=this.m=!1;this.M="";this.o=null;this.B=function(){return qn(h)};this.D=function(k,l){var m=an(l);switch(m.type){case "event":var n=m.targetName;m=Ue(m.event);h.s(n,m);break;case "update":n=m.update;for(var p in n){m=h.g[p]||{};for(var q in n[p])m[q]=n[p][q]}h.u&&(h.T(),h.u=!1);break;case "asyncComplete":if(p=m.id,m=m.error,q=h.i[p],delete h.i[p],q)if(m){p=new N(m.severity,m.category,
536
+ m.code);for(n in m)p[n]=m[n];q.reject(p)}else q.resolve()}};this.g={video:{},player:{}};this.I=0;this.i={};this.l=null;rn.add(this)}r=pn.prototype;r.destroy=function(){rn["delete"](this);sn(this);tn&&un(this);this.j&&(this.j.stop(),this.j=null);this.F=this.s=null;this.h=this.m=!1;this.D=this.B=this.l=this.i=this.g=this.o=null;return Promise.resolve()};r.sa=function(){return this.h};r.Td=function(){return this.M};
537
+ r.init=function(){if(this.G.length)if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0;this.j.Lb();var a=new chrome.cast.SessionRequest(this.G,[],null,this.O,null);a=new chrome.cast.ApiConfig(a,function(b){for(var c=t(rn),d=c.next();!d.done;d=c.next())vn(d.value,b)},function(b){for(var c=t(rn),d=c.next();!d.done;d=c.next())d=d.value,wn="available"==b,d.j.Lb()},"origin_scoped");chrome.cast.initialize(a,function(){},function(){});wn&&this.j.P(xn);(a=tn)&&a.status!=chrome.cast.SessionStatus.STOPPED?
538
+ vn(this,a):tn=null}else window.__onGCastApiAvailable!==yn&&(zn=window.__onGCastApiAvailable||null,window.__onGCastApiAvailable=yn)};r.$d=function(a){this.o=a;this.h&&An(this,{type:"appData",appData:this.o})};r.cast=function(a){var b=this;return K(function(c){if(!b.m)throw new N(1,8,8E3);if(!wn)throw new N(1,8,8001);if(b.h)throw new N(1,8,8002);b.l=new lc;chrome.cast.requestSession(function(d){return Bn(b,a,d)},function(d){return Cn(b,d)});return u(c,b.l,0)})};
539
+ function Dn(a){if(a.h){var b=a.L();chrome.cast.requestSession(function(c){return Bn(a,b,c)},function(c){return Cn(a,c)})}}r.yb=function(){if(this.h){sn(this);if(tn){un(this);try{tn.stop(function(){},function(){})}catch(a){}tn=null}qn(this)}};
540
+ r.get=function(a,b){var c=this;if("video"==a){if(fn.includes(b))return function(){return c.Ke.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))}}else if("player"==a){if(jn[b]&&!this.get("player","isLive")())return function(){};if(nn.includes(b))return function(){return c.Ke.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(on.includes(b))return function(){return c.ag.apply(c,[a,b].concat(ia(Ia.apply(0,arguments))))};if(gn[b]||hn[b])return function(){return c.g[a][b]}}return this.g[a][b]};
541
+ r.set=function(a,b,c){this.g[a][b]=c;An(this,{type:"set",targetName:a,property:b,value:c})};function Bn(a,b,c){tn=c;c.addUpdateListener(a.B);c.addMessageListener("urn:x-cast:com.google.shaka.v2",a.D);qn(a);An(a,{type:"init",initState:b,appData:a.o});a.l.resolve()}function Cn(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))}
542
+ r.Ke=function(a,b){An(this,{type:"call",targetName:a,methodName:b,args:Ia.apply(2,arguments)})};r.ag=function(a,b){var c=Ia.apply(2,arguments),d=new lc,e=this.I.toString();this.I++;this.i[e]=d;try{An(this,{type:"asyncCall",targetName:a,methodName:b,args:c,id:e})}catch(f){d.reject(f)}return d};function vn(a,b){var c=a.L();a.l=new lc;a.u=!0;Bn(a,c,b)}function un(a){var b=tn;b.removeUpdateListener(a.B);b.removeMessageListener("urn:x-cast:com.google.shaka.v2",a.D)}
543
+ function qn(a){var b=tn?"connected"==tn.status:!1;if(a.h&&!b){a.F();for(var c in a.g)a.g[c]={};sn(a)}a.h=b;a.M=b?tn.receiver.friendlyName:"";a.j.Lb()}function sn(a){for(var b in a.i){var c=a.i[b];delete a.i[b];c.reject(new N(1,7,7E3))}}function An(a,b){var c=$m(b),d=tn;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 R("error",(new Map).set("detail",c)),a.s("player",d),a.yb(),c;}}var xn=.02,wn=!1,tn=null,zn=null,rn=new Set;
544
+ function yn(a){zn?window.__onGCastApiAvailable=zn:delete window.__onGCastApiAvailable;zn=null;if(a)for(var b=t(rn),c=b.next();!c.done;c=b.next())c.value.init();"function"===typeof window.__onGCastApiAvailable&&window.__onGCastApiAvailable(a)};function En(a,b,c,d){d=void 0===d?!1:d;We.call(this);var e=this;this.i=a;this.h=b;this.m=this.o=this.j=this.s=this.l=null;this.D=c;this.B=d;this.u=new Map;this.g=new pn(c,function(){return Fn(e)},function(){return Gn(e)},function(f,g){return Hn(e,f,g)},function(){return In(e)},function(){return Jn(e)},d);Kn(this)}pa(En,We);r=En.prototype;
545
+ r.destroy=function(a){a&&this.g.yb();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;We.prototype.release.call(this);return Promise.all(a)};r.Jf=function(){return this.l};r.Bf=function(){return this.s};r.af=function(){return this.g.m&&wn};r.sa=function(){return this.g.sa()};r.Td=function(){return this.g.Td()};
546
+ r.cast=function(){var a=this,b;return K(function(c){return 1==c.g?(b=Jn(a),u(c,a.g.cast(b),2)):a.h?u(c,a.h.he(),0):c["return"]()})};r.$d=function(a){this.g.$d(a)};r.mg=function(){Dn(this.g)};r.yb=function(){this.g.yb()};
547
+ r.df=function(a,b){b=void 0===b?!1:b;var c=this;return K(function(d){if(1==d.g){if(a==c.D&&b==c.B)return d["return"]();c.D=a;c.B=b;c.g.yb();return u(d,c.g.destroy(),2)}c.g=null;c.g=new pn(a,function(){return Fn(c)},function(){return Gn(c)},function(e,f){return Hn(c,e,f)},function(){return In(c)},function(){return Jn(c)},b);c.g.init();A(d)})};
548
+ function Kn(a){a.g.init();a.m=new of;for(var b=t(cn),c=b.next();!c.done;c=b.next())a.m.C(a.i,c.value,function(f){a.g.sa()||(f=Ue(f),a.j.dispatchEvent(f))});for(var d in Ve)a.m.C(a.h,Ve[d],function(f){a.g.sa()||a.o.dispatchEvent(f)});a.l={};b={};for(var e in a.i)b.Qb=e,Object.defineProperty(a.l,b.Qb,{configurable:!1,enumerable:!0,get:function(f){return function(){return Ln(a,f.Qb)}}(b),set:function(f){return function(g){var h=f.Qb;a.g.sa()?a.g.set("video",h,g):a.i[h]=g}}(b)}),b={Qb:b.Qb};a.s={};Mn(a,
549
+ function(f){Object.defineProperty(a.s,f,{configurable:!1,enumerable:!0,get:function(){return Nn(a,f)}})});On(a);a.j=new We;a.j.Lc=a.l;a.o=new We;a.o.Lc=a.s}function On(a){var b=new Map;Mn(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)})}
550
+ function Mn(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)}}
551
+ function Jn(a){var b={video:{},player:{},playerAfterLoad:{},manifest:a.h.yd(),startTime:null};a.i.pause();for(var c=t(en),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(kn);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(mn);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 Fn(a){var b=new R("caststatuschanged");a.dispatchEvent(b)}
552
+ function Gn(a){var b=new R(a.l.paused?"pause":"play");a.j.dispatchEvent(b)}
553
+ function In(a){for(var b=t(kn),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(en);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(en),k=h.next();!k.done;k=h.next())k=k.value,a.i[k]=g[k];h=t(mn);for(k=
553
554
  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 R("error",h);a.h.dispatchEvent(h)})}
554
- function Kn(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.sa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.sa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
555
- function Mn(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.fc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.ve()};
556
- if("setVideoContainer"==b)return function(c){return a.h.Qe(c)};if(a.g.sa()){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.sa()&&0==Object.keys(a.g.g.video).length&&gn[b]||!a.g.sa()?a.h[b].bind(a.h):a.g.get("player",b)}function Gn(a,b,c){a.g.sa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}
557
- M("shaka.cast.CastProxy",Dn);Dn.prototype.changeReceiverId=Dn.prototype.cf;Dn.prototype.forceDisconnect=Dn.prototype.yb;Dn.prototype.suggestDisconnect=Dn.prototype.lg;Dn.prototype.setAppData=Dn.prototype.Zd;Dn.prototype.cast=Dn.prototype.cast;Dn.prototype.receiverName=Dn.prototype.Sd;Dn.prototype.isCasting=Dn.prototype.sa;Dn.prototype.canCast=Dn.prototype.$e;Dn.prototype.getPlayer=Dn.prototype.Af;Dn.prototype.getVideo=Dn.prototype.If;Dn.prototype.destroy=Dn.prototype.destroy;function On(a,b,c,d){We.call(this);var e=this;this.g=a;this.h=b;this.j=new of;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(){Pn(e)});Qn(this)}pa(On,We);r=On.prototype;r.isConnected=function(){return this.F};r.Mf=function(){return this.o};r.hg=function(a){this.i=a};r.ff=function(){this.i=null};
558
- r.ig=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.gg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.fg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
555
+ function Ln(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.sa()&&0==Object.keys(a.g.g.video).length){var c=a.i[b];if("function"!=typeof c)return c}return a.g.sa()?a.g.get("video",b):(c=a.i[b],"function"==typeof c&&(c=c.bind(a.i)),c)}
556
+ function Nn(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.fc()};if("getDrmEngine"==b)return function(){return a.h.m};if("getAdManager"==b)return function(){return a.h.we()};
557
+ if("setVideoContainer"==b)return function(c){return a.h.Re(c)};if(a.g.sa()){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.sa()&&0==Object.keys(a.g.g.video).length&&(gn[b]||hn[b])||!a.g.sa()?a.h[b].bind(a.h):a.g.get("player",b)}
558
+ function Hn(a,b,c){a.g.sa()&&("video"==b?a.j.dispatchEvent(c):"player"==b&&a.o.dispatchEvent(c))}M("shaka.cast.CastProxy",En);En.prototype.changeReceiverId=En.prototype.df;En.prototype.forceDisconnect=En.prototype.yb;En.prototype.suggestDisconnect=En.prototype.mg;En.prototype.setAppData=En.prototype.$d;En.prototype.cast=En.prototype.cast;En.prototype.receiverName=En.prototype.Td;En.prototype.isCasting=En.prototype.sa;En.prototype.canCast=En.prototype.af;En.prototype.getPlayer=En.prototype.Bf;
559
+ En.prototype.getVideo=En.prototype.Jf;En.prototype.destroy=En.prototype.destroy;function Pn(a,b,c,d){We.call(this);var e=this;this.g=a;this.h=b;this.j=new of;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.B=!1;this.u=!0;this.s=this.l=null;this.G=new O(function(){Qn(e)});Rn(this)}pa(Pn,We);r=Pn.prototype;r.isConnected=function(){return this.F};r.Nf=function(){return this.o};r.ig=function(a){this.i=a};r.gf=function(){this.i=null};
560
+ r.jg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.title=a};r.hg=function(a){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC});this.i.images=[{url:a}]};r.gg=function(a){this.i||(this.i={});this.i.artist=a;this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK};
559
561
  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,We.prototype.release.call(a),u(d,Promise.all(b),2);c=cast.receiver.CastReceiverManager.getInstance();c.stop();A(d)})};
560
- function Qn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Rn(a)};b.onSenderDisconnected=function(){return Rn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Sn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Sn(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 Tn(a,
561
- e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Un(a,e)};b.start();b=t(cn);for(var c=b.next();!c.done;c=b.next())a.j.B(a.g,c.value,function(e){return Vn(a,"video",e)});for(var d in Ve)a.j.B(a.h,Ve[d],function(e){return Vn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.ae(3840,2160):a.h.ae(1920,1080);a.j.B(a.g,"loadeddata",function(){a.C=!0});a.j.B(a.h,"loading",function(){a.o=
562
- !1;Wn(a)});a.j.B(a.g,"playing",function(){a.o=!1;Wn(a)});a.j.B(a.g,"pause",function(){Wn(a)});a.j.B(a.h,"unloading",function(){a.o=!0;Wn(a)});a.j.B(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,Wn(a))})).P(Xn)})}function Rn(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Wn(a)}
563
- function Wn(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new R("caststatuschanged");a.dispatchEvent(b);Yn(a)||Zn(a);A(c)})}
564
- function $n(a,b,c){var d,e,f,g,h,k,l,m,n,p;K(function(q){switch(q.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,C(q,5),u(q,a.h.load(b.manifest,b.startTime),7)):u(q,Promise.resolve(),3);case 7:va(q,3);break;case 5:return g=F(q),h=(new Map).set("detail",g),k=new R("error",h),a.h&&a.h.dispatchEvent(k),q["return"]();case 3:if(!a.h)return q["return"]();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],
565
- a.h[n](p);a.g.autoplay=f;b.manifest&&(a.g.play(),Zn(a));A(q)}})}function Vn(a,b,c){a.h&&(Pn(a),Sn(a,{type:"event",targetName:b,event:c},a.l))}
566
- function Pn(a){a.G.P(ao);for(var b={video:{},player:{}},c=t(dn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in hn)0==a.m%hn[e]&&(b.player[e]=a.h[e]());for(var f in gn)0==a.m%gn[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);Sn(a,{type:"update",update:b},a.l);Yn(a)}function Yn(a){return a.u&&(a.g.duration||a.h.V())?(bo(a),a.u=!1,!0):!1}
567
- function bo(a,b){var c={contentId:a.h.xd(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);Zn(a,void 0===b?0:b,c)}
568
- function Un(a,b){var c=an(b.data);switch(c.type){case "init":a.m=0;a.C=!1;a.u=!0;$n(a,c.initState,c.appData);Pn(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=
569
- 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 co(a,h,g,null)},function(k){return co(a,h,g,k)})}}
570
- function Tn(a,b){var c=an(b.data);switch(c.type){case "PLAY":a.g.play();Zn(a);break;case "PAUSE":a.g.pause();Zn(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(),Zn(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),Zn(a));break;case "STOP":a.h.ge().then(function(){a.h&&Zn(a)});break;case "GET_STATUS":bo(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));
571
- null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||Zn(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&&bo(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Sn(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:Sn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
572
- function co(a,b,c,d){a.h&&Sn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Sn(a,b,c,d){a.F&&(a=$m(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function Zn(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?eo:a.h.yd()?fo:a.g.paused?go:ho,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Sn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
573
- M("shaka.cast.CastReceiver",On);On.prototype.destroy=On.prototype.destroy;On.prototype.setContentArtist=On.prototype.fg;On.prototype.setContentImage=On.prototype.gg;On.prototype.setContentTitle=On.prototype.ig;On.prototype.clearContentMetadata=On.prototype.ff;On.prototype.setContentMetadata=On.prototype.hg;On.prototype.isIdle=On.prototype.Mf;On.prototype.isConnected=On.prototype.isConnected;var ao=.5,Xn=5,eo="IDLE",ho="PLAYING",fo="BUFFERING",go="PAUSED";function io(a,b,c){var d=jo(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.Wd?(e=h.init||e,!1):!0}),f.length&&(a=ko(e,f,c,g),0==a.length&&(a=[fc("",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(fc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
574
- t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{qe:g,bh:e,drmInfos:a,ue:!0}}function lo(a,b,c,d){var e=io(a,c,d);if(b.ue){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.ue=!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.qe||b.qe}
575
- function mo(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}
576
- function no(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 oo(a){a=Qf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Nc(a.textContent);a=mo(a).filter(function(b){return b.type===po})[0];if(!a)return"";a=Cc(a.value,!0);return(a=fg(a,"WRMHEADER"))?no(a):""}
577
- function ko(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.Wd];if(g){var h;if(h=Qf(f.node,"urn:microsoft:playready","pro")){h=Nc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Nf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Wd)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,
578
- 226,251,75]),m=new Uint8Array([]);k=[{initData:Nf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=fc(g,f.init||a||h||k);if(g=qo.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function jo(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=ro(c.value))&&b.push(c);return b}
579
- function ro(a){var b=a.getAttribute("schemeIdUri"),c=Tf(a,"urn:mpeg:cenc:2013","default_KID"),d=Rf(a,"urn:mpeg:cenc:2013","pssh").map(Vf);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:Nc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Wd:b,keyId:c,init:0<e.length?e:null}}
580
- var po=1,qo=(new Map).set("com.widevine.alpha",function(a){return(a=Qf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",oo).set("com.microsoft.playready.recommendation",oo).set("com.microsoft.playready.software",oo).set("com.microsoft.playready.hardware",oo).set("org.w3.clearkey",function(a){return(a=Qf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function so(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=
562
+ function Rn(a){var b=cast.receiver.CastReceiverManager.getInstance();b.onSenderConnected=function(){return Sn(a)};b.onSenderDisconnected=function(){return Sn(a)};b.onSystemVolumeChanged=function(){var e=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();e&&Tn(a,{type:"update",update:{video:{volume:e.level,muted:e.muted}}},a.l);Tn(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 Un(a,
563
+ e)};a.l=b.getCastMessageBus("urn:x-cast:com.google.shaka.v2");a.l.onMessage=function(e){return Vn(a,e)};b.start();b=t(cn);for(var c=b.next();!c.done;c=b.next())a.j.C(a.g,c.value,function(e){return Wn(a,"video",e)});for(var d in Ve)a.j.C(a.h,Ve[d],function(e){return Wn(a,"player",e)});cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?a.h.be(3840,2160):a.h.be(1920,1080);a.j.C(a.g,"loadeddata",function(){a.B=!0});a.j.C(a.h,"loading",function(){a.o=
564
+ !1;Xn(a)});a.j.C(a.g,"playing",function(){a.o=!1;Xn(a)});a.j.C(a.g,"pause",function(){Xn(a)});a.j.C(a.h,"unloading",function(){a.o=!0;Xn(a)});a.j.C(a.g,"ended",function(){(new O(function(){a.g&&a.g.ended&&(a.o=!0,Xn(a))})).P(Yn)})}function Sn(a){a.m=0;a.u=!0;a.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;Xn(a)}
565
+ function Xn(a){var b;K(function(c){if(1==c.g)return u(c,Promise.resolve(),2);if(!a.h)return c["return"]();b=new R("caststatuschanged");a.dispatchEvent(b);Zn(a)||$n(a);A(c)})}
566
+ function ao(a,b,c){var d,e,f,g,h,k,l,m,n,p;K(function(q){switch(q.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,C(q,5),u(q,a.h.load(b.manifest,b.startTime),7)):u(q,Promise.resolve(),3);case 7:va(q,3);break;case 5:return g=F(q),h=(new Map).set("detail",g),k=new R("error",h),a.h&&a.h.dispatchEvent(k),q["return"]();case 3:if(!a.h)return q["return"]();for(l in b.video)m=b.video[l],a.g[l]=m;for(n in b.playerAfterLoad)p=b.playerAfterLoad[n],
567
+ a.h[n](p);a.g.autoplay=f;b.manifest&&(a.g.play(),$n(a));A(q)}})}function Wn(a,b,c){a.h&&(Qn(a),Tn(a,{type:"event",targetName:b,event:c},a.l))}
568
+ function Qn(a){a.G.P(bo);for(var b={video:{},player:{}},c=t(dn),d=c.next();!d.done;d=c.next())d=d.value,b.video[d]=a.g[d];if(a.h.V())for(var e in jn)0==a.m%jn[e]&&(b.player[e]=a.h[e]());for(var f in gn)0==a.m%gn[f]&&(b.player[f]=a.h[f]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;Tn(a,{type:"update",update:b},a.l);for(var g in hn)0==a.m%hn[g]&&(b={player:{}},b.player[g]=a.h[g](),Tn(a,{type:"update",update:b},a.l));a.B&&(a.m+=
569
+ 1);Zn(a)}function Zn(a){return a.u&&(a.g.duration||a.h.V())?(co(a),a.u=!1,!0):!1}function co(a,b){var c={contentId:a.h.yd(),streamType:a.h.V()?"LIVE":"BUFFERED",contentType:""};a.h.V()||(c.duration=a.g.duration);a.i&&(c.metadata=a.i);$n(a,void 0===b?0:b,c)}
570
+ function Vn(a,b){var c=an(b.data);switch(c.type){case "init":a.m=0;a.B=!1;a.u=!0;ao(a,c.initState,c.appData);Qn(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=
571
+ c.methodName;"player"==d&&"load"==e&&(a.m=0,a.B=!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 eo(a,h,g,null)},function(k){return eo(a,h,g,k)})}}
572
+ function Un(a,b){var c=an(b.data);switch(c.type){case "PLAY":a.g.play();$n(a);break;case "PAUSE":a.g.pause();$n(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(),$n(a)):e&&"PLAYBACK_PAUSE"==e&&(a.g.pause(),$n(a));break;case "STOP":a.h.he().then(function(){a.h&&$n(a)});break;case "GET_STATUS":co(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));
573
+ null!=e&&(a.g.muted=e);f==a.g.volume&&g==a.g.muted||$n(a);break;case "LOAD":a.m=0;a.B=!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&&co(a)})["catch"](function(h){var k="LOAD_FAILED";7==h.category&&7E3==h.code&&(k="LOAD_CANCELLED");Tn(a,{requestId:Number(c.requestId),type:k},a.s)});break;default:Tn(a,{requestId:Number(c.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},a.s)}}
574
+ function eo(a,b,c,d){a.h&&Tn(a,{type:"asyncComplete",id:c,error:d},a.l,b)}function Tn(a,b,c,d){a.F&&(a=$m(b),d?c.getCastChannel(d).send(a):c.broadcast(a))}function $n(a,b,c){c=void 0===c?null:c;var d={mediaSessionId:0,playbackRate:a.g.playbackRate,playerState:a.o?fo:a.h.zd()?go:a.g.paused?ho:io,currentTime:a.g.currentTime,supportedMediaCommands:63,volume:{level:a.g.volume,muted:a.g.muted}};c&&(d.media=c);Tn(a,{requestId:void 0===b?0:b,type:"MEDIA_STATUS",status:[d]},a.s)}
575
+ M("shaka.cast.CastReceiver",Pn);Pn.prototype.destroy=Pn.prototype.destroy;Pn.prototype.setContentArtist=Pn.prototype.gg;Pn.prototype.setContentImage=Pn.prototype.hg;Pn.prototype.setContentTitle=Pn.prototype.jg;Pn.prototype.clearContentMetadata=Pn.prototype.gf;Pn.prototype.setContentMetadata=Pn.prototype.ig;Pn.prototype.isIdle=Pn.prototype.Nf;Pn.prototype.isConnected=Pn.prototype.isConnected;var bo=.5,Yn=5,fo="IDLE",io="PLAYING",go="BUFFERING",ho="PAUSED";function jo(a,b,c){var d=ko(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.Xd?(e=h.init||e,!1):!0}),f.length&&(a=lo(e,f,c,g),0==a.length&&(a=[fc("",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(fc(c,e));if(g=Array.from(g)[0]||null)for(b=t(a),c=b.next();!c.done;c=b.next())for(c=
576
+ t(c.value.initData),d=c.next();!d.done;d=c.next())d.value.keyId=g;return{re:g,dh:e,drmInfos:a,ve:!0}}function mo(a,b,c,d){var e=jo(a,c,d);if(b.ve){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.ve=!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.re||b.re}
577
+ function no(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}
578
+ function oo(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 po(a){a=Qf(a.node,"urn:microsoft:playready","pro");if(!a)return"";a=Nc(a.textContent);a=no(a).filter(function(b){return b.type===qo})[0];if(!a)return"";a=Cc(a.value,!0);return(a=fg(a,"WRMHEADER"))?oo(a):""}
579
+ function lo(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.Xd];if(g){var h;if(h=Qf(f.node,"urn:microsoft:playready","pro")){h=Nc(h.textContent);var k=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);h=[{initData:Nf(h,k,new Set,0),initDataType:"cenc",keyId:f.keyId}]}else h=null;k=null;if("urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===f.Xd)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,
580
+ 226,251,75]),m=new Uint8Array([]);k=[{initData:Nf(m,l,k,1),initDataType:"cenc",keyId:f.keyId}]}h=fc(g,f.init||a||h||k);if(g=ro.get(g))h.licenseServerUri=g(f);e.push(h)}}return e}function ko(a){var b=[];a=t(a);for(var c=a.next();!c.done;c=a.next())(c=so(c.value))&&b.push(c);return b}
581
+ function so(a){var b=a.getAttribute("schemeIdUri"),c=Tf(a,"urn:mpeg:cenc:2013","default_KID"),d=Rf(a,"urn:mpeg:cenc:2013","pssh").map(Vf);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:Nc(f),keyId:null}})}catch(f){throw new N(2,4,4007);}return{node:a,Xd:b,keyId:c,init:0<e.length?e:null}}
582
+ var qo=1,ro=(new Map).set("com.widevine.alpha",function(a){return(a=Qf(a.node,"urn:microsoft","laurl"))?a.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",po).set("com.microsoft.playready.recommendation",po).set("com.microsoft.playready.software",po).set("com.microsoft.playready.hardware",po).set("org.w3.clearkey",function(a){return(a=Qf(a.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===a.getAttribute("Lic_type")&&a.textContent?a.textContent:""});function to(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=
581
583
  window.parseInt(k,10)||1;return Array(Math.max(0,k-g.length)+1).join("0")+g})}
582
- function to(a,b){var c=uo(a,b,"timescale"),d=1;c&&(d=bg(c)||1);var e=uo(a,b,"duration");c=bg(e||"");"image"==a.H.contentType&&(c=dg(e||""));c&&(c/=d);var f=uo(a,b,"startNumber");e=Number(uo(a,b,"presentationTimeOffset"))||0;var g=cg(f||"");if(null==f||null==g)g=1;var h=vo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.W.duration||Infinity;h=Pf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Xf(p,"t",cg),y=Xf(p,"d",cg);p=Xf(p,"r",ag);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
583
- p||0;if(0>p)if(q){q=Xf(q,"t",cg);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,pg:v}),v=m}f=l}return{timescale:d,ga:c,Kb:g,Sa:e/d||0,he:e,timeline:f}}function uo(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(dc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
584
- function vo(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(dc).map(function(d){return Of(d,c)}).reduce(function(d,e){return d||e})}
585
- function wo(a,b,c,d,e,f){for(var g=Tf(a,"http://www.w3.org/1999/xlink","href"),h=Tf(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 Oe(new N(2,4,4028));if("onLoad"!=h)return Oe(new N(2,4,4027));var m=ec([d],[g]);return e.request(0,ef(m,b)).Z(function(n){n=hg(n.data,a.tagName);if(!n)return Oe(new N(2,4,4001,g));
586
- for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return xo(a,b,c,m[0],e,f+1)})}
587
- function xo(a,b,c,d,e,f){f=void 0===f?0:f;if(Tf(a,"http://www.w3.org/1999/xlink","href")){var g=wo(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return xo(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"==Tf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(xo(k,b,c,d,e,f)));return Se(g).Z(function(){return a})};function yo(a,b,c,d,e,f,g){var h,k=(new Bf).U("sidx",function(l){h=zo(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
588
- function zo(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.Jb(),m=g.reader.Jb();g.reader.skip(2);var n=g.reader.Rd();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.N(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.N();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new oi(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Ao(a){this.h=Ib(a);this.g=new yf(this.h,0)}Ao.prototype.ma=function(){return this.g.ma()};
589
- function Bo(a){var b=Co(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=Co(a);a:{d=t(Do);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 Eo(c,d)}
590
- function Co(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 Do=[[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 Eo(a,b){this.id=a;this.g=b}
591
- function Fo(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 Go(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Ao(a.g);for(var n=null,p=null;a.ma();){var q=Bo(a);if(187==q.id){var v=Ho(q);v&&(q=c*v.qg,v=b+v.Zf,null!=n&&m.push(new oi(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new oi(n+g,d+g,l,p,null,f,g,h,k));return m}
592
- function Ho(a){var b=new Ao(a.g);a=Bo(b);if(179!=a.id)throw new N(2,3,3013);a=Fo(a);b=Bo(b);if(183!=b.id)throw new N(2,3,3012);b=new Ao(b.g);for(var c=0;b.ma();){var d=Bo(b);if(241==d.id){c=Fo(d);break}}return{qg:a,Zf:c}};function Io(a,b){var c=vo(a,b,"Initialization");if(!c)return null;var d=a.H.wa,e=c.getAttribute("sourceURL");e&&(d=ec(a.H.wa,[e]));e=0;var f=null;if(c=Xf(c,"range",$f))e=c.start,f=c.end;return new mi(function(){return d},e,f,Jo(a))}
593
- function Ko(a,b){var c=Number(uo(a,Lo,"presentationTimeOffset"))||0,d=uo(a,Lo,"timescale"),e=1;d&&(e=bg(d)||1);var f=c/e||0,g=Io(a,Lo);Mo(a,g);var h=Ye(a);return{zb:function(){var k=vo(h,Lo,"RepresentationIndex"),l=h.H.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=ec(h.H.wa,[k]));k=No(h);return Oo(h,b,g,l,k.start,k.end,f)}}}
594
- function Oo(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,z,B,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Wa||!a.W.Ce,l=a.W.start,m=a.W.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.ya(),c.Ca,c.la):null],p=null,u(E,Promise.all(v),2);y=E.h;x=y[0];w=y[1]||null;D=null;z=l-g;B=l;G=m?l+m:Infinity;if("mp4"==n)var H=yo(x,e,d,c,z,B,G);else{H=new Ao(w);if(440786851!=Bo(H).id)throw new N(2,3,3008);var I=Bo(H);if(408125543!=I.id)throw new N(2,3,3009);H=I.g.byteOffset;
595
- I=new Ao(I.g);for(var J=null;I.ma();){var L=Bo(I);if(357149030==L.id){J=L;break}}if(!J)throw new N(2,3,3010);J=new Ao(J.g);L=1E6;for(I=null;J.ma();){var P=Bo(J);if(2807729==P.id)L=Fo(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=L/1E9;I*=J;L=Bo(new Ao(x));if(475249515!=L.id)throw new N(2,3,3007);H=Go(L,H,J,I,d,c,z,B,G)}D=H;h.Gb(D);q=new rj(D);k&&q.Xa(B,G,!0);return E["return"](q)})}
596
- function Lo(a){return a.uc}function No(a){var b=vo(a,Lo,"RepresentationIndex");a=uo(a,Lo,"indexRange");a=$f(a||"");b&&(a=Xf(b,"range",$f,a));return a}function Mo(a,b){Po(a,b);if(!No(a))throw new N(2,4,4002);}function Po(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=jc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
597
- function Jo(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.Vc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Qo(a,b){var c=Io(a,Ro),d=So(a);if(!d.ga&&!d.timeline&&1<d.Eb.length)throw new N(2,4,4002);if(!d.ga&&!a.W.duration&&!d.timeline&&1==d.Eb.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=To(a.W.start,a.W.duration,a.H.wa,d,c);c=!e;e?e.Fb(g,a.presentationTimeline.Pa()):e=new rj(g);a.presentationTimeline.Gb(g);a.Wa&&a.W.Ce||e.Xa(a.W.start,a.W.duration?a.W.start+a.W.duration:
598
- Infinity,c);f&&(f.segmentIndex=e);return{zb:function(){e&&0!=e.J.length||e.nc(g);return Promise.resolve(e)}}}function Ro(a){return a.$a}function So(a){var b=Uo(a);a=to(a,Ro);var c=a.Kb;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,Kb:c,Sa:a.Sa,timeline:a.timeline,Eb:b}}
599
- function To(a,b,c,d,e){var f=d.Eb.length;d.timeline&&d.timeline.length!=d.Eb.length&&(f=Math.min(d.timeline.length,d.Eb.length));for(var g=a-d.Sa,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={ld:m.ld},n++){var p=d.Eb[n];m.ld=ec(c,[p.Qf]);var q=void 0;q=null!=d.ga?l+d.ga:d.timeline?d.timeline[n].end:l+b;k.push(new oi(a+l,a+q,function(v){return function(){return v.ld}}(m),p.start,p.end,e,g,a,h));l=q}return k}
600
- function Uo(a){return[a.H.$a,a.ja.$a,a.aa.$a].filter(dc).map(function(b){return Pf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Ae&&(a.Ae=!0);var c=b.getAttribute("media");b=Xf(b,"mediaRange",$f,{start:0,end:null});return{Qf:c,start:b.start,end:b.end}})};function Vo(a,b,c,d,e,f){var g=Wo(a),h=Xo(a);Yo(h);var k=Ye(a);if(h.kc)return Po(a,g),{zb:function(){var q=so(h.kc,k.H.id,null,k.bandwidth||null,null);q=ec(k.H.wa,[q]);return Oo(k,b,g,q,0,null,h.Sa)}};if(h.ga)return d||(a.presentationTimeline.Ld(h.ga),a.presentationTimeline.Md(a.W.start)),{zb:function(){return Zo(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=$o(k,h,g);c=a.W.start;var n=a.W.duration?a.W.start+a.W.duration:Infinity,p=Infinity!=
601
- n;l?(p&&(new rj(m)).Xa(c,n,!0),l.Fb(m,a.presentationTimeline.Pa())):l=new rj(m);a.presentationTimeline.Gb(m);p&&l.Xa(c,n);d&&a.Wa&&(d.segmentIndex=l);return{zb:function(){l&&0!=l.J.length||l.nc(m);return Promise.resolve(l)}}}function ap(a){return a.vc}function Xo(a){var b=to(a,ap),c=uo(a,ap,"media");a=uo(a,ap,"index");return{ga:b.ga,timescale:b.timescale,Kb:b.Kb,Sa:b.Sa,he:b.he,timeline:b.timeline,Jd:c,kc:a}}
602
- function Yo(a){var b=a.kc?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.kc&&(a.timeline=null),a.ga=null);if(!a.kc&&!a.Jd)throw new N(2,4,4002);}
603
- function Zo(a,b,c,d,e){function f(J){var L=(J-q)*p,P=L+b.Sa,S=L+l;L=S+p;var Y=Math.min(L,h());S=new oi(S,Y,function(){var ea=so(y,w,J,x,P*v);return ec(D,[ea])},0,null,d,z,l,h());S.j=L;return S}function g(){var J=[Math.max(k.Pa(),l),Math.min(k.gb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(L){return L+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.W.start,m=a.aa.id,n=a.W.duration,p=b.ga,q=b.Kb,v=b.timescale,
604
- y=b.Jd,x=a.bandwidth||null,w=a.H.id,D=a.H.wa,z=l-b.Sa,B=g();a=a.Wa?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var G=a;G<=B;++G){var E=f(G);c.push(E)}var H=new rj(c);c=k.gb()<h();G=k.V();if(c||G){var I=Math.max(a,B+1);H.bd(p,function(){var J=k.Pa();H.eb(J);var L=t(g());L.next();L=L.next().value;for(var P=[];I<=L;){var S=f(I);P.push(S);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
605
- function $o(a,b,c){var d=a.W.start,e=a.W.duration,f=d-b.Sa;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={kd:h.kd,od:h.od,rd:h.rd,gd:h.gd,td:h.td,hd:h.hd},k++){var l=b.timeline[k],m=l.start,n=l.pg;l=l.end;h.rd=k+b.Kb;h.td=n+b.he;h.od=a.H.id;h.gd=a.bandwidth||null;h.kd=b.Jd;h.hd=a.H.wa;g.push(new oi(d+m,d+l,function(p){return function(){var q=so(p.kd,p.od,p.rd,p.gd||null,p.td);return ec(p.hd,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
606
- function Wo(a){var b=uo(a,ap,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.wa;return new mi(function(){var f=so(b,c,null,d,null);return ec(e,[f])},0,null,Jo(a))};function bp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}bp.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=[]};
607
- function cp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca;return K(function(Da){switch(Da.g){case 1:d=kc;dp(b);ep(b);fp(b);gp(b);if(!c&&1==b.length){e=b[0];a.g=e.Fc;a.h=e.dd;a.j=e.textStreams;a.i=e.imageStreams;Da.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 Da["return"]();k=b.map(function(Ga){return Ga.Fc});l=b.map(function(Ga){return Ga.dd});m=b.map(function(Ga){return Ga.textStreams});n=b.map(function(Ga){return Ga.imageStreams});
608
- p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(hp(d.X));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(hp(d.Ub));return u(Da,ip(a.g,k,f,jp,kp),3);case 3:return u(Da,ip(a.h,l,f,jp,kp),4);case 4:return u(Da,ip(a.j,m,f,jp,kp),5);case 5:return u(Da,ip(a.i,n,f,jp,kp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(J=t(a.g),L=J.next();!L.done;L=J.next())for(P=L.value,S=t(a.h),Y=S.next();!Y.done;Y=S.next())ea=Y.value,ta=Sg(P.drmInfos,ea.drmInfos),P.drmInfos.length&&ea.drmInfos.length&&
584
+ function uo(a,b){var c=vo(a,b,"timescale"),d=1;c&&(d=bg(c)||1);var e=vo(a,b,"duration");c=bg(e||"");"image"==a.H.contentType&&(c=dg(e||""));c&&(c/=d);var f=vo(a,b,"startNumber");e=Number(vo(a,b,"presentationTimeOffset"))||0;var g=cg(f||"");if(null==f||null==g)g=1;var h=wo(a,b,"SegmentTimeline");f=null;if(h){f=d;var k=a.W.duration||Infinity;h=Pf(h,"S");for(var l=[],m=-e,n=0;n<h.length;++n){var p=h[n],q=h[n+1],v=Xf(p,"t",cg),y=Xf(p,"d",cg);p=Xf(p,"r",ag);null!=v&&(v-=e);if(!y)break;v=null!=v?v:m;p=
585
+ p||0;if(0>p)if(q){q=Xf(q,"t",cg);if(null==q)break;else if(v>=q)break;p=Math.ceil((q-v)/y)-1}else{if(Infinity==k)break;else if(v/f>=k)break;p=Math.ceil((k*f-v)/y)-1}0<l.length&&v!=m&&(l[l.length-1].end=v/f);for(q=0;q<=p;++q)m=v+y,l.push({start:v/f,end:m/f,qg:v}),v=m}f=l}return{timescale:d,ga:c,Kb:g,Ra:e/d||0,ie:e,timeline:f}}function vo(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(dc).map(function(d){return d.getAttribute(c)}).reduce(function(d,e){return d||e})}
586
+ function wo(a,b,c){return[b(a.H),b(a.ja),b(a.aa)].filter(dc).map(function(d){return Of(d,c)}).reduce(function(d,e){return d||e})}
587
+ function xo(a,b,c,d,e,f){for(var g=Tf(a,"http://www.w3.org/1999/xlink","href"),h=Tf(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 Oe(new N(2,4,4028));if("onLoad"!=h)return Oe(new N(2,4,4027));var m=ec([d],[g]);return e.request(0,ef(m,b)).Z(function(n){n=hg(n.data,a.tagName);if(!n)return Oe(new N(2,4,4001,g));
588
+ for(;a.childNodes.length;)a.removeChild(a.childNodes[0]);for(;n.childNodes.length;){var p=n.childNodes[0];n.removeChild(p);a.appendChild(p)}n=t(Array.from(n.attributes));for(p=n.next();!p.done;p=n.next())a.setAttributeNode(p.value.cloneNode(!1));return yo(a,b,c,m[0],e,f+1)})}
589
+ function yo(a,b,c,d,e,f){f=void 0===f?0:f;if(Tf(a,"http://www.w3.org/1999/xlink","href")){var g=xo(a,b,c,d,e,f);c&&(g=g.Z(void 0,function(){return yo(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"==Tf(k,"http://www.w3.org/1999/xlink","href")?a.removeChild(k):"SegmentTimeline"!=k.tagName&&g.push(yo(k,b,c,d,e,f)));return Se(g).Z(function(){return a})};function zo(a,b,c,d,e,f,g){var h,k=(new Bf).U("sidx",function(l){h=Ao(b,d,e,f,g,c,l)});a&&k.parse(a);if(h)return h;throw new N(2,3,3004);}
590
+ function Ao(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.Jb(),m=g.reader.Jb();g.reader.skip(2);var n=g.reader.Sd();a=a+g.size+m;for(m=0;m<n;m++){var p=g.reader.N(),q=(p&2147483648)>>>31;p&=2147483647;var v=g.reader.N();g.reader.skip(4);if(1==q)throw new N(2,3,3006);h.push(new oi(l/k+c,(l+v)/k+c,function(){return f},a,a+p-1,b,c,d,e));l+=v;a+=p}g.parser.stop();return h};function Bo(a){this.h=Ib(a);this.g=new yf(this.h,0)}Bo.prototype.ma=function(){return this.g.ma()};
591
+ function Co(a){var b=Do(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=Do(a);a:{d=t(Eo);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 Fo(c,d)}
592
+ function Do(a){var b=a.g.$(),c=a.g.Qa();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 Eo=[[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 Fo(a,b){this.id=a;this.g=b}
593
+ function Go(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 Ho(a,b,c,d,e,f,g,h,k){function l(){return e}var m=[];a=new Bo(a.g);for(var n=null,p=null;a.ma();){var q=Co(a);if(187==q.id){var v=Io(q);v&&(q=c*v.rg,v=b+v.$f,null!=n&&m.push(new oi(n+g,q+g,l,p,v-1,f,g,h,k)),n=q,p=v)}}null!=n&&m.push(new oi(n+g,d+g,l,p,null,f,g,h,k));return m}
594
+ function Io(a){var b=new Bo(a.g);a=Co(b);if(179!=a.id)throw new N(2,3,3013);a=Go(a);b=Co(b);if(183!=b.id)throw new N(2,3,3012);b=new Bo(b.g);for(var c=0;b.ma();){var d=Co(b);if(241==d.id){c=Go(d);break}}return{rg:a,$f:c}};function Jo(a,b){var c=wo(a,b,"Initialization");if(!c)return null;var d=a.H.wa,e=c.getAttribute("sourceURL");e&&(d=ec(a.H.wa,[e]));e=0;var f=null;if(c=Xf(c,"range",$f))e=c.start,f=c.end;return new mi(function(){return d},e,f,Ko(a))}
595
+ function Lo(a,b){var c=Number(vo(a,Mo,"presentationTimeOffset"))||0,d=vo(a,Mo,"timescale"),e=1;d&&(e=bg(d)||1);var f=c/e||0,g=Jo(a,Mo);No(a,g);var h=Ye(a);return{zb:function(){var k=wo(h,Mo,"RepresentationIndex"),l=h.H.wa;k&&(k=k.getAttribute("sourceURL"))&&(l=ec(h.H.wa,[k]));k=Oo(h);return Po(h,b,g,l,k.start,k.end,f)}}}
596
+ function Po(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,z,B,G;return K(function(E){if(1==E.g)return h=a.presentationTimeline,k=!a.Wa||!a.W.De,l=a.W.start,m=a.W.duration,n=a.H.mimeType.split("/")[1],p=b,q=null,v=[p(d,e,f),"webm"==n?p(c.ya(),c.Ba,c.la):null],p=null,u(E,Promise.all(v),2);y=E.h;x=y[0];w=y[1]||null;D=null;z=l-g;B=l;G=m?l+m:Infinity;if("mp4"==n)var H=zo(x,e,d,c,z,B,G);else{H=new Bo(w);if(440786851!=Co(H).id)throw new N(2,3,3008);var I=Co(H);if(408125543!=I.id)throw new N(2,3,3009);H=I.g.byteOffset;
597
+ I=new Bo(I.g);for(var J=null;I.ma();){var L=Co(I);if(357149030==L.id){J=L;break}}if(!J)throw new N(2,3,3010);J=new Bo(J.g);L=1E6;for(I=null;J.ma();){var P=Co(J);if(2807729==P.id)L=Go(P);else if(17545==P.id)if(4==P.g.byteLength)I=P.g.getFloat32(0);else if(8==P.g.byteLength)I=P.g.getFloat64(0);else throw new N(2,3,3003);}if(null==I)throw new N(2,3,3011);J=L/1E9;I*=J;L=Co(new Bo(x));if(475249515!=L.id)throw new N(2,3,3007);H=Ho(L,H,J,I,d,c,z,B,G)}D=H;h.Gb(D);q=new rj(D);k&&q.Xa(B,G,!0);return E["return"](q)})}
598
+ function Mo(a){return a.uc}function Oo(a){var b=wo(a,Mo,"RepresentationIndex");a=vo(a,Mo,"indexRange");a=$f(a||"");b&&(a=Xf(b,"range",$f,a));return a}function No(a,b){Qo(a,b);if(!Oo(a))throw new N(2,4,4002);}function Qo(a,b){var c=a.H.mimeType.split("/")[1];if(a.H.contentType!=jc&&"mp4"!=c&&"webm"!=c)throw new N(2,4,4006);if("webm"==c&&!b)throw new N(2,4,4005);}
599
+ function Ko(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.Vc,pixelAspectRatio:b.pixelAspectRatio||null,width:b.width||null}};function Ro(a,b){var c=Jo(a,So),d=To(a);if(!d.ga&&!d.timeline&&1<d.Eb.length)throw new N(2,4,4002);if(!d.ga&&!a.W.duration&&!d.timeline&&1==d.Eb.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=Uo(a.W.start,a.W.duration,a.H.wa,d,c);c=!e;e?e.Fb(g,a.presentationTimeline.Oa()):e=new rj(g);a.presentationTimeline.Gb(g);a.Wa&&a.W.De||e.Xa(a.W.start,a.W.duration?a.W.start+a.W.duration:
600
+ Infinity,c);f&&(f.segmentIndex=e);return{zb:function(){e&&0!=e.J.length||e.nc(g);return Promise.resolve(e)}}}function So(a){return a.$a}function To(a){var b=Vo(a);a=uo(a,So);var c=a.Kb;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,Kb:c,Ra:a.Ra,timeline:a.timeline,Eb:b}}
601
+ function Uo(a,b,c,d,e){var f=d.Eb.length;d.timeline&&d.timeline.length!=d.Eb.length&&(f=Math.min(d.timeline.length,d.Eb.length));for(var g=a-d.Ra,h=b?a+b:Infinity,k=[],l=d.startTime,m={},n=0;n<f;m={ld:m.ld},n++){var p=d.Eb[n];m.ld=ec(c,[p.Rf]);var q=void 0;q=null!=d.ga?l+d.ga:d.timeline?d.timeline[n].end:l+b;k.push(new oi(a+l,a+q,function(v){return function(){return v.ld}}(m),p.start,p.end,e,g,a,h));l=q}return k}
602
+ function Vo(a){return[a.H.$a,a.ja.$a,a.aa.$a].filter(dc).map(function(b){return Pf(b,"SegmentURL")}).reduce(function(b,c){return 0<b.length?b:c}).map(function(b){b.getAttribute("indexRange")&&!a.Be&&(a.Be=!0);var c=b.getAttribute("media");b=Xf(b,"mediaRange",$f,{start:0,end:null});return{Rf:c,start:b.start,end:b.end}})};function Wo(a,b,c,d,e,f){var g=Xo(a),h=Yo(a);Zo(h);var k=Ye(a);if(h.kc)return Qo(a,g),{zb:function(){var q=to(h.kc,k.H.id,null,k.bandwidth||null,null);q=ec(k.H.wa,[q]);return Po(k,b,g,q,0,null,h.Ra)}};if(h.ga)return d||(a.presentationTimeline.Md(h.ga),a.presentationTimeline.Nd(a.W.start)),{zb:function(){return $o(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=ap(k,h,g);c=a.W.start;var n=a.W.duration?a.W.start+a.W.duration:Infinity,p=Infinity!=
603
+ n;l?(p&&(new rj(m)).Xa(c,n,!0),l.Fb(m,a.presentationTimeline.Oa())):l=new rj(m);a.presentationTimeline.Gb(m);p&&l.Xa(c,n);d&&a.Wa&&(d.segmentIndex=l);return{zb:function(){l&&0!=l.J.length||l.nc(m);return Promise.resolve(l)}}}function bp(a){return a.vc}function Yo(a){var b=uo(a,bp),c=vo(a,bp,"media");a=vo(a,bp,"index");return{ga:b.ga,timescale:b.timescale,Kb:b.Kb,Ra:b.Ra,ie:b.ie,timeline:b.timeline,Kd:c,kc:a}}
604
+ function Zo(a){var b=a.kc?1:0;b+=a.timeline?1:0;b+=a.ga?1:0;if(0==b)throw new N(2,4,4002);1!=b&&(a.kc&&(a.timeline=null),a.ga=null);if(!a.kc&&!a.Kd)throw new N(2,4,4002);}
605
+ function $o(a,b,c,d,e){function f(J){var L=(J-q)*p,P=L+b.Ra,S=L+l;L=S+p;var Y=Math.min(L,h());S=new oi(S,Y,function(){var ea=to(y,w,J,x,P*v);return ec(D,[ea])},0,null,d,z,l,h());S.j=L;return S}function g(){var J=[Math.max(k.Oa(),l),Math.min(k.gb(),h())].map(function(L){return L-l});return[Math.ceil(J[0]/p),Math.ceil(J[1]/p)-1].map(function(L){return L+q})}function h(){var J=null!=m&&e[m]||n;return J?l+J:Infinity}var k=a.presentationTimeline,l=a.W.start,m=a.aa.id,n=a.W.duration,p=b.ga,q=b.Kb,v=b.timescale,
606
+ y=b.Kd,x=a.bandwidth||null,w=a.H.id,D=a.H.wa,z=l-b.Ra,B=g();a=a.Wa?Math.max(B[0],B[1]-c+1):B[0];B=B[1];c=[];for(var G=a;G<=B;++G){var E=f(G);c.push(E)}var H=new rj(c);c=k.gb()<h();G=k.V();if(c||G){var I=Math.max(a,B+1);H.bd(p,function(){var J=k.Oa();H.eb(J);var L=t(g());L.next();L=L.next().value;for(var P=[];I<=L;){var S=f(I);P.push(S);I++}return J>h()&&!P.length?null:P})}return Promise.resolve(H)}
607
+ function ap(a,b,c){var d=a.W.start,e=a.W.duration,f=d-b.Ra;e=e?d+e:Infinity;for(var g=[],h={},k=0;k<b.timeline.length;h={kd:h.kd,od:h.od,rd:h.rd,gd:h.gd,td:h.td,hd:h.hd},k++){var l=b.timeline[k],m=l.start,n=l.qg;l=l.end;h.rd=k+b.Kb;h.td=n+b.ie;h.od=a.H.id;h.gd=a.bandwidth||null;h.kd=b.Kd;h.hd=a.H.wa;g.push(new oi(d+m,d+l,function(p){return function(){var q=to(p.kd,p.od,p.rd,p.gd||null,p.td);return ec(p.hd,[q]).map(function(v){return v.toString()})}}(h),0,null,c,f,d,e))}return g}
608
+ function Xo(a){var b=vo(a,bp,"initialization");if(!b)return null;var c=a.H.id,d=a.bandwidth||null,e=a.H.wa;return new mi(function(){var f=to(b,c,null,d,null);return ec(e,[f])},0,null,Ko(a))};function cp(){this.l=[];this.g=[];this.h=[];this.j=[];this.i=[];this.m=new Set}cp.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=[]};
609
+ function dp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca;return K(function(Da){switch(Da.g){case 1:d=kc;ep(b);fp(b);gp(b);hp(b);if(!c&&1==b.length){e=b[0];a.g=e.Fc;a.h=e.dd;a.j=e.textStreams;a.i=e.imageStreams;Da.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 Da["return"]();k=b.map(function(Ga){return Ga.Fc});l=b.map(function(Ga){return Ga.dd});m=b.map(function(Ga){return Ga.textStreams});n=b.map(function(Ga){return Ga.imageStreams});
610
+ p=t(m);for(q=p.next();!q.done;q=p.next())v=q.value,v.push(ip(d.X));y=t(n);for(x=y.next();!x.done;x=y.next())w=x.value,w.push(ip(d.Ub));return u(Da,jp(a.g,k,f,kp,lp),3);case 3:return u(Da,jp(a.h,l,f,kp,lp),4);case 4:return u(Da,jp(a.j,m,f,kp,lp),5);case 5:return u(Da,jp(a.i,n,f,kp,lp),2);case 2:D=0;z=[];if(a.h.length&&a.g.length)for(J=t(a.g),L=J.next();!L.done;L=J.next())for(P=L.value,S=t(a.h),Y=S.next();!Y.done;Y=S.next())ea=Y.value,ta=Sg(P.drmInfos,ea.drmInfos),P.drmInfos.length&&ea.drmInfos.length&&
609
611
  !ta.length||(Ca=D++,z.push({id:Ca,language:P.language,primary:P.primary,audio:P,video:ea,bandwidth:(P.bandwidth||0)+(ea.bandwidth||0),drmInfos:ta,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(B=a.h.concat(a.g),G=t(B),E=G.next();!E.done;E=G.next())H=E.value,I=D++,z.push({id:I,language:H.language,primary:H.primary,audio:H.type==d.cb?H:null,video:H.type==d.ra?H:null,bandwidth:H.bandwidth||0,drmInfos:H.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});
610
- a.l=z;A(Da)}})}function dp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Fc),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.Fc=c}}
611
- function fp(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}}
612
- function ep(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.dd),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)&&xf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.dd=c}}
613
- function gp(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}}
614
- function lp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P;return K(function(S){switch(S.g){case 1:b=kc;if(1==a.length)return S["return"](a[0]);c=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.cb})});d=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.ra})});e=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.X})});f=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.Ub})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
615
- k.push(mp(b.X));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(mp(b.Ub));return u(S,ip([],c,0,np,op),2);case 2:return p=S.h,u(S,ip([],d,0,np,op),3);case 3:return q=S.h,u(S,ip([],e,0,np,op),4);case 4:return v=S.h,u(S,ip([],f,0,np,op),5);case 5:y=S.h;x=0;if(q.length&&p.length)for(G=t(p),E=G.next();!E.done;E=G.next())for(H=E.value,I=t(q),J=I.next();!J.done;J=I.next())L=J.value,P=x++,L.variantIds.push(P),H.variantIds.push(P);else for(w=q.concat(p),D=t(w),z=D.next();!z.done;z=D.next())B=z.value,
612
+ a.l=z;A(Da)}})}function ep(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.Fc),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.Fc=c}}
613
+ function gp(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}}
614
+ function fp(a){a=t(a);for(var b=a.next();!b.done;b=a.next()){b=b.value;for(var c=[],d=t(b.dd),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)&&xf(e.closedCaptions,h.closedCaptions)&&e.bandwidth==h.bandwidth&&(f=!0);f||c.push(e)}b.dd=c}}
615
+ function hp(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}}
616
+ function mp(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P;return K(function(S){switch(S.g){case 1:b=kc;if(1==a.length)return S["return"](a[0]);c=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.cb})});d=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.ra})});e=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.X})});f=a.map(function(Y){return Y.filter(function(ea){return ea.type==b.Ub})});g=t(e);for(h=g.next();!h.done;h=g.next())k=h.value,
617
+ k.push(np(b.X));l=t(f);for(m=l.next();!m.done;m=l.next())n=m.value,n.push(np(b.Ub));return u(S,jp([],c,0,op,pp),2);case 2:return p=S.h,u(S,jp([],d,0,op,pp),3);case 3:return q=S.h,u(S,jp([],e,0,op,pp),4);case 4:return v=S.h,u(S,jp([],f,0,op,pp),5);case 5:y=S.h;x=0;if(q.length&&p.length)for(G=t(p),E=G.next();!E.done;E=G.next())for(H=E.value,I=t(q),J=I.next();!J.done;J=I.next())L=J.value,P=x++,L.variantIds.push(P),H.variantIds.push(P);else for(w=q.concat(p),D=t(w),z=D.next();!z.done;z=D.next())B=z.value,
616
618
  B.variantIds=[x++];return S["return"](q.concat(p).concat(v).concat(y))}})}
617
- function ip(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J;return K(function(L){switch(L.g){case 1:f=kc;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){L.A(4);break}m=l.value;return u(L,pp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new N(2,4,4037);l=k.next();L.A(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,y=t(v),x=y.next();!x.done;x=y.next())w=x.value,(D=qp(w,b,d,e,g))&&a.push(D);z=t(g);for(q=z.next();!q.done;q=
619
+ function jp(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J;return K(function(L){switch(L.g){case 1:f=kc;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){L.A(4);break}m=l.value;return u(L,qp(m,b,c,e,g),5);case 5:n=L.h;if(!n)throw new N(2,4,4037);l=k.next();L.A(2);break;case 4:p=t(g);for(q=p.next();!q.done;q=p.next())for(v=q.value,y=t(v),x=y.next();!x.done;x=y.next())w=x.value,(D=rp(w,b,d,e,g))&&a.push(D);z=t(g);for(q=z.next();!q.done;q=
618
620
  z.next())for(B=q.value,G={},E=t(B),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,I=G.Va.type==f.Ub&&!G.Va.tilesLayout,!H&&!I&&(J=a.some(function(P){return function(S){return S.mimeType==P.Va.mimeType&&Zc(S.codecs)==Zc(P.Va.codecs)}}(G))))throw new N(2,4,4037);return L["return"](a)}})}
619
- function pp(a,b,c,d,e){return K(function(f){if(1==f.g)return rp(b,a),a.matchedStreams?a.segmentIndex?u(f,sp(a,c),2):f.A(2):f["return"](!1);tp(a,c,d,e);return f["return"](!0)})}
620
- function sp(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 uj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);A(l)})}
621
- function qp(a,b,c,d,e){var f=c(a);rp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new uj;return u(g,sp(f,0),0)})});if(!f.matchedStreams)return null;tp(f,0,d,e);return f}function tp(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==pd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
622
- function jp(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}
623
- function np(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
624
- function kp(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=Sg(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||
625
- (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=jp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),kp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&kp(a.trickModeVideo,b)}
626
- function op(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)}}}
627
- function rp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:up,video:up,text:vp,image:wp}[f.type],h={audio:xp,video:yp,text:zp,image:Ap}[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 up(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Zc(b.codecs)!=Zc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Sg(c,d).length:1)}return c?!1:!0}
628
- function vp(a,b){return a.language?b.language?0==pd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function wp(a){return a.tilesLayout?!0:!1}
629
- function xp(a,b,c){if(a.id==c.id)return!0;var d=pd(a.language,b.language),e=pd(a.language,c.language);if(e>d)return!0;if(e<d)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;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
630
- d=Bp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Cp)return!0;if(d==Dp)return!1;d=Bp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Cp?!0:d==Dp?!1:a.bandwidth&&Ep(a.bandwidth,b.bandwidth,c.bandwidth)==Cp?!0:!1}
631
- function yp(a,b,c){if(a.id==c.id)return!0;var d=Bp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Cp)return!0;if(d==Dp)return!1;if(a.frameRate){d=Bp(a.frameRate,b.frameRate,c.frameRate);if(d==Cp)return!0;if(d==Dp)return!1}return a.bandwidth&&Ep(a.bandwidth,b.bandwidth,c.bandwidth)==Cp?!0:!1}
632
- function zp(a,b,c){if(a.id==c.id)return!0;var d=pd(a.language,b.language),e=pd(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!=
633
- a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Ap(a,b,c){return a.id==c.id?!0:Bp(a.width*a.height,b.width*b.height,c.width*c.height)==Cp?!0:!1}function mp(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}}
634
- function hp(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new rj([]),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}}
635
- function Bp(a,b,c){if(b==a&&a!=c)return Dp;if(c==a&&a!=b)return Cp;if(b>a){if(c<=a||c-a<b-a)return Cp;if(c-a>b-a)return Dp}else{if(c>a)return Dp;if(a-c<a-b)return Cp;if(a-c>a-b)return Dp}return Fp}function Ep(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Cp:b<a?Dp:Fp}var Cp=1,Fp=0,Dp=-1;function Gp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new bp;this.F=0;this.I=new Pa(5);this.D=new O(function(){Hp(a)});this.o=new Ze;this.s=null;this.L=[];this.u=Infinity;this.C=!1}r=Gp.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,Ip(c),2);d=e.h;c.h&&Jp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
636
- 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 C(c,2),u(c,Ip(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);A(c)})};r.onExpirationUpdated=function(){};
637
- function Ip(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=ef(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),$e(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,Kp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
638
- function Kp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=hg(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Lp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=xo(d,a.g.retryParameters,f,c,a.h.networkingEngine);$e(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](Lp(a,h,c))})}
639
- function Lp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca,Da,Ga;return K(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Pf(b,"Location").map(Vf).filter(dc);0<f.length&&(g=ec(e,f),e=a.m=g);h=Pf(b,"BaseURL");k=h.map(Vf);l=ec(e,k);m=0;h&&h.length&&(m=Xf(h[0],"availabilityTimeOffset",dg)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Xf(b,"minBufferTime",Zf)||0);a.F=Xf(b,"minimumUpdatePeriod",Zf,-1);q=Xf(b,"availabilityStartTime",Yf);v=Xf(b,
640
- "timeShiftBufferDepth",Zf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Xf(b,"suggestedPresentationDelay",Zf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Xf(b,"maxSegmentDuration",Zf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,G=t(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.eb(B.Pa());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=x?x:I,B=new T(q,J,a.g.dash.autoCorrectDrift);B.wc("static"==z);(L=B.V())&&
641
- !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.ce(v);P=b.getAttribute("profiles")||"";S={Wa:"static"!=z,presentationTimeline:B,aa:null,W:null,ja:null,H:null,bandwidth:0,Ae:!1,xb:m,profiles:P.split(",")};Y=Mp(a,S,l,b);ea=Y.duration;ta=Y.periods;"static"!=z&&Y.se||B.Ia(ea||Infinity);a.u&&!a.C&&(Ca=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.C=a.h.isLowLatencyMode());a.C?B.Ne(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.");
642
- B.Ld(D||1);return u(Ha,cp(a.j,ta,S.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);Ha.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:!1};if(!B.Se()){Ha.A(4);break}Da=Pf(b,"UTCTiming");return u(Ha,Np(a,l,Da),5);case 5:Ga=Ha.h;if(!a.h)return Ha["return"]();B.Oe(Ga);case 4:B.Gd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ha)}})}
643
- function Mp(a,b,c,d){var e=Xf(d,"mediaPresentationDuration",Zf),f=[],g=0;d=Pf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Xf(k,"start",Zf,g),n=k.id,p=Xf(k,"duration",Zf),q=null;if(l){var v=Xf(l,"start",Zf);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Op(a,b,c,{start:m,duration:q,node:k,Ce:null==q||!l});f.push(g);b.aa.id&&q&&(a.M[b.aa.id]=q);if(null==q){g=
644
- null;break}g=m+q}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,se:!1}:{periods:f,duration:g,se:!0}}
645
- function Op(a,b,c,d){b.aa=Pp(d.node,null,c);b.W=d;b.aa.xb=b.xb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=Pf(d.node,"EventStream");c=b.presentationTimeline.Pa();e=t(e);for(var f=e.next();!f.done;f=e.next())Qp(a,d.start,d.duration,f.value,c);c=Pf(d.node,"AdaptationSet").map(function(m){return Rp(a,b,m)}).filter(dc);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.bg);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);
646
- }d=c.filter(function(m){return!m.fe});c=c.filter(function(m){return m.fe});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.fe.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={Dc:h.Dc},l=k.next())h.Dc=l.value,h.Dc.trickModeVideo=e.streams.find(function(m){return function(n){return Zc(m.Dc.codecs)==Zc(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Sp(d,"audio");g=a.g.disableVideo?[]:Sp(d,"video");f=a.g.disableText?
647
- []:Sp(d,jc);c=a.g.disableThumbnails?[]:Sp(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,Fc:d,dd:e,textStreams:g,imageStreams:f}}
648
- function Sp(a,b){return a.filter(function(c){return c.contentType==b})}
649
- function Rp(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=Pp(c,b.aa,null);var e=!1,f=Pf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(dc),h=void 0,k=b.ja.contentType==jc;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=
621
+ function qp(a,b,c,d,e){return K(function(f){if(1==f.g)return sp(b,a),a.matchedStreams?a.segmentIndex?u(f,tp(a,c),2):f.A(2):f["return"](!1);up(a,c,d,e);return f["return"](!0)})}
622
+ function tp(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 uj)for(h=0;h<d.length;h++)k=d[h],k.segmentIndex&&h>=b&&a.segmentIndex.j.push(k.segmentIndex);A(l)})}
623
+ function rp(a,b,c,d,e){var f=c(a);sp(b,f);f.createSegmentIndex&&(f.createSegmentIndex=function(){return K(function(g){if(f.segmentIndex)return g.A(0);f.segmentIndex=new uj;return u(g,tp(f,0),0)})});if(!f.matchedStreams)return null;up(f,0,d,e);return f}function up(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==pd(a.language,g.language)&&(h=!1);h&&d[f]["delete"](g)}}
624
+ function kp(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}
625
+ function op(a){a=Object.assign({},a);a.keyIds=new Set;a.segments=[];a.variantIds=[];a.closedCaptions=null;return a}
626
+ function lp(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=Sg(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||
627
+ (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=kp(b.trickModeVideo),a.trickModeVideo.createSegmentIndex=function(){a.trickModeVideo.segmentIndex=a.segmentIndex.clone();return Promise.resolve()}),lp(a.trickModeVideo,b.trickModeVideo)):a.trickModeVideo&&lp(a.trickModeVideo,b)}
628
+ function pp(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)}}}
629
+ function sp(a,b){for(var c=[],d=t(a),e=d.next();!e.done;e=d.next()){var f=b,g={audio:vp,video:vp,text:wp,image:xp}[f.type],h={audio:yp,video:zp,text:Ap,image:Bp}[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 vp(a,b){var c;if(!(c=b.mimeType!=a.mimeType||Zc(b.codecs)!=Zc(a.codecs))&&(c=a.drmInfos)){c=a.drmInfos;var d=b.drmInfos;c=!(c.length&&d.length?0<Sg(c,d).length:1)}return c?!1:!0}
630
+ function wp(a,b){return a.language?b.language?0==pd(a.language,b.language)||b.kind!=a.kind?!1:!0:!0:!1}function xp(a){return a.tilesLayout?!0:!1}
631
+ function yp(a,b,c){if(a.id==c.id)return!0;var d=pd(a.language,b.language),e=pd(a.language,c.language);if(e>d)return!0;if(e<d)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;if(!b.primary&&c.primary)return!0;if(b.primary&&!c.primary)return!1;
632
+ d=Cp(a.channelsCount,b.channelsCount,c.channelsCount);if(d==Dp)return!0;if(d==Ep)return!1;d=Cp(a.audioSamplingRate,b.audioSamplingRate,c.audioSamplingRate);return d==Dp?!0:d==Ep?!1:a.bandwidth&&Fp(a.bandwidth,b.bandwidth,c.bandwidth)==Dp?!0:!1}
633
+ function zp(a,b,c){if(a.id==c.id)return!0;var d=Cp(a.width*a.height,b.width*b.height,c.width*c.height);if(d==Dp)return!0;if(d==Ep)return!1;if(a.frameRate){d=Cp(a.frameRate,b.frameRate,c.frameRate);if(d==Dp)return!0;if(d==Ep)return!1}return a.bandwidth&&Fp(a.bandwidth,b.bandwidth,c.bandwidth)==Dp?!0:!1}
634
+ function Ap(a,b,c){if(a.id==c.id)return!0;var d=pd(a.language,b.language),e=pd(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!=
635
+ a.mimeType||c.codecs!=a.codecs||b.mimeType==a.mimeType&&b.codecs==a.codecs?!1:!0}function Bp(a,b,c){return a.id==c.id?!0:Cp(a.width*a.height,b.width*b.height,c.width*c.height)==Dp?!0:!1}function np(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}}
636
+ function ip(a){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new rj([]),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}}
637
+ function Cp(a,b,c){if(b==a&&a!=c)return Ep;if(c==a&&a!=b)return Dp;if(b>a){if(c<=a||c-a<b-a)return Dp;if(c-a>b-a)return Ep}else{if(c>a)return Ep;if(a-c<a-b)return Dp;if(a-c>a-b)return Ep}return Gp}function Fp(a,b,c){b=Math.abs(a-b);a=Math.abs(a-c);return a<b?Dp:b<a?Ep:Gp}var Dp=1,Gp=0,Ep=-1;function Hp(){var a=this;this.h=this.g=null;this.m=[];this.i=null;this.G=1;this.l={};this.M={};this.j=new cp;this.F=0;this.I=new Pa(5);this.D=new O(function(){Ip(a)});this.o=new Ze;this.s=null;this.L=[];this.u=Infinity;this.B=!1}r=Hp.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.B=b.isLowLatencyMode(),c.m=[a],c.h=b,u(e,Jp(c),2);d=e.h;c.h&&Kp(c,d);if(!c.h)throw new N(2,7,7001);return e["return"](c.i)})};
638
+ 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 C(c,2),u(c,Jp(a),4);if(2!=c.g)return va(c,0);b=F(c);if(!a.h||!b)return c["return"]();a.h.onError(b);A(c)})};r.onExpirationUpdated=function(){};
639
+ function Jp(a){var b,c,d,e,f,g,h;return K(function(k){if(1==k.g)return b=ef(a.m,a.g.retryParameters),c=a.h.networkingEngine,a.h.modifyManifestRequest(b,{format:"d"}),d=Date.now(),e=c.request(0,b),$e(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,Lp(a,f.data,f.uri),3)}g=Date.now();h=(g-d)/1E3;a.I.sample(1,h);return k["return"](h)})}
640
+ function Lp(a,b,c){var d,e,f,g,h;return K(function(k){if(1==k.g){d=hg(b,"MPD");if(!d)throw new N(2,4,4001,c);if(e=a.g.dash.disableXlinkProcessing)return k["return"](Mp(a,d,c));f=a.g.dash.xlinkFailGracefully;g=yo(d,a.g.retryParameters,f,c,a.h.networkingEngine);$e(a.o,g);return u(k,g.promise,2)}h=k.h;return k["return"](Mp(a,h,c))})}
641
+ function Mp(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca,Da,Ga;return K(function(Ha){switch(Ha.g){case 1:(d=a.g.dash.manifestPreprocessor)&&d(b);e=[c];f=Pf(b,"Location").map(Vf).filter(dc);0<f.length&&(g=ec(e,f),e=a.m=g);h=Pf(b,"BaseURL");k=h.map(Vf);l=ec(e,k);m=0;h&&h.length&&(m=Xf(h[0],"availabilityTimeOffset",dg)||0);n=a.g.dash.ignoreMinBufferTime;p=0;n||(p=Xf(b,"minBufferTime",Zf)||0);a.F=Xf(b,"minimumUpdatePeriod",Zf,-1);q=Xf(b,"availabilityStartTime",Yf);v=Xf(b,
642
+ "timeShiftBufferDepth",Zf);y=a.g.dash.ignoreSuggestedPresentationDelay;x=null;y||(x=Xf(b,"suggestedPresentationDelay",Zf));w=a.g.dash.ignoreMaxSegmentDuration;D=null;w||(D=Xf(b,"maxSegmentDuration",Zf));z=b.getAttribute("type")||"static";if(a.i)for(B=a.i.presentationTimeline,G=t(Object.values(a.l)),E=G.next();!E.done;E=G.next())H=E.value,H.segmentIndex&&H.segmentIndex.eb(B.Oa());else I=a.g.defaultPresentationDelay||1.5*p,J=null!=x?x:I,B=new T(q,J,a.g.dash.autoCorrectDrift);B.wc("static"==z);(L=B.V())&&
643
+ !isNaN(a.g.availabilityWindowOverride)&&(v=a.g.availabilityWindowOverride);null==v&&(v=Infinity);B.de(v);P=b.getAttribute("profiles")||"";S={Wa:"static"!=z,presentationTimeline:B,aa:null,W:null,ja:null,H:null,bandwidth:0,Be:!1,xb:m,profiles:P.split(",")};Y=Np(a,S,l,b);ea=Y.duration;ta=Y.periods;"static"!=z&&Y.te||B.Ia(ea||Infinity);a.u&&!a.B&&(Ca=a.h.isAutoLowLatencyMode())&&(a.h.enableLowLatencyMode(),a.B=a.h.isLowLatencyMode());a.B?B.Oe(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.");
644
+ B.Md(D||1);return u(Ha,dp(a.j,ta,S.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);Ha.A(3);break}a.i={presentationTimeline:B,variants:a.j.l,textStreams:a.j.j.slice(),imageStreams:a.j.i,offlineSessionIds:[],minBufferTime:p||0,sequenceMode:!1};if(!B.Te()){Ha.A(4);break}Da=Pf(b,"UTCTiming");return u(Ha,Op(a,l,Da),5);case 5:Ga=Ha.h;if(!a.h)return Ha["return"]();B.Pe(Ga);case 4:B.Hd();case 3:a.h.makeTextStreamsForClosedCaptions(a.i),A(Ha)}})}
645
+ function Np(a,b,c,d){var e=Xf(d,"mediaPresentationDuration",Zf),f=[],g=0;d=Pf(d,"Period");for(var h=0;h<d.length;h++){var k=d[h],l=d[h+1],m=Xf(k,"start",Zf,g),n=k.id,p=Xf(k,"duration",Zf),q=null;if(l){var v=Xf(l,"start",Zf);null!=v&&(q=v-m)}else null!=e&&(q=e-m);null==q&&(q=p);if(!(null!==a.s&&null!==n&&null!==m&&m<a.s)||a.L.includes(n)||h+1==d.length){null!==m&&(null===a.s||m>a.s)&&(a.s=m);g=Pp(a,b,c,{start:m,duration:q,node:k,De:null==q||!l});f.push(g);b.aa.id&&q&&(a.M[b.aa.id]=q);if(null==q){g=
646
+ null;break}g=m+q}}a.L=f.map(function(y){return y.id});return null!=e?{periods:f,duration:e,te:!1}:{periods:f,duration:g,te:!0}}
647
+ function Pp(a,b,c,d){b.aa=Qp(d.node,null,c);b.W=d;b.aa.xb=b.xb;b.aa.id||(b.aa.id="__shaka_period_"+d.start);var e=Pf(d.node,"EventStream");c=b.presentationTimeline.Oa();e=t(e);for(var f=e.next();!f.done;f=e.next())Rp(a,d.start,d.duration,f.value,c);c=Pf(d.node,"AdaptationSet").map(function(m){return Sp(a,b,m)}).filter(dc);if(b.Wa){d=[];e=t(c);for(f=e.next();!f.done;f=e.next()){f=t(f.value.cg);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);
648
+ }d=c.filter(function(m){return!m.ge});c=c.filter(function(m){return m.ge});c=t(c);for(e=c.next();!e.done;e=c.next()){e=e.value;f=e.ge.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={Dc:h.Dc},l=k.next())h.Dc=l.value,h.Dc.trickModeVideo=e.streams.find(function(m){return function(n){return Zc(m.Dc.codecs)==Zc(n.codecs)}}(h))}}}e=a.g.disableAudio?[]:Tp(d,"audio");g=a.g.disableVideo?[]:Tp(d,"video");f=a.g.disableText?
649
+ []:Tp(d,jc);c=a.g.disableThumbnails?[]:Tp(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,Fc:d,dd:e,textStreams:g,imageStreams:f}}
650
+ function Tp(a,b){return a.filter(function(c){return c.contentType==b})}
651
+ function Sp(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=Qp(c,b.aa,null);var e=!1,f=Pf(c,"Role"),g=f.map(function(E){return E.getAttribute("value")}).filter(dc),h=void 0,k=b.ja.contentType==jc;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=
650
652
  l}}var n;m=Pf(c,"EssentialProperty");f=null;l=!1;m=t(m);for(var p=m.next();!p.done;p=m.next()){p=p.value;var q=p.getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==q?f=p.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==q?n=d(parseInt(p.getAttribute("value"),10)):l=!0}m=Pf(c,"SupplementalProperty");m=t(m);for(p=m.next();!p.done;p=m.next())p=p.value,"urn:mpeg:mpegB:cicp:TransferCharacteristics"==p.getAttribute("schemeIdUri")&&(n=d(parseInt(p.getAttribute("value"),
651
653
  10)));m=Pf(c,"Accessibility");var v=new Map;m=t(m);for(p=m.next();!p.done;p=m.next())if(q=p.value,p=q.getAttribute("schemeIdUri"),q=q.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==p)if(p=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"+p,2==q.length?p+=2:p++,D=w);v.set(x,Q(D))}}else v.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==p)if(p=
652
- 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"+p,p++,w=x),v.set(y,Q(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Pf(c,"ContentProtection");var z=io(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Q(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Pf(c,"Label"))&&l.length&&
653
- (l=l[0],l.textContent&&(G=l.textContent));l=Pf(c,"Representation");c=l.map(function(E){if(E=Tp(a,b,z,h,B,G,e,g,v,E))E.hdr=E.hdr||n;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=Up(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=
654
- m.value,p=t(z.drmInfos),q=p.next();!q.done;q=p.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(dc);return{id:b.ja.id||"__fake__"+a.G++,contentType:b.ja.contentType,language:B,dh:e,streams:c,drmInfos:z.drmInfos,fe:f,bg:k}}
655
- function Tp(a,b,c,d,e,f,g,h,k,l){b.H=Pp(l,b.ja,null);a.u=Math.min(a.u,b.H.xb);if(!Vp(b.H))return null;var m=b.W.start;b.bandwidth=Xf(l,"bandwidth",bg)||0;var n=b.H.contentType,p=n==jc||"application"==n;n="image"==n;try{var q=function(H,I,J){return Wp(a,H,I,J)};if(b.H.uc)var v=Ko(b,q);else if(b.H.$a)v=Qo(b,a.l);else if(b.H.vc)v=Vo(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.H.wa,x=b.W.duration||0;v={zb:function(){return Promise.resolve(tj(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
656
- throw H;}q=Pf(l,"ContentProtection");q=lo(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;Pf(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;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Pf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
654
+ 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"+p,p++,w=x),v.set(y,Q(w));else v.set("svc1","und");else"urn:mpeg:dash:role:2011"==p&&null!=q&&(g.push(q),"captions"==q&&(h="caption"));if(l)return null;l=Pf(c,"ContentProtection");var z=jo(l,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI),B=Q(c.getAttribute("lang")||"und"),G=c.getAttribute("label");(l=Pf(c,"Label"))&&l.length&&
655
+ (l=l[0],l.textContent&&(G=l.textContent));l=Pf(c,"Representation");c=l.map(function(E){if(E=Up(a,b,z,h,B,G,e,g,v,E))E.hdr=E.hdr||n;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=Vp(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=
656
+ m.value,p=t(z.drmInfos),q=p.next();!q.done;q=p.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(dc);return{id:b.ja.id||"__fake__"+a.G++,contentType:b.ja.contentType,language:B,eh:e,streams:c,drmInfos:z.drmInfos,ge:f,cg:k}}
657
+ function Up(a,b,c,d,e,f,g,h,k,l){b.H=Qp(l,b.ja,null);a.u=Math.min(a.u,b.H.xb);if(!Wp(b.H))return null;var m=b.W.start;b.bandwidth=Xf(l,"bandwidth",bg)||0;var n=b.H.contentType,p=n==jc||"application"==n;n="image"==n;try{var q=function(H,I,J){return Xp(a,H,I,J)};if(b.H.uc)var v=Lo(b,q);else if(b.H.$a)v=Ro(b,a.l);else if(b.H.vc)v=Wo(b,q,a.l,!!a.i,a.g.dash.initialSegmentLimit,a.M);else{var y=b.H.wa,x=b.W.duration||0;v={zb:function(){return Promise.resolve(tj(m,x,y))}}}}catch(H){if((p||n)&&4002==H.code)return null;
658
+ throw H;}q=Pf(l,"ContentProtection");q=mo(q,c,a.g.dash.ignoreDrmInfo,a.g.dash.keySystemsByURI);q=new Set(q?[q]:[]);var w=!1;Pf(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;p&&(D=h.includes("forced_subtitle")||h.includes("forced-subtitle"));var z;if(n&&((l=Pf(l,"EssentialProperty").find(function(H){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(H.getAttribute("schemeIdUri"))}))&&
657
659
  (z=l.getAttribute("value")),!z))return null;var B;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"))&&(B="PQ");var G=b.H.id?b.aa.id+","+b.H.id:"",E={id:a.G++,originalId:b.H.id,createSegmentIndex:function(){var H,I,J;return K(function(L){if(1==L.g){I=(H=G&&b.Wa&&a.l[G])?a.l[G]:E;if(I.segmentIndex)return L.A(0);J=I;return u(L,v.zb(),3)}J.segmentIndex=L.h;A(L)})},closeSegmentIndex:function(){E.segmentIndex&&
658
660
  (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.Vc,audioSamplingRate:b.H.audioSamplingRate,spatialAudio:w,closedCaptions:k,
659
- hdr:B,tilesLayout:z,matchedStreams:[]};G&&b.Wa&&!a.l[G]&&(a.l[G]=E);return E}function Hp(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Ip(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"]();Jp(a,b);A(d)}})}function Jp(a,b){0>a.F||a.D.P(Math.max(3,a.F-b,Qa(a.I)))}
660
- function Pp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vc:null,audioSamplingRate:null,xb:0};c=c||b.wa;var d=Pf(a,"BaseURL"),e=d.map(Vf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Xf(a,"frameRate",eg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Pf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
661
- m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Pf(a,"AudioChannelConfiguration");m=Xp(m)||b.Vc;p=Xf(a,"audioSamplingRate",cg)||b.audioSamplingRate;f||(f=Up(g,h));var q=Of(a,"SegmentBase"),v=Of(a,"SegmentTemplate"),y=q?Xf(q,"availabilityTimeOffset",dg)||0:0,x=v?Xf(v,"availabilityTimeOffset",dg)||0:0;d=d&&d.length?Xf(d[0],"availabilityTimeOffset",dg)||0:0;d=b.xb+d+y+x;return{wa:ec(c,e),uc:q||b.uc,$a:Of(a,"SegmentList")||b.$a,vc:v||b.vc,width:Xf(a,"width",cg)||b.width,height:Xf(a,
661
+ hdr:B,tilesLayout:z,matchedStreams:[]};G&&b.Wa&&!a.l[G]&&(a.l[G]=E);return E}function Ip(a){var b,c;K(function(d){switch(d.g){case 1:return b=0,C(d,2),u(d,Jp(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"]();Kp(a,b);A(d)}})}function Kp(a,b){0>a.F||a.D.P(Math.max(3,a.F-b,Qa(a.I)))}
662
+ function Qp(a,b,c){b=b||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Vc:null,audioSamplingRate:null,xb:0};c=c||b.wa;var d=Pf(a,"BaseURL"),e=d.map(Vf),f=a.getAttribute("contentType")||b.contentType,g=a.getAttribute("mimeType")||b.mimeType,h=a.getAttribute("codecs")||b.codecs,k=Xf(a,"frameRate",eg)||b.frameRate,l=a.getAttribute("sar")||b.pixelAspectRatio,m=Pf(a,"InbandEventStream"),n=b.emsgSchemeIdUris.slice();m=t(m);for(var p=m.next();!p.done;p=
663
+ m.next())p=p.value.getAttribute("schemeIdUri"),n.includes(p)||n.push(p);m=Pf(a,"AudioChannelConfiguration");m=Yp(m)||b.Vc;p=Xf(a,"audioSamplingRate",cg)||b.audioSamplingRate;f||(f=Vp(g,h));var q=Of(a,"SegmentBase"),v=Of(a,"SegmentTemplate"),y=q?Xf(q,"availabilityTimeOffset",dg)||0:0,x=v?Xf(v,"availabilityTimeOffset",dg)||0:0;d=d&&d.length?Xf(d[0],"availabilityTimeOffset",dg)||0:0;d=b.xb+d+y+x;return{wa:ec(c,e),uc:q||b.uc,$a:Of(a,"SegmentList")||b.$a,vc:v||b.vc,width:Xf(a,"width",cg)||b.width,height:Xf(a,
662
664
  "height",cg)||b.height,contentType:f,mimeType:g,codecs:h,frameRate:k,pixelAspectRatio:l,emsgSchemeIdUris:n,id:a.getAttribute("id"),Vc:m,audioSamplingRate:p,xb:d}}
663
- function Xp(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=
664
- 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 Vp(a){var b=a.uc?1:0;b+=a.$a?1:0;b+=a.vc?1:0;if(0==b)return a.contentType==jc||"application"==a.contentType?!0:!1;1!=b&&(a.uc&&(a.$a=null),a.vc=null);return!0}
665
- function Yp(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=ec(b,[c]),f=ef(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),$e(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=Bc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
666
- function Np(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.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){n.A(4);break}h=g.value;C(n,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 n.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 n.A(8);
667
- case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["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)}n.A(9);break;case 7:return u(n,Yp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Yp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
665
+ function Yp(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=
666
+ 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 Wp(a){var b=a.uc?1:0;b+=a.$a?1:0;b+=a.vc?1:0;if(0==b)return a.contentType==jc||"application"==a.contentType?!0:!1;1!=b&&(a.uc&&(a.$a=null),a.vc=null);return!0}
667
+ function Zp(a,b,c,d){var e,f,g,h,k,l;return K(function(m){if(1==m.g)return e=ec(b,[c]),f=ef(e,a.g.retryParameters),f.method=d,g=a.h.networkingEngine.request(4,f),$e(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=Bc(h.data);l=Date.parse(k);return isNaN(l)?m["return"](0):m["return"](l-Date.now())})}
668
+ function Op(a,b,c){var d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:d=c.map(function(p){return{scheme:p.getAttribute("schemeIdUri"),value:p.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){n.A(4);break}h=g.value;C(n,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 n.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 n.A(8);
669
+ case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return m=Date.parse(l),n["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)}n.A(9);break;case 7:return u(n,Zp(a,b,l,"HEAD"),10);case 10:return n["return"](n.h);case 8:return u(n,Zp(a,b,l,"GET"),11);case 11:return n["return"](n.h);
668
670
  case 9:va(n,3);break;case 5:F(n);case 3:g=f.next();n.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!"),n["return"](0)}})}
669
- function Qp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Xf(d,"timescale",cg)||1;d=t(Pf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Xf(k,"presentationTime",cg)||0,m=Xf(k,"duration",cg)||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))}}
670
- function Wp(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Jj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),$e(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Up(a,b){return cd(Xc(a,b))?jc:a.split("/")[0]}M("shaka.dash.DashParser",Gp);Yg.mpd=function(){return new Gp};Wg["application/dash+xml"]=function(){return new Gp};Wg["video/vnd.mpeg.dash.mpd"]=function(){return new Gp};function Zp(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function $p(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}$p.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};
671
- $p.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 aq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function bq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function cq(a,b){this.name=a;this.value=b};function dq(a,b){return a.filter(function(c){return c.name==b})}function eq(a,b){return a.filter(function(c){return aq(c,"TYPE")==b})}function fq(a,b){var c=dq(a,b);return c.length?c[0]:null}function gq(a){var b=0;b=void 0===b?0:b;return(a=fq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b}function hq(a,b){return ec([a],[b])[0]};function iq(a){this.h=a;this.g=0}function jq(a){kq(a,/[ \t]+/gm)}function kq(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 lq(a){return a.g==a.h.length?null:(a=kq(a,/[^ \t\n]*/gm))?a[0]:null};function mq(){this.g=0}
672
- function nq(a,b,c){b=Bc(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=oq(a,g),--a.g,pq.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=oq(a,h);if(qq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
673
- 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=oq(a,m),pq.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=hq(d,m.trim()),h&&g.push(h),e.push(new bq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new bq("",g,k)));return new Zp(c,b,f,e)}f.push(h);
674
- "EXT-X-STREAM-INF"==h.name&&(h.g.push(new cq("URI",k)),e=!0)}}return new Zp(c,b,f)}function oq(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 iq(f);var h;(h=kq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=kq(f,k);)d.push(new cq(h[1],h[2]||h[3])),jq(f)}return new $p(c,e,d,g)}
675
- var pq="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(" "),qq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function rq(){}function sq(a){try{var b=tq(a);return Qe({uri:a,Fe:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Oe(c)}}function tq(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=Nc(a):e=Ic(a);return{data:e,contentType:c}}
676
- M("shaka.net.DataUriPlugin",rq);rq.parse=sq;bf("data",sq);function uq(){var a=this;this.h=this.i=null;this.La=1;this.o=new Map;this.u=new Map;this.va=new Set;this.g=new Map;this.j=null;this.M="";this.ca=new mq;this.ia=0;this.T=!1;this.O=null;this.C=new O(function(){vq(a)});this.l=wq;this.I=null;this.ea=0;this.F=Infinity;this.Y=this.ha=0;this.D=new Ze;this.G=[];this.L=new Map;this.s=new Map;this.da=new Map;this.m=!1}r=uq.prototype;r.configure=function(a){this.h=a};
677
- r.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.m=b.isLowLatencyMode(),u(f,xq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,yq(c,d.data,a),3);e=c.ia;0<e&&c.C.P(e);return f["return"](c.I)})};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.i=null;this.va.clear();this.I=null;this.g.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
678
- r.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.l==wq)return h["return"]();b=[];c=Array.from(a.g.values());return c.length?u(h,zq(a,c[0]),2):h.A(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(zq(a,c[d]));return u(h,Promise.all(b),4)}Aq(a);e=c.some(function(k){return 0==k.ye});e||(f=Bq,Cq(a,f.Ve),g=c.map(function(k){return k.lc}),a.j.Ia(Math.min.apply(Math,ia(g))),a.i.updateDuration());A(h)})};
679
- function zq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return c=b.We,d=new Nb(c),a.m&&b.af&&Qb(d,new Sb("_HLS_skip=YES")),u(v,xq(a,d.toString()),2);e=v.h;f=nq(a.ca,e.data,e.uri);if(1!=f.type)throw new N(2,4,4017);g=dq(f.g,"EXT-X-DEFINE");h=Dq(a,g);k=b.stream;l=Eq(a,f,k.type,b.mc,h);a.G.push(l);k.segmentIndex.Fb(l,a.j.Pa());l.length&&(m=gq(f.g),n=b.mc.get(m),k.segmentIndex.eb(n));p=l[l.length-1];if(q=fq(f.g,"EXT-X-ENDLIST"))b.ye=!0,b.lc=p.endTime;A(v)})}r.onExpirationUpdated=function(){};
680
- function Fq(a){if(!a.T){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.mc),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.O=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.O-c.get(d),e.J.splice(0,f),(e=e.J[0]||null)&&Gq(d,-e.startTime);a.T=!0}}}
681
- function Hq(a){if(!a.T){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.cd,"Expect AV sync issues!"):Gq(d,e.g-b-e.startTime))}a.T=!0}}}
682
- function Gq(a,b){a.stream.segmentIndex.offset(b);a.lc+=b;for(var c=t(a.mc),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.mc.set(d,e+b)}}
683
- function yq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca,Da,Ga,Ha,Fc,Tb,qd,rd,sb,sd,Gc,Hc;return K(function(Ra){switch(Ra.g){case 1:d=nq(a.ca,b,a.M);e=dq(d.g,"EXT-X-DEFINE");Iq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.h.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],I=ad(G),J=new Map,u(Ra,Jq(a,d,c,c,I,H,"",!0,"Media Playlist",null,J,null,!1,!1,E),8);k=dq(d.g,"EXT-X-MEDIA");l=dq(d.g,"EXT-X-STREAM-INF");m=dq(d.g,"EXT-X-IMAGE-STREAM-INF");Kq(a,l);n=
684
- dq(d.g,"EXT-X-SESSION-DATA");p=t(n);for(q=p.next();!q.done;q=p.next())if(v=q.value,y=Z(v,"DATA-ID"),x=Z(v,"URI"),w=Z(v,"LANGUAGE"),D=Z(v,"VALUE"),z=(new Map).set("id",y),x&&z.set("uri",hq(a.M,x)),w&&z.set("language",w),D&&z.set("value",D),B=new R("sessiondata",z),a.i)a.i.onEvent(B);return u(Ra,Lq(a,k),4);case 4:return Mq(a,k),u(Ra,Nq(a,l),5);case 5:return f=Ra.h,u(Ra,Oq(a,k),6);case 6:return g=Ra.h,u(Ra,Pq(a,m),7);case 7:h=Ra.h;Ra.A(3);break;case 8:L=Ra.h,a.g.set(c,L),f.push({id:0,language:"und",
685
- disabledUntilTime:0,primary:!0,audio:"audio"==H?L.stream:null,video:"video"==H?L.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new N(2,7,7001);a.h.hls.ignoreManifestProgramDateTime?Fq(a):Hq(a);P=Infinity;S=t(a.g.values());for(Y=S.next();!Y.done;Y=S.next())ea=Y.value,"text"!=ea.stream.type&&(P=Math.min(P,ea.lc));a.l!=wq?(a.j=new T(0,a.h.defaultPresentationDelay?a.h.defaultPresentationDelay:a.Y?a.Y:3*a.ea),a.j.wc(!1)):(a.j=new T(null,0),
686
- a.j.wc(!0));if(a.l!=wq)a.ia=a.F,ta=Bq,a.l==ta.Ue&&(Ca=a.j.$c,isNaN(a.h.availabilityWindowOverride)||(Ca=a.h.availabilityWindowOverride),a.j.ce(Ca));else for(a.j.Ia(P),Da=t(a.g.values()),Y=Da.next();!Y.done;Y=Da.next())Ga=Y.value,Ga.stream.segmentIndex.Xa(0,P);a.G=[];Ha=[];Fc=t(f);for(Tb=Fc.next();!Tb.done;Tb=Fc.next())for(qd=Tb.value,rd=t([qd.video,qd.audio]),sb=rd.next();!sb.done;sb=rd.next())(sd=sb.value)&&Ha.push(sd);return u(Ra,Promise.all(Ha.map(function(Jf){return K(function(Kf){return u(Kf,
687
- Jf.createSegmentIndex(),0)})})),9);case 9:Gc=t(Ha);for(sb=Gc.next();!sb.done;sb=Gc.next())Hc=sb.value,a.G.push(Hc.segmentIndex.J);Aq(a);a.j.Gd();a.I={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.I);A(Ra)}})}function Iq(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))}}
688
- function Dq(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 Kq(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=Qq(a,e);if(g){var h=hc(jc,e);a.s.set(g,h);eb(e,h)}f&&(g=gc("audio",e),a.s.set(f,g));d&&(f=gc("video",e),a.s.set(d,f))}}
689
- function Oq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return c=eq(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return K(function(z){if(1==z.g){if(x=a.h.disableText)return z["return"](null);C(z,2);return u(z,Rq(a,y),4)}if(2!=z.g)return w=z.h,z["return"](w.stream);D=F(z);if(a.h.hls.ignoreTextStreamFailures)return z["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=aq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
671
+ function Rp(a,b,c,d,e){var f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=Xf(d,"timescale",cg)||1;d=t(Pf(d,"Event"));for(var k=d.next();!k.done;k=d.next()){k=k.value;var l=Xf(k,"presentationTime",cg)||0,m=Xf(k,"duration",cg)||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))}}
672
+ function Xp(a,b,c,d){var e,f,g,h,k;return K(function(l){if(1==l.g)return e=lf,f=Jj(b,c,d,a.g.retryParameters),g=a.h.networkingEngine,h=g.request(e,f),$e(a.o,h),u(l,h.promise,2);k=l.h;return l["return"](k.data)})}function Vp(a,b){return cd(Xc(a,b))?jc:a.split("/")[0]}M("shaka.dash.DashParser",Hp);Yg.mpd=function(){return new Hp};Wg["application/dash+xml"]=function(){return new Hp};Wg["video/vnd.mpeg.dash.mpd"]=function(){return new Hp};function $p(a,b,c,d){this.h=a;this.type=b;this.g=c;this.segments=d||null}function aq(a,b,c,d){this.id=a;this.name=b;this.g=c;this.value=void 0===d?null:d}aq.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};
673
+ aq.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 bq(a,b){var c=a.getAttribute(b);if(!c)throw new N(2,4,4023,b);return c.value}function cq(a,b,c){c=void 0===c?[]:c;this.g=b;this.i=a;this.h=c}function dq(a,b){this.name=a;this.value=b};function eq(a,b){return a.filter(function(c){return c.name==b})}function fq(a,b){return a.filter(function(c){return bq(c,"TYPE")==b})}function gq(a,b){var c=eq(a,b);return c.length?c[0]:null}function hq(a){var b=0;b=void 0===b?0:b;return(a=gq(a,"EXT-X-MEDIA-SEQUENCE"))?Number(a.value):b}function iq(a,b){return ec([a],[b])[0]};function jq(a){this.h=a;this.g=0}function kq(a){lq(a,/[ \t]+/gm)}function lq(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 mq(a){return a.g==a.h.length?null:(a=lq(a,/[^ \t\n]*/gm))?a[0]:null};function nq(){this.g=0}
674
+ function oq(a,b,c){b=Bc(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=pq(a,g),--a.g,qq.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=pq(a,h);if(rq.includes(h.name)){if(1!=b)throw new N(2,4,4017);
675
+ 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=pq(a,m),qq.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=iq(d,m.trim()),h&&g.push(h),e.push(new cq(m,g,k)),g=[],k=[]);k.length&&(h&&g.push(h),e.push(new cq("",g,k)));return new $p(c,b,f,e)}f.push(h);
676
+ "EXT-X-STREAM-INF"==h.name&&(h.g.push(new dq("URI",k)),e=!0)}}return new $p(c,b,f)}function pq(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 jq(f);var h;(h=lq(f,/^([^,=]+)(?:,|$)/g))&&(g=h[1]);for(var k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=lq(f,k);)d.push(new dq(h[1],h[2]||h[3])),kq(f)}return new aq(c,e,d,g)}
677
+ var qq="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(" "),rq="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function sq(){}function tq(a){try{var b=uq(a);return Qe({uri:a,Ge:a,data:b.data,headers:{"content-type":b.contentType}})}catch(c){return Oe(c)}}function uq(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=Nc(a):e=Ic(a);return{data:e,contentType:c}}
678
+ M("shaka.net.DataUriPlugin",sq);sq.parse=tq;bf("data",tq);function vq(){var a=this;this.g=this.i=null;this.Ka=1;this.o=new Map;this.u=new Map;this.va=new Set;this.h=new Map;this.j=null;this.M="";this.ca=new nq;this.ia=0;this.T=!1;this.O=null;this.B=new O(function(){wq(a)});this.l=xq;this.I=null;this.ea=0;this.F=Infinity;this.Y=this.ha=0;this.D=new Ze;this.G=[];this.L=new Map;this.s=new Map;this.da=new Map;this.m=!1}r=vq.prototype;r.configure=function(a){this.g=a};
679
+ r.start=function(a,b){var c=this,d,e;return K(function(f){if(1==f.g)return c.i=b,c.m=b.isLowLatencyMode(),u(f,yq(c,a),2);if(3!=f.g)return d=f.h,c.M=d.uri,u(f,zq(c,d.data,a),3);e=c.ia;0<e&&c.B.P(e);return f["return"](c.I)})};r.stop=function(){this.B&&(this.B.stop(),this.B=null);var a=[];this.D&&(a.push(this.D.destroy()),this.D=null);this.g=this.i=null;this.va.clear();this.I=null;this.h.clear();this.u.clear();this.s.clear();this.o.clear();return Promise.all(a)};
680
+ r.update=function(){var a=this,b,c,d,e,f,g;return K(function(h){if(1==h.g){if(a.l==xq)return h["return"]();b=[];c=Array.from(a.h.values());return c.length?u(h,Aq(a,c[0]),2):h.A(2)}if(4!=h.g){for(d=1;d<c.length;d++)b.push(Aq(a,c[d]));return u(h,Promise.all(b),4)}Bq(a);e=c.some(function(k){return 0==k.ze});e||(f=Cq,Dq(a,f.We),g=c.map(function(k){return k.lc}),a.j.Ia(Math.min.apply(Math,ia(g))),a.i.updateDuration());A(h)})};
681
+ function Aq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return c=b.Xe,d=new Nb(c),a.m&&b.bf&&Qb(d,new Sb("_HLS_skip=YES")),u(v,yq(a,d.toString()),2);e=v.h;f=oq(a.ca,e.data,e.uri);if(1!=f.type)throw new N(2,4,4017);g=eq(f.g,"EXT-X-DEFINE");h=Eq(a,g);k=b.stream;l=Fq(a,f,k.type,b.mc,h);a.G.push(l);k.segmentIndex.Fb(l,a.j.Oa());l.length&&(m=hq(f.g),n=b.mc.get(m),k.segmentIndex.eb(n));p=l[l.length-1];if(q=gq(f.g,"EXT-X-ENDLIST"))b.ze=!0,b.lc=p.endTime;A(v)})}r.onExpirationUpdated=function(){};
682
+ function Gq(a){if(!a.T){for(var b=-1,c=new Map,d=t(a.h.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.mc),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.O=b;b=t(a.h.values());for(e=b.next();!e.done;e=b.next())if(d=e.value,e=d.stream.segmentIndex)f=a.O-c.get(d),e.J.splice(0,f),(e=e.J[0]||null)&&Hq(d,-e.startTime);a.T=!0}}}
683
+ function Iq(a){if(!a.T){for(var b=Infinity,c=t(a.h.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.h.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.cd,"Expect AV sync issues!"):Hq(d,e.g-b-e.startTime))}a.T=!0}}}
684
+ function Hq(a,b){a.stream.segmentIndex.offset(b);a.lc+=b;for(var c=t(a.mc),d=c.next();!d.done;d=c.next()){var e=t(d.value);d=e.next().value;e=e.next().value;a.mc.set(d,e+b)}}
685
+ function zq(a,b,c){var d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca,Da,Ga,Ha,Ec,Ub,qd,rd,sb,sd,Fc,Gc;return K(function(Ra){switch(Ra.g){case 1:d=oq(a.ca,b,a.M);e=eq(d.g,"EXT-X-DEFINE");Jq(a,e);f=[];g=[];h=[];if(1==d.type)return G=a.g.hls.mediaPlaylistFullMimeType,E=G.split(";")[0],H=E.split("/")[0],I=ad(G),J=new Map,u(Ra,Kq(a,d,c,c,I,H,"",!0,"Media Playlist",null,J,null,!1,!1,E),8);k=eq(d.g,"EXT-X-MEDIA");l=eq(d.g,"EXT-X-STREAM-INF");m=eq(d.g,"EXT-X-IMAGE-STREAM-INF");Lq(a,l);n=
686
+ eq(d.g,"EXT-X-SESSION-DATA");p=t(n);for(q=p.next();!q.done;q=p.next())if(v=q.value,y=Z(v,"DATA-ID"),x=Z(v,"URI"),w=Z(v,"LANGUAGE"),D=Z(v,"VALUE"),z=(new Map).set("id",y),x&&z.set("uri",iq(a.M,x)),w&&z.set("language",w),D&&z.set("value",D),B=new R("sessiondata",z),a.i)a.i.onEvent(B);return u(Ra,Mq(a,k),4);case 4:return Nq(a,k),u(Ra,Oq(a,l),5);case 5:return f=Ra.h,u(Ra,Pq(a,k),6);case 6:return g=Ra.h,u(Ra,Qq(a,m),7);case 7:h=Ra.h;Ra.A(3);break;case 8:L=Ra.h,a.h.set(c,L),f.push({id:0,language:"und",
687
+ disabledUntilTime:0,primary:!0,audio:"audio"==H?L.stream:null,video:"video"==H?L.stream:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!a.i)throw new N(2,7,7001);a.g.hls.ignoreManifestProgramDateTime?Gq(a):Iq(a);P=Infinity;S=t(a.h.values());for(Y=S.next();!Y.done;Y=S.next())ea=Y.value,"text"!=ea.stream.type&&(P=Math.min(P,ea.lc));a.l!=xq?(a.j=new T(0,a.g.defaultPresentationDelay?a.g.defaultPresentationDelay:a.Y?a.Y:3*a.ea),a.j.wc(!1)):(a.j=new T(null,0),
688
+ a.j.wc(!0));if(a.l!=xq)a.ia=a.F,ta=Cq,a.l==ta.Ve&&(Ca=a.j.$c,isNaN(a.g.availabilityWindowOverride)||(Ca=a.g.availabilityWindowOverride),a.j.de(Ca));else for(a.j.Ia(P),Da=t(a.h.values()),Y=Da.next();!Y.done;Y=Da.next())Ga=Y.value,Ga.stream.segmentIndex.Xa(0,P);a.G=[];Ha=[];Ec=t(f);for(Ub=Ec.next();!Ub.done;Ub=Ec.next())for(qd=Ub.value,rd=t([qd.video,qd.audio]),sb=rd.next();!sb.done;sb=rd.next())(sd=sb.value)&&Ha.push(sd);return u(Ra,Promise.all(Ha.map(function(Kf){return K(function(Lf){return u(Lf,
689
+ Kf.createSegmentIndex(),0)})})),9);case 9:Fc=t(Ha);for(sb=Fc.next();!sb.done;sb=Fc.next())Gc=sb.value,a.G.push(Gc.segmentIndex.J);Bq(a);a.j.Hd();a.I={presentationTimeline:a.j,variants:f,textStreams:g,imageStreams:h,offlineSessionIds:[],minBufferTime:0,sequenceMode:!0};a.i.makeTextStreamsForClosedCaptions(a.I);A(Ra)}})}function Jq(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))}}
690
+ function Eq(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}
691
+ function Lq(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=Rq(a,e);if(g){var h=hc(jc,e);a.s.set(g,h);eb(e,h)}f&&(g=hc("audio",e),g||(g=a.g.hls.defaultAudioCodec),a.s.set(f,g));d&&(f=hc("video",e),f||(f=a.g.hls.defaultVideoCodec),a.s.set(d,f))}}
692
+ function Pq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return c=fq(b,"SUBTITLES"),d=c.map(function(y){var x,w,D;return K(function(z){if(1==z.g){if(x=a.g.disableText)return z["return"](null);C(z,2);return u(z,Sq(a,y),4)}if(2!=z.g)return w=z.h,z["return"](w.stream);D=F(z);if(a.g.hls.ignoreTextStreamFailures)return z["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=bq(h,"GROUP-ID"),l=a.s.get(k))if(m=a.u.get(k))for(n=
690
693
  t(m),p=n.next();!p.done;p=n.next())q=p.value,q.stream.codecs=l;return v["return"](e.filter(function(y){return y}))})}
691
- function Pq(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);C(l,2);return u(l,Sq(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}))})}
692
- function Lq(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 Rq(a,e)});return u(d,Promise.all(c),0)})}
693
- function Nq(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,n,p,q,v;return K(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(aq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,Tq(a,g),2);v=y.h;for(var x=y["return"],w=v.audio,D=v.video,z=t(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||void 0,
694
- B.frameRate=Number(h)||void 0,B.hdr=q||void 0;z=a.h.disableAudio;if(!w.length||z)w=[null];z=a.h.disableVideo;if(!D.length||z)D=[null];z=[];w=t(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var G=t(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=B?B.stream:null;var I=H?H.stream:null,J=B?B.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.cd:"")+" - "+(B?B.cd:"");E&&I&&J.length&&L.length&&!(0<Sg(J,L).length)||a.va.has(H)||(E={id:a.La++,language:E?E.language:"und",primary:!!E&&E.primary||
694
+ function Qq(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.g.disableThumbnails)return l["return"](null);C(l,2);return u(l,Tq(a,f),4)}if(2!=l.g)return h=l.h,l["return"](h.stream);k=F(l);if(a.g.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}))})}
695
+ function Mq(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 Sq(a,e)});return u(d,Promise.all(c),0)})}
696
+ function Oq(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,n,p,q,v;return K(function(y){if(1==y.g)return h=Z(g,"FRAME-RATE"),k=Number(Z(g,"AVERAGE-BANDWIDTH"))||Number(bq(g,"BANDWIDTH")),l=Z(g,"RESOLUTION"),m=t(l?l.split("x"):[null,null]),n=m.next().value,p=m.next().value,q=Z(g,"VIDEO-RANGE"),u(y,Uq(a,g),2);v=y.h;for(var x=y["return"],w=v.audio,D=v.video,z=t(D),B=z.next();!B.done;B=z.next())if(B=B.value.stream)B.width=Number(n)||void 0,B.height=Number(p)||void 0,
697
+ B.frameRate=Number(h)||void 0,B.hdr=q||void 0;z=a.g.disableAudio;if(!w.length||z)w=[null];z=a.g.disableVideo;if(!D.length||z)D=[null];z=[];w=t(w);for(B=w.next();!B.done;B=w.next()){B=B.value;for(var G=t(D),E=G.next();!E.done;E=G.next()){var H=E.value;E=B?B.stream:null;var I=H?H.stream:null,J=B?B.stream.drmInfos:null,L=H?H.stream.drmInfos:null;H=(H?H.cd:"")+" - "+(B?B.cd:"");E&&I&&J.length&&L.length&&!(0<Sg(J,L).length)||a.va.has(H)||(E={id:a.Ka++,language:E?E.language:"und",primary:!!E&&E.primary||
695
698
  !!I&&I.primary,audio:E,video:I,bandwidth:k,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},z.push(E),a.va.add(H))}}return x.call(y,z)})}),u(f,Promise.all(c),2);d=f.h;e=d.reduce(bc,[]);e=e.filter(function(g){return null!=g});return f["return"](e)})}
696
- function Tq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g)return c=kc,d=Qq(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,n=aq(b,"URI"),p=k.audio.find(function(w){return w&&w.cd==n}),q=hc(c.ra,d),(v=hc(c.cb,d))&&!q?l=c.cb:!h.length&&v&&q?(l=c.ra,d=[[q,v].join()]):k.audio.length&&p?(l=c.cb,m=!0):l=k.video.length?c.cb:c.ra,m?x.A(2):u(x,Uq(a,b,d,l),3);2!=x.g&&(y=x.h,k[y.stream.type]=[y]);Vq(k);return x["return"](k)})}
697
- function Qq(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=$c(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Wq(a){a=Z(a,"LANGUAGE")||"und";return Q(a)}
698
- function Vq(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 Mq(a,b){var c=eq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Wq(e);var f=aq(e,"GROUP-ID");e=aq(e,"INSTREAM-ID");a.L.get(f)||a.L.set(f,new Map);a.L.get(f).set(e,d)}}
699
- function Rq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g){c=aq(b,"GROUP-ID");d="";var w=aq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=jc);e=w;e!=jc&&c&&a.s.has(c)&&(d=a.s.get(c));f=Xq(aq(b,"URI"),a.o);if(a.g.has(f))return x["return"](a.g.get(f));g=Wq(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;n=w;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
700
- v="YES"==q;return u(x,Yq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.u.has(c)?a.u.get(c).push(y):a.u.set(c,[y]);if(a.g.has(f))return x["return"](a.g.get(f));a.g.set(f,y);return x["return"](y)})}
701
- function Sq(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(p){if(1==p.g){c=Xq(aq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.g.has(c))return p["return"](a.g.get(c));e=Wq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,Yq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(a.g.has(c))return p["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=Number(k.split("x")[1])*Number(m.split("x")[1]);
702
- if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.g.set(c,h);return p["return"](h)})}function Uq(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=Xq(aq(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.L.get(l):null;g=gc(d,c);return u(k,Yq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.g.has(e))return k["return"](a.g.get(e));a.g.set(e,h);return k["return"](h)})}
703
- function Yq(a,b,c,d,e,f,g,h,k,l,m,n){var p,q,v;return K(function(y){if(1==y.g)return p=hq(a.M,b),u(y,xq(a,p),2);q=y.h;p=q.uri;v=nq(a.ca,q.data,p);return y["return"](Jq(a,v,b,p,c,d,e,f,g,h,k,l,m,n))})}
704
- function Jq(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){var y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca,Da,Ga,Ha,Fc,Tb,qd,rd,sb,sd,Gc,Hc,Ra,Jf,Kf,kn;return K(function(ud){if(1==ud.g){if(1!=b.type)throw new N(2,4,4017);y=dq(b.g,"EXT-X-DEFINE");x=Dq(a,y);Zq(a,b);return v?ud.A(2):u(ud,$q(a,f,e,b,x),3)}2!=ud.g&&(v=ud.h);w=[];if(b.segments)for(D=t(b.segments),z=D.next();!z.done;z=D.next())B=z.value,G=dq(B.g,"EXT-X-KEY"),w.push.apply(w,ia(G));H=E=!1;I=[];J=new Set;L=t(w);for(P=L.next();!P.done;P=L.next())if(S=P.value,Y=
705
- aq(S,"METHOD"),"NONE"!=Y)if(E=!0,"AES-128"==Y)H=!0;else if(ea=aq(S,"KEYFORMAT"),Ca=(ta=ar[ea])?ta(S,v):null){if(Ca.keyIds)for(Da=t(Ca.keyIds),Ga=Da.next();!Ga.done;Ga=Da.next())Ha=Ga.value,J.add(Ha);I.push(Ca)}if(E&&!I.length&&!H)throw new N(2,4,4026);Vi.includes(v)&&(e="");Fc=new Map;Tb=Eq(a,b,f,Fc,x);qd=Tb[Tb.length-1].endTime;rd=new rj(Tb);sb=f==jc?"subtitle":void 0;sd=[];if(n)for(Gc=t(n.split(",")),Hc=Gc.next();!Hc.done;Hc=Gc.next())Ra=Hc.value,sd.push(Ra);Kf=(Jf=fq(b.g,"EXT-X-SERVER-CONTROL"))?
706
- null!=Jf.getAttribute("CAN-SKIP-UNTIL"):!1;kn={id:a.La++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:rd,mimeType:v,codecs:e,kind:sb,encrypted:E,drmInfos:I,keyIds:J,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:sd,forced:p,channelsCount:l,audioSamplingRate:null,spatialAudio:q,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return ud["return"]({stream:kn,
707
- cd:c,We:d,lc:qd,mc:Fc,af:Kf,ye:!1})})}
708
- function br(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new N(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Oc(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=gq(c.g);b=hq(c.h,aq(b,"URI"));var g=ef([b],a.h.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l;return K(function(m){if(1==m.g)return u(m,cr(a,g,6),2);if(3!=m.g){k=
699
+ function Uq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g)return c=kc,d=Rq(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,n=bq(b,"URI"),p=k.audio.find(function(w){return w&&w.cd==n}),q=hc(c.ra,d),(v=hc(c.cb,d))&&!q?l=c.cb:!h.length&&v&&q?(l=c.ra,d=[[q,v].join()]):k.audio.length&&p?(l=c.cb,m=!0):l=k.video.length?c.cb:c.ra,m?x.A(2):u(x,Vq(a,b,d,l),3);2!=x.g&&(y=x.h,k[y.stream.type]=[y]);Wq(k);return x["return"](k)})}
700
+ function Rq(a,b){var c=[];a.g.disableVideo||c.push(a.g.hls.defaultVideoCodec);a.g.disableAudio||c.push(a.g.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=$c(f)[0];c.has(g)||(e.push(f),c.add(g))}return e}function Xq(a){a=Z(a,"LANGUAGE")||"und";return Q(a)}
701
+ function Wq(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 Nq(a,b){var c=fq(b,"CLOSED-CAPTIONS");c=t(c);for(var d=c.next();!d.done;d=c.next()){var e=d.value;d=Xq(e);var f=bq(e,"GROUP-ID");e=bq(e,"INSTREAM-ID");a.L.get(f)||a.L.set(f,new Map);a.L.get(f).set(e,d)}}
702
+ function Sq(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y;return K(function(x){if(1==x.g){c=bq(b,"GROUP-ID");d="";var w=bq(b,"TYPE").toLowerCase();"subtitles"==w&&(w=jc);e=w;e!=jc&&c&&a.s.has(c)&&(d=a.s.get(c));f=Yq(bq(b,"URI"),a.o);if(a.h.has(f))return x["return"](a.h.get(f));g=Xq(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;n=w;p=Z(b,"CHARACTERISTICS");q=Z(b,"FORCED");
703
+ v="YES"==q;return u(x,Zq(a,f,d,e,g,l,h,m,null,p,v,n),2)}y=x.h;a.u.has(c)?a.u.get(c).push(y):a.u.set(c,[y]);if(a.h.has(f))return x["return"](a.h.get(f));a.h.set(f,y);return x["return"](y)})}
704
+ function Tq(a,b){var c,d,e,f,g,h,k,l,m,n;return K(function(p){if(1==p.g){c=Yq(bq(b,"URI"),a.o);d=Z(b,"CODECS","jpeg")||"";if(a.h.has(c))return p["return"](a.h.get(c));e=Xq(b);f=Z(b,"NAME");g=Z(b,"CHARACTERISTICS");return u(p,Zq(a,c,d,"image",e,!1,f,null,null,g,!1,!1),2)}h=p.h;if(a.h.has(c))return p["return"](a.h.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=Number(k.split("x")[1])*Number(m.split("x")[1]);
705
+ if(n=Z(b,"BANDWIDTH"))h.stream.bandwidth=Number(n);a.h.set(c,h);return p["return"](h)})}function Vq(a,b,c,d){var e,f,g,h;return K(function(k){if(1==k.g){e=Yq(bq(b,"URI"),a.o);if(a.h.has(e))return k["return"](a.h.get(e));var l=Z(b,"CLOSED-CAPTIONS");f="video"==d&&l&&"NONE"!=l?a.L.get(l):null;g=gc(d,c);return u(k,Zq(a,e,g,d,"und",!1,null,null,f,null,!1,!1),2)}h=k.h;if(a.h.has(e))return k["return"](a.h.get(e));a.h.set(e,h);return k["return"](h)})}
706
+ function Zq(a,b,c,d,e,f,g,h,k,l,m,n){var p,q,v;return K(function(y){if(1==y.g)return p=iq(a.M,b),u(y,yq(a,p),2);q=y.h;p=q.uri;v=oq(a.ca,q.data,p);return y["return"](Kq(a,v,b,p,c,d,e,f,g,h,k,l,m,n))})}
707
+ function Kq(a,b,c,d,e,f,g,h,k,l,m,n,p,q,v){var y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea,ta,Ca,Da,Ga,Ha,Ec,Ub,qd,rd,sb,sd,Fc,Gc,Ra,Kf,Lf,ln;return K(function(ud){if(1==ud.g){if(1!=b.type)throw new N(2,4,4017);y=eq(b.g,"EXT-X-DEFINE");x=Eq(a,y);$q(a,b);return v?ud.A(2):u(ud,ar(a,f,e,b,x),3)}2!=ud.g&&(v=ud.h);w=[];if(b.segments)for(D=t(b.segments),z=D.next();!z.done;z=D.next())B=z.value,G=eq(B.g,"EXT-X-KEY"),w.push.apply(w,ia(G));H=E=!1;I=[];J=new Set;L=t(w);for(P=L.next();!P.done;P=L.next())if(S=P.value,Y=
708
+ bq(S,"METHOD"),"NONE"!=Y)if(E=!0,"AES-128"==Y)H=!0;else if(ea=bq(S,"KEYFORMAT"),Ca=(ta=br[ea])?ta(S,v):null){if(Ca.keyIds)for(Da=t(Ca.keyIds),Ga=Da.next();!Ga.done;Ga=Da.next())Ha=Ga.value,J.add(Ha);I.push(Ca)}if(E&&!I.length&&!H)throw new N(2,4,4026);Vi.includes(v)&&(e="");Ec=new Map;Ub=Fq(a,b,f,Ec,x);qd=Ub[Ub.length-1].endTime;rd=new rj(Ub);sb=f==jc?"subtitle":void 0;sd=[];if(n)for(Fc=t(n.split(",")),Gc=Fc.next();!Gc.done;Gc=Fc.next())Ra=Gc.value,sd.push(Ra);Lf=(Kf=gq(b.g,"EXT-X-SERVER-CONTROL"))?
709
+ null!=Kf.getAttribute("CAN-SKIP-UNTIL"):!1;ln={id:a.Ka++,originalId:k,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:rd,mimeType:v,codecs:e,kind:sb,encrypted:E,drmInfos:I,keyIds:J,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:sd,forced:p,channelsCount:l,audioSamplingRate:null,spatialAudio:q,closedCaptions:m,hdr:void 0,tilesLayout:void 0};return ud["return"]({stream:ln,
710
+ cd:c,Xe:d,lc:qd,mc:Ec,bf:Lf,ze:!1})})}
711
+ function cr(a,b,c){if(!window.crypto||!window.crypto.subtle)throw Va("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new N(2,4,4042);var d=0,e=Z(b,"IV","");if(e){var f=Oc(e.substr(2));if(16!=f.byteLength)throw new N(2,4,4043);}else d=hq(c.g);b=iq(c.h,bq(b,"URI"));var g=ef([b],a.g.retryParameters),h={method:"AES-128",iv:f,firstMediaSequenceNumber:d,fetchKey:function(){var k,l;return K(function(m){if(1==m.g)return u(m,dr(a,g,6),2);if(3!=m.g){k=
709
712
  m.h;if(!k.data||16!=k.data.byteLength)throw new N(2,4,4044);l=h;return u(m,window.crypto.subtle.importKey("raw",k.data,"AES-CBC",!0,["decrypt"]),3)}l.cryptoKey=m.h;h.fetchKey=void 0;A(m)})}};return h}
710
- function Zq(a,b){var c=fq(b.g,"EXT-X-PLAYLIST-TYPE"),d=fq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Cq(a,wq);else{c?Cq(a,dr):Cq(a,er);d=fq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=fq(b.g,"EXT-X-PART-INF");a.m&&c?(a.ha=Number(aq(c,"PART-TARGET")),a.F=Math.min(a.ha,a.F),c=fq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(aq(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ea=Math.max(d,a.ea)}}
711
- function fr(a,b,c,d){c=fq(c,"EXT-X-MAP");if(!c)return null;var e=aq(c,"URI");d=Xq(hq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.da.has(b)||(c=gr(d,c),a.da.set(b,c));return a.da.get(b)}function gr(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 mi(function(){return[a]},c,d)}
712
- function hr(a,b,c,d,e,f,g,h,k){var l=d.g,m=Xq(d.i,f),n=fq(l,"EXTINF"),p=f=0,q=null;d.h.length&&!a.m&&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 v=null;if(!a.h.hls.ignoreManifestProgramDateTime){var y=fq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=Yf(y.value))}y=pi;fq(l,"EXT-X-GAP")&&(y=2);if(!n){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
713
- if(!a.m)return null}var x=[];if(a.m)for(var w={},D=0;D<d.h.length;w={md:w.md},D++){var z=d.h[D],B=0==D?c:x[x.length-1],G=0==D?e:B.endTime,E=Number(Z(z,"DURATION"))||a.ha;if(E){E=G+E;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=Z(z,"BYTERANGE-START"))?Number(H):0:(H=Z(z,"BYTERANGE"),I=t(ir(B,H)),H=I.next().value,I=I.next().value);if(B=Z(z,"URI"))w.md=hq(g,B),B=pi,"YES"==Z(z,"GAP")&&(B=2),x.push(new oi(G,E,function(J){return function(){return[J.md]}}(w),H,I,b,0,0,Infinity,[],"",null,null,B))}}n?
714
- f=e+Number(n.value.split(",")[0]):f=x[x.length-1].endTime;(a=fq(l,"EXT-X-BYTERANGE"))?(q=t(ir(c,a.value)),p=q.next().value,q=q.next().value):x.length&&(p=x[0].Ca,q=x[x.length-1].la);c="";a=null;"image"==h&&(c="1x1",h=fq(l,"EXT-X-TILES"))&&(c=aq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new oi(e,f,function(){return m.length?[m]:[]},p,q,b,0,0,Infinity,x,c,a,v,y,k)}function ir(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]}
715
- function Aq(a){if(a.j){for(var b=t(a.G),c=b.next();!c.done;c=b.next())a.j.Gb(c.value);a.G=[]}}
716
- function Eq(a,b,c,d,e){var f=b.segments,g=void 0,h=gq(b.g),k=fq(b.g,"EXT-X-SKIP");k=k?Number(Z(k,"SKIPPED-SEGMENTS")):0;var l=h+k,m=0;a.l!=wq&&d.has(l)&&(m=d.get(l));for(var n=[],p=null,q=0;q<f.length;q++){var v=f[q],y=0==q?m:p.endTime;l=h+k+q;var x=t(v.g);for(var w=x.next();!w.done;w=x.next())w=w.value,"EXT-X-KEY"==w.name&&"AES-128"==aq(w,"METHOD")&&(g=br(a,w,b));d.set(l,y);x=fr(a,b.h,v.g,e);!a.m&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.m=a.i.isLowLatencyMode());(p=v=hr(a,x,p,v,
717
- y,e,b.h,c,g))&&(a.h.hls.ignoreManifestProgramDateTime&&null!=a.O&&l<a.O||n.push(v))}if(a=n.some(function(D){return null!=D.g}))for(b={},c=0;c<n.length;b={Pb:b.Pb,Ob:b.Ob,yc:b.yc,Ta:b.Ta,Nb:b.Nb},c++)if(b.Ta=n[c],null==b.Ta.g)for(b.Ob=0,b.Pb=c,d=function(D){return function(){var z=n[D.Pb];if(z){if(null!=z.g)return z.g+D.Ob;D.Ob-=z.endTime-z.startTime;D.Pb+=1}return null}}(b),b.Nb=0,b.yc=c,e=function(D){return function(){var z=n[D.yc];if(z){z!=D.Ta&&(D.Nb+=z.endTime-z.startTime);if(null!=z.g)return z.g+
718
- D.Nb;--D.yc}return null}}(b);null==b.Ta.g;)b.Ta.g=e(),null==b.Ta.g&&(b.Ta.g=d());if(a)for(a=t(n),b=a.next();!b.done;b=a.next())for(c=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 n}function Xq(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}
719
- function $q(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){if(1==w.g){f=kc;g=lf;h=Math.trunc((d.segments.length-1)/2);k=Xq(d.segments[h].i,e);l=new Nb(k);m=l.ua.split(".").pop();n=jr[b];if((p=n[m])||(p=kr[m]))return w["return"](p);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.Ub&&(!c||"jpeg"==c))return w["return"]("image/jpeg");q=ef([k],a.h.retryParameters);q.method="HEAD";return u(w,cr(a,q,g),2)}v=w.h;y=v.headers["content-type"];
720
- if(!y){if(b==f.X)return w["return"]("text/vtt");x=n.mp4;return w["return"](x)}return w["return"](y.split(";")[0])})}function xq(a,b){var c=ef([b],a.h.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return cr(a,c,0)}function vq(a){var b,c;K(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return a.l!=wq&&(b=a.ia,a.C.P(b)),va(d,0);c=F(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.C.P(.1);A(d)})}
721
- function Cq(a,b){a.l=b;a.j&&a.j.wc(a.l==wq);a.l!=wq||a.C.stop()}function cr(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);$e(a.D,b);return b.promise}M("shaka.hls.HlsParser",uq);
722
- var kr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},jr={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"},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"},
723
- image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},ar={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new N(2,4,4041);return fc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=aq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=aq(a,"URI");b=tq(b);b=Fb(b.data);b=
724
- fc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=aq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=aq(a,"URI");a=tq(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=Nf(a,b,new Set,0);return fc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},wq="VOD",er="EVENT",dr="LIVE",Bq={Ve:wq,Bg:er,
725
- Ue:dr};sc("Tizen 3")||sc("Tizen 2")||uc()||(Yg.m3u8=function(){return new uq},Wg["application/x-mpegurl"]=function(){return new uq},Wg["application/vnd.apple.mpegurl"]=function(){return new uq});function lr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Fe:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Ec(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function mr(){}function nr(a,b,c,d,e){var f=new or;vf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new pr,h={ne:!1,Re:!1};a=qr(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 Ne(a,function(){h.ne=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Re=!0;g.abort()});k.P(b/1E3);a["finally"](function(){k.stop()})}return a}
726
- function qr(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,z;return K(function(B){switch(B.g){case 1:return h=rr,k=sr,p=n=0,q=Date.now(),C(B,2),u(B,h(a,c),4);case 4:return l=B.h,f(tr(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,I;return K(function(J){switch(J.g){case 1:return C(J,2),u(J,v.read(),4);case 4:H=J.h;va(J,3);break;case 2:return F(J),J["return"]();case 3:if(H.done){J.A(5);break}n+=H.value.byteLength;if(!g){J.A(5);
727
- break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-q||H.done)e(I-q,n-p,x-n),p=n,q=I;H.done?G.close():(G.enqueue(H.value),E());A(J)}})}E()},new k({start:w}),u(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:D=F(B);if(d.ne)throw new N(1,1,7001,a,b);if(d.Re)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return z=tr(l.headers),B["return"](lr(z,m,l.status,a,l.url,b))}})}function tr(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
728
- function ur(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",mr);mr.isSupported=ur;mr.parse=nr;var rr=window.fetch,pr=window.AbortController,sr=window.ReadableStream,or=window.Headers;ur()&&(bf("http",nr,2,!0),bf("https",nr,2,!0),bf("blob",nr,2,!0));function vr(){}
729
- function wr(a,b,c,d,e){var f=new xr,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 n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=yr(f);e(q);n=!0}};f.onload=function(){var q=yr(f),v=f.response;try{var y=lr(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,
713
+ function $q(a,b){var c=gq(b.g,"EXT-X-PLAYLIST-TYPE"),d=gq(b.g,"EXT-X-ENDLIST");d=c&&"VOD"==c.value||d;c=c&&"EVENT"==c.value&&!d;c=!d&&!c;if(d)Dq(a,xq);else{c?Dq(a,er):Dq(a,fr);d=gq(b.g,"EXT-X-TARGETDURATION");if(!d)throw new N(2,4,4024,"EXT-X-TARGETDURATION");d=Number(d.value);c=gq(b.g,"EXT-X-PART-INF");a.m&&c?(a.ha=Number(bq(c,"PART-TARGET")),a.F=Math.min(a.ha,a.F),c=gq(b.g,"EXT-X-SERVER-CONTROL"),a.Y=c?Number(bq(c,"PART-HOLD-BACK")):0):a.F=Math.min(d,a.F);a.ea=Math.max(d,a.ea)}}
714
+ function gr(a,b,c,d){c=gq(c,"EXT-X-MAP");if(!c)return null;var e=bq(c,"URI");d=Yq(iq(b,e),d);b=[d,Z(c,"BYTERANGE","")].join("-");a.da.has(b)||(c=hr(d,c),a.da.set(b,c));return a.da.get(b)}function hr(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 mi(function(){return[a]},c,d)}
715
+ function ir(a,b,c,d,e,f,g,h,k){var l=d.g,m=Yq(d.i,f),n=gq(l,"EXTINF"),p=f=0,q=null;d.h.length&&!a.m&&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 v=null;if(!a.g.hls.ignoreManifestProgramDateTime){var y=gq(l,"EXT-X-PROGRAM-DATE-TIME");y&&y.value&&(v=Yf(y.value))}y=pi;gq(l,"EXT-X-GAP")&&(y=2);if(!n){if(0==d.h.length)throw new N(2,4,4024,"EXTINF");
716
+ if(!a.m)return null}var x=[];if(a.m)for(var w={},D=0;D<d.h.length;w={md:w.md},D++){var z=d.h[D],B=0==D?c:x[x.length-1],G=0==D?e:B.endTime,E=Number(Z(z,"DURATION"))||a.ha;if(E){E=G+E;var H=0,I=null;"EXT-X-PRELOAD-HINT"==z.name?H=(H=Z(z,"BYTERANGE-START"))?Number(H):0:(H=Z(z,"BYTERANGE"),I=t(jr(B,H)),H=I.next().value,I=I.next().value);if(B=Z(z,"URI"))w.md=iq(g,B),B=pi,"YES"==Z(z,"GAP")&&(B=2),x.push(new oi(G,E,function(J){return function(){return[J.md]}}(w),H,I,b,0,0,Infinity,[],"",null,null,B))}}n?
717
+ f=e+Number(n.value.split(",")[0]):f=x[x.length-1].endTime;(a=gq(l,"EXT-X-BYTERANGE"))?(q=t(jr(c,a.value)),p=q.next().value,q=q.next().value):x.length&&(p=x[0].Ba,q=x[x.length-1].la);c="";a=null;"image"==h&&(c="1x1",h=gq(l,"EXT-X-TILES"))&&(c=bq(h,"LAYOUT"),(h=Z(h,"DURATION"))&&(a=Number(h)));return new oi(e,f,function(){return m.length?[m]:[]},p,q,b,0,0,Infinity,x,c,a,v,y,k)}function jr(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]}
718
+ function Bq(a){if(a.j){for(var b=t(a.G),c=b.next();!c.done;c=b.next())a.j.Gb(c.value);a.G=[]}}
719
+ function Fq(a,b,c,d,e){var f=b.segments,g=void 0,h=hq(b.g),k=gq(b.g,"EXT-X-SKIP");k=k?Number(Z(k,"SKIPPED-SEGMENTS")):0;var l=h+k,m=0;a.l!=xq&&d.has(l)&&(m=d.get(l));for(var n=[],p=null,q=0;q<f.length;q++){var v=f[q],y=0==q?m:p.endTime;l=h+k+q;var x=t(v.g);for(var w=x.next();!w.done;w=x.next())w=w.value,"EXT-X-KEY"==w.name&&"AES-128"==bq(w,"METHOD")&&(g=cr(a,w,b));d.set(l,y);x=gr(a,b.h,v.g,e);!a.m&&a.i.isAutoLowLatencyMode()&&(a.i.enableLowLatencyMode(),a.m=a.i.isLowLatencyMode());(p=v=ir(a,x,p,v,
720
+ y,e,b.h,c,g))&&(a.g.hls.ignoreManifestProgramDateTime&&null!=a.O&&l<a.O||n.push(v))}if(a=n.some(function(D){return null!=D.g}))for(b={},c=0;c<n.length;b={Pb:b.Pb,Ob:b.Ob,yc:b.yc,Ta:b.Ta,Nb:b.Nb},c++)if(b.Ta=n[c],null==b.Ta.g)for(b.Ob=0,b.Pb=c,d=function(D){return function(){var z=n[D.Pb];if(z){if(null!=z.g)return z.g+D.Ob;D.Ob-=z.endTime-z.startTime;D.Pb+=1}return null}}(b),b.Nb=0,b.yc=c,e=function(D){return function(){var z=n[D.yc];if(z){z!=D.Ta&&(D.Nb+=z.endTime-z.startTime);if(null!=z.g)return z.g+
721
+ D.Nb;--D.yc}return null}}(b);null==b.Ta.g;)b.Ta.g=e(),null==b.Ta.g&&(b.Ta.g=d());if(a)for(a=t(n),b=a.next();!b.done;b=a.next())for(c=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 n}function Yq(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}
722
+ function ar(a,b,c,d,e){var f,g,h,k,l,m,n,p,q,v,y,x;return K(function(w){if(1==w.g){f=kc;g=lf;h=Math.trunc((d.segments.length-1)/2);k=Yq(d.segments[h].i,e);l=new Nb(k);m=l.ua.split(".").pop();n=kr[b];if((p=n[m])||(p=lr[m]))return w["return"](p);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.Ub&&(!c||"jpeg"==c))return w["return"]("image/jpeg");q=ef([k],a.g.retryParameters);q.method="HEAD";return u(w,dr(a,q,g),2)}v=w.h;y=v.headers["content-type"];
723
+ if(!y){if(b==f.X)return w["return"]("text/vtt");x=n.mp4;return w["return"](x)}return w["return"](y.split(";")[0])})}function yq(a,b){var c=ef([b],a.g.retryParameters);a.i.modifyManifestRequest(c,{format:"h"});return dr(a,c,0)}function wq(a){var b,c;K(function(d){if(1==d.g){if(!a.i)return d["return"]();C(d,2);return u(d,a.update(),4)}if(2!=d.g)return a.l!=xq&&(b=a.ia,a.B.P(b)),va(d,0);c=F(d);if(!a.i)return d["return"]();c.severity=1;a.i.onError(c);a.B.P(.1);A(d)})}
724
+ function Dq(a,b){a.l=b;a.j&&a.j.wc(a.l==xq);a.l!=xq||a.B.stop()}function dr(a,b,c){if(!a.D)throw new N(2,7,7001);b=a.i.networkingEngine.request(c,b);$e(a.D,b);return b.promise}M("shaka.hls.HlsParser",vq);
725
+ var lr={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},kr={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"},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",webvtt:"txt/vtt",
726
+ ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},br={"com.apple.streamingkeydelivery":function(a,b){if("video/mp2t"==b)throw new N(2,4,4040);if(window.shakaMediaKeysPolyfill)throw new N(2,4,4041);return fc("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0)}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(a){var b=bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;b=bq(a,
727
+ "URI");b=uq(b);b=Fb(b.data);b=fc("com.widevine.alpha",[{initDataType:"cenc",initData:b}]);if(a=Z(a,"KEYID"))b.keyIds=new Set([a.toLowerCase().substr(2)]);return b},"com.microsoft.playready":function(a){var b=bq(a,"METHOD");if(!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(b))return null;a=bq(a,"URI");a=uq(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=Nf(a,b,new Set,0);return fc("com.microsoft.playready",[{initDataType:"cenc",initData:a}])}},xq="VOD",fr=
728
+ "EVENT",er="LIVE",Cq={We:xq,Cg:fr,Ve:er};sc("Tizen 3")||sc("Tizen 2")||uc()||(Yg.m3u8=function(){return new vq},Wg["application/x-mpegurl"]=function(){return new vq},Wg["application/vnd.apple.mpegurl"]=function(){return new vq});function mr(a,b,c,d,e,f){if(200<=c&&299>=c&&202!=c)return{uri:e||d,Ge:d,data:b,status:c,headers:a,fromCache:!!a["x-shaka-from-cache"]};e=null;try{e=Hc(b)}catch(g){}throw new N(401==c||403==c?2:1,1,1001,d,c,e,a,f);};function nr(){}function or(a,b,c,d,e){var f=new pr;vf(b.headers).forEach(function(l,m){f.append(m,l)});var g=new qr,h={oe:!1,Se:!1};a=rr(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 Ne(a,function(){h.oe=!0;g.abort();return Promise.resolve()});if(b=b.retryParameters.timeout){var k=new O(function(){h.Se=!0;g.abort()});k.P(b/1E3);a["finally"](function(){k.stop()})}return a}
729
+ function rr(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,v,y,x,w,D,z;return K(function(B){switch(B.g){case 1:return h=sr,k=tr,p=n=0,q=Date.now(),C(B,2),u(B,h(a,c),4);case 4:return l=B.h,f(ur(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,I;return K(function(J){switch(J.g){case 1:return C(J,2),u(J,v.read(),4);case 4:H=J.h;va(J,3);break;case 2:return F(J),J["return"]();case 3:if(H.done){J.A(5);break}n+=H.value.byteLength;if(!g){J.A(5);
730
+ break}return u(J,g(H.value),5);case 5:I=Date.now();if(100<I-q||H.done)e(I-q,n-p,x-n),p=n,q=I;H.done?G.close():(G.enqueue(H.value),E());A(J)}})}E()},new k({start:w}),u(B,l.arrayBuffer(),5);case 5:m=B.h;va(B,3);break;case 2:D=F(B);if(d.oe)throw new N(1,1,7001,a,b);if(d.Se)throw new N(1,1,1003,a,b);throw new N(1,1,1002,a,D,b);case 3:return z=ur(l.headers),B["return"](mr(z,m,l.status,a,l.url,b))}})}function ur(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b}
731
+ function vr(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;return!(!window.fetch||!window.AbortController)}M("shaka.net.HttpFetchPlugin",nr);nr.isSupported=vr;nr.parse=or;var sr=window.fetch,qr=window.AbortController,tr=window.ReadableStream,pr=window.Headers;vr()&&(bf("http",or,2,!0),bf("https",or,2,!0),bf("blob",or,2,!0));function wr(){}
732
+ function xr(a,b,c,d,e){var f=new yr,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 n=!1;f.onreadystatechange=function(){if(2==f.readyState&&!n){var q=zr(f);e(q);n=!0}};f.onload=function(){var q=zr(f),v=f.response;try{var y=mr(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,
730
733
  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 p in b.headers)f.setRequestHeader(p.toLowerCase(),b.headers[p]);f.send(b.body)});return new Ne(k,function(){f.abort();return Promise.resolve()})}
731
- function yr(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",vr);vr.parse=wr;var xr=window.XMLHttpRequest;bf("http",wr,1,!0);bf("https",wr,1,!0);bf("blob",wr,1,!0);function zr(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Ar(a){return a.ya().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ca+":"+a.la}function Br(a,b){return Jj(a.g.ya(),a.g.Ca,a.g.la,b.streaming.retryParameters)};function Cr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Dr(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Cr.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 Er(a){var b=this;this.o=a;this.j=new Map;this.i=new mf(function(){return Fr(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Cr}Er.prototype.destroy=function(){return this.i.destroy()};function Gr(a,b,c){a.m=b;a.l=c}function Fr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
732
- function Hr(a,b,c,d,e,f){nf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return u(v,Ir(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 Mf(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,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 Jr(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
733
- function Ir(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=lf,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 Kr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Kr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);A(b)})};
734
- function Lr(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"]();A(g)})}})}Kr.prototype.store=function(){return this.h};Kr.prototype.promise=function(){return this.g};function Mr(a){this.h=a;this.g=[]}Mr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Nr(a,b){return Or(a,b,"readwrite")}function Or(a,b,c){c=a.h.transaction([b],c);var d=new Kr(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function Pr(a,b,c){this.h=new Mr(a);this.i=b;this.g=c}r=Pr.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Qr(this.i)};r.removeSegments=function(a,b){return Rr(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Sr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.oe(e)}))})};r.addManifests=function(){return Qr(this.g)};
735
- r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function Tr(a,b,c){a=Nr(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=Nr(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 Rr(this,this.g,a,b)};
736
- r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Sr(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.bc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Or(a.h,a.g,"readonly"),c=new Map,u(d,Lr(b,function(e,f){var g;return K(function(h){if(1==h.g)return u(h,a.bc(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.oe=function(a){return a};r.bc=function(a){return Promise.resolve(a)};
737
- function Qr(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=Nr(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Cc:g.Cc},k=h.next())l=k.value,g.Cc=e.add(l),g.Cc.onsuccess=function(n){return function(){f.push(n.Cc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
738
- function Rr(a,b,c,d){a=Nr(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Bc:e.Bc},f=c.next())e.Bc=f.value,b["delete"](e.Bc).onsuccess=function(g){return function(){return d(g.Bc)}}(e);return a.promise()}
739
- function Sr(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Or(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Tb:h.Tb,Rb:h.Rb},l=k.next())h.Rb=l.value,h.Tb=e.get(h.Rb),h.Tb.onsuccess=function(n){return function(){void 0==n.Tb.result&&g.push(n.Rb);f[n.Rb]=n.Tb.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(n){return f[n]}))})};function Ur(a){this.g=new Mr(a)}Ur.prototype.destroy=function(){return this.g.destroy()};Ur.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Or(a.g,"session-ids","readonly"),c=[],u(d,Lr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Ur.prototype.add=function(a){var b=Nr(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()};
740
- Ur.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Nr(b.g,"session-ids"),u(d,Lr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Vr(){this.g=new Map}Vr.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)};Vr.prototype.init=function(){var a=this;Wr.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)};
741
- function Xr(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 Yr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Aa:d,ka:f},e)})})}
742
- function Zr(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 $r(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function as(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()}
743
- function bs(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=Wr,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 cs(a,b){Wr.set(a,b)}M("shaka.offline.StorageMuxer",Vr);Vr.unregister=function(a){Wr["delete"](a)};Vr.register=cs;Vr.prototype.destroy=Vr.prototype.destroy;var Wr=new Map;function ds(){Pr.apply(this,arguments)}pa(ds,Pr);ds.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Nr(c.h,c.g);e=d.store();f=new lc;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)})};
744
- ds.prototype.bc=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=es(a.periods[c],e),b.push(f);return u(h,lp(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})})};
745
- function es(a,b){fs(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return gs(e,a.startTime,b)})}
746
- function gs(a,b,c){var d=a.initSegmentUri?hs(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=hs(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
747
- 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}}ds.prototype.oe=function(a){return{data:a.data}};function hs(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);}
748
- function fs(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++,
749
- 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 is(){Pr.apply(this,arguments)}pa(is,Pr);
750
- is.prototype.bc=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),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(js(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,lp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
734
+ function zr(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",wr);wr.parse=xr;var yr=window.XMLHttpRequest;bf("http",xr,1,!0);bf("https",xr,1,!0);bf("blob",xr,1,!0);function Ar(a,b,c,d){this.g=a;this.i=b;this.groupId=c;this.h=d}function Br(a){return a.ya().map(function(b){return"{"+encodeURI(b)+"}"}).join("")+":"+a.Ba+":"+a.la}function Cr(a,b){return Jj(a.g.ya(),a.g.Ba,a.g.la,b.streaming.retryParameters)};function Dr(){this.h=this.j=this.i=0;this.g=new Map;this.l=0}function Er(a,b){a.i+=b;var c=a.l;a.l++;a.g.set(c,b);return c}Dr.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 Fr(a){var b=this;this.o=a;this.j=new Map;this.i=new mf(function(){return Gr(b)["catch"](function(){})});this.h=[];this.m=function(){};this.l=function(){};this.g=new Dr}Fr.prototype.destroy=function(){return this.i.destroy()};function Hr(a,b,c){a.m=b;a.l=c}function Gr(a){var b=a.h.map(function(c){return c()});a.h=[];return Promise.all(b)}
735
+ function Ir(a,b,c,d,e,f){nf(a.i);var g=(a.j.get(b)||Promise.resolve()).then(function(){var h,k,l,m,n,p,q;return K(function(v){if(1==v.g)return u(v,Jr(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 Mf(k),l.data)n=Number(m),p=l.data[n],q=l.g[n],a.l(p,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 Kr(a){return K(function(b){return 1==b.g?u(b,Promise.all(a.j.values()),2):b["return"](a.g.h)})}
736
+ function Jr(a,b){var c,d,e,f;return K(function(g){if(1==g.g)return c=lf,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 Lr(a,b){var c=this;this.i=a;this.h=a.objectStore(b);this.g=new lc;a.onabort=function(d){d.preventDefault();c.g.reject()};a.onerror=function(d){d.preventDefault();c.g.reject()};a.oncomplete=function(){c.g.resolve()}}Lr.prototype.abort=function(){var a=this;return K(function(b){if(1==b.g){try{a.i.abort()}catch(c){}C(b,2);return u(b,a.g,4)}if(2!=b.g)return va(b,0);F(b);A(b)})};
737
+ function Mr(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"]();A(g)})}})}Lr.prototype.store=function(){return this.h};Lr.prototype.promise=function(){return this.g};function Nr(a){this.h=a;this.g=[]}Nr.prototype.destroy=function(){return Promise.all(this.g.map(function(a){return a.abort()}))};function Or(a,b){return Pr(a,b,"readwrite")}function Pr(a,b,c){c=a.h.transaction([b],c);var d=new Lr(c,b);a.g.push(d);d.promise().then(function(){eb(a.g,d)},function(){eb(a.g,d)});return d};function Qr(a,b,c){this.h=new Nr(a);this.i=b;this.g=c}r=Qr.prototype;r.destroy=function(){return this.h.destroy()};r.hasFixedKeySpace=function(){return!0};r.addSegments=function(){return Rr(this.i)};r.removeSegments=function(a,b){return Sr(this,this.i,a,b)};r.getSegments=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Tr(b,b.i,a),2);c=d.h;return d["return"](c.map(function(e){return b.pe(e)}))})};r.addManifests=function(){return Rr(this.g)};
738
+ r.updateManifest=function(){return Promise.reject(new N(2,9,9016,"Cannot modify values in "+this.g))};function Ur(a,b,c){a=Or(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=Or(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 Sr(this,this.g,a,b)};
739
+ r.getManifests=function(a){var b=this,c;return K(function(d){if(1==d.g)return u(d,Tr(b,b.g,a),2);c=d.h;return d["return"](Promise.all(c.map(function(e){return b.bc(e)})))})};r.getAllManifests=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Pr(a.h,a.g,"readonly"),c=new Map,u(d,Mr(b,function(e,f){var g;return K(function(h){if(1==h.g)return u(h,a.bc(f),2);g=h.h;c.set(e,g);A(h)})}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};r.pe=function(a){return a};r.bc=function(a){return Promise.resolve(a)};
740
+ function Rr(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=Or(c.h,a);e=d.store();f=[];g={};h=t(b);for(k=h.next();!k.done;g={Cc:g.Cc},k=h.next())l=k.value,g.Cc=e.add(l),g.Cc.onsuccess=function(n){return function(){f.push(n.Cc.result)}}(g);return u(m,d.promise(),2)}return m["return"](f)})};
741
+ function Sr(a,b,c,d){a=Or(a.h,b);b=a.store();var e={};c=t(c);for(var f=c.next();!f.done;e={Bc:e.Bc},f=c.next())e.Bc=f.value,b["delete"](e.Bc).onsuccess=function(g){return function(){return d(g.Bc)}}(e);return a.promise()}
742
+ function Tr(a,b,c){var d,e,f,g,h,k,l;return K(function(m){if(1==m.g){d=Pr(a.h,b,"readonly");e=d.store();f={};g=[];h={};k=t(c);for(l=k.next();!l.done;h={Tb:h.Tb,Rb:h.Rb},l=k.next())h.Rb=l.value,h.Tb=e.get(h.Rb),h.Tb.onsuccess=function(n){return function(){void 0==n.Tb.result&&g.push(n.Rb);f[n.Rb]=n.Tb.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(n){return f[n]}))})};function Vr(a){this.g=new Nr(a)}Vr.prototype.destroy=function(){return this.g.destroy()};Vr.prototype.getAll=function(){var a=this,b,c;return K(function(d){return 1==d.g?(b=Pr(a.g,"session-ids","readonly"),c=[],u(d,Mr(b,function(e,f){c.push(f)}),2)):3!=d.g?u(d,b.promise(),3):d["return"](c)})};Vr.prototype.add=function(a){var b=Or(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()};
743
+ Vr.prototype.remove=function(a){var b=this,c;return K(function(d){return 1==d.g?(c=Or(b.g,"session-ids"),u(d,Mr(c,function(e,f,g){a.includes(f.sessionId)&&g["delete"]()}),2)):u(d,c.promise(),0)})};function Wr(){this.g=new Map}Wr.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)};Wr.prototype.init=function(){var a=this;Xr.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)};
744
+ function Yr(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 Zr(a,b){a.g.forEach(function(c,d){c.getCells().forEach(function(e,f){b({Aa:d,ka:f},e)})})}
745
+ function $r(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 as(a,b){a.g.forEach(function(c){b(c.getEmeSessionCell())})}function bs(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()}
746
+ function cs(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=Xr,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 ds(a,b){Xr.set(a,b)}M("shaka.offline.StorageMuxer",Wr);Wr.unregister=function(a){Xr["delete"](a)};Wr.register=ds;Wr.prototype.destroy=Wr.prototype.destroy;var Xr=new Map;function es(){Qr.apply(this,arguments)}pa(es,Qr);es.prototype.updateManifestExpiration=function(a,b){var c=this,d,e,f;return K(function(g){d=Or(c.h,c.g);e=d.store();f=new lc;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)})};
747
+ es.prototype.bc=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=fs(a.periods[c],e),b.push(f);return u(h,mp(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})})};
748
+ function fs(a,b){gs(a);for(var c=t(a.streams),d=c.next();!d.done;d=c.next());return a.streams.map(function(e){return hs(e,a.startTime,b)})}
749
+ function hs(a,b,c){var d=a.initSegmentUri?is(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=is(g.uri);return{startTime:b+g.startTime,endTime:b+g.endTime,
750
+ 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}}es.prototype.pe=function(a){return{data:a.data}};function is(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);}
751
+ function gs(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++,
752
+ 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 js(){Qr.apply(this,arguments)}pa(js,Qr);
753
+ js.prototype.bc=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),n=m.next();!n.done;n=m.next())n=n.value,0!=n.variantIds.length&&l.push(ks(n,k.startTime,k.startTime+e));f=l;b.push(f)}return u(h,mp(b),2)}g=h.h;return h["return"]({appMetadata:a.appMetadata,creationTime:0,drmInfo:a.drmInfo,duration:a.duration,expiration:null==
751
754
  a.expiration?Infinity:a.expiration,originalManifestUri:a.originalManifestUri,sessionIds:a.sessionIds,size:a.size,streams:g,sequenceMode:!1})})};
752
- function js(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,
753
- dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function ks(){Pr.apply(this,arguments)}pa(ks,Pr);r=ks.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 Tr(this,a,b)};r.bc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ls(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=ls.prototype;
754
- r.init=function(){var a=this,b=new lc,c=!1,d=new O(function(){c=!0;b.reject(new N(2,9,9017))});d.P(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new ds(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new is(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
755
- new is(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new ks(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Ur(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new N(2,
755
+ function ks(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,
756
+ dataKey:d.dataKey,tilesLayout:""}}),variantIds:a.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}};function ls(){Qr.apply(this,arguments)}pa(ls,Qr);r=ls.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 Ur(this,a,b)};r.bc=function(a){null==a.expiration&&(a.expiration=Infinity);return Promise.resolve(a)};function ms(){this.m=this.j=this.i=this.h=this.g=this.l=null}r=ms.prototype;
757
+ r.init=function(){var a=this,b=new lc,c=!1,d=new O(function(){c=!0;b.reject(new N(2,9,9017))});d.P(2);var e=window.indexedDB.open("shaka_offline_db",5);e.onsuccess=function(){if(!c){var f=e.result;a.l=f;var g=f.objectStoreNames;g=g.contains("manifest")&&g.contains("segment")?new es(f,"segment","manifest"):null;a.g=g;g=f.objectStoreNames;g=g.contains("manifest-v2")&&g.contains("segment-v2")?new js(f,"segment-v2","manifest-v2"):null;a.h=g;g=f.objectStoreNames;g=g.contains("manifest-v3")&&g.contains("segment-v3")?
758
+ new js(f,"segment-v3","manifest-v3"):null;a.i=g;g=f.objectStoreNames;g=g.contains("manifest-v5")&&g.contains("segment-v5")?new ls(f,"segment-v5","manifest-v5"):null;a.j=g;f=f.objectStoreNames.contains("session-ids")?new Vr(f):null;a.m=f;d.stop();b.resolve()}};e.onupgradeneeded=function(){for(var f=e.result,g=t(["segment-v5","manifest-v5","session-ids"]),h=g.next();!h.done;h=g.next())h=h.value,f.objectStoreNames.contains(h)||f.createObjectStore(h,{autoIncrement:!0})};e.onerror=function(f){c||(b.reject(new N(2,
756
759
  9,9001,e.error)),d.stop(),f.preventDefault())};return b};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(),A(b)}})};
757
760
  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};
758
- 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,ms(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
759
- function ms(){var a=new lc,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}cs("idb",function(){return sc("CrKey")||rc()||!window.indexedDB?null:new ls});function ns(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}ns.prototype.Aa=function(){return this.i};ns.prototype.ka=function(){return this.h};ns.prototype.key=function(){return this.l};ns.prototype.toString=function(){return this.j};
760
- function os(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 ns(b,c,d,Number(a[4])):null};function ps(a,b){this.h=a;this.g=b}
761
- function qs(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=rs(a,d,e,c);e=b.streams.filter(function(l){return l.type==jc}).map(function(l){return ss(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ss(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=
761
+ 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,ns(),10);case 10:return a.l=null,a.g=null,a.h=null,a.i=null,a.j=null,u(b,a.init(),0)}})};
762
+ function ns(){var a=new lc,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}ds("idb",function(){return sc("CrKey")||rc()||!window.indexedDB?null:new ms});function os(a,b,c,d){this.g=a;this.i=b;this.h=c;this.l=d;this.j=["offline:",a,"/",b,"/",c,"/",d].join("")}os.prototype.Aa=function(){return this.i};os.prototype.ka=function(){return this.h};os.prototype.key=function(){return this.l};os.prototype.toString=function(){return this.j};
763
+ function ps(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 os(b,c,d,Number(a[4])):null};function qs(a,b){this.h=a;this.g=b}
764
+ function rs(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=ss(a,d,e,c);e=b.streams.filter(function(l){return l.type==jc}).map(function(l){return ts(a,l,c)});var f=b.streams.filter(function(l){return"image"==l.type}).map(function(l){return ts(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=
762
765
  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}}
763
- function rs(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:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
764
- b.next())for(e=e.value,g=ss(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=ss(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}
765
- function ss(a,b,c){var d=b.segments.map(function(e){return ts(a,e)});c.Gb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new rj(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,
766
- roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function ts(a,b){var c=new ns("segment",a.h,a.g,b.dataKey);return new oi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?us(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
767
- function us(a,b){var c=new ns("segment",a.h,a.g,b);return new mi(function(){return[c.toString()]},0,null)};function vs(){this.g=null}r=vs.prototype;r.configure=function(){};
768
- 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=os(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Vr;ua(m);return u(m,e.init(),4);case 4:return u(m,Zr(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 ps(d.Aa(),d.ka()),l=qs(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()};
769
- 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 Vr,C(m,2,3),u(m,e.init(),5);case 5:return u(m,Zr(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)}})};
770
- Wg["application/x-offline-manifest"]=function(){return new vs};function ws(){}function xs(a){var b=os(a);b&&"manifest"==b.g?(a={uri:a,Fe:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Qe(a)):a=b&&"segment"==b.g?ys(b.key(),b):Oe(new N(2,1,9004,a));return a}
771
- function ys(a,b){var c=new Vr;return Qe(void 0).Z(function(){return c.init()}).Z(function(){return Zr(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",ws);ws.plugin=xs;bf("offline",xs);function zs(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,As(y.info,p)){y.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Bs(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)}})}
772
- function Bs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new ig({kb:b,onError:function(){},Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,qg(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 C(f,6),u(f,Bg(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
766
+ function ss(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:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});b=t(b);for(e=b.next();!e.done;e=
767
+ b.next())for(e=e.value,g=ts(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=ts(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}
768
+ function ts(a,b,c){var d=b.segments.map(function(e){return us(a,e)});c.Gb(d);return{id:b.id,originalId:b.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new rj(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,
769
+ roles:b.roles,forced:b.forced,channelsCount:b.channelsCount,audioSamplingRate:b.audioSamplingRate,spatialAudio:b.spatialAudio,closedCaptions:b.closedCaptions,tilesLayout:b.tilesLayout}}function us(a,b){var c=new os("segment",a.h,a.g,b.dataKey);return new oi(b.startTime,b.endTime,function(){return[c.toString()]},0,null,null!=b.initSegmentKey?vs(a,b.initSegmentKey):null,b.timestampOffset,b.appendWindowStart,b.appendWindowEnd,[],b.tilesLayout||"")}
770
+ function vs(a,b){var c=new os("segment",a.h,a.g,b);return new mi(function(){return[c.toString()]},0,null)};function ws(){this.g=null}r=ws.prototype;r.configure=function(){};
771
+ 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=ps(a);c.g=d;if(null==d||"manifest"!=d.g)throw new N(2,1,9004,a);e=new Wr;ua(m);return u(m,e.init(),4);case 4:return u(m,$r(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 qs(d.Aa(),d.ka()),l=rs(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()};
772
+ 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 Wr,C(m,2,3),u(m,e.init(),5);case 5:return u(m,$r(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)}})};
773
+ Wg["application/x-offline-manifest"]=function(){return new ws};function xs(){}function ys(a){var b=ps(a);b&&"manifest"==b.g?(a={uri:a,Ge:a,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}},a=Qe(a)):a=b&&"segment"==b.g?zs(b.key(),b):Oe(new N(2,1,9004,a));return a}
774
+ function zs(a,b){var c=new Wr;return Qe(void 0).Z(function(){return c.init()}).Z(function(){return $r(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",xs);xs.plugin=ys;bf("offline",ys);function As(a,b,c){var d,e,f,g,h,k;return K(function(l){switch(l.g){case 1:d=[];for(var m=[],n=t(c),p=n.next();!p.done;p=n.next()){p=p.value;for(var q=!1,v=t(m),y=v.next();!y.done;y=v.next())if(y=y.value,Bs(y.info,p)){y.sessionIds.push(p.sessionId);q=!0;break}q||m.push({info:p,sessionIds:[p.sessionId]})}e=t(m);f=e.next();case 2:if(f.done){l.A(4);break}g=f.value;h=Cs(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)}})}
775
+ function Cs(a,b,c){var d,e;return K(function(f){switch(f.g){case 1:return d=new ig({kb:b,onError:function(){},Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),C(f,2),d.configure(a),u(f,qg(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 C(f,6),u(f,Bg(d),8);case 8:va(f,7);break;case 6:return F(f),u(f,d.destroy(),
773
776
  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 C(h,2),u(h,Cg(d,g),4);if(2!=h.g)return e.push(g),va(h,0);F(h);A(h)})})),10);case 10:return u(f,d.destroy(),11);case 11:return f["return"](e)}})}
774
- function As(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 Cs(a,b,c){var d=b.presentationTimeline.getDuration();b=Ds(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Es(a,b){var c=qs(new ps(a.Aa(),a.ka()),b),d=b.appMetadata||{};c=Ds(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}}
775
- function Ds(a){var b=[],c=ke(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 Fs(){this.g={}}function Gs(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 Hs(a,b){a.g[b.id]=b.bandwidth||2048}function Is(a,b){var c=a.g[b];null==c&&(c=0);return c};function Js(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.fc()):(this.h=fl(),this.g=new af);this.i=[];this.j=[];var c=!a;this.l=new mf(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 Fr(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);
776
- case 4:b.h=null,b.g=null,A(k)}})})}function Ks(){if(oc())a:{var a=t(Wr.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=Js.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cl(a,b));return hl(this.h,a)};r.getConfiguration=function(){var a=fl();hl(a,this.h,fl());return a};r.fc=function(){return this.g};
777
- r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Er(this.g);this.j.push(f);b=Ls(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return u(h,Vg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new Ne(b,function(){return Fr(f)});b["finally"](function(){eb(d.j,f)});return Ms(this,b)};
778
- function Ls(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,D,z;return K(function(B){switch(B.g){case 1:return Ns(),h=g=null,k=new Vr,n=m=l=null,C(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,Os(a,b,g,e),6);case 6:p=B.h;Ps(a);q=!p.presentationTimeline.V()&&!p.presentationTimeline.jb();if(!q)throw new N(2,9,9005,b);return u(B,Qs(a,p,function(G){n=n||G},e),7);case 7:h=B.h;Ps(a);if(n)throw n;return u(B,Rs(p,e),8);case 8:return u(B,k.init(),9);case 9:return Ps(a),u(B,Xr(k),10);case 10:return l=B.h,Ps(a),v=Ss(h,
779
- p,b,c,e,f),y=v.Nf,x=v.ee,u(B,l.ka.addManifests([y]),11);case 11:w=B.h;Ps(a);m=w[0];Ps(a);if(n)throw n;return u(B,Ts(a,x,m,y,f,e,l.ka,p,h),12);case 12:return Ps(a),D=new ns("manifest",l.path.Aa,l.path.ka,m),B["return"](Es(D,y));case 3:return wa(B),u(B,k.destroy(),13);case 13:if(!g){B.A(14);break}return u(B,g.stop(),14);case 14:if(!h){B.A(16);break}return u(B,h.destroy(),16);case 16:xa(B,0);break;case 2:z=F(B);if(null==m){B.A(18);break}return u(B,Us(m),18);case 18:throw n||z;}})}
780
- function Ts(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,x,w,D;return K(function(z){switch(z.g){case 1:l={};m=0;n=function(B,G){var E,H,I,J,L,P,S;return K(function(Y){if(1==Y.g){E={};H=t(B);for(I=H.next();!I.done;E={bb:E.bb},I=H.next())E.bb=I.value,J=Br(E.bb,f),L=E.bb.i,P=E.bb.h,S=function(ea){return function(ta){var Ca,Da,Ga;return K(function(Ha){if(1==Ha.g)return u(Ha,g.addSegments([{data:ta}]),2);Ca=Ha.h;Ps(a);Da=ea.bb.g;Ga=Ar(Da);l[Ga]=Ca[0];m+=ta.byteLength;A(Ha)})}}(E),Hr(e,E.bb.groupId,J,L,P,S);return u(Y,
781
- Jr(e),2)}if(!G)return Y.A(0);Ps(a);Vs(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};p=!1;C(z,2);if(!Ws(h)||!p||Xs(h)){z.A(4);break}return u(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return Ps(a),b=b.filter(function(B){return!B.h}),q=l,v=m,l={},m=0,u(z,Ys(g,c,d,q,v,function(){return Ps(a)}),6);case 6:Ps(a);case 4:if(p){z.A(7);break}return u(z,n(b,!1),8);case 8:return Ps(a),y=l,x=m,l={},m=0,u(z,Ys(g,c,d,y,x,function(){return Ps(a)}),9);case 9:Ps(a);case 7:va(z,0);break;case 2:return w=F(z),
782
- D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function Us(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new Vr,u(f,b.init(),2);case 2:return u(f,Xr(b),3);case 3:return c=f.h,d=new ns("manifest",c.path.Aa,c.path.ka,a),u(f,b.destroy(),4);case 4:return e=new Js,u(f,e.remove(d.toString()),0)}})}
783
- function Ys(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x;return K(function(w){switch(w.g){case 1:g=!1;C(w,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.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&&
784
- (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,Us(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;}})}
785
- function Rs(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea;return K(function(ta){switch(ta.g){case 1:return c={width:Infinity,height:Infinity},Ld(a,b.restrictions,c),u(ta,Pd(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(be(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
777
+ function Bs(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 Ds(a,b,c){var d=b.presentationTimeline.getDuration();b=Es(b);return{offlineUri:null,originalManifestUri:a,duration:d,size:0,expiration:Infinity,tracks:b,appMetadata:c,isIncomplete:!1}}function Fs(a,b){var c=rs(new qs(a.Aa(),a.ka()),b),d=b.appMetadata||{};c=Es(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}}
778
+ function Es(a){var b=[],c=ke(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 Gs(){this.g={}}function Hs(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 Is(a,b){a.g[b.id]=b.bandwidth||2048}function Js(a,b){var c=a.g[b];null==c&&(c=0);return c};function Ks(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.fc()):(this.h=fl(),this.g=new af);this.i=[];this.j=[];var c=!a;this.l=new mf(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 Gr(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);
779
+ case 4:b.h=null,b.g=null,A(k)}})})}function Ls(){if(oc())a:{var a=t(Xr.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=Ks.prototype;r.destroy=function(){return this.l.destroy()};r.configure=function(a,b){2==arguments.length&&"string"==typeof a&&(a=cl(a,b));return hl(this.h,a)};r.getConfiguration=function(){var a=fl();hl(a,this.h,fl());return a};r.fc=function(){return this.g};
780
+ r.store=function(a,b,c){var d=this,e=this.getConfiguration(),f=new Fr(this.g);this.j.push(f);b=Ms(this,a,b||{},function(){var g;return K(function(h){if(1==h.g)return u(h,Vg(a,d.g,e.manifest.retryParameters,c||null),2);g=h.h;return h["return"](g())})},e,f);b=new Ne(b,function(){return Gr(f)});b["finally"](function(){eb(d.j,f)});return Ns(this,b)};
781
+ function Ms(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x,w,D,z;return K(function(B){switch(B.g){case 1:return Os(),h=g=null,k=new Wr,n=m=l=null,C(B,2,3),u(B,d(),5);case 5:return g=B.h,u(B,Ps(a,b,g,e),6);case 6:p=B.h;Qs(a);q=!p.presentationTimeline.V()&&!p.presentationTimeline.jb();if(!q)throw new N(2,9,9005,b);return u(B,Rs(a,p,function(G){n=n||G},e),7);case 7:h=B.h;Qs(a);if(n)throw n;return u(B,Ss(p,e),8);case 8:return u(B,k.init(),9);case 9:return Qs(a),u(B,Yr(k),10);case 10:return l=B.h,Qs(a),v=Ts(h,
782
+ p,b,c,e,f),y=v.Of,x=v.fe,u(B,l.ka.addManifests([y]),11);case 11:w=B.h;Qs(a);m=w[0];Qs(a);if(n)throw n;return u(B,Us(a,x,m,y,f,e,l.ka,p,h),12);case 12:return Qs(a),D=new os("manifest",l.path.Aa,l.path.ka,m),B["return"](Fs(D,y));case 3:return wa(B),u(B,k.destroy(),13);case 13:if(!g){B.A(14);break}return u(B,g.stop(),14);case 14:if(!h){B.A(16);break}return u(B,h.destroy(),16);case 16:xa(B,0);break;case 2:z=F(B);if(null==m){B.A(18);break}return u(B,Vs(m),18);case 18:throw n||z;}})}
783
+ function Us(a,b,c,d,e,f,g,h,k){var l,m,n,p,q,v,y,x,w,D;return K(function(z){switch(z.g){case 1:l={};m=0;n=function(B,G){var E,H,I,J,L,P,S;return K(function(Y){if(1==Y.g){E={};H=t(B);for(I=H.next();!I.done;E={bb:E.bb},I=H.next())E.bb=I.value,J=Cr(E.bb,f),L=E.bb.i,P=E.bb.h,S=function(ea){return function(ta){var Ca,Da,Ga;return K(function(Ha){if(1==Ha.g)return u(Ha,g.addSegments([{data:ta}]),2);Ca=Ha.h;Qs(a);Da=ea.bb.g;Ga=Br(Da);l[Ga]=Ca[0];m+=ta.byteLength;A(Ha)})}}(E),Ir(e,E.bb.groupId,J,L,P,S);return u(Y,
784
+ Kr(e),2)}if(!G)return Y.A(0);Qs(a);Ws(h,d,k,f);return u(Y,g.updateManifest(c,d),0)})};p=!1;C(z,2);if(!Xs(h)||!p||Ys(h)){z.A(4);break}return u(z,n(b.filter(function(B){return B.h}),!0),5);case 5:return Qs(a),b=b.filter(function(B){return!B.h}),q=l,v=m,l={},m=0,u(z,Zs(g,c,d,q,v,function(){return Qs(a)}),6);case 6:Qs(a);case 4:if(p){z.A(7);break}return u(z,n(b,!1),8);case 8:return Qs(a),y=l,x=m,l={},m=0,u(z,Zs(g,c,d,y,x,function(){return Qs(a)}),9);case 9:Qs(a);case 7:va(z,0);break;case 2:return w=F(z),
785
+ D=Object.values(l),u(z,g.removeSegments(D,function(){}),10);case 10:throw w;}})}function Vs(a){var b,c,d,e;return K(function(f){switch(f.g){case 1:return b=new Wr,u(f,b.init(),2);case 2:return u(f,Yr(b),3);case 3:return c=f.h,d=new os("manifest",c.path.Aa,c.path.ka,a),u(f,b.destroy(),4);case 4:return e=new Ks,u(f,e.remove(d.toString()),0)}})}
786
+ function Zs(a,b,c,d,e,f){var g,h,k,l,m,n,p,q,v,y,x;return K(function(w){switch(w.g){case 1:g=!1;C(w,2);h=!0;k=t(c.streams);for(l=k.next();!l.done;l=k.next())for(m=l.value,n=t(m.segments),p=n.next();!p.done;p=n.next())q=p.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&&
787
+ (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,Vs(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;}})}
788
+ function Ss(a,b){var c,d,e,f,g,h,k,l,m,n,p,q,v,y,x,w,D,z,B,G,E,H,I,J,L,P,S,Y,ea;return K(function(ta){switch(ta.g){case 1:return c={width:Infinity,height:Infinity},Ld(a,b.restrictions,c),u(ta,Pd(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(be(m));n=t(a.textStreams);for(p=n.next();!p.done;p=n.next())q=p.value,
786
789
  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(ta,b.offline.trackSelectionCallback(d),3);case 3:w=ta.h;D=a.presentationTimeline.getDuration();z=0;B=t(w);for(G=B.next();!G.done;G=B.next())E=G.value,H=E.bandwidth*D/8,z+=H;C(ta,4);return u(ta,b.offline.downloadSizeCallback(z),6);case 6:I=ta.h;if(!I)throw new N(2,9,9014);va(ta,5);break;case 4:J=F(ta);if(J instanceof N)throw J;throw new N(2,9,9015);case 5:L=new Set;P=new Set;S=new Set;Y=t(w);for(G=
787
- Y.next();!G.done;G=Y.next())ea=G.value,"variant"==ea.type&&L.add(ea.id),"text"==ea.type&&P.add(ea.id),"image"==ea.type&&S.add(ea.id);a.variants=a.variants.filter(function(Ca){return L.has(Ca.id)});a.textStreams=a.textStreams.filter(function(Ca){return P.has(Ca.id)});a.imageStreams=a.imageStreams.filter(function(Ca){return S.has(Ca.id)});Zs(a);A(ta)}})}
788
- function Ss(a,b,c,d,e,f){var g=Cs(c,b,d),h=e.offline.progressCallback;Gr(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&yg(a,"cenc",q)});var k=Ws(b)&&!Xs(b),l=null;k&&(l=$s.get(a.g.keySystem));for(var m=new Fs,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Hs(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Gs(m,n.value);m=at(f,m,b,e);f=m.streams;m=m.ee;p=a.g;n=e.offline.usePersistentLicense;
789
- p&&n&&(p.initData=[]);return{Nf:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ec(),streams:f,sessionIds:n?Hg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},ee:m}}function Ws(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
790
- function Xs(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 Vs(a,b,c,d){b.expiration=c.ec();c=Hg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Ws(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return bt(this,ct(this,a))};
791
- function ct(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Ns();c=os(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Vr;ua(k);return u(k,e.init(),4);case 4:return u(k,Zr(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([dt(a,h,e),et(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
792
- function ft(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:Xc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Xc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function dt(a,b,c){return K(function(d){return u(d,gt(a.g,a.h.drm,c,b),0)})}
793
- function et(a,b,c){function d(){}var e=ht(c);Es(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.ag=function(){return bt(this,it(this))};
794
- function it(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return Ns(),b=a.g,c=a.h.drm,d=new Vr,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],$r(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,zs(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
795
- r.list=function(){return bt(this,jt())};function jt(){var a,b,c;return K(function(d){switch(d.g){case 1:return Ns(),a=[],b=new Vr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Yr(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=Es(new ns("manifest",e.Aa,e.ka,l),k);a.push(m)});A(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)}})}
796
- function Os(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(){},updateDuration:function(){}},c.configure(d.manifest),
797
- Ps(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Ps(a),k=kt(h),u(l,Promise.all(tf(k,function(m){return m.createSegmentIndex()})),3);Ps(a);if(e)throw e;return l["return"](h)})}
798
- function Qs(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new ig({kb:a.g,onError:c,Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,ng(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Bg(e),3);case 3:return u(f,Ag(e),4);case 4:return f["return"](e)}})}
799
- function at(a,b,c,d){var e=new Map,f=kt(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=lt(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()),ee:Array.from(e.values())}}
800
- function lt(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,
801
- tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;mt(d,c.presentationTimeline.Pa(),function(l){var m=Ar(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Is(b,d.id)*p;p=Dr(a.g,p);f.set(m,new zr(l,p,k,!1))}l.i&&(n=Ar(l.i),f.has(n)||(p=.5*Is(b,d.id),p=Dr(a.g,p),f.set(n,new zr(l.i,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
802
- tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function mt(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 Ps(a){if(a.l.g)throw new N(2,9,7001);}function Ns(){if(!Ks())throw new N(2,9,9E3);}function bt(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)})}
803
- function Ms(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){eb(a.i,c)})}function ht(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)}
804
- function gt(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=as(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:ft(d,!1),videoCapabilities:ft(d,!0)}});return u(h,zs(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)})}
805
- function kt(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}
806
- function Zs(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",Js);Js.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new Vr,ua(b),u(b,bs(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Js.prototype.list=Js.prototype.list;
807
- Js.prototype.removeEmeSessions=Js.prototype.ag;Js.prototype.remove=Js.prototype.remove;Js.prototype.store=Js.prototype.store;Js.prototype.getNetworkingEngine=Js.prototype.fc;Js.prototype.getConfiguration=Js.prototype.getConfiguration;Js.prototype.configure=Js.prototype.configure;Js.prototype.destroy=Js.prototype.destroy;Js.support=Ks;
808
- var $s=(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");
809
- Om.offline=Ks;function nt(){}function ot(a,b){for(var c={priority:b||0,Ze:a},d=0;d<pt.length;d++)if(pt[d].priority<c.priority){pt.splice(d,0,c);return}pt.push(c)}M("shaka.polyfill",nt);nt.register=ot;nt.installAll=function(){for(var a=t(pt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.Ze()}catch(c){Va("Error installing polyfill!",c)}}};var pt=[];function qt(){}function rt(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())st(b.value)}function st(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)}})}nt.Aria=qt;qt.install=rt;ot(rt);function tt(){}function ut(){vt()}nt.EncryptionScheme=tt;tt.install=ut;ot(ut,-2);function wt(){}
810
- function xt(){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}}),
811
- Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",yt);document.addEventListener("webkitfullscreenerror",yt);document.addEventListener("mozfullscreenchange",yt);document.addEventListener("mozfullscreenerror",yt);document.addEventListener("MSFullscreenChange",yt);document.addEventListener("MSFullscreenError",yt)}}
812
- function yt(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)}nt.Fullscreen=wt;wt.install=xt;ot(xt);function zt(){}function At(){var a=!0;if(vc()||sc("PlayStation 5")||wc()||sc("Web0S")||tc()||sc("CrKey")||sc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Bt=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Ct)}
813
- function Ct(a){var b,c,d,e,f,g,h,k,l,m,n,p,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(!oc()||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=pc(g),!h)||a.audio&&(k=a.audio.contentType,
790
+ Y.next();!G.done;G=Y.next())ea=G.value,"variant"==ea.type&&L.add(ea.id),"text"==ea.type&&P.add(ea.id),"image"==ea.type&&S.add(ea.id);a.variants=a.variants.filter(function(Ca){return L.has(Ca.id)});a.textStreams=a.textStreams.filter(function(Ca){return P.has(Ca.id)});a.imageStreams=a.imageStreams.filter(function(Ca){return S.has(Ca.id)});$s(a);A(ta)}})}
791
+ function Ts(a,b,c,d,e,f){var g=Ds(c,b,d),h=e.offline.progressCallback;Hr(f,function(q,v){g.size=v;h(g,q)},function(q,v){k&&e.offline.usePersistentLicense&&l==v&&yg(a,"cenc",q)});var k=Xs(b)&&!Ys(b),l=null;k&&(l=at.get(a.g.keySystem));for(var m=new Gs,n=t(b.textStreams),p=n.next();!p.done;p=n.next())m.g[p.value.id]=52;n=t(b.imageStreams);for(p=n.next();!p.done;p=n.next())Is(m,p.value);p=t(b.variants);for(n=p.next();!n.done;n=p.next())Hs(m,n.value);m=bt(f,m,b,e);f=m.streams;m=m.fe;p=a.g;n=e.offline.usePersistentLicense;
792
+ p&&n&&(p.initData=[]);return{Of:{creationTime:Date.now(),originalManifestUri:c,duration:b.presentationTimeline.getDuration(),size:0,expiration:a.ec(),streams:f,sessionIds:n?Hg(a):[],drmInfo:p,appMetadata:d,isIncomplete:!0,sequenceMode:b.sequenceMode},fe:m}}function Xs(a){return a.variants.some(function(b){var c=b.audio&&b.audio.encrypted;return b.video&&b.video.encrypted||c})}
793
+ function Ys(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 Ws(a,b,c,d){b.expiration=c.ec();c=Hg(c);b.sessionIds=d.offline.usePersistentLicense?c:[];if(Xs(a)&&d.offline.usePersistentLicense&&!c.length)throw new N(2,9,9007);}r.remove=function(a){return ct(this,dt(this,a))};
794
+ function dt(a,b){var c,d,e,f,g,h;return K(function(k){switch(k.g){case 1:Os();c=ps(b);if(null==c||"manifest"!=c.g)throw new N(2,9,9004,b);d=c;e=new Wr;ua(k);return u(k,e.init(),4);case 4:return u(k,$r(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([et(a,h,e),ft(f,d,h)]),2);case 2:return wa(k),u(k,e.destroy(),8);case 8:xa(k,0)}})}
795
+ function gt(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:Xc(e.mimeType,e.codecs),robustness:a.drmInfo.videoRobustness}):b||"audio"!=e.type||c.push({contentType:Xc(e.mimeType,e.codecs),robustness:a.drmInfo.audioRobustness});return c}function et(a,b,c){return K(function(d){return u(d,ht(a.g,a.h.drm,c,b),0)})}
796
+ function ft(a,b,c){function d(){}var e=it(c);Fs(b,c);return Promise.all([a.removeSegments(e,d),a.removeManifests([b.key()],d)])}r.bg=function(){return ct(this,jt(this))};
797
+ function jt(a){var b,c,d,e,f,g,h,k,l,m;return K(function(n){switch(n.g){case 1:return Os(),b=a.g,c=a.h.drm,d=new Wr,e=!1,ua(n),u(n,d.init(),4);case 4:f=[],as(d,function(p){return f.push(p)}),g=t(f),h=g.next();case 5:if(h.done){n.A(2);break}k=h.value;return u(n,k.getAll(),8);case 8:return l=n.h,u(n,As(c,b,l),9);case 9:return m=n.h,u(n,k.remove(m),10);case 10:m.length!=l.length&&(e=!0);h=g.next();n.A(5);break;case 2:return wa(n),u(n,d.destroy(),11);case 11:xa(n,3);break;case 3:return n["return"](!e)}})}
798
+ r.list=function(){return ct(this,kt())};function kt(){var a,b,c;return K(function(d){switch(d.g){case 1:return Os(),a=[],b=new Wr,ua(d),u(d,b.init(),4);case 4:return c=Promise.resolve(),Zr(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=Fs(new os("manifest",e.Aa,e.ka,l),k);a.push(m)});A(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)}})}
799
+ function Ps(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(){},updateDuration:function(){}},c.configure(d.manifest),
800
+ Qs(a),u(l,c.start(b,g),2);if(3!=l.g)return h=l.h,Qs(a),k=lt(h),u(l,Promise.all(tf(k,function(m){return m.createSegmentIndex()})),3);Qs(a);if(e)throw e;return l["return"](h)})}
801
+ function Rs(a,b,c,d){var e;return K(function(f){switch(f.g){case 1:return e=new ig({kb:a.g,onError:c,Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),e.configure(d.drm),u(f,ng(e,b.variants,d.offline.usePersistentLicense),2);case 2:return u(f,Bg(e),3);case 3:return u(f,Ag(e),4);case 4:return f["return"](e)}})}
802
+ function bt(a,b,c,d){var e=new Map,f=lt(c),g=new Map;f=t(f);for(var h=f.next();!h.done;h=f.next()){h=h.value;var k=mt(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()),fe:Array.from(e.values())}}
803
+ function mt(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,
804
+ tilesLayout:d.tilesLayout},h=e.offline.numberOfParallelDownloads,k=0;nt(d,c.presentationTimeline.Oa(),function(l){var m=Br(l),n=void 0;if(!f.has(m)){var p=l.endTime-l.startTime;p=Js(b,d.id)*p;p=Er(a.g,p);f.set(m,new Ar(l,p,k,!1))}l.i&&(n=Br(l.i),f.has(n)||(p=.5*Js(b,d.id),p=Er(a.g,p),f.set(n,new Ar(l.i,p,k,!0))));g.segments.push({pendingInitSegmentRefId:n,initSegmentKey:n?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,
805
+ tilesLayout:l.tilesLayout,pendingSegmentRefId:m,dataKey:0});k=(k+1)%h});return g}function nt(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 Qs(a){if(a.l.g)throw new N(2,9,7001);}function Os(){if(!Ls())throw new N(2,9,9E3);}function ct(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)})}
806
+ function Ns(a,b){var c=b.promise;a.i.push(c);return b["finally"](function(){eb(a.i,c)})}function it(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)}
807
+ function ht(a,b,c,d){var e,f,g;return K(function(h){if(1==h.g){if(!d.drmInfo)return h["return"]();e=bs(c);f=d.sessionIds.map(function(k){return{sessionId:k,keySystem:d.drmInfo.keySystem,licenseUri:d.drmInfo.licenseServerUri,serverCertificate:d.drmInfo.serverCertificate,audioCapabilities:gt(d,!1),videoCapabilities:gt(d,!0)}});return u(h,As(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)})}
808
+ function lt(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}
809
+ function $s(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",Ks);Ks.deleteAll=function(){var a;return K(function(b){return 1==b.g?(a=new Wr,ua(b),u(b,cs(a),2)):5!=b.g?(wa(b),u(b,a.destroy(),5)):xa(b,0)})};Ks.prototype.list=Ks.prototype.list;
810
+ Ks.prototype.removeEmeSessions=Ks.prototype.bg;Ks.prototype.remove=Ks.prototype.remove;Ks.prototype.store=Ks.prototype.store;Ks.prototype.getNetworkingEngine=Ks.prototype.fc;Ks.prototype.getConfiguration=Ks.prototype.getConfiguration;Ks.prototype.configure=Ks.prototype.configure;Ks.prototype.destroy=Ks.prototype.destroy;Ks.support=Ls;
811
+ var at=(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");
812
+ Om.offline=Ls;function ot(){}function pt(a,b){for(var c={priority:b||0,$e:a},d=0;d<qt.length;d++)if(qt[d].priority<c.priority){qt.splice(d,0,c);return}qt.push(c)}M("shaka.polyfill",ot);ot.register=pt;ot.installAll=function(){for(var a=t(qt),b=a.next();!b.done;b=a.next()){b=b.value;try{b.$e()}catch(c){Va("Error installing polyfill!",c)}}};var qt=[];function rt(){}function st(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var a=t(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())tt(b.value)}function tt(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)}})}ot.Aria=rt;rt.install=st;pt(st);function ut(){}function vt(){wt()}ot.EncryptionScheme=ut;ut.install=vt;pt(vt,-2);function xt(){}
813
+ function yt(){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}}),
814
+ Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",zt);document.addEventListener("webkitfullscreenerror",zt);document.addEventListener("mozfullscreenchange",zt);document.addEventListener("mozfullscreenerror",zt);document.addEventListener("MSFullscreenChange",zt);document.addEventListener("MSFullscreenError",zt)}}
815
+ function zt(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)}ot.Fullscreen=xt;xt.install=yt;pt(yt);function At(){}function Bt(){var a=!0;if(vc()||sc("PlayStation 5")||wc()||sc("Web0S")||tc()||sc("CrKey")||sc("PC=EOS"))a=!1;a&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Ct=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Dt)}
816
+ function Dt(a){var b,c,d,e,f,g,h,k,l,m,n,p,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(!oc()||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=pc(g),!h)||a.audio&&(k=a.audio.contentType,
814
817
  l=pc(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;n=[];p=[];m.audio&&(q={robustness:m.audio.robustness||"",contentType:a.audio.contentType},n.push(q));m.video&&(v={robustness:m.video.robustness||"",contentType:a.video.contentType},p.push(v));y={initDataTypes:[m.initDataType],distinctiveIdentifier:m.distinctiveIdentifier,persistentState:m.persistentState,sessionTypes:m.sessionTypes};
815
- n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);C(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)}})}nt.MediaCapabilities=zt;zt.install=At;var Bt=null;zt.originalMcap=Bt;ot(At,-1);function Dt(){}function Et(){var a=xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Ft():a?12>=a?(Gt(),Ht()):Gt():(sc("Tizen 2")||sc("Tizen 3")||sc("Tizen 4"))&&It());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Jt()}
816
- function Gt(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function Ht(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function It(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=$c(b)[0]&&a(b)}}
817
- function Ft(){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)}}
818
- function Jt(){var a=MediaSource.isTypeSupported;sc("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)})}nt.MediaSource=Dt;Dt.install=Et;ot(Et);function Kt(){}function Lt(){screen.orientation||void 0!=window.orientation&&Mt()}function Mt(){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 Nt;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new R("change");b.dispatchEvent(c)})}nt.Orientation=Kt;
819
- Kt.install=Lt;function Nt(){We.call(this);this.type="";this.angle=0}pa(Nt,We);
820
- Nt.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)};
821
- Nt.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};ot(Lt);function Ot(){}function Pt(a,b){try{var c=new Qt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function Rt(a){var b=this.mediaKeys;b&&b!=a&&St(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?St(a,this):Promise.resolve()}function Tt(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Ic(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}
822
- nt.PatchedMediaKeysApple=Ot;Ot.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Rt,window.MediaKeys=Ut,window.MediaKeySystemAccess=Qt,navigator.requestMediaKeySystemAccess=Pt,window.shakaMediaKeysPolyfill=!0)};
823
- function Qt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
818
+ n.length&&(y.audioCapabilities=n);p.length&&(y.videoCapabilities=p);C(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)}})}ot.MediaCapabilities=At;At.install=Bt;var Ct=null;At.originalMcap=Ct;pt(Bt,-1);function Et(){}function Ft(){var a=xc();window.MediaSource&&(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType?Gt():a?12>=a?(Ht(),It()):Ht():(sc("Tizen 2")||sc("Tizen 3")||sc("Tizen 4"))&&Jt());window.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Kt()}
819
+ function Ht(){var a=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=a.apply(this,Ia.apply(0,arguments));b.abort=function(){};return b}}function It(){var a=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(b,c){return a.call(this,b,c-.001)}}function Jt(){var a=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(b){return"opus"!=$c(b)[0]&&a(b)}}
820
+ function Gt(){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)}}
821
+ function Kt(){var a=MediaSource.isTypeSupported;sc("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)})}ot.MediaSource=Et;Et.install=Ft;pt(Ft);function Lt(){}function Mt(){screen.orientation||void 0!=window.orientation&&Nt()}function Nt(){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 Ot;screen.orientation=b;a();window.addEventListener("orientationchange",function(){a();var c=new R("change");b.dispatchEvent(c)})}ot.Orientation=Lt;
822
+ Lt.install=Mt;function Ot(){We.call(this);this.type="";this.angle=0}pa(Ot,We);
823
+ Ot.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)};
824
+ Ot.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()};pt(Mt);function Pt(){}function Qt(a,b){try{var c=new Rt(a,b);return Promise.resolve(c)}catch(d){return Promise.reject(d)}}function St(a){var b=this.mediaKeys;b&&b!=a&&Tt(b,null);delete this.mediaKeys;return(this.mediaKeys=a)?Tt(a,this):Promise.resolve()}function Ut(a){a=Fb(a.initData);if(Ib(a).getUint32(0,!0)+4!=a.byteLength)throw new RangeError("Malformed FairPlay init data");a=Cc(a.subarray(4),!0);a=Ic(a);var b=new Event("encrypted");b.initDataType="skd";b.initData=Gb(a);this.dispatchEvent(b)}
825
+ ot.PatchedMediaKeysApple=Pt;Pt.install=function(){window.HTMLVideoElement&&window.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=St,window.MediaKeys=Vt,window.MediaKeySystemAccess=Rt,navigator.requestMediaKeySystemAccess=Qt,window.shakaMediaKeysPolyfill=!0)};
826
+ function Rt(a,b){this.keySystem=a;if(a.startsWith("com.apple.fps"))for(var c=t(b),d=c.next();!d.done;d=c.next()){var e=d.value;if("required"==e.persistentState)d=null;else{d={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:e.initDataTypes,sessionTypes:["temporary"],label:e.label};var f=!1,g=!1;if(e.audioCapabilities)for(var h=t(e.audioCapabilities),k=h.next();!k.done;k=h.next())k=k.value,k.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,
824
827
  k.contentType.split(";")[0])&&(d.audioCapabilities.push(k),g=!0));if(e.videoCapabilities)for(e=t(e.videoCapabilities),k=e.next();!k.done;k=e.next())h=k.value,h.contentType&&(f=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,h.contentType.split(";")[0])&&(d.videoCapabilities.push(h),g=!0));f||(g=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));d=g?d:null}if(d){this.g=d;return}}c=Error("Unsupported keySystem");c.name="NotSupportedError";c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}
825
- Qt.prototype.createMediaKeys=function(){var a=new Ut(this.keySystem);return Promise.resolve(a)};Qt.prototype.getConfiguration=function(){return this.g};function Ut(a){this.h=new WebKitMediaKeys(a);this.g=new of}Ut.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Vt(this.h,a)};Ut.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
826
- function St(a,b){a.g.mb();if(!b)return Promise.resolve();a.g.B(b,"webkitneedkey",Tt);try{return bj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Vt(a){We.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new lc;this.keyStatuses=new Wt}pa(Vt,We);r=Vt.prototype;
827
- r.generateRequest=function(a,b){var c=this;this.h=new lc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.B(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Cb()?"license-request":"license-renewal").set("message",Gb(e.message));e=new R("message",e);c.dispatchEvent(e)});this.j.B(d,"webkitkeyadded",function(){c.g&&(Xt(c,"usable"),c.g.resolve(),c.g=null)});this.j.B(d,"webkitkeyerror",
828
- function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Xt(c,"output-not-allowed");break;default:Xt(c,"internal-error")}});Xt(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
829
- r.update=function(a){this.g=new lc;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.mb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Xt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
830
- function Wt(){this.size=0;this.g=void 0}r=Wt.prototype;r.Cb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Tg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};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."))}
831
- function au(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}nt.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(){};ot(Zt,-10);function du(){}
832
- 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}}
833
- 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()}nt.PatchedMediaKeysWebkit=du;du.install=eu;
834
- 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),
828
+ Rt.prototype.createMediaKeys=function(){var a=new Vt(this.keySystem);return Promise.resolve(a)};Rt.prototype.getConfiguration=function(){return this.g};function Vt(a){this.h=new WebKitMediaKeys(a);this.g=new of}Vt.prototype.createSession=function(a){a=a||"temporary";if("temporary"!=a)throw new TypeError("Session type "+a+" is unsupported on this platform.");return new Wt(this.h,a)};Vt.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
829
+ function Tt(a,b){a.g.mb();if(!b)return Promise.resolve();a.g.C(b,"webkitneedkey",Ut);try{return bj(b,HTMLMediaElement.HAVE_METADATA,a.g,function(){b.webkitSetMediaKeys(a.h)}),Promise.resolve()}catch(c){return Promise.reject(c)}}function Wt(a){We.call(this);this.i=null;this.l=a;this.g=this.h=null;this.j=new of;this.sessionId="";this.expiration=NaN;this.closed=new lc;this.keyStatuses=new Xt}pa(Wt,We);r=Wt.prototype;
830
+ r.generateRequest=function(a,b){var c=this;this.h=new lc;try{var d=this.l.createSession("video/mp4",Fb(b));this.i=d;this.sessionId=d.sessionId||"";this.j.C(this.i,"webkitkeymessage",function(e){c.h&&(c.h.resolve(),c.h=null);e=(new Map).set("messageType",void 0==c.keyStatuses.Cb()?"license-request":"license-renewal").set("message",Gb(e.message));e=new R("message",e);c.dispatchEvent(e)});this.j.C(d,"webkitkeyadded",function(){c.g&&(Yt(c,"usable"),c.g.resolve(),c.g=null)});this.j.C(d,"webkitkeyerror",
831
+ function(){var e=Error("EME PatchedMediaKeysApple key error");e.errorCode=c.i.error;if(null!=c.h)c.h.reject(e),c.h=null;else if(null!=c.g)c.g.reject(e),c.g=null;else switch(c.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Yt(c,"output-not-allowed");break;default:Yt(c,"internal-error")}});Yt(this,"status-pending")}catch(e){this.h.reject(e)}return this.h};r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};
832
+ r.update=function(a){this.g=new lc;try{this.i.update(Fb(a))}catch(b){this.g.reject(b)}return this.g};r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.mb()}catch(a){this.closed.reject(a)}return this.closed};r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function Yt(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("keystatuseschange");a.dispatchEvent(c)}
833
+ function Xt(){this.size=0;this.g=void 0}r=Xt.prototype;r.Cb=function(){return this.g};r.forEach=function(a){this.g&&a(this.g,Tg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};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."))}
834
+ function bu(a){return null==a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}ot.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(){};pt($t,-10);function eu(){}
835
+ 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}}
836
+ 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()}ot.PatchedMediaKeysWebkit=eu;eu.install=fu;
837
+ 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),
835
838
  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"]):
836
- 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 of;this.i=[];this.j=new Map}
837
- function lu(a,b){a.h=b;a.g.mb();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.Cb()?"licenserequest":"licenserenewal").set("message",d.message),d=new R("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"),
838
- 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)};
839
- 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){We.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 lc;this.keyStatuses=new pu}pa(ou,We);r=ou.prototype;
840
- 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"))};
841
- 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(Ic("LOAD_SESSION|"+c));else{var e=Ic("PERSISTENT|");d=Qc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new lc;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}})).P(.01)}return a.h}
842
- 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=Bc(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=Nc(e.keys[0].k);e=Nc(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}}}
843
- function nu(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("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 lc;ru(this,b,a);return b};
844
- 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.Cb=function(){return this.g};
845
- r.forEach=function(a){this.g&&a(this.g,Tg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var fu="";ot(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))}}
846
- 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)}
847
- 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"))}
848
- function vu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function wu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}nt.PiPWebkit=su;su.install=tu;ot(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)}nt.RandomUUID=zu;zu.install=Au;ot(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)})}nt.StorageEstimate=Cu;Cu.install=Du;ot(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}nt.Symbol=Fu;Fu.install=Gu;ot(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}}}nt.VideoPlayPromise=Iu;Iu.install=Ju;ot(Ju);function Ku(){}function Lu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||uc())&&(a.getVideoPlaybackQuality=Mu)}}function Mu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}nt.VideoPlaybackQuality=Ku;Ku.install=Lu;ot(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)}nt.VTTCue=Nu;Nu.install=Ou;ot(Ou);function Ru(){}Ru.prototype.parseInit=function(){};Ru.prototype.setSequenceMode=function(){};Ru.prototype.parseMedia=function(a,b){var c=null,d=[],e=Bc(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 hb(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;
849
- 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})?)$/;dd["application/x-subtitle-lrc"]=function(){return new Ru};function Uu(){}Uu.prototype.parseInit=function(){};Uu.prototype.setSequenceMode=function(){};
850
- Uu.prototype.parseMedia=function(a,b){var c=Bc(a),d=[];if(""==c)return d;var e=fg(c,"tt");if(!e)throw new N(2,2,2005,"Failed to parse TTML.");c=e.getElementsByTagName("body")[0];if(!c)return[];var f=Uf(e,Vu,"frameRate"),g=Uf(e,Vu,"subFrameRate"),h=Uf(e,Vu,"frameRateMultiplier"),k=Uf(e,Vu,"tickRate"),l=Uf(e,Vu,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Uf(e,Wu,"extent");if("default"!=m&&"preserve"!=m)throw new N(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Xu(f,g,
851
- h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Sf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new jb;var y=v.getAttribute("xml:id");if(y){q.id=y;var x=null;n&&(x=Yu.exec(n)||Zu.exec(n));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,D;if(w=$u(v,h,"extent"))w=(D=Yu.exec(w))||Zu.exec(w),
852
- 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,h,"origin"))w=(D=Yu.exec(v))||Zu.exec(v),null!=w&&(q.viewportAnchorX=Number(w[1]),q.viewportAnchorY=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&&k.push(q)}if(Pf(c,"p").length)throw new N(2,
853
- 2,2001,"<p> can only be inside <div> in TTML");n=t(Pf(c,"div"));for(p=n.next();!p.done;p=n.next())if(Pf(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(c=av(c,b.periodStart,f,g,h,e,k,m,l,null,!1))c.backgroundColor||(c.backgroundColor="transparent"),d.push(c);return d};
854
- function av(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var q=null,v=t(bv),y=v.next();!y.done&&!(q=cv(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||q)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
855
- a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=av(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=dv(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=ev(n,c,x,w),x=w.start,w=w.end,n=n.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),
856
- 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"==p.tagName)return e=new hb(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=cv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
857
- (g=cv(l,"region",f,"")[0]);fv(b,p,g,q,e,v,0==a.length);return b}
858
- 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=ib);(g=gv(b,c,e,"textAlign",!0))?(a.positionAlign=hv[g],a.lineAlign=iv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=lb;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",
859
- 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");
860
- 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=
861
- mv(b,e,"textDecoration"))&&lv(a,b)}
862
- 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")||
863
- 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=Uf(a,Wu,c);return d?d:nv(a,b,c)}function mv(a,b,c){var d=Uf(a,Wu,c);return d?d:nv(a,b,c)}
864
- function nv(a,b,c){a=cv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Tf(a[e],"urn:ebu:tt:style",c);f||(f=Uf(a[e],Wu,c));f||(f=mv(a[e],b,c));f&&(d=f)}return d}
865
- 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?Tf(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}}
866
- 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}}
867
- 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}
868
- 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;
869
- 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]))}
870
- 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:ob,center:"center",right:"end",start:ob,
871
- 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"];dd["application/ttml+xml"]=function(){return new Uu};function wv(){this.g=new Uu}wv.prototype.parseInit=function(a){var b=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).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 Bf).box("mdat",If(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};
872
- M("shaka.text.Mp4TtmlParser",wv);wv.prototype.parseMedia=wv.prototype.parseMedia;wv.prototype.setSequenceMode=wv.prototype.setSequenceMode;wv.prototype.parseInit=wv.prototype.parseInit;dd['application/mp4; codecs="stpp"']=function(){return new wv};dd['application/mp4; codecs="stpp.ttml"']=function(){return new wv};dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new wv};dd['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};
873
- xv.prototype.parseMedia=function(a,b){var c=Bc(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 iq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+
874
- f/9E4-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 iq(g);var h=new jb;lq(g);jq(g);for(var k=lq(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))?
875
- (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");jq(g);k=lq(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 hb(0,0,"");for(var n=!1,p=0;p<k.length;p++){var q=
839
+ 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 of;this.i=[];this.j=new Map}
840
+ function mu(a,b){a.h=b;a.g.mb();var c=gu;b&&(a.g.C(b,c+"needkey",function(d){var e=new CustomEvent("encrypted");e.initDataType="cenc";e.initData=Gb(d.initData);a.h.dispatchEvent(e)}),a.g.C(b,c+"keymessage",function(d){var e=nu(a,d.sessionId);e&&(d=(new Map).set("messageType",void 0==e.keyStatuses.Cb()?"licenserequest":"licenserenewal").set("message",d.message),d=new R("message",d),e.h&&(e.h.resolve(),e.h=null),e.dispatchEvent(d))}),a.g.C(b,c+"keyadded",function(d){if(d=nu(a,d.sessionId))ou(d,"usable"),
841
+ d.g&&d.g.resolve(),d.g=null}),a.g.C(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)};
842
+ 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){We.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 lc;this.keyStatuses=new qu}pa(pu,We);r=pu.prototype;
843
+ 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"))};
844
+ 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(Ic("LOAD_SESSION|"+c));else{var e=Ic("PERSISTENT|");d=Qc(e,b)}else d=Fb(b)}catch(g){return Promise.reject(g)}a.h=new lc;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}})).P(.01)}return a.h}
845
+ 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=Bc(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=Nc(e.keys[0].k);e=Nc(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}}}
846
+ function ou(a,b){var c=a.keyStatuses;c.size=void 0==b?0:1;c.g=b;c=new R("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 lc;su(this,b,a);return b};
847
+ 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.Cb=function(){return this.g};
848
+ r.forEach=function(a){this.g&&a(this.g,Tg.value())};r.get=function(a){if(this.has(a))return this.g};r.has=function(a){var b=Tg.value();return this.g&&Db(a,b)?!0:!1};r.entries=function(){};r.keys=function(){};r.values=function(){};var gu="";pt(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))}}
849
+ 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)}
850
+ 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"))}
851
+ function wu(){return this.hasAttribute("disablePictureInPicture")?!0:!this.webkitSupportsPresentationMode("picture-in-picture")}function xu(a){a?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}ot.PiPWebkit=tu;tu.install=uu;pt(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)}ot.RandomUUID=Au;Au.install=Bu;pt(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)})}ot.StorageEstimate=Du;Du.install=Eu;pt(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}ot.Symbol=Gu;Gu.install=Hu;pt(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}}}ot.VideoPlayPromise=Ju;Ju.install=Ku;pt(Ku);function Lu(){}function Mu(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in a||uc())&&(a.getVideoPlaybackQuality=Nu)}}function Nu(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}ot.VideoPlaybackQuality=Lu;Lu.install=Mu;pt(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)}ot.VTTCue=Ou;Ou.install=Pu;pt(Pu);function Su(){}Su.prototype.parseInit=function(){};Su.prototype.setSequenceMode=function(){};Su.prototype.parseMedia=function(a,b){var c=null,d=[],e=Bc(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 hb(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;
852
+ 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})?)$/;dd["application/x-subtitle-lrc"]=function(){return new Su};function Vu(){}Vu.prototype.parseInit=function(){};Vu.prototype.setSequenceMode=function(){};
853
+ Vu.prototype.parseMedia=function(a,b){var c=Bc(a),d=[];if(""==c)return d;var e=fg(c,"tt");if(!e)throw new N(2,2,2005,"Failed to parse TTML.");c=e.getElementsByTagName("body")[0];if(!c)return[];var f=Uf(e,Wu,"frameRate"),g=Uf(e,Wu,"subFrameRate"),h=Uf(e,Wu,"frameRateMultiplier"),k=Uf(e,Wu,"tickRate"),l=Uf(e,Wu,"cellResolution"),m=e.getAttribute("xml:space")||"default",n=Uf(e,Xu,"extent");if("default"!=m&&"preserve"!=m)throw new N(2,2,2005,"Invalid xml:space value: "+m);m="default"==m;f=new Yu(f,g,
854
+ h,k);l=l?(l=/^(\d+) (\d+)$/.exec(l))?{columns:parseInt(l[1],10),rows:parseInt(l[2],10)}:null:null;g=(g=e.getElementsByTagName("metadata")[0])?Sf(g):[];h=Array.from(e.getElementsByTagName("style"));e=Array.from(e.getElementsByTagName("region"));k=[];for(var p=t(e),q=p.next();!q.done;q=p.next()){var v=q.value;q=new jb;var y=v.getAttribute("xml:id");if(y){q.id=y;var x=null;n&&(x=Zu.exec(n)||$u.exec(n));y=x?Number(x[1]):null;x=x?Number(x[2]):null;var w,D;if(w=av(v,h,"extent"))w=(D=Zu.exec(w))||$u.exec(w),
855
+ 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,h,"origin"))w=(D=Zu.exec(v))||$u.exec(v),null!=w&&(q.viewportAnchorX=Number(w[1]),q.viewportAnchorY=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&&k.push(q)}if(Pf(c,"p").length)throw new N(2,
856
+ 2,2001,"<p> can only be inside <div> in TTML");n=t(Pf(c,"div"));for(p=n.next();!p.done;p=n.next())if(Pf(p.value,"span").length)throw new N(2,2,2001,"<span> can only be inside <p> in TTML");if(c=bv(c,b.periodStart,f,g,h,e,k,m,l,null,!1))c.backgroundColor||(c.backgroundColor="transparent"),d.push(c);return d};
857
+ function bv(a,b,c,d,e,f,g,h,k,l,m){var n=a.parentNode;if(a.nodeType==Node.COMMENT_NODE)return null;if(a.nodeType==Node.TEXT_NODE){if(!m)return null;var p=document.createElement("span");p.textContent=a.textContent}else p=a;for(var q=null,v=t(cv),y=v.next();!y.done&&!(q=dv(p,"backgroundImage",d,"#",y.value)[0]);y=v.next());v=m;if("p"==a.nodeName||q)m=!0;h="default"==(p.getAttribute("xml:space")||(h?"default":"preserve"));y=Array.from(p.childNodes).every(function(B){return B.nodeType==Node.TEXT_NODE});
858
+ a=[];if(!y)for(var x=t(p.childNodes),w=x.next();!w.done;w=x.next())(w=bv(w.value,b,c,d,e,f,g,h,k,p,m))&&a.push(w);d=null!=l;x=/\S/.test(p.textContent);var D=p.hasAttribute("begin")||p.hasAttribute("end")||p.hasAttribute("dur");if(!(D||x||"br"==p.tagName||0!=a.length||d&&!h))return null;w=ev(p,c);x=w.start;for(w=w.end;n&&n.nodeType==Node.ELEMENT_NODE&&"tt"!=n.tagName;)w=fv(n,c,x,w),x=w.start,w=w.end,n=n.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),
859
+ 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"==p.tagName)return e=new hb(x,w,""),e.lineBreak=!0,e;b="";y&&(b=p.textContent,h&&(b=b.trim(),b=b.replace(/\s+/g," ")));b=new hb(x,w,b);b.nestedCues=a;m||(b.isContainer=!0);k&&(b.cellResolution=k);k=dv(p,"region",f,"")[0];if(p.hasAttribute("region")&&k&&k.getAttribute("xml:id")){var z=k.getAttribute("xml:id");b.region=g.filter(function(B){return B.id==z})[0]}g=k;l&&d&&!p.getAttribute("region")&&!p.getAttribute("style")&&
860
+ (g=dv(l,"region",f,"")[0]);gv(b,p,g,q,e,v,0==a.length);return b}
861
+ 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=ib);(g=hv(b,c,e,"textAlign",!0))?(a.positionAlign=iv[g],a.lineAlign=jv[g],a.textAlign=ub[g.toUpperCase()]):a.textAlign=lb;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",
862
+ 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");
863
+ 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=
864
+ nv(b,e,"textDecoration"))&&mv(a,b)}
865
+ 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")||
866
+ 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=Uf(a,Xu,c);return d?d:ov(a,b,c)}function nv(a,b,c){var d=Uf(a,Xu,c);return d?d:ov(a,b,c)}
867
+ function ov(a,b,c){a=dv(a,"style",b,"");for(var d=null,e=0;e<a.length;e++){var f=Tf(a[e],"urn:ebu:tt:style",c);f||(f=Uf(a[e],Xu,c));f||(f=nv(a[e],b,c));f&&(d=f)}return d}
868
+ 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?Tf(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}}
869
+ 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}}
870
+ 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}
871
+ 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;
872
+ 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]))}
873
+ 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:ob,center:"center",right:"end",start:ob,
874
+ 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"];dd["application/ttml+xml"]=function(){return new Vu};function xv(){this.g=new Vu}xv.prototype.parseInit=function(a){var b=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).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 Bf).box("mdat",If(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};
875
+ M("shaka.text.Mp4TtmlParser",xv);xv.prototype.parseMedia=xv.prototype.parseMedia;xv.prototype.setSequenceMode=xv.prototype.setSequenceMode;xv.prototype.parseInit=xv.prototype.parseInit;dd['application/mp4; codecs="stpp"']=function(){return new xv};dd['application/mp4; codecs="stpp.ttml"']=function(){return new xv};dd['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new xv};dd['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};
876
+ yv.prototype.parseMedia=function(a,b){var c=Bc(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 jq(e[1]));if(null==c)throw new N(2,2,2E3);f=Number(f[1]);for(e=b.segmentStart-b.periodStart;95443.7176888889<=e;)e-=95443.7176888889,f+=8589934592;c=b.periodStart+
877
+ f/9E4-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 jq(g);var h=new jb;mq(g);kq(g);for(var k=mq(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))?
878
+ (l.viewportAnchorX=Number(k[1]),l.viewportAnchorY=Number(k[2])):/^scroll=up$/.exec(m)&&(l.scroll="up");kq(g);k=mq(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 hb(0,0,"");for(var n=!1,p=0;p<k.length;p++){var q=
876
879
  /^\s*([^:]+):\s*(.*)/.exec(k[p]);if(q){var v=q[2].trim().replace(";","");switch(q[1].trim()){case "background-color":n=!0;m.backgroundColor=v;break;case "color":n=!0;m.color=v;break;case "font-family":n=!0;m.fontFamily=v;break;case "font-size":n=!0;m.fontSize=v;break;case "font-weight":700<=parseInt(v,10)&&(n=!0,m.fontWeight=700);break;case "font-style":switch(v){case "normal":n=!0;m.fontStyle=rb;break;case "italic":n=!0;m.fontStyle="italic";break;case "oblique":n=!0,m.fontStyle="oblique"}break;case "opacity":n=
877
- !0;m.opacity=parseFloat(v);break;case "text-shadow":n=!0;m.textShadow=v;break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=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 iq(h[0]);m=yv(k);q=kq(k,/[ \t]+--\x3e[ \t]+/g);n=yv(k);if(null==m||null==q||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),
878
- h.startTime=m,h.endTime=n,h.payload=""):h=new hb(m,n,"");Av(p,h,e);jq(k);for(m=lq(k);m;)Bv(h,m,f),jq(k),m=lq(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 hb(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 hb(0,0,""),e.backgroundColor=d,a.set(c,e)}
879
- function Av(a,b,c){0===c.size&&zv(c);a=Cv(a);for(var d=[],e=-1,f=0;f<a.length;f++)"<"===a[f]?e=f+1:">"===a[f]&&0<e&&(e=a.substr(e,f-e),e.match(Dv)&&d.push(e),e=-1);d=t(d);for(f=d.next();!f.done;f=d.next())f=f.value,a=a.replace("<"+f+">",'<div time="'+f+'">'),a+="</div>";if(f=fg("<span>"+a+"</span>","span")){d=[];f=f.childNodes;if(1==f.length&&(e=f[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=t(f);for(f=a.next();!f.done;f=a.next())Ev(f.value,b,d,c);b.nestedCues=
880
- d}else b.payload=a}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 Fv(a,b){return a&&0<a.length?a:b}
881
- 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=
882
- "italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=yv(new iq(g)))e.startTime=g}}if(Wf(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)}
883
- 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=lb: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"==
884
- 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=nb,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}
885
- function yv(a){a=kq(a,Dv);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;var Dv=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;dd["text/vtt"]=function(){return new xv};dd['text/vtt; codecs="vtt"']=function(){return new xv};
886
- dd['text/vtt; codecs="wvtt"']=function(){return new xv};function Hv(){this.g=null}Hv.prototype.parseInit=function(a){var b=this,c=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).U("mdhd",function(d){d=hi(d.reader,d.version);b.g=d.timescale}).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).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(){};
887
- 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 Bf).box("moof",Ff).box("traf",Ff).U("tfdt",function(B){g=!0;c=gi(B.reader,B.version).le}).U("tfhd",function(B){l=fi(B.reader,B.flags).re}).U("trun",function(B){h=!0;d=ii(B.reader,B.version,B.flags).Ke}).box("mdat",If(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new yf(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Vd||l,y=q.ad?
888
- c+q.ad:m;m=y+(v||0);var x=0;do{var w=n.N();x+=w;var D=n.N(),z=null;"vttc"==Lf(D)?8<w&&(z=n.Za(w-8)):n.skip(w-8);v&&z&&(w=Iv(z,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(dc)};function Iv(a,b,c){var d,e,f;(new Bf).box("payl",If(function(g){d=Bc(g)})).box("iden",If(function(g){e=Bc(g)})).box("sttg",If(function(g){f=Bc(g)})).parse(a);return d?Jv(d,e,f,b,c):null}
889
- function Jv(a,b,c,d,e){d=new hb(d,e,"");Av(a,d,new Map);b&&(d.id=b);if(c)for(a=new iq(c),b=lq(a);b;)Bv(d,b,[]),jq(a),b=lq(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;dd['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=Bc(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 iq(c[0]),e=Lv(d),f=kq(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 hb(e,d,c.slice(1).join("\n").trim()))}return a};
890
- function Lv(a){a=kq(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;dd["text/x-subviewer"]=function(){return new Kv};function Mv(){this.g=new xv}Mv.prototype.parseInit=function(){};Mv.prototype.setSequenceMode=function(){};Mv.prototype.parseMedia=function(a,b){var c=Bc(a);c=Nv(c);c=Fb(Ic(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);
891
- Mv.srt2webvtt=Nv;Mv.prototype.parseMedia=Mv.prototype.parseMedia;Mv.prototype.setSequenceMode=Mv.prototype.setSequenceMode;Mv.prototype.parseInit=Mv.prototype.parseInit;dd["text/srt"]=function(){return new Mv};function Ov(){}Ov.prototype.parseInit=function(){};Ov.prototype.setSequenceMode=function(){};
892
- Ov.prototype.parseMedia=function(a){var b="",c="";a=Bc(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=
893
- [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={sd:e.sd},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 hb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.sd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.sd}}(e)))&&Tv(g,f);d.push(g)}return d};
894
- 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=pb;a.textAlign="start";break;case 2:a.displayAlign=pb;a.textAlign=lb;break;case 3:a.displayAlign=pb;a.textAlign="end";
880
+ !0;m.opacity=parseFloat(v);break;case "text-shadow":n=!0;m.textShadow=v;break;case "white-space":n=!0,m.wrapLine="noWrap"!=v}}}n&&e.set(l,m)}p=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 jq(h[0]);m=zv(k);q=lq(k,/[ \t]+--\x3e[ \t]+/g);n=zv(k);if(null==m||null==q||null==n)throw new N(2,2,2001,"Could not parse cue time range in WebVTT");m+=p;n+=p;p=h.slice(1).join("\n").trim();e.has("global")?(h=e.get("global").clone(),
881
+ h.startTime=m,h.endTime=n,h.payload=""):h=new hb(m,n,"");Bv(p,h,e);kq(k);for(m=mq(k);m;)Cv(h,m,f),kq(k),m=mq(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 hb(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 hb(0,0,""),e.backgroundColor=d,a.set(c,e)}
882
+ function Bv(a,b,c){0===c.size&&Av(c);a=Dv(a);for(var d=[],e=-1,f=0;f<a.length;f++)"<"===a[f]?e=f+1:">"===a[f]&&0<e&&(e=a.substr(e,f-e),e.match(Ev)&&d.push(e),e=-1);d=t(d);for(f=d.next();!f.done;f=d.next())f=f.value,a=a.replace("<"+f+">",'<div time="'+f+'">'),a+="</div>";if(f=fg("<span>"+a+"</span>","span")){d=[];f=f.childNodes;if(1==f.length&&(e=f[0],e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE)){b.payload=a;return}a=t(f);for(f=a.next();!f.done;f=a.next())Fv(f.value,b,d,c);b.nestedCues=
883
+ d}else b.payload=a}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 Gv(a,b){return a&&0<a.length?a:b}
884
+ function Fv(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=Gv(h.backgroundColor,e.backgroundColor),e.color=Gv(h.color,e.color),e.fontFamily=Gv(h.fontFamily,e.fontFamily),e.fontSize=Gv(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=
885
+ "italic";break;case "u":e.textDecoration.push("underline");break;case "div":if(g=a.getAttribute("time"))if(g=zv(new jq(g)))e.startTime=g}}if(Wf(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())Fv(a.value,e,c,d)}
886
+ 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=lb: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"==
887
+ b?"line-right":"center");else if(d=/^region:(.*)$/.exec(b)){if(b=Hv(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=nb,a.line=Number(c[1]),c[2]&&(a.lineAlign=wb[c[2].toUpperCase()])}function Hv(a,b){var c=a.filter(function(d){return d.id==b});return c.length?c[0]:null}
888
+ function zv(a){a=lq(a,Ev);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;var Ev=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;dd["text/vtt"]=function(){return new yv};dd['text/vtt; codecs="vtt"']=function(){return new yv};
889
+ dd['text/vtt; codecs="wvtt"']=function(){return new yv};function Iv(){this.g=null}Iv.prototype.parseInit=function(a){var b=this,c=!1;(new Bf).box("moov",Ff).box("trak",Ff).box("mdia",Ff).U("mdhd",function(d){d=hi(d.reader,d.version);b.g=d.timescale}).box("minf",Ff).box("stbl",Ff).U("stsd",Hf).box("wvtt",function(){c=!0}).parse(a);if(!this.g)throw new N(2,2,2008);if(!c)throw new N(2,2,2008);};Iv.prototype.setSequenceMode=function(){};
890
+ Iv.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 Bf).box("moof",Ff).box("traf",Ff).U("tfdt",function(B){g=!0;c=gi(B.reader,B.version).me}).U("tfhd",function(B){l=fi(B.reader,B.flags).se}).U("trun",function(B){h=!0;d=ii(B.reader,B.version,B.flags).Le}).box("mdat",If(function(B){k=!0;e=B})).parse(a,!1);if(!k&&!g&&!h)throw new N(2,2,2008);for(var m=c,n=new yf(e,0),p=t(d),q=p.next();!q.done;q=p.next()){q=q.value;var v=q.Wd||l,y=q.ad?
891
+ c+q.ad:m;m=y+(v||0);var x=0;do{var w=n.N();x+=w;var D=n.N(),z=null;"vttc"==Jf(D)?8<w&&(z=n.Za(w-8)):n.skip(w-8);v&&z&&(w=Jv(z,b.periodStart+y/this.g,b.periodStart+m/this.g),f.push(w))}while(q.sampleSize&&x<q.sampleSize)}return f.filter(dc)};function Jv(a,b,c){var d,e,f;(new Bf).box("payl",If(function(g){d=Bc(g)})).box("iden",If(function(g){e=Bc(g)})).box("sttg",If(function(g){f=Bc(g)})).parse(a);return d?Kv(d,e,f,b,c):null}
892
+ function Kv(a,b,c,d,e){d=new hb(d,e,"");Bv(a,d,new Map);b&&(d.id=b);if(c)for(a=new jq(c),b=mq(a);b;)Cv(d,b,[]),kq(a),b=mq(a);return d}M("shaka.text.Mp4VttParser",Iv);Iv.prototype.parseMedia=Iv.prototype.parseMedia;Iv.prototype.setSequenceMode=Iv.prototype.setSequenceMode;Iv.prototype.parseInit=Iv.prototype.parseInit;dd['application/mp4; codecs="wvtt"']=function(){return new Iv};function Lv(){}Lv.prototype.parseInit=function(){};Lv.prototype.setSequenceMode=function(){};Lv.prototype.parseMedia=function(a){var b=Bc(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 jq(c[0]),e=Mv(d),f=lq(d,/,/g);d=Mv(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 hb(e,d,c.slice(1).join("\n").trim()))}return a};
893
+ function Mv(a){a=lq(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",Lv);Lv.prototype.parseMedia=Lv.prototype.parseMedia;Lv.prototype.setSequenceMode=Lv.prototype.setSequenceMode;Lv.prototype.parseInit=Lv.prototype.parseInit;dd["text/x-subviewer"]=function(){return new Lv};function Nv(){this.g=new yv}Nv.prototype.parseInit=function(){};Nv.prototype.setSequenceMode=function(){};Nv.prototype.parseMedia=function(a,b){var c=Bc(a);c=Ov(c);c=Fb(Ic(c));return this.g.parseMedia(c,b)};function Ov(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",Nv);
894
+ Nv.srt2webvtt=Ov;Nv.prototype.parseMedia=Nv.prototype.parseMedia;Nv.prototype.setSequenceMode=Nv.prototype.setSequenceMode;Nv.prototype.parseInit=Nv.prototype.parseInit;dd["text/srt"]=function(){return new Nv};function Pv(){}Pv.prototype.parseInit=function(){};Pv.prototype.setSequenceMode=function(){};
895
+ Pv.prototype.parseMedia=function(a){var b="",c="";a=Bc(a).split(/\r?\n\s*\r?\n/);a=t(a);for(var d=a.next();!d.done;d=a.next()){var e=Qv.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=Rv.exec(e)))if(e=f[1].trim(),f=f[2].trim(),"Format"==e)d=f.split(Sv);else if("Style"==e){e=f.split(Sv);f={};for(var g=0;g<d.length&&g<e.length;g++)f[d[g]]=e[g];a.push(f)}d=
896
+ [];b=null;e={};c=t(c.split(/\r?\n/));for(f=c.next();!f.done;e={sd:e.sd},f=c.next())if(f=f.value,!/^\s*;/.test(f)&&(g=Rv.exec(f)))if(f=g[1].trim(),g=g[2].trim(),"Format"==f)b=g.split(Sv);else if("Dialogue"==f){g=g.split(Sv);f={};for(var h=0;h<b.length&&h<g.length;h++)f[b[h]]=g[h];h=Tv(f.Start);var k=Tv(f.End);g=new hb(h,k,g.slice(b.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,""));e.sd=f.Style;(f=a.find(function(l){return function(m){return m.Name==l.sd}}(e)))&&Uv(g,f);d.push(g)}return d};
897
+ function Uv(a,b){var c=b.Fontname;c&&(a.fontFamily=c);if(c=b.Fontsize)a.fontSize=c+"px";if(c=b.PrimaryColour)if(c=Vv(c))a.color=c;if(c=b.BackColour)if(c=Vv(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=pb;a.textAlign="start";break;case 2:a.displayAlign=pb;a.textAlign=lb;break;case 3:a.displayAlign=pb;a.textAlign="end";
895
898
  break;case 5:a.displayAlign="before";a.textAlign="start";break;case 6:a.displayAlign="before";a.textAlign=lb;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=lb;break;case 11:a.displayAlign="center",a.textAlign="end"}if(c=b.AlphaLevel)a.opacity=parseFloat(c)}
896
- 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;
897
- var Pv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Qv=/^\s*([^:]+):\s*(.*)/,Rv=/\s*,\s*/,Vv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;dd["text/x-ssa"]=function(){return new Ov};function Wv(){}function Xv(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=Jc(b,!0):e=b;a=Ec(a);a=Jc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",Wv);
898
- Wv.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Bc(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(Nc(c)))}};Wv.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Wv.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
899
- Wv.verimatrixFairPlayRequest=function(a,b){if(2===a){var c=Fb(b.body);c=Mc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Ic("spc="+c)}};Wv.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Xv(a,d,b)};
900
- Wv.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split(";").pop();return Xv(a,c,b)};Wv.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Ec(a).split("skd://").pop();return Xv(a,c,b)};Wv.initDataTransform=Xv;Wv.defaultGetContentId=function(a){a=Ec(a);return(new Nb(a)).Ga};
901
- 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"'}]},C(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)})};/*
899
+ function Vv(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 Tv(a){a=Wv.exec(a);return 3600*(a[1]?parseInt(a[1].replace(":",""),10):0)+60*parseInt(a[2],10)+parseFloat(a[3])}M("shaka.text.SsaTextParser",Pv);Pv.prototype.parseMedia=Pv.prototype.parseMedia;Pv.prototype.setSequenceMode=Pv.prototype.setSequenceMode;Pv.prototype.parseInit=Pv.prototype.parseInit;
900
+ var Qv=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Rv=/^\s*([^:]+):\s*(.*)/,Sv=/\s*,\s*/,Wv=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;dd["text/x-ssa"]=function(){return new Pv};function Xv(){}function Yv(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=Jc(b,!0):e=b;a=Hc(a);a=Jc(a,!0);var f=new Uint8Array(12+a.byteLength+e.byteLength+c.byteLength),g=0;d(a);d(e);d(c);return f}M("shaka.util.FairPlayUtils",Xv);
901
+ Xv.commonFairPlayResponse=function(a,b){if(2===a){try{var c=Bc(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(Nc(c)))}};Xv.conaxFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};Xv.ezdrmFairPlayRequest=function(a,b){2===a&&(b.headers["Content-Type"]="application/octet-stream")};
902
+ Xv.verimatrixFairPlayRequest=function(a,b){if(2===a){var c=Fb(b.body);c=Mc(c);b.headers["Content-Type"]="application/x-www-form-urlencoded";b.body=Ic("spc="+c)}};Xv.conaxInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split("skd://").pop().split("?").shift();c=window.atob(c);var d=new ArrayBuffer(2*c.length);d=new Uint16Array(d);for(var e=0,f=c.length;e<f;e++)d[e]=c.charCodeAt(e);return Yv(a,d,b)};
903
+ Xv.ezdrmInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split(";").pop();return Yv(a,c,b)};Xv.verimatrixInitDataTransform=function(a,b,c){if("skd"!==b)return a;b=c.serverCertificate;c=Hc(a).split("skd://").pop();return Yv(a,c,b)};Xv.initDataTransform=Yv;Xv.defaultGetContentId=function(a){a=Hc(a);return(new Nb(a)).Fa};
904
+ Xv.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"'}]},C(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)})};/*
902
905
  @license
903
906
  EME Encryption Scheme Polyfill
904
907
  Copyright 2019 Google LLC
905
908
  SPDX-License-Identifier: Apache-2.0
906
909
  */
907
- function Yv(){}var Zv;function $v(){Zv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(Zv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=aw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
908
- function aw(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,Zv.call(c,a,b),2);d=e.h;if(bw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=Zv,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=cw;return e["return"](cw.call(c,
910
+ function Zv(){}var $v;function aw(){$v?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?($v=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=bw):console.debug("EmeEncryptionSchemePolyfill: EME not found")}
911
+ function bw(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,$v.call(c,a,b),2);d=e.h;if(cw(d))return console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=$v,e["return"](d);console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");navigator.requestMediaKeySystemAccess=dw;return e["return"](dw.call(c,
909
912
  a,b))})}
910
- function cw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return K(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=dw(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=ew(h.videoCapabilities,d),l=ew(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 n=Error("Unsupported keySystem or supportedConfigurations."),
911
- n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,Zv.call(c,a,e),2)}p=q.h;return q["return"](new fw(p,d))})}function ew(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Yv);Yv.install=$v;function gw(){}var hw;
912
- function iw(){hw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(hw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=jw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
913
- function jw(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,hw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&bw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=hw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
914
- navigator.mediaCapabilities.decodingInfo=kw;if(d){f.A(3);break}e=c;return u(f,lw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](kw.call(b,a))}})}
915
- function kw(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=dw(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,hw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
916
- new fw(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,lw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
917
- function lw(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,
918
- navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}M("McEncryptionSchemePolyfill",gw);gw.install=iw;function fw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
919
- fw.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};fw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
920
- function dw(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 bw(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}
921
- function mw(){}function vt(){$v();iw()}M("EncryptionSchemePolyfills",mw);mw.install=vt;"undefined"!==typeof module&&module.exports&&(module.exports=mw);}).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})();
913
+ function dw(a,b){var c=this,d,e,f,g,h,k,l,m,n,p;return K(function(q){if(1==q.g){console.assert(c==navigator,'bad "this" for requestMediaKeySystemAccess');d=ew(a);e=[];f=t(b);for(g=f.next();!g.done;g=f.next())h=g.value,k=fw(h.videoCapabilities,d),l=fw(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 n=Error("Unsupported keySystem or supportedConfigurations."),
914
+ n.name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n;return u(q,$v.call(c,a,e),2)}p=q.h;return q["return"](new gw(p,d))})}function fw(a,b){return a?a.filter(function(c){return!c.encryptionScheme||c.encryptionScheme==b}):a}M("EmeEncryptionSchemePolyfill",Zv);Zv.install=aw;function hw(){}var iw;
915
+ function jw(){iw?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(iw=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=kw):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}
916
+ function kw(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,iw.call(b,a),2);case 2:c=f.h;if(!a.keySystemConfiguration)return f["return"](c);if((d=c.keySystemAccess)&&cw(d))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=iw,f["return"](c);console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support.");
917
+ navigator.mediaCapabilities.decodingInfo=lw;if(d){f.A(3);break}e=c;return u(f,mw(a),4);case 4:return e.keySystemAccess=f.h,f["return"](c);case 3:return f["return"](lw.call(b,a))}})}
918
+ function lw(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=ew(e),h={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:a},f&&f!=c||g&&g!=c)?m["return"](h):u(m,iw.call(b,a),2);case 2:k=m.h;if(k.keySystemAccess){k.keySystemAccess=
919
+ new gw(k.keySystemAccess,c);m.A(3);break}if(!a.keySystemConfiguration){m.A(3);break}l=k;return u(m,mw(a),5);case 5:l.keySystemAccess=m.h;case 3:return m["return"](k)}})}
920
+ function mw(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,
921
+ navigator.requestMediaKeySystemAccess(a.keySystemConfiguration.keySystem,[b]),2)}c=d.h;return d["return"](c)})}M("McEncryptionSchemePolyfill",hw);hw.install=jw;function gw(a,b){this.h=a;this.g=b;this.keySystem=a.keySystem}
922
+ gw.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};gw.prototype.createMediaKeys=function(){return this.h.createMediaKeys()};
923
+ function ew(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 cw(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}
924
+ function nw(){}function wt(){aw();jw()}M("EncryptionSchemePolyfills",nw);nw.install=wt;"undefined"!==typeof module&&module.exports&&(module.exports=nw);}).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})();
922
925
 
923
926
  //# sourceMappingURL=shaka-player.compiled.map